From 5cd2ad73e1ee766b750996d557254f12849f3d28 Mon Sep 17 00:00:00 2001 From: Maciej Kubiak Date: Sun, 9 Aug 2020 00:15:53 +0200 Subject: [PATCH 1/2] Pause recording Added pause recording functionality (#17) Updated sample to show this feature too --- .gitignore | 2 + dist/index.js | 122 ++++++++++++++++++++++++++++++++------------ dist/index.js.map | 2 +- samples/index.html | 51 +++++++++++++----- src/mic-recorder.js | 102 +++++++++++++++++++++++++----------- 5 files changed, 202 insertions(+), 77 deletions(-) diff --git a/.gitignore b/.gitignore index 9daa824..cae559a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .DS_Store node_modules + +/.idea \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index 6eaf4c7..eb82986 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15868,22 +15868,101 @@ var MicRecorder = function () { _this.lameEncoder.encode(event.inputBuffer.getChannelData(0)); }; - // Begin retrieving microphone data. - this.microphone.connect(this.processor); - this.processor.connect(this.context.destination); + this.connectMicrophone(); } }, { - key: 'stop', + key: 'initialize', + + + /** + * Requests access to the microphone and starts recording + * @return Promise + */ + value: function initialize() { + var _this2 = this; + + var AudioContext = window.AudioContext || window.webkitAudioContext; + this.context = new AudioContext(); + this.config.sampleRate = this.context.sampleRate; + this.lameEncoder = new Encoder(this.config); + + var audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true; + + return new Promise(function (resolve, reject) { + navigator.mediaDevices.getUserMedia({ audio: audio }).then(function (stream) { + _this2.addMicrophoneListener(stream); + resolve(stream); + }).catch(function (err) { + reject(err); + }); + }); + } + }, { + key: 'start', + + + /** + * Initializes or resumes recording + * @return Promise + */ + value: function start() { + if (!this.processor || !this.microphone) { + return this.initialize(); + } else { + this.connectMicrophone(); + return Promise.resolve(); + } + } + + /** + * Pause recording + * @return Promise + */ + + }, { + key: 'pause', + value: function pause() { + this.disconnectMicrophone(); + return Promise.resolve(); + } + }, { + key: 'connectMicrophone', + + + /** + * Start retrieving microphone data + */ + value: function connectMicrophone() { + if (this.processor && this.microphone) { + this.microphone.connect(this.processor); + this.processor.connect(this.context.destination); + } + } + /** + * Stop retrieving microphone data + */ + + }, { + key: 'disconnectMicrophone', + value: function disconnectMicrophone() { + if (this.processor && this.microphone) { + this.microphone.disconnect(); + this.processor.disconnect(); + } + } /** * Disconnect microphone, processor and remove activeStream + * @return MicRecorder */ + + }, { + key: 'stop', value: function stop() { if (this.processor && this.microphone) { // Clean up the Web Audio API resources. - this.microphone.disconnect(); - this.processor.disconnect(); + this.disconnectMicrophone(); // If all references using this.context are destroyed, context is closed // automatically. DOMException is fired when trying to close again @@ -15897,44 +15976,19 @@ var MicRecorder = function () { this.activeStream.getAudioTracks().forEach(function (track) { return track.stop(); }); + this.processor = null; + this.microphone = null; } return this; } - }, { - key: 'start', - - - /** - * Requests access to the microphone and start recording - * @return Promise - */ - value: function start() { - var _this2 = this; - - var AudioContext = window.AudioContext || window.webkitAudioContext; - this.context = new AudioContext(); - this.config.sampleRate = this.context.sampleRate; - this.lameEncoder = new Encoder(this.config); - - var audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true; - - return new Promise(function (resolve, reject) { - navigator.mediaDevices.getUserMedia({ audio: audio }).then(function (stream) { - _this2.addMicrophoneListener(stream); - resolve(stream); - }).catch(function (err) { - reject(err); - }); - }); - } }, { key: 'getMp3', /** * Return Mp3 Buffer and Blob with type mp3 - * @return {Promise} + * @return Promise */ value: function getMp3() { var _this3 = this; diff --git a/dist/index.js.map b/dist/index.js.map index 1f5ac56..54d7ec4 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../node_modules/lamejs/src/js/common.js","../node_modules/lamejs/src/js/NewMDCT.js","../node_modules/lamejs/src/js/III_psy_xmin.js","../node_modules/lamejs/src/js/III_psy_ratio.js","../node_modules/lamejs/src/js/Encoder.js","../node_modules/lamejs/src/js/FFT.js","../node_modules/lamejs/src/js/PsyModel.js","../node_modules/lamejs/src/js/MPEGMode.js","../node_modules/lamejs/src/js/LameGlobalFlags.js","../node_modules/lamejs/src/js/L3Side.js","../node_modules/lamejs/src/js/GrInfo.js","../node_modules/lamejs/src/js/IIISideInfo.js","../node_modules/lamejs/src/js/ScaleFac.js","../node_modules/lamejs/src/js/NsPsy.js","../node_modules/lamejs/src/js/VBRSeekInfo.js","../node_modules/lamejs/src/js/LameInternalFlags.js","../node_modules/lamejs/src/js/ATH.js","../node_modules/lamejs/src/js/GainAnalysis.js","../node_modules/lamejs/src/js/ReplayGain.js","../node_modules/lamejs/src/js/MeanBits.js","../node_modules/lamejs/src/js/CBRNewIterationLoop.js","../node_modules/lamejs/src/js/Tables.js","../node_modules/lamejs/src/js/QuantizePVT.js","../node_modules/lamejs/src/js/Takehiro.js","../node_modules/lamejs/src/js/BitStream.js","../node_modules/lamejs/src/js/Lame.js","../node_modules/lamejs/src/js/Presets.js","../node_modules/lamejs/src/js/VBRQuantize.js","../node_modules/lamejs/src/js/CalcNoiseResult.js","../node_modules/lamejs/src/js/CalcNoiseData.js","../node_modules/lamejs/src/js/Quantize.js","../node_modules/lamejs/src/js/Reservoir.js","../node_modules/lamejs/src/js/Version.js","../node_modules/lamejs/src/js/VBRTag.js","../node_modules/lamejs/src/js/index.js","../src/encoder.js","../src/mic-recorder.js"],"sourcesContent":["function new_byte(count) {\n return new Int8Array(count);\n}\n\nfunction new_short(count) {\n return new Int16Array(count);\n}\n\nfunction new_int(count) {\n return new Int32Array(count);\n}\n\nfunction new_float(count) {\n return new Float32Array(count);\n}\n\nfunction new_double(count) {\n return new Float64Array(count);\n}\n\nfunction new_float_n(args) {\n if (args.length == 1) {\n return new_float(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_float_n(args));\n }\n return A;\n}\nfunction new_int_n(args) {\n if (args.length == 1) {\n return new_int(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_int_n(args));\n }\n return A;\n}\n\nfunction new_short_n(args) {\n if (args.length == 1) {\n return new_short(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_short_n(args));\n }\n return A;\n}\n\nfunction new_array_n(args) {\n if (args.length == 1) {\n return new Array(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_array_n(args));\n }\n return A;\n}\n\n\nvar Arrays = {};\n\nArrays.fill = function (a, fromIndex, toIndex, val) {\n if (arguments.length == 2) {\n for (var i = 0; i < a.length; i++) {\n a[i] = arguments[1];\n }\n } else {\n for (var i = fromIndex; i < toIndex; i++) {\n a[i] = val;\n }\n }\n};\n\nvar System = {};\n\nSystem.arraycopy = function (src, srcPos, dest, destPos, length) {\n var srcEnd = srcPos + length;\n while (srcPos < srcEnd)\n dest[destPos++] = src[srcPos++];\n};\n\n\nvar Util = {};\nUtil.SQRT2 = 1.41421356237309504880;\nUtil.FAST_LOG10 = function (x) {\n return Math.log10(x);\n};\n\nUtil.FAST_LOG10_X = function (x, y) {\n return Math.log10(x) * y;\n};\n\nfunction ShortBlock(ordinal) {\n this.ordinal = ordinal;\n}\n/**\n * LAME may use them, even different block types for L/R.\n */\nShortBlock.short_block_allowed = new ShortBlock(0);\n/**\n * LAME may use them, but always same block types in L/R.\n */\nShortBlock.short_block_coupled = new ShortBlock(1);\n/**\n * LAME will not use short blocks, long blocks only.\n */\nShortBlock.short_block_dispensed = new ShortBlock(2);\n/**\n * LAME will not use long blocks, short blocks only.\n */\nShortBlock.short_block_forced = new ShortBlock(3);\n\nvar Float = {};\nFloat.MAX_VALUE = 3.4028235e+38;\n\nfunction VbrMode(ordinal) {\n this.ordinal = ordinal;\n}\nVbrMode.vbr_off = new VbrMode(0);\nVbrMode.vbr_mt = new VbrMode(1);\nVbrMode.vbr_rh = new VbrMode(2);\nVbrMode.vbr_abr = new VbrMode(3);\nVbrMode.vbr_mtrh = new VbrMode(4);\nVbrMode.vbr_default = VbrMode.vbr_mtrh;\n\nvar assert = function (x) {\n //console.assert(x);\n};\n\nmodule.exports = {\n \"System\": System,\n \"VbrMode\": VbrMode,\n \"Float\": Float,\n \"ShortBlock\": ShortBlock,\n \"Util\": Util,\n \"Arrays\": Arrays,\n \"new_array_n\": new_array_n,\n \"new_byte\": new_byte,\n \"new_double\": new_double,\n \"new_float\": new_float,\n \"new_float_n\": new_float_n,\n \"new_int\": new_int,\n \"new_int_n\": new_int_n,\n \"new_short\": new_short,\n \"new_short_n\": new_short_n,\n \"assert\": assert\n};\n","/*\n * MP3 window subband -> subband filtering -> mdct routine\n *\n * Copyright (c) 1999-2000 Takehiro Tominaga\n *\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Library General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n/*\n * Special Thanks to Patrick De Smet for your advices.\n */\n\n/* $Id: NewMDCT.java,v 1.11 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n\nfunction NewMDCT() {\n\n\tvar enwindow = [\n\t\t\t-4.77e-07 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.03951e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.53674e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t2.841473e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t3.5758972e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t3.401756e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.83715e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.9182e-05 * 0.740951125354959 / 2.384e-06, /* 15 */\n\t\t\t1.2398e-05 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.91212e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t2.283096e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.6994476e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t-1.8756866e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t-2.630711e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t-2.47478e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t-1.4782e-05 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.063471690191471e-01, 1.960342806591213e-01,\n\n\t\t\t-4.77e-07 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.05858e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.30786e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t2.521515e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t3.5694122e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t3.643036e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.91821e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.6321e-05 * 0.773010453362737 / 2.384e-06, /* 14 */\n\t\t\t1.1444e-05 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.65462e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t2.110004e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.6112804e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t-1.9634247e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t-2.803326e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t-2.77042e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t-1.6689e-05 * 0.773010453362737 / 2.384e-06,\n\t\t\t8.206787908286602e-01, 3.901806440322567e-01,\n\n\t\t\t-4.77e-07 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.07288e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.02653e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t2.174854e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t3.5586357e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t3.858566e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.95159e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.3460e-05 * 0.803207531480645 / 2.384e-06, /* 13 */\n\t\t\t1.0014e-05 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.40190e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.937389e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.5233517e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t-2.0506859e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t-2.974033e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t-3.07560e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t-1.8120e-05 * 0.803207531480645 / 2.384e-06,\n\t\t\t7.416505462720353e-01, 5.805693545089249e-01,\n\n\t\t\t-4.77e-07 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.08242e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t8.68797e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.800537e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t3.5435200e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t4.049301e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t9.94205e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t9.0599e-05 * 0.831469612302545 / 2.384e-06, /* 12 */\n\t\t\t9.060e-06 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.16348e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.766682e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.4358521e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t-2.1372318e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t-3.14188e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t-3.39031e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t-1.9550e-05 * 0.831469612302545 / 2.384e-06,\n\t\t\t6.681786379192989e-01, 7.653668647301797e-01,\n\n\t\t\t-4.77e-07 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.08719e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t8.29220e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.399517e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t3.5242081e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t4.215240e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t9.89437e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t8.7261e-05 * 0.857728610000272 / 2.384e-06, /* 11 */\n\t\t\t8.106e-06 * 0.857728610000272 / 2.384e-06,\n\t\t\t9.3937e-05 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.597881e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.3489246e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t-2.2228718e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t-3.306866e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t-3.71456e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t-2.1458e-05 * 0.857728610000272 / 2.384e-06,\n\t\t\t5.993769336819237e-01, 9.427934736519954e-01,\n\n\t\t\t-4.77e-07 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.08719e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t7.8392e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t9.71317e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t3.5007000e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t4.357815e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t9.80854e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t8.3923e-05 * 0.881921264348355 / 2.384e-06, /* 10 */\n\t\t\t7.629e-06 * 0.881921264348355 / 2.384e-06,\n\t\t\t7.2956e-05 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.432419e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.2627602e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t-2.3074150e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t-3.467083e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t-4.04358e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t-2.3365e-05 * 0.881921264348355 / 2.384e-06,\n\t\t\t5.345111359507916e-01, 1.111140466039205e+00,\n\n\t\t\t-9.54e-07 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.08242e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t7.31945e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t5.15938e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t3.4730434e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t4.477024e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t9.68933e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t8.0585e-05 * 0.903989293123443 / 2.384e-06, /* 9 */\n\t\t\t6.676e-06 * 0.903989293123443 / 2.384e-06,\n\t\t\t5.2929e-05 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.269817e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.1775017e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t-2.3907185e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t-3.622532e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t-4.38213e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t-2.5272e-05 * 0.903989293123443 / 2.384e-06,\n\t\t\t4.729647758913199e-01, 1.268786568327291e+00,\n\n\t\t\t-9.54e-07 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.06812e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t6.74248e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.3379e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.4412861e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t4.573822e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t9.54151e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t7.6771e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t6.199e-06 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.4332e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.111031e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.0933399e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-2.4725437e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-3.771782e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-4.72546e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-2.7657e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t4.1421356237309504879e-01, /* tan(PI/8) */\n\t\t\t1.414213562373095e+00,\n\n\t\t\t-9.54e-07 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.05381e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t6.10352e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t-4.75883e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t3.4055710e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t4.649162e-03 * 0.941544065183021 / 2.384e-06,\n\t\t\t9.35555e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t7.3433e-05 * 0.941544065183021 / 2.384e-06, /* 7 */\n\t\t\t5.245e-06 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.7166e-05 * 0.941544065183021 / 2.384e-06,\n\t\t\t9.56535e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.0103703e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t-2.5527000e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t-3.914356e-03 * 0.941544065183021 / 2.384e-06,\n\t\t\t-5.07355e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t-3.0041e-05 * 0.941544065183021 / 2.384e-06,\n\t\t\t3.578057213145241e-01, 1.546020906725474e+00,\n\n\t\t\t-9.54e-07 * 0.956940335732209 / 2.384e-06,\n\t\t\t1.02520e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t5.39303e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t-1.011848e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t3.3659935e-02 * 0.956940335732209 / 2.384e-06,\n\t\t\t4.703045e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.15051e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t7.0095e-05 * 0.956940335732209 / 2.384e-06, /* 6 */\n\t\t\t4.768e-06 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.54e-07 * 0.956940335732209 / 2.384e-06,\n\t\t\t8.06808e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.287834e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t-2.6310921e-02 * 0.956940335732209 / 2.384e-06,\n\t\t\t-4.048824e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t-5.42164e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t-3.2425e-05 * 0.956940335732209 / 2.384e-06,\n\t\t\t3.033466836073424e-01, 1.662939224605090e+00,\n\n\t\t\t-1.431e-06 * 0.970031253194544 / 2.384e-06,\n\t\t\t9.9182e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t4.62532e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t-1.573563e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t3.3225536e-02 * 0.970031253194544 / 2.384e-06,\n\t\t\t4.737377e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t8.91685e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t6.6280e-05 * 0.970031253194544 / 2.384e-06, /* 5 */\n\t\t\t4.292e-06 * 0.970031253194544 / 2.384e-06,\n\t\t\t-1.3828e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t6.61850e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t8.487225e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t-2.7073860e-02 * 0.970031253194544 / 2.384e-06,\n\t\t\t-4.174709e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t-5.76973e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t-3.4809e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t2.504869601913055e-01, 1.763842528696710e+00,\n\n\t\t\t-1.431e-06 * 0.98078528040323 / 2.384e-06,\n\t\t\t9.5367e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t3.78609e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.161503e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t3.2754898e-02 * 0.98078528040323 / 2.384e-06,\n\t\t\t4.752159e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t8.66413e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t6.2943e-05 * 0.98078528040323 / 2.384e-06, /* 4 */\n\t\t\t3.815e-06 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.718e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t5.22137e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t7.703304e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.7815342e-02 * 0.98078528040323 / 2.384e-06,\n\t\t\t-4.290581e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t-6.11782e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t-3.7670e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t1.989123673796580e-01, 1.847759065022573e+00,\n\n\t\t\t-1.907e-06 * 0.989176509964781 / 2.384e-06,\n\t\t\t9.0122e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t2.88486e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t-2.774239e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t3.2248020e-02 * 0.989176509964781 / 2.384e-06,\n\t\t\t4.748821e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t8.38757e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t5.9605e-05 * 0.989176509964781 / 2.384e-06, /* 3 */\n\t\t\t3.338e-06 * 0.989176509964781 / 2.384e-06,\n\t\t\t-3.9577e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t3.88145e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t6.937027e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t-2.8532982e-02 * 0.989176509964781 / 2.384e-06,\n\t\t\t-4.395962e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t-6.46591e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t-4.0531e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t1.483359875383474e-01, 1.913880671464418e+00,\n\n\t\t\t-1.907e-06 * 0.995184726672197 / 2.384e-06,\n\t\t\t8.4400e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t1.91689e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t-3.411293e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t3.1706810e-02 * 0.995184726672197 / 2.384e-06,\n\t\t\t4.728317e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t8.09669e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t5.579e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t3.338e-06 * 0.995184726672197 / 2.384e-06,\n\t\t\t-5.0545e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t2.59876e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t6.189346e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t-2.9224873e-02 * 0.995184726672197 / 2.384e-06,\n\t\t\t-4.489899e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t-6.80923e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t-4.3392e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t9.849140335716425e-02, 1.961570560806461e+00,\n\n\t\t\t-2.384e-06 * 0.998795456205172 / 2.384e-06,\n\t\t\t7.7724e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t8.8215e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.072189e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t3.1132698e-02 * 0.998795456205172 / 2.384e-06,\n\t\t\t4.691124e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t7.79152e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t5.2929e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t2.861e-06 * 0.998795456205172 / 2.384e-06,\n\t\t\t-6.0558e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t1.37329e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t5.462170e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t-2.9890060e-02 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.570484e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t-7.14302e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.6253e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t4.912684976946725e-02, 1.990369453344394e+00,\n\n\t\t\t3.5780907e-02 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.7876148e-02 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t3.134727e-03 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t2.457142e-03 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t9.71317e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t2.18868e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.01566e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.3828e-05 * Util.SQRT2 * 0.5 / 2.384e-06,\n\n\t\t\t3.0526638e-02 / 2.384e-06, 4.638195e-03 / 2.384e-06,\n\t\t\t7.47204e-04 / 2.384e-06, 4.9591e-05 / 2.384e-06,\n\t\t\t4.756451e-03 / 2.384e-06, 2.1458e-05 / 2.384e-06,\n\t\t\t-6.9618e-05 / 2.384e-06, /* 2.384e-06/2.384e-06 */\n\t];\n\n\tvar NS = 12;\n\tvar NL = 36;\n\n\tvar win = [\n\t [\n\t 2.382191739347913e-13,\n\t 6.423305872147834e-13,\n\t 9.400849094049688e-13,\n\t 1.122435026096556e-12,\n\t 1.183840321267481e-12,\n\t 1.122435026096556e-12,\n\t 9.400849094049690e-13,\n\t 6.423305872147839e-13,\n\t 2.382191739347918e-13,\n\n\t 5.456116108943412e-12,\n\t 4.878985199565852e-12,\n\t 4.240448995017367e-12,\n\t 3.559909094758252e-12,\n\t 2.858043359288075e-12,\n\t 2.156177623817898e-12,\n\t 1.475637723558783e-12,\n\t 8.371015190102974e-13,\n\t 2.599706096327376e-13,\n\n\t -5.456116108943412e-12,\n\t -4.878985199565852e-12,\n\t -4.240448995017367e-12,\n\t -3.559909094758252e-12,\n\t -2.858043359288076e-12,\n\t -2.156177623817898e-12,\n\t -1.475637723558783e-12,\n\t -8.371015190102975e-13,\n\t -2.599706096327376e-13,\n\n\t -2.382191739347923e-13,\n\t -6.423305872147843e-13,\n\t -9.400849094049696e-13,\n\t -1.122435026096556e-12,\n\t -1.183840321267481e-12,\n\t -1.122435026096556e-12,\n\t -9.400849094049694e-13,\n\t -6.423305872147840e-13,\n\t -2.382191739347918e-13,\n\t ],\n\t [\n\t 2.382191739347913e-13,\n\t 6.423305872147834e-13,\n\t 9.400849094049688e-13,\n\t 1.122435026096556e-12,\n\t 1.183840321267481e-12,\n\t 1.122435026096556e-12,\n\t 9.400849094049688e-13,\n\t 6.423305872147841e-13,\n\t 2.382191739347918e-13,\n\n\t 5.456116108943413e-12,\n\t 4.878985199565852e-12,\n\t 4.240448995017367e-12,\n\t 3.559909094758253e-12,\n\t 2.858043359288075e-12,\n\t 2.156177623817898e-12,\n\t 1.475637723558782e-12,\n\t 8.371015190102975e-13,\n\t 2.599706096327376e-13,\n\n\t -5.461314069809755e-12,\n\t -4.921085770524055e-12,\n\t -4.343405037091838e-12,\n\t -3.732668368707687e-12,\n\t -3.093523840190885e-12,\n\t -2.430835727329465e-12,\n\t -1.734679010007751e-12,\n\t -9.748253656609281e-13,\n\t -2.797435120168326e-13,\n\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t -2.283748241799531e-13,\n\t -4.037858874020686e-13,\n\t -2.146547464825323e-13,\n\t ],\n\t [\n\t 1.316524975873958e-01, /* win[SHORT_TYPE] */\n\t 4.142135623730950e-01,\n\t 7.673269879789602e-01,\n\n\t 1.091308501069271e+00, /* tantab_l */\n\t 1.303225372841206e+00,\n\t 1.569685577117490e+00,\n\t 1.920982126971166e+00,\n\t 2.414213562373094e+00,\n\t 3.171594802363212e+00,\n\t 4.510708503662055e+00,\n\t 7.595754112725146e+00,\n\t 2.290376554843115e+01,\n\n\t 0.98480775301220802032, /* cx */\n\t 0.64278760968653936292,\n\t 0.34202014332566882393,\n\t 0.93969262078590842791,\n\t -0.17364817766693030343,\n\t -0.76604444311897790243,\n\t 0.86602540378443870761,\n\t 0.500000000000000e+00,\n\n\t -5.144957554275265e-01, /* ca */\n\t -4.717319685649723e-01,\n\t -3.133774542039019e-01,\n\t -1.819131996109812e-01,\n\t -9.457419252642064e-02,\n\t -4.096558288530405e-02,\n\t -1.419856857247115e-02,\n\t -3.699974673760037e-03,\n\n\t 8.574929257125442e-01, /* cs */\n\t 8.817419973177052e-01,\n\t 9.496286491027329e-01,\n\t 9.833145924917901e-01,\n\t 9.955178160675857e-01,\n\t 9.991605581781475e-01,\n\t 9.998991952444470e-01,\n\t 9.999931550702802e-01,\n\t ],\n\t [\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 2.283748241799531e-13,\n\t 4.037858874020686e-13,\n\t 2.146547464825323e-13,\n\n\t 5.461314069809755e-12,\n\t 4.921085770524055e-12,\n\t 4.343405037091838e-12,\n\t 3.732668368707687e-12,\n\t 3.093523840190885e-12,\n\t 2.430835727329466e-12,\n\t 1.734679010007751e-12,\n\t 9.748253656609281e-13,\n\t 2.797435120168326e-13,\n\n\t -5.456116108943413e-12,\n\t -4.878985199565852e-12,\n\t -4.240448995017367e-12,\n\t -3.559909094758253e-12,\n\t -2.858043359288075e-12,\n\t -2.156177623817898e-12,\n\t -1.475637723558782e-12,\n\t -8.371015190102975e-13,\n\t -2.599706096327376e-13,\n\n\t -2.382191739347913e-13,\n\t -6.423305872147834e-13,\n\t -9.400849094049688e-13,\n\t -1.122435026096556e-12,\n\t -1.183840321267481e-12,\n\t -1.122435026096556e-12,\n\t -9.400849094049688e-13,\n\t -6.423305872147841e-13,\n\t -2.382191739347918e-13,\n\t ]\n\t];\n\n\tvar tantab_l = win[Encoder.SHORT_TYPE];\n\tvar cx = win[Encoder.SHORT_TYPE];\n\tvar ca = win[Encoder.SHORT_TYPE];\n\tvar cs = win[Encoder.SHORT_TYPE];\n\n\t/**\n\t * new IDCT routine written by Takehiro TOMINAGA\n\t *\n\t * PURPOSE: Overlapping window on PCM samples
\n\t *\n\t * SEMANTICS:
\n\t * 32 16-bit pcm samples are scaled to fractional 2's complement and\n\t * concatenated to the end of the window buffer #x#. The updated window\n\t * buffer #x# is then windowed by the analysis window #c# to produce the\n\t * windowed sample #z#\n\t */\n\tvar order = [\n\t 0, 1, 16, 17, 8, 9, 24, 25, 4, 5, 20, 21, 12, 13, 28, 29,\n\t 2, 3, 18, 19, 10, 11, 26, 27, 6, 7, 22, 23, 14, 15, 30, 31\n\t];\n\n\t/**\n\t * returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32\n\t */\n\tfunction window_subband(x1, x1Pos, a) {\n\t\tvar wp = 10;\n\n\t\tvar x2 = x1Pos + 238 - 14 - 286;\n\n\t\tfor (var i = -15; i < 0; i++) {\n\t\t\tvar w, s, t;\n\n\t\t\tw = enwindow[wp + -10];\n\t\t\ts = x1[x2 + -224] * w;\n\t\t\tt = x1[x1Pos + 224] * w;\n\t\t\tw = enwindow[wp + -9];\n\t\t\ts += x1[x2 + -160] * w;\n\t\t\tt += x1[x1Pos + 160] * w;\n\t\t\tw = enwindow[wp + -8];\n\t\t\ts += x1[x2 + -96] * w;\n\t\t\tt += x1[x1Pos + 96] * w;\n\t\t\tw = enwindow[wp + -7];\n\t\t\ts += x1[x2 + -32] * w;\n\t\t\tt += x1[x1Pos + 32] * w;\n\t\t\tw = enwindow[wp + -6];\n\t\t\ts += x1[x2 + 32] * w;\n\t\t\tt += x1[x1Pos + -32] * w;\n\t\t\tw = enwindow[wp + -5];\n\t\t\ts += x1[x2 + 96] * w;\n\t\t\tt += x1[x1Pos + -96] * w;\n\t\t\tw = enwindow[wp + -4];\n\t\t\ts += x1[x2 + 160] * w;\n\t\t\tt += x1[x1Pos + -160] * w;\n\t\t\tw = enwindow[wp + -3];\n\t\t\ts += x1[x2 + 224] * w;\n\t\t\tt += x1[x1Pos + -224] * w;\n\n\t\t\tw = enwindow[wp + -2];\n\t\t\ts += x1[x1Pos + -256] * w;\n\t\t\tt -= x1[x2 + 256] * w;\n\t\t\tw = enwindow[wp + -1];\n\t\t\ts += x1[x1Pos + -192] * w;\n\t\t\tt -= x1[x2 + 192] * w;\n\t\t\tw = enwindow[wp + 0];\n\t\t\ts += x1[x1Pos + -128] * w;\n\t\t\tt -= x1[x2 + 128] * w;\n\t\t\tw = enwindow[wp + 1];\n\t\t\ts += x1[x1Pos + -64] * w;\n\t\t\tt -= x1[x2 + 64] * w;\n\t\t\tw = enwindow[wp + 2];\n\t\t\ts += x1[x1Pos + 0] * w;\n\t\t\tt -= x1[x2 + 0] * w;\n\t\t\tw = enwindow[wp + 3];\n\t\t\ts += x1[x1Pos + 64] * w;\n\t\t\tt -= x1[x2 + -64] * w;\n\t\t\tw = enwindow[wp + 4];\n\t\t\ts += x1[x1Pos + 128] * w;\n\t\t\tt -= x1[x2 + -128] * w;\n\t\t\tw = enwindow[wp + 5];\n\t\t\ts += x1[x1Pos + 192] * w;\n\t\t\tt -= x1[x2 + -192] * w;\n\n\t\t\t/*\n\t\t\t * this multiplyer could be removed, but it needs more 256 FLOAT\n\t\t\t * data. thinking about the data cache performance, I think we\n\t\t\t * should not use such a huge table. tt 2000/Oct/25\n\t\t\t */\n\t\t\ts *= enwindow[wp + 6];\n\t\t\tw = t - s;\n\t\t\ta[30 + i * 2] = t + s;\n\t\t\ta[31 + i * 2] = enwindow[wp + 7] * w;\n\t\t\twp += 18;\n\t\t\tx1Pos--;\n\t\t\tx2++;\n\t\t}\n\t\t{\n\t\t\tvar s, t, u, v;\n\t\t\tt = x1[x1Pos + -16] * enwindow[wp + -10];\n\t\t\ts = x1[x1Pos + -32] * enwindow[wp + -2];\n\t\t\tt += (x1[x1Pos + -48] - x1[x1Pos + 16]) * enwindow[wp + -9];\n\t\t\ts += x1[x1Pos + -96] * enwindow[wp + -1];\n\t\t\tt += (x1[x1Pos + -80] + x1[x1Pos + 48]) * enwindow[wp + -8];\n\t\t\ts += x1[x1Pos + -160] * enwindow[wp + 0];\n\t\t\tt += (x1[x1Pos + -112] - x1[x1Pos + 80]) * enwindow[wp + -7];\n\t\t\ts += x1[x1Pos + -224] * enwindow[wp + 1];\n\t\t\tt += (x1[x1Pos + -144] + x1[x1Pos + 112]) * enwindow[wp + -6];\n\t\t\ts -= x1[x1Pos + 32] * enwindow[wp + 2];\n\t\t\tt += (x1[x1Pos + -176] - x1[x1Pos + 144]) * enwindow[wp + -5];\n\t\t\ts -= x1[x1Pos + 96] * enwindow[wp + 3];\n\t\t\tt += (x1[x1Pos + -208] + x1[x1Pos + 176]) * enwindow[wp + -4];\n\t\t\ts -= x1[x1Pos + 160] * enwindow[wp + 4];\n\t\t\tt += (x1[x1Pos + -240] - x1[x1Pos + 208]) * enwindow[wp + -3];\n\t\t\ts -= x1[x1Pos + 224];\n\n\t\t\tu = s - t;\n\t\t\tv = s + t;\n\n\t\t\tt = a[14];\n\t\t\ts = a[15] - t;\n\n\t\t\ta[31] = v + t; /* A0 */\n\t\t\ta[30] = u + s; /* A1 */\n\t\t\ta[15] = u - s; /* A2 */\n\t\t\ta[14] = v - t; /* A3 */\n\t\t}\n\t\t{\n\t\t\tvar xr;\n\t\t\txr = a[28] - a[0];\n\t\t\ta[0] += a[28];\n\t\t\ta[28] = xr * enwindow[wp + -2 * 18 + 7];\n\t\t\txr = a[29] - a[1];\n\t\t\ta[1] += a[29];\n\t\t\ta[29] = xr * enwindow[wp + -2 * 18 + 7];\n\n\t\t\txr = a[26] - a[2];\n\t\t\ta[2] += a[26];\n\t\t\ta[26] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[27] - a[3];\n\t\t\ta[3] += a[27];\n\t\t\ta[27] = xr * enwindow[wp + -4 * 18 + 7];\n\n\t\t\txr = a[24] - a[4];\n\t\t\ta[4] += a[24];\n\t\t\ta[24] = xr * enwindow[wp + -6 * 18 + 7];\n\t\t\txr = a[25] - a[5];\n\t\t\ta[5] += a[25];\n\t\t\ta[25] = xr * enwindow[wp + -6 * 18 + 7];\n\n\t\t\txr = a[22] - a[6];\n\t\t\ta[6] += a[22];\n\t\t\ta[22] = xr * Util.SQRT2;\n\t\t\txr = a[23] - a[7];\n\t\t\ta[7] += a[23];\n\t\t\ta[23] = xr * Util.SQRT2 - a[7];\n\t\t\ta[7] -= a[6];\n\t\t\ta[22] -= a[7];\n\t\t\ta[23] -= a[22];\n\n\t\t\txr = a[6];\n\t\t\ta[6] = a[31] - xr;\n\t\t\ta[31] = a[31] + xr;\n\t\t\txr = a[7];\n\t\t\ta[7] = a[30] - xr;\n\t\t\ta[30] = a[30] + xr;\n\t\t\txr = a[22];\n\t\t\ta[22] = a[15] - xr;\n\t\t\ta[15] = a[15] + xr;\n\t\t\txr = a[23];\n\t\t\ta[23] = a[14] - xr;\n\t\t\ta[14] = a[14] + xr;\n\n\t\t\txr = a[20] - a[8];\n\t\t\ta[8] += a[20];\n\t\t\ta[20] = xr * enwindow[wp + -10 * 18 + 7];\n\t\t\txr = a[21] - a[9];\n\t\t\ta[9] += a[21];\n\t\t\ta[21] = xr * enwindow[wp + -10 * 18 + 7];\n\n\t\t\txr = a[18] - a[10];\n\t\t\ta[10] += a[18];\n\t\t\ta[18] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = a[19] - a[11];\n\t\t\ta[11] += a[19];\n\t\t\ta[19] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[16] - a[12];\n\t\t\ta[12] += a[16];\n\t\t\ta[16] = xr * enwindow[wp + -14 * 18 + 7];\n\t\t\txr = a[17] - a[13];\n\t\t\ta[13] += a[17];\n\t\t\ta[17] = xr * enwindow[wp + -14 * 18 + 7];\n\n\t\t\txr = -a[20] + a[24];\n\t\t\ta[20] += a[24];\n\t\t\ta[24] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = -a[21] + a[25];\n\t\t\ta[21] += a[25];\n\t\t\ta[25] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[4] - a[8];\n\t\t\ta[4] += a[8];\n\t\t\ta[8] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = a[5] - a[9];\n\t\t\ta[5] += a[9];\n\t\t\ta[9] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[0] - a[12];\n\t\t\ta[0] += a[12];\n\t\t\ta[12] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[1] - a[13];\n\t\t\ta[1] += a[13];\n\t\t\ta[13] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[16] - a[28];\n\t\t\ta[16] += a[28];\n\t\t\ta[28] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = -a[17] + a[29];\n\t\t\ta[17] += a[29];\n\t\t\ta[29] = xr * enwindow[wp + -4 * 18 + 7];\n\n\t\t\txr = Util.SQRT2 * (a[2] - a[10]);\n\t\t\ta[2] += a[10];\n\t\t\ta[10] = xr;\n\t\t\txr = Util.SQRT2 * (a[3] - a[11]);\n\t\t\ta[3] += a[11];\n\t\t\ta[11] = xr;\n\t\t\txr = Util.SQRT2 * (-a[18] + a[26]);\n\t\t\ta[18] += a[26];\n\t\t\ta[26] = xr - a[18];\n\t\t\txr = Util.SQRT2 * (-a[19] + a[27]);\n\t\t\ta[19] += a[27];\n\t\t\ta[27] = xr - a[19];\n\n\t\t\txr = a[2];\n\t\t\ta[19] -= a[3];\n\t\t\ta[3] -= xr;\n\t\t\ta[2] = a[31] - xr;\n\t\t\ta[31] += xr;\n\t\t\txr = a[3];\n\t\t\ta[11] -= a[19];\n\t\t\ta[18] -= xr;\n\t\t\ta[3] = a[30] - xr;\n\t\t\ta[30] += xr;\n\t\t\txr = a[18];\n\t\t\ta[27] -= a[11];\n\t\t\ta[19] -= xr;\n\t\t\ta[18] = a[15] - xr;\n\t\t\ta[15] += xr;\n\n\t\t\txr = a[19];\n\t\t\ta[10] -= xr;\n\t\t\ta[19] = a[14] - xr;\n\t\t\ta[14] += xr;\n\t\t\txr = a[10];\n\t\t\ta[11] -= xr;\n\t\t\ta[10] = a[23] - xr;\n\t\t\ta[23] += xr;\n\t\t\txr = a[11];\n\t\t\ta[26] -= xr;\n\t\t\ta[11] = a[22] - xr;\n\t\t\ta[22] += xr;\n\t\t\txr = a[26];\n\t\t\ta[27] -= xr;\n\t\t\ta[26] = a[7] - xr;\n\t\t\ta[7] += xr;\n\n\t\t\txr = a[27];\n\t\t\ta[27] = a[6] - xr;\n\t\t\ta[6] += xr;\n\n\t\t\txr = Util.SQRT2 * (a[0] - a[4]);\n\t\t\ta[0] += a[4];\n\t\t\ta[4] = xr;\n\t\t\txr = Util.SQRT2 * (a[1] - a[5]);\n\t\t\ta[1] += a[5];\n\t\t\ta[5] = xr;\n\t\t\txr = Util.SQRT2 * (a[16] - a[20]);\n\t\t\ta[16] += a[20];\n\t\t\ta[20] = xr;\n\t\t\txr = Util.SQRT2 * (a[17] - a[21]);\n\t\t\ta[17] += a[21];\n\t\t\ta[21] = xr;\n\n\t\t\txr = -Util.SQRT2 * (a[8] - a[12]);\n\t\t\ta[8] += a[12];\n\t\t\ta[12] = xr - a[8];\n\t\t\txr = -Util.SQRT2 * (a[9] - a[13]);\n\t\t\ta[9] += a[13];\n\t\t\ta[13] = xr - a[9];\n\t\t\txr = -Util.SQRT2 * (a[25] - a[29]);\n\t\t\ta[25] += a[29];\n\t\t\ta[29] = xr - a[25];\n\t\t\txr = -Util.SQRT2 * (a[24] + a[28]);\n\t\t\ta[24] -= a[28];\n\t\t\ta[28] = xr - a[24];\n\n\t\t\txr = a[24] - a[16];\n\t\t\ta[24] = xr;\n\t\t\txr = a[20] - xr;\n\t\t\ta[20] = xr;\n\t\t\txr = a[28] - xr;\n\t\t\ta[28] = xr;\n\n\t\t\txr = a[25] - a[17];\n\t\t\ta[25] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[17] - a[1];\n\t\t\ta[17] = xr;\n\t\t\txr = a[9] - xr;\n\t\t\ta[9] = xr;\n\t\t\txr = a[25] - xr;\n\t\t\ta[25] = xr;\n\t\t\txr = a[5] - xr;\n\t\t\ta[5] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[13] - xr;\n\t\t\ta[13] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[1] - a[0];\n\t\t\ta[1] = xr;\n\t\t\txr = a[16] - xr;\n\t\t\ta[16] = xr;\n\t\t\txr = a[17] - xr;\n\t\t\ta[17] = xr;\n\t\t\txr = a[8] - xr;\n\t\t\ta[8] = xr;\n\t\t\txr = a[9] - xr;\n\t\t\ta[9] = xr;\n\t\t\txr = a[24] - xr;\n\t\t\ta[24] = xr;\n\t\t\txr = a[25] - xr;\n\t\t\ta[25] = xr;\n\t\t\txr = a[4] - xr;\n\t\t\ta[4] = xr;\n\t\t\txr = a[5] - xr;\n\t\t\ta[5] = xr;\n\t\t\txr = a[20] - xr;\n\t\t\ta[20] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[12] - xr;\n\t\t\ta[12] = xr;\n\t\t\txr = a[13] - xr;\n\t\t\ta[13] = xr;\n\t\t\txr = a[28] - xr;\n\t\t\ta[28] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[0];\n\t\t\ta[0] += a[31];\n\t\t\ta[31] -= xr;\n\t\t\txr = a[1];\n\t\t\ta[1] += a[30];\n\t\t\ta[30] -= xr;\n\t\t\txr = a[16];\n\t\t\ta[16] += a[15];\n\t\t\ta[15] -= xr;\n\t\t\txr = a[17];\n\t\t\ta[17] += a[14];\n\t\t\ta[14] -= xr;\n\t\t\txr = a[8];\n\t\t\ta[8] += a[23];\n\t\t\ta[23] -= xr;\n\t\t\txr = a[9];\n\t\t\ta[9] += a[22];\n\t\t\ta[22] -= xr;\n\t\t\txr = a[24];\n\t\t\ta[24] += a[7];\n\t\t\ta[7] -= xr;\n\t\t\txr = a[25];\n\t\t\ta[25] += a[6];\n\t\t\ta[6] -= xr;\n\t\t\txr = a[4];\n\t\t\ta[4] += a[27];\n\t\t\ta[27] -= xr;\n\t\t\txr = a[5];\n\t\t\ta[5] += a[26];\n\t\t\ta[26] -= xr;\n\t\t\txr = a[20];\n\t\t\ta[20] += a[11];\n\t\t\ta[11] -= xr;\n\t\t\txr = a[21];\n\t\t\ta[21] += a[10];\n\t\t\ta[10] -= xr;\n\t\t\txr = a[12];\n\t\t\ta[12] += a[19];\n\t\t\ta[19] -= xr;\n\t\t\txr = a[13];\n\t\t\ta[13] += a[18];\n\t\t\ta[18] -= xr;\n\t\t\txr = a[28];\n\t\t\ta[28] += a[3];\n\t\t\ta[3] -= xr;\n\t\t\txr = a[29];\n\t\t\ta[29] += a[2];\n\t\t\ta[2] -= xr;\n\t\t}\n\t}\n\n\t/**\n\t * Function: Calculation of the MDCT In the case of long blocks (type 0,1,3)\n\t * there are 36 coefficents in the time domain and 18 in the frequency\n\t * domain.
\n\t * In the case of short blocks (type 2) there are 3 transformations with\n\t * short length. This leads to 12 coefficents in the time and 6 in the\n\t * frequency domain. In this case the results are stored side by side in the\n\t * vector out[].\n\t *\n\t * New layer3\n\t */\n\tfunction mdct_short(inout, inoutPos) {\n\t\tfor (var l = 0; l < 3; l++) {\n\t\t\tvar tc0, tc1, tc2, ts0, ts1, ts2;\n\n\t\t\tts0 = inout[inoutPos + 2 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t- inout[inoutPos + 5 * 3];\n\t\t\ttc0 = inout[inoutPos + 0 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t- inout[inoutPos + 3 * 3];\n\t\t\ttc1 = ts0 + tc0;\n\t\t\ttc2 = ts0 - tc0;\n\n\t\t\tts0 = inout[inoutPos + 5 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t+ inout[inoutPos + 2 * 3];\n\t\t\ttc0 = inout[inoutPos + 3 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t+ inout[inoutPos + 0 * 3];\n\t\t\tts1 = ts0 + tc0;\n\t\t\tts2 = -ts0 + tc0;\n\n\t\t\ttc0 = (inout[inoutPos + 1 * 3] * win[Encoder.SHORT_TYPE][1] - inout[inoutPos + 4 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tts0 = (inout[inoutPos + 4 * 3] * win[Encoder.SHORT_TYPE][1] + inout[inoutPos + 1 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 0] = tc1 * 1.907525191737280e-11 + tc0;\n\t\t\t/*\n\t\t\t * tritab_s[ 2 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 5] = -ts1 * 1.907525191737280e-11 + ts0;\n\t\t\t/*\n\t\t\t * tritab_s[0 ]\n\t\t\t */\n\t\t\ttc2 = tc2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 2]\n\t\t\t */\n\t\t\tts1 = ts1 * 0.5 * 1.907525191737281e-11 + ts0;\n\t\t\tinout[inoutPos + 3 * 1] = tc2 - ts1;\n\t\t\tinout[inoutPos + 3 * 2] = tc2 + ts1;\n\n\t\t\ttc1 = tc1 * 0.5 * 1.907525191737281e-11 - tc0;\n\t\t\tts2 = ts2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 0]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 3] = tc1 + ts2;\n\t\t\tinout[inoutPos + 3 * 4] = tc1 - ts2;\n\n\t\t\tinoutPos++;\n\t\t}\n\t}\n\n\tfunction mdct_long(out, outPos, _in) {\n\t\tvar ct, st;\n\t\t{\n\t\t\tvar tc1, tc2, tc3, tc4, ts5, ts6, ts7, ts8;\n\t\t\t/* 1,2, 5,6, 9,10, 13,14, 17 */\n\t\t\ttc1 = _in[17] - _in[9];\n\t\t\ttc3 = _in[15] - _in[11];\n\t\t\ttc4 = _in[14] - _in[12];\n\t\t\tts5 = _in[0] + _in[8];\n\t\t\tts6 = _in[1] + _in[7];\n\t\t\tts7 = _in[2] + _in[6];\n\t\t\tts8 = _in[3] + _in[5];\n\n\t\t\tout[outPos + 17] = (ts5 + ts7 - ts8) - (ts6 - _in[4]);\n\t\t\tst = (ts5 + ts7 - ts8) * cx[12 + 7] + (ts6 - _in[4]);\n\t\t\tct = (tc1 - tc3 - tc4) * cx[12 + 6];\n\t\t\tout[outPos + 5] = ct + st;\n\t\t\tout[outPos + 6] = ct - st;\n\n\t\t\ttc2 = (_in[16] - _in[10]) * cx[12 + 6];\n\t\t\tts6 = ts6 * cx[12 + 7] + _in[4];\n\t\t\tct = tc1 * cx[12 + 0] + tc2 + tc3 * cx[12 + 1] + tc4 * cx[12 + 2];\n\t\t\tst = -ts5 * cx[12 + 4] + ts6 - ts7 * cx[12 + 5] + ts8 * cx[12 + 3];\n\t\t\tout[outPos + 1] = ct + st;\n\t\t\tout[outPos + 2] = ct - st;\n\n\t\t\tct = tc1 * cx[12 + 1] - tc2 - tc3 * cx[12 + 2] + tc4 * cx[12 + 0];\n\t\t\tst = -ts5 * cx[12 + 5] + ts6 - ts7 * cx[12 + 3] + ts8 * cx[12 + 4];\n\t\t\tout[outPos + 9] = ct + st;\n\t\t\tout[outPos + 10] = ct - st;\n\n\t\t\tct = tc1 * cx[12 + 2] - tc2 + tc3 * cx[12 + 0] - tc4 * cx[12 + 1];\n\t\t\tst = ts5 * cx[12 + 3] - ts6 + ts7 * cx[12 + 4] - ts8 * cx[12 + 5];\n\t\t\tout[outPos + 13] = ct + st;\n\t\t\tout[outPos + 14] = ct - st;\n\t\t}\n\t\t{\n\t\t\tvar ts1, ts2, ts3, ts4, tc5, tc6, tc7, tc8;\n\n\t\t\tts1 = _in[8] - _in[0];\n\t\t\tts3 = _in[6] - _in[2];\n\t\t\tts4 = _in[5] - _in[3];\n\t\t\ttc5 = _in[17] + _in[9];\n\t\t\ttc6 = _in[16] + _in[10];\n\t\t\ttc7 = _in[15] + _in[11];\n\t\t\ttc8 = _in[14] + _in[12];\n\n\t\t\tout[outPos + 0] = (tc5 + tc7 + tc8) + (tc6 + _in[13]);\n\t\t\tct = (tc5 + tc7 + tc8) * cx[12 + 7] - (tc6 + _in[13]);\n\t\t\tst = (ts1 - ts3 + ts4) * cx[12 + 6];\n\t\t\tout[outPos + 11] = ct + st;\n\t\t\tout[outPos + 12] = ct - st;\n\n\t\t\tts2 = (_in[7] - _in[1]) * cx[12 + 6];\n\t\t\ttc6 = _in[13] - tc6 * cx[12 + 7];\n\t\t\tct = tc5 * cx[12 + 3] - tc6 + tc7 * cx[12 + 4] + tc8 * cx[12 + 5];\n\t\t\tst = ts1 * cx[12 + 2] + ts2 + ts3 * cx[12 + 0] + ts4 * cx[12 + 1];\n\t\t\tout[outPos + 3] = ct + st;\n\t\t\tout[outPos + 4] = ct - st;\n\n\t\t\tct = -tc5 * cx[12 + 5] + tc6 - tc7 * cx[12 + 3] - tc8 * cx[12 + 4];\n\t\t\tst = ts1 * cx[12 + 1] + ts2 - ts3 * cx[12 + 2] - ts4 * cx[12 + 0];\n\t\t\tout[outPos + 7] = ct + st;\n\t\t\tout[outPos + 8] = ct - st;\n\n\t\t\tct = -tc5 * cx[12 + 4] + tc6 - tc7 * cx[12 + 5] - tc8 * cx[12 + 3];\n\t\t\tst = ts1 * cx[12 + 0] - ts2 + ts3 * cx[12 + 1] - ts4 * cx[12 + 2];\n\t\t\tout[outPos + 15] = ct + st;\n\t\t\tout[outPos + 16] = ct - st;\n\t\t}\n\t}\n\n\tthis.mdct_sub48 = function(gfc, w0, w1) {\n\t\tvar wk = w0;\n\t\tvar wkPos = 286;\n\t\t/* thinking cache performance, ch->gr loop is better than gr->ch loop */\n\t\tfor (var ch = 0; ch < gfc.channels_out; ch++) {\n\t\t\tfor (var gr = 0; gr < gfc.mode_gr; gr++) {\n\t\t\t\tvar band;\n\t\t\t\tvar gi = (gfc.l3_side.tt[gr][ch]);\n\t\t\t\tvar mdct_enc = gi.xr;\n\t\t\t\tvar mdct_encPos = 0;\n\t\t\t\tvar samp = gfc.sb_sample[ch][1 - gr];\n\t\t\t\tvar sampPos = 0;\n\n\t\t\t\tfor (var k = 0; k < 18 / 2; k++) {\n\t\t\t\t\twindow_subband(wk, wkPos, samp[sampPos]);\n\t\t\t\t\twindow_subband(wk, wkPos + 32, samp[sampPos + 1]);\n\t\t\t\t\tsampPos += 2;\n\t\t\t\t\twkPos += 64;\n\t\t\t\t\t/*\n\t\t\t\t\t * Compensate for inversion in the analysis filter\n\t\t\t\t\t */\n\t\t\t\t\tfor (band = 1; band < 32; band += 2) {\n\t\t\t\t\t\tsamp[sampPos - 1][band] *= -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * Perform imdct of 18 previous subband samples + 18 current\n\t\t\t\t * subband samples\n\t\t\t\t */\n\t\t\t\tfor (band = 0; band < 32; band++, mdct_encPos += 18) {\n\t\t\t\t\tvar type = gi.block_type;\n\t\t\t\t\tvar band0 = gfc.sb_sample[ch][gr];\n\t\t\t\t\tvar band1 = gfc.sb_sample[ch][1 - gr];\n\t\t\t\t\tif (gi.mixed_block_flag != 0 && band < 2)\n\t\t\t\t\t\ttype = 0;\n\t\t\t\t\tif (gfc.amp_filter[band] < 1e-12) {\n\t\t\t\t\t\tArrays.fill(mdct_enc, mdct_encPos + 0,\n\t\t\t\t\t\t\t\tmdct_encPos + 18, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (gfc.amp_filter[band] < 1.0) {\n\t\t\t\t\t\t\tfor (var k = 0; k < 18; k++)\n\t\t\t\t\t\t\t\tband1[k][order[band]] *= gfc.amp_filter[band];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (type == Encoder.SHORT_TYPE) {\n\t\t\t\t\t\t\tfor (var k = -NS / 4; k < 0; k++) {\n\t\t\t\t\t\t\t\tvar w = win[Encoder.SHORT_TYPE][k + 3];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 9] = band0[9 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band0[8 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 18] = band0[14 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band0[15 + k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 10] = band0[15 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band0[14 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 19] = band1[2 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band1[3 + k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 11] = band1[3 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band1[2 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 20] = band1[8 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band1[9 + k][order[band]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmdct_short(mdct_enc, mdct_encPos);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar work = new_float(18);\n\t\t\t\t\t\t\tfor (var k = -NL / 4; k < 0; k++) {\n\t\t\t\t\t\t\t\tvar a, b;\n\t\t\t\t\t\t\t\ta = win[type][k + 27]\n\t\t\t\t\t\t\t\t\t\t* band1[k + 9][order[band]]\n\t\t\t\t\t\t\t\t\t\t+ win[type][k + 36]\n\t\t\t\t\t\t\t\t\t\t* band1[8 - k][order[band]];\n\t\t\t\t\t\t\t\tb = win[type][k + 9]\n\t\t\t\t\t\t\t\t\t\t* band0[k + 9][order[band]]\n\t\t\t\t\t\t\t\t\t\t- win[type][k + 18]\n\t\t\t\t\t\t\t\t\t\t* band0[8 - k][order[band]];\n\t\t\t\t\t\t\t\twork[k + 9] = a - b * tantab_l[3 + k + 9];\n\t\t\t\t\t\t\t\twork[k + 18] = a * tantab_l[3 + k + 9] + b;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmdct_long(mdct_enc, mdct_encPos, work);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * Perform aliasing reduction butterfly\n\t\t\t\t\t */\n\t\t\t\t\tif (type != Encoder.SHORT_TYPE && band != 0) {\n\t\t\t\t\t\tfor (var k = 7; k >= 0; --k) {\n\t\t\t\t\t\t\tvar bu, bd;\n\t\t\t\t\t\t\tbu = mdct_enc[mdct_encPos + k] * ca[20 + k]\n\t\t\t\t\t\t\t\t\t+ mdct_enc[mdct_encPos + -1 - k]\n\t\t\t\t\t\t\t\t\t* cs[28 + k];\n\t\t\t\t\t\t\tbd = mdct_enc[mdct_encPos + k] * cs[28 + k]\n\t\t\t\t\t\t\t\t\t- mdct_enc[mdct_encPos + -1 - k]\n\t\t\t\t\t\t\t\t\t* ca[20 + k];\n\n\t\t\t\t\t\t\tmdct_enc[mdct_encPos + -1 - k] = bu;\n\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k] = bd;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\twk = w1;\n\t\t\twkPos = 286;\n\t\t\tif (gfc.mode_gr == 1) {\n\t\t\t\tfor (var i = 0; i < 18; i++) {\n\t\t\t\t\tSystem.arraycopy(gfc.sb_sample[ch][1][i], 0,\n\t\t\t\t\t\t\tgfc.sb_sample[ch][0][i], 0, 32);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = NewMDCT;\n","var Encoder = require('./Encoder.js');\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nfunction III_psy_xmin() {\n this.l = new_float(Encoder.SBMAX_l);\n this.s = new_float_n([Encoder.SBMAX_s, 3]);\n\n var self = this;\n this.assign = function (iii_psy_xmin) {\n System.arraycopy(iii_psy_xmin.l, 0, self.l, 0, Encoder.SBMAX_l);\n for (var i = 0; i < Encoder.SBMAX_s; i++) {\n for (var j = 0; j < 3; j++) {\n self.s[i][j] = iii_psy_xmin.s[i][j];\n }\n }\n }\n}\n\nmodule.exports = III_psy_xmin;\n","//package mp3;\n\nvar III_psy_xmin = require('./III_psy_xmin.js');\n\nfunction III_psy_ratio() {\n\tthis.thm = new III_psy_xmin();\n\tthis.en = new III_psy_xmin();\n}\n\nmodule.exports = III_psy_ratio;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * ENCDELAY The encoder delay.\n *\n * Minimum allowed is MDCTDELAY (see below)\n *\n * The first 96 samples will be attenuated, so using a value less than 96\n * will result in corrupt data for the first 96-ENCDELAY samples.\n *\n * suggested: 576 set to 1160 to sync with FhG.\n */\nEncoder.ENCDELAY = 576;\n/**\n * make sure there is at least one complete frame after the last frame\n * containing real data\n *\n * Using a value of 288 would be sufficient for a a very sophisticated\n * decoder that can decode granule-by-granule instead of frame by frame. But\n * lets not assume this, and assume the decoder will not decode frame N\n * unless it also has data for frame N+1\n */\nEncoder.POSTDELAY = 1152;\n\n/**\n * delay of the MDCT used in mdct.c original ISO routines had a delay of\n * 528! Takehiro's routines:\n */\nEncoder.MDCTDELAY = 48;\nEncoder.FFTOFFSET = (224 + Encoder.MDCTDELAY);\n\n/**\n * Most decoders, including the one we use, have a delay of 528 samples.\n */\nEncoder.DECDELAY = 528;\n\n/**\n * number of subbands\n */\nEncoder.SBLIMIT = 32;\n\n/**\n * parition bands bands\n */\nEncoder.CBANDS = 64;\n\n/**\n * number of critical bands/scale factor bands where masking is computed\n */\nEncoder.SBPSY_l = 21;\nEncoder.SBPSY_s = 12;\n\n/**\n * total number of scalefactor bands encoded\n */\nEncoder.SBMAX_l = 22;\nEncoder.SBMAX_s = 13;\nEncoder.PSFB21 = 6;\nEncoder.PSFB12 = 6;\n\n/**\n * FFT sizes\n */\nEncoder.BLKSIZE = 1024;\nEncoder.HBLKSIZE = (Encoder.BLKSIZE / 2 + 1);\nEncoder.BLKSIZE_s = 256;\nEncoder.HBLKSIZE_s = (Encoder.BLKSIZE_s / 2 + 1);\n\nEncoder.NORM_TYPE = 0;\nEncoder.START_TYPE = 1;\nEncoder.SHORT_TYPE = 2;\nEncoder.STOP_TYPE = 3;\n\n/**\n *
\n * Mode Extention:\n * When we are in stereo mode, there are 4 possible methods to store these\n * two channels. The stereo modes -m? are using a subset of them.\n *\n *  -ms: MPG_MD_LR_LR\n *  -mj: MPG_MD_LR_LR and MPG_MD_MS_LR\n *  -mf: MPG_MD_MS_LR\n *  -mi: all\n * 
\n */\nEncoder.MPG_MD_LR_LR = 0;\nEncoder.MPG_MD_LR_I = 1;\nEncoder.MPG_MD_MS_LR = 2;\nEncoder.MPG_MD_MS_I = 3;\n\nEncoder.fircoef = [-0.0207887 * 5, -0.0378413 * 5,\n -0.0432472 * 5, -0.031183 * 5, 7.79609e-18 * 5, 0.0467745 * 5,\n 0.10091 * 5, 0.151365 * 5, 0.187098 * 5];\n\nfunction Encoder() {\n var NewMDCT = require('./NewMDCT.js');\n var III_psy_ratio = require('./III_psy_ratio.js');\n\n var FFTOFFSET = Encoder.FFTOFFSET;\n var MPG_MD_MS_LR = Encoder.MPG_MD_MS_LR;\n //BitStream bs;\n //PsyModel psy;\n //VBRTag vbr;\n //QuantizePVT qupvt;\n var bs = null;\n this.psy = null;\n var psy = null;\n var vbr = null;\n var qupvt = null;\n\n //public final void setModules(BitStream bs, PsyModel psy, QuantizePVT qupvt,\n // VBRTag vbr) {\n this.setModules = function (_bs, _psy, _qupvt, _vbr) {\n bs = _bs;\n this.psy = _psy;\n psy = _psy;\n vbr = _vbr;\n qupvt = _qupvt;\n };\n\n var newMDCT = new NewMDCT();\n\n /***********************************************************************\n *\n * encoder and decoder delays\n *\n ***********************************************************************/\n\n /**\n *
\n     * layer III enc->dec delay:  1056 (1057?)   (observed)\n     * layer  II enc->dec delay:   480  (481?)   (observed)\n     *\n     * polyphase 256-16             (dec or enc)        = 240\n     * mdct      256+32  (9*32)     (dec or enc)        = 288\n     * total:    512+16\n     *\n     * My guess is that delay of polyphase filterbank is actualy 240.5\n     * (there are technical reasons for this, see postings in mp3encoder).\n     * So total Encode+Decode delay = ENCDELAY + 528 + 1\n     * 
\n */\n\n\n /**\n * auto-adjust of ATH, useful for low volume Gabriel Bouvigne 3 feb 2001\n *\n * modifies some values in gfp.internal_flags.ATH (gfc.ATH)\n */\n//private void adjust_ATH(final LameInternalFlags gfc) {\n function adjust_ATH(gfc) {\n var gr2_max, max_pow;\n\n if (gfc.ATH.useAdjust == 0) {\n gfc.ATH.adjust = 1.0;\n /* no adjustment */\n return;\n }\n\n /* jd - 2001 mar 12, 27, jun 30 */\n /* loudness based on equal loudness curve; */\n /* use granule with maximum combined loudness */\n max_pow = gfc.loudness_sq[0][0];\n gr2_max = gfc.loudness_sq[1][0];\n if (gfc.channels_out == 2) {\n max_pow += gfc.loudness_sq[0][1];\n gr2_max += gfc.loudness_sq[1][1];\n } else {\n max_pow += max_pow;\n gr2_max += gr2_max;\n }\n if (gfc.mode_gr == 2) {\n max_pow = Math.max(max_pow, gr2_max);\n }\n max_pow *= 0.5;\n /* max_pow approaches 1.0 for full band noise */\n\n /* jd - 2001 mar 31, jun 30 */\n /* user tuning of ATH adjustment region */\n max_pow *= gfc.ATH.aaSensitivityP;\n\n /*\n * adjust ATH depending on range of maximum value\n */\n\n /* jd - 2001 feb27, mar12,20, jun30, jul22 */\n /* continuous curves based on approximation */\n /* to GB's original values. */\n /* For an increase in approximate loudness, */\n /* set ATH adjust to adjust_limit immediately */\n /* after a delay of one frame. */\n /* For a loudness decrease, reduce ATH adjust */\n /* towards adjust_limit gradually. */\n /* max_pow is a loudness squared or a power. */\n if (max_pow > 0.03125) { /* ((1 - 0.000625)/ 31.98) from curve below */\n if (gfc.ATH.adjust >= 1.0) {\n gfc.ATH.adjust = 1.0;\n } else {\n /* preceding frame has lower ATH adjust; */\n /* ascend only to the preceding adjust_limit */\n /* in case there is leading low volume */\n if (gfc.ATH.adjust < gfc.ATH.adjustLimit) {\n gfc.ATH.adjust = gfc.ATH.adjustLimit;\n }\n }\n gfc.ATH.adjustLimit = 1.0;\n } else { /* adjustment curve */\n /* about 32 dB maximum adjust (0.000625) */\n var adj_lim_new = 31.98 * max_pow + 0.000625;\n if (gfc.ATH.adjust >= adj_lim_new) { /* descend gradually */\n gfc.ATH.adjust *= adj_lim_new * 0.075 + 0.925;\n if (gfc.ATH.adjust < adj_lim_new) { /* stop descent */\n gfc.ATH.adjust = adj_lim_new;\n }\n } else { /* ascend */\n if (gfc.ATH.adjustLimit >= adj_lim_new) {\n gfc.ATH.adjust = adj_lim_new;\n } else {\n /* preceding frame has lower ATH adjust; */\n /* ascend only to the preceding adjust_limit */\n if (gfc.ATH.adjust < gfc.ATH.adjustLimit) {\n gfc.ATH.adjust = gfc.ATH.adjustLimit;\n }\n }\n }\n gfc.ATH.adjustLimit = adj_lim_new;\n }\n }\n\n /**\n *
\n     *  some simple statistics\n     *\n     *  bitrate index 0: free bitrate . not allowed in VBR mode\n     *  : bitrates, kbps depending on MPEG version\n     *  bitrate index 15: forbidden\n     *\n     *  mode_ext:\n     *  0:  LR\n     *  1:  LR-i\n     *  2:  MS\n     *  3:  MS-i\n     * 
\n */\n function updateStats(gfc) {\n var gr, ch;\n assert(0 <= gfc.bitrate_index && gfc.bitrate_index < 16);\n assert(0 <= gfc.mode_ext && gfc.mode_ext < 4);\n\n /* count bitrate indices */\n gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][4]++;\n gfc.bitrate_stereoMode_Hist[15][4]++;\n\n /* count 'em for every mode extension in case of 2 channel encoding */\n if (gfc.channels_out == 2) {\n gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][gfc.mode_ext]++;\n gfc.bitrate_stereoMode_Hist[15][gfc.mode_ext]++;\n }\n for (gr = 0; gr < gfc.mode_gr; ++gr) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n var bt = gfc.l3_side.tt[gr][ch].block_type | 0;\n if (gfc.l3_side.tt[gr][ch].mixed_block_flag != 0)\n bt = 4;\n gfc.bitrate_blockType_Hist[gfc.bitrate_index][bt]++;\n gfc.bitrate_blockType_Hist[gfc.bitrate_index][5]++;\n gfc.bitrate_blockType_Hist[15][bt]++;\n gfc.bitrate_blockType_Hist[15][5]++;\n }\n }\n }\n\n function lame_encode_frame_init(gfp, inbuf) {\n var gfc = gfp.internal_flags;\n\n var ch, gr;\n\n if (gfc.lame_encode_frame_init == 0) {\n /* prime the MDCT/polyphase filterbank with a short block */\n var i, j;\n var primebuff0 = new_float(286 + 1152 + 576);\n var primebuff1 = new_float(286 + 1152 + 576);\n gfc.lame_encode_frame_init = 1;\n for (i = 0, j = 0; i < 286 + 576 * (1 + gfc.mode_gr); ++i) {\n if (i < 576 * gfc.mode_gr) {\n primebuff0[i] = 0;\n if (gfc.channels_out == 2)\n primebuff1[i] = 0;\n } else {\n primebuff0[i] = inbuf[0][j];\n if (gfc.channels_out == 2)\n primebuff1[i] = inbuf[1][j];\n ++j;\n }\n }\n /* polyphase filtering / mdct */\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.l3_side.tt[gr][ch].block_type = Encoder.SHORT_TYPE;\n }\n }\n newMDCT.mdct_sub48(gfc, primebuff0, primebuff1);\n\n /* check FFT will not use a negative starting offset */\n assert(576 >= Encoder.FFTOFFSET);\n /* check if we have enough data for FFT */\n assert(gfc.mf_size >= (Encoder.BLKSIZE + gfp.framesize - Encoder.FFTOFFSET));\n /* check if we have enough data for polyphase filterbank */\n assert(gfc.mf_size >= (512 + gfp.framesize - 32));\n }\n\n }\n\n /**\n *
\n     * encodeframe()           Layer 3\n     *\n     * encode a single frame\n     *\n     *\n     *    lame_encode_frame()\n     *\n     *\n     *                           gr 0            gr 1\n     *    inbuf:           |--------------|--------------|--------------|\n     *\n     *\n     *    Polyphase (18 windows, each shifted 32)\n     *    gr 0:\n     *    window1          <----512---.\n     *    window18                 <----512---.\n     *\n     *    gr 1:\n     *    window1                         <----512---.\n     *    window18                                <----512---.\n     *\n     *\n     *\n     *    MDCT output:  |--------------|--------------|--------------|\n     *\n     *    FFT's                    <---------1024---------.\n     *                                             <---------1024-------.\n     *\n     *\n     *\n     *        inbuf = buffer of PCM data size=MP3 framesize\n     *        encoder acts on inbuf[ch][0], but output is delayed by MDCTDELAY\n     *        so the MDCT coefficints are from inbuf[ch][-MDCTDELAY]\n     *\n     *        psy-model FFT has a 1 granule delay, so we feed it data for the\n     *        next granule.\n     *        FFT is centered over granule:  224+576+224\n     *        So FFT starts at:   576-224-MDCTDELAY\n     *\n     *        MPEG2:  FFT ends at:  BLKSIZE+576-224-MDCTDELAY      (1328)\n     *        MPEG1:  FFT ends at:  BLKSIZE+2*576-224-MDCTDELAY    (1904)\n     *\n     *        MPEG2:  polyphase first window:  [0..511]\n     *                          18th window:   [544..1055]          (1056)\n     *        MPEG1:            36th window:   [1120..1631]         (1632)\n     *                data needed:  512+framesize-32\n     *\n     *        A close look newmdct.c shows that the polyphase filterbank\n     *        only uses data from [0..510] for each window.  Perhaps because the window\n     *        used by the filterbank is zero for the last point, so Takehiro's\n     *        code doesn't bother to compute with it.\n     *\n     *        FFT starts at 576-224-MDCTDELAY (304)  = 576-FFTOFFSET\n     *\n     * 
\n */\n\n\n this.lame_encode_mp3_frame = function (gfp, inbuf_l, inbuf_r, mp3buf, mp3bufPos, mp3buf_size) {\n var mp3count;\n var masking_LR = new_array_n([2, 2]);\n /*\n * LR masking &\n * energy\n */\n masking_LR[0][0] = new III_psy_ratio();\n masking_LR[0][1] = new III_psy_ratio();\n masking_LR[1][0] = new III_psy_ratio();\n masking_LR[1][1] = new III_psy_ratio();\n var masking_MS = new_array_n([2, 2]);\n /* MS masking & energy */\n masking_MS[0][0] = new III_psy_ratio();\n masking_MS[0][1] = new III_psy_ratio();\n masking_MS[1][0] = new III_psy_ratio();\n masking_MS[1][1] = new III_psy_ratio();\n //III_psy_ratio masking[][];\n var masking;\n /* pointer to selected maskings */\n var inbuf = [null, null];\n var gfc = gfp.internal_flags;\n\n var tot_ener = new_float_n([2, 4]);\n var ms_ener_ratio = [.5, .5];\n var pe = [[0., 0.], [0., 0.]];\n var pe_MS = [[0., 0.], [0., 0.]];\n\n//float[][] pe_use;\n var pe_use;\n\n var ch, gr;\n\n inbuf[0] = inbuf_l;\n inbuf[1] = inbuf_r;\n\n if (gfc.lame_encode_frame_init == 0) {\n /* first run? */\n lame_encode_frame_init(gfp, inbuf);\n\n }\n\n /********************** padding *****************************/\n /**\n *
\n         * padding method as described in\n         * \"MPEG-Layer3 / Bitstream Syntax and Decoding\"\n         * by Martin Sieler, Ralph Sperschneider\n         *\n         * note: there is no padding for the very first frame\n         *\n         * Robert Hegemann 2000-06-22\n         * 
\n */\n gfc.padding = 0;\n if ((gfc.slot_lag -= gfc.frac_SpF) < 0) {\n gfc.slot_lag += gfp.out_samplerate;\n gfc.padding = 1;\n }\n\n /****************************************\n * Stage 1: psychoacoustic model *\n ****************************************/\n\n if (gfc.psymodel != 0) {\n /*\n * psychoacoustic model psy model has a 1 granule (576) delay that\n * we must compensate for (mt 6/99).\n */\n var ret;\n var bufp = [null, null];\n /* address of beginning of left & right granule */\n var bufpPos = 0;\n /* address of beginning of left & right granule */\n var blocktype = new_int(2);\n\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n\n for (ch = 0; ch < gfc.channels_out; ch++) {\n bufp[ch] = inbuf[ch];\n bufpPos = 576 + gr * 576 - Encoder.FFTOFFSET;\n }\n if (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) {\n ret = psy.L3psycho_anal_vbr(gfp, bufp, bufpPos, gr,\n masking_LR, masking_MS, pe[gr], pe_MS[gr],\n tot_ener[gr], blocktype);\n } else {\n ret = psy.L3psycho_anal_ns(gfp, bufp, bufpPos, gr,\n masking_LR, masking_MS, pe[gr], pe_MS[gr],\n tot_ener[gr], blocktype);\n }\n if (ret != 0)\n return -4;\n\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n ms_ener_ratio[gr] = tot_ener[gr][2] + tot_ener[gr][3];\n if (ms_ener_ratio[gr] > 0)\n ms_ener_ratio[gr] = tot_ener[gr][3] / ms_ener_ratio[gr];\n }\n\n /* block type flags */\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n cod_info.block_type = blocktype[ch];\n cod_info.mixed_block_flag = 0;\n }\n }\n } else {\n /* no psy model */\n for (gr = 0; gr < gfc.mode_gr; gr++)\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.l3_side.tt[gr][ch].block_type = Encoder.NORM_TYPE;\n gfc.l3_side.tt[gr][ch].mixed_block_flag = 0;\n pe_MS[gr][ch] = pe[gr][ch] = 700;\n }\n }\n\n /* auto-adjust of ATH, useful for low volume */\n adjust_ATH(gfc);\n\n /****************************************\n * Stage 2: MDCT *\n ****************************************/\n\n /* polyphase filtering / mdct */\n newMDCT.mdct_sub48(gfc, inbuf[0], inbuf[1]);\n\n /****************************************\n * Stage 3: MS/LR decision *\n ****************************************/\n\n /* Here will be selected MS or LR coding of the 2 stereo channels */\n gfc.mode_ext = Encoder.MPG_MD_LR_LR;\n\n if (gfp.force_ms) {\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n } else if (gfp.mode == MPEGMode.JOINT_STEREO) {\n /*\n * ms_ratio = is scaled, for historical reasons, to look like a\n * ratio of side_channel / total. 0 = signal is 100% mono .5 = L & R\n * uncorrelated\n */\n\n /**\n *
\n             * [0] and [1] are the results for the two granules in MPEG-1,\n             * in MPEG-2 it's only a faked averaging of the same value\n             * _prev is the value of the last granule of the previous frame\n             * _next is the value of the first granule of the next frame\n             * 
\n */\n\n var sum_pe_MS = 0.;\n var sum_pe_LR = 0.;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n sum_pe_MS += pe_MS[gr][ch];\n sum_pe_LR += pe[gr][ch];\n }\n }\n\n /* based on PE: M/S coding would not use much more bits than L/R */\n if (sum_pe_MS <= 1.00 * sum_pe_LR) {\n\n var gi0 = gfc.l3_side.tt[0];\n var gi1 = gfc.l3_side.tt[gfc.mode_gr - 1];\n\n if (gi0[0].block_type == gi0[1].block_type\n && gi1[0].block_type == gi1[1].block_type) {\n\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n }\n }\n }\n\n /* bit and noise allocation */\n if (gfc.mode_ext == MPG_MD_MS_LR) {\n masking = masking_MS;\n /* use MS masking */\n pe_use = pe_MS;\n } else {\n masking = masking_LR;\n /* use LR masking */\n pe_use = pe;\n }\n\n /* copy data for MP3 frame analyzer */\n if (gfp.analysis && gfc.pinfo != null) {\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.pinfo.ms_ratio[gr] = gfc.ms_ratio[gr];\n gfc.pinfo.ms_ener_ratio[gr] = ms_ener_ratio[gr];\n gfc.pinfo.blocktype[gr][ch] = gfc.l3_side.tt[gr][ch].block_type;\n gfc.pinfo.pe[gr][ch] = pe_use[gr][ch];\n System.arraycopy(gfc.l3_side.tt[gr][ch].xr, 0,\n gfc.pinfo.xr[gr][ch], 0, 576);\n /*\n * in psymodel, LR and MS data was stored in pinfo. switch\n * to MS data:\n */\n if (gfc.mode_ext == MPG_MD_MS_LR) {\n gfc.pinfo.ers[gr][ch] = gfc.pinfo.ers[gr][ch + 2];\n System.arraycopy(gfc.pinfo.energy[gr][ch + 2], 0,\n gfc.pinfo.energy[gr][ch], 0,\n gfc.pinfo.energy[gr][ch].length);\n }\n }\n }\n }\n\n /****************************************\n * Stage 4: quantization loop *\n ****************************************/\n\n if (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_abr) {\n\n var i;\n var f;\n\n for (i = 0; i < 18; i++)\n gfc.nsPsy.pefirbuf[i] = gfc.nsPsy.pefirbuf[i + 1];\n\n f = 0.0;\n for (gr = 0; gr < gfc.mode_gr; gr++)\n for (ch = 0; ch < gfc.channels_out; ch++)\n f += pe_use[gr][ch];\n gfc.nsPsy.pefirbuf[18] = f;\n\n f = gfc.nsPsy.pefirbuf[9];\n for (i = 0; i < 9; i++)\n f += (gfc.nsPsy.pefirbuf[i] + gfc.nsPsy.pefirbuf[18 - i])\n * Encoder.fircoef[i];\n\n f = (670 * 5 * gfc.mode_gr * gfc.channels_out) / f;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n pe_use[gr][ch] *= f;\n }\n }\n }\n gfc.iteration_loop.iteration_loop(gfp, pe_use, ms_ener_ratio, masking);\n\n /****************************************\n * Stage 5: bitstream formatting *\n ****************************************/\n\n /* write the frame to the bitstream */\n bs.format_bitstream(gfp);\n\n /* copy mp3 bit buffer into array */\n mp3count = bs.copy_buffer(gfc, mp3buf, mp3bufPos, mp3buf_size, 1);\n\n if (gfp.bWriteVbrTag)\n vbr.addVbrFrame(gfp);\n\n if (gfp.analysis && gfc.pinfo != null) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var j;\n for (j = 0; j < FFTOFFSET; j++)\n gfc.pinfo.pcmdata[ch][j] = gfc.pinfo.pcmdata[ch][j\n + gfp.framesize];\n for (j = FFTOFFSET; j < 1600; j++) {\n gfc.pinfo.pcmdata[ch][j] = inbuf[ch][j - FFTOFFSET];\n }\n }\n qupvt.set_frame_pinfo(gfp, masking);\n }\n\n updateStats(gfc);\n\n return mp3count;\n }\n}\n\n\nmodule.exports = Encoder;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\nfunction FFT() {\n\n var window = new_float(Encoder.BLKSIZE);\n var window_s = new_float(Encoder.BLKSIZE_s / 2);\n\n var costab = [\n 9.238795325112867e-01, 3.826834323650898e-01,\n 9.951847266721969e-01, 9.801714032956060e-02,\n 9.996988186962042e-01, 2.454122852291229e-02,\n 9.999811752826011e-01, 6.135884649154475e-03\n ];\n\n function fht(fz, fzPos, n) {\n var tri = 0;\n var k4;\n var fi;\n var gi;\n\n n <<= 1;\n /* to get BLKSIZE, because of 3DNow! ASM routine */\n var fn = fzPos + n;\n k4 = 4;\n do {\n var s1, c1;\n var i, k1, k2, k3, kx;\n kx = k4 >> 1;\n k1 = k4;\n k2 = k4 << 1;\n k3 = k2 + k1;\n k4 = k2 << 1;\n fi = fzPos;\n gi = fi + kx;\n do {\n var f0, f1, f2, f3;\n f1 = fz[fi + 0] - fz[fi + k1];\n f0 = fz[fi + 0] + fz[fi + k1];\n f3 = fz[fi + k2] - fz[fi + k3];\n f2 = fz[fi + k2] + fz[fi + k3];\n fz[fi + k2] = f0 - f2;\n fz[fi + 0] = f0 + f2;\n fz[fi + k3] = f1 - f3;\n fz[fi + k1] = f1 + f3;\n f1 = fz[gi + 0] - fz[gi + k1];\n f0 = fz[gi + 0] + fz[gi + k1];\n f3 = (Util.SQRT2 * fz[gi + k3]);\n f2 = (Util.SQRT2 * fz[gi + k2]);\n fz[gi + k2] = f0 - f2;\n fz[gi + 0] = f0 + f2;\n fz[gi + k3] = f1 - f3;\n fz[gi + k1] = f1 + f3;\n gi += k4;\n fi += k4;\n } while (fi < fn);\n c1 = costab[tri + 0];\n s1 = costab[tri + 1];\n for (i = 1; i < kx; i++) {\n var c2, s2;\n c2 = 1 - (2 * s1) * s1;\n s2 = (2 * s1) * c1;\n fi = fzPos + i;\n gi = fzPos + k1 - i;\n do {\n var a, b, g0, f0, f1, g1, f2, g2, f3, g3;\n b = s2 * fz[fi + k1] - c2 * fz[gi + k1];\n a = c2 * fz[fi + k1] + s2 * fz[gi + k1];\n f1 = fz[fi + 0] - a;\n f0 = fz[fi + 0] + a;\n g1 = fz[gi + 0] - b;\n g0 = fz[gi + 0] + b;\n b = s2 * fz[fi + k3] - c2 * fz[gi + k3];\n a = c2 * fz[fi + k3] + s2 * fz[gi + k3];\n f3 = fz[fi + k2] - a;\n f2 = fz[fi + k2] + a;\n g3 = fz[gi + k2] - b;\n g2 = fz[gi + k2] + b;\n b = s1 * f2 - c1 * g3;\n a = c1 * f2 + s1 * g3;\n fz[fi + k2] = f0 - a;\n fz[fi + 0] = f0 + a;\n fz[gi + k3] = g1 - b;\n fz[gi + k1] = g1 + b;\n b = c1 * g2 - s1 * f3;\n a = s1 * g2 + c1 * f3;\n fz[gi + k2] = g0 - a;\n fz[gi + 0] = g0 + a;\n fz[fi + k3] = f1 - b;\n fz[fi + k1] = f1 + b;\n gi += k4;\n fi += k4;\n } while (fi < fn);\n c2 = c1;\n c1 = c2 * costab[tri + 0] - s1 * costab[tri + 1];\n s1 = c2 * costab[tri + 1] + s1 * costab[tri + 0];\n }\n tri += 2;\n } while (k4 < n);\n }\n\n var rv_tbl = [0x00, 0x80, 0x40,\n 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10,\n 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70,\n 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28,\n 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58,\n 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04,\n 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64,\n 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34,\n 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c,\n 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c,\n 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c,\n 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22,\n 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52,\n 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a,\n 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a,\n 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a,\n 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46,\n 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16,\n 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76,\n 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e,\n 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e,\n 0xde, 0x3e, 0xbe, 0x7e, 0xfe];\n\n this.fft_short = function (gfc, x_real, chn, buffer, bufPos) {\n for (var b = 0; b < 3; b++) {\n var x = Encoder.BLKSIZE_s / 2;\n var k = 0xffff & ((576 / 3) * (b + 1));\n var j = Encoder.BLKSIZE_s / 8 - 1;\n do {\n var f0, f1, f2, f3, w;\n var i = rv_tbl[j << 2] & 0xff;\n\n f0 = window_s[i] * buffer[chn][bufPos + i + k];\n w = window_s[0x7f - i] * buffer[chn][bufPos + i + k + 0x80];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window_s[i + 0x40] * buffer[chn][bufPos + i + k + 0x40];\n w = window_s[0x3f - i] * buffer[chn][bufPos + i + k + 0xc0];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x -= 4;\n x_real[b][x + 0] = f0 + f2;\n x_real[b][x + 2] = f0 - f2;\n x_real[b][x + 1] = f1 + f3;\n x_real[b][x + 3] = f1 - f3;\n\n f0 = window_s[i + 0x01] * buffer[chn][bufPos + i + k + 0x01];\n w = window_s[0x7e - i] * buffer[chn][bufPos + i + k + 0x81];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window_s[i + 0x41] * buffer[chn][bufPos + i + k + 0x41];\n w = window_s[0x3e - i] * buffer[chn][bufPos + i + k + 0xc1];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 0] = f0 + f2;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 2] = f0 - f2;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 1] = f1 + f3;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 3] = f1 - f3;\n } while (--j >= 0);\n\n fht(x_real[b], x, Encoder.BLKSIZE_s / 2);\n /* BLKSIZE_s/2 because of 3DNow! ASM routine */\n /* BLKSIZE/2 because of 3DNow! ASM routine */\n }\n }\n\n this.fft_long = function (gfc, y, chn, buffer, bufPos) {\n var jj = Encoder.BLKSIZE / 8 - 1;\n var x = Encoder.BLKSIZE / 2;\n\n do {\n var f0, f1, f2, f3, w;\n var i = rv_tbl[jj] & 0xff;\n f0 = window[i] * buffer[chn][bufPos + i];\n w = window[i + 0x200] * buffer[chn][bufPos + i + 0x200];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window[i + 0x100] * buffer[chn][bufPos + i + 0x100];\n w = window[i + 0x300] * buffer[chn][bufPos + i + 0x300];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x -= 4;\n y[x + 0] = f0 + f2;\n y[x + 2] = f0 - f2;\n y[x + 1] = f1 + f3;\n y[x + 3] = f1 - f3;\n\n f0 = window[i + 0x001] * buffer[chn][bufPos + i + 0x001];\n w = window[i + 0x201] * buffer[chn][bufPos + i + 0x201];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window[i + 0x101] * buffer[chn][bufPos + i + 0x101];\n w = window[i + 0x301] * buffer[chn][bufPos + i + 0x301];\n f3 = f2 - w;\n f2 = f2 + w;\n\n y[x + Encoder.BLKSIZE / 2 + 0] = f0 + f2;\n y[x + Encoder.BLKSIZE / 2 + 2] = f0 - f2;\n y[x + Encoder.BLKSIZE / 2 + 1] = f1 + f3;\n y[x + Encoder.BLKSIZE / 2 + 3] = f1 - f3;\n } while (--jj >= 0);\n\n fht(y, x, Encoder.BLKSIZE / 2);\n /* BLKSIZE/2 because of 3DNow! ASM routine */\n }\n\n this.init_fft = function (gfc) {\n /* The type of window used here will make no real difference, but */\n /*\n * in the interest of merging nspsytune stuff - switch to blackman\n * window\n */\n for (var i = 0; i < Encoder.BLKSIZE; i++)\n /* blackman window */\n window[i] = (0.42 - 0.5 * Math.cos(2 * Math.PI * (i + .5)\n / Encoder.BLKSIZE) + 0.08 * Math.cos(4 * Math.PI * (i + .5)\n / Encoder.BLKSIZE));\n\n for (var i = 0; i < Encoder.BLKSIZE_s / 2; i++)\n window_s[i] = (0.5 * (1.0 - Math.cos(2.0 * Math.PI\n * (i + 0.5) / Encoder.BLKSIZE_s)));\n\n }\n\n}\n\nmodule.exports = FFT;\n","/*\n * psymodel.c\n *\n * Copyright (c) 1999-2000 Mark Taylor\n * Copyright (c) 2001-2002 Naoki Shibata\n * Copyright (c) 2000-2003 Takehiro Tominaga\n * Copyright (c) 2000-2008 Robert Hegemann\n * Copyright (c) 2000-2005 Gabriel Bouvigne\n * Copyright (c) 2000-2005 Alexander Leidinger\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: PsyModel.java,v 1.27 2011/05/24 20:48:06 kenchis Exp $ */\n\n\n/*\n PSYCHO ACOUSTICS\n\n\n This routine computes the psycho acoustics, delayed by one granule.\n\n Input: buffer of PCM data (1024 samples).\n\n This window should be centered over the 576 sample granule window.\n The routine will compute the psycho acoustics for\n this granule, but return the psycho acoustics computed\n for the *previous* granule. This is because the block\n type of the previous granule can only be determined\n after we have computed the psycho acoustics for the following\n granule.\n\n Output: maskings and energies for each scalefactor band.\n block type, PE, and some correlation measures.\n The PE is used by CBR modes to determine if extra bits\n from the bit reservoir should be used. The correlation\n measures are used to determine mid/side or regular stereo.\n */\n/*\n Notation:\n\n barks: a non-linear frequency scale. Mapping from frequency to\n barks is given by freq2bark()\n\n scalefactor bands: The spectrum (frequencies) are broken into\n SBMAX \"scalefactor bands\". Thes bands\n are determined by the MPEG ISO spec. In\n the noise shaping/quantization code, we allocate\n bits among the partition bands to achieve the\n best possible quality\n\n partition bands: The spectrum is also broken into about\n 64 \"partition bands\". Each partition\n band is about .34 barks wide. There are about 2-5\n partition bands for each scalefactor band.\n\n LAME computes all psycho acoustic information for each partition\n band. Then at the end of the computations, this information\n is mapped to scalefactor bands. The energy in each scalefactor\n band is taken as the sum of the energy in all partition bands\n which overlap the scalefactor band. The maskings can be computed\n in the same way (and thus represent the average masking in that band)\n or by taking the minmum value multiplied by the number of\n partition bands used (which represents a minimum masking in that band).\n */\n/*\n The general outline is as follows:\n\n 1. compute the energy in each partition band\n 2. compute the tonality in each partition band\n 3. compute the strength of each partion band \"masker\"\n 4. compute the masking (via the spreading function applied to each masker)\n 5. Modifications for mid/side masking.\n\n Each partition band is considiered a \"masker\". The strength\n of the i'th masker in band j is given by:\n\n s3(bark(i)-bark(j))*strength(i)\n\n The strength of the masker is a function of the energy and tonality.\n The more tonal, the less masking. LAME uses a simple linear formula\n (controlled by NMT and TMN) which says the strength is given by the\n energy divided by a linear function of the tonality.\n */\n/*\n s3() is the \"spreading function\". It is given by a formula\n determined via listening tests.\n\n The total masking in the j'th partition band is the sum over\n all maskings i. It is thus given by the convolution of\n the strength with s3(), the \"spreading function.\"\n\n masking(j) = sum_over_i s3(i-j)*strength(i) = s3 o strength\n\n where \"o\" = convolution operator. s3 is given by a formula determined\n via listening tests. It is normalized so that s3 o 1 = 1.\n\n Note: instead of a simple convolution, LAME also has the\n option of using \"additive masking\"\n\n The most critical part is step 2, computing the tonality of each\n partition band. LAME has two tonality estimators. The first\n is based on the ISO spec, and measures how predictiable the\n signal is over time. The more predictable, the more tonal.\n The second measure is based on looking at the spectrum of\n a single granule. The more peaky the spectrum, the more\n tonal. By most indications, the latter approach is better.\n\n Finally, in step 5, the maskings for the mid and side\n channel are possibly increased. Under certain circumstances,\n noise in the mid & side channels is assumed to also\n be masked by strong maskers in the L or R channels.\n\n\n Other data computed by the psy-model:\n\n ms_ratio side-channel / mid-channel masking ratio (for previous granule)\n ms_ratio_next side-channel / mid-channel masking ratio for this granule\n\n percep_entropy[2] L and R values (prev granule) of PE - A measure of how\n much pre-echo is in the previous granule\n percep_entropy_MS[2] mid and side channel values (prev granule) of percep_entropy\n energy[4] L,R,M,S energy in each channel, prev granule\n blocktype_d[2] block type to use for previous granule\n */\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar FFT = require(\"./FFT.js\");\nvar Encoder = require(\"./Encoder.js\");\n\nfunction PsyModel() {\n\n var fft = new FFT();\n\n var LOG10 = 2.30258509299404568402;\n\n var rpelev = 2;\n var rpelev2 = 16;\n var rpelev_s = 2;\n var rpelev2_s = 16;\n\n /* size of each partition band, in barks: */\n var DELBARK = .34;\n\n /* tuned for output level (sensitive to energy scale) */\n var VO_SCALE = (1. / (14752 * 14752) / (Encoder.BLKSIZE / 2));\n\n var temporalmask_sustain_sec = 0.01;\n\n var NS_PREECHO_ATT0 = 0.8;\n var NS_PREECHO_ATT1 = 0.6;\n var NS_PREECHO_ATT2 = 0.3;\n\n var NS_MSFIX = 3.5;\n\n var NSATTACKTHRE = 4.4;\n var NSATTACKTHRE_S = 25;\n\n var NSFIRLEN = 21;\n\n /* size of each partition band, in barks: */\n var LN_TO_LOG10 = 0.2302585093;\n\n function NON_LINEAR_SCALE_ENERGY(x) {\n return x;\n }\n\n /**\n *
\n     *       L3psycho_anal.  Compute psycho acoustics.\n     *\n     *       Data returned to the calling program must be delayed by one\n     *       granule.\n     *\n     *       This is done in two places.\n     *       If we do not need to know the blocktype, the copying\n     *       can be done here at the top of the program: we copy the data for\n     *       the last granule (computed during the last call) before it is\n     *       overwritten with the new data.  It looks like this:\n     *\n     *       0. static psymodel_data\n     *       1. calling_program_data = psymodel_data\n     *       2. compute psymodel_data\n     *\n     *       For data which needs to know the blocktype, the copying must be\n     *       done at the end of this loop, and the old values must be saved:\n     *\n     *       0. static psymodel_data_old\n     *       1. compute psymodel_data\n     *       2. compute possible block type of this granule\n     *       3. compute final block type of previous granule based on #2.\n     *       4. calling_program_data = psymodel_data_old\n     *       5. psymodel_data_old = psymodel_data\n     *     psycho_loudness_approx\n     *       jd - 2001 mar 12\n     *    in:  energy   - BLKSIZE/2 elements of frequency magnitudes ^ 2\n     *         gfp      - uses out_samplerate, ATHtype (also needed for ATHformula)\n     *    returns: loudness^2 approximation, a positive value roughly tuned for a value\n     *             of 1.0 for signals near clipping.\n     *    notes:   When calibrated, feeding this function binary white noise at sample\n     *             values +32767 or -32768 should return values that approach 3.\n     *             ATHformula is used to approximate an equal loudness curve.\n     *    future:  Data indicates that the shape of the equal loudness curve varies\n     *             with intensity.  This function might be improved by using an equal\n     *             loudness curve shaped for typical playback levels (instead of the\n     *             ATH, that is shaped for the threshold).  A flexible realization might\n     *             simply bend the existing ATH curve to achieve the desired shape.\n     *             However, the potential gain may not be enough to justify an effort.\n     * 
\n */\n function psycho_loudness_approx(energy, gfc) {\n var loudness_power = 0.0;\n /* apply weights to power in freq. bands */\n for (var i = 0; i < Encoder.BLKSIZE / 2; ++i)\n loudness_power += energy[i] * gfc.ATH.eql_w[i];\n loudness_power *= VO_SCALE;\n\n return loudness_power;\n }\n\n function compute_ffts(gfp, fftenergy, fftenergy_s, wsamp_l, wsamp_lPos, wsamp_s, wsamp_sPos, gr_out, chn, buffer, bufPos) {\n var gfc = gfp.internal_flags;\n if (chn < 2) {\n fft.fft_long(gfc, wsamp_l[wsamp_lPos], chn, buffer, bufPos);\n fft.fft_short(gfc, wsamp_s[wsamp_sPos], chn, buffer, bufPos);\n }\n /* FFT data for mid and side channel is derived from L & R */\n else if (chn == 2) {\n for (var j = Encoder.BLKSIZE - 1; j >= 0; --j) {\n var l = wsamp_l[wsamp_lPos + 0][j];\n var r = wsamp_l[wsamp_lPos + 1][j];\n wsamp_l[wsamp_lPos + 0][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_l[wsamp_lPos + 1][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n for (var b = 2; b >= 0; --b) {\n for (var j = Encoder.BLKSIZE_s - 1; j >= 0; --j) {\n var l = wsamp_s[wsamp_sPos + 0][b][j];\n var r = wsamp_s[wsamp_sPos + 1][b][j];\n wsamp_s[wsamp_sPos + 0][b][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_s[wsamp_sPos + 1][b][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy[0] = NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos + 0][0]);\n fftenergy[0] *= fftenergy[0];\n\n for (var j = Encoder.BLKSIZE / 2 - 1; j >= 0; --j) {\n var re = (wsamp_l[wsamp_lPos + 0])[Encoder.BLKSIZE / 2 - j];\n var im = (wsamp_l[wsamp_lPos + 0])[Encoder.BLKSIZE / 2 + j];\n fftenergy[Encoder.BLKSIZE / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n for (var b = 2; b >= 0; --b) {\n fftenergy_s[b][0] = (wsamp_s[wsamp_sPos + 0])[b][0];\n fftenergy_s[b][0] *= fftenergy_s[b][0];\n for (var j = Encoder.BLKSIZE_s / 2 - 1; j >= 0; --j) {\n var re = (wsamp_s[wsamp_sPos + 0])[b][Encoder.BLKSIZE_s\n / 2 - j];\n var im = (wsamp_s[wsamp_sPos + 0])[b][Encoder.BLKSIZE_s\n / 2 + j];\n fftenergy_s[b][Encoder.BLKSIZE_s / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n }\n /* total energy */\n {\n var totalenergy = 0.0;\n for (var j = 11; j < Encoder.HBLKSIZE; j++)\n totalenergy += fftenergy[j];\n\n gfc.tot_ener[chn] = totalenergy;\n }\n\n if (gfp.analysis) {\n for (var j = 0; j < Encoder.HBLKSIZE; j++) {\n gfc.pinfo.energy[gr_out][chn][j] = gfc.pinfo.energy_save[chn][j];\n gfc.pinfo.energy_save[chn][j] = fftenergy[j];\n }\n gfc.pinfo.pe[gr_out][chn] = gfc.pe[chn];\n }\n\n /*********************************************************************\n * compute loudness approximation (used for ATH auto-level adjustment)\n *********************************************************************/\n if (gfp.athaa_loudapprox == 2 && chn < 2) {\n // no loudness for mid/side ch\n gfc.loudness_sq[gr_out][chn] = gfc.loudness_sq_save[chn];\n gfc.loudness_sq_save[chn] = psycho_loudness_approx(fftenergy, gfc);\n }\n }\n\n /* mask_add optimization */\n /* init the limit values used to avoid computing log in mask_add when it is not necessary */\n\n /**\n *
\n     *  For example, with i = 10*log10(m2/m1)/10*16         (= log10(m2/m1)*16)\n     *\n     * abs(i)>8 is equivalent (as i is an integer) to\n     * abs(i)>=9\n     * i>=9 || i<=-9\n     * equivalent to (as i is the biggest integer smaller than log10(m2/m1)*16\n     * or the smallest integer bigger than log10(m2/m1)*16 depending on the sign of log10(m2/m1)*16)\n     * log10(m2/m1)>=9/16 || log10(m2/m1)<=-9/16\n     * exp10 is strictly increasing thus this is equivalent to\n     * m2/m1 >= 10^(9/16) || m2/m1<=10^(-9/16) which are comparisons to constants\n     * 
\n */\n\n /**\n * as in if(i>8)\n */\n var I1LIMIT = 8;\n /**\n * as in if(i>24) . changed 23\n */\n var I2LIMIT = 23;\n /**\n * as in if(m<15)\n */\n var MLIMIT = 15;\n\n var ma_max_i1;\n var ma_max_i2;\n var ma_max_m;\n\n /**\n * This is the masking table:
\n * According to tonality, values are going from 0dB (TMN) to 9.3dB (NMT).
\n * After additive masking computation, 8dB are added, so final values are\n * going from 8dB to 17.3dB\n *\n * pow(10, -0.0..-0.6)\n */\n var tab = [1.0, 0.79433, 0.63096, 0.63096,\n 0.63096, 0.63096, 0.63096, 0.25119, 0.11749];\n\n function init_mask_add_max_values() {\n ma_max_i1 = Math.pow(10, (I1LIMIT + 1) / 16.0);\n ma_max_i2 = Math.pow(10, (I2LIMIT + 1) / 16.0);\n ma_max_m = Math.pow(10, (MLIMIT) / 10.0);\n }\n\n var table1 = [3.3246 * 3.3246,\n 3.23837 * 3.23837, 3.15437 * 3.15437, 3.00412 * 3.00412,\n 2.86103 * 2.86103, 2.65407 * 2.65407, 2.46209 * 2.46209,\n 2.284 * 2.284, 2.11879 * 2.11879, 1.96552 * 1.96552,\n 1.82335 * 1.82335, 1.69146 * 1.69146, 1.56911 * 1.56911,\n 1.46658 * 1.46658, 1.37074 * 1.37074, 1.31036 * 1.31036,\n 1.25264 * 1.25264, 1.20648 * 1.20648, 1.16203 * 1.16203,\n 1.12765 * 1.12765, 1.09428 * 1.09428, 1.0659 * 1.0659,\n 1.03826 * 1.03826, 1.01895 * 1.01895, 1];\n\n var table2 = [1.33352 * 1.33352,\n 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497,\n 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382,\n 1.22321 * 1.22321, 1.14758 * 1.14758, 1];\n\n var table3 = [2.35364 * 2.35364,\n 2.29259 * 2.29259, 2.23313 * 2.23313, 2.12675 * 2.12675,\n 2.02545 * 2.02545, 1.87894 * 1.87894, 1.74303 * 1.74303,\n 1.61695 * 1.61695, 1.49999 * 1.49999, 1.39148 * 1.39148,\n 1.29083 * 1.29083, 1.19746 * 1.19746, 1.11084 * 1.11084,\n 1.03826 * 1.03826];\n\n /**\n * addition of simultaneous masking Naoki Shibata 2000/7\n */\n function mask_add(m1, m2, kk, b, gfc, shortblock) {\n var ratio;\n\n if (m2 > m1) {\n if (m2 < (m1 * ma_max_i2))\n ratio = m2 / m1;\n else\n return (m1 + m2);\n } else {\n if (m1 >= (m2 * ma_max_i2))\n return (m1 + m2);\n ratio = m1 / m2;\n }\n\n /* Should always be true, just checking */\n assert(m1 >= 0);\n assert(m2 >= 0);\n\n m1 += m2;\n //if (((long)(b + 3) & 0xffffffff) <= 3 + 3) {\n if ((b + 3) <= 3 + 3) {\n /* approximately, 1 bark = 3 partitions */\n /* 65% of the cases */\n /* originally 'if(i > 8)' */\n if (ratio >= ma_max_i1) {\n /* 43% of the total */\n return m1;\n }\n\n /* 22% of the total */\n var i = 0 | (Util.FAST_LOG10_X(ratio, 16.0));\n return m1 * table2[i];\n }\n\n /**\n *
\n         * m<15 equ log10((m1+m2)/gfc.ATH.cb[k])<1.5\n         * equ (m1+m2)/gfc.ATH.cb[k]<10^1.5\n         * equ (m1+m2)<10^1.5 * gfc.ATH.cb[k]\n         * 
\n */\n var i = 0 | Util.FAST_LOG10_X(ratio, 16.0);\n if (shortblock != 0) {\n m2 = gfc.ATH.cb_s[kk] * gfc.ATH.adjust;\n } else {\n m2 = gfc.ATH.cb_l[kk] * gfc.ATH.adjust;\n }\n assert(m2 >= 0);\n if (m1 < ma_max_m * m2) {\n /* 3% of the total */\n /* Originally if (m > 0) { */\n if (m1 > m2) {\n var f, r;\n\n f = 1.0;\n if (i <= 13)\n f = table3[i];\n\n r = Util.FAST_LOG10_X(m1 / m2, 10.0 / 15.0);\n return m1 * ((table1[i] - f) * r + f);\n }\n\n if (i > 13)\n return m1;\n\n return m1 * table3[i];\n }\n\n /* 10% of total */\n return m1 * table1[i];\n }\n\n var table2_ = [1.33352 * 1.33352,\n 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497,\n 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382,\n 1.22321 * 1.22321, 1.14758 * 1.14758, 1];\n\n /**\n * addition of simultaneous masking Naoki Shibata 2000/7\n */\n function vbrpsy_mask_add(m1, m2, b) {\n var ratio;\n\n if (m1 < 0) {\n m1 = 0;\n }\n if (m2 < 0) {\n m2 = 0;\n }\n if (m1 <= 0) {\n return m2;\n }\n if (m2 <= 0) {\n return m1;\n }\n if (m2 > m1) {\n ratio = m2 / m1;\n } else {\n ratio = m1 / m2;\n }\n if (-2 <= b && b <= 2) {\n /* approximately, 1 bark = 3 partitions */\n /* originally 'if(i > 8)' */\n if (ratio >= ma_max_i1) {\n return m1 + m2;\n } else {\n var i = 0 | (Util.FAST_LOG10_X(ratio, 16.0));\n return (m1 + m2) * table2_[i];\n }\n }\n if (ratio < ma_max_i2) {\n return m1 + m2;\n }\n if (m1 < m2) {\n m1 = m2;\n }\n return m1;\n }\n\n /**\n * compute interchannel masking effects\n */\n function calc_interchannel_masking(gfp, ratio) {\n var gfc = gfp.internal_flags;\n if (gfc.channels_out > 1) {\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n var l = gfc.thm[0].l[sb];\n var r = gfc.thm[1].l[sb];\n gfc.thm[0].l[sb] += r * ratio;\n gfc.thm[1].l[sb] += l * ratio;\n }\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var l = gfc.thm[0].s[sb][sblock];\n var r = gfc.thm[1].s[sb][sblock];\n gfc.thm[0].s[sb][sblock] += r * ratio;\n gfc.thm[1].s[sb][sblock] += l * ratio;\n }\n }\n }\n }\n\n /**\n * compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper\n */\n function msfix1(gfc) {\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n /* use this fix if L & R masking differs by 2db or less */\n /* if db = 10*log10(x2/x1) < 2 */\n /* if (x2 < 1.58*x1) { */\n if (gfc.thm[0].l[sb] > 1.58 * gfc.thm[1].l[sb]\n || gfc.thm[1].l[sb] > 1.58 * gfc.thm[0].l[sb])\n continue;\n var mld = gfc.mld_l[sb] * gfc.en[3].l[sb];\n var rmid = Math.max(gfc.thm[2].l[sb],\n Math.min(gfc.thm[3].l[sb], mld));\n\n mld = gfc.mld_l[sb] * gfc.en[2].l[sb];\n var rside = Math.max(gfc.thm[3].l[sb],\n Math.min(gfc.thm[2].l[sb], mld));\n gfc.thm[2].l[sb] = rmid;\n gfc.thm[3].l[sb] = rside;\n }\n\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n if (gfc.thm[0].s[sb][sblock] > 1.58 * gfc.thm[1].s[sb][sblock]\n || gfc.thm[1].s[sb][sblock] > 1.58 * gfc.thm[0].s[sb][sblock])\n continue;\n var mld = gfc.mld_s[sb] * gfc.en[3].s[sb][sblock];\n var rmid = Math.max(gfc.thm[2].s[sb][sblock],\n Math.min(gfc.thm[3].s[sb][sblock], mld));\n\n mld = gfc.mld_s[sb] * gfc.en[2].s[sb][sblock];\n var rside = Math.max(gfc.thm[3].s[sb][sblock],\n Math.min(gfc.thm[2].s[sb][sblock], mld));\n\n gfc.thm[2].s[sb][sblock] = rmid;\n gfc.thm[3].s[sb][sblock] = rside;\n }\n }\n }\n\n /**\n * Adjust M/S maskings if user set \"msfix\"\n *\n * Naoki Shibata 2000\n */\n function ns_msfix(gfc, msfix, athadjust) {\n var msfix2 = msfix;\n var athlower = Math.pow(10, athadjust);\n\n msfix *= 2.0;\n msfix2 *= 2.0;\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n var thmLR, thmM, thmS, ath;\n ath = (gfc.ATH.cb_l[gfc.bm_l[sb]]) * athlower;\n thmLR = Math.min(Math.max(gfc.thm[0].l[sb], ath),\n Math.max(gfc.thm[1].l[sb], ath));\n thmM = Math.max(gfc.thm[2].l[sb], ath);\n thmS = Math.max(gfc.thm[3].l[sb], ath);\n if (thmLR * msfix < thmM + thmS) {\n var f = thmLR * msfix2 / (thmM + thmS);\n thmM *= f;\n thmS *= f;\n assert(thmM + thmS > 0);\n }\n gfc.thm[2].l[sb] = Math.min(thmM, gfc.thm[2].l[sb]);\n gfc.thm[3].l[sb] = Math.min(thmS, gfc.thm[3].l[sb]);\n }\n\n athlower *= ( Encoder.BLKSIZE_s / Encoder.BLKSIZE);\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var thmLR, thmM, thmS, ath;\n ath = (gfc.ATH.cb_s[gfc.bm_s[sb]]) * athlower;\n thmLR = Math.min(Math.max(gfc.thm[0].s[sb][sblock], ath),\n Math.max(gfc.thm[1].s[sb][sblock], ath));\n thmM = Math.max(gfc.thm[2].s[sb][sblock], ath);\n thmS = Math.max(gfc.thm[3].s[sb][sblock], ath);\n\n if (thmLR * msfix < thmM + thmS) {\n var f = thmLR * msfix / (thmM + thmS);\n thmM *= f;\n thmS *= f;\n assert(thmM + thmS > 0);\n }\n gfc.thm[2].s[sb][sblock] = Math.min(gfc.thm[2].s[sb][sblock],\n thmM);\n gfc.thm[3].s[sb][sblock] = Math.min(gfc.thm[3].s[sb][sblock],\n thmS);\n }\n }\n }\n\n /**\n * short block threshold calculation (part 2)\n *\n * partition band bo_s[sfb] is at the transition from scalefactor band sfb\n * to the next one sfb+1; enn and thmm have to be split between them\n */\n function convert_partition2scalefac_s(gfc, eb, thr, chn, sblock) {\n var sb, b;\n var enn = 0.0;\n var thmm = 0.0;\n for (sb = b = 0; sb < Encoder.SBMAX_s; ++b, ++sb) {\n var bo_s_sb = gfc.bo_s[sb];\n var npart_s = gfc.npart_s;\n var b_lim = bo_s_sb < npart_s ? bo_s_sb : npart_s;\n while (b < b_lim) {\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n enn += eb[b];\n thmm += thr[b];\n b++;\n }\n gfc.en[chn].s[sb][sblock] = enn;\n gfc.thm[chn].s[sb][sblock] = thmm;\n\n if (b >= npart_s) {\n ++sb;\n break;\n }\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n {\n /* at transition sfb . sfb+1 */\n var w_curr = gfc.PSY.bo_s_weight[sb];\n var w_next = 1.0 - w_curr;\n enn = w_curr * eb[b];\n thmm = w_curr * thr[b];\n gfc.en[chn].s[sb][sblock] += enn;\n gfc.thm[chn].s[sb][sblock] += thmm;\n enn = w_next * eb[b];\n thmm = w_next * thr[b];\n }\n }\n /* zero initialize the rest */\n for (; sb < Encoder.SBMAX_s; ++sb) {\n gfc.en[chn].s[sb][sblock] = 0;\n gfc.thm[chn].s[sb][sblock] = 0;\n }\n }\n\n /**\n * longblock threshold calculation (part 2)\n */\n function convert_partition2scalefac_l(gfc, eb, thr, chn) {\n var sb, b;\n var enn = 0.0;\n var thmm = 0.0;\n for (sb = b = 0; sb < Encoder.SBMAX_l; ++b, ++sb) {\n var bo_l_sb = gfc.bo_l[sb];\n var npart_l = gfc.npart_l;\n var b_lim = bo_l_sb < npart_l ? bo_l_sb : npart_l;\n while (b < b_lim) {\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n enn += eb[b];\n thmm += thr[b];\n b++;\n }\n gfc.en[chn].l[sb] = enn;\n gfc.thm[chn].l[sb] = thmm;\n\n if (b >= npart_l) {\n ++sb;\n break;\n }\n assert(eb[b] >= 0);\n assert(thr[b] >= 0);\n {\n /* at transition sfb . sfb+1 */\n var w_curr = gfc.PSY.bo_l_weight[sb];\n var w_next = 1.0 - w_curr;\n enn = w_curr * eb[b];\n thmm = w_curr * thr[b];\n gfc.en[chn].l[sb] += enn;\n gfc.thm[chn].l[sb] += thmm;\n enn = w_next * eb[b];\n thmm = w_next * thr[b];\n }\n }\n /* zero initialize the rest */\n for (; sb < Encoder.SBMAX_l; ++sb) {\n gfc.en[chn].l[sb] = 0;\n gfc.thm[chn].l[sb] = 0;\n }\n }\n\n function compute_masking_s(gfp, fftenergy_s, eb, thr, chn, sblock) {\n var gfc = gfp.internal_flags;\n var j, b;\n\n for (b = j = 0; b < gfc.npart_s; ++b) {\n var ebb = 0, m = 0;\n var n = gfc.numlines_s[b];\n for (var i = 0; i < n; ++i, ++j) {\n var el = fftenergy_s[sblock][j];\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n }\n assert(b == gfc.npart_s);\n assert(j == 129);\n for (j = b = 0; b < gfc.npart_s; b++) {\n var kk = gfc.s3ind_s[b][0];\n var ecb = gfc.s3_ss[j++] * eb[kk];\n ++kk;\n while (kk <= gfc.s3ind_s[b][1]) {\n ecb += gfc.s3_ss[j] * eb[kk];\n ++j;\n ++kk;\n }\n\n { /* limit calculated threshold by previous granule */\n var x = rpelev_s * gfc.nb_s1[chn][b];\n thr[b] = Math.min(ecb, x);\n }\n if (gfc.blocktype_old[chn & 1] == Encoder.SHORT_TYPE) {\n /* limit calculated threshold by even older granule */\n var x = rpelev2_s * gfc.nb_s2[chn][b];\n var y = thr[b];\n thr[b] = Math.min(x, y);\n }\n\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = ecb;\n assert(thr[b] >= 0);\n }\n for (; b <= Encoder.CBANDS; ++b) {\n eb[b] = 0;\n thr[b] = 0;\n }\n }\n\n function block_type_set(gfp, uselongblock, blocktype_d, blocktype) {\n var gfc = gfp.internal_flags;\n\n if (gfp.short_blocks == ShortBlock.short_block_coupled\n /* force both channels to use the same block type */\n /* this is necessary if the frame is to be encoded in ms_stereo. */\n /* But even without ms_stereo, FhG does this */\n && !(uselongblock[0] != 0 && uselongblock[1] != 0))\n uselongblock[0] = uselongblock[1] = 0;\n\n /*\n * update the blocktype of the previous granule, since it depends on\n * what happend in this granule\n */\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n blocktype[chn] = Encoder.NORM_TYPE;\n /* disable short blocks */\n if (gfp.short_blocks == ShortBlock.short_block_dispensed)\n uselongblock[chn] = 1;\n if (gfp.short_blocks == ShortBlock.short_block_forced)\n uselongblock[chn] = 0;\n\n if (uselongblock[chn] != 0) {\n /* no attack : use long blocks */\n assert(gfc.blocktype_old[chn] != Encoder.START_TYPE);\n if (gfc.blocktype_old[chn] == Encoder.SHORT_TYPE)\n blocktype[chn] = Encoder.STOP_TYPE;\n } else {\n /* attack : use short blocks */\n blocktype[chn] = Encoder.SHORT_TYPE;\n if (gfc.blocktype_old[chn] == Encoder.NORM_TYPE) {\n gfc.blocktype_old[chn] = Encoder.START_TYPE;\n }\n if (gfc.blocktype_old[chn] == Encoder.STOP_TYPE)\n gfc.blocktype_old[chn] = Encoder.SHORT_TYPE;\n }\n\n blocktype_d[chn] = gfc.blocktype_old[chn];\n // value returned to calling program\n gfc.blocktype_old[chn] = blocktype[chn];\n // save for next call to l3psy_anal\n }\n }\n\n function NS_INTERP(x, y, r) {\n /* was pow((x),(r))*pow((y),1-(r)) */\n if (r >= 1.0) {\n /* 99.7% of the time */\n return x;\n }\n if (r <= 0.0)\n return y;\n if (y > 0.0) {\n /* rest of the time */\n return (Math.pow(x / y, r) * y);\n }\n /* never happens */\n return 0.0;\n }\n\n /**\n * these values are tuned only for 44.1kHz...\n */\n var regcoef_s = [11.8, 13.6, 17.2, 32, 46.5,\n 51.3, 57.5, 67.1, 71.5, 84.6, 97.6, 130,\n /* 255.8 */\n ];\n\n function pecalc_s(mr, masking_lower) {\n var pe_s = 1236.28 / 4;\n for (var sb = 0; sb < Encoder.SBMAX_s - 1; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var thm = mr.thm.s[sb][sblock];\n assert(sb < regcoef_s.length);\n if (thm > 0.0) {\n var x = thm * masking_lower;\n var en = mr.en.s[sb][sblock];\n if (en > x) {\n if (en > x * 1e10) {\n pe_s += regcoef_s[sb] * (10.0 * LOG10);\n } else {\n assert(x > 0);\n pe_s += regcoef_s[sb] * Util.FAST_LOG10(en / x);\n }\n }\n }\n }\n }\n\n return pe_s;\n }\n\n /**\n * these values are tuned only for 44.1kHz...\n */\n var regcoef_l = [6.8, 5.8, 5.8, 6.4, 6.5, 9.9,\n 12.1, 14.4, 15, 18.9, 21.6, 26.9, 34.2, 40.2, 46.8, 56.5,\n 60.7, 73.9, 85.7, 93.4, 126.1,\n /* 241.3 */\n ];\n\n function pecalc_l(mr, masking_lower) {\n var pe_l = 1124.23 / 4;\n for (var sb = 0; sb < Encoder.SBMAX_l - 1; sb++) {\n var thm = mr.thm.l[sb];\n assert(sb < regcoef_l.length);\n if (thm > 0.0) {\n var x = thm * masking_lower;\n var en = mr.en.l[sb];\n if (en > x) {\n if (en > x * 1e10) {\n pe_l += regcoef_l[sb] * (10.0 * LOG10);\n } else {\n assert(x > 0);\n pe_l += regcoef_l[sb] * Util.FAST_LOG10(en / x);\n }\n }\n }\n }\n return pe_l;\n }\n\n function calc_energy(gfc, fftenergy, eb, max, avg) {\n var b, j;\n\n for (b = j = 0; b < gfc.npart_l; ++b) {\n var ebb = 0, m = 0;\n var i;\n for (i = 0; i < gfc.numlines_l[b]; ++i, ++j) {\n var el = fftenergy[j];\n assert(el >= 0);\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n max[b] = m;\n avg[b] = ebb * gfc.rnumlines_l[b];\n assert(gfc.rnumlines_l[b] >= 0);\n assert(ebb >= 0);\n assert(eb[b] >= 0);\n assert(max[b] >= 0);\n assert(avg[b] >= 0);\n }\n }\n\n function calc_mask_index_l(gfc, max, avg, mask_idx) {\n var last_tab_entry = tab.length - 1;\n var b = 0;\n var a = avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n\n for (b = 1; b < gfc.npart_l - 1; b++) {\n a = avg[b - 1] + avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_l[b - 1] + gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1) > 0);\n a = 20.0\n * (m * 3.0 - a)\n / (a * (gfc.numlines_l[b - 1] + gfc.numlines_l[b]\n + gfc.numlines_l[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n }\n assert(b > 0);\n assert(b == gfc.npart_l - 1);\n\n a = avg[b - 1] + avg[b];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n assert((gfc.numlines_l[b - 1] + gfc.numlines_l[b] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_l[b - 1] + gfc.numlines_l[b] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n assert(b == (gfc.npart_l - 1));\n }\n\n var fircoef = [\n -8.65163e-18 * 2, -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2,\n -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2, 0.0931738 * 2,\n -5.52212e-17 * 2, -0.313819 * 2\n ];\n\n this.L3psycho_anal_ns = function (gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, percep_entropy, percep_MS_entropy, energy, blocktype_d) {\n /*\n * to get a good cache performance, one has to think about the sequence,\n * in which the variables are used.\n */\n var gfc = gfp.internal_flags;\n\n /* fft and energy calculation */\n var wsamp_L = new_float_n([2, Encoder.BLKSIZE]);\n var wsamp_S = new_float_n([2, 3, Encoder.BLKSIZE_s]);\n\n /* convolution */\n var eb_l = new_float(Encoder.CBANDS + 1);\n var eb_s = new_float(Encoder.CBANDS + 1);\n var thr = new_float(Encoder.CBANDS + 2);\n\n /* block type */\n var blocktype = new_int(2), uselongblock = new_int(2);\n\n /* usual variables like loop indices, etc.. */\n var numchn, chn;\n var b, i, j, k;\n var sb, sblock;\n\n /* variables used for --nspsytune */\n var ns_hpfsmpl = new_float_n([2, 576]);\n var pcfact;\n var mask_idx_l = new_int(Encoder.CBANDS + 2), mask_idx_s = new_int(Encoder.CBANDS + 2);\n\n Arrays.fill(mask_idx_s, 0);\n\n numchn = gfc.channels_out;\n /* chn=2 and 3 = Mid and Side channels */\n if (gfp.mode == MPEGMode.JOINT_STEREO)\n numchn = 4;\n\n if (gfp.VBR == VbrMode.vbr_off)\n pcfact = gfc.ResvMax == 0 ? 0 : ( gfc.ResvSize)\n / gfc.ResvMax * 0.5;\n else if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh\n || gfp.VBR == VbrMode.vbr_mt) {\n pcfact = 0.6;\n } else\n pcfact = 1.0;\n\n /**********************************************************************\n * Apply HPF of fs/4 to the input signal. This is used for attack\n * detection / handling.\n **********************************************************************/\n /* Don't copy the input buffer into a temporary buffer */\n /* unroll the loop 2 times */\n for (chn = 0; chn < gfc.channels_out; chn++) {\n /* apply high pass filter of fs/4 */\n var firbuf = buffer[chn];\n var firbufPos = bufPos + 576 - 350 - NSFIRLEN + 192;\n assert(fircoef.length == ((NSFIRLEN - 1) / 2));\n for (i = 0; i < 576; i++) {\n var sum1, sum2;\n sum1 = firbuf[firbufPos + i + 10];\n sum2 = 0.0;\n for (j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) {\n sum1 += fircoef[j]\n * (firbuf[firbufPos + i + j] + firbuf[firbufPos + i\n + NSFIRLEN - j]);\n sum2 += fircoef[j + 1]\n * (firbuf[firbufPos + i + j + 1] + firbuf[firbufPos\n + i + NSFIRLEN - j - 1]);\n }\n ns_hpfsmpl[chn][i] = sum1 + sum2;\n }\n masking_ratio[gr_out][chn].en.assign(gfc.en[chn]);\n masking_ratio[gr_out][chn].thm.assign(gfc.thm[chn]);\n if (numchn > 2) {\n /* MS maskings */\n /* percep_MS_entropy [chn-2] = gfc . pe [chn]; */\n masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn + 2]);\n masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn + 2]);\n }\n }\n\n for (chn = 0; chn < numchn; chn++) {\n var wsamp_l;\n var wsamp_s;\n var en_subshort = new_float(12);\n var en_short = [0, 0, 0, 0];\n var attack_intensity = new_float(12);\n var ns_uselongblock = 1;\n var attackThreshold;\n var max = new_float(Encoder.CBANDS), avg = new_float(Encoder.CBANDS);\n var ns_attacks = [0, 0, 0, 0];\n var fftenergy = new_float(Encoder.HBLKSIZE);\n var fftenergy_s = new_float_n([3, Encoder.HBLKSIZE_s]);\n\n /*\n * rh 20040301: the following loops do access one off the limits so\n * I increase the array dimensions by one and initialize the\n * accessed values to zero\n */\n assert(gfc.npart_s <= Encoder.CBANDS);\n assert(gfc.npart_l <= Encoder.CBANDS);\n\n /***************************************************************\n * determine the block type (window type)\n ***************************************************************/\n /* calculate energies of each sub-shortblocks */\n for (i = 0; i < 3; i++) {\n en_subshort[i] = gfc.nsPsy.last_en_subshort[chn][i + 6];\n assert(gfc.nsPsy.last_en_subshort[chn][i + 4] > 0);\n attack_intensity[i] = en_subshort[i]\n / gfc.nsPsy.last_en_subshort[chn][i + 4];\n en_short[0] += en_subshort[i];\n }\n\n if (chn == 2) {\n for (i = 0; i < 576; i++) {\n var l, r;\n l = ns_hpfsmpl[0][i];\n r = ns_hpfsmpl[1][i];\n ns_hpfsmpl[0][i] = l + r;\n ns_hpfsmpl[1][i] = l - r;\n }\n }\n {\n var pf = ns_hpfsmpl[chn & 1];\n var pfPos = 0;\n for (i = 0; i < 9; i++) {\n var pfe = pfPos + 576 / 9;\n var p = 1.;\n for (; pfPos < pfe; pfPos++)\n if (p < Math.abs(pf[pfPos]))\n p = Math.abs(pf[pfPos]);\n\n gfc.nsPsy.last_en_subshort[chn][i] = en_subshort[i + 3] = p;\n en_short[1 + i / 3] += p;\n if (p > en_subshort[i + 3 - 2]) {\n assert(en_subshort[i + 3 - 2] > 0);\n p = p / en_subshort[i + 3 - 2];\n } else if (en_subshort[i + 3 - 2] > p * 10.0) {\n assert(p > 0);\n p = en_subshort[i + 3 - 2] / (p * 10.0);\n } else\n p = 0.0;\n attack_intensity[i + 3] = p;\n }\n }\n\n if (gfp.analysis) {\n var x = attack_intensity[0];\n for (i = 1; i < 12; i++)\n if (x < attack_intensity[i])\n x = attack_intensity[i];\n gfc.pinfo.ers[gr_out][chn] = gfc.pinfo.ers_save[chn];\n gfc.pinfo.ers_save[chn] = x;\n }\n\n /* compare energies between sub-shortblocks */\n attackThreshold = (chn == 3) ? gfc.nsPsy.attackthre_s\n : gfc.nsPsy.attackthre;\n for (i = 0; i < 12; i++)\n if (0 == ns_attacks[i / 3]\n && attack_intensity[i] > attackThreshold)\n ns_attacks[i / 3] = (i % 3) + 1;\n\n /*\n * should have energy change between short blocks, in order to avoid\n * periodic signals\n */\n for (i = 1; i < 4; i++) {\n var ratio;\n if (en_short[i - 1] > en_short[i]) {\n assert(en_short[i] > 0);\n ratio = en_short[i - 1] / en_short[i];\n } else {\n assert(en_short[i - 1] > 0);\n ratio = en_short[i] / en_short[i - 1];\n }\n if (ratio < 1.7) {\n ns_attacks[i] = 0;\n if (i == 1)\n ns_attacks[0] = 0;\n }\n }\n\n if (ns_attacks[0] != 0 && gfc.nsPsy.lastAttacks[chn] != 0)\n ns_attacks[0] = 0;\n\n if (gfc.nsPsy.lastAttacks[chn] == 3\n || (ns_attacks[0] + ns_attacks[1] + ns_attacks[2] + ns_attacks[3]) != 0) {\n ns_uselongblock = 0;\n\n if (ns_attacks[1] != 0 && ns_attacks[0] != 0)\n ns_attacks[1] = 0;\n if (ns_attacks[2] != 0 && ns_attacks[1] != 0)\n ns_attacks[2] = 0;\n if (ns_attacks[3] != 0 && ns_attacks[2] != 0)\n ns_attacks[3] = 0;\n }\n\n if (chn < 2) {\n uselongblock[chn] = ns_uselongblock;\n } else {\n if (ns_uselongblock == 0) {\n uselongblock[0] = uselongblock[1] = 0;\n }\n }\n\n /*\n * there is a one granule delay. Copy maskings computed last call\n * into masking_ratio to return to calling program.\n */\n energy[chn] = gfc.tot_ener[chn];\n\n /*********************************************************************\n * compute FFTs\n *********************************************************************/\n wsamp_s = wsamp_S;\n wsamp_l = wsamp_L;\n compute_ffts(gfp, fftenergy, fftenergy_s, wsamp_l, (chn & 1),\n wsamp_s, (chn & 1), gr_out, chn, buffer, bufPos);\n\n /*********************************************************************\n * Calculate the energy and the tonality of each partition.\n *********************************************************************/\n calc_energy(gfc, fftenergy, eb_l, max, avg);\n calc_mask_index_l(gfc, max, avg, mask_idx_l);\n /* compute masking thresholds for short blocks */\n for (sblock = 0; sblock < 3; sblock++) {\n var enn, thmm;\n compute_masking_s(gfp, fftenergy_s, eb_s, thr, chn, sblock);\n convert_partition2scalefac_s(gfc, eb_s, thr, chn, sblock);\n /**** short block pre-echo control ****/\n for (sb = 0; sb < Encoder.SBMAX_s; sb++) {\n thmm = gfc.thm[chn].s[sb][sblock];\n\n thmm *= NS_PREECHO_ATT0;\n if (ns_attacks[sblock] >= 2 || ns_attacks[sblock + 1] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT1 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n if (ns_attacks[sblock] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n } else if ((sblock != 0 && ns_attacks[sblock - 1] == 3)\n || (sblock == 0 && gfc.nsPsy.lastAttacks[chn] == 3)) {\n var idx = (sblock != 2) ? sblock + 1 : 0;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n /* pulse like signal detection for fatboy.wav and so on */\n enn = en_subshort[sblock * 3 + 3]\n + en_subshort[sblock * 3 + 4]\n + en_subshort[sblock * 3 + 5];\n if (en_subshort[sblock * 3 + 5] * 6 < enn) {\n thmm *= 0.5;\n if (en_subshort[sblock * 3 + 4] * 6 < enn)\n thmm *= 0.5;\n }\n\n gfc.thm[chn].s[sb][sblock] = thmm;\n }\n }\n gfc.nsPsy.lastAttacks[chn] = ns_attacks[2];\n\n /*********************************************************************\n * convolve the partitioned energy and unpredictability with the\n * spreading function, s3_l[b][k]\n ********************************************************************/\n k = 0;\n {\n for (b = 0; b < gfc.npart_l; b++) {\n /*\n * convolve the partitioned energy with the spreading\n * function\n */\n var kk = gfc.s3ind[b][0];\n var eb2 = eb_l[kk] * tab[mask_idx_l[kk]];\n var ecb = gfc.s3_ll[k++] * eb2;\n while (++kk <= gfc.s3ind[b][1]) {\n eb2 = eb_l[kk] * tab[mask_idx_l[kk]];\n ecb = mask_add(ecb, gfc.s3_ll[k++] * eb2, kk, kk - b,\n gfc, 0);\n }\n ecb *= 0.158489319246111;\n /* pow(10,-0.8) */\n\n /**** long block pre-echo control ****/\n /**\n *
\n                     * dont use long block pre-echo control if previous granule was\n                     * a short block.  This is to avoid the situation:\n                     * frame0:  quiet (very low masking)\n                     * frame1:  surge  (triggers short blocks)\n                     * frame2:  regular frame.  looks like pre-echo when compared to\n                     *          frame0, but all pre-echo was in frame1.\n                     * 
\n */\n /*\n * chn=0,1 L and R channels\n *\n * chn=2,3 S and M channels.\n */\n\n if (gfc.blocktype_old[chn & 1] == Encoder.SHORT_TYPE)\n thr[b] = ecb;\n else\n thr[b] = NS_INTERP(\n Math.min(ecb, Math.min(rpelev\n * gfc.nb_1[chn][b], rpelev2\n * gfc.nb_2[chn][b])), ecb, pcfact);\n\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = ecb;\n }\n }\n for (; b <= Encoder.CBANDS; ++b) {\n eb_l[b] = 0;\n thr[b] = 0;\n }\n /* compute masking thresholds for long blocks */\n convert_partition2scalefac_l(gfc, eb_l, thr, chn);\n }\n /* end loop over chn */\n\n if (gfp.mode == MPEGMode.STEREO || gfp.mode == MPEGMode.JOINT_STEREO) {\n if (gfp.interChRatio > 0.0) {\n calc_interchannel_masking(gfp, gfp.interChRatio);\n }\n }\n\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n var msfix;\n msfix1(gfc);\n msfix = gfp.msfix;\n if (Math.abs(msfix) > 0.0)\n ns_msfix(gfc, msfix, gfp.ATHlower * gfc.ATH.adjust);\n }\n\n /***************************************************************\n * determine final block type\n ***************************************************************/\n block_type_set(gfp, uselongblock, blocktype_d, blocktype);\n\n /*********************************************************************\n * compute the value of PE to return ... no delay and advance\n *********************************************************************/\n for (chn = 0; chn < numchn; chn++) {\n var ppe;\n var ppePos = 0;\n var type;\n var mr;\n\n if (chn > 1) {\n ppe = percep_MS_entropy;\n ppePos = -2;\n type = Encoder.NORM_TYPE;\n if (blocktype_d[0] == Encoder.SHORT_TYPE\n || blocktype_d[1] == Encoder.SHORT_TYPE)\n type = Encoder.SHORT_TYPE;\n mr = masking_MS_ratio[gr_out][chn - 2];\n } else {\n ppe = percep_entropy;\n ppePos = 0;\n type = blocktype_d[chn];\n mr = masking_ratio[gr_out][chn];\n }\n\n if (type == Encoder.SHORT_TYPE)\n ppe[ppePos + chn] = pecalc_s(mr, gfc.masking_lower);\n else\n ppe[ppePos + chn] = pecalc_l(mr, gfc.masking_lower);\n\n if (gfp.analysis)\n gfc.pinfo.pe[gr_out][chn] = ppe[ppePos + chn];\n\n }\n return 0;\n }\n\n function vbrpsy_compute_fft_l(gfp, buffer, bufPos, chn, gr_out, fftenergy, wsamp_l, wsamp_lPos) {\n var gfc = gfp.internal_flags;\n if (chn < 2) {\n fft.fft_long(gfc, wsamp_l[wsamp_lPos], chn, buffer, bufPos);\n } else if (chn == 2) {\n /* FFT data for mid and side channel is derived from L & R */\n for (var j = Encoder.BLKSIZE - 1; j >= 0; --j) {\n var l = wsamp_l[wsamp_lPos + 0][j];\n var r = wsamp_l[wsamp_lPos + 1][j];\n wsamp_l[wsamp_lPos + 0][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_l[wsamp_lPos + 1][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy[0] = NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos + 0][0]);\n fftenergy[0] *= fftenergy[0];\n\n for (var j = Encoder.BLKSIZE / 2 - 1; j >= 0; --j) {\n var re = wsamp_l[wsamp_lPos + 0][Encoder.BLKSIZE / 2 - j];\n var im = wsamp_l[wsamp_lPos + 0][Encoder.BLKSIZE / 2 + j];\n fftenergy[Encoder.BLKSIZE / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n /* total energy */\n {\n var totalenergy = 0.0;\n for (var j = 11; j < Encoder.HBLKSIZE; j++)\n totalenergy += fftenergy[j];\n\n gfc.tot_ener[chn] = totalenergy;\n }\n\n if (gfp.analysis) {\n for (var j = 0; j < Encoder.HBLKSIZE; j++) {\n gfc.pinfo.energy[gr_out][chn][j] = gfc.pinfo.energy_save[chn][j];\n gfc.pinfo.energy_save[chn][j] = fftenergy[j];\n }\n gfc.pinfo.pe[gr_out][chn] = gfc.pe[chn];\n }\n }\n\n function vbrpsy_compute_fft_s(gfp, buffer, bufPos, chn, sblock, fftenergy_s, wsamp_s, wsamp_sPos) {\n var gfc = gfp.internal_flags;\n\n if (sblock == 0 && chn < 2) {\n fft.fft_short(gfc, wsamp_s[wsamp_sPos], chn, buffer, bufPos);\n }\n if (chn == 2) {\n /* FFT data for mid and side channel is derived from L & R */\n for (var j = Encoder.BLKSIZE_s - 1; j >= 0; --j) {\n var l = wsamp_s[wsamp_sPos + 0][sblock][j];\n var r = wsamp_s[wsamp_sPos + 1][sblock][j];\n wsamp_s[wsamp_sPos + 0][sblock][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_s[wsamp_sPos + 1][sblock][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy_s[sblock][0] = wsamp_s[wsamp_sPos + 0][sblock][0];\n fftenergy_s[sblock][0] *= fftenergy_s[sblock][0];\n for (var j = Encoder.BLKSIZE_s / 2 - 1; j >= 0; --j) {\n var re = wsamp_s[wsamp_sPos + 0][sblock][Encoder.BLKSIZE_s / 2 - j];\n var im = wsamp_s[wsamp_sPos + 0][sblock][Encoder.BLKSIZE_s / 2 + j];\n fftenergy_s[sblock][Encoder.BLKSIZE_s / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n }\n\n /**\n * compute loudness approximation (used for ATH auto-level adjustment)\n */\n function vbrpsy_compute_loudness_approximation_l(gfp, gr_out, chn, fftenergy) {\n var gfc = gfp.internal_flags;\n if (gfp.athaa_loudapprox == 2 && chn < 2) {\n // no loudness for mid/side ch\n gfc.loudness_sq[gr_out][chn] = gfc.loudness_sq_save[chn];\n gfc.loudness_sq_save[chn] = psycho_loudness_approx(fftenergy, gfc);\n }\n }\n\n var fircoef_ = [-8.65163e-18 * 2,\n -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2,\n -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2,\n 0.0931738 * 2, -5.52212e-17 * 2, -0.313819 * 2];\n\n /**\n * Apply HPF of fs/4 to the input signal. This is used for attack detection\n * / handling.\n */\n function vbrpsy_attack_detection(gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, energy, sub_short_factor, ns_attacks, uselongblock) {\n var ns_hpfsmpl = new_float_n([2, 576]);\n var gfc = gfp.internal_flags;\n var n_chn_out = gfc.channels_out;\n /* chn=2 and 3 = Mid and Side channels */\n var n_chn_psy = (gfp.mode == MPEGMode.JOINT_STEREO) ? 4 : n_chn_out;\n /* Don't copy the input buffer into a temporary buffer */\n /* unroll the loop 2 times */\n for (var chn = 0; chn < n_chn_out; chn++) {\n /* apply high pass filter of fs/4 */\n firbuf = buffer[chn];\n var firbufPos = bufPos + 576 - 350 - NSFIRLEN + 192;\n assert(fircoef_.length == ((NSFIRLEN - 1) / 2));\n for (var i = 0; i < 576; i++) {\n var sum1, sum2;\n sum1 = firbuf[firbufPos + i + 10];\n sum2 = 0.0;\n for (var j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) {\n sum1 += fircoef_[j]\n * (firbuf[firbufPos + i + j] + firbuf[firbufPos + i\n + NSFIRLEN - j]);\n sum2 += fircoef_[j + 1]\n * (firbuf[firbufPos + i + j + 1] + firbuf[firbufPos\n + i + NSFIRLEN - j - 1]);\n }\n ns_hpfsmpl[chn][i] = sum1 + sum2;\n }\n masking_ratio[gr_out][chn].en.assign(gfc.en[chn]);\n masking_ratio[gr_out][chn].thm.assign(gfc.thm[chn]);\n if (n_chn_psy > 2) {\n /* MS maskings */\n /* percep_MS_entropy [chn-2] = gfc . pe [chn]; */\n masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn + 2]);\n masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn + 2]);\n }\n }\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var attack_intensity = new_float(12);\n var en_subshort = new_float(12);\n var en_short = [0, 0, 0, 0];\n var pf = ns_hpfsmpl[chn & 1];\n var pfPos = 0;\n var attackThreshold = (chn == 3) ? gfc.nsPsy.attackthre_s\n : gfc.nsPsy.attackthre;\n var ns_uselongblock = 1;\n\n if (chn == 2) {\n for (var i = 0, j = 576; j > 0; ++i, --j) {\n var l = ns_hpfsmpl[0][i];\n var r = ns_hpfsmpl[1][i];\n ns_hpfsmpl[0][i] = l + r;\n ns_hpfsmpl[1][i] = l - r;\n }\n }\n /***************************************************************\n * determine the block type (window type)\n ***************************************************************/\n /* calculate energies of each sub-shortblocks */\n for (var i = 0; i < 3; i++) {\n en_subshort[i] = gfc.nsPsy.last_en_subshort[chn][i + 6];\n assert(gfc.nsPsy.last_en_subshort[chn][i + 4] > 0);\n attack_intensity[i] = en_subshort[i]\n / gfc.nsPsy.last_en_subshort[chn][i + 4];\n en_short[0] += en_subshort[i];\n }\n\n for (var i = 0; i < 9; i++) {\n var pfe = pfPos + 576 / 9;\n var p = 1.;\n for (; pfPos < pfe; pfPos++)\n if (p < Math.abs(pf[pfPos]))\n p = Math.abs(pf[pfPos]);\n\n gfc.nsPsy.last_en_subshort[chn][i] = en_subshort[i + 3] = p;\n en_short[1 + i / 3] += p;\n if (p > en_subshort[i + 3 - 2]) {\n assert(en_subshort[i + 3 - 2] > 0);\n p = p / en_subshort[i + 3 - 2];\n } else if (en_subshort[i + 3 - 2] > p * 10.0) {\n assert(p > 0);\n p = en_subshort[i + 3 - 2] / (p * 10.0);\n } else {\n p = 0.0;\n }\n attack_intensity[i + 3] = p;\n }\n /* pulse like signal detection for fatboy.wav and so on */\n for (var i = 0; i < 3; ++i) {\n var enn = en_subshort[i * 3 + 3]\n + en_subshort[i * 3 + 4] + en_subshort[i * 3 + 5];\n var factor = 1.;\n if (en_subshort[i * 3 + 5] * 6 < enn) {\n factor *= 0.5;\n if (en_subshort[i * 3 + 4] * 6 < enn) {\n factor *= 0.5;\n }\n }\n sub_short_factor[chn][i] = factor;\n }\n\n if (gfp.analysis) {\n var x = attack_intensity[0];\n for (var i = 1; i < 12; i++) {\n if (x < attack_intensity[i]) {\n x = attack_intensity[i];\n }\n }\n gfc.pinfo.ers[gr_out][chn] = gfc.pinfo.ers_save[chn];\n gfc.pinfo.ers_save[chn] = x;\n }\n\n /* compare energies between sub-shortblocks */\n for (var i = 0; i < 12; i++) {\n if (0 == ns_attacks[chn][i / 3]\n && attack_intensity[i] > attackThreshold) {\n ns_attacks[chn][i / 3] = (i % 3) + 1;\n }\n }\n\n /*\n * should have energy change between short blocks, in order to avoid\n * periodic signals\n */\n /* Good samples to show the effect are Trumpet test songs */\n /*\n * GB: tuned (1) to avoid too many short blocks for test sample\n * TRUMPET\n */\n /*\n * RH: tuned (2) to let enough short blocks through for test sample\n * FSOL and SNAPS\n */\n for (var i = 1; i < 4; i++) {\n var u = en_short[i - 1];\n var v = en_short[i];\n var m = Math.max(u, v);\n if (m < 40000) { /* (2) */\n if (u < 1.7 * v && v < 1.7 * u) { /* (1) */\n if (i == 1 && ns_attacks[chn][0] <= ns_attacks[chn][i]) {\n ns_attacks[chn][0] = 0;\n }\n ns_attacks[chn][i] = 0;\n }\n }\n }\n\n if (ns_attacks[chn][0] <= gfc.nsPsy.lastAttacks[chn]) {\n ns_attacks[chn][0] = 0;\n }\n\n if (gfc.nsPsy.lastAttacks[chn] == 3\n || (ns_attacks[chn][0] + ns_attacks[chn][1]\n + ns_attacks[chn][2] + ns_attacks[chn][3]) != 0) {\n ns_uselongblock = 0;\n\n if (ns_attacks[chn][1] != 0 && ns_attacks[chn][0] != 0) {\n ns_attacks[chn][1] = 0;\n }\n if (ns_attacks[chn][2] != 0 && ns_attacks[chn][1] != 0) {\n ns_attacks[chn][2] = 0;\n }\n if (ns_attacks[chn][3] != 0 && ns_attacks[chn][2] != 0) {\n ns_attacks[chn][3] = 0;\n }\n }\n if (chn < 2) {\n uselongblock[chn] = ns_uselongblock;\n } else {\n if (ns_uselongblock == 0) {\n uselongblock[0] = uselongblock[1] = 0;\n }\n }\n\n /*\n * there is a one granule delay. Copy maskings computed last call\n * into masking_ratio to return to calling program.\n */\n energy[chn] = gfc.tot_ener[chn];\n }\n }\n\n function vbrpsy_skip_masking_s(gfc, chn, sblock) {\n if (sblock == 0) {\n for (var b = 0; b < gfc.npart_s; b++) {\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = 0;\n }\n }\n }\n\n function vbrpsy_skip_masking_l(gfc, chn) {\n for (var b = 0; b < gfc.npart_l; b++) {\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = 0;\n }\n }\n\n function psyvbr_calc_mask_index_s(gfc, max, avg, mask_idx) {\n var last_tab_entry = tab.length - 1;\n var b = 0;\n var a = avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n\n for (b = 1; b < gfc.npart_s - 1; b++) {\n a = avg[b - 1] + avg[b] + avg[b + 1];\n assert(b + 1 < gfc.npart_s);\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_s[b - 1] + gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1) > 0);\n a = 20.0\n * (m * 3.0 - a)\n / (a * (gfc.numlines_s[b - 1] + gfc.numlines_s[b]\n + gfc.numlines_s[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n }\n assert(b > 0);\n assert(b == gfc.npart_s - 1);\n\n a = avg[b - 1] + avg[b];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n assert((gfc.numlines_s[b - 1] + gfc.numlines_s[b] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_s[b - 1] + gfc.numlines_s[b] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n assert(b == (gfc.npart_s - 1));\n }\n\n function vbrpsy_compute_masking_s(gfp, fftenergy_s, eb, thr, chn, sblock) {\n var gfc = gfp.internal_flags;\n var max = new float[Encoder.CBANDS], avg = new_float(Encoder.CBANDS);\n var i, j, b;\n var mask_idx_s = new int[Encoder.CBANDS];\n\n for (b = j = 0; b < gfc.npart_s; ++b) {\n var ebb = 0, m = 0;\n var n = gfc.numlines_s[b];\n for (i = 0; i < n; ++i, ++j) {\n var el = fftenergy_s[sblock][j];\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n assert(ebb >= 0);\n max[b] = m;\n assert(n > 0);\n avg[b] = ebb / n;\n assert(avg[b] >= 0);\n }\n assert(b == gfc.npart_s);\n assert(j == 129);\n for (; b < Encoder.CBANDS; ++b) {\n max[b] = 0;\n avg[b] = 0;\n }\n psyvbr_calc_mask_index_s(gfc, max, avg, mask_idx_s);\n for (j = b = 0; b < gfc.npart_s; b++) {\n var kk = gfc.s3ind_s[b][0];\n var last = gfc.s3ind_s[b][1];\n var dd, dd_n;\n var x, ecb, avg_mask;\n dd = mask_idx_s[kk];\n dd_n = 1;\n ecb = gfc.s3_ss[j] * eb[kk] * tab[mask_idx_s[kk]];\n ++j;\n ++kk;\n while (kk <= last) {\n dd += mask_idx_s[kk];\n dd_n += 1;\n x = gfc.s3_ss[j] * eb[kk] * tab[mask_idx_s[kk]];\n ecb = vbrpsy_mask_add(ecb, x, kk - b);\n ++j;\n ++kk;\n }\n dd = (1 + 2 * dd) / (2 * dd_n);\n avg_mask = tab[dd] * 0.5;\n ecb *= avg_mask;\n thr[b] = ecb;\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = ecb;\n {\n /*\n * if THR exceeds EB, the quantization routines will take the\n * difference from other bands. in case of strong tonal samples\n * (tonaltest.wav) this leads to heavy distortions. that's why\n * we limit THR here.\n */\n x = max[b];\n x *= gfc.minval_s[b];\n x *= avg_mask;\n if (thr[b] > x) {\n thr[b] = x;\n }\n }\n if (gfc.masking_lower > 1) {\n thr[b] *= gfc.masking_lower;\n }\n if (thr[b] > eb[b]) {\n thr[b] = eb[b];\n }\n if (gfc.masking_lower < 1) {\n thr[b] *= gfc.masking_lower;\n }\n\n assert(thr[b] >= 0);\n }\n for (; b < Encoder.CBANDS; ++b) {\n eb[b] = 0;\n thr[b] = 0;\n }\n }\n\n function vbrpsy_compute_masking_l(gfc, fftenergy, eb_l, thr, chn) {\n var max = new_float(Encoder.CBANDS), avg = new_float(Encoder.CBANDS);\n var mask_idx_l = new_int(Encoder.CBANDS + 2);\n var b;\n\n /*********************************************************************\n * Calculate the energy and the tonality of each partition.\n *********************************************************************/\n calc_energy(gfc, fftenergy, eb_l, max, avg);\n calc_mask_index_l(gfc, max, avg, mask_idx_l);\n\n /*********************************************************************\n * convolve the partitioned energy and unpredictability with the\n * spreading function, s3_l[b][k]\n ********************************************************************/\n var k = 0;\n for (b = 0; b < gfc.npart_l; b++) {\n var x, ecb, avg_mask, t;\n /* convolve the partitioned energy with the spreading function */\n var kk = gfc.s3ind[b][0];\n var last = gfc.s3ind[b][1];\n var dd = 0, dd_n = 0;\n dd = mask_idx_l[kk];\n dd_n += 1;\n ecb = gfc.s3_ll[k] * eb_l[kk] * tab[mask_idx_l[kk]];\n ++k;\n ++kk;\n while (kk <= last) {\n dd += mask_idx_l[kk];\n dd_n += 1;\n x = gfc.s3_ll[k] * eb_l[kk] * tab[mask_idx_l[kk]];\n t = vbrpsy_mask_add(ecb, x, kk - b);\n ecb = t;\n ++k;\n ++kk;\n }\n dd = (1 + 2 * dd) / (2 * dd_n);\n avg_mask = tab[dd] * 0.5;\n ecb *= avg_mask;\n\n /**** long block pre-echo control ****/\n /**\n *
\n             * dont use long block pre-echo control if previous granule was\n             * a short block.  This is to avoid the situation:\n             * frame0:  quiet (very low masking)\n             * frame1:  surge  (triggers short blocks)\n             * frame2:  regular frame.  looks like pre-echo when compared to\n             *          frame0, but all pre-echo was in frame1.\n             * 
\n */\n /*\n * chn=0,1 L and R channels chn=2,3 S and M channels.\n */\n if (gfc.blocktype_old[chn & 0x01] == Encoder.SHORT_TYPE) {\n var ecb_limit = rpelev * gfc.nb_1[chn][b];\n if (ecb_limit > 0) {\n thr[b] = Math.min(ecb, ecb_limit);\n } else {\n /**\n *
\n                     * Robert 071209:\n                     * Because we don't calculate long block psy when we know a granule\n                     * should be of short blocks, we don't have any clue how the granule\n                     * before would have looked like as a long block. So we have to guess\n                     * a little bit for this END_TYPE block.\n                     * Most of the time we get away with this sloppyness. (fingers crossed :)\n                     * The speed increase is worth it.\n                     * 
\n */\n thr[b] = Math.min(ecb, eb_l[b] * NS_PREECHO_ATT2);\n }\n } else {\n var ecb_limit_2 = rpelev2 * gfc.nb_2[chn][b];\n var ecb_limit_1 = rpelev * gfc.nb_1[chn][b];\n var ecb_limit;\n if (ecb_limit_2 <= 0) {\n ecb_limit_2 = ecb;\n }\n if (ecb_limit_1 <= 0) {\n ecb_limit_1 = ecb;\n }\n if (gfc.blocktype_old[chn & 0x01] == Encoder.NORM_TYPE) {\n ecb_limit = Math.min(ecb_limit_1, ecb_limit_2);\n } else {\n ecb_limit = ecb_limit_1;\n }\n thr[b] = Math.min(ecb, ecb_limit);\n }\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = ecb;\n {\n /*\n * if THR exceeds EB, the quantization routines will take the\n * difference from other bands. in case of strong tonal samples\n * (tonaltest.wav) this leads to heavy distortions. that's why\n * we limit THR here.\n */\n x = max[b];\n x *= gfc.minval_l[b];\n x *= avg_mask;\n if (thr[b] > x) {\n thr[b] = x;\n }\n }\n if (gfc.masking_lower > 1) {\n thr[b] *= gfc.masking_lower;\n }\n if (thr[b] > eb_l[b]) {\n thr[b] = eb_l[b];\n }\n if (gfc.masking_lower < 1) {\n thr[b] *= gfc.masking_lower;\n }\n assert(thr[b] >= 0);\n }\n for (; b < Encoder.CBANDS; ++b) {\n eb_l[b] = 0;\n thr[b] = 0;\n }\n }\n\n function vbrpsy_compute_block_type(gfp, uselongblock) {\n var gfc = gfp.internal_flags;\n\n if (gfp.short_blocks == ShortBlock.short_block_coupled\n /* force both channels to use the same block type */\n /* this is necessary if the frame is to be encoded in ms_stereo. */\n /* But even without ms_stereo, FhG does this */\n && !(uselongblock[0] != 0 && uselongblock[1] != 0))\n uselongblock[0] = uselongblock[1] = 0;\n\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n /* disable short blocks */\n if (gfp.short_blocks == ShortBlock.short_block_dispensed) {\n uselongblock[chn] = 1;\n }\n if (gfp.short_blocks == ShortBlock.short_block_forced) {\n uselongblock[chn] = 0;\n }\n }\n }\n\n function vbrpsy_apply_block_type(gfp, uselongblock, blocktype_d) {\n var gfc = gfp.internal_flags;\n\n /*\n * update the blocktype of the previous granule, since it depends on\n * what happend in this granule\n */\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n var blocktype = Encoder.NORM_TYPE;\n /* disable short blocks */\n\n if (uselongblock[chn] != 0) {\n /* no attack : use long blocks */\n assert(gfc.blocktype_old[chn] != Encoder.START_TYPE);\n if (gfc.blocktype_old[chn] == Encoder.SHORT_TYPE)\n blocktype = Encoder.STOP_TYPE;\n } else {\n /* attack : use short blocks */\n blocktype = Encoder.SHORT_TYPE;\n if (gfc.blocktype_old[chn] == Encoder.NORM_TYPE) {\n gfc.blocktype_old[chn] = Encoder.START_TYPE;\n }\n if (gfc.blocktype_old[chn] == Encoder.STOP_TYPE)\n gfc.blocktype_old[chn] = Encoder.SHORT_TYPE;\n }\n\n blocktype_d[chn] = gfc.blocktype_old[chn];\n // value returned to calling program\n gfc.blocktype_old[chn] = blocktype;\n // save for next call to l3psy_anal\n }\n }\n\n /**\n * compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper\n */\n function vbrpsy_compute_MS_thresholds(eb, thr, cb_mld, ath_cb, athadjust, msfix, n) {\n var msfix2 = msfix * 2;\n var athlower = msfix > 0 ? Math.pow(10, athadjust) : 1;\n var rside, rmid;\n for (var b = 0; b < n; ++b) {\n var ebM = eb[2][b];\n var ebS = eb[3][b];\n var thmL = thr[0][b];\n var thmR = thr[1][b];\n var thmM = thr[2][b];\n var thmS = thr[3][b];\n\n /* use this fix if L & R masking differs by 2db or less */\n if (thmL <= 1.58 * thmR && thmR <= 1.58 * thmL) {\n var mld_m = cb_mld[b] * ebS;\n var mld_s = cb_mld[b] * ebM;\n rmid = Math.max(thmM, Math.min(thmS, mld_m));\n rside = Math.max(thmS, Math.min(thmM, mld_s));\n } else {\n rmid = thmM;\n rside = thmS;\n }\n if (msfix > 0) {\n /***************************************************************/\n /* Adjust M/S maskings if user set \"msfix\" */\n /***************************************************************/\n /* Naoki Shibata 2000 */\n var thmLR, thmMS;\n var ath = ath_cb[b] * athlower;\n thmLR = Math.min(Math.max(thmL, ath), Math.max(thmR, ath));\n thmM = Math.max(rmid, ath);\n thmS = Math.max(rside, ath);\n thmMS = thmM + thmS;\n if (thmMS > 0 && (thmLR * msfix2) < thmMS) {\n var f = thmLR * msfix2 / thmMS;\n thmM *= f;\n thmS *= f;\n assert(thmMS > 0);\n }\n rmid = Math.min(thmM, rmid);\n rside = Math.min(thmS, rside);\n }\n if (rmid > ebM) {\n rmid = ebM;\n }\n if (rside > ebS) {\n rside = ebS;\n }\n thr[2][b] = rmid;\n thr[3][b] = rside;\n }\n }\n\n this.L3psycho_anal_vbr = function (gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, percep_entropy, percep_MS_entropy, energy, blocktype_d) {\n var gfc = gfp.internal_flags;\n\n /* fft and energy calculation */\n var wsamp_l;\n var wsamp_s;\n var fftenergy = new_float(Encoder.HBLKSIZE);\n var fftenergy_s = new_float_n([3, Encoder.HBLKSIZE_s]);\n var wsamp_L = new_float_n([2, Encoder.BLKSIZE]);\n var wsamp_S = new_float_n([2, 3, Encoder.BLKSIZE_s]);\n var eb = new_float_n([4, Encoder.CBANDS]), thr = new_float_n([4, Encoder.CBANDS]);\n var sub_short_factor = new_float_n([4, 3]);\n var pcfact = 0.6;\n\n /* block type */\n var ns_attacks = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0],\n [0, 0, 0, 0]];\n var uselongblock = new_int(2);\n\n /* usual variables like loop indices, etc.. */\n\n /* chn=2 and 3 = Mid and Side channels */\n var n_chn_psy = (gfp.mode == MPEGMode.JOINT_STEREO) ? 4\n : gfc.channels_out;\n\n vbrpsy_attack_detection(gfp, buffer, bufPos, gr_out, masking_ratio,\n masking_MS_ratio, energy, sub_short_factor, ns_attacks,\n uselongblock);\n\n vbrpsy_compute_block_type(gfp, uselongblock);\n\n /* LONG BLOCK CASE */\n {\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n wsamp_l = wsamp_L;\n vbrpsy_compute_fft_l(gfp, buffer, bufPos, chn, gr_out,\n fftenergy, wsamp_l, ch01);\n\n vbrpsy_compute_loudness_approximation_l(gfp, gr_out, chn,\n fftenergy);\n\n if (uselongblock[ch01] != 0) {\n vbrpsy_compute_masking_l(gfc, fftenergy, eb[chn], thr[chn],\n chn);\n } else {\n vbrpsy_skip_masking_l(gfc, chn);\n }\n }\n if ((uselongblock[0] + uselongblock[1]) == 2) {\n /* M/S channel */\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n vbrpsy_compute_MS_thresholds(eb, thr, gfc.mld_cb_l,\n gfc.ATH.cb_l, gfp.ATHlower * gfc.ATH.adjust,\n gfp.msfix, gfc.npart_l);\n }\n }\n /* TODO: apply adaptive ATH masking here ?? */\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n if (uselongblock[ch01] != 0) {\n convert_partition2scalefac_l(gfc, eb[chn], thr[chn], chn);\n }\n }\n }\n\n /* SHORT BLOCKS CASE */\n {\n for (var sblock = 0; sblock < 3; sblock++) {\n for (var chn = 0; chn < n_chn_psy; ++chn) {\n var ch01 = chn & 0x01;\n\n if (uselongblock[ch01] != 0) {\n vbrpsy_skip_masking_s(gfc, chn, sblock);\n } else {\n /* compute masking thresholds for short blocks */\n wsamp_s = wsamp_S;\n vbrpsy_compute_fft_s(gfp, buffer, bufPos, chn, sblock,\n fftenergy_s, wsamp_s, ch01);\n vbrpsy_compute_masking_s(gfp, fftenergy_s, eb[chn],\n thr[chn], chn, sblock);\n }\n }\n if ((uselongblock[0] + uselongblock[1]) == 0) {\n /* M/S channel */\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n vbrpsy_compute_MS_thresholds(eb, thr, gfc.mld_cb_s,\n gfc.ATH.cb_s, gfp.ATHlower * gfc.ATH.adjust,\n gfp.msfix, gfc.npart_s);\n }\n /* L/R channel */\n }\n /* TODO: apply adaptive ATH masking here ?? */\n for (var chn = 0; chn < n_chn_psy; ++chn) {\n var ch01 = chn & 0x01;\n if (0 == uselongblock[ch01]) {\n convert_partition2scalefac_s(gfc, eb[chn], thr[chn],\n chn, sblock);\n }\n }\n }\n\n /**** short block pre-echo control ****/\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n\n if (uselongblock[ch01] != 0) {\n continue;\n }\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n var new_thmm = new_float(3);\n for (var sblock = 0; sblock < 3; sblock++) {\n var thmm = gfc.thm[chn].s[sb][sblock];\n thmm *= NS_PREECHO_ATT0;\n\n if (ns_attacks[chn][sblock] >= 2\n || ns_attacks[chn][sblock + 1] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT1 * pcfact);\n thmm = Math.min(thmm, p);\n } else if (ns_attacks[chn][sblock] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n } else if ((sblock != 0 && ns_attacks[chn][sblock - 1] == 3)\n || (sblock == 0 && gfc.nsPsy.lastAttacks[chn] == 3)) {\n var idx = (sblock != 2) ? sblock + 1 : 0;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n /* pulse like signal detection for fatboy.wav and so on */\n thmm *= sub_short_factor[chn][sblock];\n\n new_thmm[sblock] = thmm;\n }\n for (var sblock = 0; sblock < 3; sblock++) {\n gfc.thm[chn].s[sb][sblock] = new_thmm[sblock];\n }\n }\n }\n }\n for (var chn = 0; chn < n_chn_psy; chn++) {\n gfc.nsPsy.lastAttacks[chn] = ns_attacks[chn][2];\n }\n\n /***************************************************************\n * determine final block type\n ***************************************************************/\n vbrpsy_apply_block_type(gfp, uselongblock, blocktype_d);\n\n /*********************************************************************\n * compute the value of PE to return ... no delay and advance\n *********************************************************************/\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ppe;\n var ppePos;\n var type;\n var mr;\n\n if (chn > 1) {\n ppe = percep_MS_entropy;\n ppePos = -2;\n type = Encoder.NORM_TYPE;\n if (blocktype_d[0] == Encoder.SHORT_TYPE\n || blocktype_d[1] == Encoder.SHORT_TYPE)\n type = Encoder.SHORT_TYPE;\n mr = masking_MS_ratio[gr_out][chn - 2];\n } else {\n ppe = percep_entropy;\n ppePos = 0;\n type = blocktype_d[chn];\n mr = masking_ratio[gr_out][chn];\n }\n\n if (type == Encoder.SHORT_TYPE) {\n ppe[ppePos + chn] = pecalc_s(mr, gfc.masking_lower);\n } else {\n ppe[ppePos + chn] = pecalc_l(mr, gfc.masking_lower);\n }\n\n if (gfp.analysis) {\n gfc.pinfo.pe[gr_out][chn] = ppe[ppePos + chn];\n }\n }\n return 0;\n }\n\n function s3_func_x(bark, hf_slope) {\n var tempx = bark, tempy;\n\n if (tempx >= 0) {\n tempy = -tempx * 27;\n } else {\n tempy = tempx * hf_slope;\n }\n if (tempy <= -72.0) {\n return 0;\n }\n return Math.exp(tempy * LN_TO_LOG10);\n }\n\n function norm_s3_func_x(hf_slope) {\n var lim_a = 0, lim_b = 0;\n {\n var x = 0, l, h;\n for (x = 0; s3_func_x(x, hf_slope) > 1e-20; x -= 1)\n ;\n l = x;\n h = 0;\n while (Math.abs(h - l) > 1e-12) {\n x = (h + l) / 2;\n if (s3_func_x(x, hf_slope) > 0) {\n h = x;\n } else {\n l = x;\n }\n }\n lim_a = l;\n }\n {\n var x = 0, l, h;\n for (x = 0; s3_func_x(x, hf_slope) > 1e-20; x += 1)\n ;\n l = 0;\n h = x;\n while (Math.abs(h - l) > 1e-12) {\n x = (h + l) / 2;\n if (s3_func_x(x, hf_slope) > 0) {\n l = x;\n } else {\n h = x;\n }\n }\n lim_b = h;\n }\n {\n var sum = 0;\n var m = 1000;\n var i;\n for (i = 0; i <= m; ++i) {\n var x = lim_a + i * (lim_b - lim_a) / m;\n var y = s3_func_x(x, hf_slope);\n sum += y;\n }\n {\n var norm = (m + 1) / (sum * (lim_b - lim_a));\n /* printf( \"norm = %lf\\n\",norm); */\n return norm;\n }\n }\n }\n\n /**\n * The spreading function. Values returned in units of energy\n */\n function s3_func(bark) {\n var tempx, x, tempy, temp;\n tempx = bark;\n if (tempx >= 0)\n tempx *= 3;\n else\n tempx *= 1.5;\n\n if (tempx >= 0.5 && tempx <= 2.5) {\n temp = tempx - 0.5;\n x = 8.0 * (temp * temp - 2.0 * temp);\n } else\n x = 0.0;\n tempx += 0.474;\n tempy = 15.811389 + 7.5 * tempx - 17.5\n * Math.sqrt(1.0 + tempx * tempx);\n\n if (tempy <= -60.0)\n return 0.0;\n\n tempx = Math.exp((x + tempy) * LN_TO_LOG10);\n\n /**\n *
\n         * Normalization.  The spreading function should be normalized so that:\n         * +inf\n         * /\n         * |  s3 [ bark ]  d(bark)   =  1\n         * /\n         * -inf\n         * 
\n */\n tempx /= .6609193;\n return tempx;\n }\n\n /**\n * see for example \"Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7\n */\n function freq2bark(freq) {\n /* input: freq in hz output: barks */\n if (freq < 0)\n freq = 0;\n freq = freq * 0.001;\n return 13.0 * Math.atan(.76 * freq) + 3.5\n * Math.atan(freq * freq / (7.5 * 7.5));\n }\n\n function init_numline(numlines, bo, bm, bval, bval_width, mld, bo_w, sfreq, blksize, scalepos, deltafreq, sbmax) {\n var b_frq = new_float(Encoder.CBANDS + 1);\n var sample_freq_frac = sfreq / (sbmax > 15 ? 2 * 576 : 2 * 192);\n var partition = new_int(Encoder.HBLKSIZE);\n var i;\n sfreq /= blksize;\n var j = 0;\n var ni = 0;\n /* compute numlines, the number of spectral lines in each partition band */\n /* each partition band should be about DELBARK wide. */\n for (i = 0; i < Encoder.CBANDS; i++) {\n var bark1;\n var j2;\n bark1 = freq2bark(sfreq * j);\n\n b_frq[i] = sfreq * j;\n\n for (j2 = j; freq2bark(sfreq * j2) - bark1 < DELBARK\n && j2 <= blksize / 2; j2++)\n ;\n\n numlines[i] = j2 - j;\n ni = i + 1;\n\n while (j < j2) {\n assert(j < Encoder.HBLKSIZE);\n partition[j++] = i;\n }\n if (j > blksize / 2) {\n j = blksize / 2;\n ++i;\n break;\n }\n }\n assert(i < Encoder.CBANDS);\n b_frq[i] = sfreq * j;\n\n for (var sfb = 0; sfb < sbmax; sfb++) {\n var i1, i2, start, end;\n var arg;\n start = scalepos[sfb];\n end = scalepos[sfb + 1];\n\n i1 = 0 | Math.floor(.5 + deltafreq * (start - .5));\n if (i1 < 0)\n i1 = 0;\n i2 = 0 | Math.floor(.5 + deltafreq * (end - .5));\n\n if (i2 > blksize / 2)\n i2 = blksize / 2;\n\n bm[sfb] = (partition[i1] + partition[i2]) / 2;\n bo[sfb] = partition[i2];\n var f_tmp = sample_freq_frac * end;\n /*\n * calculate how much of this band belongs to current scalefactor\n * band\n */\n bo_w[sfb] = (f_tmp - b_frq[bo[sfb]])\n / (b_frq[bo[sfb] + 1] - b_frq[bo[sfb]]);\n if (bo_w[sfb] < 0) {\n bo_w[sfb] = 0;\n } else {\n if (bo_w[sfb] > 1) {\n bo_w[sfb] = 1;\n }\n }\n /* setup stereo demasking thresholds */\n /* formula reverse enginerred from plot in paper */\n arg = freq2bark(sfreq * scalepos[sfb] * deltafreq);\n arg = ( Math.min(arg, 15.5) / 15.5);\n\n mld[sfb] = Math.pow(10.0,\n 1.25 * (1 - Math.cos(Math.PI * arg)) - 2.5);\n }\n\n /* compute bark values of each critical band */\n j = 0;\n for (var k = 0; k < ni; k++) {\n var w = numlines[k];\n var bark1, bark2;\n\n bark1 = freq2bark(sfreq * (j));\n bark2 = freq2bark(sfreq * (j + w - 1));\n bval[k] = .5 * (bark1 + bark2);\n\n bark1 = freq2bark(sfreq * (j - .5));\n bark2 = freq2bark(sfreq * (j + w - .5));\n bval_width[k] = bark2 - bark1;\n j += w;\n }\n\n return ni;\n }\n\n function init_s3_values(s3ind, npart, bval, bval_width, norm, use_old_s3) {\n var s3 = new_float_n([Encoder.CBANDS, Encoder.CBANDS]);\n /*\n * The s3 array is not linear in the bark scale.\n *\n * bval[x] should be used to get the bark value.\n */\n var j;\n var numberOfNoneZero = 0;\n\n /**\n *
\n         * s[i][j], the value of the spreading function,\n         * centered at band j (masker), for band i (maskee)\n         *\n         * i.e.: sum over j to spread into signal barkval=i\n         * NOTE: i and j are used opposite as in the ISO docs\n         * 
\n */\n if (use_old_s3) {\n for (var i = 0; i < npart; i++) {\n for (j = 0; j < npart; j++) {\n var v = s3_func(bval[i] - bval[j]) * bval_width[j];\n s3[i][j] = v * norm[i];\n }\n }\n } else {\n for (j = 0; j < npart; j++) {\n var hf_slope = 15 + Math.min(21 / bval[j], 12);\n var s3_x_norm = norm_s3_func_x(hf_slope);\n for (var i = 0; i < npart; i++) {\n var v = s3_x_norm\n * s3_func_x(bval[i] - bval[j], hf_slope)\n * bval_width[j];\n s3[i][j] = v * norm[i];\n }\n }\n }\n for (var i = 0; i < npart; i++) {\n for (j = 0; j < npart; j++) {\n if (s3[i][j] > 0.0)\n break;\n }\n s3ind[i][0] = j;\n\n for (j = npart - 1; j > 0; j--) {\n if (s3[i][j] > 0.0)\n break;\n }\n s3ind[i][1] = j;\n numberOfNoneZero += (s3ind[i][1] - s3ind[i][0] + 1);\n }\n\n var p = new_float(numberOfNoneZero);\n var k = 0;\n for (var i = 0; i < npart; i++)\n for (j = s3ind[i][0]; j <= s3ind[i][1]; j++)\n p[k++] = s3[i][j];\n\n return p;\n }\n\n function stereo_demask(f) {\n /* setup stereo demasking thresholds */\n /* formula reverse enginerred from plot in paper */\n var arg = freq2bark(f);\n arg = (Math.min(arg, 15.5) / 15.5);\n\n return Math.pow(10.0,\n 1.25 * (1 - Math.cos(Math.PI * arg)) - 2.5);\n }\n\n /**\n * NOTE: the bitrate reduction from the inter-channel masking effect is low\n * compared to the chance of getting annyoing artefacts. L3psycho_anal_vbr\n * does not use this feature. (Robert 071216)\n */\n this.psymodel_init = function (gfp) {\n var gfc = gfp.internal_flags;\n var i;\n var useOldS3 = true;\n var bvl_a = 13, bvl_b = 24;\n var snr_l_a = 0, snr_l_b = 0;\n var snr_s_a = -8.25, snr_s_b = -4.5;\n var bval = new_float(Encoder.CBANDS);\n var bval_width = new_float(Encoder.CBANDS);\n var norm = new_float(Encoder.CBANDS);\n var sfreq = gfp.out_samplerate;\n\n switch (gfp.experimentalZ) {\n default:\n case 0:\n useOldS3 = true;\n break;\n case 1:\n useOldS3 = (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) ? false\n : true;\n break;\n case 2:\n useOldS3 = false;\n break;\n case 3:\n bvl_a = 8;\n snr_l_a = -1.75;\n snr_l_b = -0.0125;\n snr_s_a = -8.25;\n snr_s_b = -2.25;\n break;\n }\n gfc.ms_ener_ratio_old = .25;\n gfc.blocktype_old[0] = gfc.blocktype_old[1] = Encoder.NORM_TYPE;\n // the vbr header is long blocks\n\n for (i = 0; i < 4; ++i) {\n for (var j = 0; j < Encoder.CBANDS; ++j) {\n gfc.nb_1[i][j] = 1e20;\n gfc.nb_2[i][j] = 1e20;\n gfc.nb_s1[i][j] = gfc.nb_s2[i][j] = 1.0;\n }\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n gfc.en[i].l[sb] = 1e20;\n gfc.thm[i].l[sb] = 1e20;\n }\n for (var j = 0; j < 3; ++j) {\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n gfc.en[i].s[sb][j] = 1e20;\n gfc.thm[i].s[sb][j] = 1e20;\n }\n gfc.nsPsy.lastAttacks[i] = 0;\n }\n for (var j = 0; j < 9; j++)\n gfc.nsPsy.last_en_subshort[i][j] = 10.;\n }\n\n /* init. for loudness approx. -jd 2001 mar 27 */\n gfc.loudness_sq_save[0] = gfc.loudness_sq_save[1] = 0.0;\n\n /*************************************************************************\n * now compute the psychoacoustic model specific constants\n ************************************************************************/\n /* compute numlines, bo, bm, bval, bval_width, mld */\n\n gfc.npart_l = init_numline(gfc.numlines_l, gfc.bo_l, gfc.bm_l, bval,\n bval_width, gfc.mld_l, gfc.PSY.bo_l_weight, sfreq,\n Encoder.BLKSIZE, gfc.scalefac_band.l, Encoder.BLKSIZE\n / (2.0 * 576), Encoder.SBMAX_l);\n assert(gfc.npart_l < Encoder.CBANDS);\n /* compute the spreading function */\n for (i = 0; i < gfc.npart_l; i++) {\n var snr = snr_l_a;\n if (bval[i] >= bvl_a) {\n snr = snr_l_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) + snr_l_a\n * (bvl_b - bval[i]) / (bvl_b - bvl_a);\n }\n norm[i] = Math.pow(10.0, snr / 10.0);\n if (gfc.numlines_l[i] > 0) {\n gfc.rnumlines_l[i] = 1.0 / gfc.numlines_l[i];\n } else {\n gfc.rnumlines_l[i] = 0;\n }\n }\n gfc.s3_ll = init_s3_values(gfc.s3ind, gfc.npart_l, bval, bval_width,\n norm, useOldS3);\n\n /* compute long block specific values, ATH and MINVAL */\n var j = 0;\n for (i = 0; i < gfc.npart_l; i++) {\n var x;\n\n /* ATH */\n x = Float.MAX_VALUE;\n for (var k = 0; k < gfc.numlines_l[i]; k++, j++) {\n var freq = sfreq * j / (1000.0 * Encoder.BLKSIZE);\n var level;\n /*\n * ATH below 100 Hz constant, not further climbing\n */\n level = this.ATHformula(freq * 1000, gfp) - 20;\n // scale to FFT units; returned value is in dB\n level = Math.pow(10., 0.1 * level);\n // convert from dB . energy\n level *= gfc.numlines_l[i];\n if (x > level)\n x = level;\n }\n gfc.ATH.cb_l[i] = x;\n\n /*\n * MINVAL. For low freq, the strength of the masking is limited by\n * minval this is an ISO MPEG1 thing, dont know if it is really\n * needed\n */\n /*\n * FIXME: it does work to reduce low-freq problems in S53-Wind-Sax\n * and lead-voice samples, but introduces some 3 kbps bit bloat too.\n * TODO: Further refinement of the shape of this hack.\n */\n x = -20 + bval[i] * 20 / 10;\n if (x > 6) {\n x = 100;\n }\n if (x < -15) {\n x = -15;\n }\n x -= 8.;\n gfc.minval_l[i] = (Math.pow(10.0, x / 10.) * gfc.numlines_l[i]);\n }\n\n /************************************************************************\n * do the same things for short blocks\n ************************************************************************/\n gfc.npart_s = init_numline(gfc.numlines_s, gfc.bo_s, gfc.bm_s, bval,\n bval_width, gfc.mld_s, gfc.PSY.bo_s_weight, sfreq,\n Encoder.BLKSIZE_s, gfc.scalefac_band.s, Encoder.BLKSIZE_s\n / (2.0 * 192), Encoder.SBMAX_s);\n assert(gfc.npart_s < Encoder.CBANDS);\n\n /* SNR formula. short block is normalized by SNR. is it still right ? */\n j = 0;\n for (i = 0; i < gfc.npart_s; i++) {\n var x;\n var snr = snr_s_a;\n if (bval[i] >= bvl_a) {\n snr = snr_s_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) + snr_s_a\n * (bvl_b - bval[i]) / (bvl_b - bvl_a);\n }\n norm[i] = Math.pow(10.0, snr / 10.0);\n\n /* ATH */\n x = Float.MAX_VALUE;\n for (var k = 0; k < gfc.numlines_s[i]; k++, j++) {\n var freq = sfreq * j / (1000.0 * Encoder.BLKSIZE_s);\n var level;\n /* freq = Min(.1,freq); */\n /*\n * ATH below 100 Hz constant, not\n * further climbing\n */\n level = this.ATHformula(freq * 1000, gfp) - 20;\n // scale to FFT units; returned value is in dB\n level = Math.pow(10., 0.1 * level);\n // convert from dB . energy\n level *= gfc.numlines_s[i];\n if (x > level)\n x = level;\n }\n gfc.ATH.cb_s[i] = x;\n\n /*\n * MINVAL. For low freq, the strength of the masking is limited by\n * minval this is an ISO MPEG1 thing, dont know if it is really\n * needed\n */\n x = (-7.0 + bval[i] * 7.0 / 12.0);\n if (bval[i] > 12) {\n x *= 1 + Math.log(1 + x) * 3.1;\n }\n if (bval[i] < 12) {\n x *= 1 + Math.log(1 - x) * 2.3;\n }\n if (x < -15) {\n x = -15;\n }\n x -= 8;\n gfc.minval_s[i] = Math.pow(10.0, x / 10)\n * gfc.numlines_s[i];\n }\n\n gfc.s3_ss = init_s3_values(gfc.s3ind_s, gfc.npart_s, bval, bval_width,\n norm, useOldS3);\n\n init_mask_add_max_values();\n fft.init_fft(gfc);\n\n /* setup temporal masking */\n gfc.decay = Math.exp(-1.0 * LOG10\n / (temporalmask_sustain_sec * sfreq / 192.0));\n\n {\n var msfix;\n msfix = NS_MSFIX;\n if ((gfp.exp_nspsytune & 2) != 0)\n msfix = 1.0;\n if (Math.abs(gfp.msfix) > 0.0)\n msfix = gfp.msfix;\n gfp.msfix = msfix;\n\n /*\n * spread only from npart_l bands. Normally, we use the spreading\n * function to convolve from npart_l down to npart_l bands\n */\n for (var b = 0; b < gfc.npart_l; b++)\n if (gfc.s3ind[b][1] > gfc.npart_l - 1)\n gfc.s3ind[b][1] = gfc.npart_l - 1;\n }\n\n /*\n * prepare for ATH auto adjustment: we want to decrease the ATH by 12 dB\n * per second\n */\n var frame_duration = (576. * gfc.mode_gr / sfreq);\n gfc.ATH.decay = Math.pow(10., -12. / 10. * frame_duration);\n gfc.ATH.adjust = 0.01;\n /* minimum, for leading low loudness */\n gfc.ATH.adjustLimit = 1.0;\n /* on lead, allow adjust up to maximum */\n\n assert(gfc.bo_l[Encoder.SBMAX_l - 1] <= gfc.npart_l);\n assert(gfc.bo_s[Encoder.SBMAX_s - 1] <= gfc.npart_s);\n\n if (gfp.ATHtype != -1) {\n /* compute equal loudness weights (eql_w) */\n var freq;\n var freq_inc = gfp.out_samplerate\n / (Encoder.BLKSIZE);\n var eql_balance = 0.0;\n freq = 0.0;\n for (i = 0; i < Encoder.BLKSIZE / 2; ++i) {\n /* convert ATH dB to relative power (not dB) */\n /* to determine eql_w */\n freq += freq_inc;\n gfc.ATH.eql_w[i] = 1. / Math.pow(10, this.ATHformula(freq, gfp) / 10);\n eql_balance += gfc.ATH.eql_w[i];\n }\n eql_balance = 1.0 / eql_balance;\n for (i = Encoder.BLKSIZE / 2; --i >= 0;) { /* scale weights */\n gfc.ATH.eql_w[i] *= eql_balance;\n }\n }\n {\n for (var b = j = 0; b < gfc.npart_s; ++b) {\n for (i = 0; i < gfc.numlines_s[b]; ++i) {\n ++j;\n }\n }\n assert(j == 129);\n for (var b = j = 0; b < gfc.npart_l; ++b) {\n for (i = 0; i < gfc.numlines_l[b]; ++i) {\n ++j;\n }\n }\n assert(j == 513);\n }\n j = 0;\n for (i = 0; i < gfc.npart_l; i++) {\n var freq = sfreq * (j + gfc.numlines_l[i] / 2) / (1.0 * Encoder.BLKSIZE);\n gfc.mld_cb_l[i] = stereo_demask(freq);\n j += gfc.numlines_l[i];\n }\n for (; i < Encoder.CBANDS; ++i) {\n gfc.mld_cb_l[i] = 1;\n }\n j = 0;\n for (i = 0; i < gfc.npart_s; i++) {\n var freq = sfreq * (j + gfc.numlines_s[i] / 2) / (1.0 * Encoder.BLKSIZE_s);\n gfc.mld_cb_s[i] = stereo_demask(freq);\n j += gfc.numlines_s[i];\n }\n for (; i < Encoder.CBANDS; ++i) {\n gfc.mld_cb_s[i] = 1;\n }\n return 0;\n }\n\n /**\n * Those ATH formulas are returning their minimum value for input = -1\n */\n function ATHformula_GB(f, value) {\n /**\n *
\n         *  from Painter & Spanias\n         *           modified by Gabriel Bouvigne to better fit the reality\n         *           ath =    3.640 * pow(f,-0.8)\n         *           - 6.800 * exp(-0.6*pow(f-3.4,2.0))\n         *           + 6.000 * exp(-0.15*pow(f-8.7,2.0))\n         *           + 0.6* 0.001 * pow(f,4.0);\n         *\n         *\n         *           In the past LAME was using the Painter &Spanias formula.\n         *           But we had some recurrent problems with HF content.\n         *           We measured real ATH values, and found the older formula\n         *           to be inaccurate in the higher part. So we made this new\n         *           formula and this solved most of HF problematic test cases.\n         *           The tradeoff is that in VBR mode it increases a lot the\n         *           bitrate.\n         * 
\n */\n\n /*\n * This curve can be adjusted according to the VBR scale: it adjusts\n * from something close to Painter & Spanias on V9 up to Bouvigne's\n * formula for V0. This way the VBR bitrate is more balanced according\n * to the -V value.\n */\n\n // the following Hack allows to ask for the lowest value\n if (f < -.3)\n f = 3410;\n\n // convert to khz\n f /= 1000;\n f = Math.max(0.1, f);\n var ath = 3.640 * Math.pow(f, -0.8) - 6.800\n * Math.exp(-0.6 * Math.pow(f - 3.4, 2.0)) + 6.000\n * Math.exp(-0.15 * Math.pow(f - 8.7, 2.0))\n + (0.6 + 0.04 * value) * 0.001 * Math.pow(f, 4.0);\n return ath;\n }\n\n this.ATHformula = function (f, gfp) {\n var ath;\n switch (gfp.ATHtype) {\n case 0:\n ath = ATHformula_GB(f, 9);\n break;\n case 1:\n // over sensitive, should probably be removed\n ath = ATHformula_GB(f, -1);\n break;\n case 2:\n ath = ATHformula_GB(f, 0);\n break;\n case 3:\n // modification of GB formula by Roel\n ath = ATHformula_GB(f, 1) + 6;\n break;\n case 4:\n ath = ATHformula_GB(f, gfp.ATHcurve);\n break;\n default:\n ath = ATHformula_GB(f, 0);\n break;\n }\n return ath;\n }\n\n}\n\nmodule.exports = PsyModel;\n","//package mp3;\n\n/* MPEG modes */\nfunction MPEGMode(ordinal) {\n var _ordinal = ordinal;\n this.ordinal = function () {\n return _ordinal;\n }\n}\n\nMPEGMode.STEREO = new MPEGMode(0);\nMPEGMode.JOINT_STEREO = new MPEGMode(1);\nMPEGMode.DUAL_CHANNEL = new MPEGMode(2);\nMPEGMode.MONO = new MPEGMode(3);\nMPEGMode.NOT_SET = new MPEGMode(4);\n\nmodule.exports = MPEGMode;\n","var MPEGMode = require('./MPEGMode.js');\n\nfunction LameGlobalFlags() {\n\n this.class_id = 0;\n\n /* input description */\n\n /**\n * number of samples. default=-1\n */\n this.num_samples = 0;\n /**\n * input number of channels. default=2\n */\n this.num_channels = 0;\n /**\n * input_samp_rate in Hz. default=44.1 kHz\n */\n this.in_samplerate = 0;\n /**\n * output_samp_rate. default: LAME picks best value at least not used for\n * MP3 decoding: Remember 44.1 kHz MP3s and AC97\n */\n this.out_samplerate = 0;\n /**\n * scale input by this amount before encoding at least not used for MP3\n * decoding\n */\n this.scale = 0.;\n /**\n * scale input of channel 0 (left) by this amount before encoding\n */\n this.scale_left = 0.;\n /**\n * scale input of channel 1 (right) by this amount before encoding\n */\n this.scale_right = 0.;\n\n /* general control params */\n /**\n * collect data for a MP3 frame analyzer?\n */\n this.analysis = false;\n /**\n * add Xing VBR tag?\n */\n this.bWriteVbrTag = false;\n\n /**\n * use lame/mpglib to convert mp3 to wav\n */\n this.decode_only = false;\n /**\n * quality setting 0=best, 9=worst default=5\n */\n this.quality = 0;\n /**\n * see enum default = LAME picks best value\n */\n this.mode = MPEGMode.STEREO;\n /**\n * force M/S mode. requires mode=1\n */\n this.force_ms = false;\n /**\n * use free format? default=0\n */\n this.free_format = false;\n /**\n * find the RG value? default=0\n */\n this.findReplayGain = false;\n /**\n * decode on the fly? default=0\n */\n this.decode_on_the_fly = false;\n /**\n * 1 (default) writes ID3 tags, 0 not\n */\n this.write_id3tag_automatic = false;\n\n /*\n * set either brate>0 or compression_ratio>0, LAME will compute the value of\n * the variable not set. Default is compression_ratio = 11.025\n */\n /**\n * bitrate\n */\n this.brate = 0;\n /**\n * sizeof(wav file)/sizeof(mp3 file)\n */\n this.compression_ratio = 0.;\n\n /* frame params */\n /**\n * mark as copyright. default=0\n */\n this.copyright = 0;\n /**\n * mark as original. default=1\n */\n this.original = 0;\n /**\n * the MP3 'private extension' bit. Meaningless\n */\n this.extension = 0;\n /**\n * Input PCM is emphased PCM (for instance from one of the rarely emphased\n * CDs), it is STRONGLY not recommended to use this, because psycho does not\n * take it into account, and last but not least many decoders don't care\n * about these bits\n */\n this.emphasis = 0;\n /**\n * use 2 bytes per frame for a CRC checksum. default=0\n */\n this.error_protection = 0;\n /**\n * enforce ISO spec as much as possible\n */\n this.strict_ISO = false;\n\n /**\n * use bit reservoir?\n */\n this.disable_reservoir = false;\n\n /* quantization/noise shaping */\n this.quant_comp = 0;\n this.quant_comp_short = 0;\n this.experimentalY = false;\n this.experimentalZ = 0;\n this.exp_nspsytune = 0;\n\n this.preset = 0;\n\n /* VBR control */\n this.VBR = null;\n /**\n * Range [0,...,1[\n */\n this.VBR_q_frac = 0.;\n /**\n * Range [0,...,9]\n */\n this.VBR_q = 0;\n this.VBR_mean_bitrate_kbps = 0;\n this.VBR_min_bitrate_kbps = 0;\n this.VBR_max_bitrate_kbps = 0;\n /**\n * strictly enforce VBR_min_bitrate normaly, it will be violated for analog\n * silence\n */\n this.VBR_hard_min = 0;\n\n /* resampling and filtering */\n\n /**\n * freq in Hz. 0=lame choses. -1=no filter\n */\n this.lowpassfreq = 0;\n /**\n * freq in Hz. 0=lame choses. -1=no filter\n */\n this.highpassfreq = 0;\n /**\n * freq width of filter, in Hz (default=15%)\n */\n this.lowpasswidth = 0;\n /**\n * freq width of filter, in Hz (default=15%)\n */\n this.highpasswidth = 0;\n\n /*\n * psycho acoustics and other arguments which you should not change unless\n * you know what you are doing\n */\n\n this.maskingadjust = 0.;\n this.maskingadjust_short = 0.;\n /**\n * only use ATH\n */\n this.ATHonly = false;\n /**\n * only use ATH for short blocks\n */\n this.ATHshort = false;\n /**\n * disable ATH\n */\n this.noATH = false;\n /**\n * select ATH formula\n */\n this.ATHtype = 0;\n /**\n * change ATH formula 4 shape\n */\n this.ATHcurve = 0.;\n /**\n * lower ATH by this many db\n */\n this.ATHlower = 0.;\n /**\n * select ATH auto-adjust scheme\n */\n this.athaa_type = 0;\n /**\n * select ATH auto-adjust loudness calc\n */\n this.athaa_loudapprox = 0;\n /**\n * dB, tune active region of auto-level\n */\n this.athaa_sensitivity = 0.;\n this.short_blocks = null;\n /**\n * use temporal masking effect\n */\n this.useTemporal = false;\n this.interChRatio = 0.;\n /**\n * Naoki's adjustment of Mid/Side maskings\n */\n this.msfix = 0.;\n\n /**\n * 0 off, 1 on\n */\n this.tune = false;\n /**\n * used to pass values for debugging and stuff\n */\n this.tune_value_a = 0.;\n\n /************************************************************************/\n /* internal variables, do not set... */\n /* provided because they may be of use to calling application */\n /************************************************************************/\n\n /**\n * 0=MPEG-2/2.5 1=MPEG-1\n */\n this.version = 0;\n this.encoder_delay = 0;\n /**\n * number of samples of padding appended to input\n */\n this.encoder_padding = 0;\n this.framesize = 0;\n /**\n * number of frames encoded\n */\n this.frameNum = 0;\n /**\n * is this struct owned by calling program or lame?\n */\n this.lame_allocated_gfp = 0;\n /**************************************************************************/\n /* more internal variables are stored in this structure: */\n /**************************************************************************/\n this.internal_flags = null;\n}\n\nmodule.exports = LameGlobalFlags;\n","var Encoder = require('./Encoder.js');\n\nvar L3Side = {};\n\n\n\t/**\n\t * max scalefactor band, max(SBMAX_l, SBMAX_s*3, (SBMAX_s-3)*3+8)\n\t */\nL3Side.SFBMAX = (Encoder.SBMAX_s * 3);\n\nmodule.exports = L3Side;\n","//package mp3;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar L3Side = require('./L3Side.js');\n\nfunction GrInfo() {\n //float xr[] = new float[576];\n this.xr = new_float(576);\n //int l3_enc[] = new int[576];\n this.l3_enc = new_int(576);\n //int scalefac[] = new int[L3Side.SFBMAX];\n this.scalefac = new_int(L3Side.SFBMAX);\n this.xrpow_max = 0.;\n\n this.part2_3_length = 0;\n this.big_values = 0;\n this.count1 = 0;\n this.global_gain = 0;\n this.scalefac_compress = 0;\n this.block_type = 0;\n this.mixed_block_flag = 0;\n this.table_select = new_int(3);\n this.subblock_gain = new_int(3 + 1);\n this.region0_count = 0;\n this.region1_count = 0;\n this.preflag = 0;\n this.scalefac_scale = 0;\n this.count1table_select = 0;\n\n this.part2_length = 0;\n this.sfb_lmax = 0;\n this.sfb_smin = 0;\n this.psy_lmax = 0;\n this.sfbmax = 0;\n this.psymax = 0;\n this.sfbdivide = 0;\n this.width = new_int(L3Side.SFBMAX);\n this.window = new_int(L3Side.SFBMAX);\n this.count1bits = 0;\n /**\n * added for LSF\n */\n this.sfb_partition_table = null;\n this.slen = new_int(4);\n\n this.max_nonzero_coeff = 0;\n\n var self = this;\n function clone_int(array) {\n return new Int32Array(array);\n }\n function clone_float(array) {\n return new Float32Array(array);\n }\n this.assign = function (other) {\n self.xr = clone_float(other.xr); //.slice(0); //clone();\n self.l3_enc = clone_int(other.l3_enc); //.slice(0); //clone();\n self.scalefac = clone_int(other.scalefac);//.slice(0); //clone();\n self.xrpow_max = other.xrpow_max;\n\n self.part2_3_length = other.part2_3_length;\n self.big_values = other.big_values;\n self.count1 = other.count1;\n self.global_gain = other.global_gain;\n self.scalefac_compress = other.scalefac_compress;\n self.block_type = other.block_type;\n self.mixed_block_flag = other.mixed_block_flag;\n self.table_select = clone_int(other.table_select);//.slice(0); //clone();\n self.subblock_gain = clone_int(other.subblock_gain); //.slice(0); //.clone();\n self.region0_count = other.region0_count;\n self.region1_count = other.region1_count;\n self.preflag = other.preflag;\n self.scalefac_scale = other.scalefac_scale;\n self.count1table_select = other.count1table_select;\n\n self.part2_length = other.part2_length;\n self.sfb_lmax = other.sfb_lmax;\n self.sfb_smin = other.sfb_smin;\n self.psy_lmax = other.psy_lmax;\n self.sfbmax = other.sfbmax;\n self.psymax = other.psymax;\n self.sfbdivide = other.sfbdivide;\n self.width = clone_int(other.width); //.slice(0); //.clone();\n self.window = clone_int(other.window); //.slice(0); //.clone();\n self.count1bits = other.count1bits;\n\n self.sfb_partition_table = other.sfb_partition_table.slice(0); //.clone();\n self.slen = clone_int(other.slen); //.slice(0); //.clone();\n self.max_nonzero_coeff = other.max_nonzero_coeff;\n }\n}\n\nmodule.exports = GrInfo;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar GrInfo = require('./GrInfo.js');\n\nfunction IIISideInfo() {\n this.tt = [[null, null], [null, null]];\n this.main_data_begin = 0;\n this.private_bits = 0;\n this.resvDrain_pre = 0;\n this.resvDrain_post = 0;\n this.scfsi = [new_int(4), new_int(4)];\n\n for (var gr = 0; gr < 2; gr++) {\n for (var ch = 0; ch < 2; ch++) {\n this.tt[gr][ch] = new GrInfo();\n }\n }\n}\n\nmodule.exports = IIISideInfo;\n","//package mp3;\n\n/**\n * Layer III side information.\n *\n * @author Ken\n *\n */\n\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\nfunction ScaleFac(arrL, arrS, arr21, arr12) {\n\n this.l = new_int(1 + Encoder.SBMAX_l);\n this.s = new_int(1 + Encoder.SBMAX_s);\n this.psfb21 = new_int(1 + Encoder.PSFB21);\n this.psfb12 = new_int(1 + Encoder.PSFB12);\n var l = this.l;\n var s = this.s;\n\n if (arguments.length == 4) {\n //public ScaleFac(final int[] arrL, final int[] arrS, final int[] arr21,\n // final int[] arr12) {\n this.arrL = arguments[0];\n this.arrS = arguments[1];\n this.arr21 = arguments[2];\n this.arr12 = arguments[3];\n\n System.arraycopy(this.arrL, 0, l, 0, Math.min(this.arrL.length, this.l.length));\n System.arraycopy(this.arrS, 0, s, 0, Math.min(this.arrS.length, this.s.length));\n System.arraycopy(this.arr21, 0, this.psfb21, 0, Math.min(this.arr21.length, this.psfb21.length));\n System.arraycopy(this.arr12, 0, this.psfb12, 0, Math.min(this.arr12.length, this.psfb12.length));\n }\n}\n\nmodule.exports = ScaleFac;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n//package mp3;\n\n/**\n * Variables used for --nspsytune\n *\n * @author Ken\n *\n */\nfunction NsPsy() {\n this.last_en_subshort = new_float_n([4, 9]);\n this.lastAttacks = new_int(4);\n this.pefirbuf = new_float(19);\n this.longfact = new_float(Encoder.SBMAX_l);\n this.shortfact = new_float(Encoder.SBMAX_s);\n\n /**\n * short block tuning\n */\n this.attackthre = 0.;\n this.attackthre_s = 0.;\n}\n\nmodule.exports = NsPsy;\n","//package mp3;\n\nfunction VBRSeekInfo() {\n /**\n * What we have seen so far.\n */\n this.sum = 0;\n /**\n * How many frames we have seen in this chunk.\n */\n this.seen = 0;\n /**\n * How many frames we want to collect into one chunk.\n */\n this.want = 0;\n /**\n * Actual position in our bag.\n */\n this.pos = 0;\n /**\n * Size of our bag.\n */\n this.size = 0;\n /**\n * Pointer to our bag.\n */\n this.bag = null;\n this.nVbrNumFrames = 0;\n this.nBytesWritten = 0;\n /* VBR tag data */\n this.TotalFrameSize = 0;\n}\n\nmodule.exports = VBRSeekInfo;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar IIISideInfo = require('./IIISideInfo.js');\nvar ScaleFac = require('./ScaleFac.js');\nvar NsPsy = require('./NsPsy.js');\nvar VBRSeekInfo = require('./VBRSeekInfo.js');\nvar III_psy_xmin = require('./III_psy_xmin.js');\nvar Encoder = require('./Encoder.js');\nvar L3Side = require('./L3Side.js');\n\n\nLameInternalFlags.MFSIZE = (3 * 1152 + Encoder.ENCDELAY - Encoder.MDCTDELAY);\nLameInternalFlags.MAX_HEADER_BUF = 256;\nLameInternalFlags.MAX_BITS_PER_CHANNEL = 4095;\nLameInternalFlags.MAX_BITS_PER_GRANULE = 7680;\nLameInternalFlags.BPC = 320;\n\nfunction LameInternalFlags() {\n var MAX_HEADER_LEN = 40;\n\n\n /********************************************************************\n * internal variables NOT set by calling program, and should not be *\n * modified by the calling program *\n ********************************************************************/\n\n /**\n * Some remarks to the Class_ID field: The Class ID is an Identifier for a\n * pointer to this struct. It is very unlikely that a pointer to\n * lame_global_flags has the same 32 bits in it's structure (large and other\n * special properties, for instance prime).\n *\n * To test that the structure is right and initialized, use: if ( gfc .\n * Class_ID == LAME_ID ) ... Other remark: If you set a flag to 0 for uninit\n * data and 1 for init data, the right test should be \"if (flag == 1)\" and\n * NOT \"if (flag)\". Unintended modification of this element will be\n * otherwise misinterpreted as an init.\n */\n this.Class_ID = 0;\n\n this.lame_encode_frame_init = 0;\n this.iteration_init_init = 0;\n this.fill_buffer_resample_init = 0;\n\n //public float mfbuf[][] = new float[2][MFSIZE];\n this.mfbuf = new_float_n([2, LameInternalFlags.MFSIZE]);\n\n /**\n * granules per frame\n */\n this.mode_gr = 0;\n /**\n * number of channels in the input data stream (PCM or decoded PCM)\n */\n this.channels_in = 0;\n /**\n * number of channels in the output data stream (not used for decoding)\n */\n this.channels_out = 0;\n /**\n * input_samp_rate/output_samp_rate\n */\n //public double resample_ratio;\n this.resample_ratio = 0.;\n\n this.mf_samples_to_encode = 0;\n this.mf_size = 0;\n /**\n * min bitrate index\n */\n this.VBR_min_bitrate = 0;\n /**\n * max bitrate index\n */\n this.VBR_max_bitrate = 0;\n this.bitrate_index = 0;\n this.samplerate_index = 0;\n this.mode_ext = 0;\n\n /* lowpass and highpass filter control */\n /**\n * normalized frequency bounds of passband\n */\n this.lowpass1 = 0.;\n this.lowpass2 = 0.;\n /**\n * normalized frequency bounds of passband\n */\n this.highpass1 = 0.;\n this.highpass2 = 0.;\n\n /**\n * 0 = none 1 = ISO AAC model 2 = allow scalefac_select=1\n */\n this.noise_shaping = 0;\n\n /**\n * 0 = ISO model: amplify all distorted bands
\n * 1 = amplify within 50% of max (on db scale)
\n * 2 = amplify only most distorted band
\n * 3 = method 1 and refine with method 2
\n */\n this.noise_shaping_amp = 0;\n /**\n * 0 = no substep
\n * 1 = use substep shaping at last step(VBR only)
\n * (not implemented yet)
\n * 2 = use substep inside loop
\n * 3 = use substep inside loop and last step
\n */\n this.substep_shaping = 0;\n\n /**\n * 1 = gpsycho. 0 = none\n */\n this.psymodel = 0;\n /**\n * 0 = stop at over=0, all scalefacs amplified or
\n * a scalefac has reached max value
\n * 1 = stop when all scalefacs amplified or a scalefac has reached max value
\n * 2 = stop when all scalefacs amplified\n */\n this.noise_shaping_stop = 0;\n\n /**\n * 0 = no, 1 = yes\n */\n this.subblock_gain = 0;\n /**\n * 0 = no. 1=outside loop 2=inside loop(slow)\n */\n this.use_best_huffman = 0;\n\n /**\n * 0 = stop early after 0 distortion found. 1 = full search\n */\n this.full_outer_loop = 0;\n\n //public IIISideInfo l3_side = new IIISideInfo();\n this.l3_side = new IIISideInfo();\n this.ms_ratio = new_float(2);\n\n /* used for padding */\n /**\n * padding for the current frame?\n */\n this.padding = 0;\n this.frac_SpF = 0;\n this.slot_lag = 0;\n\n /**\n * optional ID3 tags\n */\n //public ID3TagSpec tag_spec;\n this.tag_spec = null;\n this.nMusicCRC = 0;\n\n /* variables used by Quantize */\n //public int OldValue[] = new int[2];\n this.OldValue = new_int(2);\n //public int CurrentStep[] = new int[2];\n this.CurrentStep = new_int(2);\n\n this.masking_lower = 0.;\n //public int bv_scf[] = new int[576];\n this.bv_scf = new_int(576);\n //public int pseudohalf[] = new int[L3Side.SFBMAX];\n this.pseudohalf = new_int(L3Side.SFBMAX);\n\n /**\n * will be set in lame_init_params\n */\n this.sfb21_extra = false;\n\n /* BPC = maximum number of filter convolution windows to precompute */\n //public float[][] inbuf_old = new float[2][];\n this.inbuf_old = new Array(2);\n //public float[][] blackfilt = new float[2 * BPC + 1][];\n this.blackfilt = new Array(2 * LameInternalFlags.BPC + 1);\n //public double itime[] = new double[2];\n this.itime = new_double(2);\n this.sideinfo_len = 0;\n\n /* variables for newmdct.c */\n //public float sb_sample[][][][] = new float[2][2][18][Encoder.SBLIMIT];\n this.sb_sample = new_float_n([2, 2, 18, Encoder.SBLIMIT]);\n this.amp_filter = new_float(32);\n\n /* variables for BitStream */\n\n /**\n *
\n     * mpeg1: buffer=511 bytes  smallest frame: 96-38(sideinfo)=58\n     * max number of frames in reservoir:  8\n     * mpeg2: buffer=255 bytes.  smallest frame: 24-23bytes=1\n     * with VBR, if you are encoding all silence, it is possible to\n     * have 8kbs/24khz frames with 1byte of data each, which means we need\n     * to buffer up to 255 headers!\n     * 
\n */\n /**\n * also, max_header_buf has to be a power of two\n */\n /**\n * max size of header is 38\n */\n\n function Header() {\n this.write_timing = 0;\n this.ptr = 0;\n //public byte buf[] = new byte[MAX_HEADER_LEN];\n this.buf = new_byte(MAX_HEADER_LEN);\n }\n\n this.header = new Array(LameInternalFlags.MAX_HEADER_BUF);\n\n this.h_ptr = 0;\n this.w_ptr = 0;\n this.ancillary_flag = 0;\n\n /* variables for Reservoir */\n /**\n * in bits\n */\n this.ResvSize = 0;\n /**\n * in bits\n */\n this.ResvMax = 0;\n\n //public ScaleFac scalefac_band = new ScaleFac();\n this.scalefac_band = new ScaleFac();\n\n /* daa from PsyModel */\n /* The static variables \"r\", \"phi_sav\", \"new\", \"old\" and \"oldest\" have */\n /* to be remembered for the unpredictability measure. For \"r\" and */\n /* \"phi_sav\", the first index from the left is the channel select and */\n /* the second index is the \"age\" of the data. */\n this.minval_l = new_float(Encoder.CBANDS);\n this.minval_s = new_float(Encoder.CBANDS);\n this.nb_1 = new_float_n([4, Encoder.CBANDS]);\n this.nb_2 = new_float_n([4, Encoder.CBANDS]);\n this.nb_s1 = new_float_n([4, Encoder.CBANDS]);\n this.nb_s2 = new_float_n([4, Encoder.CBANDS]);\n this.s3_ss = null;\n this.s3_ll = null;\n this.decay = 0.;\n\n //public III_psy_xmin[] thm = new III_psy_xmin[4];\n //public III_psy_xmin[] en = new III_psy_xmin[4];\n this.thm = new Array(4);\n this.en = new Array(4);\n\n /**\n * fft and energy calculation\n */\n this.tot_ener = new_float(4);\n\n /* loudness calculation (for adaptive threshold of hearing) */\n /**\n * loudness^2 approx. per granule and channel\n */\n this.loudness_sq = new_float_n([2, 2]);\n /**\n * account for granule delay of L3psycho_anal\n */\n this.loudness_sq_save = new_float(2);\n\n /**\n * Scale Factor Bands\n */\n this.mld_l = new_float(Encoder.SBMAX_l);\n this.mld_s = new_float(Encoder.SBMAX_s);\n this.bm_l = new_int(Encoder.SBMAX_l);\n this.bo_l = new_int(Encoder.SBMAX_l);\n this.bm_s = new_int(Encoder.SBMAX_s);\n this.bo_s = new_int(Encoder.SBMAX_s);\n this.npart_l = 0;\n this.npart_s = 0;\n\n this.s3ind = new_int_n([Encoder.CBANDS, 2]);\n this.s3ind_s = new_int_n([Encoder.CBANDS, 2]);\n\n this.numlines_s = new_int(Encoder.CBANDS);\n this.numlines_l = new_int(Encoder.CBANDS);\n this.rnumlines_l = new_float(Encoder.CBANDS);\n this.mld_cb_l = new_float(Encoder.CBANDS);\n this.mld_cb_s = new_float(Encoder.CBANDS);\n this.numlines_s_num1 = 0;\n this.numlines_l_num1 = 0;\n\n /* ratios */\n this.pe = new_float(4);\n this.ms_ratio_s_old = 0.;\n this.ms_ratio_l_old = 0.;\n this.ms_ener_ratio_old = 0.;\n\n /**\n * block type\n */\n this.blocktype_old = new_int(2);\n\n /**\n * variables used for --nspsytune\n */\n this.nsPsy = new NsPsy();\n\n /**\n * used for Xing VBR header\n */\n this.VBR_seek_table = new VBRSeekInfo();\n\n /**\n * all ATH related stuff\n */\n //public ATH ATH;\n this.ATH = null;\n\n this.PSY = null;\n\n this.nogap_total = 0;\n this.nogap_current = 0;\n\n /* ReplayGain */\n this.decode_on_the_fly = true;\n this.findReplayGain = true;\n this.findPeakSample = true;\n this.PeakSample = 0.;\n this.RadioGain = 0;\n this.AudiophileGain = 0;\n //public ReplayGain rgdata;\n this.rgdata = null;\n\n /**\n * gain change required for preventing clipping\n */\n this.noclipGainChange = 0;\n /**\n * user-specified scale factor required for preventing clipping\n */\n this.noclipScale = 0.;\n\n /* simple statistics */\n this.bitrate_stereoMode_Hist = new_int_n([16, 4 + 1]);\n /**\n * norm/start/short/stop/mixed(short)/sum\n */\n this.bitrate_blockType_Hist = new_int_n([16, 4 + 1 + 1]);\n\n //public PlottingData pinfo;\n //public MPGLib.mpstr_tag hip;\n this.pinfo = null;\n this.hip = null;\n\n this.in_buffer_nsamples = 0;\n //public float[] in_buffer_0;\n //public float[] in_buffer_1;\n this.in_buffer_0 = null;\n this.in_buffer_1 = null;\n\n //public IIterationLoop iteration_loop;\n this.iteration_loop = null;\n\n for (var i = 0; i < this.en.length; i++) {\n this.en[i] = new III_psy_xmin();\n }\n for (var i = 0; i < this.thm.length; i++) {\n this.thm[i] = new III_psy_xmin();\n }\n for (var i = 0; i < this.header.length; i++) {\n this.header[i] = new Header();\n }\n\n}\n\nmodule.exports = LameInternalFlags;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n/**\n * ATH related stuff, if something new ATH related has to be added, please plug\n * it here into the ATH.\n */\nfunction ATH() {\n /**\n * Method for the auto adjustment.\n */\n this.useAdjust = 0;\n /**\n * factor for tuning the (sample power) point below which adaptive threshold\n * of hearing adjustment occurs\n */\n this.aaSensitivityP = 0.;\n /**\n * Lowering based on peak volume, 1 = no lowering.\n */\n this.adjust = 0.;\n /**\n * Limit for dynamic ATH adjust.\n */\n this.adjustLimit = 0.;\n /**\n * Determined to lower x dB each second.\n */\n this.decay = 0.;\n /**\n * Lowest ATH value.\n */\n this.floor = 0.;\n /**\n * ATH for sfbs in long blocks.\n */\n this.l = new_float(Encoder.SBMAX_l);\n /**\n * ATH for sfbs in short blocks.\n */\n this.s = new_float(Encoder.SBMAX_s);\n /**\n * ATH for partitioned sfb21 in long blocks.\n */\n this.psfb21 = new_float(Encoder.PSFB21);\n /**\n * ATH for partitioned sfb12 in short blocks.\n */\n this.psfb12 = new_float(Encoder.PSFB12);\n /**\n * ATH for long block convolution bands.\n */\n this.cb_l = new_float(Encoder.CBANDS);\n /**\n * ATH for short block convolution bands.\n */\n this.cb_s = new_float(Encoder.CBANDS);\n /**\n * Equal loudness weights (based on ATH).\n */\n this.eql_w = new_float(Encoder.BLKSIZE / 2);\n}\n\nmodule.exports = ATH;\n","/*\n * ReplayGainAnalysis - analyzes input samples and give the recommended dB change\n * Copyright (C) 2001 David Robinson and Glen Sawyer\n * Improvements and optimizations added by Frank Klemm, and by Marcel Muller \n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * concept and filter values by David Robinson (David@Robinson.org)\n * -- blame him if you think the idea is flawed\n * original coding by Glen Sawyer (mp3gain@hotmail.com)\n * -- blame him if you think this runs too slowly, or the coding is otherwise flawed\n *\n * lots of code improvements by Frank Klemm ( http://www.uni-jena.de/~pfk/mpp/ )\n * -- credit him for all the _good_ programming ;)\n *\n *\n * For an explanation of the concepts and the basic algorithms involved, go to:\n * http://www.replaygain.org/\n */\n\n/*\n * Here's the deal. Call\n *\n * InitGainAnalysis ( long samplefreq );\n *\n * to initialize everything. Call\n *\n * AnalyzeSamples ( var Float_t* left_samples,\n * var Float_t* right_samples,\n * size_t num_samples,\n * int num_channels );\n *\n * as many times as you want, with as many or as few samples as you want.\n * If mono, pass the sample buffer in through left_samples, leave\n * right_samples NULL, and make sure num_channels = 1.\n *\n * GetTitleGain()\n *\n * will return the recommended dB level change for all samples analyzed\n * SINCE THE LAST TIME you called GetTitleGain() OR InitGainAnalysis().\n *\n * GetAlbumGain()\n *\n * will return the recommended dB level change for all samples analyzed\n * since InitGainAnalysis() was called and finalized with GetTitleGain().\n *\n * Pseudo-code to process an album:\n *\n * Float_t l_samples [4096];\n * Float_t r_samples [4096];\n * size_t num_samples;\n * unsigned int num_songs;\n * unsigned int i;\n *\n * InitGainAnalysis ( 44100 );\n * for ( i = 1; i <= num_songs; i++ ) {\n * while ( ( num_samples = getSongSamples ( song[i], left_samples, right_samples ) ) > 0 )\n * AnalyzeSamples ( left_samples, right_samples, num_samples, 2 );\n * fprintf (\"Recommended dB change for song %2d: %+6.2 dB\\n\", i, GetTitleGain() );\n * }\n * fprintf (\"Recommended dB change for whole album: %+6.2 dB\\n\", GetAlbumGain() );\n */\n\n/*\n * So here's the main source of potential code confusion:\n *\n * The filters applied to the incoming samples are IIR filters,\n * meaning they rely on up to number of previous samples\n * AND up to number of previous filtered samples.\n *\n * I set up the AnalyzeSamples routine to minimize memory usage and interface\n * complexity. The speed isn't compromised too much (I don't think), but the\n * internal complexity is higher than it should be for such a relatively\n * simple routine.\n *\n * Optimization/clarity suggestions are welcome.\n */\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * Table entries per dB\n */\nGainAnalysis.STEPS_per_dB = 100.;\n/**\n * Table entries for 0...MAX_dB (normal max. values are 70...80 dB)\n */\nGainAnalysis.MAX_dB = 120.;\nGainAnalysis.GAIN_NOT_ENOUGH_SAMPLES = -24601;\nGainAnalysis.GAIN_ANALYSIS_ERROR = 0;\nGainAnalysis.GAIN_ANALYSIS_OK = 1;\nGainAnalysis.INIT_GAIN_ANALYSIS_ERROR = 0;\nGainAnalysis.INIT_GAIN_ANALYSIS_OK = 1;\n\nGainAnalysis.YULE_ORDER = 10;\nGainAnalysis.MAX_ORDER = GainAnalysis.YULE_ORDER;\n\nGainAnalysis.MAX_SAMP_FREQ = 48000;\nGainAnalysis.RMS_WINDOW_TIME_NUMERATOR = 1;\nGainAnalysis.RMS_WINDOW_TIME_DENOMINATOR = 20;\nGainAnalysis.MAX_SAMPLES_PER_WINDOW = ((GainAnalysis.MAX_SAMP_FREQ * GainAnalysis.RMS_WINDOW_TIME_NUMERATOR) / GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR + 1);\n\nfunction GainAnalysis() {\n /**\n * calibration value for 89dB\n */\n var PINK_REF = 64.82;\n\n var YULE_ORDER = GainAnalysis.YULE_ORDER;\n /**\n * percentile which is louder than the proposed level\n */\n var RMS_PERCENTILE = 0.95;\n /**\n * maximum allowed sample frequency [Hz]\n */\n var MAX_SAMP_FREQ = GainAnalysis.MAX_SAMP_FREQ;\n var RMS_WINDOW_TIME_NUMERATOR = GainAnalysis.RMS_WINDOW_TIME_NUMERATOR;\n /**\n * numerator / denominator = time slice size [s]\n */\n var RMS_WINDOW_TIME_DENOMINATOR = GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR;\n /**\n * max. Samples per Time slice\n */\n var MAX_SAMPLES_PER_WINDOW = GainAnalysis.MAX_SAMPLES_PER_WINDOW;\n\n\n var ABYule = [\n [0.03857599435200, -3.84664617118067, -0.02160367184185,\n 7.81501653005538, -0.00123395316851, -11.34170355132042,\n -0.00009291677959, 13.05504219327545, -0.01655260341619,\n -12.28759895145294, 0.02161526843274, 9.48293806319790,\n -0.02074045215285, -5.87257861775999, 0.00594298065125,\n 2.75465861874613, 0.00306428023191, -0.86984376593551,\n 0.00012025322027, 0.13919314567432, 0.00288463683916],\n [0.05418656406430, -3.47845948550071, -0.02911007808948,\n 6.36317777566148, -0.00848709379851, -8.54751527471874,\n -0.00851165645469, 9.47693607801280, -0.00834990904936,\n -8.81498681370155, 0.02245293253339, 6.85401540936998,\n -0.02596338512915, -4.39470996079559, 0.01624864962975,\n 2.19611684890774, -0.00240879051584, -0.75104302451432,\n 0.00674613682247, 0.13149317958808, -0.00187763777362],\n [0.15457299681924, -2.37898834973084, -0.09331049056315,\n 2.84868151156327, -0.06247880153653, -2.64577170229825,\n 0.02163541888798, 2.23697657451713, -0.05588393329856,\n -1.67148153367602, 0.04781476674921, 1.00595954808547,\n 0.00222312597743, -0.45953458054983, 0.03174092540049,\n 0.16378164858596, -0.01390589421898, -0.05032077717131,\n 0.00651420667831, 0.02347897407020, -0.00881362733839],\n [0.30296907319327, -1.61273165137247, -0.22613988682123,\n 1.07977492259970, -0.08587323730772, -0.25656257754070,\n 0.03282930172664, -0.16276719120440, -0.00915702933434,\n -0.22638893773906, -0.02364141202522, 0.39120800788284,\n -0.00584456039913, -0.22138138954925, 0.06276101321749,\n 0.04500235387352, -0.00000828086748, 0.02005851806501,\n 0.00205861885564, 0.00302439095741, -0.02950134983287],\n [0.33642304856132, -1.49858979367799, -0.25572241425570,\n 0.87350271418188, -0.11828570177555, 0.12205022308084,\n 0.11921148675203, -0.80774944671438, -0.07834489609479,\n 0.47854794562326, -0.00469977914380, -0.12453458140019,\n -0.00589500224440, -0.04067510197014, 0.05724228140351,\n 0.08333755284107, 0.00832043980773, -0.04237348025746,\n -0.01635381384540, 0.02977207319925, -0.01760176568150],\n [0.44915256608450, -0.62820619233671, -0.14351757464547,\n 0.29661783706366, -0.22784394429749, -0.37256372942400,\n -0.01419140100551, 0.00213767857124, 0.04078262797139,\n -0.42029820170918, -0.12398163381748, 0.22199650564824,\n 0.04097565135648, 0.00613424350682, 0.10478503600251,\n 0.06747620744683, -0.01863887810927, 0.05784820375801,\n -0.03193428438915, 0.03222754072173, 0.00541907748707],\n [0.56619470757641, -1.04800335126349, -0.75464456939302,\n 0.29156311971249, 0.16242137742230, -0.26806001042947,\n 0.16744243493672, 0.00819999645858, -0.18901604199609,\n 0.45054734505008, 0.30931782841830, -0.33032403314006,\n -0.27562961986224, 0.06739368333110, 0.00647310677246,\n -0.04784254229033, 0.08647503780351, 0.01639907836189,\n -0.03788984554840, 0.01807364323573, -0.00588215443421],\n [0.58100494960553, -0.51035327095184, -0.53174909058578,\n -0.31863563325245, -0.14289799034253, -0.20256413484477,\n 0.17520704835522, 0.14728154134330, 0.02377945217615,\n 0.38952639978999, 0.15558449135573, -0.23313271880868,\n -0.25344790059353, -0.05246019024463, 0.01628462406333,\n -0.02505961724053, 0.06920467763959, 0.02442357316099,\n -0.03721611395801, 0.01818801111503, -0.00749618797172],\n [0.53648789255105, -0.25049871956020, -0.42163034350696,\n -0.43193942311114, -0.00275953611929, -0.03424681017675,\n 0.04267842219415, -0.04678328784242, -0.10214864179676,\n 0.26408300200955, 0.14590772289388, 0.15113130533216,\n -0.02459864859345, -0.17556493366449, -0.11202315195388,\n -0.18823009262115, -0.04060034127000, 0.05477720428674,\n 0.04788665548180, 0.04704409688120, -0.02217936801134]];\n\n var ABButter = [\n [0.98621192462708, -1.97223372919527, -1.97242384925416,\n 0.97261396931306, 0.98621192462708],\n [0.98500175787242, -1.96977855582618, -1.97000351574484,\n 0.97022847566350, 0.98500175787242],\n [0.97938932735214, -1.95835380975398, -1.95877865470428,\n 0.95920349965459, 0.97938932735214],\n [0.97531843204928, -1.95002759149878, -1.95063686409857,\n 0.95124613669835, 0.97531843204928],\n [0.97316523498161, -1.94561023566527, -1.94633046996323,\n 0.94705070426118, 0.97316523498161],\n [0.96454515552826, -1.92783286977036, -1.92909031105652,\n 0.93034775234268, 0.96454515552826],\n [0.96009142950541, -1.91858953033784, -1.92018285901082,\n 0.92177618768381, 0.96009142950541],\n [0.95856916599601, -1.91542108074780, -1.91713833199203,\n 0.91885558323625, 0.95856916599601],\n [0.94597685600279, -1.88903307939452, -1.89195371200558,\n 0.89487434461664, 0.94597685600279]];\n\n\n /**\n * When calling this procedure, make sure that ip[-order] and op[-order]\n * point to real data\n */\n //private void filterYule(final float[] input, int inputPos, float[] output,\n //int outputPos, int nSamples, final float[] kernel) {\n function filterYule(input, inputPos, output, outputPos, nSamples, kernel) {\n\n while ((nSamples--) != 0) {\n /* 1e-10 is a hack to avoid slowdown because of denormals */\n output[outputPos] = 1e-10 + input[inputPos + 0] * kernel[0]\n - output[outputPos - 1] * kernel[1] + input[inputPos - 1]\n * kernel[2] - output[outputPos - 2] * kernel[3]\n + input[inputPos - 2] * kernel[4] - output[outputPos - 3]\n * kernel[5] + input[inputPos - 3] * kernel[6]\n - output[outputPos - 4] * kernel[7] + input[inputPos - 4]\n * kernel[8] - output[outputPos - 5] * kernel[9]\n + input[inputPos - 5] * kernel[10] - output[outputPos - 6]\n * kernel[11] + input[inputPos - 6] * kernel[12]\n - output[outputPos - 7] * kernel[13] + input[inputPos - 7]\n * kernel[14] - output[outputPos - 8] * kernel[15]\n + input[inputPos - 8] * kernel[16] - output[outputPos - 9]\n * kernel[17] + input[inputPos - 9] * kernel[18]\n - output[outputPos - 10] * kernel[19]\n + input[inputPos - 10] * kernel[20];\n ++outputPos;\n ++inputPos;\n }\n }\n\n//private void filterButter(final float[] input, int inputPos,\n// float[] output, int outputPos, int nSamples, final float[] kernel) {\n function filterButter(input, inputPos, output, outputPos, nSamples, kernel) {\n\n while ((nSamples--) != 0) {\n output[outputPos] = input[inputPos + 0] * kernel[0]\n - output[outputPos - 1] * kernel[1] + input[inputPos - 1]\n * kernel[2] - output[outputPos - 2] * kernel[3]\n + input[inputPos - 2] * kernel[4];\n ++outputPos;\n ++inputPos;\n }\n }\n\n /**\n * @return INIT_GAIN_ANALYSIS_OK if successful, INIT_GAIN_ANALYSIS_ERROR if\n * not\n */\n function ResetSampleFrequency(rgData, samplefreq) {\n /* zero out initial values */\n for (var i = 0; i < MAX_ORDER; i++)\n rgData.linprebuf[i] = rgData.lstepbuf[i] = rgData.loutbuf[i] = rgData.rinprebuf[i] = rgData.rstepbuf[i] = rgData.routbuf[i] = 0.;\n\n switch (0 | (samplefreq)) {\n case 48000:\n rgData.reqindex = 0;\n break;\n case 44100:\n rgData.reqindex = 1;\n break;\n case 32000:\n rgData.reqindex = 2;\n break;\n case 24000:\n rgData.reqindex = 3;\n break;\n case 22050:\n rgData.reqindex = 4;\n break;\n case 16000:\n rgData.reqindex = 5;\n break;\n case 12000:\n rgData.reqindex = 6;\n break;\n case 11025:\n rgData.reqindex = 7;\n break;\n case 8000:\n rgData.reqindex = 8;\n break;\n default:\n return INIT_GAIN_ANALYSIS_ERROR;\n }\n\n rgData.sampleWindow = 0 | ((samplefreq * RMS_WINDOW_TIME_NUMERATOR\n + RMS_WINDOW_TIME_DENOMINATOR - 1) / RMS_WINDOW_TIME_DENOMINATOR);\n\n rgData.lsum = 0.;\n rgData.rsum = 0.;\n rgData.totsamp = 0;\n\n Arrays.ill(rgData.A, 0);\n\n return INIT_GAIN_ANALYSIS_OK;\n }\n\n this.InitGainAnalysis = function (rgData, samplefreq) {\n if (ResetSampleFrequency(rgData, samplefreq) != INIT_GAIN_ANALYSIS_OK) {\n return INIT_GAIN_ANALYSIS_ERROR;\n }\n\n rgData.linpre = MAX_ORDER;\n rgData.rinpre = MAX_ORDER;\n rgData.lstep = MAX_ORDER;\n rgData.rstep = MAX_ORDER;\n rgData.lout = MAX_ORDER;\n rgData.rout = MAX_ORDER;\n\n Arrays.fill(rgData.B, 0);\n\n return INIT_GAIN_ANALYSIS_OK;\n };\n\n /**\n * square\n */\n function fsqr(d) {\n return d * d;\n }\n\n this.AnalyzeSamples = function (rgData, left_samples, left_samplesPos, right_samples, right_samplesPos, num_samples,\n num_channels) {\n var curleft;\n var curleftBase;\n var curright;\n var currightBase;\n var batchsamples;\n var cursamples;\n var cursamplepos;\n\n if (num_samples == 0)\n return GAIN_ANALYSIS_OK;\n\n cursamplepos = 0;\n batchsamples = num_samples;\n\n switch (num_channels) {\n case 1:\n right_samples = left_samples;\n right_samplesPos = left_samplesPos;\n break;\n case 2:\n break;\n default:\n return GAIN_ANALYSIS_ERROR;\n }\n\n if (num_samples < MAX_ORDER) {\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER, num_samples);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER, num_samples);\n } else {\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER, MAX_ORDER);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER, MAX_ORDER);\n }\n\n while (batchsamples > 0) {\n cursamples = batchsamples > rgData.sampleWindow - rgData.totsamp ? rgData.sampleWindow\n - rgData.totsamp\n : batchsamples;\n if (cursamplepos < MAX_ORDER) {\n curleft = rgData.linpre + cursamplepos;\n curleftBase = rgData.linprebuf;\n curright = rgData.rinpre + cursamplepos;\n currightBase = rgData.rinprebuf;\n if (cursamples > MAX_ORDER - cursamplepos)\n cursamples = MAX_ORDER - cursamplepos;\n } else {\n curleft = left_samplesPos + cursamplepos;\n curleftBase = left_samples;\n curright = right_samplesPos + cursamplepos;\n currightBase = right_samples;\n }\n\n filterYule(curleftBase, curleft, rgData.lstepbuf, rgData.lstep\n + rgData.totsamp, cursamples, ABYule[rgData.reqindex]);\n filterYule(currightBase, curright, rgData.rstepbuf, rgData.rstep\n + rgData.totsamp, cursamples, ABYule[rgData.reqindex]);\n\n filterButter(rgData.lstepbuf, rgData.lstep + rgData.totsamp,\n rgData.loutbuf, rgData.lout + rgData.totsamp, cursamples,\n ABButter[rgData.reqindex]);\n filterButter(rgData.rstepbuf, rgData.rstep + rgData.totsamp,\n rgData.routbuf, rgData.rout + rgData.totsamp, cursamples,\n ABButter[rgData.reqindex]);\n\n curleft = rgData.lout + rgData.totsamp;\n /* Get the squared values */\n curleftBase = rgData.loutbuf;\n curright = rgData.rout + rgData.totsamp;\n currightBase = rgData.routbuf;\n\n var i = cursamples % 8;\n while ((i--) != 0) {\n rgData.lsum += fsqr(curleftBase[curleft++]);\n rgData.rsum += fsqr(currightBase[curright++]);\n }\n i = cursamples / 8;\n while ((i--) != 0) {\n rgData.lsum += fsqr(curleftBase[curleft + 0])\n + fsqr(curleftBase[curleft + 1])\n + fsqr(curleftBase[curleft + 2])\n + fsqr(curleftBase[curleft + 3])\n + fsqr(curleftBase[curleft + 4])\n + fsqr(curleftBase[curleft + 5])\n + fsqr(curleftBase[curleft + 6])\n + fsqr(curleftBase[curleft + 7]);\n curleft += 8;\n rgData.rsum += fsqr(currightBase[curright + 0])\n + fsqr(currightBase[curright + 1])\n + fsqr(currightBase[curright + 2])\n + fsqr(currightBase[curright + 3])\n + fsqr(currightBase[curright + 4])\n + fsqr(currightBase[curright + 5])\n + fsqr(currightBase[curright + 6])\n + fsqr(currightBase[curright + 7]);\n curright += 8;\n }\n\n batchsamples -= cursamples;\n cursamplepos += cursamples;\n rgData.totsamp += cursamples;\n if (rgData.totsamp == rgData.sampleWindow) {\n /* Get the Root Mean Square (RMS) for this set of samples */\n var val = GainAnalysis.STEPS_per_dB\n * 10.\n * Math.log10((rgData.lsum + rgData.rsum)\n / rgData.totsamp * 0.5 + 1.e-37);\n var ival = (val <= 0) ? 0 : 0 | val;\n if (ival >= rgData.A.length)\n ival = rgData.A.length - 1;\n rgData.A[ival]++;\n rgData.lsum = rgData.rsum = 0.;\n\n System.arraycopy(rgData.loutbuf, rgData.totsamp,\n rgData.loutbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.routbuf, rgData.totsamp,\n rgData.routbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.lstepbuf, rgData.totsamp,\n rgData.lstepbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.rstepbuf, rgData.totsamp,\n rgData.rstepbuf, 0, MAX_ORDER);\n rgData.totsamp = 0;\n }\n if (rgData.totsamp > rgData.sampleWindow) {\n /*\n * somehow I really screwed up: Error in programming! Contact\n * author about totsamp > sampleWindow\n */\n return GAIN_ANALYSIS_ERROR;\n }\n }\n if (num_samples < MAX_ORDER) {\n System.arraycopy(rgData.linprebuf, num_samples, rgData.linprebuf,\n 0, MAX_ORDER - num_samples);\n System.arraycopy(rgData.rinprebuf, num_samples, rgData.rinprebuf,\n 0, MAX_ORDER - num_samples);\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER - num_samples, num_samples);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER - num_samples, num_samples);\n } else {\n System.arraycopy(left_samples, left_samplesPos + num_samples\n - MAX_ORDER, rgData.linprebuf, 0, MAX_ORDER);\n System.arraycopy(right_samples, right_samplesPos + num_samples\n - MAX_ORDER, rgData.rinprebuf, 0, MAX_ORDER);\n }\n\n return GAIN_ANALYSIS_OK;\n };\n\n function analyzeResult(Array, len) {\n var i;\n\n var elems = 0;\n for (i = 0; i < len; i++)\n elems += Array[i];\n if (elems == 0)\n return GAIN_NOT_ENOUGH_SAMPLES;\n\n var upper = 0 | Math.ceil(elems * (1. - RMS_PERCENTILE));\n for (i = len; i-- > 0;) {\n if ((upper -= Array[i]) <= 0)\n break;\n }\n\n //return (float) ((float) PINK_REF - (float) i / (float) STEPS_per_dB);\n return (PINK_REF - i / GainAnalysis.STEPS_per_dB);\n }\n\n this.GetTitleGain = function (rgData) {\n var retval = analyzeResult(rgData.A, rgData.A.length);\n\n for (var i = 0; i < rgData.A.length; i++) {\n rgData.B[i] += rgData.A[i];\n rgData.A[i] = 0;\n }\n\n for (var i = 0; i < MAX_ORDER; i++)\n rgData.linprebuf[i] = rgData.lstepbuf[i] = rgData.loutbuf[i] = rgData.rinprebuf[i] = rgData.rstepbuf[i] = rgData.routbuf[i] = 0.;\n\n rgData.totsamp = 0;\n rgData.lsum = rgData.rsum = 0.;\n return retval;\n }\n\n}\n\nmodule.exports = GainAnalysis;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar GainAnalysis = require('./GainAnalysis.js');\n\nfunction ReplayGain() {\n this.linprebuf = new_float(GainAnalysis.MAX_ORDER * 2);\n /**\n * left input samples, with pre-buffer\n */\n this.linpre = 0;\n this.lstepbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n /**\n * left \"first step\" (i.e. post first filter) samples\n */\n this.lstep = 0;\n this.loutbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n /**\n * left \"out\" (i.e. post second filter) samples\n */\n this.lout = 0;\n this.rinprebuf = new_float(GainAnalysis.MAX_ORDER * 2);\n /**\n * right input samples ...\n */\n this.rinpre = 0;\n this.rstepbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n this.rstep = 0;\n this.routbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n this.rout = 0;\n /**\n * number of samples required to reach number of milliseconds required\n * for RMS window\n */\n this.sampleWindow = 0;\n this.totsamp = 0;\n this.lsum = 0.;\n this.rsum = 0.;\n this.freqindex = 0;\n this.first = 0;\n this.A = new_int(0 | (GainAnalysis.STEPS_per_dB * GainAnalysis.MAX_dB));\n this.B = new_int(0 | (GainAnalysis.STEPS_per_dB * GainAnalysis.MAX_dB));\n\n}\n\nmodule.exports = ReplayGain;\n","function MeanBits(meanBits) {\n this.bits = meanBits;\n}\n\nmodule.exports = MeanBits;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar MeanBits = require('./MeanBits.js');\nvar Encoder = require('./Encoder.js');\nvar L3Side = require('./L3Side.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nfunction CBRNewIterationLoop(_quantize) {\n var quantize = _quantize;\n this.quantize = quantize;\n\tthis.iteration_loop = function(gfp, pe, ms_ener_ratio, ratio) {\n\t\tvar gfc = gfp.internal_flags;\n var l3_xmin = new_float(L3Side.SFBMAX);\n\t\tvar xrpow = new_float(576);\n\t\tvar targ_bits = new_int(2);\n\t\tvar mean_bits = 0, max_bits;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tvar mb = new MeanBits(mean_bits);\n\t\tthis.quantize.rv.ResvFrameBegin(gfp, mb);\n\t\tmean_bits = mb.bits;\n\n\t\t/* quantize! */\n\t\tfor (var gr = 0; gr < gfc.mode_gr; gr++) {\n\n\t\t\t/*\n\t\t\t * calculate needed bits\n\t\t\t */\n\t\t\tmax_bits = this.quantize.qupvt.on_pe(gfp, pe, targ_bits, mean_bits,\n\t\t\t\t\tgr, gr);\n\n\t\t\tif (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n\t\t\t\tthis.quantize.ms_convert(gfc.l3_side, gr);\n\t\t\t\tthis.quantize.qupvt.reduce_side(targ_bits, ms_ener_ratio[gr],\n\t\t\t\t\t\tmean_bits, max_bits);\n\t\t\t}\n\n\t\t\tfor (var ch = 0; ch < gfc.channels_out; ch++) {\n\t\t\t\tvar adjust, masking_lower_db;\n\t\t\t\tvar cod_info = l3_side.tt[gr][ch];\n\n\t\t\t\tif (cod_info.block_type != Encoder.SHORT_TYPE) {\n\t\t\t\t\t// NORM, START or STOP type\n\t\t\t\t\tadjust = 0;\n\t\t\t\t\tmasking_lower_db = gfc.PSY.mask_adjust - adjust;\n\t\t\t\t} else {\n\t\t\t\t\tadjust = 0;\n\t\t\t\t\tmasking_lower_db = gfc.PSY.mask_adjust_short - adjust;\n\t\t\t\t}\n\t\t\t\tgfc.masking_lower = Math.pow(10.0,\n\t\t\t\t\t\tmasking_lower_db * 0.1);\n\n\t\t\t\t/*\n\t\t\t\t * init_outer_loop sets up cod_info, scalefac and xrpow\n\t\t\t\t */\n\t\t\t\tthis.quantize.init_outer_loop(gfc, cod_info);\n\t\t\t\tif (this.quantize.init_xrpow(gfc, cod_info, xrpow)) {\n\t\t\t\t\t/*\n\t\t\t\t\t * xr contains energy we will have to encode calculate the\n\t\t\t\t\t * masking abilities find some good quantization in\n\t\t\t\t\t * outer_loop\n\t\t\t\t\t */\n\t\t\t\t\tthis.quantize.qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n\t\t\t\t\t\t\tl3_xmin);\n\t\t\t\t\tthis.quantize.outer_loop(gfp, cod_info, l3_xmin, xrpow, ch,\n\t\t\t\t\t\t\ttarg_bits[ch]);\n\t\t\t\t}\n\n\t\t\t\tthis.quantize.iteration_finish_one(gfc, gr, ch);\n\t\t\t\tassert (cod_info.part2_3_length <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n\t\t\t\tassert (cod_info.part2_3_length <= targ_bits[ch]);\n\t\t\t} /* for ch */\n\t\t} /* for gr */\n\n\t\tthis.quantize.rv.ResvFrameEnd(gfc, mean_bits);\n\t}\n}\nmodule.exports = CBRNewIterationLoop;\n","function HuffCodeTab(len, max, tab, hl) {\n this.xlen = len;\n this.linmax = max;\n this.table = tab;\n this.hlen = hl;\n}\n\nvar Tables = {};\n\n\nTables.t1HB = [\n 1, 1,\n 1, 0\n];\n\nTables.t2HB = [\n 1, 2, 1,\n 3, 1, 1,\n 3, 2, 0\n];\n\nTables.t3HB = [\n 3, 2, 1,\n 1, 1, 1,\n 3, 2, 0\n];\n\nTables.t5HB = [\n 1, 2, 6, 5,\n 3, 1, 4, 4,\n 7, 5, 7, 1,\n 6, 1, 1, 0\n];\n\nTables.t6HB = [\n 7, 3, 5, 1,\n 6, 2, 3, 2,\n 5, 4, 4, 1,\n 3, 3, 2, 0\n];\n\nTables.t7HB = [\n 1, 2, 10, 19, 16, 10,\n 3, 3, 7, 10, 5, 3,\n 11, 4, 13, 17, 8, 4,\n 12, 11, 18, 15, 11, 2,\n 7, 6, 9, 14, 3, 1,\n 6, 4, 5, 3, 2, 0\n];\n\nTables.t8HB = [\n 3, 4, 6, 18, 12, 5,\n 5, 1, 2, 16, 9, 3,\n 7, 3, 5, 14, 7, 3,\n 19, 17, 15, 13, 10, 4,\n 13, 5, 8, 11, 5, 1,\n 12, 4, 4, 1, 1, 0\n];\n\nTables.t9HB = [\n 7, 5, 9, 14, 15, 7,\n 6, 4, 5, 5, 6, 7,\n 7, 6, 8, 8, 8, 5,\n 15, 6, 9, 10, 5, 1,\n 11, 7, 9, 6, 4, 1,\n 14, 4, 6, 2, 6, 0\n];\n\nTables.t10HB = [\n 1, 2, 10, 23, 35, 30, 12, 17,\n 3, 3, 8, 12, 18, 21, 12, 7,\n 11, 9, 15, 21, 32, 40, 19, 6,\n 14, 13, 22, 34, 46, 23, 18, 7,\n 20, 19, 33, 47, 27, 22, 9, 3,\n 31, 22, 41, 26, 21, 20, 5, 3,\n 14, 13, 10, 11, 16, 6, 5, 1,\n 9, 8, 7, 8, 4, 4, 2, 0\n];\n\nTables.t11HB = [\n 3, 4, 10, 24, 34, 33, 21, 15,\n 5, 3, 4, 10, 32, 17, 11, 10,\n 11, 7, 13, 18, 30, 31, 20, 5,\n 25, 11, 19, 59, 27, 18, 12, 5,\n 35, 33, 31, 58, 30, 16, 7, 5,\n 28, 26, 32, 19, 17, 15, 8, 14,\n 14, 12, 9, 13, 14, 9, 4, 1,\n 11, 4, 6, 6, 6, 3, 2, 0\n];\n\nTables.t12HB = [\n 9, 6, 16, 33, 41, 39, 38, 26,\n 7, 5, 6, 9, 23, 16, 26, 11,\n 17, 7, 11, 14, 21, 30, 10, 7,\n 17, 10, 15, 12, 18, 28, 14, 5,\n 32, 13, 22, 19, 18, 16, 9, 5,\n 40, 17, 31, 29, 17, 13, 4, 2,\n 27, 12, 11, 15, 10, 7, 4, 1,\n 27, 12, 8, 12, 6, 3, 1, 0\n];\n\nTables.t13HB = [\n 1, 5, 14, 21, 34, 51, 46, 71, 42, 52, 68, 52, 67, 44, 43, 19,\n 3, 4, 12, 19, 31, 26, 44, 33, 31, 24, 32, 24, 31, 35, 22, 14,\n 15, 13, 23, 36, 59, 49, 77, 65, 29, 40, 30, 40, 27, 33, 42, 16,\n 22, 20, 37, 61, 56, 79, 73, 64, 43, 76, 56, 37, 26, 31, 25, 14,\n 35, 16, 60, 57, 97, 75, 114, 91, 54, 73, 55, 41, 48, 53, 23, 24,\n 58, 27, 50, 96, 76, 70, 93, 84, 77, 58, 79, 29, 74, 49, 41, 17,\n 47, 45, 78, 74, 115, 94, 90, 79, 69, 83, 71, 50, 59, 38, 36, 15,\n 72, 34, 56, 95, 92, 85, 91, 90, 86, 73, 77, 65, 51, 44, 43, 42,\n 43, 20, 30, 44, 55, 78, 72, 87, 78, 61, 46, 54, 37, 30, 20, 16,\n 53, 25, 41, 37, 44, 59, 54, 81, 66, 76, 57, 54, 37, 18, 39, 11,\n 35, 33, 31, 57, 42, 82, 72, 80, 47, 58, 55, 21, 22, 26, 38, 22,\n 53, 25, 23, 38, 70, 60, 51, 36, 55, 26, 34, 23, 27, 14, 9, 7,\n 34, 32, 28, 39, 49, 75, 30, 52, 48, 40, 52, 28, 18, 17, 9, 5,\n 45, 21, 34, 64, 56, 50, 49, 45, 31, 19, 12, 15, 10, 7, 6, 3,\n 48, 23, 20, 39, 36, 35, 53, 21, 16, 23, 13, 10, 6, 1, 4, 2,\n 16, 15, 17, 27, 25, 20, 29, 11, 17, 12, 16, 8, 1, 1, 0, 1\n];\n\nTables.t15HB = [\n 7, 12, 18, 53, 47, 76, 124, 108, 89, 123, 108, 119, 107, 81, 122, 63,\n 13, 5, 16, 27, 46, 36, 61, 51, 42, 70, 52, 83, 65, 41, 59, 36,\n 19, 17, 15, 24, 41, 34, 59, 48, 40, 64, 50, 78, 62, 80, 56, 33,\n 29, 28, 25, 43, 39, 63, 55, 93, 76, 59, 93, 72, 54, 75, 50, 29,\n 52, 22, 42, 40, 67, 57, 95, 79, 72, 57, 89, 69, 49, 66, 46, 27,\n 77, 37, 35, 66, 58, 52, 91, 74, 62, 48, 79, 63, 90, 62, 40, 38,\n 125, 32, 60, 56, 50, 92, 78, 65, 55, 87, 71, 51, 73, 51, 70, 30,\n 109, 53, 49, 94, 88, 75, 66, 122, 91, 73, 56, 42, 64, 44, 21, 25,\n 90, 43, 41, 77, 73, 63, 56, 92, 77, 66, 47, 67, 48, 53, 36, 20,\n 71, 34, 67, 60, 58, 49, 88, 76, 67, 106, 71, 54, 38, 39, 23, 15,\n 109, 53, 51, 47, 90, 82, 58, 57, 48, 72, 57, 41, 23, 27, 62, 9,\n 86, 42, 40, 37, 70, 64, 52, 43, 70, 55, 42, 25, 29, 18, 11, 11,\n 118, 68, 30, 55, 50, 46, 74, 65, 49, 39, 24, 16, 22, 13, 14, 7,\n 91, 44, 39, 38, 34, 63, 52, 45, 31, 52, 28, 19, 14, 8, 9, 3,\n 123, 60, 58, 53, 47, 43, 32, 22, 37, 24, 17, 12, 15, 10, 2, 1,\n 71, 37, 34, 30, 28, 20, 17, 26, 21, 16, 10, 6, 8, 6, 2, 0\n];\n\nTables.t16HB = [\n 1, 5, 14, 44, 74, 63, 110, 93, 172, 149, 138, 242, 225, 195, 376, 17,\n 3, 4, 12, 20, 35, 62, 53, 47, 83, 75, 68, 119, 201, 107, 207, 9,\n 15, 13, 23, 38, 67, 58, 103, 90, 161, 72, 127, 117, 110, 209, 206, 16,\n 45, 21, 39, 69, 64, 114, 99, 87, 158, 140, 252, 212, 199, 387, 365, 26,\n 75, 36, 68, 65, 115, 101, 179, 164, 155, 264, 246, 226, 395, 382, 362, 9,\n 66, 30, 59, 56, 102, 185, 173, 265, 142, 253, 232, 400, 388, 378, 445, 16,\n 111, 54, 52, 100, 184, 178, 160, 133, 257, 244, 228, 217, 385, 366, 715, 10,\n 98, 48, 91, 88, 165, 157, 148, 261, 248, 407, 397, 372, 380, 889, 884, 8,\n 85, 84, 81, 159, 156, 143, 260, 249, 427, 401, 392, 383, 727, 713, 708, 7,\n 154, 76, 73, 141, 131, 256, 245, 426, 406, 394, 384, 735, 359, 710, 352, 11,\n 139, 129, 67, 125, 247, 233, 229, 219, 393, 743, 737, 720, 885, 882, 439, 4,\n 243, 120, 118, 115, 227, 223, 396, 746, 742, 736, 721, 712, 706, 223, 436, 6,\n 202, 224, 222, 218, 216, 389, 386, 381, 364, 888, 443, 707, 440, 437, 1728, 4,\n 747, 211, 210, 208, 370, 379, 734, 723, 714, 1735, 883, 877, 876, 3459, 865, 2,\n 377, 369, 102, 187, 726, 722, 358, 711, 709, 866, 1734, 871, 3458, 870, 434, 0,\n 12, 10, 7, 11, 10, 17, 11, 9, 13, 12, 10, 7, 5, 3, 1, 3\n];\n\nTables.t24HB = [\n 15, 13, 46, 80, 146, 262, 248, 434, 426, 669, 653, 649, 621, 517, 1032, 88,\n 14, 12, 21, 38, 71, 130, 122, 216, 209, 198, 327, 345, 319, 297, 279, 42,\n 47, 22, 41, 74, 68, 128, 120, 221, 207, 194, 182, 340, 315, 295, 541, 18,\n 81, 39, 75, 70, 134, 125, 116, 220, 204, 190, 178, 325, 311, 293, 271, 16,\n 147, 72, 69, 135, 127, 118, 112, 210, 200, 188, 352, 323, 306, 285, 540, 14,\n 263, 66, 129, 126, 119, 114, 214, 202, 192, 180, 341, 317, 301, 281, 262, 12,\n 249, 123, 121, 117, 113, 215, 206, 195, 185, 347, 330, 308, 291, 272, 520, 10,\n 435, 115, 111, 109, 211, 203, 196, 187, 353, 332, 313, 298, 283, 531, 381, 17,\n 427, 212, 208, 205, 201, 193, 186, 177, 169, 320, 303, 286, 268, 514, 377, 16,\n 335, 199, 197, 191, 189, 181, 174, 333, 321, 305, 289, 275, 521, 379, 371, 11,\n 668, 184, 183, 179, 175, 344, 331, 314, 304, 290, 277, 530, 383, 373, 366, 10,\n 652, 346, 171, 168, 164, 318, 309, 299, 287, 276, 263, 513, 375, 368, 362, 6,\n 648, 322, 316, 312, 307, 302, 292, 284, 269, 261, 512, 376, 370, 364, 359, 4,\n 620, 300, 296, 294, 288, 282, 273, 266, 515, 380, 374, 369, 365, 361, 357, 2,\n 1033, 280, 278, 274, 267, 264, 259, 382, 378, 372, 367, 363, 360, 358, 356, 0,\n 43, 20, 19, 17, 15, 13, 11, 9, 7, 6, 4, 7, 5, 3, 1, 3\n];\n\nTables.t32HB = [\n 1 << 0, 5 << 1, 4 << 1, 5 << 2, 6 << 1, 5 << 2, 4 << 2, 4 << 3,\n 7 << 1, 3 << 2, 6 << 2, 0 << 3, 7 << 2, 2 << 3, 3 << 3, 1 << 4\n];\n\nTables.t33HB = [\n 15 << 0, 14 << 1, 13 << 1, 12 << 2, 11 << 1, 10 << 2, 9 << 2, 8 << 3,\n 7 << 1, 6 << 2, 5 << 2, 4 << 3, 3 << 2, 2 << 3, 1 << 3, 0 << 4\n];\n\nTables.t1l = [\n 1, 4,\n 3, 5\n];\n\nTables.t2l = [\n 1, 4, 7,\n 4, 5, 7,\n 6, 7, 8\n];\n\nTables.t3l = [\n 2, 3, 7,\n 4, 4, 7,\n 6, 7, 8\n];\n\nTables.t5l = [\n 1, 4, 7, 8,\n 4, 5, 8, 9,\n 7, 8, 9, 10,\n 8, 8, 9, 10\n];\n\nTables.t6l = [\n 3, 4, 6, 8,\n 4, 4, 6, 7,\n 5, 6, 7, 8,\n 7, 7, 8, 9\n];\n\nTables.t7l = [\n 1, 4, 7, 9, 9, 10,\n 4, 6, 8, 9, 9, 10,\n 7, 7, 9, 10, 10, 11,\n 8, 9, 10, 11, 11, 11,\n 8, 9, 10, 11, 11, 12,\n 9, 10, 11, 12, 12, 12\n];\n\nTables.t8l = [\n 2, 4, 7, 9, 9, 10,\n 4, 4, 6, 10, 10, 10,\n 7, 6, 8, 10, 10, 11,\n 9, 10, 10, 11, 11, 12,\n 9, 9, 10, 11, 12, 12,\n 10, 10, 11, 11, 13, 13\n];\n\nTables.t9l = [\n 3, 4, 6, 7, 9, 10,\n 4, 5, 6, 7, 8, 10,\n 5, 6, 7, 8, 9, 10,\n 7, 7, 8, 9, 9, 10,\n 8, 8, 9, 9, 10, 11,\n 9, 9, 10, 10, 11, 11\n];\n\nTables.t10l = [\n 1, 4, 7, 9, 10, 10, 10, 11,\n 4, 6, 8, 9, 10, 11, 10, 10,\n 7, 8, 9, 10, 11, 12, 11, 11,\n 8, 9, 10, 11, 12, 12, 11, 12,\n 9, 10, 11, 12, 12, 12, 12, 12,\n 10, 11, 12, 12, 13, 13, 12, 13,\n 9, 10, 11, 12, 12, 12, 13, 13,\n 10, 10, 11, 12, 12, 13, 13, 13\n];\n\nTables.t11l = [\n 2, 4, 6, 8, 9, 10, 9, 10,\n 4, 5, 6, 8, 10, 10, 9, 10,\n 6, 7, 8, 9, 10, 11, 10, 10,\n 8, 8, 9, 11, 10, 12, 10, 11,\n 9, 10, 10, 11, 11, 12, 11, 12,\n 9, 10, 11, 12, 12, 13, 12, 13,\n 9, 9, 9, 10, 11, 12, 12, 12,\n 9, 9, 10, 11, 12, 12, 12, 12\n];\n\nTables.t12l = [\n 4, 4, 6, 8, 9, 10, 10, 10,\n 4, 5, 6, 7, 9, 9, 10, 10,\n 6, 6, 7, 8, 9, 10, 9, 10,\n 7, 7, 8, 8, 9, 10, 10, 10,\n 8, 8, 9, 9, 10, 10, 10, 11,\n 9, 9, 10, 10, 10, 11, 10, 11,\n 9, 9, 9, 10, 10, 11, 11, 12,\n 10, 10, 10, 11, 11, 11, 11, 12\n];\n\nTables.t13l = [\n 1, 5, 7, 8, 9, 10, 10, 11, 10, 11, 12, 12, 13, 13, 14, 14,\n 4, 6, 8, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 14, 14, 14,\n 7, 8, 9, 10, 11, 11, 12, 12, 11, 12, 12, 13, 13, 14, 15, 15,\n 8, 9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15,\n 9, 9, 11, 11, 12, 12, 13, 13, 12, 13, 13, 14, 14, 15, 15, 16,\n 10, 10, 11, 12, 12, 12, 13, 13, 13, 13, 14, 13, 15, 15, 16, 16,\n 10, 11, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16,\n 11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 18, 18,\n 10, 10, 11, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 17, 17,\n 11, 11, 12, 12, 13, 13, 13, 15, 14, 15, 15, 16, 16, 16, 18, 17,\n 11, 12, 12, 13, 13, 14, 14, 15, 14, 15, 16, 15, 16, 17, 18, 19,\n 12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18,\n 12, 13, 13, 14, 14, 15, 14, 15, 16, 16, 17, 17, 17, 18, 18, 18,\n 13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 17, 18, 18,\n 14, 14, 14, 15, 15, 15, 17, 16, 16, 19, 17, 17, 17, 19, 18, 18,\n 13, 14, 15, 16, 16, 16, 17, 16, 17, 17, 18, 18, 21, 20, 21, 18\n];\n\nTables.t15l = [\n 3, 5, 6, 8, 8, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 14,\n 5, 5, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13,\n 6, 7, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13,\n 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13,\n 8, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13,\n 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 14,\n 10, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14,\n 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14,\n 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14,\n 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14,\n 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 14,\n 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15,\n 12, 12, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15,\n 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15,\n 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 15,\n 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15\n];\n\nTables.t16_5l = [\n 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 11,\n 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 11,\n 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 12,\n 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 13,\n 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 12,\n 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 13,\n 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 13,\n 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 13,\n 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 13,\n 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 14,\n 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 13,\n 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 14,\n 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 14,\n 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 14,\n 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 14,\n 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 12\n];\n\nTables.t16l = [\n 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 10,\n 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 10,\n 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 11,\n 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 12,\n 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 11,\n 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 12,\n 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 12,\n 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 12,\n 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 12,\n 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 13,\n 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 12,\n 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 13,\n 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 13,\n 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 13,\n 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 13,\n 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10\n];\n\nTables.t24l = [\n 4, 5, 7, 8, 9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 10,\n 5, 6, 7, 8, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 10,\n 7, 7, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 9,\n 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 9,\n 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 9,\n 10, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 9,\n 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 9,\n 11, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 10,\n 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 10,\n 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 10,\n 12, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10,\n 12, 12, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10,\n 13, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 10,\n 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 6\n];\n\nTables.t32l = [\n 1 + 0, 4 + 1, 4 + 1, 5 + 2, 4 + 1, 6 + 2, 5 + 2, 6 + 3,\n 4 + 1, 5 + 2, 5 + 2, 6 + 3, 5 + 2, 6 + 3, 6 + 3, 6 + 4\n];\n\nTables.t33l = [\n 4 + 0, 4 + 1, 4 + 1, 4 + 2, 4 + 1, 4 + 2, 4 + 2, 4 + 3,\n 4 + 1, 4 + 2, 4 + 2, 4 + 3, 4 + 2, 4 + 3, 4 + 3, 4 + 4\n];\n\nTables.ht = [\n /* xlen, linmax, table, hlen */\n new HuffCodeTab(0, 0, null, null),\n new HuffCodeTab(2, 0, Tables.t1HB, Tables.t1l),\n new HuffCodeTab(3, 0, Tables.t2HB, Tables.t2l),\n new HuffCodeTab(3, 0, Tables.t3HB, Tables.t3l),\n new HuffCodeTab(0, 0, null, null), /* Apparently not used */\n new HuffCodeTab(4, 0, Tables.t5HB, Tables.t5l),\n new HuffCodeTab(4, 0, Tables.t6HB, Tables.t6l),\n new HuffCodeTab(6, 0, Tables.t7HB, Tables.t7l),\n new HuffCodeTab(6, 0, Tables.t8HB, Tables.t8l),\n new HuffCodeTab(6, 0, Tables.t9HB, Tables.t9l),\n new HuffCodeTab(8, 0, Tables.t10HB, Tables.t10l),\n new HuffCodeTab(8, 0, Tables.t11HB, Tables.t11l),\n new HuffCodeTab(8, 0, Tables.t12HB, Tables.t12l),\n new HuffCodeTab(16, 0, Tables.t13HB, Tables.t13l),\n new HuffCodeTab(0, 0, null, Tables.t16_5l), /* Apparently not used */\n new HuffCodeTab(16, 0, Tables.t15HB, Tables.t15l),\n\n new HuffCodeTab(1, 1, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(2, 3, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(3, 7, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(4, 15, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(6, 63, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(8, 255, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(10, 1023, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(13, 8191, Tables.t16HB, Tables.t16l),\n\n new HuffCodeTab(4, 15, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(5, 31, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(6, 63, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(7, 127, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(8, 255, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(9, 511, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(11, 2047, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(13, 8191, Tables.t24HB, Tables.t24l),\n\n new HuffCodeTab(0, 0, Tables.t32HB, Tables.t32l),\n new HuffCodeTab(0, 0, Tables.t33HB, Tables.t33l),\n];\n\n/**\n * \n * for (i = 0; i < 16*16; i++) [\n * largetbl[i] = ((ht[16].hlen[i]) << 16) + ht[24].hlen[i];\n * ]\n * \n *\n */\nTables.largetbl = [\n 0x010004, 0x050005, 0x070007, 0x090008, 0x0a0009, 0x0a000a, 0x0b000a, 0x0b000b,\n 0x0c000b, 0x0c000c, 0x0c000c, 0x0d000c, 0x0d000c, 0x0d000c, 0x0e000d, 0x0a000a,\n 0x040005, 0x060006, 0x080007, 0x090008, 0x0a0009, 0x0b000a, 0x0b000a, 0x0b000b,\n 0x0c000b, 0x0c000b, 0x0c000c, 0x0d000c, 0x0e000c, 0x0d000c, 0x0e000c, 0x0a000a,\n 0x070007, 0x080007, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000b,\n 0x0d000b, 0x0c000b, 0x0d000b, 0x0d000c, 0x0d000c, 0x0e000c, 0x0e000d, 0x0b0009,\n 0x090008, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0c000b,\n 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0c0009,\n 0x0a0009, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000a, 0x0d000b,\n 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000d, 0x0b0009,\n 0x0a000a, 0x0a0009, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0e000b,\n 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0c0009,\n 0x0b000a, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0d000b, 0x0d000b,\n 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000d, 0x0c0009,\n 0x0b000b, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b,\n 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x11000d, 0x11000d, 0x0c000a,\n 0x0b000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b,\n 0x0f000b, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000d, 0x10000d, 0x0c000a,\n 0x0c000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b, 0x0f000c,\n 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0f000d, 0x10000d, 0x0f000d, 0x0d000a,\n 0x0c000c, 0x0d000b, 0x0c000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c,\n 0x0f000c, 0x10000c, 0x10000c, 0x10000d, 0x11000d, 0x11000d, 0x10000d, 0x0c000a,\n 0x0d000c, 0x0d000c, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x10000c,\n 0x10000c, 0x10000c, 0x10000c, 0x10000d, 0x10000d, 0x0f000d, 0x10000d, 0x0d000a,\n 0x0d000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c,\n 0x0f000c, 0x11000c, 0x10000d, 0x10000d, 0x10000d, 0x10000d, 0x12000d, 0x0d000a,\n 0x0f000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000c,\n 0x10000d, 0x12000d, 0x11000d, 0x11000d, 0x11000d, 0x13000d, 0x11000d, 0x0d000a,\n 0x0e000d, 0x0f000c, 0x0d000c, 0x0e000c, 0x10000c, 0x10000c, 0x0f000c, 0x10000d,\n 0x10000d, 0x11000d, 0x12000d, 0x11000d, 0x13000d, 0x11000d, 0x10000d, 0x0d000a,\n 0x0a0009, 0x0a0009, 0x0a0009, 0x0b0009, 0x0b0009, 0x0c0009, 0x0c0009, 0x0c0009,\n 0x0d0009, 0x0d0009, 0x0d0009, 0x0d000a, 0x0d000a, 0x0d000a, 0x0d000a, 0x0a0006\n];\n/**\n * \n * for (i = 0; i < 3*3; i++) [\n * table23[i] = ((ht[2].hlen[i]) << 16) + ht[3].hlen[i];\n * ]\n * \n *\n */\nTables.table23 = [\n 0x010002, 0x040003, 0x070007,\n 0x040004, 0x050004, 0x070007,\n 0x060006, 0x070007, 0x080008\n];\n\n/**\n * \n * for (i = 0; i < 4*4; i++) [\n * table56[i] = ((ht[5].hlen[i]) << 16) + ht[6].hlen[i];\n * ]\n * \n *\n */\nTables.table56 = [\n 0x010003, 0x040004, 0x070006, 0x080008, 0x040004, 0x050004, 0x080006, 0x090007,\n 0x070005, 0x080006, 0x090007, 0x0a0008, 0x080007, 0x080007, 0x090008, 0x0a0009\n];\n\nTables.bitrate_table = [\n [0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1], /* MPEG 2 */\n [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1], /* MPEG 1 */\n [0, 8, 16, 24, 32, 40, 48, 56, 64, -1, -1, -1, -1, -1, -1, -1], /* MPEG 2.5 */\n];\n\n/**\n * MPEG 2, MPEG 1, MPEG 2.5.\n */\nTables.samplerate_table = [\n [22050, 24000, 16000, -1],\n [44100, 48000, 32000, -1],\n [11025, 12000, 8000, -1],\n];\n\n/**\n * This is the scfsi_band table from 2.4.2.7 of the IS.\n */\nTables.scfsi_band = [0, 6, 11, 16, 21];\n\nmodule.exports = Tables;\n","/*\n * quantize_pvt source file\n *\n * Copyright (c) 1999-2002 Takehiro Tominaga\n * Copyright (c) 2000-2002 Robert Hegemann\n * Copyright (c) 2001 Naoki Shibata\n * Copyright (c) 2002-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: QuantizePVT.java,v 1.24 2011/05/24 20:48:06 kenchis Exp $ */\nvar ScaleFac = require('./ScaleFac.js');\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\nvar MeanBits = require('./MeanBits.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nQuantizePVT.Q_MAX = (256 + 1);\nQuantizePVT.Q_MAX2 = 116;\nQuantizePVT.LARGE_BITS = 100000;\nQuantizePVT.IXMAX_VAL = 8206;\n\nfunction QuantizePVT() {\n\n var tak = null;\n var rv = null;\n var psy = null;\n\n this.setModules = function (_tk, _rv, _psy) {\n tak = _tk;\n rv = _rv;\n psy = _psy;\n };\n\n function POW20(x) {\n assert(0 <= (x + QuantizePVT.Q_MAX2) && x < QuantizePVT.Q_MAX);\n return pow20[x + QuantizePVT.Q_MAX2];\n }\n\n this.IPOW20 = function (x) {\n assert(0 <= x && x < QuantizePVT.Q_MAX);\n return ipow20[x];\n }\n\n /**\n * smallest such that 1.0+DBL_EPSILON != 1.0\n */\n var DBL_EPSILON = 2.2204460492503131e-016;\n\n /**\n * ix always <= 8191+15. see count_bits()\n */\n var IXMAX_VAL = QuantizePVT.IXMAX_VAL;\n\n var PRECALC_SIZE = (IXMAX_VAL + 2);\n\n var Q_MAX = QuantizePVT.Q_MAX;\n\n\n /**\n * \n * minimum possible number of\n * -cod_info.global_gain + ((scalefac[] + (cod_info.preflag ? pretab[sfb] : 0))\n * << (cod_info.scalefac_scale + 1)) + cod_info.subblock_gain[cod_info.window[sfb]] * 8;\n *\n * for long block, 0+((15+3)<<2) = 18*4 = 72\n * for short block, 0+(15<<2)+7*8 = 15*4+56 = 116\n * \n */\n var Q_MAX2 = QuantizePVT.Q_MAX2;\n\n var LARGE_BITS = QuantizePVT.LARGE_BITS;\n\n\n /**\n * Assuming dynamic range=96dB, this value should be 92\n */\n var NSATHSCALE = 100;\n\n /**\n * The following table is used to implement the scalefactor partitioning for\n * MPEG2 as described in section 2.4.3.2 of the IS. The indexing corresponds\n * to the way the tables are presented in the IS:\n *\n * [table_number][row_in_table][column of nr_of_sfb]\n */\n this.nr_of_sfb_block = [\n [[6, 5, 5, 5], [9, 9, 9, 9], [6, 9, 9, 9]],\n [[6, 5, 7, 3], [9, 9, 12, 6], [6, 9, 12, 6]],\n [[11, 10, 0, 0], [18, 18, 0, 0], [15, 18, 0, 0]],\n [[7, 7, 7, 0], [12, 12, 12, 0], [6, 15, 12, 0]],\n [[6, 6, 6, 3], [12, 9, 9, 6], [6, 12, 9, 6]],\n [[8, 8, 5, 0], [15, 12, 9, 0], [6, 18, 9, 0]]];\n\n /**\n * Table B.6: layer3 preemphasis\n */\n var pretab = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n 2, 2, 3, 3, 3, 2, 0];\n this.pretab = pretab;\n\n /**\n * Here are MPEG1 Table B.8 and MPEG2 Table B.1 -- Layer III scalefactor\n * bands.
\n * Index into this using a method such as:
\n * idx = fr_ps.header.sampling_frequency + (fr_ps.header.version * 3)\n */\n this.sfBandIndex = [\n // Table B.2.b: 22.05 kHz\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132, 174, 192]\n , [0, 0, 0, 0, 0, 0, 0] // sfb21 pseudo sub bands\n , [0, 0, 0, 0, 0, 0, 0] // sfb12 pseudo sub bands\n ),\n /* Table B.2.c: 24 kHz */ /* docs: 332. mpg123(broken): 330 */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232, 278, 332, 394, 464,\n 540, 576],\n [0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136, 180, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.2.a: 16 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.b: 44.1 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 52, 62, 74, 90, 110, 134, 162, 196, 238, 288, 342, 418,\n 576],\n [0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84, 106, 136, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.c: 48 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 60, 72, 88, 106, 128, 156, 190, 230, 276, 330, 384,\n 576],\n [0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80, 100, 126, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.a: 32 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 54, 66, 82, 102, 126, 156, 194, 240, 296, 364, 448, 550,\n 576],\n [0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138, 180, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 11.025 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3,\n 402 / 3, 522 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 12 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3,\n 402 / 3, 522 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 8 kHz */\n new ScaleFac([0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 160, 192, 232, 280, 336, 400, 476, 566, 568, 570,\n 572, 574, 576],\n [0 / 3, 24 / 3, 48 / 3, 72 / 3, 108 / 3, 156 / 3, 216 / 3, 288 / 3, 372 / 3, 480 / 3, 486 / 3,\n 492 / 3, 498 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n )\n ];\n\n var pow20 = new_float(Q_MAX + Q_MAX2 + 1);\n var ipow20 = new_float(Q_MAX);\n var pow43 = new_float(PRECALC_SIZE);\n\n var adj43 = new_float(PRECALC_SIZE);\n this.adj43 = adj43;\n\n /**\n *
\n     * compute the ATH for each scalefactor band cd range: 0..96db\n     *\n     * Input: 3.3kHz signal 32767 amplitude (3.3kHz is where ATH is smallest =\n     * -5db) longblocks: sfb=12 en0/bw=-11db max_en0 = 1.3db shortblocks: sfb=5\n     * -9db 0db\n     *\n     * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) longblocks: amp=1\n     * sfb=12 en0/bw=-103 db max_en0 = -92db amp=32767 sfb=12 -12 db -1.4db\n     *\n     * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) shortblocks: amp=1\n     * sfb=5 en0/bw= -99 -86 amp=32767 sfb=5 -9 db 4db\n     *\n     *\n     * MAX energy of largest wave at 3.3kHz = 1db AVE energy of largest wave at\n     * 3.3kHz = -11db Let's take AVE: -11db = maximum signal in sfb=12. Dynamic\n     * range of CD: 96db. Therefor energy of smallest audible wave in sfb=12 =\n     * -11 - 96 = -107db = ATH at 3.3kHz.\n     *\n     * ATH formula for this wave: -5db. To adjust to LAME scaling, we need ATH =\n     * ATH_formula - 103 (db) ATH = ATH * 2.5e-10 (ener)\n     * 
\n */\n function ATHmdct(gfp, f) {\n var ath = psy.ATHformula(f, gfp);\n\n ath -= NSATHSCALE;\n\n /* modify the MDCT scaling for the ATH and convert to energy */\n ath = Math.pow(10.0, ath / 10.0 + gfp.ATHlower);\n return ath;\n }\n\n function compute_ath(gfp) {\n var ATH_l = gfp.internal_flags.ATH.l;\n var ATH_psfb21 = gfp.internal_flags.ATH.psfb21;\n var ATH_s = gfp.internal_flags.ATH.s;\n var ATH_psfb12 = gfp.internal_flags.ATH.psfb12;\n var gfc = gfp.internal_flags;\n var samp_freq = gfp.out_samplerate;\n\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n var start = gfc.scalefac_band.l[sfb];\n var end = gfc.scalefac_band.l[sfb + 1];\n ATH_l[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 576);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_l[sfb] = Math.min(ATH_l[sfb], ATH_f);\n }\n }\n\n for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {\n var start = gfc.scalefac_band.psfb21[sfb];\n var end = gfc.scalefac_band.psfb21[sfb + 1];\n ATH_psfb21[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 576);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_psfb21[sfb] = Math.min(ATH_psfb21[sfb], ATH_f);\n }\n }\n\n for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n ATH_s[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 192);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_s[sfb] = Math.min(ATH_s[sfb], ATH_f);\n }\n ATH_s[sfb] *= (gfc.scalefac_band.s[sfb + 1] - gfc.scalefac_band.s[sfb]);\n }\n\n for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {\n var start = gfc.scalefac_band.psfb12[sfb];\n var end = gfc.scalefac_band.psfb12[sfb + 1];\n ATH_psfb12[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 192);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_psfb12[sfb] = Math.min(ATH_psfb12[sfb], ATH_f);\n }\n /* not sure about the following */\n ATH_psfb12[sfb] *= (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]);\n }\n\n /*\n * no-ATH mode: reduce ATH to -200 dB\n */\n if (gfp.noATH) {\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n ATH_l[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {\n ATH_psfb21[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {\n ATH_s[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {\n ATH_psfb12[sfb] = 1E-20;\n }\n }\n\n /*\n * work in progress, don't rely on it too much\n */\n gfc.ATH.floor = 10. * Math.log10(ATHmdct(gfp, -1.));\n }\n\n /**\n * initialization for iteration_loop\n */\n this.iteration_init = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n var i;\n\n if (gfc.iteration_init_init == 0) {\n gfc.iteration_init_init = 1;\n\n l3_side.main_data_begin = 0;\n compute_ath(gfp);\n\n pow43[0] = 0.0;\n for (i = 1; i < PRECALC_SIZE; i++)\n pow43[i] = Math.pow(i, 4.0 / 3.0);\n\n for (i = 0; i < PRECALC_SIZE - 1; i++)\n adj43[i] = ((i + 1) - Math.pow(\n 0.5 * (pow43[i] + pow43[i + 1]), 0.75));\n adj43[i] = 0.5;\n\n for (i = 0; i < Q_MAX; i++)\n ipow20[i] = Math.pow(2.0, (i - 210) * -0.1875);\n for (i = 0; i <= Q_MAX + Q_MAX2; i++)\n pow20[i] = Math.pow(2.0, (i - 210 - Q_MAX2) * 0.25);\n\n tak.huffman_init(gfc);\n\n {\n var bass, alto, treble, sfb21;\n\n i = (gfp.exp_nspsytune >> 2) & 63;\n if (i >= 32)\n i -= 64;\n bass = Math.pow(10, i / 4.0 / 10.0);\n\n i = (gfp.exp_nspsytune >> 8) & 63;\n if (i >= 32)\n i -= 64;\n alto = Math.pow(10, i / 4.0 / 10.0);\n\n i = (gfp.exp_nspsytune >> 14) & 63;\n if (i >= 32)\n i -= 64;\n treble = Math.pow(10, i / 4.0 / 10.0);\n\n /*\n * to be compatible with Naoki's original code, the next 6 bits\n * define only the amount of changing treble for sfb21\n */\n i = (gfp.exp_nspsytune >> 20) & 63;\n if (i >= 32)\n i -= 64;\n sfb21 = treble * Math.pow(10, i / 4.0 / 10.0);\n for (i = 0; i < Encoder.SBMAX_l; i++) {\n var f;\n if (i <= 6)\n f = bass;\n else if (i <= 13)\n f = alto;\n else if (i <= 20)\n f = treble;\n else\n f = sfb21;\n\n gfc.nsPsy.longfact[i] = f;\n }\n for (i = 0; i < Encoder.SBMAX_s; i++) {\n var f;\n if (i <= 5)\n f = bass;\n else if (i <= 10)\n f = alto;\n else if (i <= 11)\n f = treble;\n else\n f = sfb21;\n\n gfc.nsPsy.shortfact[i] = f;\n }\n }\n }\n }\n\n /**\n * allocate bits among 2 channels based on PE
\n * mt 6/99
\n * bugfixes rh 8/01: often allocated more than the allowed 4095 bits\n */\n this.on_pe = function (gfp, pe,\n targ_bits, mean_bits, gr, cbr) {\n var gfc = gfp.internal_flags;\n var tbits = 0, bits;\n var add_bits = new_int(2);\n var ch;\n\n /* allocate targ_bits for granule */\n var mb = new MeanBits(tbits);\n var extra_bits = rv.ResvMaxBits(gfp, mean_bits, mb, cbr);\n tbits = mb.bits;\n /* maximum allowed bits for this granule */\n var max_bits = tbits + extra_bits;\n if (max_bits > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n // hard limit per granule\n max_bits = LameInternalFlags.MAX_BITS_PER_GRANULE;\n }\n for (bits = 0, ch = 0; ch < gfc.channels_out; ++ch) {\n /******************************************************************\n * allocate bits for each channel\n ******************************************************************/\n targ_bits[ch] = Math.min(LameInternalFlags.MAX_BITS_PER_CHANNEL,\n tbits / gfc.channels_out);\n\n add_bits[ch] = 0 | (targ_bits[ch] * pe[gr][ch] / 700.0 - targ_bits[ch]);\n\n /* at most increase bits by 1.5*average */\n if (add_bits[ch] > mean_bits * 3 / 4)\n add_bits[ch] = mean_bits * 3 / 4;\n if (add_bits[ch] < 0)\n add_bits[ch] = 0;\n\n if (add_bits[ch] + targ_bits[ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL)\n add_bits[ch] = Math.max(0,\n LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[ch]);\n\n bits += add_bits[ch];\n }\n if (bits > extra_bits) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n add_bits[ch] = extra_bits * add_bits[ch] / bits;\n }\n }\n\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[ch] += add_bits[ch];\n extra_bits -= add_bits[ch];\n }\n\n for (bits = 0, ch = 0; ch < gfc.channels_out; ++ch) {\n bits += targ_bits[ch];\n }\n if (bits > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n var sum = 0;\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[ch] *= LameInternalFlags.MAX_BITS_PER_GRANULE;\n targ_bits[ch] /= bits;\n sum += targ_bits[ch];\n }\n assert(sum <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n }\n\n return max_bits;\n }\n\n this.reduce_side = function (targ_bits, ms_ener_ratio, mean_bits, max_bits) {\n assert(max_bits <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n assert(targ_bits[0] + targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n\n /*\n * ms_ener_ratio = 0: allocate 66/33 mid/side fac=.33 ms_ener_ratio =.5:\n * allocate 50/50 mid/side fac= 0\n */\n /* 75/25 split is fac=.5 */\n var fac = .33 * (.5 - ms_ener_ratio) / .5;\n if (fac < 0)\n fac = 0;\n if (fac > .5)\n fac = .5;\n\n /* number of bits to move from side channel to mid channel */\n /* move_bits = fac*targ_bits[1]; */\n var move_bits = 0 | (fac * .5 * (targ_bits[0] + targ_bits[1]));\n\n if (move_bits > LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[0]) {\n move_bits = LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[0];\n }\n if (move_bits < 0)\n move_bits = 0;\n\n if (targ_bits[1] >= 125) {\n /* dont reduce side channel below 125 bits */\n if (targ_bits[1] - move_bits > 125) {\n\n /* if mid channel already has 2x more than average, dont bother */\n /* mean_bits = bits per granule (for both channels) */\n if (targ_bits[0] < mean_bits)\n targ_bits[0] += move_bits;\n targ_bits[1] -= move_bits;\n } else {\n targ_bits[0] += targ_bits[1] - 125;\n targ_bits[1] = 125;\n }\n }\n\n move_bits = targ_bits[0] + targ_bits[1];\n if (move_bits > max_bits) {\n targ_bits[0] = (max_bits * targ_bits[0]) / move_bits;\n targ_bits[1] = (max_bits * targ_bits[1]) / move_bits;\n }\n assert(targ_bits[0] <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n assert(targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n assert(targ_bits[0] + targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n };\n\n /**\n * Robert Hegemann 2001-04-27:\n * this adjusts the ATH, keeping the original noise floor\n * affects the higher frequencies more than the lower ones\n */\n this.athAdjust = function (a, x, athFloor) {\n /*\n * work in progress\n */\n var o = 90.30873362;\n var p = 94.82444863;\n var u = Util.FAST_LOG10_X(x, 10.0);\n var v = a * a;\n var w = 0.0;\n u -= athFloor;\n /* undo scaling */\n if (v > 1E-20)\n w = 1. + Util.FAST_LOG10_X(v, 10.0 / o);\n if (w < 0)\n w = 0.;\n u *= w;\n u += athFloor + o - p;\n /* redo scaling */\n\n return Math.pow(10., 0.1 * u);\n };\n\n /**\n * Calculate the allowed distortion for each scalefactor band, as determined\n * by the psychoacoustic model. xmin(sb) = ratio(sb) * en(sb) / bw(sb)\n *\n * returns number of sfb's with energy > ATH\n */\n this.calc_xmin = function (gfp, ratio, cod_info, pxmin) {\n var pxminPos = 0;\n var gfc = gfp.internal_flags;\n var gsfb, j = 0, ath_over = 0;\n var ATH = gfc.ATH;\n var xr = cod_info.xr;\n var enable_athaa_fix = (gfp.VBR == VbrMode.vbr_mtrh) ? 1 : 0;\n var masking_lower = gfc.masking_lower;\n\n if (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) {\n /* was already done in PSY-Model */\n masking_lower = 1.0;\n }\n\n for (gsfb = 0; gsfb < cod_info.psy_lmax; gsfb++) {\n var en0, xmin;\n var rh1, rh2;\n var width, l;\n\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n xmin = athAdjust(ATH.adjust, ATH.l[gsfb], ATH.floor);\n else\n xmin = ATH.adjust * ATH.l[gsfb];\n\n width = cod_info.width[gsfb];\n rh1 = xmin / width;\n rh2 = DBL_EPSILON;\n l = width >> 1;\n en0 = 0.0;\n do {\n var xa, xb;\n xa = xr[j] * xr[j];\n en0 += xa;\n rh2 += (xa < rh1) ? xa : rh1;\n j++;\n xb = xr[j] * xr[j];\n en0 += xb;\n rh2 += (xb < rh1) ? xb : rh1;\n j++;\n } while (--l > 0);\n if (en0 > xmin)\n ath_over++;\n\n if (gsfb == Encoder.SBPSY_l) {\n var x = xmin * gfc.nsPsy.longfact[gsfb];\n if (rh2 < x) {\n rh2 = x;\n }\n }\n if (enable_athaa_fix != 0) {\n xmin = rh2;\n }\n if (!gfp.ATHonly) {\n var e = ratio.en.l[gsfb];\n if (e > 0.0) {\n var x;\n x = en0 * ratio.thm.l[gsfb] * masking_lower / e;\n if (enable_athaa_fix != 0)\n x *= gfc.nsPsy.longfact[gsfb];\n if (xmin < x)\n xmin = x;\n }\n }\n if (enable_athaa_fix != 0)\n pxmin[pxminPos++] = xmin;\n else\n pxmin[pxminPos++] = xmin * gfc.nsPsy.longfact[gsfb];\n }\n /* end of long block loop */\n\n /* use this function to determine the highest non-zero coeff */\n var max_nonzero = 575;\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type, but not SHORT\n var k = 576;\n while (k-- != 0 && BitStream.EQ(xr[k], 0)) {\n max_nonzero = k;\n }\n }\n cod_info.max_nonzero_coeff = max_nonzero;\n\n for (var sfb = cod_info.sfb_smin; gsfb < cod_info.psymax; sfb++, gsfb += 3) {\n var width, b;\n var tmpATH;\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n tmpATH = athAdjust(ATH.adjust, ATH.s[sfb], ATH.floor);\n else\n tmpATH = ATH.adjust * ATH.s[sfb];\n\n width = cod_info.width[gsfb];\n for (b = 0; b < 3; b++) {\n var en0 = 0.0, xmin;\n var rh1, rh2;\n var l = width >> 1;\n\n rh1 = tmpATH / width;\n rh2 = DBL_EPSILON;\n do {\n var xa, xb;\n xa = xr[j] * xr[j];\n en0 += xa;\n rh2 += (xa < rh1) ? xa : rh1;\n j++;\n xb = xr[j] * xr[j];\n en0 += xb;\n rh2 += (xb < rh1) ? xb : rh1;\n j++;\n } while (--l > 0);\n if (en0 > tmpATH)\n ath_over++;\n if (sfb == Encoder.SBPSY_s) {\n var x = tmpATH * gfc.nsPsy.shortfact[sfb];\n if (rh2 < x) {\n rh2 = x;\n }\n }\n if (enable_athaa_fix != 0)\n xmin = rh2;\n else\n xmin = tmpATH;\n\n if (!gfp.ATHonly && !gfp.ATHshort) {\n var e = ratio.en.s[sfb][b];\n if (e > 0.0) {\n var x;\n x = en0 * ratio.thm.s[sfb][b] * masking_lower / e;\n if (enable_athaa_fix != 0)\n x *= gfc.nsPsy.shortfact[sfb];\n if (xmin < x)\n xmin = x;\n }\n }\n if (enable_athaa_fix != 0)\n pxmin[pxminPos++] = xmin;\n else\n pxmin[pxminPos++] = xmin * gfc.nsPsy.shortfact[sfb];\n }\n /* b */\n if (gfp.useTemporal) {\n if (pxmin[pxminPos - 3] > pxmin[pxminPos - 3 + 1])\n pxmin[pxminPos - 3 + 1] += (pxmin[pxminPos - 3] - pxmin[pxminPos - 3 + 1])\n * gfc.decay;\n if (pxmin[pxminPos - 3 + 1] > pxmin[pxminPos - 3 + 2])\n pxmin[pxminPos - 3 + 2] += (pxmin[pxminPos - 3 + 1] - pxmin[pxminPos - 3 + 2])\n * gfc.decay;\n }\n }\n /* end of short block sfb loop */\n\n return ath_over;\n };\n\n function StartLine(j) {\n this.s = j;\n }\n\n this.calc_noise_core = function (cod_info, startline, l, step) {\n var noise = 0;\n var j = startline.s;\n var ix = cod_info.l3_enc;\n\n if (j > cod_info.count1) {\n while ((l--) != 0) {\n var temp;\n temp = cod_info.xr[j];\n j++;\n noise += temp * temp;\n temp = cod_info.xr[j];\n j++;\n noise += temp * temp;\n }\n } else if (j > cod_info.big_values) {\n var ix01 = new_float(2);\n ix01[0] = 0;\n ix01[1] = step;\n while ((l--) != 0) {\n var temp;\n temp = Math.abs(cod_info.xr[j]) - ix01[ix[j]];\n j++;\n noise += temp * temp;\n temp = Math.abs(cod_info.xr[j]) - ix01[ix[j]];\n j++;\n noise += temp * temp;\n }\n } else {\n while ((l--) != 0) {\n var temp;\n temp = Math.abs(cod_info.xr[j]) - pow43[ix[j]] * step;\n j++;\n noise += temp * temp;\n temp = Math.abs(cod_info.xr[j]) - pow43[ix[j]] * step;\n j++;\n noise += temp * temp;\n }\n }\n\n startline.s = j;\n return noise;\n }\n\n /**\n *
\n     * -oo dB  =>  -1.00\n     * - 6 dB  =>  -0.97\n     * - 3 dB  =>  -0.80\n     * - 2 dB  =>  -0.64\n     * - 1 dB  =>  -0.38\n     *   0 dB  =>   0.00\n     * + 1 dB  =>  +0.49\n     * + 2 dB  =>  +1.06\n     * + 3 dB  =>  +1.68\n     * + 6 dB  =>  +3.69\n     * +10 dB  =>  +6.45\n     * 
\n */\n this.calc_noise = function (cod_info, l3_xmin, distort, res, prev_noise) {\n var distortPos = 0;\n var l3_xminPos = 0;\n var sfb, l, over = 0;\n var over_noise_db = 0;\n /* 0 dB relative to masking */\n var tot_noise_db = 0;\n /* -200 dB relative to masking */\n var max_noise = -20.0;\n var j = 0;\n var scalefac = cod_info.scalefac;\n var scalefacPos = 0;\n\n res.over_SSD = 0;\n\n for (sfb = 0; sfb < cod_info.psymax; sfb++) {\n var s = cod_info.global_gain\n - (((scalefac[scalefacPos++]) + (cod_info.preflag != 0 ? pretab[sfb]\n : 0)) << (cod_info.scalefac_scale + 1))\n - cod_info.subblock_gain[cod_info.window[sfb]] * 8;\n var noise = 0.0;\n\n if (prev_noise != null && (prev_noise.step[sfb] == s)) {\n\n /* use previously computed values */\n noise = prev_noise.noise[sfb];\n j += cod_info.width[sfb];\n distort[distortPos++] = noise / l3_xmin[l3_xminPos++];\n\n noise = prev_noise.noise_log[sfb];\n\n } else {\n var step = POW20(s);\n l = cod_info.width[sfb] >> 1;\n\n if ((j + cod_info.width[sfb]) > cod_info.max_nonzero_coeff) {\n var usefullsize;\n usefullsize = cod_info.max_nonzero_coeff - j + 1;\n\n if (usefullsize > 0)\n l = usefullsize >> 1;\n else\n l = 0;\n }\n\n var sl = new StartLine(j);\n noise = this.calc_noise_core(cod_info, sl, l, step);\n j = sl.s;\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.step[sfb] = s;\n prev_noise.noise[sfb] = noise;\n }\n\n noise = distort[distortPos++] = noise / l3_xmin[l3_xminPos++];\n\n /* multiplying here is adding in dB, but can overflow */\n noise = Util.FAST_LOG10(Math.max(noise, 1E-20));\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.noise_log[sfb] = noise;\n }\n }\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.global_gain = cod_info.global_gain;\n }\n\n tot_noise_db += noise;\n\n if (noise > 0.0) {\n var tmp;\n\n tmp = Math.max(0 | (noise * 10 + .5), 1);\n res.over_SSD += tmp * tmp;\n\n over++;\n /* multiplying here is adding in dB -but can overflow */\n /* over_noise *= noise; */\n over_noise_db += noise;\n }\n max_noise = Math.max(max_noise, noise);\n\n }\n\n res.over_count = over;\n res.tot_noise = tot_noise_db;\n res.over_noise = over_noise_db;\n res.max_noise = max_noise;\n\n return over;\n }\n\n /**\n * updates plotting data\n *\n * Mark Taylor 2000-??-??\n *\n * Robert Hegemann: moved noise/distortion calc into it\n */\n this.set_pinfo = function (gfp, cod_info, ratio, gr, ch) {\n var gfc = gfp.internal_flags;\n var sfb, sfb2;\n var l;\n var en0, en1;\n var ifqstep = (cod_info.scalefac_scale == 0) ? .5 : 1.0;\n var scalefac = cod_info.scalefac;\n\n var l3_xmin = new_float(L3Side.SFBMAX);\n var xfsf = new_float(L3Side.SFBMAX);\n var noise = new CalcNoiseResult();\n\n calc_xmin(gfp, ratio, cod_info, l3_xmin);\n calc_noise(cod_info, l3_xmin, xfsf, noise, null);\n\n var j = 0;\n sfb2 = cod_info.sfb_lmax;\n if (cod_info.block_type != Encoder.SHORT_TYPE\n && 0 == cod_info.mixed_block_flag)\n sfb2 = 22;\n for (sfb = 0; sfb < sfb2; sfb++) {\n var start = gfc.scalefac_band.l[sfb];\n var end = gfc.scalefac_band.l[sfb + 1];\n var bw = end - start;\n for (en0 = 0.0; j < end; j++)\n en0 += cod_info.xr[j] * cod_info.xr[j];\n en0 /= bw;\n /* convert to MDCT units */\n /* scaling so it shows up on FFT plot */\n en1 = 1e15;\n gfc.pinfo.en[gr][ch][sfb] = en1 * en0;\n gfc.pinfo.xfsf[gr][ch][sfb] = en1 * l3_xmin[sfb] * xfsf[sfb] / bw;\n\n if (ratio.en.l[sfb] > 0 && !gfp.ATHonly)\n en0 = en0 / ratio.en.l[sfb];\n else\n en0 = 0.0;\n\n gfc.pinfo.thr[gr][ch][sfb] = en1\n * Math.max(en0 * ratio.thm.l[sfb], gfc.ATH.l[sfb]);\n\n /* there is no scalefactor bands >= SBPSY_l */\n gfc.pinfo.LAMEsfb[gr][ch][sfb] = 0;\n if (cod_info.preflag != 0 && sfb >= 11)\n gfc.pinfo.LAMEsfb[gr][ch][sfb] = -ifqstep * pretab[sfb];\n\n if (sfb < Encoder.SBPSY_l) {\n /* scfsi should be decoded by caller side */\n assert(scalefac[sfb] >= 0);\n gfc.pinfo.LAMEsfb[gr][ch][sfb] -= ifqstep * scalefac[sfb];\n }\n }\n /* for sfb */\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n sfb2 = sfb;\n for (sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n var bw = end - start;\n for (var i = 0; i < 3; i++) {\n for (en0 = 0.0, l = start; l < end; l++) {\n en0 += cod_info.xr[j] * cod_info.xr[j];\n j++;\n }\n en0 = Math.max(en0 / bw, 1e-20);\n /* convert to MDCT units */\n /* scaling so it shows up on FFT plot */\n en1 = 1e15;\n\n gfc.pinfo.en_s[gr][ch][3 * sfb + i] = en1 * en0;\n gfc.pinfo.xfsf_s[gr][ch][3 * sfb + i] = en1 * l3_xmin[sfb2]\n * xfsf[sfb2] / bw;\n if (ratio.en.s[sfb][i] > 0)\n en0 = en0 / ratio.en.s[sfb][i];\n else\n en0 = 0.0;\n if (gfp.ATHonly || gfp.ATHshort)\n en0 = 0;\n\n gfc.pinfo.thr_s[gr][ch][3 * sfb + i] = en1\n * Math.max(en0 * ratio.thm.s[sfb][i],\n gfc.ATH.s[sfb]);\n\n /* there is no scalefactor bands >= SBPSY_s */\n gfc.pinfo.LAMEsfb_s[gr][ch][3 * sfb + i] = -2.0\n * cod_info.subblock_gain[i];\n if (sfb < Encoder.SBPSY_s) {\n gfc.pinfo.LAMEsfb_s[gr][ch][3 * sfb + i] -= ifqstep\n * scalefac[sfb2];\n }\n sfb2++;\n }\n }\n }\n /* block type short */\n gfc.pinfo.LAMEqss[gr][ch] = cod_info.global_gain;\n gfc.pinfo.LAMEmainbits[gr][ch] = cod_info.part2_3_length\n + cod_info.part2_length;\n gfc.pinfo.LAMEsfbits[gr][ch] = cod_info.part2_length;\n\n gfc.pinfo.over[gr][ch] = noise.over_count;\n gfc.pinfo.max_noise[gr][ch] = noise.max_noise * 10.0;\n gfc.pinfo.over_noise[gr][ch] = noise.over_noise * 10.0;\n gfc.pinfo.tot_noise[gr][ch] = noise.tot_noise * 10.0;\n gfc.pinfo.over_SSD[gr][ch] = noise.over_SSD;\n }\n\n /**\n * updates plotting data for a whole frame\n *\n * Robert Hegemann 2000-10-21\n */\n function set_frame_pinfo(gfp, ratio) {\n var gfc = gfp.internal_flags;\n\n gfc.masking_lower = 1.0;\n\n /*\n * for every granule and channel patch l3_enc and set info\n */\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n var scalefac_sav = new_int(L3Side.SFBMAX);\n System.arraycopy(cod_info.scalefac, 0, scalefac_sav, 0,\n scalefac_sav.length);\n\n /*\n * reconstruct the scalefactors in case SCFSI was used\n */\n if (gr == 1) {\n var sfb;\n for (sfb = 0; sfb < cod_info.sfb_lmax; sfb++) {\n if (cod_info.scalefac[sfb] < 0) /* scfsi */\n cod_info.scalefac[sfb] = gfc.l3_side.tt[0][ch].scalefac[sfb];\n }\n }\n\n set_pinfo(gfp, cod_info, ratio[gr][ch], gr, ch);\n System.arraycopy(scalefac_sav, 0, cod_info.scalefac, 0,\n scalefac_sav.length);\n }\n /* for ch */\n }\n /* for gr */\n }\n\n}\n\nmodule.exports = QuantizePVT;\n","/*\n *\tMP3 huffman table selecting and bit counting\n *\n *\tCopyright (c) 1999-2005 Takehiro TOMINAGA\n *\tCopyright (c) 2002-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\t See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Takehiro.java,v 1.26 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\nvar Tables = require('./Tables.js');\nvar GrInfo = require('./GrInfo.js');\nvar QuantizePVT = require('./QuantizePVT.js');\n\n\nfunction Takehiro() {\n\n var qupvt = null;\n this.qupvt = null;\n\n this.setModules = function (_qupvt) {\n this.qupvt = _qupvt;\n qupvt = _qupvt;\n }\n\n function Bits(b) {\n this.bits = 0 | b;\n }\n\n var subdv_table = [[0, 0], /* 0 bands */\n [0, 0], /* 1 bands */\n [0, 0], /* 2 bands */\n [0, 0], /* 3 bands */\n [0, 0], /* 4 bands */\n [0, 1], /* 5 bands */\n [1, 1], /* 6 bands */\n [1, 1], /* 7 bands */\n [1, 2], /* 8 bands */\n [2, 2], /* 9 bands */\n [2, 3], /* 10 bands */\n [2, 3], /* 11 bands */\n [3, 4], /* 12 bands */\n [3, 4], /* 13 bands */\n [3, 4], /* 14 bands */\n [4, 5], /* 15 bands */\n [4, 5], /* 16 bands */\n [4, 6], /* 17 bands */\n [5, 6], /* 18 bands */\n [5, 6], /* 19 bands */\n [5, 7], /* 20 bands */\n [6, 7], /* 21 bands */\n [6, 7], /* 22 bands */\n ];\n\n /**\n * nonlinear quantization of xr More accurate formula than the ISO formula.\n * Takes into account the fact that we are quantizing xr . ix, but we want\n * ix^4/3 to be as close as possible to x^4/3. (taking the nearest int would\n * mean ix is as close as possible to xr, which is different.)\n *\n * From Segher Boessenkool 11/1999\n *\n * 09/2000: ASM code removed in favor of IEEE754 hack by Takehiro Tominaga.\n * If you need the ASM code, check CVS circa Aug 2000.\n *\n * 01/2004: Optimizations by Gabriel Bouvigne\n */\n function quantize_lines_xrpow_01(l, istep, xr, xrPos, ix, ixPos) {\n var compareval0 = (1.0 - 0.4054) / istep;\n\n assert(l > 0);\n l = l >> 1;\n while ((l--) != 0) {\n ix[ixPos++] = (compareval0 > xr[xrPos++]) ? 0 : 1;\n ix[ixPos++] = (compareval0 > xr[xrPos++]) ? 0 : 1;\n }\n }\n\n /**\n * XRPOW_FTOI is a macro to convert floats to ints.
\n * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
\n * ROUNDFAC= -0.0946
\n *\n * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]
\n * ROUNDFAC=0.4054
\n *\n * Note: using floor() or 0| is extremely slow. On machines where the\n * TAKEHIRO_IEEE754_HACK code above does not work, it is worthwile to write\n * some ASM for XRPOW_FTOI().\n */\n function quantize_lines_xrpow(l, istep, xr, xrPos, ix, ixPos) {\n assert(l > 0);\n\n l = l >> 1;\n var remaining = l % 2;\n l = l >> 1;\n while (l-- != 0) {\n var x0, x1, x2, x3;\n var rx0, rx1, rx2, rx3;\n\n x0 = xr[xrPos++] * istep;\n x1 = xr[xrPos++] * istep;\n rx0 = 0 | x0;\n x2 = xr[xrPos++] * istep;\n rx1 = 0 | x1;\n x3 = xr[xrPos++] * istep;\n rx2 = 0 | x2;\n x0 += qupvt.adj43[rx0];\n rx3 = 0 | x3;\n x1 += qupvt.adj43[rx1];\n ix[ixPos++] = 0 | x0;\n x2 += qupvt.adj43[rx2];\n ix[ixPos++] = 0 | x1;\n x3 += qupvt.adj43[rx3];\n ix[ixPos++] = 0 | x2;\n ix[ixPos++] = 0 | x3;\n }\n if (remaining != 0) {\n var x0, x1;\n var rx0, rx1;\n\n x0 = xr[xrPos++] * istep;\n x1 = xr[xrPos++] * istep;\n rx0 = 0 | x0;\n rx1 = 0 | x1;\n x0 += qupvt.adj43[rx0];\n x1 += qupvt.adj43[rx1];\n ix[ixPos++] = 0 | x0;\n ix[ixPos++] = 0 | x1;\n }\n }\n\n /**\n * Quantization function This function will select which lines to quantize\n * and call the proper quantization function\n */\n function quantize_xrpow(xp, pi, istep, codInfo, prevNoise) {\n /* quantize on xr^(3/4) instead of xr */\n var sfb;\n var sfbmax;\n var j = 0;\n var prev_data_use;\n var accumulate = 0;\n var accumulate01 = 0;\n var xpPos = 0;\n var iData = pi;\n var iDataPos = 0;\n var acc_iData = iData;\n var acc_iDataPos = 0;\n var acc_xp = xp;\n var acc_xpPos = 0;\n\n /*\n * Reusing previously computed data does not seems to work if global\n * gain is changed. Finding why it behaves this way would allow to use a\n * cache of previously computed values (let's 10 cached values per sfb)\n * that would probably provide a noticeable speedup\n */\n prev_data_use = (prevNoise != null && (codInfo.global_gain == prevNoise.global_gain));\n\n if (codInfo.block_type == Encoder.SHORT_TYPE)\n sfbmax = 38;\n else\n sfbmax = 21;\n\n for (sfb = 0; sfb <= sfbmax; sfb++) {\n var step = -1;\n\n if (prev_data_use || codInfo.block_type == Encoder.NORM_TYPE) {\n step = codInfo.global_gain\n - ((codInfo.scalefac[sfb] + (codInfo.preflag != 0 ? qupvt.pretab[sfb]\n : 0)) << (codInfo.scalefac_scale + 1))\n - codInfo.subblock_gain[codInfo.window[sfb]] * 8;\n }\n assert(codInfo.width[sfb] >= 0);\n if (prev_data_use && (prevNoise.step[sfb] == step)) {\n /*\n * do not recompute this part, but compute accumulated lines\n */\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n } else { /* should compute this part */\n var l = codInfo.width[sfb];\n\n if ((j + codInfo.width[sfb]) > codInfo.max_nonzero_coeff) {\n /* do not compute upper zero part */\n var usefullsize;\n usefullsize = codInfo.max_nonzero_coeff - j + 1;\n Arrays.fill(pi, codInfo.max_nonzero_coeff, 576, 0);\n l = usefullsize;\n\n if (l < 0) {\n l = 0;\n }\n\n /* no need to compute higher sfb values */\n sfb = sfbmax + 1;\n }\n\n /* accumulate lines to quantize */\n if (0 == accumulate && 0 == accumulate01) {\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n if (prevNoise != null && prevNoise.sfb_count1 > 0\n && sfb >= prevNoise.sfb_count1\n && prevNoise.step[sfb] > 0\n && step >= prevNoise.step[sfb]) {\n\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate = 0;\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n accumulate01 += l;\n } else {\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n accumulate += l;\n }\n\n if (l <= 0) {\n /*\n * rh: 20040215 may happen due to \"prev_data_use\"\n * optimization\n */\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n\n break;\n /* ends for-loop */\n }\n }\n if (sfb <= sfbmax) {\n iDataPos += codInfo.width[sfb];\n xpPos += codInfo.width[sfb];\n j += codInfo.width[sfb];\n }\n }\n if (accumulate != 0) { /* last data part */\n quantize_lines_xrpow(accumulate, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n if (accumulate01 != 0) { /* last data part */\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n\n }\n\n /**\n * ix_max\n */\n function ix_max(ix, ixPos, endPos) {\n var max1 = 0, max2 = 0;\n\n do {\n var x1 = ix[ixPos++];\n var x2 = ix[ixPos++];\n if (max1 < x1)\n max1 = x1;\n\n if (max2 < x2)\n max2 = x2;\n } while (ixPos < endPos);\n if (max1 < max2)\n max1 = max2;\n return max1;\n }\n\n function count_bit_ESC(ix, ixPos, end, t1, t2, s) {\n /* ESC-table is used */\n var linbits = Tables.ht[t1].xlen * 65536 + Tables.ht[t2].xlen;\n var sum = 0, sum2;\n\n do {\n var x = ix[ixPos++];\n var y = ix[ixPos++];\n\n if (x != 0) {\n if (x > 14) {\n x = 15;\n sum += linbits;\n }\n x *= 16;\n }\n\n if (y != 0) {\n if (y > 14) {\n y = 15;\n sum += linbits;\n }\n x += y;\n }\n\n sum += Tables.largetbl[x];\n } while (ixPos < end);\n\n sum2 = sum & 0xffff;\n sum >>= 16;\n\n if (sum > sum2) {\n sum = sum2;\n t1 = t2;\n }\n\n s.bits += sum;\n return t1;\n }\n\n function count_bit_noESC(ix, ixPos, end, s) {\n /* No ESC-words */\n var sum1 = 0;\n var hlen1 = Tables.ht[1].hlen;\n\n do {\n var x = ix[ixPos + 0] * 2 + ix[ixPos + 1];\n ixPos += 2;\n sum1 += hlen1[x];\n } while (ixPos < end);\n\n s.bits += sum1;\n return 1;\n }\n\n function count_bit_noESC_from2(ix, ixPos, end, t1, s) {\n /* No ESC-words */\n var sum = 0, sum2;\n var xlen = Tables.ht[t1].xlen;\n var hlen;\n if (t1 == 2)\n hlen = Tables.table23;\n else\n hlen = Tables.table56;\n\n do {\n var x = ix[ixPos + 0] * xlen + ix[ixPos + 1];\n ixPos += 2;\n sum += hlen[x];\n } while (ixPos < end);\n\n sum2 = sum & 0xffff;\n sum >>= 16;\n\n if (sum > sum2) {\n sum = sum2;\n t1++;\n }\n\n s.bits += sum;\n return t1;\n }\n\n function count_bit_noESC_from3(ix, ixPos, end, t1, s) {\n /* No ESC-words */\n var sum1 = 0;\n var sum2 = 0;\n var sum3 = 0;\n var xlen = Tables.ht[t1].xlen;\n var hlen1 = Tables.ht[t1].hlen;\n var hlen2 = Tables.ht[t1 + 1].hlen;\n var hlen3 = Tables.ht[t1 + 2].hlen;\n\n do {\n var x = ix[ixPos + 0] * xlen + ix[ixPos + 1];\n ixPos += 2;\n sum1 += hlen1[x];\n sum2 += hlen2[x];\n sum3 += hlen3[x];\n } while (ixPos < end);\n var t = t1;\n if (sum1 > sum2) {\n sum1 = sum2;\n t++;\n }\n if (sum1 > sum3) {\n sum1 = sum3;\n t = t1 + 2;\n }\n s.bits += sum1;\n\n return t;\n }\n\n /*************************************************************************/\n /* choose table */\n /*************************************************************************/\n\n var huf_tbl_noESC = [1, 2, 5, 7, 7, 10, 10, 13, 13,\n 13, 13, 13, 13, 13, 13];\n\n /**\n * Choose the Huffman table that will encode ix[begin..end] with the fewest\n * bits.\n *\n * Note: This code contains knowledge about the sizes and characteristics of\n * the Huffman tables as defined in the IS (Table B.7), and will not work\n * with any arbitrary tables.\n */\n function choose_table(ix, ixPos, endPos, s) {\n var max = ix_max(ix, ixPos, endPos);\n\n switch (max) {\n case 0:\n return max;\n\n case 1:\n return count_bit_noESC(ix, ixPos, endPos, s);\n\n case 2:\n case 3:\n return count_bit_noESC_from2(ix, ixPos, endPos,\n huf_tbl_noESC[max - 1], s);\n\n case 4:\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n return count_bit_noESC_from3(ix, ixPos, endPos,\n huf_tbl_noESC[max - 1], s);\n\n default:\n /* try tables with linbits */\n if (max > QuantizePVT.IXMAX_VAL) {\n s.bits = QuantizePVT.LARGE_BITS;\n return -1;\n }\n max -= 15;\n var choice2;\n for (choice2 = 24; choice2 < 32; choice2++) {\n if (Tables.ht[choice2].linmax >= max) {\n break;\n }\n }\n var choice;\n for (choice = choice2 - 8; choice < 24; choice++) {\n if (Tables.ht[choice].linmax >= max) {\n break;\n }\n }\n return count_bit_ESC(ix, ixPos, endPos, choice, choice2, s);\n }\n }\n\n /**\n * count_bit\n */\n this.noquant_count_bits = function (gfc, gi, prev_noise) {\n var ix = gi.l3_enc;\n var i = Math.min(576, ((gi.max_nonzero_coeff + 2) >> 1) << 1);\n\n if (prev_noise != null)\n prev_noise.sfb_count1 = 0;\n\n /* Determine count1 region */\n for (; i > 1; i -= 2)\n if ((ix[i - 1] | ix[i - 2]) != 0)\n break;\n gi.count1 = i;\n\n /* Determines the number of bits to encode the quadruples. */\n var a1 = 0;\n var a2 = 0;\n for (; i > 3; i -= 4) {\n var p;\n /* hack to check if all values <= 1 */\n //throw \"TODO: HACK if ((((long) ix[i - 1] | (long) ix[i - 2] | (long) ix[i - 3] | (long) ix[i - 4]) & 0xffffffffL) > 1L \"\n //if (true) {\n if (((ix[i - 1] | ix[i - 2] | ix[i - 3] | ix[i - 4]) & 0x7fffffff) > 1) {\n break;\n }\n p = ((ix[i - 4] * 2 + ix[i - 3]) * 2 + ix[i - 2]) * 2 + ix[i - 1];\n a1 += Tables.t32l[p];\n a2 += Tables.t33l[p];\n }\n var bits = a1;\n gi.count1table_select = 0;\n if (a1 > a2) {\n bits = a2;\n gi.count1table_select = 1;\n }\n\n gi.count1bits = bits;\n gi.big_values = i;\n if (i == 0)\n return bits;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n a1 = 3 * gfc.scalefac_band.s[3];\n if (a1 > gi.big_values)\n a1 = gi.big_values;\n a2 = gi.big_values;\n\n } else if (gi.block_type == Encoder.NORM_TYPE) {\n assert(i <= 576);\n /* bv_scf has 576 entries (0..575) */\n a1 = gi.region0_count = gfc.bv_scf[i - 2];\n a2 = gi.region1_count = gfc.bv_scf[i - 1];\n\n assert(a1 + a2 + 2 < Encoder.SBPSY_l);\n a2 = gfc.scalefac_band.l[a1 + a2 + 2];\n a1 = gfc.scalefac_band.l[a1 + 1];\n if (a2 < i) {\n var bi = new Bits(bits);\n gi.table_select[2] = choose_table(ix, a2, i, bi);\n bits = bi.bits;\n }\n } else {\n gi.region0_count = 7;\n /* gi.region1_count = SBPSY_l - 7 - 1; */\n gi.region1_count = Encoder.SBMAX_l - 1 - 7 - 1;\n a1 = gfc.scalefac_band.l[7 + 1];\n a2 = i;\n if (a1 > a2) {\n a1 = a2;\n }\n }\n\n /* have to allow for the case when bigvalues < region0 < region1 */\n /* (and region0, region1 are ignored) */\n a1 = Math.min(a1, i);\n a2 = Math.min(a2, i);\n\n assert(a1 >= 0);\n assert(a2 >= 0);\n\n /* Count the number of bits necessary to code the bigvalues region. */\n if (0 < a1) {\n var bi = new Bits(bits);\n gi.table_select[0] = choose_table(ix, 0, a1, bi);\n bits = bi.bits;\n }\n if (a1 < a2) {\n var bi = new Bits(bits);\n gi.table_select[1] = choose_table(ix, a1, a2, bi);\n bits = bi.bits;\n }\n if (gfc.use_best_huffman == 2) {\n gi.part2_3_length = bits;\n best_huffman_divide(gfc, gi);\n bits = gi.part2_3_length;\n }\n\n if (prev_noise != null) {\n if (gi.block_type == Encoder.NORM_TYPE) {\n var sfb = 0;\n while (gfc.scalefac_band.l[sfb] < gi.big_values) {\n sfb++;\n }\n prev_noise.sfb_count1 = sfb;\n }\n }\n\n return bits;\n }\n\n this.count_bits = function (gfc, xr, gi, prev_noise) {\n var ix = gi.l3_enc;\n\n /* since quantize_xrpow uses table lookup, we need to check this first: */\n var w = (QuantizePVT.IXMAX_VAL) / qupvt.IPOW20(gi.global_gain);\n\n if (gi.xrpow_max > w)\n return QuantizePVT.LARGE_BITS;\n\n quantize_xrpow(xr, ix, qupvt.IPOW20(gi.global_gain), gi, prev_noise);\n\n if ((gfc.substep_shaping & 2) != 0) {\n var j = 0;\n /* 0.634521682242439 = 0.5946*2**(.5*0.1875) */\n var gain = gi.global_gain + gi.scalefac_scale;\n var roundfac = 0.634521682242439 / qupvt.IPOW20(gain);\n for (var sfb = 0; sfb < gi.sfbmax; sfb++) {\n var width = gi.width[sfb];\n assert(width >= 0);\n if (0 == gfc.pseudohalf[sfb]) {\n j += width;\n } else {\n var k;\n for (k = j, j += width; k < j; ++k) {\n ix[k] = (xr[k] >= roundfac) ? ix[k] : 0;\n }\n }\n }\n }\n return this.noquant_count_bits(gfc, gi, prev_noise);\n }\n\n /**\n * re-calculate the best scalefac_compress using scfsi the saved bits are\n * kept in the bit reservoir.\n */\n function recalc_divide_init(gfc, cod_info, ix, r01_bits, r01_div, r0_tbl, r1_tbl) {\n var bigv = cod_info.big_values;\n\n for (var r0 = 0; r0 <= 7 + 15; r0++) {\n r01_bits[r0] = QuantizePVT.LARGE_BITS;\n }\n\n for (var r0 = 0; r0 < 16; r0++) {\n var a1 = gfc.scalefac_band.l[r0 + 1];\n if (a1 >= bigv)\n break;\n var r0bits = 0;\n var bi = new Bits(r0bits);\n var r0t = choose_table(ix, 0, a1, bi);\n r0bits = bi.bits;\n\n for (var r1 = 0; r1 < 8; r1++) {\n var a2 = gfc.scalefac_band.l[r0 + r1 + 2];\n if (a2 >= bigv)\n break;\n var bits = r0bits;\n bi = new Bits(bits);\n var r1t = choose_table(ix, a1, a2, bi);\n bits = bi.bits;\n if (r01_bits[r0 + r1] > bits) {\n r01_bits[r0 + r1] = bits;\n r01_div[r0 + r1] = r0;\n r0_tbl[r0 + r1] = r0t;\n r1_tbl[r0 + r1] = r1t;\n }\n }\n }\n }\n\n function recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div, r0_tbl, r1_tbl) {\n var bigv = cod_info2.big_values;\n\n for (var r2 = 2; r2 < Encoder.SBMAX_l + 1; r2++) {\n var a2 = gfc.scalefac_band.l[r2];\n if (a2 >= bigv)\n break;\n var bits = r01_bits[r2 - 2] + cod_info2.count1bits;\n if (gi.part2_3_length <= bits)\n break;\n\n var bi = new Bits(bits);\n var r2t = choose_table(ix, a2, bigv, bi);\n bits = bi.bits;\n if (gi.part2_3_length <= bits)\n continue;\n\n gi.assign(cod_info2);\n gi.part2_3_length = bits;\n gi.region0_count = r01_div[r2 - 2];\n gi.region1_count = r2 - 2 - r01_div[r2 - 2];\n gi.table_select[0] = r0_tbl[r2 - 2];\n gi.table_select[1] = r1_tbl[r2 - 2];\n gi.table_select[2] = r2t;\n }\n }\n\n this.best_huffman_divide = function (gfc, gi) {\n var cod_info2 = new GrInfo();\n var ix = gi.l3_enc;\n var r01_bits = new_int(7 + 15 + 1);\n var r01_div = new_int(7 + 15 + 1);\n var r0_tbl = new_int(7 + 15 + 1);\n var r1_tbl = new_int(7 + 15 + 1);\n\n /* SHORT BLOCK stuff fails for MPEG2 */\n if (gi.block_type == Encoder.SHORT_TYPE && gfc.mode_gr == 1)\n return;\n\n cod_info2.assign(gi);\n if (gi.block_type == Encoder.NORM_TYPE) {\n recalc_divide_init(gfc, gi, ix, r01_bits, r01_div, r0_tbl, r1_tbl);\n recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div,\n r0_tbl, r1_tbl);\n }\n var i = cod_info2.big_values;\n if (i == 0 || (ix[i - 2] | ix[i - 1]) > 1)\n return;\n\n i = gi.count1 + 2;\n if (i > 576)\n return;\n\n /* Determines the number of bits to encode the quadruples. */\n cod_info2.assign(gi);\n cod_info2.count1 = i;\n var a1 = 0;\n var a2 = 0;\n\n assert(i <= 576);\n\n for (; i > cod_info2.big_values; i -= 4) {\n var p = ((ix[i - 4] * 2 + ix[i - 3]) * 2 + ix[i - 2]) * 2\n + ix[i - 1];\n a1 += Tables.t32l[p];\n a2 += Tables.t33l[p];\n }\n cod_info2.big_values = i;\n\n cod_info2.count1table_select = 0;\n if (a1 > a2) {\n a1 = a2;\n cod_info2.count1table_select = 1;\n }\n\n cod_info2.count1bits = a1;\n\n if (cod_info2.block_type == Encoder.NORM_TYPE)\n recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div,\n r0_tbl, r1_tbl);\n else {\n /* Count the number of bits necessary to code the bigvalues region. */\n cod_info2.part2_3_length = a1;\n a1 = gfc.scalefac_band.l[7 + 1];\n if (a1 > i) {\n a1 = i;\n }\n if (a1 > 0) {\n var bi = new Bits(cod_info2.part2_3_length);\n cod_info2.table_select[0] = choose_table(ix, 0, a1, bi);\n cod_info2.part2_3_length = bi.bits;\n }\n if (i > a1) {\n var bi = new Bits(cod_info2.part2_3_length);\n cod_info2.table_select[1] = choose_table(ix, a1, i, bi);\n cod_info2.part2_3_length = bi.bits;\n }\n if (gi.part2_3_length > cod_info2.part2_3_length)\n gi.assign(cod_info2);\n }\n }\n\n var slen1_n = [1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16];\n var slen2_n = [1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8];\n var slen1_tab = [0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4];\n var slen2_tab = [0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3];\n Takehiro.slen1_tab = slen1_tab;\n Takehiro.slen2_tab = slen2_tab;\n\n function scfsi_calc(ch, l3_side) {\n var sfb;\n var gi = l3_side.tt[1][ch];\n var g0 = l3_side.tt[0][ch];\n\n for (var i = 0; i < Tables.scfsi_band.length - 1; i++) {\n for (sfb = Tables.scfsi_band[i]; sfb < Tables.scfsi_band[i + 1]; sfb++) {\n if (g0.scalefac[sfb] != gi.scalefac[sfb]\n && gi.scalefac[sfb] >= 0)\n break;\n }\n if (sfb == Tables.scfsi_band[i + 1]) {\n for (sfb = Tables.scfsi_band[i]; sfb < Tables.scfsi_band[i + 1]; sfb++) {\n gi.scalefac[sfb] = -1;\n }\n l3_side.scfsi[ch][i] = 1;\n }\n }\n var s1 = 0;\n var c1 = 0;\n for (sfb = 0; sfb < 11; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n c1++;\n if (s1 < gi.scalefac[sfb])\n s1 = gi.scalefac[sfb];\n }\n var s2 = 0;\n var c2 = 0;\n for (; sfb < Encoder.SBPSY_l; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n c2++;\n if (s2 < gi.scalefac[sfb])\n s2 = gi.scalefac[sfb];\n }\n\n for (var i = 0; i < 16; i++) {\n if (s1 < slen1_n[i] && s2 < slen2_n[i]) {\n var c = slen1_tab[i] * c1 + slen2_tab[i] * c2;\n if (gi.part2_length > c) {\n gi.part2_length = c;\n gi.scalefac_compress = i;\n }\n }\n }\n }\n\n /**\n * Find the optimal way to store the scalefactors. Only call this routine\n * after final scalefactors have been chosen and the channel/granule will\n * not be re-encoded.\n */\n this.best_scalefac_store = function (gfc, gr, ch, l3_side) {\n /* use scalefac_scale if we can */\n var gi = l3_side.tt[gr][ch];\n var sfb, i, j, l;\n var recalc = 0;\n\n /*\n * remove scalefacs from bands with ix=0. This idea comes from the AAC\n * ISO docs. added mt 3/00\n */\n /* check if l3_enc=0 */\n j = 0;\n for (sfb = 0; sfb < gi.sfbmax; sfb++) {\n var width = gi.width[sfb];\n assert(width >= 0);\n j += width;\n for (l = -width; l < 0; l++) {\n if (gi.l3_enc[l + j] != 0)\n break;\n }\n if (l == 0)\n gi.scalefac[sfb] = recalc = -2;\n /* anything goes. */\n /*\n * only best_scalefac_store and calc_scfsi know--and only they\n * should know--about the magic number -2.\n */\n }\n\n if (0 == gi.scalefac_scale && 0 == gi.preflag) {\n var s = 0;\n for (sfb = 0; sfb < gi.sfbmax; sfb++)\n if (gi.scalefac[sfb] > 0)\n s |= gi.scalefac[sfb];\n\n if (0 == (s & 1) && s != 0) {\n for (sfb = 0; sfb < gi.sfbmax; sfb++)\n if (gi.scalefac[sfb] > 0)\n gi.scalefac[sfb] >>= 1;\n\n gi.scalefac_scale = recalc = 1;\n }\n }\n\n if (0 == gi.preflag && gi.block_type != Encoder.SHORT_TYPE\n && gfc.mode_gr == 2) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (gi.scalefac[sfb] < qupvt.pretab[sfb]\n && gi.scalefac[sfb] != -2)\n break;\n if (sfb == Encoder.SBPSY_l) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (gi.scalefac[sfb] > 0)\n gi.scalefac[sfb] -= qupvt.pretab[sfb];\n\n gi.preflag = recalc = 1;\n }\n }\n\n for (i = 0; i < 4; i++)\n l3_side.scfsi[ch][i] = 0;\n\n if (gfc.mode_gr == 2 && gr == 1\n && l3_side.tt[0][ch].block_type != Encoder.SHORT_TYPE\n && l3_side.tt[1][ch].block_type != Encoder.SHORT_TYPE) {\n scfsi_calc(ch, l3_side);\n recalc = 0;\n }\n for (sfb = 0; sfb < gi.sfbmax; sfb++) {\n if (gi.scalefac[sfb] == -2) {\n gi.scalefac[sfb] = 0;\n /* if anything goes, then 0 is a good choice */\n }\n }\n if (recalc != 0) {\n if (gfc.mode_gr == 2) {\n this.scale_bitcount(gi);\n } else {\n this.scale_bitcount_lsf(gfc, gi);\n }\n }\n }\n\n function all_scalefactors_not_negative(scalefac, n) {\n for (var i = 0; i < n; ++i) {\n if (scalefac[i] < 0)\n return false;\n }\n return true;\n }\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 18*slen1_tab[i] + 18*slen2_tab[i]\n */\n var scale_short = [0, 18, 36, 54, 54, 36, 54, 72,\n 54, 72, 90, 72, 90, 108, 108, 126];\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 17*slen1_tab[i] + 18*slen2_tab[i]\n */\n var scale_mixed = [0, 18, 36, 54, 51, 35, 53, 71,\n 52, 70, 88, 69, 87, 105, 104, 122];\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 11*slen1_tab[i] + 10*slen2_tab[i]\n */\n var scale_long = [0, 10, 20, 30, 33, 21, 31, 41, 32, 42,\n 52, 43, 53, 63, 64, 74];\n\n /**\n * Also calculates the number of bits necessary to code the scalefactors.\n */\n this.scale_bitcount = function (cod_info) {\n var k, sfb, max_slen1 = 0, max_slen2 = 0;\n\n /* maximum values */\n var tab;\n var scalefac = cod_info.scalefac;\n\n assert(all_scalefactors_not_negative(scalefac, cod_info.sfbmax));\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n tab = scale_short;\n if (cod_info.mixed_block_flag != 0)\n tab = scale_mixed;\n } else { /* block_type == 1,2,or 3 */\n tab = scale_long;\n if (0 == cod_info.preflag) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (scalefac[sfb] < qupvt.pretab[sfb])\n break;\n\n if (sfb == Encoder.SBPSY_l) {\n cod_info.preflag = 1;\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n scalefac[sfb] -= qupvt.pretab[sfb];\n }\n }\n }\n\n for (sfb = 0; sfb < cod_info.sfbdivide; sfb++)\n if (max_slen1 < scalefac[sfb])\n max_slen1 = scalefac[sfb];\n\n for (; sfb < cod_info.sfbmax; sfb++)\n if (max_slen2 < scalefac[sfb])\n max_slen2 = scalefac[sfb];\n\n /*\n * from Takehiro TOMINAGA 10/99 loop over *all*\n * posible values of scalefac_compress to find the one which uses the\n * smallest number of bits. ISO would stop at first valid index\n */\n cod_info.part2_length = QuantizePVT.LARGE_BITS;\n for (k = 0; k < 16; k++) {\n if (max_slen1 < slen1_n[k] && max_slen2 < slen2_n[k]\n && cod_info.part2_length > tab[k]) {\n cod_info.part2_length = tab[k];\n cod_info.scalefac_compress = k;\n }\n }\n return cod_info.part2_length == QuantizePVT.LARGE_BITS;\n }\n\n /**\n * table of largest scalefactor values for MPEG2\n */\n var max_range_sfac_tab = [[15, 15, 7, 7],\n [15, 15, 7, 0], [7, 3, 0, 0], [15, 31, 31, 0],\n [7, 7, 7, 0], [3, 3, 0, 0]];\n\n /**\n * Also counts the number of bits to encode the scalefacs but for MPEG 2\n * Lower sampling frequencies (24, 22.05 and 16 kHz.)\n *\n * This is reverse-engineered from section 2.4.3.2 of the MPEG2 IS,\n * \"Audio Decoding Layer III\"\n */\n this.scale_bitcount_lsf = function (gfc, cod_info) {\n var table_number, row_in_table, partition, nr_sfb, window;\n var over;\n var i, sfb;\n var max_sfac = new_int(4);\n//var partition_table;\n var scalefac = cod_info.scalefac;\n\n /*\n * Set partition table. Note that should try to use table one, but do\n * not yet...\n */\n if (cod_info.preflag != 0)\n table_number = 2;\n else\n table_number = 0;\n\n for (i = 0; i < 4; i++)\n max_sfac[i] = 0;\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n row_in_table = 1;\n var partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (sfb = 0, partition = 0; partition < 4; partition++) {\n nr_sfb = partition_table[partition] / 3;\n for (i = 0; i < nr_sfb; i++, sfb++)\n for (window = 0; window < 3; window++)\n if (scalefac[sfb * 3 + window] > max_sfac[partition])\n max_sfac[partition] = scalefac[sfb * 3 + window];\n }\n } else {\n row_in_table = 0;\n var partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (sfb = 0, partition = 0; partition < 4; partition++) {\n nr_sfb = partition_table[partition];\n for (i = 0; i < nr_sfb; i++, sfb++)\n if (scalefac[sfb] > max_sfac[partition])\n max_sfac[partition] = scalefac[sfb];\n }\n }\n\n for (over = false, partition = 0; partition < 4; partition++) {\n if (max_sfac[partition] > max_range_sfac_tab[table_number][partition])\n over = true;\n }\n if (!over) {\n var slen1, slen2, slen3, slen4;\n\n cod_info.sfb_partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (partition = 0; partition < 4; partition++)\n cod_info.slen[partition] = log2tab[max_sfac[partition]];\n\n /* set scalefac_compress */\n slen1 = cod_info.slen[0];\n slen2 = cod_info.slen[1];\n slen3 = cod_info.slen[2];\n slen4 = cod_info.slen[3];\n\n switch (table_number) {\n case 0:\n cod_info.scalefac_compress = (((slen1 * 5) + slen2) << 4)\n + (slen3 << 2) + slen4;\n break;\n\n case 1:\n cod_info.scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2)\n + slen3;\n break;\n\n case 2:\n cod_info.scalefac_compress = 500 + (slen1 * 3) + slen2;\n break;\n\n default:\n System.err.printf(\"intensity stereo not implemented yet\\n\");\n break;\n }\n }\n if (!over) {\n assert(cod_info.sfb_partition_table != null);\n cod_info.part2_length = 0;\n for (partition = 0; partition < 4; partition++)\n cod_info.part2_length += cod_info.slen[partition]\n * cod_info.sfb_partition_table[partition];\n }\n return over;\n }\n\n /*\n * Since no bands have been over-amplified, we can set scalefac_compress and\n * slen[] for the formatter\n */\n var log2tab = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4,\n 4, 4, 4, 4];\n\n this.huffman_init = function (gfc) {\n for (var i = 2; i <= 576; i += 2) {\n var scfb_anz = 0, bv_index;\n while (gfc.scalefac_band.l[++scfb_anz] < i)\n ;\n\n bv_index = subdv_table[scfb_anz][0]; // .region0_count\n while (gfc.scalefac_band.l[bv_index + 1] > i)\n bv_index--;\n\n if (bv_index < 0) {\n /*\n * this is an indication that everything is going to be encoded\n * as region0: bigvalues < region0 < region1 so lets set\n * region0, region1 to some value larger than bigvalues\n */\n bv_index = subdv_table[scfb_anz][0]; // .region0_count\n }\n\n gfc.bv_scf[i - 2] = bv_index;\n\n bv_index = subdv_table[scfb_anz][1]; // .region1_count\n while (gfc.scalefac_band.l[bv_index + gfc.bv_scf[i - 2] + 2] > i)\n bv_index--;\n\n if (bv_index < 0) {\n bv_index = subdv_table[scfb_anz][1]; // .region1_count\n }\n\n gfc.bv_scf[i - 1] = bv_index;\n }\n }\n}\n\nmodule.exports = Takehiro;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Takehiro = require('./Takehiro.js');\nvar Tables = require('./Tables.js');\nvar Encoder = require('./Encoder.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nBitStream.EQ = function (a, b) {\n return (Math.abs(a) > Math.abs(b)) ? (Math.abs((a) - (b)) <= (Math\n .abs(a) * 1e-6))\n : (Math.abs((a) - (b)) <= (Math.abs(b) * 1e-6));\n};\n\nBitStream.NEQ = function (a, b) {\n return !BitStream.EQ(a, b);\n};\n\nfunction BitStream() {\n var self = this;\n var CRC16_POLYNOMIAL = 0x8005;\n\n /*\n * we work with ints, so when doing bit manipulation, we limit ourselves to\n * MAX_LENGTH-2 just to be on the safe side\n */\n var MAX_LENGTH = 32;\n\n //GainAnalysis ga;\n //MPGLib mpg;\n //Version ver;\n //VBRTag vbr;\n var ga = null;\n var mpg = null;\n var ver = null;\n var vbr = null;\n\n //public final void setModules(GainAnalysis ga, MPGLib mpg, Version ver,\n //\tVBRTag vbr) {\n\n this.setModules = function (_ga, _mpg, _ver, _vbr) {\n ga = _ga;\n mpg = _mpg;\n ver = _ver;\n vbr = _vbr;\n };\n\n /**\n * Bit stream buffer.\n */\n //private byte[] buf;\n var buf = null;\n /**\n * Bit counter of bit stream.\n */\n var totbit = 0;\n /**\n * Pointer to top byte in buffer.\n */\n var bufByteIdx = 0;\n /**\n * Pointer to top bit of top byte in buffer.\n */\n var bufBitIdx = 0;\n\n /**\n * compute bitsperframe and mean_bits for a layer III frame\n */\n this.getframebits = function (gfp) {\n var gfc = gfp.internal_flags;\n var bit_rate;\n\n /* get bitrate in kbps [?] */\n if (gfc.bitrate_index != 0)\n bit_rate = Tables.bitrate_table[gfp.version][gfc.bitrate_index];\n else\n bit_rate = gfp.brate;\n assert(8 <= bit_rate && bit_rate <= 640);\n\n /* main encoding routine toggles padding on and off */\n /* one Layer3 Slot consists of 8 bits */\n var bytes = 0 | (gfp.version + 1) * 72000 * bit_rate / gfp.out_samplerate + gfc.padding;\n return 8 * bytes;\n };\n\n function putheader_bits(gfc) {\n System.arraycopy(gfc.header[gfc.w_ptr].buf, 0, buf, bufByteIdx, gfc.sideinfo_len);\n bufByteIdx += gfc.sideinfo_len;\n totbit += gfc.sideinfo_len * 8;\n gfc.w_ptr = (gfc.w_ptr + 1) & (LameInternalFlags.MAX_HEADER_BUF - 1);\n }\n\n /**\n * write j bits into the bit stream\n */\n function putbits2(gfc, val, j) {\n assert(j < MAX_LENGTH - 2);\n\n while (j > 0) {\n var k;\n if (bufBitIdx == 0) {\n bufBitIdx = 8;\n bufByteIdx++;\n assert(bufByteIdx < Lame.LAME_MAXMP3BUFFER);\n assert(gfc.header[gfc.w_ptr].write_timing >= totbit);\n if (gfc.header[gfc.w_ptr].write_timing == totbit) {\n putheader_bits(gfc);\n }\n buf[bufByteIdx] = 0;\n }\n\n k = Math.min(j, bufBitIdx);\n j -= k;\n\n bufBitIdx -= k;\n\n assert(j < MAX_LENGTH);\n /* 32 too large on 32 bit machines */\n assert(bufBitIdx < MAX_LENGTH);\n\n buf[bufByteIdx] |= ((val >> j) << bufBitIdx);\n totbit += k;\n }\n }\n\n /**\n * write j bits into the bit stream, ignoring frame headers\n */\n function putbits_noheaders(gfc, val, j) {\n assert(j < MAX_LENGTH - 2);\n\n while (j > 0) {\n var k;\n if (bufBitIdx == 0) {\n bufBitIdx = 8;\n bufByteIdx++;\n assert(bufByteIdx < Lame.LAME_MAXMP3BUFFER);\n buf[bufByteIdx] = 0;\n }\n\n k = Math.min(j, bufBitIdx);\n j -= k;\n\n bufBitIdx -= k;\n\n assert(j < MAX_LENGTH);\n /* 32 too large on 32 bit machines */\n assert(bufBitIdx < MAX_LENGTH);\n\n buf[bufByteIdx] |= ((val >> j) << bufBitIdx);\n totbit += k;\n }\n }\n\n /**\n * Some combinations of bitrate, Fs, and stereo make it impossible to stuff\n * out a frame using just main_data, due to the limited number of bits to\n * indicate main_data_length. In these situations, we put stuffing bits into\n * the ancillary data...\n */\n function drain_into_ancillary(gfp, remainingBits) {\n var gfc = gfp.internal_flags;\n var i;\n assert(remainingBits >= 0);\n\n if (remainingBits >= 8) {\n putbits2(gfc, 0x4c, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x41, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x4d, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x45, 8);\n remainingBits -= 8;\n }\n\n if (remainingBits >= 32) {\n var version = ver.getLameShortVersion();\n if (remainingBits >= 32)\n for (i = 0; i < version.length && remainingBits >= 8; ++i) {\n remainingBits -= 8;\n putbits2(gfc, version.charAt(i), 8);\n }\n }\n\n for (; remainingBits >= 1; remainingBits -= 1) {\n putbits2(gfc, gfc.ancillary_flag, 1);\n gfc.ancillary_flag ^= (!gfp.disable_reservoir ? 1 : 0);\n }\n\n assert(remainingBits == 0);\n\n }\n\n /**\n * write N bits into the header\n */\n function writeheader(gfc, val, j) {\n var ptr = gfc.header[gfc.h_ptr].ptr;\n\n while (j > 0) {\n var k = Math.min(j, 8 - (ptr & 7));\n j -= k;\n assert(j < MAX_LENGTH);\n /* >> 32 too large for 32 bit machines */\n\n gfc.header[gfc.h_ptr].buf[ptr >> 3] |= ((val >> j)) << (8 - (ptr & 7) - k);\n ptr += k;\n }\n gfc.header[gfc.h_ptr].ptr = ptr;\n }\n\n function CRC_update(value, crc) {\n value <<= 8;\n for (var i = 0; i < 8; i++) {\n value <<= 1;\n crc <<= 1;\n\n if ((((crc ^ value) & 0x10000) != 0))\n crc ^= CRC16_POLYNOMIAL;\n }\n return crc;\n }\n\n this.CRC_writeheader = function (gfc, header) {\n var crc = 0xffff;\n /* (jo) init crc16 for error_protection */\n\n crc = CRC_update(header[2] & 0xff, crc);\n crc = CRC_update(header[3] & 0xff, crc);\n for (var i = 6; i < gfc.sideinfo_len; i++) {\n crc = CRC_update(header[i] & 0xff, crc);\n }\n\n header[4] = (byte)(crc >> 8);\n header[5] = (byte)(crc & 255);\n };\n\n function encodeSideInfo2(gfp, bitsPerFrame) {\n var gfc = gfp.internal_flags;\n var l3_side;\n var gr, ch;\n\n l3_side = gfc.l3_side;\n gfc.header[gfc.h_ptr].ptr = 0;\n Arrays.fill(gfc.header[gfc.h_ptr].buf, 0, gfc.sideinfo_len, 0);\n if (gfp.out_samplerate < 16000)\n writeheader(gfc, 0xffe, 12);\n else\n writeheader(gfc, 0xfff, 12);\n writeheader(gfc, (gfp.version), 1);\n writeheader(gfc, 4 - 3, 2);\n writeheader(gfc, (!gfp.error_protection ? 1 : 0), 1);\n writeheader(gfc, (gfc.bitrate_index), 4);\n writeheader(gfc, (gfc.samplerate_index), 2);\n writeheader(gfc, (gfc.padding), 1);\n writeheader(gfc, (gfp.extension), 1);\n writeheader(gfc, (gfp.mode.ordinal()), 2);\n writeheader(gfc, (gfc.mode_ext), 2);\n writeheader(gfc, (gfp.copyright), 1);\n writeheader(gfc, (gfp.original), 1);\n writeheader(gfc, (gfp.emphasis), 2);\n if (gfp.error_protection) {\n writeheader(gfc, 0, 16);\n /* dummy */\n }\n\n if (gfp.version == 1) {\n /* MPEG1 */\n assert(l3_side.main_data_begin >= 0);\n writeheader(gfc, (l3_side.main_data_begin), 9);\n\n if (gfc.channels_out == 2)\n writeheader(gfc, l3_side.private_bits, 3);\n else\n writeheader(gfc, l3_side.private_bits, 5);\n\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var band;\n for (band = 0; band < 4; band++) {\n writeheader(gfc, l3_side.scfsi[ch][band], 1);\n }\n }\n\n for (gr = 0; gr < 2; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n writeheader(gfc, gi.part2_3_length + gi.part2_length, 12);\n writeheader(gfc, gi.big_values / 2, 9);\n writeheader(gfc, gi.global_gain, 8);\n writeheader(gfc, gi.scalefac_compress, 4);\n\n if (gi.block_type != Encoder.NORM_TYPE) {\n writeheader(gfc, 1, 1);\n /* window_switching_flag */\n writeheader(gfc, gi.block_type, 2);\n writeheader(gfc, gi.mixed_block_flag, 1);\n\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n\n writeheader(gfc, gi.subblock_gain[0], 3);\n writeheader(gfc, gi.subblock_gain[1], 3);\n writeheader(gfc, gi.subblock_gain[2], 3);\n } else {\n writeheader(gfc, 0, 1);\n /* window_switching_flag */\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n if (gi.table_select[2] == 14)\n gi.table_select[2] = 16;\n writeheader(gfc, gi.table_select[2], 5);\n\n assert(0 <= gi.region0_count && gi.region0_count < 16);\n assert(0 <= gi.region1_count && gi.region1_count < 8);\n writeheader(gfc, gi.region0_count, 4);\n writeheader(gfc, gi.region1_count, 3);\n }\n writeheader(gfc, gi.preflag, 1);\n writeheader(gfc, gi.scalefac_scale, 1);\n writeheader(gfc, gi.count1table_select, 1);\n }\n }\n } else {\n /* MPEG2 */\n assert(l3_side.main_data_begin >= 0);\n writeheader(gfc, (l3_side.main_data_begin), 8);\n writeheader(gfc, l3_side.private_bits, gfc.channels_out);\n\n gr = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n writeheader(gfc, gi.part2_3_length + gi.part2_length, 12);\n writeheader(gfc, gi.big_values / 2, 9);\n writeheader(gfc, gi.global_gain, 8);\n writeheader(gfc, gi.scalefac_compress, 9);\n\n if (gi.block_type != Encoder.NORM_TYPE) {\n writeheader(gfc, 1, 1);\n /* window_switching_flag */\n writeheader(gfc, gi.block_type, 2);\n writeheader(gfc, gi.mixed_block_flag, 1);\n\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n\n writeheader(gfc, gi.subblock_gain[0], 3);\n writeheader(gfc, gi.subblock_gain[1], 3);\n writeheader(gfc, gi.subblock_gain[2], 3);\n } else {\n writeheader(gfc, 0, 1);\n /* window_switching_flag */\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n if (gi.table_select[2] == 14)\n gi.table_select[2] = 16;\n writeheader(gfc, gi.table_select[2], 5);\n\n assert(0 <= gi.region0_count && gi.region0_count < 16);\n assert(0 <= gi.region1_count && gi.region1_count < 8);\n writeheader(gfc, gi.region0_count, 4);\n writeheader(gfc, gi.region1_count, 3);\n }\n\n writeheader(gfc, gi.scalefac_scale, 1);\n writeheader(gfc, gi.count1table_select, 1);\n }\n }\n\n if (gfp.error_protection) {\n /* (jo) error_protection: add crc16 information to header */\n CRC_writeheader(gfc, gfc.header[gfc.h_ptr].buf);\n }\n\n {\n var old = gfc.h_ptr;\n assert(gfc.header[old].ptr == gfc.sideinfo_len * 8);\n\n gfc.h_ptr = (old + 1) & (LameInternalFlags.MAX_HEADER_BUF - 1);\n gfc.header[gfc.h_ptr].write_timing = gfc.header[old].write_timing\n + bitsPerFrame;\n\n if (gfc.h_ptr == gfc.w_ptr) {\n /* yikes! we are out of header buffer space */\n System.err\n .println(\"Error: MAX_HEADER_BUF too small in bitstream.c \\n\");\n }\n\n }\n }\n\n function huffman_coder_count1(gfc, gi) {\n /* Write count1 area */\n var h = Tables.ht[gi.count1table_select + 32];\n var i, bits = 0;\n\n var ix = gi.big_values;\n var xr = gi.big_values;\n assert(gi.count1table_select < 2);\n\n for (i = (gi.count1 - gi.big_values) / 4; i > 0; --i) {\n var huffbits = 0;\n var p = 0, v;\n\n v = gi.l3_enc[ix + 0];\n if (v != 0) {\n p += 8;\n if (gi.xr[xr + 0] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 1];\n if (v != 0) {\n p += 4;\n huffbits *= 2;\n if (gi.xr[xr + 1] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 2];\n if (v != 0) {\n p += 2;\n huffbits *= 2;\n if (gi.xr[xr + 2] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 3];\n if (v != 0) {\n p++;\n huffbits *= 2;\n if (gi.xr[xr + 3] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n ix += 4;\n xr += 4;\n putbits2(gfc, huffbits + h.table[p], h.hlen[p]);\n bits += h.hlen[p];\n }\n return bits;\n }\n\n /**\n * Implements the pseudocode of page 98 of the IS\n */\n function Huffmancode(gfc, tableindex, start, end, gi) {\n var h = Tables.ht[tableindex];\n var bits = 0;\n\n assert(tableindex < 32);\n if (0 == tableindex)\n return bits;\n\n for (var i = start; i < end; i += 2) {\n var cbits = 0;\n var xbits = 0;\n var linbits = h.xlen;\n var xlen = h.xlen;\n var ext = 0;\n var x1 = gi.l3_enc[i];\n var x2 = gi.l3_enc[i + 1];\n\n if (x1 != 0) {\n if (gi.xr[i] < 0)\n ext++;\n cbits--;\n }\n\n if (tableindex > 15) {\n /* use ESC-words */\n if (x1 > 14) {\n var linbits_x1 = x1 - 15;\n assert(linbits_x1 <= h.linmax);\n ext |= linbits_x1 << 1;\n xbits = linbits;\n x1 = 15;\n }\n\n if (x2 > 14) {\n var linbits_x2 = x2 - 15;\n assert(linbits_x2 <= h.linmax);\n ext <<= linbits;\n ext |= linbits_x2;\n xbits += linbits;\n x2 = 15;\n }\n xlen = 16;\n }\n\n if (x2 != 0) {\n ext <<= 1;\n if (gi.xr[i + 1] < 0)\n ext++;\n cbits--;\n }\n\n assert((x1 | x2) < 16);\n\n x1 = x1 * xlen + x2;\n xbits -= cbits;\n cbits += h.hlen[x1];\n\n assert(cbits <= MAX_LENGTH);\n assert(xbits <= MAX_LENGTH);\n\n putbits2(gfc, h.table[x1], cbits);\n putbits2(gfc, ext, xbits);\n bits += cbits + xbits;\n }\n return bits;\n }\n\n /**\n * Note the discussion of huffmancodebits() on pages 28 and 29 of the IS, as\n * well as the definitions of the side information on pages 26 and 27.\n */\n function ShortHuffmancodebits(gfc, gi) {\n var region1Start = 3 * gfc.scalefac_band.s[3];\n if (region1Start > gi.big_values)\n region1Start = gi.big_values;\n\n /* short blocks do not have a region2 */\n var bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);\n bits += Huffmancode(gfc, gi.table_select[1], region1Start,\n gi.big_values, gi);\n return bits;\n }\n\n function LongHuffmancodebits(gfc, gi) {\n var bigvalues, bits;\n var region1Start, region2Start;\n\n bigvalues = gi.big_values;\n assert(0 <= bigvalues && bigvalues <= 576);\n\n var i = gi.region0_count + 1;\n assert(0 <= i);\n assert(i < gfc.scalefac_band.l.length);\n region1Start = gfc.scalefac_band.l[i];\n i += gi.region1_count + 1;\n assert(0 <= i);\n assert(i < gfc.scalefac_band.l.length);\n region2Start = gfc.scalefac_band.l[i];\n\n if (region1Start > bigvalues)\n region1Start = bigvalues;\n\n if (region2Start > bigvalues)\n region2Start = bigvalues;\n\n bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);\n bits += Huffmancode(gfc, gi.table_select[1], region1Start,\n region2Start, gi);\n bits += Huffmancode(gfc, gi.table_select[2], region2Start, bigvalues,\n gi);\n return bits;\n }\n\n function writeMainData(gfp) {\n var gr, ch, sfb, data_bits, tot_bits = 0;\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n\n if (gfp.version == 1) {\n /* MPEG 1 */\n for (gr = 0; gr < 2; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n var slen1 = Takehiro.slen1_tab[gi.scalefac_compress];\n var slen2 = Takehiro.slen2_tab[gi.scalefac_compress];\n data_bits = 0;\n for (sfb = 0; sfb < gi.sfbdivide; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n /* scfsi is used */\n putbits2(gfc, gi.scalefac[sfb], slen1);\n data_bits += slen1;\n }\n for (; sfb < gi.sfbmax; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n /* scfsi is used */\n putbits2(gfc, gi.scalefac[sfb], slen2);\n data_bits += slen2;\n }\n assert(data_bits == gi.part2_length);\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n data_bits += ShortHuffmancodebits(gfc, gi);\n } else {\n data_bits += LongHuffmancodebits(gfc, gi);\n }\n data_bits += huffman_coder_count1(gfc, gi);\n /* does bitcount in quantize.c agree with actual bit count? */\n assert(data_bits == gi.part2_3_length + gi.part2_length);\n tot_bits += data_bits;\n }\n /* for ch */\n }\n /* for gr */\n } else {\n /* MPEG 2 */\n gr = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n var i, sfb_partition, scale_bits = 0;\n assert(gi.sfb_partition_table != null);\n data_bits = 0;\n sfb = 0;\n sfb_partition = 0;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n for (; sfb_partition < 4; sfb_partition++) {\n var sfbs = gi.sfb_partition_table[sfb_partition] / 3;\n var slen = gi.slen[sfb_partition];\n for (i = 0; i < sfbs; i++, sfb++) {\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 0], 0), slen);\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 1], 0), slen);\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 2], 0), slen);\n scale_bits += 3 * slen;\n }\n }\n data_bits += ShortHuffmancodebits(gfc, gi);\n } else {\n for (; sfb_partition < 4; sfb_partition++) {\n var sfbs = gi.sfb_partition_table[sfb_partition];\n var slen = gi.slen[sfb_partition];\n for (i = 0; i < sfbs; i++, sfb++) {\n putbits2(gfc, Math.max(gi.scalefac[sfb], 0), slen);\n scale_bits += slen;\n }\n }\n data_bits += LongHuffmancodebits(gfc, gi);\n }\n data_bits += huffman_coder_count1(gfc, gi);\n /* does bitcount in quantize.c agree with actual bit count? */\n assert(data_bits == gi.part2_3_length);\n assert(scale_bits == gi.part2_length);\n tot_bits += scale_bits + data_bits;\n }\n /* for ch */\n }\n /* for gf */\n return tot_bits;\n }\n\n /* main_data */\n\n function TotalBytes() {\n this.total = 0;\n }\n\n /*\n * compute the number of bits required to flush all mp3 frames currently in\n * the buffer. This should be the same as the reservoir size. Only call this\n * routine between frames - i.e. only after all headers and data have been\n * added to the buffer by format_bitstream().\n *\n * Also compute total_bits_output = size of mp3 buffer (including frame\n * headers which may not have yet been send to the mp3 buffer) + number of\n * bits needed to flush all mp3 frames.\n *\n * total_bytes_output is the size of the mp3 output buffer if\n * lame_encode_flush_nogap() was called right now.\n */\n function compute_flushbits(gfp, total_bytes_output) {\n var gfc = gfp.internal_flags;\n var flushbits, remaining_headers;\n var bitsPerFrame;\n var last_ptr, first_ptr;\n first_ptr = gfc.w_ptr;\n /* first header to add to bitstream */\n last_ptr = gfc.h_ptr - 1;\n /* last header to add to bitstream */\n if (last_ptr == -1)\n last_ptr = LameInternalFlags.MAX_HEADER_BUF - 1;\n\n /* add this many bits to bitstream so we can flush all headers */\n flushbits = gfc.header[last_ptr].write_timing - totbit;\n total_bytes_output.total = flushbits;\n\n if (flushbits >= 0) {\n /* if flushbits >= 0, some headers have not yet been written */\n /* reduce flushbits by the size of the headers */\n remaining_headers = 1 + last_ptr - first_ptr;\n if (last_ptr < first_ptr)\n remaining_headers = 1 + last_ptr - first_ptr\n + LameInternalFlags.MAX_HEADER_BUF;\n flushbits -= remaining_headers * 8 * gfc.sideinfo_len;\n }\n\n /*\n * finally, add some bits so that the last frame is complete these bits\n * are not necessary to decode the last frame, but some decoders will\n * ignore last frame if these bits are missing\n */\n bitsPerFrame = self.getframebits(gfp);\n flushbits += bitsPerFrame;\n total_bytes_output.total += bitsPerFrame;\n /* round up: */\n if ((total_bytes_output.total % 8) != 0)\n total_bytes_output.total = 1 + (total_bytes_output.total / 8);\n else\n total_bytes_output.total = (total_bytes_output.total / 8);\n total_bytes_output.total += bufByteIdx + 1;\n\n if (flushbits < 0) {\n System.err.println(\"strange error flushing buffer ... \\n\");\n }\n return flushbits;\n }\n\n this.flush_bitstream = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side;\n var flushbits;\n var last_ptr = gfc.h_ptr - 1;\n /* last header to add to bitstream */\n if (last_ptr == -1)\n last_ptr = LameInternalFlags.MAX_HEADER_BUF - 1;\n l3_side = gfc.l3_side;\n\n if ((flushbits = compute_flushbits(gfp, new TotalBytes())) < 0)\n return;\n drain_into_ancillary(gfp, flushbits);\n\n /* check that the 100% of the last frame has been written to bitstream */\n assert(gfc.header[last_ptr].write_timing + this.getframebits(gfp) == totbit);\n\n /*\n * we have padded out all frames with ancillary data, which is the same\n * as filling the bitreservoir with ancillary data, so :\n */\n gfc.ResvSize = 0;\n l3_side.main_data_begin = 0;\n\n /* save the ReplayGain value */\n if (gfc.findReplayGain) {\n var RadioGain = ga.GetTitleGain(gfc.rgdata);\n assert(NEQ(RadioGain, GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES));\n gfc.RadioGain = Math.floor(RadioGain * 10.0 + 0.5) | 0;\n /* round to nearest */\n }\n\n /* find the gain and scale change required for no clipping */\n if (gfc.findPeakSample) {\n gfc.noclipGainChange = Math.ceil(Math\n .log10(gfc.PeakSample / 32767.0) * 20.0 * 10.0) | 0;\n /* round up */\n\n if (gfc.noclipGainChange > 0) {\n /* clipping occurs */\n if (EQ(gfp.scale, 1.0) || EQ(gfp.scale, 0.0))\n gfc.noclipScale = (Math\n .floor((32767.0 / gfc.PeakSample) * 100.0) / 100.0);\n /* round down */\n else {\n /*\n * the user specified his own scaling factor. We could\n * suggest the scaling factor of\n * (32767.0/gfp.PeakSample)*(gfp.scale) but it's usually\n * very inaccurate. So we'd rather not advice him on the\n * scaling factor.\n */\n gfc.noclipScale = -1;\n }\n } else\n /* no clipping */\n gfc.noclipScale = -1;\n }\n };\n\n this.add_dummy_byte = function (gfp, val, n) {\n var gfc = gfp.internal_flags;\n var i;\n\n while (n-- > 0) {\n putbits_noheaders(gfc, val, 8);\n\n for (i = 0; i < LameInternalFlags.MAX_HEADER_BUF; ++i)\n gfc.header[i].write_timing += 8;\n }\n };\n\n /**\n * This is called after a frame of audio has been quantized and coded. It\n * will write the encoded audio to the bitstream. Note that from a layer3\n * encoder's perspective the bit stream is primarily a series of main_data()\n * blocks, with header and side information inserted at the proper locations\n * to maintain framing. (See Figure A.7 in the IS).\n */\n this.format_bitstream = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side;\n l3_side = gfc.l3_side;\n\n var bitsPerFrame = this.getframebits(gfp);\n drain_into_ancillary(gfp, l3_side.resvDrain_pre);\n\n encodeSideInfo2(gfp, bitsPerFrame);\n var bits = 8 * gfc.sideinfo_len;\n bits += writeMainData(gfp);\n drain_into_ancillary(gfp, l3_side.resvDrain_post);\n bits += l3_side.resvDrain_post;\n\n l3_side.main_data_begin += (bitsPerFrame - bits) / 8;\n\n /*\n * compare number of bits needed to clear all buffered mp3 frames with\n * what we think the resvsize is:\n */\n if (compute_flushbits(gfp, new TotalBytes()) != gfc.ResvSize) {\n System.err.println(\"Internal buffer inconsistency. flushbits <> ResvSize\");\n }\n\n /*\n * compare main_data_begin for the next frame with what we think the\n * resvsize is:\n */\n if ((l3_side.main_data_begin * 8) != gfc.ResvSize) {\n System.err.printf(\"bit reservoir error: \\n\"\n + \"l3_side.main_data_begin: %d \\n\"\n + \"Resvoir size: %d \\n\"\n + \"resv drain (post) %d \\n\"\n + \"resv drain (pre) %d \\n\"\n + \"header and sideinfo: %d \\n\"\n + \"data bits: %d \\n\"\n + \"total bits: %d (remainder: %d) \\n\"\n + \"bitsperframe: %d \\n\",\n 8 * l3_side.main_data_begin, gfc.ResvSize,\n l3_side.resvDrain_post, l3_side.resvDrain_pre,\n 8 * gfc.sideinfo_len, bits - l3_side.resvDrain_post - 8\n * gfc.sideinfo_len, bits, bits % 8, bitsPerFrame);\n\n System.err.println(\"This is a fatal error. It has several possible causes:\");\n System.err.println(\"90%% LAME compiled with buggy version of gcc using advanced optimizations\");\n System.err.println(\" 9%% Your system is overclocked\");\n System.err.println(\" 1%% bug in LAME encoding library\");\n\n gfc.ResvSize = l3_side.main_data_begin * 8;\n }\n //;\n assert(totbit % 8 == 0);\n\n if (totbit > 1000000000) {\n /*\n * to avoid totbit overflow, (at 8h encoding at 128kbs) lets reset\n * bit counter\n */\n var i;\n for (i = 0; i < LameInternalFlags.MAX_HEADER_BUF; ++i)\n gfc.header[i].write_timing -= totbit;\n totbit = 0;\n }\n\n return 0;\n };\n\n /**\n *
\n     * copy data out of the internal MP3 bit buffer into a user supplied\n     *       unsigned char buffer.\n     *\n     *       mp3data=0      indicates data in buffer is an id3tags and VBR tags\n     *       mp3data=1      data is real mp3 frame data.\n     * 
\n */\n this.copy_buffer = function (gfc, buffer, bufferPos, size, mp3data) {\n var minimum = bufByteIdx + 1;\n if (minimum <= 0)\n return 0;\n if (size != 0 && minimum > size) {\n /* buffer is too small */\n return -1;\n }\n System.arraycopy(buf, 0, buffer, bufferPos, minimum);\n bufByteIdx = -1;\n bufBitIdx = 0;\n\n if (mp3data != 0) {\n var crc = new_int(1);\n crc[0] = gfc.nMusicCRC;\n vbr.updateMusicCRC(crc, buffer, bufferPos, minimum);\n gfc.nMusicCRC = crc[0];\n\n /**\n * sum number of bytes belonging to the mp3 stream this info will be\n * written into the Xing/LAME header for seeking\n */\n if (minimum > 0) {\n gfc.VBR_seek_table.nBytesWritten += minimum;\n }\n\n if (gfc.decode_on_the_fly) { /* decode the frame */\n var pcm_buf = new_float_n([2, 1152]);\n var mp3_in = minimum;\n var samples_out = -1;\n var i;\n\n /* re-synthesis to pcm. Repeat until we get a samples_out=0 */\n while (samples_out != 0) {\n\n samples_out = mpg.hip_decode1_unclipped(gfc.hip, buffer,\n bufferPos, mp3_in, pcm_buf[0], pcm_buf[1]);\n /*\n * samples_out = 0: need more data to decode samples_out =\n * -1: error. Lets assume 0 pcm output samples_out = number\n * of samples output\n */\n\n /*\n * set the lenght of the mp3 input buffer to zero, so that\n * in the next iteration of the loop we will be querying\n * mpglib about buffered data\n */\n mp3_in = 0;\n\n if (samples_out == -1) {\n /*\n * error decoding. Not fatal, but might screw up the\n * ReplayGain tag. What should we do? Ignore for now\n */\n samples_out = 0;\n }\n if (samples_out > 0) {\n /* process the PCM data */\n\n /*\n * this should not be possible, and indicates we have\n * overflown the pcm_buf buffer\n */\n assert(samples_out <= 1152);\n\n if (gfc.findPeakSample) {\n for (i = 0; i < samples_out; i++) {\n if (pcm_buf[0][i] > gfc.PeakSample)\n gfc.PeakSample = pcm_buf[0][i];\n else if (-pcm_buf[0][i] > gfc.PeakSample)\n gfc.PeakSample = -pcm_buf[0][i];\n }\n if (gfc.channels_out > 1)\n for (i = 0; i < samples_out; i++) {\n if (pcm_buf[1][i] > gfc.PeakSample)\n gfc.PeakSample = pcm_buf[1][i];\n else if (-pcm_buf[1][i] > gfc.PeakSample)\n gfc.PeakSample = -pcm_buf[1][i];\n }\n }\n\n if (gfc.findReplayGain)\n if (ga.AnalyzeSamples(gfc.rgdata, pcm_buf[0], 0,\n pcm_buf[1], 0, samples_out,\n gfc.channels_out) == GainAnalysis.GAIN_ANALYSIS_ERROR)\n return -6;\n\n }\n /* if (samples_out>0) */\n }\n /* while (samples_out!=0) */\n }\n /* if (gfc.decode_on_the_fly) */\n\n }\n /* if (mp3data) */\n return minimum;\n };\n\n this.init_bit_stream_w = function (gfc) {\n buf = new_byte(Lame.LAME_MAXMP3BUFFER);\n\n gfc.h_ptr = gfc.w_ptr = 0;\n gfc.header[gfc.h_ptr].write_timing = 0;\n bufByteIdx = -1;\n bufBitIdx = 0;\n totbit = 0;\n };\n\n // From machine.h\n\n\n}\n\nmodule.exports = BitStream;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar new_short_n = common.new_short_n;\nvar assert = common.assert;\n\nvar PsyModel = require('./PsyModel.js');\nvar LameGlobalFlags = require('./LameGlobalFlags.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\nvar ATH = require('./ATH.js');\nvar ReplayGain = require('./ReplayGain.js');\nvar CBRNewIterationLoop = require('./CBRNewIterationLoop.js');\nvar BitStream = require('./BitStream.js');\nvar Tables = require('./Tables.js');\nvar Encoder = require('./Encoder.js');\n\nfunction Lame() {\n var self = this;\n var LAME_MAXALBUMART = (128 * 1024);\n\n Lame.V9 = 410;\n Lame.V8 = 420;\n Lame.V7 = 430;\n Lame.V6 = 440;\n Lame.V5 = 450;\n Lame.V4 = 460;\n Lame.V3 = 470;\n Lame.V2 = 480;\n Lame.V1 = 490;\n Lame.V0 = 500;\n\n /* still there for compatibility */\n\n Lame.R3MIX = 1000;\n Lame.STANDARD = 1001;\n Lame.EXTREME = 1002;\n Lame.INSANE = 1003;\n Lame.STANDARD_FAST = 1004;\n Lame.EXTREME_FAST = 1005;\n Lame.MEDIUM = 1006;\n Lame.MEDIUM_FAST = 1007;\n\n /**\n * maximum size of mp3buffer needed if you encode at most 1152 samples for\n * each call to lame_encode_buffer. see lame_encode_buffer() below\n * (LAME_MAXMP3BUFFER is now obsolete)\n */\n var LAME_MAXMP3BUFFER = (16384 + LAME_MAXALBUMART);\n Lame.LAME_MAXMP3BUFFER = LAME_MAXMP3BUFFER;\n\n var ga;\n var bs;\n var p;\n var qupvt;\n var qu;\n var psy = new PsyModel();\n var vbr;\n var ver;\n var id3;\n var mpglib;\n this.enc = new Encoder();\n\n this.setModules = function (_ga, _bs, _p, _qupvt, _qu, _vbr, _ver, _id3, _mpglib) {\n ga = _ga;\n bs = _bs;\n p = _p;\n qupvt = _qupvt;\n qu = _qu;\n vbr = _vbr;\n ver = _ver;\n id3 = _id3;\n mpglib = _mpglib;\n this.enc.setModules(bs, psy, qupvt, vbr);\n }\n\n /**\n * PSY Model related stuff\n */\n function PSY() {\n /**\n * The dbQ stuff.\n */\n this.mask_adjust = 0.;\n /**\n * The dbQ stuff.\n */\n this.mask_adjust_short = 0.;\n /* at transition from one scalefactor band to next */\n /**\n * Band weight long scalefactor bands.\n */\n this.bo_l_weight = new_float(Encoder.SBMAX_l);\n /**\n * Band weight short scalefactor bands.\n */\n this.bo_s_weight = new_float(Encoder.SBMAX_s);\n }\n\n function LowPassHighPass() {\n this.lowerlimit = 0.;\n }\n\n function BandPass(bitrate, lPass) {\n this.lowpass = lPass;\n }\n\n var LAME_ID = 0xFFF88E3B;\n\n function lame_init_old(gfp) {\n var gfc;\n\n gfp.class_id = LAME_ID;\n\n gfc = gfp.internal_flags = new LameInternalFlags();\n\n /* Global flags. set defaults here for non-zero values */\n /* see lame.h for description */\n /*\n * set integer values to -1 to mean that LAME will compute the best\n * value, UNLESS the calling program as set it (and the value is no\n * longer -1)\n */\n\n gfp.mode = MPEGMode.NOT_SET;\n gfp.original = 1;\n gfp.in_samplerate = 44100;\n gfp.num_channels = 2;\n gfp.num_samples = -1;\n\n gfp.bWriteVbrTag = true;\n gfp.quality = -1;\n gfp.short_blocks = null;\n gfc.subblock_gain = -1;\n\n gfp.lowpassfreq = 0;\n gfp.highpassfreq = 0;\n gfp.lowpasswidth = -1;\n gfp.highpasswidth = -1;\n\n gfp.VBR = VbrMode.vbr_off;\n gfp.VBR_q = 4;\n gfp.ATHcurve = -1;\n gfp.VBR_mean_bitrate_kbps = 128;\n gfp.VBR_min_bitrate_kbps = 0;\n gfp.VBR_max_bitrate_kbps = 0;\n gfp.VBR_hard_min = 0;\n gfc.VBR_min_bitrate = 1;\n /* not 0 ????? */\n gfc.VBR_max_bitrate = 13;\n /* not 14 ????? */\n\n gfp.quant_comp = -1;\n gfp.quant_comp_short = -1;\n\n gfp.msfix = -1;\n\n gfc.resample_ratio = 1;\n\n gfc.OldValue[0] = 180;\n gfc.OldValue[1] = 180;\n gfc.CurrentStep[0] = 4;\n gfc.CurrentStep[1] = 4;\n gfc.masking_lower = 1;\n gfc.nsPsy.attackthre = -1;\n gfc.nsPsy.attackthre_s = -1;\n\n gfp.scale = -1;\n\n gfp.athaa_type = -1;\n gfp.ATHtype = -1;\n /* default = -1 = set in lame_init_params */\n gfp.athaa_loudapprox = -1;\n /* 1 = flat loudness approx. (total energy) */\n /* 2 = equal loudness curve */\n gfp.athaa_sensitivity = 0.0;\n /* no offset */\n gfp.useTemporal = null;\n gfp.interChRatio = -1;\n\n /*\n * The reason for int mf_samples_to_encode = ENCDELAY + POSTDELAY;\n * ENCDELAY = internal encoder delay. And then we have to add\n * POSTDELAY=288 because of the 50% MDCT overlap. A 576 MDCT granule\n * decodes to 1152 samples. To synthesize the 576 samples centered under\n * this granule we need the previous granule for the first 288 samples\n * (no problem), and the next granule for the next 288 samples (not\n * possible if this is last granule). So we need to pad with 288 samples\n * to make sure we can encode the 576 samples we are interested in.\n */\n gfc.mf_samples_to_encode = Encoder.ENCDELAY + Encoder.POSTDELAY;\n gfp.encoder_padding = 0;\n gfc.mf_size = Encoder.ENCDELAY - Encoder.MDCTDELAY;\n /*\n * we pad input with this many 0's\n */\n\n gfp.findReplayGain = false;\n gfp.decode_on_the_fly = false;\n\n gfc.decode_on_the_fly = false;\n gfc.findReplayGain = false;\n gfc.findPeakSample = false;\n\n gfc.RadioGain = 0;\n gfc.AudiophileGain = 0;\n gfc.noclipGainChange = 0;\n gfc.noclipScale = -1.0;\n\n gfp.preset = 0;\n\n gfp.write_id3tag_automatic = true;\n return 0;\n }\n\n this.lame_init = function () {\n var gfp = new LameGlobalFlags();\n\n var ret = lame_init_old(gfp);\n if (ret != 0) {\n return null;\n }\n\n gfp.lame_allocated_gfp = 1;\n return gfp;\n }\n\n function filter_coef(x) {\n if (x > 1.0)\n return 0.0;\n if (x <= 0.0)\n return 1.0;\n\n return Math.cos(Math.PI / 2 * x);\n }\n\n this.nearestBitrateFullIndex = function (bitrate) {\n /* borrowed from DM abr presets */\n\n var full_bitrate_table = [8, 16, 24, 32, 40, 48, 56, 64, 80,\n 96, 112, 128, 160, 192, 224, 256, 320];\n\n var lower_range = 0, lower_range_kbps = 0, upper_range = 0, upper_range_kbps = 0;\n\n /* We assume specified bitrate will be 320kbps */\n upper_range_kbps = full_bitrate_table[16];\n upper_range = 16;\n lower_range_kbps = full_bitrate_table[16];\n lower_range = 16;\n\n /*\n * Determine which significant bitrates the value specified falls\n * between, if loop ends without breaking then we were correct above\n * that the value was 320\n */\n for (var b = 0; b < 16; b++) {\n if ((Math.max(bitrate, full_bitrate_table[b + 1])) != bitrate) {\n upper_range_kbps = full_bitrate_table[b + 1];\n upper_range = b + 1;\n lower_range_kbps = full_bitrate_table[b];\n lower_range = (b);\n break;\n /* We found upper range */\n }\n }\n\n /* Determine which range the value specified is closer to */\n if ((upper_range_kbps - bitrate) > (bitrate - lower_range_kbps)) {\n return lower_range;\n }\n return upper_range;\n }\n\n function optimum_samplefreq(lowpassfreq, input_samplefreq) {\n /*\n * Rules:\n *\n * - if possible, sfb21 should NOT be used\n */\n var suggested_samplefreq = 44100;\n\n if (input_samplefreq >= 48000)\n suggested_samplefreq = 48000;\n else if (input_samplefreq >= 44100)\n suggested_samplefreq = 44100;\n else if (input_samplefreq >= 32000)\n suggested_samplefreq = 32000;\n else if (input_samplefreq >= 24000)\n suggested_samplefreq = 24000;\n else if (input_samplefreq >= 22050)\n suggested_samplefreq = 22050;\n else if (input_samplefreq >= 16000)\n suggested_samplefreq = 16000;\n else if (input_samplefreq >= 12000)\n suggested_samplefreq = 12000;\n else if (input_samplefreq >= 11025)\n suggested_samplefreq = 11025;\n else if (input_samplefreq >= 8000)\n suggested_samplefreq = 8000;\n\n if (lowpassfreq == -1)\n return suggested_samplefreq;\n\n if (lowpassfreq <= 15960)\n suggested_samplefreq = 44100;\n if (lowpassfreq <= 15250)\n suggested_samplefreq = 32000;\n if (lowpassfreq <= 11220)\n suggested_samplefreq = 24000;\n if (lowpassfreq <= 9970)\n suggested_samplefreq = 22050;\n if (lowpassfreq <= 7230)\n suggested_samplefreq = 16000;\n if (lowpassfreq <= 5420)\n suggested_samplefreq = 12000;\n if (lowpassfreq <= 4510)\n suggested_samplefreq = 11025;\n if (lowpassfreq <= 3970)\n suggested_samplefreq = 8000;\n\n if (input_samplefreq < suggested_samplefreq) {\n /*\n * choose a valid MPEG sample frequency above the input sample\n * frequency to avoid SFB21/12 bitrate bloat rh 061115\n */\n if (input_samplefreq > 44100) {\n return 48000;\n }\n if (input_samplefreq > 32000) {\n return 44100;\n }\n if (input_samplefreq > 24000) {\n return 32000;\n }\n if (input_samplefreq > 22050) {\n return 24000;\n }\n if (input_samplefreq > 16000) {\n return 22050;\n }\n if (input_samplefreq > 12000) {\n return 16000;\n }\n if (input_samplefreq > 11025) {\n return 12000;\n }\n if (input_samplefreq > 8000) {\n return 11025;\n }\n return 8000;\n }\n return suggested_samplefreq;\n }\n\n /**\n * convert samp freq in Hz to index\n */\n function SmpFrqIndex(sample_freq, gpf) {\n switch (sample_freq) {\n case 44100:\n gpf.version = 1;\n return 0;\n case 48000:\n gpf.version = 1;\n return 1;\n case 32000:\n gpf.version = 1;\n return 2;\n case 22050:\n gpf.version = 0;\n return 0;\n case 24000:\n gpf.version = 0;\n return 1;\n case 16000:\n gpf.version = 0;\n return 2;\n case 11025:\n gpf.version = 0;\n return 0;\n case 12000:\n gpf.version = 0;\n return 1;\n case 8000:\n gpf.version = 0;\n return 2;\n default:\n gpf.version = 0;\n return -1;\n }\n }\n\n /**\n * @param bRate\n * legal rates from 8 to 320\n */\n function FindNearestBitrate(bRate, version, samplerate) {\n /* MPEG-1 or MPEG-2 LSF */\n if (samplerate < 16000)\n version = 2;\n\n var bitrate = Tables.bitrate_table[version][1];\n\n for (var i = 2; i <= 14; i++) {\n if (Tables.bitrate_table[version][i] > 0) {\n if (Math.abs(Tables.bitrate_table[version][i] - bRate) < Math\n .abs(bitrate - bRate))\n bitrate = Tables.bitrate_table[version][i];\n }\n }\n return bitrate;\n }\n\n /**\n * @param bRate\n * legal rates from 32 to 448 kbps\n * @param version\n * MPEG-1 or MPEG-2/2.5 LSF\n */\n function BitrateIndex(bRate, version, samplerate) {\n /* convert bitrate in kbps to index */\n if (samplerate < 16000)\n version = 2;\n for (var i = 0; i <= 14; i++) {\n if (Tables.bitrate_table[version][i] > 0) {\n if (Tables.bitrate_table[version][i] == bRate) {\n return i;\n }\n }\n }\n return -1;\n }\n\n function optimum_bandwidth(lh, bitrate) {\n /**\n *
\n         *  Input:\n         *      bitrate     total bitrate in kbps\n         *\n         *   Output:\n         *      lowerlimit: best lowpass frequency limit for input filter in Hz\n         *      upperlimit: best highpass frequency limit for input filter in Hz\n         * 
\n */\n var freq_map = [new BandPass(8, 2000),\n new BandPass(16, 3700), new BandPass(24, 3900),\n new BandPass(32, 5500), new BandPass(40, 7000),\n new BandPass(48, 7500), new BandPass(56, 10000),\n new BandPass(64, 11000), new BandPass(80, 13500),\n new BandPass(96, 15100), new BandPass(112, 15600),\n new BandPass(128, 17000), new BandPass(160, 17500),\n new BandPass(192, 18600), new BandPass(224, 19400),\n new BandPass(256, 19700), new BandPass(320, 20500)];\n\n var table_index = self.nearestBitrateFullIndex(bitrate);\n lh.lowerlimit = freq_map[table_index].lowpass;\n }\n\n function lame_init_params_ppflt(gfp) {\n var gfc = gfp.internal_flags;\n /***************************************************************/\n /* compute info needed for polyphase filter (filter type==0, default) */\n /***************************************************************/\n\n var lowpass_band = 32;\n var highpass_band = -1;\n\n if (gfc.lowpass1 > 0) {\n var minband = 999;\n for (var band = 0; band <= 31; band++) {\n var freq = (band / 31.0);\n /* this band and above will be zeroed: */\n if (freq >= gfc.lowpass2) {\n lowpass_band = Math.min(lowpass_band, band);\n }\n if (gfc.lowpass1 < freq && freq < gfc.lowpass2) {\n minband = Math.min(minband, band);\n }\n }\n\n /*\n * compute the *actual* transition band implemented by the polyphase\n * filter\n */\n if (minband == 999) {\n gfc.lowpass1 = (lowpass_band - .75) / 31.0;\n } else {\n gfc.lowpass1 = (minband - .75) / 31.0;\n }\n gfc.lowpass2 = lowpass_band / 31.0;\n }\n\n /*\n * make sure highpass filter is within 90% of what the effective\n * highpass frequency will be\n */\n if (gfc.highpass2 > 0) {\n if (gfc.highpass2 < .9 * (.75 / 31.0)) {\n gfc.highpass1 = 0;\n gfc.highpass2 = 0;\n System.err.println(\"Warning: highpass filter disabled. \"\n + \"highpass frequency too small\\n\");\n }\n }\n\n if (gfc.highpass2 > 0) {\n var maxband = -1;\n for (var band = 0; band <= 31; band++) {\n var freq = band / 31.0;\n /* this band and below will be zereod */\n if (freq <= gfc.highpass1) {\n highpass_band = Math.max(highpass_band, band);\n }\n if (gfc.highpass1 < freq && freq < gfc.highpass2) {\n maxband = Math.max(maxband, band);\n }\n }\n /*\n * compute the *actual* transition band implemented by the polyphase\n * filter\n */\n gfc.highpass1 = highpass_band / 31.0;\n if (maxband == -1) {\n gfc.highpass2 = (highpass_band + .75) / 31.0;\n } else {\n gfc.highpass2 = (maxband + .75) / 31.0;\n }\n }\n\n for (var band = 0; band < 32; band++) {\n var fc1, fc2;\n var freq = band / 31.0;\n if (gfc.highpass2 > gfc.highpass1) {\n fc1 = filter_coef((gfc.highpass2 - freq)\n / (gfc.highpass2 - gfc.highpass1 + 1e-20));\n } else {\n fc1 = 1.0;\n }\n if (gfc.lowpass2 > gfc.lowpass1) {\n fc2 = filter_coef((freq - gfc.lowpass1)\n / (gfc.lowpass2 - gfc.lowpass1 + 1e-20));\n } else {\n fc2 = 1.0;\n }\n gfc.amp_filter[band] = (fc1 * fc2);\n }\n }\n\n function lame_init_qval(gfp) {\n var gfc = gfp.internal_flags;\n\n switch (gfp.quality) {\n default:\n case 9: /* no psymodel, no noise shaping */\n gfc.psymodel = 0;\n gfc.noise_shaping = 0;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 8:\n gfp.quality = 7;\n //$FALL-THROUGH$\n case 7:\n /*\n * use psymodel (for short block and m/s switching), but no noise\n * shapping\n */\n gfc.psymodel = 1;\n gfc.noise_shaping = 0;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 6:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 5:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 4:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 3:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 1;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 2:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 1;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n /* inner loop */\n gfc.full_outer_loop = 0;\n break;\n\n case 1:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 2;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 0:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 2;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n /*\n * type 2 disabled because of it slowness, in favor of full outer\n * loop search\n */\n gfc.full_outer_loop = 0;\n /*\n * full outer loop search disabled because of audible distortions it\n * may generate rh 060629\n */\n break;\n }\n\n }\n\n function lame_init_bitstream(gfp) {\n var gfc = gfp.internal_flags;\n gfp.frameNum = 0;\n\n if (gfp.write_id3tag_automatic) {\n id3.id3tag_write_v2(gfp);\n }\n /* initialize histogram data optionally used by frontend */\n\n gfc.bitrate_stereoMode_Hist = new_int_n([16, 4 + 1]);\n gfc.bitrate_blockType_Hist = new_int_n([16, 4 + 1 + 1]);\n\n gfc.PeakSample = 0.0;\n\n /* Write initial VBR Header to bitstream and init VBR data */\n if (gfp.bWriteVbrTag)\n vbr.InitVbrTag(gfp);\n }\n\n /********************************************************************\n * initialize internal params based on data in gf (globalflags struct filled\n * in by calling program)\n *\n * OUTLINE:\n *\n * We first have some complex code to determine bitrate, output samplerate\n * and mode. It is complicated by the fact that we allow the user to set\n * some or all of these parameters, and need to determine best possible\n * values for the rest of them:\n *\n * 1. set some CPU related flags 2. check if we are mono.mono, stereo.mono\n * or stereo.stereo 3. compute bitrate and output samplerate: user may have\n * set compression ratio user may have set a bitrate user may have set a\n * output samplerate 4. set some options which depend on output samplerate\n * 5. compute the actual compression ratio 6. set mode based on compression\n * ratio\n *\n * The remaining code is much simpler - it just sets options based on the\n * mode & compression ratio:\n *\n * set allow_diff_short based on mode select lowpass filter based on\n * compression ratio & mode set the bitrate index, and min/max bitrates for\n * VBR modes disable VBR tag if it is not appropriate initialize the\n * bitstream initialize scalefac_band data set sideinfo_len (based on\n * channels, CRC, out_samplerate) write an id3v2 tag into the bitstream\n * write VBR tag into the bitstream set mpeg1/2 flag estimate the number of\n * frames (based on a lot of data)\n *\n * now we set more flags: nspsytune: see code VBR modes see code CBR/ABR see\n * code\n *\n * Finally, we set the algorithm flags based on the gfp.quality value\n * lame_init_qval(gfp);\n *\n ********************************************************************/\n this.lame_init_params = function (gfp) {\n var gfc = gfp.internal_flags;\n\n gfc.Class_ID = 0;\n if (gfc.ATH == null)\n gfc.ATH = new ATH();\n if (gfc.PSY == null)\n gfc.PSY = new PSY();\n if (gfc.rgdata == null)\n gfc.rgdata = new ReplayGain();\n\n gfc.channels_in = gfp.num_channels;\n if (gfc.channels_in == 1)\n gfp.mode = MPEGMode.MONO;\n gfc.channels_out = (gfp.mode == MPEGMode.MONO) ? 1 : 2;\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n if (gfp.mode == MPEGMode.MONO)\n gfp.force_ms = false;\n /*\n * don't allow forced mid/side stereo for mono output\n */\n\n if (gfp.VBR == VbrMode.vbr_off && gfp.VBR_mean_bitrate_kbps != 128\n && gfp.brate == 0)\n gfp.brate = gfp.VBR_mean_bitrate_kbps;\n\n if (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_mtrh\n || gfp.VBR == VbrMode.vbr_mt) {\n /* these modes can handle free format condition */\n } else {\n gfp.free_format = false;\n /* mode can't be mixed with free format */\n }\n\n if (gfp.VBR == VbrMode.vbr_off && gfp.brate == 0) {\n /* no bitrate or compression ratio specified, use 11.025 */\n if (BitStream.EQ(gfp.compression_ratio, 0))\n gfp.compression_ratio = 11.025;\n /*\n * rate to compress a CD down to exactly 128000 bps\n */\n }\n\n /* find bitrate if user specify a compression ratio */\n if (gfp.VBR == VbrMode.vbr_off && gfp.compression_ratio > 0) {\n\n if (gfp.out_samplerate == 0)\n gfp.out_samplerate = map2MP3Frequency((int)(0.97 * gfp.in_samplerate));\n /*\n * round up with a margin of 3 %\n */\n\n /*\n * choose a bitrate for the output samplerate which achieves\n * specified compression ratio\n */\n gfp.brate = 0 | (gfp.out_samplerate * 16 * gfc.channels_out / (1.e3 * gfp.compression_ratio));\n\n /* we need the version for the bitrate table look up */\n gfc.samplerate_index = SmpFrqIndex(gfp.out_samplerate, gfp);\n\n if (!gfp.free_format) /*\n * for non Free Format find the nearest allowed\n * bitrate\n */\n gfp.brate = FindNearestBitrate(gfp.brate, gfp.version,\n gfp.out_samplerate);\n }\n\n if (gfp.out_samplerate != 0) {\n if (gfp.out_samplerate < 16000) {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 8);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 64);\n } else if (gfp.out_samplerate < 32000) {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 8);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 160);\n } else {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 32);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 320);\n }\n }\n\n /****************************************************************/\n /* if a filter has not been enabled, see if we should add one: */\n /****************************************************************/\n if (gfp.lowpassfreq == 0) {\n var lowpass = 16000.;\n\n switch (gfp.VBR) {\n case VbrMode.vbr_off:\n {\n var lh = new LowPassHighPass();\n optimum_bandwidth(lh, gfp.brate);\n lowpass = lh.lowerlimit;\n break;\n }\n case VbrMode.vbr_abr:\n {\n var lh = new LowPassHighPass();\n optimum_bandwidth(lh, gfp.VBR_mean_bitrate_kbps);\n lowpass = lh.lowerlimit;\n break;\n }\n case VbrMode.vbr_rh:\n {\n var x = [19500, 19000, 18600, 18000, 17500, 16000,\n 15600, 14900, 12500, 10000, 3950];\n if (0 <= gfp.VBR_q && gfp.VBR_q <= 9) {\n var a = x[gfp.VBR_q], b = x[gfp.VBR_q + 1], m = gfp.VBR_q_frac;\n lowpass = linear_int(a, b, m);\n } else {\n lowpass = 19500;\n }\n break;\n }\n default:\n {\n var x = [19500, 19000, 18500, 18000, 17500, 16500,\n 15500, 14500, 12500, 9500, 3950];\n if (0 <= gfp.VBR_q && gfp.VBR_q <= 9) {\n var a = x[gfp.VBR_q], b = x[gfp.VBR_q + 1], m = gfp.VBR_q_frac;\n lowpass = linear_int(a, b, m);\n } else {\n lowpass = 19500;\n }\n }\n }\n if (gfp.mode == MPEGMode.MONO\n && (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_abr))\n lowpass *= 1.5;\n\n gfp.lowpassfreq = lowpass | 0;\n }\n\n if (gfp.out_samplerate == 0) {\n if (2 * gfp.lowpassfreq > gfp.in_samplerate) {\n gfp.lowpassfreq = gfp.in_samplerate / 2;\n }\n gfp.out_samplerate = optimum_samplefreq(gfp.lowpassfreq | 0,\n gfp.in_samplerate);\n }\n\n gfp.lowpassfreq = Math.min(20500, gfp.lowpassfreq);\n gfp.lowpassfreq = Math.min(gfp.out_samplerate / 2, gfp.lowpassfreq);\n\n if (gfp.VBR == VbrMode.vbr_off) {\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.brate);\n }\n if (gfp.VBR == VbrMode.vbr_abr) {\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.VBR_mean_bitrate_kbps);\n }\n\n /*\n * do not compute ReplayGain values and do not find the peak sample if\n * we can't store them\n */\n if (!gfp.bWriteVbrTag) {\n gfp.findReplayGain = false;\n gfp.decode_on_the_fly = false;\n gfc.findPeakSample = false;\n }\n gfc.findReplayGain = gfp.findReplayGain;\n gfc.decode_on_the_fly = gfp.decode_on_the_fly;\n\n if (gfc.decode_on_the_fly)\n gfc.findPeakSample = true;\n\n if (gfc.findReplayGain) {\n if (ga.InitGainAnalysis(gfc.rgdata, gfp.out_samplerate) == GainAnalysis.INIT_GAIN_ANALYSIS_ERROR) {\n gfp.internal_flags = null;\n return -6;\n }\n }\n\n if (gfc.decode_on_the_fly && !gfp.decode_only) {\n if (gfc.hip != null) {\n mpglib.hip_decode_exit(gfc.hip);\n }\n gfc.hip = mpglib.hip_decode_init();\n }\n\n gfc.mode_gr = gfp.out_samplerate <= 24000 ? 1 : 2;\n /*\n * Number of granules per frame\n */\n gfp.framesize = 576 * gfc.mode_gr;\n gfp.encoder_delay = Encoder.ENCDELAY;\n\n gfc.resample_ratio = gfp.in_samplerate / gfp.out_samplerate;\n\n /**\n *
\n         *  sample freq       bitrate     compression ratio\n         *     [kHz]      [kbps/channel]   for 16 bit input\n         *     44.1            56               12.6\n         *     44.1            64               11.025\n         *     44.1            80                8.82\n         *     22.05           24               14.7\n         *     22.05           32               11.025\n         *     22.05           40                8.82\n         *     16              16               16.0\n         *     16              24               10.667\n         * 
\n */\n /**\n *
\n         *  For VBR, take a guess at the compression_ratio.\n         *  For example:\n         *\n         *    VBR_q    compression     like\n         *     -        4.4         320 kbps/44 kHz\n         *   0...1      5.5         256 kbps/44 kHz\n         *     2        7.3         192 kbps/44 kHz\n         *     4        8.8         160 kbps/44 kHz\n         *     6       11           128 kbps/44 kHz\n         *     9       14.7          96 kbps\n         *\n         *  for lower bitrates, downsample with --resample\n         * 
\n */\n switch (gfp.VBR) {\n case VbrMode.vbr_mt:\n case VbrMode.vbr_rh:\n case VbrMode.vbr_mtrh:\n {\n /* numbers are a bit strange, but they determine the lowpass value */\n var cmp = [5.7, 6.5, 7.3, 8.2, 10, 11.9, 13, 14,\n 15, 16.5];\n gfp.compression_ratio = cmp[gfp.VBR_q];\n }\n break;\n case VbrMode.vbr_abr:\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.VBR_mean_bitrate_kbps);\n break;\n default:\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.brate);\n break;\n }\n\n /*\n * mode = -1 (not set by user) or mode = MONO (because of only 1 input\n * channel). If mode has not been set, then select J-STEREO\n */\n if (gfp.mode == MPEGMode.NOT_SET) {\n gfp.mode = MPEGMode.JOINT_STEREO;\n }\n\n /* apply user driven high pass filter */\n if (gfp.highpassfreq > 0) {\n gfc.highpass1 = 2. * gfp.highpassfreq;\n\n if (gfp.highpasswidth >= 0)\n gfc.highpass2 = 2. * (gfp.highpassfreq + gfp.highpasswidth);\n else\n /* 0% above on default */\n gfc.highpass2 = (1 + 0.00) * 2. * gfp.highpassfreq;\n\n gfc.highpass1 /= gfp.out_samplerate;\n gfc.highpass2 /= gfp.out_samplerate;\n } else {\n gfc.highpass1 = 0;\n gfc.highpass2 = 0;\n }\n /* apply user driven low pass filter */\n if (gfp.lowpassfreq > 0) {\n gfc.lowpass2 = 2. * gfp.lowpassfreq;\n if (gfp.lowpasswidth >= 0) {\n gfc.lowpass1 = 2. * (gfp.lowpassfreq - gfp.lowpasswidth);\n if (gfc.lowpass1 < 0) /* has to be >= 0 */\n gfc.lowpass1 = 0;\n } else { /* 0% below on default */\n gfc.lowpass1 = (1 - 0.00) * 2. * gfp.lowpassfreq;\n }\n gfc.lowpass1 /= gfp.out_samplerate;\n gfc.lowpass2 /= gfp.out_samplerate;\n } else {\n gfc.lowpass1 = 0;\n gfc.lowpass2 = 0;\n }\n\n /**********************************************************************/\n /* compute info needed for polyphase filter (filter type==0, default) */\n /**********************************************************************/\n lame_init_params_ppflt(gfp);\n /*******************************************************\n * samplerate and bitrate index\n *******************************************************/\n gfc.samplerate_index = SmpFrqIndex(gfp.out_samplerate, gfp);\n if (gfc.samplerate_index < 0) {\n gfp.internal_flags = null;\n return -1;\n }\n\n if (gfp.VBR == VbrMode.vbr_off) {\n if (gfp.free_format) {\n gfc.bitrate_index = 0;\n } else {\n gfp.brate = FindNearestBitrate(gfp.brate, gfp.version,\n gfp.out_samplerate);\n gfc.bitrate_index = BitrateIndex(gfp.brate, gfp.version,\n gfp.out_samplerate);\n if (gfc.bitrate_index <= 0) {\n gfp.internal_flags = null;\n return -1;\n }\n }\n } else {\n gfc.bitrate_index = 1;\n }\n\n /* for CBR, we will write an \"info\" tag. */\n\n if (gfp.analysis)\n gfp.bWriteVbrTag = false;\n\n /* some file options not allowed if output is: not specified or stdout */\n if (gfc.pinfo != null)\n gfp.bWriteVbrTag = false;\n /* disable Xing VBR tag */\n\n bs.init_bit_stream_w(gfc);\n\n var j = gfc.samplerate_index + (3 * gfp.version) + 6\n * (gfp.out_samplerate < 16000 ? 1 : 0);\n for (var i = 0; i < Encoder.SBMAX_l + 1; i++)\n gfc.scalefac_band.l[i] = qupvt.sfBandIndex[j].l[i];\n\n for (var i = 0; i < Encoder.PSFB21 + 1; i++) {\n var size = (gfc.scalefac_band.l[22] - gfc.scalefac_band.l[21])\n / Encoder.PSFB21;\n var start = gfc.scalefac_band.l[21] + i * size;\n gfc.scalefac_band.psfb21[i] = start;\n }\n gfc.scalefac_band.psfb21[Encoder.PSFB21] = 576;\n\n for (var i = 0; i < Encoder.SBMAX_s + 1; i++)\n gfc.scalefac_band.s[i] = qupvt.sfBandIndex[j].s[i];\n\n for (var i = 0; i < Encoder.PSFB12 + 1; i++) {\n var size = (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12])\n / Encoder.PSFB12;\n var start = gfc.scalefac_band.s[12] + i * size;\n gfc.scalefac_band.psfb12[i] = start;\n }\n gfc.scalefac_band.psfb12[Encoder.PSFB12] = 192;\n /* determine the mean bitrate for main data */\n if (gfp.version == 1) /* MPEG 1 */\n gfc.sideinfo_len = (gfc.channels_out == 1) ? 4 + 17 : 4 + 32;\n else\n /* MPEG 2 */\n gfc.sideinfo_len = (gfc.channels_out == 1) ? 4 + 9 : 4 + 17;\n\n if (gfp.error_protection)\n gfc.sideinfo_len += 2;\n\n lame_init_bitstream(gfp);\n\n gfc.Class_ID = LAME_ID;\n\n {\n var k;\n\n for (k = 0; k < 19; k++)\n gfc.nsPsy.pefirbuf[k] = 700 * gfc.mode_gr * gfc.channels_out;\n\n if (gfp.ATHtype == -1)\n gfp.ATHtype = 4;\n }\n assert(gfp.VBR_q <= 9);\n assert(gfp.VBR_q >= 0);\n\n switch (gfp.VBR) {\n\n case VbrMode.vbr_mt:\n gfp.VBR = VbrMode.vbr_mtrh;\n //$FALL-THROUGH$\n case VbrMode.vbr_mtrh:\n {\n if (gfp.useTemporal == null) {\n gfp.useTemporal = false;\n /* off by default for this VBR mode */\n }\n\n p.apply_preset(gfp, 500 - (gfp.VBR_q * 10), 0);\n /**\n *
\n                 *   The newer VBR code supports only a limited\n                 *     subset of quality levels:\n                 *     9-5=5 are the same, uses x^3/4 quantization\n                 *   4-0=0 are the same  5 plus best huffman divide code\n                 * 
\n */\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n if (gfp.quality < 5)\n gfp.quality = 0;\n if (gfp.quality > 5)\n gfp.quality = 5;\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n /*\n * sfb21 extra only with MPEG-1 at higher sampling rates\n */\n if (gfp.experimentalY)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = (gfp.out_samplerate > 44000);\n\n gfc.iteration_loop = new VBRNewIterationLoop(qu);\n break;\n\n }\n case VbrMode.vbr_rh:\n {\n\n p.apply_preset(gfp, 500 - (gfp.VBR_q * 10), 0);\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n /*\n * sfb21 extra only with MPEG-1 at higher sampling rates\n */\n if (gfp.experimentalY)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = (gfp.out_samplerate > 44000);\n\n /*\n * VBR needs at least the output of GPSYCHO, so we have to garantee\n * that by setting a minimum quality level, actually level 6 does\n * it. down to level 6\n */\n if (gfp.quality > 6)\n gfp.quality = 6;\n\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n\n gfc.iteration_loop = new VBROldIterationLoop(qu);\n break;\n }\n\n default: /* cbr/abr */\n {\n var vbrmode;\n\n /*\n * no sfb21 extra with CBR code\n */\n gfc.sfb21_extra = false;\n\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n\n vbrmode = gfp.VBR;\n if (vbrmode == VbrMode.vbr_off)\n gfp.VBR_mean_bitrate_kbps = gfp.brate;\n /* second, set parameters depending on bitrate */\n p.apply_preset(gfp, gfp.VBR_mean_bitrate_kbps, 0);\n gfp.VBR = vbrmode;\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n if (vbrmode == VbrMode.vbr_off) {\n gfc.iteration_loop = new CBRNewIterationLoop(qu);\n } else {\n gfc.iteration_loop = new ABRIterationLoop(qu);\n }\n break;\n }\n }\n assert(gfp.scale >= 0);\n /* initialize default values common for all modes */\n\n if (gfp.VBR != VbrMode.vbr_off) { /* choose a min/max bitrate for VBR */\n /* if the user didn't specify VBR_max_bitrate: */\n gfc.VBR_min_bitrate = 1;\n /*\n * default: allow 8 kbps (MPEG-2) or 32 kbps (MPEG-1)\n */\n gfc.VBR_max_bitrate = 14;\n /*\n * default: allow 160 kbps (MPEG-2) or 320 kbps (MPEG-1)\n */\n if (gfp.out_samplerate < 16000)\n gfc.VBR_max_bitrate = 8;\n /* default: allow 64 kbps (MPEG-2.5) */\n if (gfp.VBR_min_bitrate_kbps != 0) {\n gfp.VBR_min_bitrate_kbps = FindNearestBitrate(\n gfp.VBR_min_bitrate_kbps, gfp.version,\n gfp.out_samplerate);\n gfc.VBR_min_bitrate = BitrateIndex(gfp.VBR_min_bitrate_kbps,\n gfp.version, gfp.out_samplerate);\n if (gfc.VBR_min_bitrate < 0)\n return -1;\n }\n if (gfp.VBR_max_bitrate_kbps != 0) {\n gfp.VBR_max_bitrate_kbps = FindNearestBitrate(\n gfp.VBR_max_bitrate_kbps, gfp.version,\n gfp.out_samplerate);\n gfc.VBR_max_bitrate = BitrateIndex(gfp.VBR_max_bitrate_kbps,\n gfp.version, gfp.out_samplerate);\n if (gfc.VBR_max_bitrate < 0)\n return -1;\n }\n gfp.VBR_min_bitrate_kbps = Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate];\n gfp.VBR_max_bitrate_kbps = Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate];\n gfp.VBR_mean_bitrate_kbps = Math.min(\n Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate],\n gfp.VBR_mean_bitrate_kbps);\n gfp.VBR_mean_bitrate_kbps = Math.max(\n Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate],\n gfp.VBR_mean_bitrate_kbps);\n }\n\n /* just another daily changing developer switch */\n if (gfp.tune) {\n gfc.PSY.mask_adjust += gfp.tune_value_a;\n gfc.PSY.mask_adjust_short += gfp.tune_value_a;\n }\n\n /* initialize internal qval settings */\n lame_init_qval(gfp);\n assert(gfp.scale >= 0);\n /*\n * automatic ATH adjustment on\n */\n if (gfp.athaa_type < 0)\n gfc.ATH.useAdjust = 3;\n else\n gfc.ATH.useAdjust = gfp.athaa_type;\n\n /* initialize internal adaptive ATH settings -jd */\n gfc.ATH.aaSensitivityP = Math.pow(10.0, gfp.athaa_sensitivity\n / -10.0);\n\n if (gfp.short_blocks == null) {\n gfp.short_blocks = ShortBlock.short_block_allowed;\n }\n\n /*\n * Note Jan/2003: Many hardware decoders cannot handle short blocks in\n * regular stereo mode unless they are coupled (same type in both\n * channels) it is a rare event (1 frame per min. or so) that LAME would\n * use uncoupled short blocks, so lets turn them off until we decide how\n * to handle this. No other encoders allow uncoupled short blocks, even\n * though it is in the standard.\n */\n /*\n * rh 20040217: coupling makes no sense for mono and dual-mono streams\n */\n if (gfp.short_blocks == ShortBlock.short_block_allowed\n && (gfp.mode == MPEGMode.JOINT_STEREO || gfp.mode == MPEGMode.STEREO)) {\n gfp.short_blocks = ShortBlock.short_block_coupled;\n }\n\n if (gfp.quant_comp < 0)\n gfp.quant_comp = 1;\n if (gfp.quant_comp_short < 0)\n gfp.quant_comp_short = 0;\n\n if (gfp.msfix < 0)\n gfp.msfix = 0;\n\n /* select psychoacoustic model */\n gfp.exp_nspsytune = gfp.exp_nspsytune | 1;\n\n if (gfp.internal_flags.nsPsy.attackthre < 0)\n gfp.internal_flags.nsPsy.attackthre = PsyModel.NSATTACKTHRE;\n if (gfp.internal_flags.nsPsy.attackthre_s < 0)\n gfp.internal_flags.nsPsy.attackthre_s = PsyModel.NSATTACKTHRE_S;\n\n assert(gfp.scale >= 0);\n\n if (gfp.scale < 0)\n gfp.scale = 1;\n\n if (gfp.ATHtype < 0)\n gfp.ATHtype = 4;\n\n if (gfp.ATHcurve < 0)\n gfp.ATHcurve = 4;\n\n if (gfp.athaa_loudapprox < 0)\n gfp.athaa_loudapprox = 2;\n\n if (gfp.interChRatio < 0)\n gfp.interChRatio = 0;\n\n if (gfp.useTemporal == null)\n gfp.useTemporal = true;\n /* on by default */\n\n /*\n * padding method as described in\n * \"MPEG-Layer3 / Bitstream Syntax and Decoding\" by Martin Sieler, Ralph\n * Sperschneider\n *\n * note: there is no padding for the very first frame\n *\n * Robert Hegemann 2000-06-22\n */\n gfc.slot_lag = gfc.frac_SpF = 0;\n if (gfp.VBR == VbrMode.vbr_off)\n gfc.slot_lag = gfc.frac_SpF = (((gfp.version + 1) * 72000 * gfp.brate) % gfp.out_samplerate) | 0;\n\n qupvt.iteration_init(gfp);\n psy.psymodel_init(gfp);\n assert(gfp.scale >= 0);\n return 0;\n }\n\n function update_inbuffer_size(gfc, nsamples) {\n if (gfc.in_buffer_0 == null || gfc.in_buffer_nsamples < nsamples) {\n gfc.in_buffer_0 = new_float(nsamples);\n gfc.in_buffer_1 = new_float(nsamples);\n gfc.in_buffer_nsamples = nsamples;\n }\n }\n\n this.lame_encode_flush = function (gfp, mp3buffer, mp3bufferPos, mp3buffer_size) {\n var gfc = gfp.internal_flags;\n var buffer = new_short_n([2, 1152]);\n var imp3 = 0, mp3count, mp3buffer_size_remaining;\n\n /*\n * we always add POSTDELAY=288 padding to make sure granule with real\n * data can be complety decoded (because of 50% overlap with next\n * granule\n */\n var end_padding;\n var frames_left;\n var samples_to_encode = gfc.mf_samples_to_encode - Encoder.POSTDELAY;\n var mf_needed = calcNeeded(gfp);\n\n /* Was flush already called? */\n if (gfc.mf_samples_to_encode < 1) {\n return 0;\n }\n mp3count = 0;\n\n if (gfp.in_samplerate != gfp.out_samplerate) {\n /*\n * delay due to resampling; needs to be fixed, if resampling code\n * gets changed\n */\n samples_to_encode += 16. * gfp.out_samplerate / gfp.in_samplerate;\n }\n end_padding = gfp.framesize - (samples_to_encode % gfp.framesize);\n if (end_padding < 576)\n end_padding += gfp.framesize;\n gfp.encoder_padding = end_padding;\n\n frames_left = (samples_to_encode + end_padding) / gfp.framesize;\n\n /*\n * send in a frame of 0 padding until all internal sample buffers are\n * flushed\n */\n while (frames_left > 0 && imp3 >= 0) {\n var bunch = mf_needed - gfc.mf_size;\n var frame_num = gfp.frameNum;\n\n bunch *= gfp.in_samplerate;\n bunch /= gfp.out_samplerate;\n if (bunch > 1152)\n bunch = 1152;\n if (bunch < 1)\n bunch = 1;\n\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n imp3 = this.lame_encode_buffer(gfp, buffer[0], buffer[1], bunch,\n mp3buffer, mp3bufferPos, mp3buffer_size_remaining);\n\n mp3bufferPos += imp3;\n mp3count += imp3;\n frames_left -= (frame_num != gfp.frameNum) ? 1 : 0;\n }\n /*\n * Set gfc.mf_samples_to_encode to 0, so we may detect and break loops\n * calling it more than once in a row.\n */\n gfc.mf_samples_to_encode = 0;\n\n if (imp3 < 0) {\n /* some type of fatal error */\n return imp3;\n }\n\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n /* mp3 related stuff. bit buffer might still contain some mp3 data */\n bs.flush_bitstream(gfp);\n imp3 = bs.copy_buffer(gfc, mp3buffer, mp3bufferPos,\n mp3buffer_size_remaining, 1);\n if (imp3 < 0) {\n /* some type of fatal error */\n return imp3;\n }\n mp3bufferPos += imp3;\n mp3count += imp3;\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n if (gfp.write_id3tag_automatic) {\n /* write a id3 tag to the bitstream */\n id3.id3tag_write_v1(gfp);\n\n imp3 = bs.copy_buffer(gfc, mp3buffer, mp3bufferPos,\n mp3buffer_size_remaining, 0);\n\n if (imp3 < 0) {\n return imp3;\n }\n mp3count += imp3;\n }\n return mp3count;\n };\n\n this.lame_encode_buffer = function (gfp, buffer_l, buffer_r, nsamples, mp3buf, mp3bufPos, mp3buf_size) {\n var gfc = gfp.internal_flags;\n var in_buffer = [null, null];\n\n if (gfc.Class_ID != LAME_ID)\n return -3;\n\n if (nsamples == 0)\n return 0;\n\n update_inbuffer_size(gfc, nsamples);\n\n in_buffer[0] = gfc.in_buffer_0;\n in_buffer[1] = gfc.in_buffer_1;\n\n /* make a copy of input buffer, changing type to sample_t */\n for (var i = 0; i < nsamples; i++) {\n in_buffer[0][i] = buffer_l[i];\n if (gfc.channels_in > 1)\n in_buffer[1][i] = buffer_r[i];\n }\n\n return lame_encode_buffer_sample(gfp, in_buffer[0], in_buffer[1],\n nsamples, mp3buf, mp3bufPos, mp3buf_size);\n }\n\n function calcNeeded(gfp) {\n var mf_needed = Encoder.BLKSIZE + gfp.framesize - Encoder.FFTOFFSET;\n /*\n * amount needed for FFT\n */\n mf_needed = Math.max(mf_needed, 512 + gfp.framesize - 32);\n assert(LameInternalFlags.MFSIZE >= mf_needed);\n\n return mf_needed;\n }\n\n function lame_encode_buffer_sample(gfp, buffer_l, buffer_r, nsamples, mp3buf, mp3bufPos, mp3buf_size) {\n var gfc = gfp.internal_flags;\n var mp3size = 0, ret, i, ch, mf_needed;\n var mp3out;\n var mfbuf = [null, null];\n var in_buffer = [null, null];\n\n if (gfc.Class_ID != LAME_ID)\n return -3;\n\n if (nsamples == 0)\n return 0;\n\n /* copy out any tags that may have been written into bitstream */\n mp3out = bs.copy_buffer(gfc, mp3buf, mp3bufPos, mp3buf_size, 0);\n if (mp3out < 0)\n return mp3out;\n /* not enough buffer space */\n mp3bufPos += mp3out;\n mp3size += mp3out;\n\n in_buffer[0] = buffer_l;\n in_buffer[1] = buffer_r;\n\n /* Apply user defined re-scaling */\n\n /* user selected scaling of the samples */\n if (BitStream.NEQ(gfp.scale, 0) && BitStream.NEQ(gfp.scale, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] *= gfp.scale;\n if (gfc.channels_out == 2)\n in_buffer[1][i] *= gfp.scale;\n }\n }\n\n /* user selected scaling of the channel 0 (left) samples */\n if (BitStream.NEQ(gfp.scale_left, 0)\n && BitStream.NEQ(gfp.scale_left, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] *= gfp.scale_left;\n }\n }\n\n /* user selected scaling of the channel 1 (right) samples */\n if (BitStream.NEQ(gfp.scale_right, 0)\n && BitStream.NEQ(gfp.scale_right, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[1][i] *= gfp.scale_right;\n }\n }\n\n /* Downsample to Mono if 2 channels in and 1 channel out */\n if (gfp.num_channels == 2 && gfc.channels_out == 1) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] = 0.5 * ( in_buffer[0][i] + in_buffer[1][i]);\n in_buffer[1][i] = 0.0;\n }\n }\n\n mf_needed = calcNeeded(gfp);\n\n mfbuf[0] = gfc.mfbuf[0];\n mfbuf[1] = gfc.mfbuf[1];\n\n var in_bufferPos = 0;\n while (nsamples > 0) {\n var in_buffer_ptr = [null, null];\n var n_in = 0;\n /* number of input samples processed with fill_buffer */\n var n_out = 0;\n /* number of samples output with fill_buffer */\n /* n_in <> n_out if we are resampling */\n\n in_buffer_ptr[0] = in_buffer[0];\n in_buffer_ptr[1] = in_buffer[1];\n /* copy in new samples into mfbuf, with resampling */\n var inOut = new InOut();\n fill_buffer(gfp, mfbuf, in_buffer_ptr, in_bufferPos, nsamples,\n inOut);\n n_in = inOut.n_in;\n n_out = inOut.n_out;\n\n /* compute ReplayGain of resampled input if requested */\n if (gfc.findReplayGain && !gfc.decode_on_the_fly)\n if (ga.AnalyzeSamples(gfc.rgdata, mfbuf[0], gfc.mf_size,\n mfbuf[1], gfc.mf_size, n_out, gfc.channels_out) == GainAnalysis.GAIN_ANALYSIS_ERROR)\n return -6;\n\n /* update in_buffer counters */\n nsamples -= n_in;\n in_bufferPos += n_in;\n if (gfc.channels_out == 2)\n ;// in_bufferPos += n_in;\n\n /* update mfbuf[] counters */\n gfc.mf_size += n_out;\n assert(gfc.mf_size <= LameInternalFlags.MFSIZE);\n\n /*\n * lame_encode_flush may have set gfc.mf_sample_to_encode to 0 so we\n * have to reinitialize it here when that happened.\n */\n if (gfc.mf_samples_to_encode < 1) {\n gfc.mf_samples_to_encode = Encoder.ENCDELAY + Encoder.POSTDELAY;\n }\n gfc.mf_samples_to_encode += n_out;\n\n if (gfc.mf_size >= mf_needed) {\n /* encode the frame. */\n /* mp3buf = pointer to current location in buffer */\n /* mp3buf_size = size of original mp3 output buffer */\n /* = 0 if we should not worry about the */\n /* buffer size because calling program is */\n /* to lazy to compute it */\n /* mp3size = size of data written to buffer so far */\n /* mp3buf_size-mp3size = amount of space avalable */\n\n var buf_size = mp3buf_size - mp3size;\n if (mp3buf_size == 0)\n buf_size = 0;\n\n ret = lame_encode_frame(gfp, mfbuf[0], mfbuf[1], mp3buf,\n mp3bufPos, buf_size);\n\n if (ret < 0)\n return ret;\n mp3bufPos += ret;\n mp3size += ret;\n\n /* shift out old samples */\n gfc.mf_size -= gfp.framesize;\n gfc.mf_samples_to_encode -= gfp.framesize;\n for (ch = 0; ch < gfc.channels_out; ch++)\n for (i = 0; i < gfc.mf_size; i++)\n mfbuf[ch][i] = mfbuf[ch][i + gfp.framesize];\n }\n }\n assert(nsamples == 0);\n\n return mp3size;\n }\n\n function lame_encode_frame(gfp, inbuf_l, inbuf_r, mp3buf, mp3bufPos, mp3buf_size) {\n var ret = self.enc.lame_encode_mp3_frame(gfp, inbuf_l, inbuf_r, mp3buf,\n mp3bufPos, mp3buf_size);\n gfp.frameNum++;\n return ret;\n }\n\n function InOut() {\n this.n_in = 0;\n this.n_out = 0;\n }\n\n\n function NumUsed() {\n this.num_used = 0;\n }\n\n /**\n * Greatest common divisor.\n *

\n * Joint work of Euclid and M. Hendry\n */\n function gcd(i, j) {\n return j != 0 ? gcd(j, i % j) : i;\n }\n\n /**\n * Resampling via FIR filter, blackman window.\n */\n function blackman(x, fcn, l) {\n /*\n * This algorithm from: SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C\n * S.D. Stearns and R.A. David, Prentice-Hall, 1992\n */\n var wcn = (Math.PI * fcn);\n\n x /= l;\n if (x < 0)\n x = 0;\n if (x > 1)\n x = 1;\n var x2 = x - .5;\n\n var bkwn = 0.42 - 0.5 * Math.cos(2 * x * Math.PI) + 0.08 * Math.cos(4 * x * Math.PI);\n if (Math.abs(x2) < 1e-9)\n return (wcn / Math.PI);\n else\n return (bkwn * Math.sin(l * wcn * x2) / (Math.PI * l * x2));\n }\n\n function fill_buffer_resample(gfp, outbuf, outbufPos, desired_len, inbuf, in_bufferPos, len, num_used, ch) {\n var gfc = gfp.internal_flags;\n var i, j = 0, k;\n /* number of convolution functions to pre-compute */\n var bpc = gfp.out_samplerate\n / gcd(gfp.out_samplerate, gfp.in_samplerate);\n if (bpc > LameInternalFlags.BPC)\n bpc = LameInternalFlags.BPC;\n\n var intratio = (Math.abs(gfc.resample_ratio\n - Math.floor(.5 + gfc.resample_ratio)) < .0001) ? 1 : 0;\n var fcn = 1.00 / gfc.resample_ratio;\n if (fcn > 1.00)\n fcn = 1.00;\n var filter_l = 31;\n if (0 == filter_l % 2)\n --filter_l;\n /* must be odd */\n filter_l += intratio;\n /* unless resample_ratio=int, it must be even */\n\n var BLACKSIZE = filter_l + 1;\n /* size of data needed for FIR */\n\n if (gfc.fill_buffer_resample_init == 0) {\n gfc.inbuf_old[0] = new_float(BLACKSIZE);\n gfc.inbuf_old[1] = new_float(BLACKSIZE);\n for (i = 0; i <= 2 * bpc; ++i)\n gfc.blackfilt[i] = new_float(BLACKSIZE);\n\n gfc.itime[0] = 0;\n gfc.itime[1] = 0;\n\n /* precompute blackman filter coefficients */\n for (j = 0; j <= 2 * bpc; j++) {\n var sum = 0.;\n var offset = (j - bpc) / (2. * bpc);\n for (i = 0; i <= filter_l; i++)\n sum += gfc.blackfilt[j][i] = blackman(i - offset, fcn,\n filter_l);\n for (i = 0; i <= filter_l; i++)\n gfc.blackfilt[j][i] /= sum;\n }\n gfc.fill_buffer_resample_init = 1;\n }\n\n var inbuf_old = gfc.inbuf_old[ch];\n\n /* time of j'th element in inbuf = itime + j/ifreq; */\n /* time of k'th element in outbuf = j/ofreq */\n for (k = 0; k < desired_len; k++) {\n var time0;\n var joff;\n\n time0 = k * gfc.resample_ratio;\n /* time of k'th output sample */\n j = 0 | Math.floor(time0 - gfc.itime[ch]);\n\n /* check if we need more input data */\n if ((filter_l + j - filter_l / 2) >= len)\n break;\n\n /* blackman filter. by default, window centered at j+.5(filter_l%2) */\n /* but we want a window centered at time0. */\n var offset = (time0 - gfc.itime[ch] - (j + .5 * (filter_l % 2)));\n assert(Math.abs(offset) <= .501);\n\n /* find the closest precomputed window for this offset: */\n joff = 0 | Math.floor((offset * 2 * bpc) + bpc + .5);\n var xvalue = 0.;\n for (i = 0; i <= filter_l; ++i) {\n var j2 = i + j - filter_l / 2;\n var y;\n assert(j2 < len);\n assert(j2 + BLACKSIZE >= 0);\n y = (j2 < 0) ? inbuf_old[BLACKSIZE + j2] : inbuf[in_bufferPos\n + j2];\n xvalue += y * gfc.blackfilt[joff][i];\n }\n outbuf[outbufPos + k] = xvalue;\n }\n\n /* k = number of samples added to outbuf */\n /* last k sample used data from [j-filter_l/2,j+filter_l-filter_l/2] */\n\n /* how many samples of input data were used: */\n num_used.num_used = Math.min(len, filter_l + j - filter_l / 2);\n\n /*\n * adjust our input time counter. Incriment by the number of samples\n * used, then normalize so that next output sample is at time 0, next\n * input buffer is at time itime[ch]\n */\n gfc.itime[ch] += num_used.num_used - k * gfc.resample_ratio;\n\n /* save the last BLACKSIZE samples into the inbuf_old buffer */\n if (num_used.num_used >= BLACKSIZE) {\n for (i = 0; i < BLACKSIZE; i++)\n inbuf_old[i] = inbuf[in_bufferPos + num_used.num_used + i\n - BLACKSIZE];\n } else {\n /* shift in num_used.num_used samples into inbuf_old */\n var n_shift = BLACKSIZE - num_used.num_used;\n /*\n * number of samples to\n * shift\n */\n\n /*\n * shift n_shift samples by num_used.num_used, to make room for the\n * num_used new samples\n */\n for (i = 0; i < n_shift; ++i)\n inbuf_old[i] = inbuf_old[i + num_used.num_used];\n\n /* shift in the num_used.num_used samples */\n for (j = 0; i < BLACKSIZE; ++i, ++j)\n inbuf_old[i] = inbuf[in_bufferPos + j];\n\n assert(j == num_used.num_used);\n }\n return k;\n /* return the number samples created at the new samplerate */\n }\n\n function fill_buffer(gfp, mfbuf, in_buffer, in_bufferPos, nsamples, io) {\n var gfc = gfp.internal_flags;\n\n /* copy in new samples into mfbuf, with resampling if necessary */\n if ((gfc.resample_ratio < .9999) || (gfc.resample_ratio > 1.0001)) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var numUsed = new NumUsed();\n io.n_out = fill_buffer_resample(gfp, mfbuf[ch], gfc.mf_size,\n gfp.framesize, in_buffer[ch], in_bufferPos, nsamples,\n numUsed, ch);\n io.n_in = numUsed.num_used;\n }\n } else {\n io.n_out = Math.min(gfp.framesize, nsamples);\n io.n_in = io.n_out;\n for (var i = 0; i < io.n_out; ++i) {\n mfbuf[0][gfc.mf_size + i] = in_buffer[0][in_bufferPos + i];\n if (gfc.channels_out == 2)\n mfbuf[1][gfc.mf_size + i] = in_buffer[1][in_bufferPos + i];\n }\n }\n }\n\n}\n\nmodule.exports = Lame;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nfunction Presets() {\n function VBRPresets(qual, comp, compS,\n y, shThreshold, shThresholdS,\n adj, adjShort, lower,\n curve, sens, inter,\n joint, mod, fix) {\n this.vbr_q = qual;\n this.quant_comp = comp;\n this.quant_comp_s = compS;\n this.expY = y;\n this.st_lrm = shThreshold;\n this.st_s = shThresholdS;\n this.masking_adj = adj;\n this.masking_adj_short = adjShort;\n this.ath_lower = lower;\n this.ath_curve = curve;\n this.ath_sensitivity = sens;\n this.interch = inter;\n this.safejoint = joint;\n this.sfb21mod = mod;\n this.msfix = fix;\n }\n\n function ABRPresets(kbps, comp, compS,\n joint, fix, shThreshold,\n shThresholdS, bass, sc,\n mask, lower, curve,\n interCh, sfScale) {\n this.quant_comp = comp;\n this.quant_comp_s = compS;\n this.safejoint = joint;\n this.nsmsfix = fix;\n this.st_lrm = shThreshold;\n this.st_s = shThresholdS;\n this.nsbass = bass;\n this.scale = sc;\n this.masking_adj = mask;\n this.ath_lower = lower;\n this.ath_curve = curve;\n this.interch = interCh;\n this.sfscale = sfScale;\n }\n\n var lame;\n\n this.setModules = function (_lame) {\n lame = _lame;\n };\n\n /**\n *

\n     * Switch mappings for VBR mode VBR_RH\n     *             vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix\n     * 
\n */\n var vbr_old_switch_map = [\n new VBRPresets(0, 9, 9, 0, 5.20, 125.0, -4.2, -6.3, 4.8, 1, 0, 0, 2, 21, 0.97),\n new VBRPresets(1, 9, 9, 0, 5.30, 125.0, -3.6, -5.6, 4.5, 1.5, 0, 0, 2, 21, 1.35),\n new VBRPresets(2, 9, 9, 0, 5.60, 125.0, -2.2, -3.5, 2.8, 2, 0, 0, 2, 21, 1.49),\n new VBRPresets(3, 9, 9, 1, 5.80, 130.0, -1.8, -2.8, 2.6, 3, -4, 0, 2, 20, 1.64),\n new VBRPresets(4, 9, 9, 1, 6.00, 135.0, -0.7, -1.1, 1.1, 3.5, -8, 0, 2, 0, 1.79),\n new VBRPresets(5, 9, 9, 1, 6.40, 140.0, 0.5, 0.4, -7.5, 4, -12, 0.0002, 0, 0, 1.95),\n new VBRPresets(6, 9, 9, 1, 6.60, 145.0, 0.67, 0.65, -14.7, 6.5, -19, 0.0004, 0, 0, 2.30),\n new VBRPresets(7, 9, 9, 1, 6.60, 145.0, 0.8, 0.75, -19.7, 8, -22, 0.0006, 0, 0, 2.70),\n new VBRPresets(8, 9, 9, 1, 6.60, 145.0, 1.2, 1.15, -27.5, 10, -23, 0.0007, 0, 0, 0),\n new VBRPresets(9, 9, 9, 1, 6.60, 145.0, 1.6, 1.6, -36, 11, -25, 0.0008, 0, 0, 0),\n new VBRPresets(10, 9, 9, 1, 6.60, 145.0, 2.0, 2.0, -36, 12, -25, 0.0008, 0, 0, 0)\n ];\n\n /**\n *
\n     *                 vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix\n     * 
\n */\n var vbr_psy_switch_map = [\n new VBRPresets(0, 9, 9, 0, 4.20, 25.0, -7.0, -4.0, 7.5, 1, 0, 0, 2, 26, 0.97),\n new VBRPresets(1, 9, 9, 0, 4.20, 25.0, -5.6, -3.6, 4.5, 1.5, 0, 0, 2, 21, 1.35),\n new VBRPresets(2, 9, 9, 0, 4.20, 25.0, -4.4, -1.8, 2, 2, 0, 0, 2, 18, 1.49),\n new VBRPresets(3, 9, 9, 1, 4.20, 25.0, -3.4, -1.25, 1.1, 3, -4, 0, 2, 15, 1.64),\n new VBRPresets(4, 9, 9, 1, 4.20, 25.0, -2.2, 0.1, 0, 3.5, -8, 0, 2, 0, 1.79),\n new VBRPresets(5, 9, 9, 1, 4.20, 25.0, -1.0, 1.65, -7.7, 4, -12, 0.0002, 0, 0, 1.95),\n new VBRPresets(6, 9, 9, 1, 4.20, 25.0, -0.0, 2.47, -7.7, 6.5, -19, 0.0004, 0, 0, 2),\n new VBRPresets(7, 9, 9, 1, 4.20, 25.0, 0.5, 2.0, -14.5, 8, -22, 0.0006, 0, 0, 2),\n new VBRPresets(8, 9, 9, 1, 4.20, 25.0, 1.0, 2.4, -22.0, 10, -23, 0.0007, 0, 0, 2),\n new VBRPresets(9, 9, 9, 1, 4.20, 25.0, 1.5, 2.95, -30.0, 11, -25, 0.0008, 0, 0, 2),\n new VBRPresets(10, 9, 9, 1, 4.20, 25.0, 2.0, 2.95, -36.0, 12, -30, 0.0008, 0, 0, 2)\n ];\n\n function apply_vbr_preset(gfp, a, enforce) {\n var vbr_preset = gfp.VBR == VbrMode.vbr_rh ? vbr_old_switch_map\n : vbr_psy_switch_map;\n\n var x = gfp.VBR_q_frac;\n var p = vbr_preset[a];\n var q = vbr_preset[a + 1];\n var set = p;\n\n // NOOP(vbr_q);\n // NOOP(quant_comp);\n // NOOP(quant_comp_s);\n // NOOP(expY);\n p.st_lrm = p.st_lrm + x * (q.st_lrm - p.st_lrm);\n // LERP(st_lrm);\n p.st_s = p.st_s + x * (q.st_s - p.st_s);\n // LERP(st_s);\n p.masking_adj = p.masking_adj + x * (q.masking_adj - p.masking_adj);\n // LERP(masking_adj);\n p.masking_adj_short = p.masking_adj_short + x\n * (q.masking_adj_short - p.masking_adj_short);\n // LERP(masking_adj_short);\n p.ath_lower = p.ath_lower + x * (q.ath_lower - p.ath_lower);\n // LERP(ath_lower);\n p.ath_curve = p.ath_curve + x * (q.ath_curve - p.ath_curve);\n // LERP(ath_curve);\n p.ath_sensitivity = p.ath_sensitivity + x\n * (q.ath_sensitivity - p.ath_sensitivity);\n // LERP(ath_sensitivity);\n p.interch = p.interch + x * (q.interch - p.interch);\n // LERP(interch);\n // NOOP(safejoint);\n // NOOP(sfb21mod);\n p.msfix = p.msfix + x * (q.msfix - p.msfix);\n // LERP(msfix);\n\n lame_set_VBR_q(gfp, set.vbr_q);\n\n if (enforce != 0)\n gfp.quant_comp = set.quant_comp;\n else if (!(Math.abs(gfp.quant_comp - -1) > 0))\n gfp.quant_comp = set.quant_comp;\n // SET_OPTION(quant_comp, set.quant_comp, -1);\n if (enforce != 0)\n gfp.quant_comp_short = set.quant_comp_s;\n else if (!(Math.abs(gfp.quant_comp_short - -1) > 0))\n gfp.quant_comp_short = set.quant_comp_s;\n // SET_OPTION(quant_comp_short, set.quant_comp_s, -1);\n if (set.expY != 0) {\n gfp.experimentalY = set.expY != 0;\n }\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre = set.st_lrm;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre = set.st_lrm;\n // SET_OPTION(short_threshold_lrm, set.st_lrm, -1);\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre_s = set.st_s;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre_s = set.st_s;\n // SET_OPTION(short_threshold_s, set.st_s, -1);\n if (enforce != 0)\n gfp.maskingadjust = set.masking_adj;\n else if (!(Math.abs(gfp.maskingadjust - 0) > 0))\n gfp.maskingadjust = set.masking_adj;\n // SET_OPTION(maskingadjust, set.masking_adj, 0);\n if (enforce != 0)\n gfp.maskingadjust_short = set.masking_adj_short;\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = set.masking_adj_short;\n // SET_OPTION(maskingadjust_short, set.masking_adj_short, 0);\n if (enforce != 0)\n gfp.ATHlower = -set.ath_lower / 10.0;\n else if (!(Math.abs((-gfp.ATHlower * 10.0) - 0) > 0))\n gfp.ATHlower = -set.ath_lower / 10.0;\n // SET_OPTION(ATHlower, set.ath_lower, 0);\n if (enforce != 0)\n gfp.ATHcurve = set.ath_curve;\n else if (!(Math.abs(gfp.ATHcurve - -1) > 0))\n gfp.ATHcurve = set.ath_curve;\n // SET_OPTION(ATHcurve, set.ath_curve, -1);\n if (enforce != 0)\n gfp.athaa_sensitivity = set.ath_sensitivity;\n else if (!(Math.abs(gfp.athaa_sensitivity - -1) > 0))\n gfp.athaa_sensitivity = set.ath_sensitivity;\n // SET_OPTION(athaa_sensitivity, set.ath_sensitivity, 0);\n if (set.interch > 0) {\n if (enforce != 0)\n gfp.interChRatio = set.interch;\n else if (!(Math.abs(gfp.interChRatio - -1) > 0))\n gfp.interChRatio = set.interch;\n // SET_OPTION(interChRatio, set.interch, -1);\n }\n\n /* parameters for which there is no proper set/get interface */\n if (set.safejoint > 0) {\n gfp.exp_nspsytune = gfp.exp_nspsytune | set.safejoint;\n }\n if (set.sfb21mod > 0) {\n gfp.exp_nspsytune = gfp.exp_nspsytune | (set.sfb21mod << 20);\n }\n if (enforce != 0)\n gfp.msfix = set.msfix;\n else if (!(Math.abs(gfp.msfix - -1) > 0))\n gfp.msfix = set.msfix;\n // SET_OPTION(msfix, set.msfix, -1);\n\n if (enforce == 0) {\n gfp.VBR_q = a;\n gfp.VBR_q_frac = x;\n }\n }\n\n /**\n *
\n     *  Switch mappings for ABR mode\n     *\n     *              kbps  quant q_s safejoint nsmsfix st_lrm  st_s  ns-bass scale   msk ath_lwr ath_curve  interch , sfscale\n     * 
\n */\n var abr_switch_map = [\n new ABRPresets(8, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -30.0, 11, 0.0012, 1), /* 8, impossible to use in stereo */\n new ABRPresets(16, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -25.0, 11, 0.0010, 1), /* 16 */\n new ABRPresets(24, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -20.0, 11, 0.0010, 1), /* 24 */\n new ABRPresets(32, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -15.0, 11, 0.0010, 1), /* 32 */\n new ABRPresets(40, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -10.0, 11, 0.0009, 1), /* 40 */\n new ABRPresets(48, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -10.0, 11, 0.0009, 1), /* 48 */\n new ABRPresets(56, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -6.0, 11, 0.0008, 1), /* 56 */\n new ABRPresets(64, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -2.0, 11, 0.0008, 1), /* 64 */\n new ABRPresets(80, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, .0, 8, 0.0007, 1), /* 80 */\n new ABRPresets(96, 9, 9, 0, 2.50, 6.60, 145, 0, 0.95, 0, 1.0, 5.5, 0.0006, 1), /* 96 */\n new ABRPresets(112, 9, 9, 0, 2.25, 6.60, 145, 0, 0.95, 0, 2.0, 4.5, 0.0005, 1), /* 112 */\n new ABRPresets(128, 9, 9, 0, 1.95, 6.40, 140, 0, 0.95, 0, 3.0, 4, 0.0002, 1), /* 128 */\n new ABRPresets(160, 9, 9, 1, 1.79, 6.00, 135, 0, 0.95, -2, 5.0, 3.5, 0, 1), /* 160 */\n new ABRPresets(192, 9, 9, 1, 1.49, 5.60, 125, 0, 0.97, -4, 7.0, 3, 0, 0), /* 192 */\n new ABRPresets(224, 9, 9, 1, 1.25, 5.20, 125, 0, 0.98, -6, 9.0, 2, 0, 0), /* 224 */\n new ABRPresets(256, 9, 9, 1, 0.97, 5.20, 125, 0, 1.00, -8, 10.0, 1, 0, 0), /* 256 */\n new ABRPresets(320, 9, 9, 1, 0.90, 5.20, 125, 0, 1.00, -10, 12.0, 0, 0, 0) /* 320 */\n ];\n\n function apply_abr_preset(gfp, preset, enforce) {\n /* Variables for the ABR stuff */\n var actual_bitrate = preset;\n\n var r = lame.nearestBitrateFullIndex(preset);\n\n gfp.VBR = VbrMode.vbr_abr;\n gfp.VBR_mean_bitrate_kbps = actual_bitrate;\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps, 320);\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps, 8);\n gfp.brate = gfp.VBR_mean_bitrate_kbps;\n if (gfp.VBR_mean_bitrate_kbps > 320) {\n gfp.disable_reservoir = true;\n }\n\n /* parameters for which there is no proper set/get interface */\n if (abr_switch_map[r].safejoint > 0)\n gfp.exp_nspsytune = gfp.exp_nspsytune | 2;\n /* safejoint */\n\n if (abr_switch_map[r].sfscale > 0) {\n gfp.internal_flags.noise_shaping = 2;\n }\n /* ns-bass tweaks */\n if (Math.abs(abr_switch_map[r].nsbass) > 0) {\n var k = (int)(abr_switch_map[r].nsbass * 4);\n if (k < 0)\n k += 64;\n gfp.exp_nspsytune = gfp.exp_nspsytune | (k << 2);\n }\n\n if (enforce != 0)\n gfp.quant_comp = abr_switch_map[r].quant_comp;\n else if (!(Math.abs(gfp.quant_comp - -1) > 0))\n gfp.quant_comp = abr_switch_map[r].quant_comp;\n // SET_OPTION(quant_comp, abr_switch_map[r].quant_comp, -1);\n if (enforce != 0)\n gfp.quant_comp_short = abr_switch_map[r].quant_comp_s;\n else if (!(Math.abs(gfp.quant_comp_short - -1) > 0))\n gfp.quant_comp_short = abr_switch_map[r].quant_comp_s;\n // SET_OPTION(quant_comp_short, abr_switch_map[r].quant_comp_s, -1);\n\n if (enforce != 0)\n gfp.msfix = abr_switch_map[r].nsmsfix;\n else if (!(Math.abs(gfp.msfix - -1) > 0))\n gfp.msfix = abr_switch_map[r].nsmsfix;\n // SET_OPTION(msfix, abr_switch_map[r].nsmsfix, -1);\n\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre = abr_switch_map[r].st_lrm;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre = abr_switch_map[r].st_lrm;\n // SET_OPTION(short_threshold_lrm, abr_switch_map[r].st_lrm, -1);\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre_s = abr_switch_map[r].st_s;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre_s = abr_switch_map[r].st_s;\n // SET_OPTION(short_threshold_s, abr_switch_map[r].st_s, -1);\n\n /*\n * ABR seems to have big problems with clipping, especially at low\n * bitrates\n */\n /*\n * so we compensate for that here by using a scale value depending on\n * bitrate\n */\n if (enforce != 0)\n gfp.scale = abr_switch_map[r].scale;\n else if (!(Math.abs(gfp.scale - -1) > 0))\n gfp.scale = abr_switch_map[r].scale;\n // SET_OPTION(scale, abr_switch_map[r].scale, -1);\n\n if (enforce != 0)\n gfp.maskingadjust = abr_switch_map[r].masking_adj;\n else if (!(Math.abs(gfp.maskingadjust - 0) > 0))\n gfp.maskingadjust = abr_switch_map[r].masking_adj;\n // SET_OPTION(maskingadjust, abr_switch_map[r].masking_adj, 0);\n if (abr_switch_map[r].masking_adj > 0) {\n if (enforce != 0)\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * .9);\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * .9);\n // SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj *\n // .9, 0);\n } else {\n if (enforce != 0)\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * 1.1);\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * 1.1);\n // SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj *\n // 1.1, 0);\n }\n\n if (enforce != 0)\n gfp.ATHlower = -abr_switch_map[r].ath_lower / 10.;\n else if (!(Math.abs((-gfp.ATHlower * 10.) - 0) > 0))\n gfp.ATHlower = -abr_switch_map[r].ath_lower / 10.;\n // SET_OPTION(ATHlower, abr_switch_map[r].ath_lower, 0);\n if (enforce != 0)\n gfp.ATHcurve = abr_switch_map[r].ath_curve;\n else if (!(Math.abs(gfp.ATHcurve - -1) > 0))\n gfp.ATHcurve = abr_switch_map[r].ath_curve;\n // SET_OPTION(ATHcurve, abr_switch_map[r].ath_curve, -1);\n\n if (enforce != 0)\n gfp.interChRatio = abr_switch_map[r].interch;\n else if (!(Math.abs(gfp.interChRatio - -1) > 0))\n gfp.interChRatio = abr_switch_map[r].interch;\n // SET_OPTION(interChRatio, abr_switch_map[r].interch, -1);\n\n return preset;\n }\n\n this.apply_preset = function(gfp, preset, enforce) {\n /* translate legacy presets */\n switch (preset) {\n case Lame.R3MIX:\n {\n preset = Lame.V3;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.MEDIUM:\n {\n preset = Lame.V4;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.MEDIUM_FAST:\n {\n preset = Lame.V4;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.STANDARD:\n {\n preset = Lame.V2;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.STANDARD_FAST:\n {\n preset = Lame.V2;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.EXTREME:\n {\n preset = Lame.V0;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.EXTREME_FAST:\n {\n preset = Lame.V0;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.INSANE:\n {\n preset = 320;\n gfp.preset = preset;\n apply_abr_preset(gfp, preset, enforce);\n gfp.VBR = VbrMode.vbr_off;\n return preset;\n }\n }\n\n gfp.preset = preset;\n {\n switch (preset) {\n case Lame.V9:\n apply_vbr_preset(gfp, 9, enforce);\n return preset;\n case Lame.V8:\n apply_vbr_preset(gfp, 8, enforce);\n return preset;\n case Lame.V7:\n apply_vbr_preset(gfp, 7, enforce);\n return preset;\n case Lame.V6:\n apply_vbr_preset(gfp, 6, enforce);\n return preset;\n case Lame.V5:\n apply_vbr_preset(gfp, 5, enforce);\n return preset;\n case Lame.V4:\n apply_vbr_preset(gfp, 4, enforce);\n return preset;\n case Lame.V3:\n apply_vbr_preset(gfp, 3, enforce);\n return preset;\n case Lame.V2:\n apply_vbr_preset(gfp, 2, enforce);\n return preset;\n case Lame.V1:\n apply_vbr_preset(gfp, 1, enforce);\n return preset;\n case Lame.V0:\n apply_vbr_preset(gfp, 0, enforce);\n return preset;\n default:\n break;\n }\n }\n if (8 <= preset && preset <= 320) {\n return apply_abr_preset(gfp, preset, enforce);\n }\n\n /* no corresponding preset found */\n gfp.preset = 0;\n return preset;\n }\n\n // Rest from getset.c:\n\n /**\n * VBR quality level.
\n * 0 = highest
\n * 9 = lowest\n */\n function lame_set_VBR_q(gfp, VBR_q) {\n var ret = 0;\n\n if (0 > VBR_q) {\n /* Unknown VBR quality level! */\n ret = -1;\n VBR_q = 0;\n }\n if (9 < VBR_q) {\n ret = -1;\n VBR_q = 9;\n }\n\n gfp.VBR_q = VBR_q;\n gfp.VBR_q_frac = 0;\n return ret;\n }\n\n}\n\nmodule.exports = Presets;\n","function VBRQuantize() {\n var qupvt;\n var tak;\n\n this.setModules = function (_qupvt, _tk) {\n qupvt = _qupvt;\n tak = _tk;\n }\n //TODO\n\n}\n\nmodule.exports = VBRQuantize;\n","//package mp3;\n\nfunction CalcNoiseResult() {\n /**\n * sum of quantization noise > masking\n */\n this.over_noise = 0.;\n /**\n * sum of all quantization noise\n */\n this.tot_noise = 0.;\n /**\n * max quantization noise\n */\n this.max_noise = 0.;\n /**\n * number of quantization noise > masking\n */\n this.over_count = 0;\n /**\n * SSD-like cost of distorted bands\n */\n this.over_SSD = 0;\n this.bits = 0;\n}\n\nmodule.exports = CalcNoiseResult;\n","var common = require('./common.js');\nvar new_float = common.new_float;\nvar new_int = common.new_int;\nvar assert = common.assert;\n\nfunction CalcNoiseData() {\n this.global_gain = 0;\n this.sfb_count1 = 0;\n this.step = new_int(39);\n this.noise = new_float(39);\n this.noise_log = new_float(39);\n}\n\nmodule.exports = CalcNoiseData;\n","/*\n * MP3 quantization\n *\n * Copyright (c) 1999-2000 Mark Taylor\n * Copyright (c) 1999-2003 Takehiro Tominaga\n * Copyright (c) 2000-2007 Robert Hegemann\n * Copyright (c) 2001-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Quantize.java,v 1.24 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar VBRQuantize = require('./VBRQuantize.js');\nvar CalcNoiseResult = require('./CalcNoiseResult.js');\nvar CalcNoiseData = require('./CalcNoiseData.js');\nvar Encoder = require('./Encoder.js');\nvar GrInfo = require('./GrInfo.js');\nvar L3Side = require('./L3Side.js');\n\nfunction Quantize() {\n var bs;\n this.rv = null;\n var rv;\n this.qupvt = null;\n var qupvt;\n\n var vbr = new VBRQuantize();\n var tk;\n\n this.setModules = function (_bs, _rv, _qupvt, _tk) {\n bs = _bs;\n rv = _rv;\n this.rv = _rv;\n qupvt = _qupvt;\n this.qupvt = _qupvt;\n tk = _tk;\n vbr.setModules(qupvt, tk);\n }\n\n /**\n * convert from L/R <. Mid/Side\n */\n this.ms_convert = function (l3_side, gr) {\n for (var i = 0; i < 576; ++i) {\n var l = l3_side.tt[gr][0].xr[i];\n var r = l3_side.tt[gr][1].xr[i];\n l3_side.tt[gr][0].xr[i] = (l + r) * (Util.SQRT2 * 0.5);\n l3_side.tt[gr][1].xr[i] = (l - r) * (Util.SQRT2 * 0.5);\n }\n };\n\n /**\n * mt 6/99\n *\n * initializes cod_info, scalefac and xrpow\n *\n * returns 0 if all energies in xr are zero, else 1\n */\n function init_xrpow_core(cod_info, xrpow, upper, sum) {\n sum = 0;\n for (var i = 0; i <= upper; ++i) {\n var tmp = Math.abs(cod_info.xr[i]);\n sum += tmp;\n xrpow[i] = Math.sqrt(tmp * Math.sqrt(tmp));\n\n if (xrpow[i] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[i];\n }\n return sum;\n }\n\n this.init_xrpow = function (gfc, cod_info, xrpow) {\n var sum = 0;\n var upper = 0 | cod_info.max_nonzero_coeff;\n\n assert(xrpow != null);\n cod_info.xrpow_max = 0;\n\n /*\n * check if there is some energy we have to quantize and calculate xrpow\n * matching our fresh scalefactors\n */\n assert(0 <= upper && upper <= 575);\n\n Arrays.fill(xrpow, upper, 576, 0);\n\n sum = init_xrpow_core(cod_info, xrpow, upper, sum);\n\n /*\n * return 1 if we have something to quantize, else 0\n */\n if (sum > 1E-20) {\n var j = 0;\n if ((gfc.substep_shaping & 2) != 0)\n j = 1;\n\n for (var i = 0; i < cod_info.psymax; i++)\n gfc.pseudohalf[i] = j;\n\n return true;\n }\n\n Arrays.fill(cod_info.l3_enc, 0, 576, 0);\n return false;\n }\n\n /**\n * Gabriel Bouvigne feb/apr 2003
\n * Analog silence detection in partitionned sfb21 or sfb12 for short blocks\n *\n * From top to bottom of sfb, changes to 0 coeffs which are below ath. It\n * stops on the first coeff higher than ath.\n */\n function psfb21_analogsilence(gfc, cod_info) {\n var ath = gfc.ATH;\n var xr = cod_info.xr;\n\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n /* NORM, START or STOP type, but not SHORT blocks */\n var stop = false;\n for (var gsfb = Encoder.PSFB21 - 1; gsfb >= 0 && !stop; gsfb--) {\n var start = gfc.scalefac_band.psfb21[gsfb];\n var end = gfc.scalefac_band.psfb21[gsfb + 1];\n var ath21 = qupvt.athAdjust(ath.adjust, ath.psfb21[gsfb],\n ath.floor);\n\n if (gfc.nsPsy.longfact[21] > 1e-12)\n ath21 *= gfc.nsPsy.longfact[21];\n\n for (var j = end - 1; j >= start; j--) {\n if (Math.abs(xr[j]) < ath21)\n xr[j] = 0;\n else {\n stop = true;\n break;\n }\n }\n }\n } else {\n /* note: short blocks coeffs are reordered */\n for (var block = 0; block < 3; block++) {\n var stop = false;\n for (var gsfb = Encoder.PSFB12 - 1; gsfb >= 0 && !stop; gsfb--) {\n var start = gfc.scalefac_band.s[12]\n * 3\n + (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12])\n * block\n + (gfc.scalefac_band.psfb12[gsfb] - gfc.scalefac_band.psfb12[0]);\n var end = start\n + (gfc.scalefac_band.psfb12[gsfb + 1] - gfc.scalefac_band.psfb12[gsfb]);\n var ath12 = qupvt.athAdjust(ath.adjust, ath.psfb12[gsfb],\n ath.floor);\n\n if (gfc.nsPsy.shortfact[12] > 1e-12)\n ath12 *= gfc.nsPsy.shortfact[12];\n\n for (var j = end - 1; j >= start; j--) {\n if (Math.abs(xr[j]) < ath12)\n xr[j] = 0;\n else {\n stop = true;\n break;\n }\n }\n }\n }\n }\n\n }\n\n this.init_outer_loop = function (gfc, cod_info) {\n /*\n * initialize fresh cod_info\n */\n cod_info.part2_3_length = 0;\n cod_info.big_values = 0;\n cod_info.count1 = 0;\n cod_info.global_gain = 210;\n cod_info.scalefac_compress = 0;\n /* mixed_block_flag, block_type was set in psymodel.c */\n cod_info.table_select[0] = 0;\n cod_info.table_select[1] = 0;\n cod_info.table_select[2] = 0;\n cod_info.subblock_gain[0] = 0;\n cod_info.subblock_gain[1] = 0;\n cod_info.subblock_gain[2] = 0;\n cod_info.subblock_gain[3] = 0;\n /* this one is always 0 */\n cod_info.region0_count = 0;\n cod_info.region1_count = 0;\n cod_info.preflag = 0;\n cod_info.scalefac_scale = 0;\n cod_info.count1table_select = 0;\n cod_info.part2_length = 0;\n cod_info.sfb_lmax = Encoder.SBPSY_l;\n cod_info.sfb_smin = Encoder.SBPSY_s;\n cod_info.psy_lmax = gfc.sfb21_extra ? Encoder.SBMAX_l : Encoder.SBPSY_l;\n cod_info.psymax = cod_info.psy_lmax;\n cod_info.sfbmax = cod_info.sfb_lmax;\n cod_info.sfbdivide = 11;\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n cod_info.width[sfb] = gfc.scalefac_band.l[sfb + 1]\n - gfc.scalefac_band.l[sfb];\n /* which is always 0. */\n cod_info.window[sfb] = 3;\n }\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n var ixwork = new_float(576);\n\n cod_info.sfb_smin = 0;\n cod_info.sfb_lmax = 0;\n if (cod_info.mixed_block_flag != 0) {\n /*\n * MPEG-1: sfbs 0-7 long block, 3-12 short blocks MPEG-2(.5):\n * sfbs 0-5 long block, 3-12 short blocks\n */\n cod_info.sfb_smin = 3;\n cod_info.sfb_lmax = gfc.mode_gr * 2 + 4;\n }\n cod_info.psymax = cod_info.sfb_lmax\n + 3\n * ((gfc.sfb21_extra ? Encoder.SBMAX_s : Encoder.SBPSY_s) - cod_info.sfb_smin);\n cod_info.sfbmax = cod_info.sfb_lmax + 3\n * (Encoder.SBPSY_s - cod_info.sfb_smin);\n cod_info.sfbdivide = cod_info.sfbmax - 18;\n cod_info.psy_lmax = cod_info.sfb_lmax;\n /* re-order the short blocks, for more efficient encoding below */\n /* By Takehiro TOMINAGA */\n /*\n * Within each scalefactor band, data is given for successive time\n * windows, beginning with window 0 and ending with window 2. Within\n * each window, the quantized values are then arranged in order of\n * increasing frequency...\n */\n var ix = gfc.scalefac_band.l[cod_info.sfb_lmax];\n System.arraycopy(cod_info.xr, 0, ixwork, 0, 576);\n for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n for (var window = 0; window < 3; window++) {\n for (var l = start; l < end; l++) {\n cod_info.xr[ix++] = ixwork[3 * l + window];\n }\n }\n }\n\n var j = cod_info.sfb_lmax;\n for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n cod_info.width[j] = cod_info.width[j + 1] = cod_info.width[j + 2] = gfc.scalefac_band.s[sfb + 1]\n - gfc.scalefac_band.s[sfb];\n cod_info.window[j] = 0;\n cod_info.window[j + 1] = 1;\n cod_info.window[j + 2] = 2;\n j += 3;\n }\n }\n\n cod_info.count1bits = 0;\n cod_info.sfb_partition_table = qupvt.nr_of_sfb_block[0][0];\n cod_info.slen[0] = 0;\n cod_info.slen[1] = 0;\n cod_info.slen[2] = 0;\n cod_info.slen[3] = 0;\n\n cod_info.max_nonzero_coeff = 575;\n\n /*\n * fresh scalefactors are all zero\n */\n Arrays.fill(cod_info.scalefac, 0);\n\n psfb21_analogsilence(gfc, cod_info);\n };\n\n function BinSearchDirection(ordinal) {\n this.ordinal = ordinal;\n }\n\n BinSearchDirection.BINSEARCH_NONE = new BinSearchDirection(0);\n BinSearchDirection.BINSEARCH_UP = new BinSearchDirection(1);\n BinSearchDirection.BINSEARCH_DOWN = new BinSearchDirection(2);\n\n /**\n * author/date??\n *\n * binary step size search used by outer_loop to get a quantizer step size\n * to start with\n */\n function bin_search_StepSize(gfc, cod_info, desired_rate, ch, xrpow) {\n var nBits;\n var CurrentStep = gfc.CurrentStep[ch];\n var flagGoneOver = false;\n var start = gfc.OldValue[ch];\n var Direction = BinSearchDirection.BINSEARCH_NONE;\n cod_info.global_gain = start;\n desired_rate -= cod_info.part2_length;\n\n assert(CurrentStep != 0);\n for (; ;) {\n var step;\n nBits = tk.count_bits(gfc, xrpow, cod_info, null);\n\n if (CurrentStep == 1 || nBits == desired_rate)\n break;\n /* nothing to adjust anymore */\n\n if (nBits > desired_rate) {\n /* increase Quantize_StepSize */\n if (Direction == BinSearchDirection.BINSEARCH_DOWN)\n flagGoneOver = true;\n\n if (flagGoneOver)\n CurrentStep /= 2;\n Direction = BinSearchDirection.BINSEARCH_UP;\n step = CurrentStep;\n } else {\n /* decrease Quantize_StepSize */\n if (Direction == BinSearchDirection.BINSEARCH_UP)\n flagGoneOver = true;\n\n if (flagGoneOver)\n CurrentStep /= 2;\n Direction = BinSearchDirection.BINSEARCH_DOWN;\n step = -CurrentStep;\n }\n cod_info.global_gain += step;\n if (cod_info.global_gain < 0) {\n cod_info.global_gain = 0;\n flagGoneOver = true;\n }\n if (cod_info.global_gain > 255) {\n cod_info.global_gain = 255;\n flagGoneOver = true;\n }\n }\n\n assert(cod_info.global_gain >= 0);\n assert(cod_info.global_gain < 256);\n\n while (nBits > desired_rate && cod_info.global_gain < 255) {\n cod_info.global_gain++;\n nBits = tk.count_bits(gfc, xrpow, cod_info, null);\n }\n gfc.CurrentStep[ch] = (start - cod_info.global_gain >= 4) ? 4 : 2;\n gfc.OldValue[ch] = cod_info.global_gain;\n cod_info.part2_3_length = nBits;\n return nBits;\n }\n\n this.trancate_smallspectrums = function (gfc, gi, l3_xmin, work) {\n var distort = new_float(L3Side.SFBMAX);\n\n if ((0 == (gfc.substep_shaping & 4) && gi.block_type == Encoder.SHORT_TYPE)\n || (gfc.substep_shaping & 0x80) != 0)\n return;\n qupvt.calc_noise(gi, l3_xmin, distort, new CalcNoiseResult(), null);\n for (var j = 0; j < 576; j++) {\n var xr = 0.0;\n if (gi.l3_enc[j] != 0)\n xr = Math.abs(gi.xr[j]);\n work[j] = xr;\n }\n\n var j = 0;\n var sfb = 8;\n if (gi.block_type == Encoder.SHORT_TYPE)\n sfb = 6;\n do {\n var allowedNoise, trancateThreshold;\n var nsame, start;\n\n var width = gi.width[sfb];\n j += width;\n if (distort[sfb] >= 1.0)\n continue;\n\n Arrays.sort(work, j - width, width);\n if (BitStream.EQ(work[j - 1], 0.0))\n continue;\n /* all zero sfb */\n\n allowedNoise = (1.0 - distort[sfb]) * l3_xmin[sfb];\n trancateThreshold = 0.0;\n start = 0;\n do {\n var noise;\n for (nsame = 1; start + nsame < width; nsame++)\n if (BitStream.NEQ(work[start + j - width], work[start + j\n + nsame - width]))\n break;\n\n noise = work[start + j - width] * work[start + j - width]\n * nsame;\n if (allowedNoise < noise) {\n if (start != 0)\n trancateThreshold = work[start + j - width - 1];\n break;\n }\n allowedNoise -= noise;\n start += nsame;\n } while (start < width);\n if (BitStream.EQ(trancateThreshold, 0.0))\n continue;\n\n do {\n if (Math.abs(gi.xr[j - width]) <= trancateThreshold)\n gi.l3_enc[j - width] = 0;\n } while (--width > 0);\n } while (++sfb < gi.psymax);\n\n gi.part2_3_length = tk.noquant_count_bits(gfc, gi, null);\n };\n\n /**\n * author/date??\n *\n * Function: Returns zero if there is a scalefac which has not been\n * amplified. Otherwise it returns one.\n */\n function loop_break(cod_info) {\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++)\n if (cod_info.scalefac[sfb]\n + cod_info.subblock_gain[cod_info.window[sfb]] == 0)\n return false;\n\n return true;\n }\n\n /* mt 5/99: Function: Improved calc_noise for a single channel */\n\n function penalties(noise) {\n return Util.FAST_LOG10((0.368 + 0.632 * noise * noise * noise));\n }\n\n /**\n * author/date??\n *\n * several different codes to decide which quantization is better\n */\n function get_klemm_noise(distort, gi) {\n var klemm_noise = 1E-37;\n for (var sfb = 0; sfb < gi.psymax; sfb++)\n klemm_noise += penalties(distort[sfb]);\n\n return Math.max(1e-20, klemm_noise);\n }\n\n function quant_compare(quant_comp, best, calc, gi, distort) {\n /**\n * noise is given in decibels (dB) relative to masking thesholds.
\n *\n * over_noise: ??? (the previous comment is fully wrong)
\n * tot_noise: ??? (the previous comment is fully wrong)
\n * max_noise: max quantization noise\n */\n var better;\n\n switch (quant_comp) {\n default:\n case 9:\n {\n if (best.over_count > 0) {\n /* there are distorted sfb */\n better = calc.over_SSD <= best.over_SSD;\n if (calc.over_SSD == best.over_SSD)\n better = calc.bits < best.bits;\n } else {\n /* no distorted sfb */\n better = ((calc.max_noise < 0) && ((calc.max_noise * 10 + calc.bits) <= (best.max_noise * 10 + best.bits)));\n }\n break;\n }\n\n case 0:\n better = calc.over_count < best.over_count\n || (calc.over_count == best.over_count && calc.over_noise < best.over_noise)\n || (calc.over_count == best.over_count\n && BitStream.EQ(calc.over_noise, best.over_noise) && calc.tot_noise < best.tot_noise);\n break;\n\n case 8:\n calc.max_noise = get_klemm_noise(distort, gi);\n //$FALL-THROUGH$\n case 1:\n better = calc.max_noise < best.max_noise;\n break;\n case 2:\n better = calc.tot_noise < best.tot_noise;\n break;\n case 3:\n better = (calc.tot_noise < best.tot_noise)\n && (calc.max_noise < best.max_noise);\n break;\n case 4:\n better = (calc.max_noise <= 0.0 && best.max_noise > 0.2)\n || (calc.max_noise <= 0.0 && best.max_noise < 0.0\n && best.max_noise > calc.max_noise - 0.2 && calc.tot_noise < best.tot_noise)\n || (calc.max_noise <= 0.0 && best.max_noise > 0.0\n && best.max_noise > calc.max_noise - 0.2 && calc.tot_noise < best.tot_noise\n + best.over_noise)\n || (calc.max_noise > 0.0 && best.max_noise > -0.05\n && best.max_noise > calc.max_noise - 0.1 && calc.tot_noise\n + calc.over_noise < best.tot_noise\n + best.over_noise)\n || (calc.max_noise > 0.0 && best.max_noise > -0.1\n && best.max_noise > calc.max_noise - 0.15 && calc.tot_noise\n + calc.over_noise + calc.over_noise < best.tot_noise\n + best.over_noise + best.over_noise);\n break;\n case 5:\n better = calc.over_noise < best.over_noise\n || (BitStream.EQ(calc.over_noise, best.over_noise) && calc.tot_noise < best.tot_noise);\n break;\n case 6:\n better = calc.over_noise < best.over_noise\n || (BitStream.EQ(calc.over_noise, best.over_noise) && (calc.max_noise < best.max_noise || (BitStream\n .EQ(calc.max_noise, best.max_noise) && calc.tot_noise <= best.tot_noise)));\n break;\n case 7:\n better = calc.over_count < best.over_count\n || calc.over_noise < best.over_noise;\n break;\n }\n\n if (best.over_count == 0) {\n /*\n * If no distorted bands, only use this quantization if it is\n * better, and if it uses less bits. Unfortunately, part2_3_length\n * is sometimes a poor estimator of the final size at low bitrates.\n */\n better = better && calc.bits < best.bits;\n }\n\n return better;\n }\n\n /**\n * author/date??\n *\n *
\n     *  Amplify the scalefactor bands that violate the masking threshold.\n     *  See ISO 11172-3 Section C.1.5.4.3.5\n     *\n     *  distort[] = noise/masking\n     *  distort[] > 1   ==> noise is not masked\n     *  distort[] < 1   ==> noise is masked\n     *  max_dist = maximum value of distort[]\n     *\n     *  Three algorithms:\n     *  noise_shaping_amp\n     *        0             Amplify all bands with distort[]>1.\n     *\n     *        1             Amplify all bands with distort[] >= max_dist^(.5);\n     *                     ( 50% in the db scale)\n     *\n     *        2             Amplify first band with distort[] >= max_dist;\n     *\n     *\n     *  For algorithms 0 and 1, if max_dist < 1, then amplify all bands\n     *  with distort[] >= .95*max_dist.  This is to make sure we always\n     *  amplify at least one band.\n     * 
\n */\n function amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine) {\n var gfc = gfp.internal_flags;\n var ifqstep34;\n\n if (cod_info.scalefac_scale == 0) {\n ifqstep34 = 1.29683955465100964055;\n /* 2**(.75*.5) */\n } else {\n ifqstep34 = 1.68179283050742922612;\n /* 2**(.75*1) */\n }\n\n /* compute maximum value of distort[] */\n var trigger = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n if (trigger < distort[sfb])\n trigger = distort[sfb];\n }\n\n var noise_shaping_amp = gfc.noise_shaping_amp;\n if (noise_shaping_amp == 3) {\n if (bRefine)\n noise_shaping_amp = 2;\n else\n noise_shaping_amp = 1;\n }\n switch (noise_shaping_amp) {\n case 2:\n /* amplify exactly 1 band */\n break;\n\n case 1:\n /* amplify bands within 50% of max (on db scale) */\n if (trigger > 1.0)\n trigger = Math.pow(trigger, .5);\n else\n trigger *= .95;\n break;\n\n case 0:\n default:\n /* ISO algorithm. amplify all bands with distort>1 */\n if (trigger > 1.0)\n trigger = 1.0;\n else\n trigger *= .95;\n break;\n }\n\n var j = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n var width = cod_info.width[sfb];\n var l;\n j += width;\n if (distort[sfb] < trigger)\n continue;\n\n if ((gfc.substep_shaping & 2) != 0) {\n gfc.pseudohalf[sfb] = (0 == gfc.pseudohalf[sfb]) ? 1 : 0;\n if (0 == gfc.pseudohalf[sfb] && gfc.noise_shaping_amp == 2)\n return;\n }\n cod_info.scalefac[sfb]++;\n for (l = -width; l < 0; l++) {\n xrpow[j + l] *= ifqstep34;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n\n if (gfc.noise_shaping_amp == 2)\n return;\n }\n }\n\n /**\n * Takehiro Tominaga 2000-xx-xx\n *\n * turns on scalefac scale and adjusts scalefactors\n */\n function inc_scalefac_scale(cod_info, xrpow) {\n var ifqstep34 = 1.29683955465100964055;\n\n var j = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n var width = cod_info.width[sfb];\n var s = cod_info.scalefac[sfb];\n if (cod_info.preflag != 0)\n s += qupvt.pretab[sfb];\n j += width;\n if ((s & 1) != 0) {\n s++;\n for (var l = -width; l < 0; l++) {\n xrpow[j + l] *= ifqstep34;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n }\n cod_info.scalefac[sfb] = s >> 1;\n }\n cod_info.preflag = 0;\n cod_info.scalefac_scale = 1;\n }\n\n /**\n * Takehiro Tominaga 2000-xx-xx\n *\n * increases the subblock gain and adjusts scalefactors\n */\n function inc_subblock_gain(gfc, cod_info, xrpow) {\n var sfb;\n var scalefac = cod_info.scalefac;\n\n /* subbloc_gain can't do anything in the long block region */\n for (sfb = 0; sfb < cod_info.sfb_lmax; sfb++) {\n if (scalefac[sfb] >= 16)\n return true;\n }\n\n for (var window = 0; window < 3; window++) {\n var s1 = 0;\n var s2 = 0;\n\n for (sfb = cod_info.sfb_lmax + window; sfb < cod_info.sfbdivide; sfb += 3) {\n if (s1 < scalefac[sfb])\n s1 = scalefac[sfb];\n }\n for (; sfb < cod_info.sfbmax; sfb += 3) {\n if (s2 < scalefac[sfb])\n s2 = scalefac[sfb];\n }\n\n if (s1 < 16 && s2 < 8)\n continue;\n\n if (cod_info.subblock_gain[window] >= 7)\n return true;\n\n /*\n * even though there is no scalefactor for sfb12 subblock gain\n * affects upper frequencies too, that's why we have to go up to\n * SBMAX_s\n */\n cod_info.subblock_gain[window]++;\n var j = gfc.scalefac_band.l[cod_info.sfb_lmax];\n for (sfb = cod_info.sfb_lmax + window; sfb < cod_info.sfbmax; sfb += 3) {\n var amp;\n var width = cod_info.width[sfb];\n var s = scalefac[sfb];\n assert(s >= 0);\n s = s - (4 >> cod_info.scalefac_scale);\n if (s >= 0) {\n scalefac[sfb] = s;\n j += width * 3;\n continue;\n }\n\n scalefac[sfb] = 0;\n {\n var gain = 210 + (s << (cod_info.scalefac_scale + 1));\n amp = qupvt.IPOW20(gain);\n }\n j += width * (window + 1);\n for (var l = -width; l < 0; l++) {\n xrpow[j + l] *= amp;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n j += width * (3 - window - 1);\n }\n\n {\n var amp = qupvt.IPOW20(202);\n j += cod_info.width[sfb] * (window + 1);\n for (var l = -cod_info.width[sfb]; l < 0; l++) {\n xrpow[j + l] *= amp;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n }\n }\n return false;\n }\n\n /**\n *
\n     *  Takehiro Tominaga /date??\n     *  Robert Hegemann 2000-09-06: made a function of it\n     *\n     *  amplifies scalefactor bands,\n     *   - if all are already amplified returns 0\n     *   - if some bands are amplified too much:\n     *      * try to increase scalefac_scale\n     *      * if already scalefac_scale was set\n     *          try on short blocks to increase subblock gain\n     * 
\n */\n function balance_noise(gfp, cod_info, distort, xrpow, bRefine) {\n var gfc = gfp.internal_flags;\n\n amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine);\n\n /*\n * check to make sure we have not amplified too much loop_break returns\n * 0 if there is an unamplified scalefac scale_bitcount returns 0 if no\n * scalefactors are too large\n */\n\n var status = loop_break(cod_info);\n\n if (status)\n return false;\n /* all bands amplified */\n\n /*\n * not all scalefactors have been amplified. so these scalefacs are\n * possibly valid. encode them:\n */\n if (gfc.mode_gr == 2)\n status = tk.scale_bitcount(cod_info);\n else\n status = tk.scale_bitcount_lsf(gfc, cod_info);\n\n if (!status)\n return true;\n /* amplified some bands not exceeding limits */\n\n /*\n * some scalefactors are too large. lets try setting scalefac_scale=1\n */\n if (gfc.noise_shaping > 1) {\n Arrays.fill(gfc.pseudohalf, 0);\n if (0 == cod_info.scalefac_scale) {\n inc_scalefac_scale(cod_info, xrpow);\n status = false;\n } else {\n if (cod_info.block_type == Encoder.SHORT_TYPE\n && gfc.subblock_gain > 0) {\n status = (inc_subblock_gain(gfc, cod_info, xrpow) || loop_break(cod_info));\n }\n }\n }\n\n if (!status) {\n if (gfc.mode_gr == 2)\n status = tk.scale_bitcount(cod_info);\n else\n status = tk.scale_bitcount_lsf(gfc, cod_info);\n }\n return !status;\n }\n\n /**\n *
\n     *  Function: The outer iteration loop controls the masking conditions\n     *  of all scalefactorbands. It computes the best scalefac and\n     *  global gain. This module calls the inner iteration loop\n     *\n     *  mt 5/99 completely rewritten to allow for bit reservoir control,\n     *  mid/side channels with L/R or mid/side masking thresholds,\n     *  and chooses best quantization instead of last quantization when\n     *  no distortion free quantization can be found.\n     *\n     *  added VBR support mt 5/99\n     *\n     *  some code shuffle rh 9/00\n     * 
\n *\n * @param l3_xmin\n * allowed distortion\n * @param xrpow\n * coloured magnitudes of spectral\n * @param targ_bits\n * maximum allowed bits\n */\n this.outer_loop = function (gfp, cod_info, l3_xmin, xrpow, ch, targ_bits) {\n var gfc = gfp.internal_flags;\n var cod_info_w = new GrInfo();\n var save_xrpow = new_float(576);\n var distort = new_float(L3Side.SFBMAX);\n var best_noise_info = new CalcNoiseResult();\n var better;\n var prev_noise = new CalcNoiseData();\n var best_part2_3_length = 9999999;\n var bEndOfSearch = false;\n var bRefine = false;\n var best_ggain_pass1 = 0;\n\n bin_search_StepSize(gfc, cod_info, targ_bits, ch, xrpow);\n\n if (0 == gfc.noise_shaping)\n /* fast mode, no noise shaping, we are ready */\n return 100;\n /* default noise_info.over_count */\n\n /* compute the distortion in this quantization */\n /* coefficients and thresholds both l/r (or both mid/side) */\n qupvt.calc_noise(cod_info, l3_xmin, distort, best_noise_info,\n prev_noise);\n best_noise_info.bits = cod_info.part2_3_length;\n\n cod_info_w.assign(cod_info);\n var age = 0;\n System.arraycopy(xrpow, 0, save_xrpow, 0, 576);\n\n while (!bEndOfSearch) {\n /* BEGIN MAIN LOOP */\n do {\n var noise_info = new CalcNoiseResult();\n var search_limit;\n var maxggain = 255;\n\n /*\n * When quantization with no distorted bands is found, allow up\n * to X new unsuccesful tries in serial. This gives us more\n * possibilities for different quant_compare modes. Much more\n * than 3 makes not a big difference, it is only slower.\n */\n\n if ((gfc.substep_shaping & 2) != 0) {\n search_limit = 20;\n } else {\n search_limit = 3;\n }\n\n /*\n * Check if the last scalefactor band is distorted. in VBR mode\n * we can't get rid of the distortion, so quit now and VBR mode\n * will try again with more bits. (makes a 10% speed increase,\n * the files I tested were binary identical, 2000/05/20 Robert\n * Hegemann) distort[] > 1 means noise > allowed noise\n */\n if (gfc.sfb21_extra) {\n if (distort[cod_info_w.sfbmax] > 1.0)\n break;\n if (cod_info_w.block_type == Encoder.SHORT_TYPE\n && (distort[cod_info_w.sfbmax + 1] > 1.0 || distort[cod_info_w.sfbmax + 2] > 1.0))\n break;\n }\n\n /* try a new scalefactor conbination on cod_info_w */\n if (!balance_noise(gfp, cod_info_w, distort, xrpow, bRefine))\n break;\n if (cod_info_w.scalefac_scale != 0)\n maxggain = 254;\n\n /*\n * inner_loop starts with the initial quantization step computed\n * above and slowly increases until the bits < huff_bits. Thus\n * it is important not to start with too large of an inital\n * quantization step. Too small is ok, but inner_loop will take\n * longer\n */\n var huff_bits = targ_bits - cod_info_w.part2_length;\n if (huff_bits <= 0)\n break;\n\n /*\n * increase quantizer stepsize until needed bits are below\n * maximum\n */\n while ((cod_info_w.part2_3_length = tk.count_bits(gfc, xrpow,\n cod_info_w, prev_noise)) > huff_bits\n && cod_info_w.global_gain <= maxggain)\n cod_info_w.global_gain++;\n\n if (cod_info_w.global_gain > maxggain)\n break;\n\n if (best_noise_info.over_count == 0) {\n\n while ((cod_info_w.part2_3_length = tk.count_bits(gfc,\n xrpow, cod_info_w, prev_noise)) > best_part2_3_length\n && cod_info_w.global_gain <= maxggain)\n cod_info_w.global_gain++;\n\n if (cod_info_w.global_gain > maxggain)\n break;\n }\n\n /* compute the distortion in this quantization */\n qupvt.calc_noise(cod_info_w, l3_xmin, distort, noise_info,\n prev_noise);\n noise_info.bits = cod_info_w.part2_3_length;\n\n /*\n * check if this quantization is better than our saved\n * quantization\n */\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type\n better = gfp.quant_comp;\n } else\n better = gfp.quant_comp_short;\n\n better = quant_compare(better, best_noise_info, noise_info,\n cod_info_w, distort) ? 1 : 0;\n\n /* save data so we can restore this quantization later */\n if (better != 0) {\n best_part2_3_length = cod_info.part2_3_length;\n best_noise_info = noise_info;\n cod_info.assign(cod_info_w);\n age = 0;\n /* save data so we can restore this quantization later */\n /* store for later reuse */\n System.arraycopy(xrpow, 0, save_xrpow, 0, 576);\n } else {\n /* early stop? */\n if (gfc.full_outer_loop == 0) {\n if (++age > search_limit\n && best_noise_info.over_count == 0)\n break;\n if ((gfc.noise_shaping_amp == 3) && bRefine && age > 30)\n break;\n if ((gfc.noise_shaping_amp == 3)\n && bRefine\n && (cod_info_w.global_gain - best_ggain_pass1) > 15)\n break;\n }\n }\n } while ((cod_info_w.global_gain + cod_info_w.scalefac_scale) < 255);\n\n if (gfc.noise_shaping_amp == 3) {\n if (!bRefine) {\n /* refine search */\n cod_info_w.assign(cod_info);\n System.arraycopy(save_xrpow, 0, xrpow, 0, 576);\n age = 0;\n best_ggain_pass1 = cod_info_w.global_gain;\n\n bRefine = true;\n } else {\n /* search already refined, stop */\n bEndOfSearch = true;\n }\n\n } else {\n bEndOfSearch = true;\n }\n }\n\n assert((cod_info.global_gain + cod_info.scalefac_scale) <= 255);\n /*\n * finish up\n */\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n /* restore for reuse on next try */\n System.arraycopy(save_xrpow, 0, xrpow, 0, 576);\n /*\n * do the 'substep shaping'\n */\n else if ((gfc.substep_shaping & 1) != 0)\n trancate_smallspectrums(gfc, cod_info, l3_xmin, xrpow);\n\n return best_noise_info.over_count;\n }\n\n /**\n * Robert Hegemann 2000-09-06\n *\n * update reservoir status after FINAL quantization/bitrate\n */\n this.iteration_finish_one = function (gfc, gr, ch) {\n var l3_side = gfc.l3_side;\n var cod_info = l3_side.tt[gr][ch];\n\n /*\n * try some better scalefac storage\n */\n tk.best_scalefac_store(gfc, gr, ch, l3_side);\n\n /*\n * best huffman_divide may save some bits too\n */\n if (gfc.use_best_huffman == 1)\n tk.best_huffman_divide(gfc, cod_info);\n\n /*\n * update reservoir status after FINAL quantization/bitrate\n */\n rv.ResvAdjust(gfc, cod_info);\n };\n\n /**\n *\n * 2000-09-04 Robert Hegemann\n *\n * @param l3_xmin\n * allowed distortion of the scalefactor\n * @param xrpow\n * coloured magnitudes of spectral values\n */\n this.VBR_encode_granule = function (gfp, cod_info, l3_xmin, xrpow, ch, min_bits, max_bits) {\n var gfc = gfp.internal_flags;\n var bst_cod_info = new GrInfo();\n var bst_xrpow = new_float(576);\n var Max_bits = max_bits;\n var real_bits = max_bits + 1;\n var this_bits = (max_bits + min_bits) / 2;\n var dbits, over, found = 0;\n var sfb21_extra = gfc.sfb21_extra;\n\n assert(Max_bits <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n Arrays.fill(bst_cod_info.l3_enc, 0);\n\n /*\n * search within round about 40 bits of optimal\n */\n do {\n assert(this_bits >= min_bits);\n assert(this_bits <= max_bits);\n assert(min_bits <= max_bits);\n\n if (this_bits > Max_bits - 42)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = sfb21_extra;\n\n over = outer_loop(gfp, cod_info, l3_xmin, xrpow, ch, this_bits);\n\n /*\n * is quantization as good as we are looking for ? in this case: is\n * no scalefactor band distorted?\n */\n if (over <= 0) {\n found = 1;\n /*\n * now we know it can be done with \"real_bits\" and maybe we can\n * skip some iterations\n */\n real_bits = cod_info.part2_3_length;\n\n /*\n * store best quantization so far\n */\n bst_cod_info.assign(cod_info);\n System.arraycopy(xrpow, 0, bst_xrpow, 0, 576);\n\n /*\n * try with fewer bits\n */\n max_bits = real_bits - 32;\n dbits = max_bits - min_bits;\n this_bits = (max_bits + min_bits) / 2;\n } else {\n /*\n * try with more bits\n */\n min_bits = this_bits + 32;\n dbits = max_bits - min_bits;\n this_bits = (max_bits + min_bits) / 2;\n\n if (found != 0) {\n found = 2;\n /*\n * start again with best quantization so far\n */\n cod_info.assign(bst_cod_info);\n System.arraycopy(bst_xrpow, 0, xrpow, 0, 576);\n }\n }\n } while (dbits > 12);\n\n gfc.sfb21_extra = sfb21_extra;\n\n /*\n * found=0 => nothing found, use last one found=1 => we just found the\n * best and left the loop found=2 => we restored a good one and have now\n * l3_enc to restore too\n */\n if (found == 2) {\n System.arraycopy(bst_cod_info.l3_enc, 0, cod_info.l3_enc, 0, 576);\n }\n assert(cod_info.part2_3_length <= Max_bits);\n }\n\n /**\n * Robert Hegemann 2000-09-05\n *\n * calculates * how many bits are available for analog silent granules * how\n * many bits to use for the lowest allowed bitrate * how many bits each\n * bitrate would provide\n */\n this.get_framebits = function (gfp, frameBits) {\n var gfc = gfp.internal_flags;\n\n /*\n * always use at least this many bits per granule per channel unless we\n * detect analog silence, see below\n */\n gfc.bitrate_index = gfc.VBR_min_bitrate;\n var bitsPerFrame = bs.getframebits(gfp);\n\n /*\n * bits for analog silence\n */\n gfc.bitrate_index = 1;\n bitsPerFrame = bs.getframebits(gfp);\n\n for (var i = 1; i <= gfc.VBR_max_bitrate; i++) {\n gfc.bitrate_index = i;\n var mb = new MeanBits(bitsPerFrame);\n frameBits[i] = rv.ResvFrameBegin(gfp, mb);\n bitsPerFrame = mb.bits;\n }\n };\n\n /* RH: this one needs to be overhauled sometime */\n\n /**\n *
\n     *  2000-09-04 Robert Hegemann\n     *\n     *  * converts LR to MS coding when necessary\n     *  * calculates allowed/adjusted quantization noise amounts\n     *  * detects analog silent frames\n     *\n     *  some remarks:\n     *  - lower masking depending on Quality setting\n     *  - quality control together with adjusted ATH MDCT scaling\n     *    on lower quality setting allocate more noise from\n     *    ATH masking, and on higher quality setting allocate\n     *    less noise from ATH masking.\n     *  - experiments show that going more than 2dB over GPSYCHO's\n     *    limits ends up in very annoying artefacts\n     * 
\n */\n this.VBR_old_prepare = function (gfp, pe, ms_ener_ratio, ratio, l3_xmin, frameBits, min_bits,\n max_bits, bands) {\n var gfc = gfp.internal_flags;\n\n var masking_lower_db, adjust = 0.0;\n var analog_silence = 1;\n var bits = 0;\n\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n var avg = rv.ResvFrameBegin(gfp, new MeanBits(0)) / gfc.mode_gr;\n\n get_framebits(gfp, frameBits);\n\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n var mxb = qupvt.on_pe(gfp, pe, max_bits[gr], avg, gr, 0);\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n ms_convert(gfc.l3_side, gr);\n qupvt.reduce_side(max_bits[gr], ms_ener_ratio[gr], avg, mxb);\n }\n for (var ch = 0; ch < gfc.channels_out; ++ch) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type\n adjust = 1.28 / (1 + Math\n .exp(3.5 - pe[gr][ch] / 300.)) - 0.05;\n masking_lower_db = gfc.PSY.mask_adjust - adjust;\n } else {\n adjust = 2.56 / (1 + Math\n .exp(3.5 - pe[gr][ch] / 300.)) - 0.14;\n masking_lower_db = gfc.PSY.mask_adjust_short - adjust;\n }\n gfc.masking_lower = Math.pow(10.0,\n masking_lower_db * 0.1);\n\n init_outer_loop(gfc, cod_info);\n bands[gr][ch] = qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n l3_xmin[gr][ch]);\n if (bands[gr][ch] != 0)\n analog_silence = 0;\n\n min_bits[gr][ch] = 126;\n\n bits += max_bits[gr][ch];\n }\n }\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n if (bits > frameBits[gfc.VBR_max_bitrate]) {\n max_bits[gr][ch] *= frameBits[gfc.VBR_max_bitrate];\n max_bits[gr][ch] /= bits;\n }\n if (min_bits[gr][ch] > max_bits[gr][ch])\n min_bits[gr][ch] = max_bits[gr][ch];\n\n }\n /* for ch */\n }\n /* for gr */\n\n return analog_silence;\n };\n\n this.bitpressure_strategy = function (gfc, l3_xmin, min_bits, max_bits) {\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var gi = gfc.l3_side.tt[gr][ch];\n var pxmin = l3_xmin[gr][ch];\n var pxminPos = 0;\n for (var sfb = 0; sfb < gi.psy_lmax; sfb++)\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_l / Encoder.SBMAX_l;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n for (var sfb = gi.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n }\n }\n max_bits[gr][ch] = 0 | Math.max(min_bits[gr][ch],\n 0.9 * max_bits[gr][ch]);\n }\n }\n };\n\n this.VBR_new_prepare = function (gfp, pe, ratio, l3_xmin, frameBits, max_bits) {\n var gfc = gfp.internal_flags;\n\n var analog_silence = 1;\n var avg = 0, bits = 0;\n var maximum_framebits;\n\n if (!gfp.free_format) {\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n\n var mb = new MeanBits(avg);\n rv.ResvFrameBegin(gfp, mb);\n avg = mb.bits;\n\n get_framebits(gfp, frameBits);\n maximum_framebits = frameBits[gfc.VBR_max_bitrate];\n } else {\n gfc.bitrate_index = 0;\n var mb = new MeanBits(avg);\n maximum_framebits = rv.ResvFrameBegin(gfp, mb);\n avg = mb.bits;\n frameBits[0] = maximum_framebits;\n }\n\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n qupvt.on_pe(gfp, pe, max_bits[gr], avg, gr, 0);\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n ms_convert(gfc.l3_side, gr);\n }\n for (var ch = 0; ch < gfc.channels_out; ++ch) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n\n gfc.masking_lower = Math.pow(10.0,\n gfc.PSY.mask_adjust * 0.1);\n\n init_outer_loop(gfc, cod_info);\n if (0 != qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n l3_xmin[gr][ch]))\n analog_silence = 0;\n\n bits += max_bits[gr][ch];\n }\n }\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n if (bits > maximum_framebits) {\n max_bits[gr][ch] *= maximum_framebits;\n max_bits[gr][ch] /= bits;\n }\n\n }\n /* for ch */\n }\n /* for gr */\n\n return analog_silence;\n };\n\n /**\n * calculates target bits for ABR encoding\n *\n * mt 2000/05/31\n */\n this.calc_target_bits = function (gfp, pe, ms_ener_ratio, targ_bits, analog_silence_bits, max_frame_bits) {\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n var res_factor;\n var gr, ch, totbits, mean_bits = 0;\n\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n var mb = new MeanBits(mean_bits);\n max_frame_bits[0] = rv.ResvFrameBegin(gfp, mb);\n mean_bits = mb.bits;\n\n gfc.bitrate_index = 1;\n mean_bits = bs.getframebits(gfp) - gfc.sideinfo_len * 8;\n analog_silence_bits[0] = mean_bits / (gfc.mode_gr * gfc.channels_out);\n\n mean_bits = gfp.VBR_mean_bitrate_kbps * gfp.framesize * 1000;\n if ((gfc.substep_shaping & 1) != 0)\n mean_bits *= 1.09;\n mean_bits /= gfp.out_samplerate;\n mean_bits -= gfc.sideinfo_len * 8;\n mean_bits /= (gfc.mode_gr * gfc.channels_out);\n\n /**\n *
\n         *           res_factor is the percentage of the target bitrate that should\n         *           be used on average.  the remaining bits are added to the\n         *           bitreservoir and used for difficult to encode frames.\n         *\n         *           Since we are tracking the average bitrate, we should adjust\n         *           res_factor \"on the fly\", increasing it if the average bitrate\n         *           is greater than the requested bitrate, and decreasing it\n         *           otherwise.  Reasonable ranges are from .9 to 1.0\n         *\n         *           Until we get the above suggestion working, we use the following\n         *           tuning:\n         *           compression ratio    res_factor\n         *           5.5  (256kbps)         1.0      no need for bitreservoir\n         *           11   (128kbps)         .93      7% held for reservoir\n         *\n         *           with linear interpolation for other values.\n         * 
\n */\n res_factor = .93 + .07 * (11.0 - gfp.compression_ratio)\n / (11.0 - 5.5);\n if (res_factor < .90)\n res_factor = .90;\n if (res_factor > 1.00)\n res_factor = 1.00;\n\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n var sum = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n targ_bits[gr][ch] = (int)(res_factor * mean_bits);\n\n if (pe[gr][ch] > 700) {\n var add_bits = (int)((pe[gr][ch] - 700) / 1.4);\n\n var cod_info = l3_side.tt[gr][ch];\n targ_bits[gr][ch] = (int)(res_factor * mean_bits);\n\n /* short blocks use a little extra, no matter what the pe */\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n if (add_bits < mean_bits / 2)\n add_bits = mean_bits / 2;\n }\n /* at most increase bits by 1.5*average */\n if (add_bits > mean_bits * 3 / 2)\n add_bits = mean_bits * 3 / 2;\n else if (add_bits < 0)\n add_bits = 0;\n\n targ_bits[gr][ch] += add_bits;\n }\n if (targ_bits[gr][ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL) {\n targ_bits[gr][ch] = LameInternalFlags.MAX_BITS_PER_CHANNEL;\n }\n sum += targ_bits[gr][ch];\n }\n /* for ch */\n if (sum > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[gr][ch] *= LameInternalFlags.MAX_BITS_PER_GRANULE;\n targ_bits[gr][ch] /= sum;\n }\n }\n }\n /* for gr */\n\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR)\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n qupvt.reduce_side(targ_bits[gr], ms_ener_ratio[gr], mean_bits\n * gfc.channels_out,\n LameInternalFlags.MAX_BITS_PER_GRANULE);\n }\n\n /*\n * sum target bits\n */\n totbits = 0;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n if (targ_bits[gr][ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL)\n targ_bits[gr][ch] = LameInternalFlags.MAX_BITS_PER_CHANNEL;\n totbits += targ_bits[gr][ch];\n }\n }\n\n /*\n * repartion target bits if needed\n */\n if (totbits > max_frame_bits[0]) {\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n targ_bits[gr][ch] *= max_frame_bits[0];\n targ_bits[gr][ch] /= totbits;\n }\n }\n }\n }\n\n}\n\nmodule.exports = Quantize;\n","/*\n * bit reservoir source file\n *\n * Copyright (c) 1999-2000 Mark Taylor\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Reservoir.java,v 1.9 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n/**\n * ResvFrameBegin:
\n * Called (repeatedly) at the beginning of a frame. Updates the maximum size of\n * the reservoir, and checks to make sure main_data_begin was set properly by\n * the formatter
\n * Background information:\n * \n * This is the original text from the ISO standard. Because of sooo many bugs\n * and irritations correcting comments are added in brackets []. A '^W' means\n * you should remove the last word.\n * \n *
\n *  1. The following rule can be used to calculate the maximum\n *     number of bits used for one granule [^W frame]:
\n * At the highest possible bitrate of Layer III (320 kbps\n * per stereo signal [^W^W^W], 48 kHz) the frames must be of\n * [^W^W^W are designed to have] constant length, i.e.\n * one buffer [^W^W the frame] length is:
\n * \n * 320 kbps * 1152/48 kHz = 7680 bit = 960 byte\n * \n * This value is used as the maximum buffer per channel [^W^W] at\n * lower bitrates [than 320 kbps]. At 64 kbps mono or 128 kbps\n * stereo the main granule length is 64 kbps * 576/48 kHz = 768 bit\n * [per granule and channel] at 48 kHz sampling frequency.\n * This means that there is a maximum deviation (short time buffer\n * [= reservoir]) of 7680 - 2*2*768 = 4608 bits is allowed at 64 kbps.\n * The actual deviation is equal to the number of bytes [with the\n * meaning of octets] denoted by the main_data_end offset pointer.\n * The actual maximum deviation is (2^9-1)*8 bit = 4088 bits\n * [for MPEG-1 and (2^8-1)*8 bit for MPEG-2, both are hard limits].\n * ... The xchange of buffer bits between the left and right channel\n * is allowed without restrictions [exception: dual channel].\n * Because of the [constructed] constraint on the buffer size\n * main_data_end is always set to 0 in the case of bit_rate_index==14,\n * i.e. data rate 320 kbps per stereo signal [^W^W^W]. In this case\n * all data are allocated between adjacent header [^W sync] words\n * [, i.e. there is no buffering at all].\n *
\n */\n\nvar common = require('./common.js');\nvar assert = common.assert;\n\nfunction Reservoir() {\n\tvar bs;\n\n\tthis.setModules = function(_bs) {\n\t\tbs = _bs;\n\t}\n\n\tthis.ResvFrameBegin = function(gfp, mean_bits) {\n\t\tvar gfc = gfp.internal_flags;\n\t\tvar maxmp3buf;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tvar frameLength = bs.getframebits(gfp);\n\t\tmean_bits.bits = (frameLength - gfc.sideinfo_len * 8) / gfc.mode_gr;\n\n\t\t/**\n\t\t *
\n\t\t *  Meaning of the variables:\n\t\t *      resvLimit: (0, 8, ..., 8*255 (MPEG-2), 8*511 (MPEG-1))\n\t\t *          Number of bits can be stored in previous frame(s) due to\n\t\t *          counter size constaints\n\t\t *      maxmp3buf: ( ??? ... 8*1951 (MPEG-1 and 2), 8*2047 (MPEG-2.5))\n\t\t *          Number of bits allowed to encode one frame (you can take 8*511 bit\n\t\t *          from the bit reservoir and at most 8*1440 bit from the current\n\t\t *          frame (320 kbps, 32 kHz), so 8*1951 bit is the largest possible\n\t\t *          value for MPEG-1 and -2)\n\t\t * \n\t\t *          maximum allowed granule/channel size times 4 = 8*2047 bits.,\n\t\t *          so this is the absolute maximum supported by the format.\n\t\t * \n\t\t * \n\t\t *      fullFrameBits:  maximum number of bits available for encoding\n\t\t *                      the current frame.\n\t\t * \n\t\t *      mean_bits:      target number of bits per granule.\n\t\t * \n\t\t *      frameLength:\n\t\t * \n\t\t *      gfc.ResvMax:   maximum allowed reservoir\n\t\t * \n\t\t *      gfc.ResvSize:  current reservoir size\n\t\t * \n\t\t *      l3_side.resvDrain_pre:\n\t\t *         ancillary data to be added to previous frame:\n\t\t *         (only usefull in VBR modes if it is possible to have\n\t\t *         maxmp3buf < fullFrameBits)).  Currently disabled,\n\t\t *         see #define NEW_DRAIN\n\t\t *         2010-02-13: RH now enabled, it seems to be needed for CBR too,\n\t\t *                     as there exists one example, where the FhG decoder\n\t\t *                     can't decode a -b320 CBR file anymore.\n\t\t * \n\t\t *      l3_side.resvDrain_post:\n\t\t *         ancillary data to be added to this frame:\n\t\t * \n\t\t * 
\n\t\t */\n\n\t\t/* main_data_begin has 9 bits in MPEG-1, 8 bits MPEG-2 */\n\t\tvar resvLimit = (8 * 256) * gfc.mode_gr - 8;\n\n\t\t/*\n\t\t * maximum allowed frame size. dont use more than this number of bits,\n\t\t * even if the frame has the space for them:\n\t\t */\n\t\tif (gfp.brate > 320) {\n\t\t\t/* in freeformat the buffer is constant */\n\t\t\tmaxmp3buf = 8 * ((int) ((gfp.brate * 1000)\n\t\t\t\t\t/ (gfp.out_samplerate / 1152) / 8 + .5));\n\t\t} else {\n\t\t\t/*\n\t\t\t * all mp3 decoders should have enough buffer to handle this value:\n\t\t\t * size of a 320kbps 32kHz frame\n\t\t\t */\n\t\t\tmaxmp3buf = 8 * 1440;\n\n\t\t\t/*\n\t\t\t * Bouvigne suggests this more lax interpretation of the ISO doc\n\t\t\t * instead of using 8*960.\n\t\t\t */\n\n\t\t\tif (gfp.strict_ISO) {\n\t\t\t\tmaxmp3buf = 8 * ((int) (320000 / (gfp.out_samplerate / 1152) / 8 + .5));\n\t\t\t}\n\t\t}\n\n\t\tgfc.ResvMax = maxmp3buf - frameLength;\n\t\tif (gfc.ResvMax > resvLimit)\n\t\t\tgfc.ResvMax = resvLimit;\n\t\tif (gfc.ResvMax < 0 || gfp.disable_reservoir)\n\t\t\tgfc.ResvMax = 0;\n\n\t\tvar fullFrameBits = mean_bits.bits * gfc.mode_gr\n\t\t\t\t+ Math.min(gfc.ResvSize, gfc.ResvMax);\n\n\t\tif (fullFrameBits > maxmp3buf)\n\t\t\tfullFrameBits = maxmp3buf;\n\n\t\tassert (0 == gfc.ResvMax % 8);\n\t\tassert (gfc.ResvMax >= 0);\n\n\t\tl3_side.resvDrain_pre = 0;\n\n\t\t// frame analyzer code\n\t\tif (gfc.pinfo != null) {\n\t\t\t/*\n\t\t\t * expected bits per channel per granule [is this also right for\n\t\t\t * mono/stereo, MPEG-1/2 ?]\n\t\t\t */\n\t\t\tgfc.pinfo.mean_bits = mean_bits.bits / 2;\n\t\t\tgfc.pinfo.resvsize = gfc.ResvSize;\n\t\t}\n\n\t\treturn fullFrameBits;\n\t}\n\n\t/**\n\t * returns targ_bits: target number of bits to use for 1 granule
\n\t * extra_bits: amount extra available from reservoir
\n\t * Mark Taylor 4/99\n\t */\n\tthis.ResvMaxBits = function(gfp, mean_bits, targ_bits, cbr) {\n\t\tvar gfc = gfp.internal_flags;\n\t\tvar add_bits;\n var ResvSize = gfc.ResvSize, ResvMax = gfc.ResvMax;\n\n\t\t/* compensate the saved bits used in the 1st granule */\n\t\tif (cbr != 0)\n\t\t\tResvSize += mean_bits;\n\n\t\tif ((gfc.substep_shaping & 1) != 0)\n\t\t\tResvMax *= 0.9;\n\n\t\ttarg_bits.bits = mean_bits;\n\n\t\t/* extra bits if the reservoir is almost full */\n\t\tif (ResvSize * 10 > ResvMax * 9) {\n\t\t\tadd_bits = ResvSize - (ResvMax * 9) / 10;\n\t\t\ttarg_bits.bits += add_bits;\n\t\t\tgfc.substep_shaping |= 0x80;\n\t\t} else {\n\t\t\tadd_bits = 0;\n\t\t\tgfc.substep_shaping &= 0x7f;\n\t\t\t/*\n\t\t\t * build up reservoir. this builds the reservoir a little slower\n\t\t\t * than FhG. It could simple be mean_bits/15, but this was rigged to\n\t\t\t * always produce 100 (the old value) at 128kbs\n\t\t\t */\n\t\t\tif (!gfp.disable_reservoir && 0 == (gfc.substep_shaping & 1))\n\t\t\t\ttarg_bits.bits -= .1 * mean_bits;\n\t\t}\n\n\t\t/* amount from the reservoir we are allowed to use. ISO says 6/10 */\n\t\tvar extra_bits = (ResvSize < (gfc.ResvMax * 6) / 10 ? ResvSize\n\t\t\t\t: (gfc.ResvMax * 6) / 10);\n\t\textra_bits -= add_bits;\n\n\t\tif (extra_bits < 0)\n\t\t\textra_bits = 0;\n\t\treturn extra_bits;\n\t}\n\n\t/**\n\t * Called after a granule's bit allocation. Readjusts the size of the\n\t * reservoir to reflect the granule's usage.\n\t */\n\tthis.ResvAdjust = function(gfc, gi) {\n\t\tgfc.ResvSize -= gi.part2_3_length + gi.part2_length;\n\t}\n\n\t/**\n\t * Called after all granules in a frame have been allocated. Makes sure that\n\t * the reservoir size is within limits, possibly by adding stuffing bits.\n\t */\n\tthis.ResvFrameEnd = function(gfc, mean_bits) {\n\t\tvar over_bits;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tgfc.ResvSize += mean_bits * gfc.mode_gr;\n\t\tvar stuffingBits = 0;\n\t\tl3_side.resvDrain_post = 0;\n\t\tl3_side.resvDrain_pre = 0;\n\n\t\t/* we must be byte aligned */\n\t\tif ((over_bits = gfc.ResvSize % 8) != 0)\n\t\t\tstuffingBits += over_bits;\n\n\t\tover_bits = (gfc.ResvSize - stuffingBits) - gfc.ResvMax;\n\t\tif (over_bits > 0) {\n\t\t\tassert (0 == over_bits % 8);\n\t\t\tassert (over_bits >= 0);\n\t\t\tstuffingBits += over_bits;\n\t\t}\n\n\t\t/*\n\t\t * NOTE: enabling the NEW_DRAIN code fixes some problems with FhG\n\t\t * decoder shipped with MS Windows operating systems. Using this, it is\n\t\t * even possible to use Gabriel's lax buffer consideration again, which\n\t\t * assumes, any decoder should have a buffer large enough for a 320 kbps\n\t\t * frame at 32 kHz sample rate.\n\t\t * \n\t\t * old drain code: lame -b320 BlackBird.wav --. does not play with\n\t\t * GraphEdit.exe using FhG decoder V1.5 Build 50\n\t\t * \n\t\t * new drain code: lame -b320 BlackBird.wav --. plays fine with\n\t\t * GraphEdit.exe using FhG decoder V1.5 Build 50\n\t\t * \n\t\t * Robert Hegemann, 2010-02-13.\n\t\t */\n\t\t/*\n\t\t * drain as many bits as possible into previous frame ancillary data In\n\t\t * particular, in VBR mode ResvMax may have changed, and we have to make\n\t\t * sure main_data_begin does not create a reservoir bigger than ResvMax\n\t\t * mt 4/00\n\t\t */\n\t\t{\n\t\t\tvar mdb_bytes = Math.min(l3_side.main_data_begin * 8, stuffingBits) / 8;\n\t\t\tl3_side.resvDrain_pre += 8 * mdb_bytes;\n\t\t\tstuffingBits -= 8 * mdb_bytes;\n\t\t\tgfc.ResvSize -= 8 * mdb_bytes;\n\t\t\tl3_side.main_data_begin -= mdb_bytes;\n\t\t}\n\t\t/* drain the rest into this frames ancillary data */\n\t\tl3_side.resvDrain_post += stuffingBits;\n\t\tgfc.ResvSize -= stuffingBits;\n\t}\n}\n\nmodule.exports = Reservoir;\n","function Version() {\n\n /**\n * URL for the LAME website.\n */\n var LAME_URL = \"http://www.mp3dev.org/\";\n\n /**\n * Major version number.\n */\n var LAME_MAJOR_VERSION = 3;\n /**\n * Minor version number.\n */\n var LAME_MINOR_VERSION = 98;\n /**\n * Patch level.\n */\n var LAME_PATCH_VERSION = 4;\n\n /**\n * Major version number.\n */\n var PSY_MAJOR_VERSION = 0;\n /**\n * Minor version number.\n */\n var PSY_MINOR_VERSION = 93;\n\n /**\n * A string which describes the version of LAME.\n *\n * @return string which describes the version of LAME\n */\n this.getLameVersion = function () {\n // primary to write screen reports\n return (LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \".\" + LAME_PATCH_VERSION);\n }\n\n /**\n * The short version of the LAME version string.\n *\n * @return short version of the LAME version string\n */\n this.getLameShortVersion = function () {\n // Adding date and time to version string makes it harder for output\n // validation\n return (LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \".\" + LAME_PATCH_VERSION);\n }\n\n /**\n * The shortest version of the LAME version string.\n *\n * @return shortest version of the LAME version string\n */\n this.getLameVeryShortVersion = function () {\n // Adding date and time to version string makes it harder for output\n return (\"LAME\" + LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \"r\");\n }\n\n /**\n * String which describes the version of GPSYCHO\n *\n * @return string which describes the version of GPSYCHO\n */\n this.getPsyVersion = function () {\n return (PSY_MAJOR_VERSION + \".\" + PSY_MINOR_VERSION);\n }\n\n /**\n * String which is a URL for the LAME website.\n *\n * @return string which is a URL for the LAME website\n */\n this.getLameUrl = function () {\n return LAME_URL;\n }\n\n /**\n * Quite useless for a java version, however we are compatible ;-)\n *\n * @return \"32bits\"\n */\n this.getLameOsBitness = function () {\n return \"32bits\";\n }\n\n}\n\nmodule.exports = Version;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * A Vbr header may be present in the ancillary data field of the first frame of\n * an mp3 bitstream
\n * The Vbr header (optionally) contains\n *
    \n *
  • frames total number of audio frames in the bitstream\n *
  • bytes total number of bytes in the bitstream\n *
  • toc table of contents\n *
\n *\n * toc (table of contents) gives seek points for random access.
\n * The ith entry determines the seek point for i-percent duration.
\n * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes
\n * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes\n */\nVBRTag.NUMTOCENTRIES = 100;\nVBRTag.MAXFRAMESIZE = 2880;\n\nfunction VBRTag() {\n\n var lame;\n var bs;\n var v;\n\n this.setModules = function (_lame, _bs, _v) {\n lame = _lame;\n bs = _bs;\n v = _v;\n };\n\n var FRAMES_FLAG = 0x0001;\n var BYTES_FLAG = 0x0002;\n var TOC_FLAG = 0x0004;\n var VBR_SCALE_FLAG = 0x0008;\n\n var NUMTOCENTRIES = VBRTag.NUMTOCENTRIES;\n\n /**\n * (0xB40) the max freeformat 640 32kHz framesize.\n */\n var MAXFRAMESIZE = VBRTag.MAXFRAMESIZE;\n\n /**\n *
\n     *    4 bytes for Header Tag\n     *    4 bytes for Header Flags\n     *  100 bytes for entry (toc)\n     *    4 bytes for frame size\n     *    4 bytes for stream size\n     *    4 bytes for VBR scale. a VBR quality indicator: 0=best 100=worst\n     *   20 bytes for LAME tag.  for example, \"LAME3.12 (beta 6)\"\n     * ___________\n     *  140 bytes\n     * 
\n */\n var VBRHEADERSIZE = (NUMTOCENTRIES + 4 + 4 + 4 + 4 + 4);\n\n var LAMEHEADERSIZE = (VBRHEADERSIZE + 9 + 1 + 1 + 8\n + 1 + 1 + 3 + 1 + 1 + 2 + 4 + 2 + 2);\n\n /**\n * The size of the Xing header MPEG-1, bit rate in kbps.\n */\n var XING_BITRATE1 = 128;\n /**\n * The size of the Xing header MPEG-2, bit rate in kbps.\n */\n var XING_BITRATE2 = 64;\n /**\n * The size of the Xing header MPEG-2.5, bit rate in kbps.\n */\n var XING_BITRATE25 = 32;\n\n /**\n * ISO-8859-1 charset for byte to string operations.\n */\n var ISO_8859_1 = null; //Charset.forName(\"ISO-8859-1\");\n\n /**\n * VBR header magic string.\n */\n var VBRTag0 = \"Xing\";\n /**\n * VBR header magic string (VBR == VBRMode.vbr_off).\n */\n var VBRTag1 = \"Info\";\n\n /**\n * Lookup table for fast CRC-16 computation. Uses the polynomial\n * x^16+x^15+x^2+1\n */\n var crc16Lookup = [0x0000, 0xC0C1, 0xC181, 0x0140,\n 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741,\n 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41,\n 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, 0xCB81, 0x0B40,\n 0xC901, 0x09C0, 0x0880, 0xC841, 0xD801, 0x18C0, 0x1980, 0xD941,\n 0x1B00, 0xDBC1, 0xDA81, 0x1A40, 0x1E00, 0xDEC1, 0xDF81, 0x1F40,\n 0xDD01, 0x1DC0, 0x1C80, 0xDC41, 0x1400, 0xD4C1, 0xD581, 0x1540,\n 0xD701, 0x17C0, 0x1680, 0xD641, 0xD201, 0x12C0, 0x1380, 0xD341,\n 0x1100, 0xD1C1, 0xD081, 0x1040, 0xF001, 0x30C0, 0x3180, 0xF141,\n 0x3300, 0xF3C1, 0xF281, 0x3240, 0x3600, 0xF6C1, 0xF781, 0x3740,\n 0xF501, 0x35C0, 0x3480, 0xF441, 0x3C00, 0xFCC1, 0xFD81, 0x3D40,\n 0xFF01, 0x3FC0, 0x3E80, 0xFE41, 0xFA01, 0x3AC0, 0x3B80, 0xFB41,\n 0x3900, 0xF9C1, 0xF881, 0x3840, 0x2800, 0xE8C1, 0xE981, 0x2940,\n 0xEB01, 0x2BC0, 0x2A80, 0xEA41, 0xEE01, 0x2EC0, 0x2F80, 0xEF41,\n 0x2D00, 0xEDC1, 0xEC81, 0x2C40, 0xE401, 0x24C0, 0x2580, 0xE541,\n 0x2700, 0xE7C1, 0xE681, 0x2640, 0x2200, 0xE2C1, 0xE381, 0x2340,\n 0xE101, 0x21C0, 0x2080, 0xE041, 0xA001, 0x60C0, 0x6180, 0xA141,\n 0x6300, 0xA3C1, 0xA281, 0x6240, 0x6600, 0xA6C1, 0xA781, 0x6740,\n 0xA501, 0x65C0, 0x6480, 0xA441, 0x6C00, 0xACC1, 0xAD81, 0x6D40,\n 0xAF01, 0x6FC0, 0x6E80, 0xAE41, 0xAA01, 0x6AC0, 0x6B80, 0xAB41,\n 0x6900, 0xA9C1, 0xA881, 0x6840, 0x7800, 0xB8C1, 0xB981, 0x7940,\n 0xBB01, 0x7BC0, 0x7A80, 0xBA41, 0xBE01, 0x7EC0, 0x7F80, 0xBF41,\n 0x7D00, 0xBDC1, 0xBC81, 0x7C40, 0xB401, 0x74C0, 0x7580, 0xB541,\n 0x7700, 0xB7C1, 0xB681, 0x7640, 0x7200, 0xB2C1, 0xB381, 0x7340,\n 0xB101, 0x71C0, 0x7080, 0xB041, 0x5000, 0x90C1, 0x9181, 0x5140,\n 0x9301, 0x53C0, 0x5280, 0x9241, 0x9601, 0x56C0, 0x5780, 0x9741,\n 0x5500, 0x95C1, 0x9481, 0x5440, 0x9C01, 0x5CC0, 0x5D80, 0x9D41,\n 0x5F00, 0x9FC1, 0x9E81, 0x5E40, 0x5A00, 0x9AC1, 0x9B81, 0x5B40,\n 0x9901, 0x59C0, 0x5880, 0x9841, 0x8801, 0x48C0, 0x4980, 0x8941,\n 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 0x4E00, 0x8EC1, 0x8F81, 0x4F40,\n 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 0x4400, 0x84C1, 0x8581, 0x4540,\n 0x8701, 0x47C0, 0x4680, 0x8641, 0x8201, 0x42C0, 0x4380, 0x8341,\n 0x4100, 0x81C1, 0x8081, 0x4040];\n\n /***********************************************************************\n * Robert Hegemann 2001-01-17\n ***********************************************************************/\n\n function addVbr(v, bitrate) {\n v.nVbrNumFrames++;\n v.sum += bitrate;\n v.seen++;\n\n if (v.seen < v.want) {\n return;\n }\n\n if (v.pos < v.size) {\n v.bag[v.pos] = v.sum;\n v.pos++;\n v.seen = 0;\n }\n if (v.pos == v.size) {\n for (var i = 1; i < v.size; i += 2) {\n v.bag[i / 2] = v.bag[i];\n }\n v.want *= 2;\n v.pos /= 2;\n }\n }\n\n function xingSeekTable(v, t) {\n if (v.pos <= 0)\n return;\n\n for (var i = 1; i < NUMTOCENTRIES; ++i) {\n var j = i / NUMTOCENTRIES, act, sum;\n var indx = 0 | (Math.floor(j * v.pos));\n if (indx > v.pos - 1)\n indx = v.pos - 1;\n act = v.bag[indx];\n sum = v.sum;\n var seek_point = 0 | (256. * act / sum);\n if (seek_point > 255)\n seek_point = 255;\n t[i] = 0xff & seek_point;\n }\n }\n\n /**\n * Add VBR entry, used to fill the VBR TOC entries.\n *\n * @param gfp\n * global flags\n */\n this.addVbrFrame = function (gfp) {\n var gfc = gfp.internal_flags;\n var kbps = Tables.bitrate_table[gfp.version][gfc.bitrate_index];\n assert(gfc.VBR_seek_table.bag != null);\n addVbr(gfc.VBR_seek_table, kbps);\n }\n\n /**\n * Read big endian integer (4-bytes) from header.\n *\n * @param buf\n * header containing the integer\n * @param bufPos\n * offset into the header\n * @return extracted integer\n */\n function extractInteger(buf, bufPos) {\n var x = buf[bufPos + 0] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 1] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 2] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 3] & 0xff;\n return x;\n }\n\n /**\n * Write big endian integer (4-bytes) in the header.\n *\n * @param buf\n * header to write the integer into\n * @param bufPos\n * offset into the header\n * @param value\n * integer value to write\n */\n function createInteger(buf, bufPos, value) {\n buf[bufPos + 0] = 0xff & ((value >> 24) & 0xff);\n buf[bufPos + 1] = 0xff & ((value >> 16) & 0xff);\n buf[bufPos + 2] = 0xff & ((value >> 8) & 0xff);\n buf[bufPos + 3] = 0xff & (value & 0xff);\n }\n\n /**\n * Write big endian short (2-bytes) in the header.\n *\n * @param buf\n * header to write the integer into\n * @param bufPos\n * offset into the header\n * @param value\n * integer value to write\n */\n function createShort(buf, bufPos, value) {\n buf[bufPos + 0] = 0xff & ((value >> 8) & 0xff);\n buf[bufPos + 1] = 0xff & (value & 0xff);\n }\n\n /**\n * Check for magic strings (Xing/Info).\n *\n * @param buf\n * header to check\n * @param bufPos\n * header offset to check\n * @return magic string found\n */\n function isVbrTag(buf, bufPos) {\n return new String(buf, bufPos, VBRTag0.length(), ISO_8859_1)\n .equals(VBRTag0)\n || new String(buf, bufPos, VBRTag1.length(), ISO_8859_1)\n .equals(VBRTag1);\n }\n\n function shiftInBitsValue(x, n, v) {\n return 0xff & ((x << n) | (v & ~(-1 << n)));\n }\n\n /**\n * Construct the MP3 header using the settings of the global flags.\n *\n * \n *\n * @param gfp\n * global flags\n * @param buffer\n * header\n */\n function setLameTagFrameHeader(gfp, buffer) {\n var gfc = gfp.internal_flags;\n\n // MP3 Sync Word\n buffer[0] = shiftInBitsValue(buffer[0], 8, 0xff);\n\n buffer[1] = shiftInBitsValue(buffer[1], 3, 7);\n buffer[1] = shiftInBitsValue(buffer[1], 1,\n (gfp.out_samplerate < 16000) ? 0 : 1);\n // Version\n buffer[1] = shiftInBitsValue(buffer[1], 1, gfp.version);\n // 01 == Layer 3\n buffer[1] = shiftInBitsValue(buffer[1], 2, 4 - 3);\n // Error protection\n buffer[1] = shiftInBitsValue(buffer[1], 1, (!gfp.error_protection) ? 1\n : 0);\n\n // Bit rate\n buffer[2] = shiftInBitsValue(buffer[2], 4, gfc.bitrate_index);\n // Frequency\n buffer[2] = shiftInBitsValue(buffer[2], 2, gfc.samplerate_index);\n // Pad. Bit\n buffer[2] = shiftInBitsValue(buffer[2], 1, 0);\n // Priv. Bit\n buffer[2] = shiftInBitsValue(buffer[2], 1, gfp.extension);\n\n // Mode\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfp.mode.ordinal());\n // Mode extension (Used with Joint Stereo)\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfc.mode_ext);\n // Copy\n buffer[3] = shiftInBitsValue(buffer[3], 1, gfp.copyright);\n // Original\n buffer[3] = shiftInBitsValue(buffer[3], 1, gfp.original);\n // Emphasis\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfp.emphasis);\n\n /* the default VBR header. 48 kbps layer III, no padding, no crc */\n /* but sampling freq, mode and copyright/copy protection taken */\n /* from first valid frame */\n buffer[0] = 0xff;\n var abyte = 0xff & (buffer[1] & 0xf1);\n var bitrate;\n if (1 == gfp.version) {\n bitrate = XING_BITRATE1;\n } else {\n if (gfp.out_samplerate < 16000)\n bitrate = XING_BITRATE25;\n else\n bitrate = XING_BITRATE2;\n }\n\n if (gfp.VBR == VbrMode.vbr_off)\n bitrate = gfp.brate;\n\n var bbyte;\n if (gfp.free_format)\n bbyte = 0x00;\n else\n bbyte = 0xff & (16 * lame.BitrateIndex(bitrate, gfp.version,\n gfp.out_samplerate));\n\n /*\n * Use as much of the info from the real frames in the Xing header:\n * samplerate, channels, crc, etc...\n */\n if (gfp.version == 1) {\n /* MPEG1 */\n buffer[1] = 0xff & (abyte | 0x0a);\n /* was 0x0b; */\n abyte = 0xff & (buffer[2] & 0x0d);\n /* AF keep also private bit */\n buffer[2] = 0xff & (bbyte | abyte);\n /* 64kbs MPEG1 frame */\n } else {\n /* MPEG2 */\n buffer[1] = 0xff & (abyte | 0x02);\n /* was 0x03; */\n abyte = 0xff & (buffer[2] & 0x0d);\n /* AF keep also private bit */\n buffer[2] = 0xff & (bbyte | abyte);\n /* 64kbs MPEG2 frame */\n }\n }\n\n /**\n * Get VBR tag information\n *\n * @param buf\n * header to analyze\n * @param bufPos\n * offset into the header\n * @return VBR tag data\n */\n this.getVbrTag = function (buf) {\n var pTagData = new VBRTagData();\n var bufPos = 0;\n\n /* get Vbr header data */\n pTagData.flags = 0;\n\n /* get selected MPEG header data */\n var hId = (buf[bufPos + 1] >> 3) & 1;\n var hSrIndex = (buf[bufPos + 2] >> 2) & 3;\n var hMode = (buf[bufPos + 3] >> 6) & 3;\n var hBitrate = ((buf[bufPos + 2] >> 4) & 0xf);\n hBitrate = Tables.bitrate_table[hId][hBitrate];\n\n /* check for FFE syncword */\n if ((buf[bufPos + 1] >> 4) == 0xE)\n pTagData.samprate = Tables.samplerate_table[2][hSrIndex];\n else\n pTagData.samprate = Tables.samplerate_table[hId][hSrIndex];\n\n /* determine offset of header */\n if (hId != 0) {\n /* mpeg1 */\n if (hMode != 3)\n bufPos += (32 + 4);\n else\n bufPos += (17 + 4);\n } else {\n /* mpeg2 */\n if (hMode != 3)\n bufPos += (17 + 4);\n else\n bufPos += (9 + 4);\n }\n\n if (!isVbrTag(buf, bufPos))\n return null;\n\n bufPos += 4;\n\n pTagData.hId = hId;\n\n /* get flags */\n var head_flags = pTagData.flags = extractInteger(buf, bufPos);\n bufPos += 4;\n\n if ((head_flags & FRAMES_FLAG) != 0) {\n pTagData.frames = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n if ((head_flags & BYTES_FLAG) != 0) {\n pTagData.bytes = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n if ((head_flags & TOC_FLAG) != 0) {\n if (pTagData.toc != null) {\n for (var i = 0; i < NUMTOCENTRIES; i++)\n pTagData.toc[i] = buf[bufPos + i];\n }\n bufPos += NUMTOCENTRIES;\n }\n\n pTagData.vbrScale = -1;\n\n if ((head_flags & VBR_SCALE_FLAG) != 0) {\n pTagData.vbrScale = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n pTagData.headersize = ((hId + 1) * 72000 * hBitrate)\n / pTagData.samprate;\n\n bufPos += 21;\n var encDelay = buf[bufPos + 0] << 4;\n encDelay += buf[bufPos + 1] >> 4;\n var encPadding = (buf[bufPos + 1] & 0x0F) << 8;\n encPadding += buf[bufPos + 2] & 0xff;\n /* check for reasonable values (this may be an old Xing header, */\n /* not a INFO tag) */\n if (encDelay < 0 || encDelay > 3000)\n encDelay = -1;\n if (encPadding < 0 || encPadding > 3000)\n encPadding = -1;\n\n pTagData.encDelay = encDelay;\n pTagData.encPadding = encPadding;\n\n /* success */\n return pTagData;\n }\n\n /**\n * Initializes the header\n *\n * @param gfp\n * global flags\n */\n this.InitVbrTag = function (gfp) {\n var gfc = gfp.internal_flags;\n\n /**\n *
\n         * Xing VBR pretends to be a 48kbs layer III frame.  (at 44.1kHz).\n         * (at 48kHz they use 56kbs since 48kbs frame not big enough for\n         * table of contents)\n         * let's always embed Xing header inside a 64kbs layer III frame.\n         * this gives us enough room for a LAME version string too.\n         * size determined by sampling frequency (MPEG1)\n         * 32kHz:    216 bytes@48kbs    288bytes@ 64kbs\n         * 44.1kHz:  156 bytes          208bytes@64kbs     (+1 if padding = 1)\n         * 48kHz:    144 bytes          192\n         *\n         * MPEG 2 values are the same since the framesize and samplerate\n         * are each reduced by a factor of 2.\n         * 
\n */\n var kbps_header;\n if (1 == gfp.version) {\n kbps_header = XING_BITRATE1;\n } else {\n if (gfp.out_samplerate < 16000)\n kbps_header = XING_BITRATE25;\n else\n kbps_header = XING_BITRATE2;\n }\n\n if (gfp.VBR == VbrMode.vbr_off)\n kbps_header = gfp.brate;\n\n // make sure LAME Header fits into Frame\n var totalFrameSize = ((gfp.version + 1) * 72000 * kbps_header)\n / gfp.out_samplerate;\n var headerSize = (gfc.sideinfo_len + LAMEHEADERSIZE);\n gfc.VBR_seek_table.TotalFrameSize = totalFrameSize;\n if (totalFrameSize < headerSize || totalFrameSize > MAXFRAMESIZE) {\n /* disable tag, it wont fit */\n gfp.bWriteVbrTag = false;\n return;\n }\n\n gfc.VBR_seek_table.nVbrNumFrames = 0;\n gfc.VBR_seek_table.nBytesWritten = 0;\n gfc.VBR_seek_table.sum = 0;\n\n gfc.VBR_seek_table.seen = 0;\n gfc.VBR_seek_table.want = 1;\n gfc.VBR_seek_table.pos = 0;\n\n if (gfc.VBR_seek_table.bag == null) {\n gfc.VBR_seek_table.bag = new int[400];\n gfc.VBR_seek_table.size = 400;\n }\n\n // write dummy VBR tag of all 0's into bitstream\n var buffer = new_byte(MAXFRAMESIZE);\n\n setLameTagFrameHeader(gfp, buffer);\n var n = gfc.VBR_seek_table.TotalFrameSize;\n for (var i = 0; i < n; ++i) {\n bs.add_dummy_byte(gfp, buffer[i] & 0xff, 1);\n }\n }\n\n /**\n * Fast CRC-16 computation (uses table crc16Lookup).\n *\n * @param value\n * @param crc\n * @return\n */\n function crcUpdateLookup(value, crc) {\n var tmp = crc ^ value;\n crc = (crc >> 8) ^ crc16Lookup[tmp & 0xff];\n return crc;\n }\n\n this.updateMusicCRC = function (crc, buffer, bufferPos, size) {\n for (var i = 0; i < size; ++i)\n crc[0] = crcUpdateLookup(buffer[bufferPos + i], crc[0]);\n }\n\n /**\n * Write LAME info: mini version + info on various switches used (Jonathan\n * Dee 2001/08/31).\n *\n * @param gfp\n * global flags\n * @param musicLength\n * music length\n * @param streamBuffer\n * pointer to output buffer\n * @param streamBufferPos\n * offset into the output buffer\n * @param crc\n * computation of CRC-16 of Lame Tag so far (starting at frame\n * sync)\n * @return number of bytes written to the stream\n */\n function putLameVBR(gfp, musicLength, streamBuffer, streamBufferPos, crc) {\n var gfc = gfp.internal_flags;\n var bytesWritten = 0;\n\n /* encoder delay */\n var encDelay = gfp.encoder_delay;\n /* encoder padding */\n var encPadding = gfp.encoder_padding;\n\n /* recall: gfp.VBR_q is for example set by the switch -V */\n /* gfp.quality by -q, -h, -f, etc */\n var quality = (100 - 10 * gfp.VBR_q - gfp.quality);\n\n var version = v.getLameVeryShortVersion();\n var vbr;\n var revision = 0x00;\n var revMethod;\n // numbering different in vbr_mode vs. Lame tag\n var vbrTypeTranslator = [1, 5, 3, 2, 4, 0, 3];\n var lowpass = 0 | (((gfp.lowpassfreq / 100.0) + .5) > 255 ? 255\n : (gfp.lowpassfreq / 100.0) + .5);\n var peakSignalAmplitude = 0;\n var radioReplayGain = 0;\n var audiophileReplayGain = 0;\n var noiseShaping = gfp.internal_flags.noise_shaping;\n var stereoMode = 0;\n var nonOptimal = 0;\n var sourceFreq = 0;\n var misc = 0;\n var musicCRC = 0;\n\n // psy model type: Gpsycho or NsPsytune\n var expNPsyTune = (gfp.exp_nspsytune & 1) != 0;\n var safeJoint = (gfp.exp_nspsytune & 2) != 0;\n var noGapMore = false;\n var noGapPrevious = false;\n var noGapCount = gfp.internal_flags.nogap_total;\n var noGapCurr = gfp.internal_flags.nogap_current;\n\n // 4 bits\n var athType = gfp.ATHtype;\n var flags = 0;\n\n // vbr modes\n var abrBitrate;\n switch (gfp.VBR) {\n case vbr_abr:\n abrBitrate = gfp.VBR_mean_bitrate_kbps;\n break;\n case vbr_off:\n abrBitrate = gfp.brate;\n break;\n default:\n abrBitrate = gfp.VBR_min_bitrate_kbps;\n }\n\n // revision and vbr method\n if (gfp.VBR.ordinal() < vbrTypeTranslator.length)\n vbr = vbrTypeTranslator[gfp.VBR.ordinal()];\n else\n vbr = 0x00; // unknown\n\n revMethod = 0x10 * revision + vbr;\n\n // ReplayGain\n if (gfc.findReplayGain) {\n if (gfc.RadioGain > 0x1FE)\n gfc.RadioGain = 0x1FE;\n if (gfc.RadioGain < -0x1FE)\n gfc.RadioGain = -0x1FE;\n\n // set name code\n radioReplayGain = 0x2000;\n // set originator code to `determined automatically'\n radioReplayGain |= 0xC00;\n\n if (gfc.RadioGain >= 0) {\n // set gain adjustment\n radioReplayGain |= gfc.RadioGain;\n } else {\n // set the sign bit\n radioReplayGain |= 0x200;\n // set gain adjustment\n radioReplayGain |= -gfc.RadioGain;\n }\n }\n\n // peak sample\n if (gfc.findPeakSample)\n peakSignalAmplitude = Math\n .abs(0 | ((( gfc.PeakSample) / 32767.0) * Math.pow(2, 23) + .5));\n\n // nogap\n if (noGapCount != -1) {\n if (noGapCurr > 0)\n noGapPrevious = true;\n\n if (noGapCurr < noGapCount - 1)\n noGapMore = true;\n }\n\n // flags\n flags = athType + ((expNPsyTune ? 1 : 0) << 4)\n + ((safeJoint ? 1 : 0) << 5) + ((noGapMore ? 1 : 0) << 6)\n + ((noGapPrevious ? 1 : 0) << 7);\n\n if (quality < 0)\n quality = 0;\n\n // stereo mode field (Intensity stereo is not implemented)\n switch (gfp.mode) {\n case MONO:\n stereoMode = 0;\n break;\n case STEREO:\n stereoMode = 1;\n break;\n case DUAL_CHANNEL:\n stereoMode = 2;\n break;\n case JOINT_STEREO:\n if (gfp.force_ms)\n stereoMode = 4;\n else\n stereoMode = 3;\n break;\n case NOT_SET:\n //$FALL-THROUGH$\n default:\n stereoMode = 7;\n break;\n }\n\n if (gfp.in_samplerate <= 32000)\n sourceFreq = 0x00;\n else if (gfp.in_samplerate == 48000)\n sourceFreq = 0x02;\n else if (gfp.in_samplerate > 48000)\n sourceFreq = 0x03;\n else {\n // default is 44100Hz\n sourceFreq = 0x01;\n }\n\n // Check if the user overrided the default LAME behavior with some\n // nasty options\n if (gfp.short_blocks == ShortBlock.short_block_forced\n || gfp.short_blocks == ShortBlock.short_block_dispensed\n || ((gfp.lowpassfreq == -1) && (gfp.highpassfreq == -1)) || /* \"-k\" */\n (gfp.scale_left < gfp.scale_right)\n || (gfp.scale_left > gfp.scale_right)\n || (gfp.disable_reservoir && gfp.brate < 320) || gfp.noATH\n || gfp.ATHonly || (athType == 0) || gfp.in_samplerate <= 32000)\n nonOptimal = 1;\n\n misc = noiseShaping + (stereoMode << 2) + (nonOptimal << 5)\n + (sourceFreq << 6);\n\n musicCRC = gfc.nMusicCRC;\n\n // Write all this information into the stream\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten, quality);\n bytesWritten += 4;\n\n for (var j = 0; j < 9; j++) {\n streamBuffer[streamBufferPos + bytesWritten + j] = 0xff & version .charAt(j);\n }\n bytesWritten += 9;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & revMethod;\n bytesWritten++;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & lowpass;\n bytesWritten++;\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten,\n peakSignalAmplitude);\n bytesWritten += 4;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten,\n radioReplayGain);\n bytesWritten += 2;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten,\n audiophileReplayGain);\n bytesWritten += 2;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & flags;\n bytesWritten++;\n\n if (abrBitrate >= 255)\n streamBuffer[streamBufferPos + bytesWritten] = 0xFF;\n else\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & abrBitrate;\n bytesWritten++;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & (encDelay >> 4);\n streamBuffer[streamBufferPos + bytesWritten + 1] = 0xff & ((encDelay << 4) + (encPadding >> 8));\n streamBuffer[streamBufferPos + bytesWritten + 2] = 0xff & encPadding;\n\n bytesWritten += 3;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & misc;\n bytesWritten++;\n\n // unused in rev0\n streamBuffer[streamBufferPos + bytesWritten++] = 0;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, gfp.preset);\n bytesWritten += 2;\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten, musicLength);\n bytesWritten += 4;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, musicCRC);\n bytesWritten += 2;\n\n // Calculate tag CRC.... must be done here, since it includes previous\n // information\n\n for (var i = 0; i < bytesWritten; i++)\n crc = crcUpdateLookup(streamBuffer[streamBufferPos + i], crc);\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, crc);\n bytesWritten += 2;\n\n return bytesWritten;\n }\n\n function skipId3v2(fpStream) {\n // seek to the beginning of the stream\n fpStream.seek(0);\n // read 10 bytes in case there's an ID3 version 2 header here\n var id3v2Header = new_byte(10);\n fpStream.readFully(id3v2Header);\n /* does the stream begin with the ID3 version 2 file identifier? */\n var id3v2TagSize;\n if (!new String(id3v2Header, \"ISO-8859-1\").startsWith(\"ID3\")) {\n /*\n * the tag size (minus the 10-byte header) is encoded into four\n * bytes where the most significant bit is clear in each byte\n */\n id3v2TagSize = (((id3v2Header[6] & 0x7f) << 21)\n | ((id3v2Header[7] & 0x7f) << 14)\n | ((id3v2Header[8] & 0x7f) << 7) | (id3v2Header[9] & 0x7f))\n + id3v2Header.length;\n } else {\n /* no ID3 version 2 tag in this stream */\n id3v2TagSize = 0;\n }\n return id3v2TagSize;\n }\n\n this.getLameTagFrame = function (gfp, buffer) {\n var gfc = gfp.internal_flags;\n\n if (!gfp.bWriteVbrTag) {\n return 0;\n }\n if (gfc.Class_ID != Lame.LAME_ID) {\n return 0;\n }\n if (gfc.VBR_seek_table.pos <= 0) {\n return 0;\n }\n if (buffer.length < gfc.VBR_seek_table.TotalFrameSize) {\n return gfc.VBR_seek_table.TotalFrameSize;\n }\n\n Arrays.fill(buffer, 0, gfc.VBR_seek_table.TotalFrameSize, 0);\n\n // 4 bytes frame header\n setLameTagFrameHeader(gfp, buffer);\n\n // Create TOC entries\n var toc = new_byte(NUMTOCENTRIES);\n\n if (gfp.free_format) {\n for (var i = 1; i < NUMTOCENTRIES; ++i)\n toc[i] = 0xff & (255 * i / 100);\n } else {\n xingSeekTable(gfc.VBR_seek_table, toc);\n }\n\n // Start writing the tag after the zero frame\n var streamIndex = gfc.sideinfo_len;\n /**\n * Note: Xing header specifies that Xing data goes in the ancillary data\n * with NO ERROR PROTECTION. If error protecton in enabled, the Xing\n * data still starts at the same offset, and now it is in sideinfo data\n * block, and thus will not decode correctly by non-Xing tag aware\n * players\n */\n if (gfp.error_protection)\n streamIndex -= 2;\n\n // Put Vbr tag\n if (gfp.VBR == VbrMode.vbr_off) {\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(0);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(1);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(2);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(3);\n\n } else {\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(0);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(1);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(2);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(3);\n }\n\n // Put header flags\n createInteger(buffer, streamIndex, FRAMES_FLAG + BYTES_FLAG + TOC_FLAG\n + VBR_SCALE_FLAG);\n streamIndex += 4;\n\n // Put Total Number of frames\n createInteger(buffer, streamIndex, gfc.VBR_seek_table.nVbrNumFrames);\n streamIndex += 4;\n\n // Put total audio stream size, including Xing/LAME Header\n var streamSize = (gfc.VBR_seek_table.nBytesWritten + gfc.VBR_seek_table.TotalFrameSize);\n createInteger(buffer, streamIndex, 0 | streamSize);\n streamIndex += 4;\n\n /* Put TOC */\n System.arraycopy(toc, 0, buffer, streamIndex, toc.length);\n streamIndex += toc.length;\n\n if (gfp.error_protection) {\n // (jo) error_protection: add crc16 information to header\n bs.CRC_writeheader(gfc, buffer);\n }\n\n // work out CRC so far: initially crc = 0\n var crc = 0x00;\n for (var i = 0; i < streamIndex; i++)\n crc = crcUpdateLookup(buffer[i], crc);\n // Put LAME VBR info\n streamIndex += putLameVBR(gfp, streamSize, buffer, streamIndex, crc);\n\n return gfc.VBR_seek_table.TotalFrameSize;\n }\n\n /**\n * Write final VBR tag to the file.\n *\n * @param gfp\n * global flags\n * @param stream\n * stream to add the VBR tag to\n * @return 0 (OK), -1 else\n * @throws IOException\n * I/O error\n */\n this.putVbrTag = function (gfp, stream) {\n var gfc = gfp.internal_flags;\n\n if (gfc.VBR_seek_table.pos <= 0)\n return -1;\n\n // Seek to end of file\n stream.seek(stream.length());\n\n // Get file size, abort if file has zero length.\n if (stream.length() == 0)\n return -1;\n\n // The VBR tag may NOT be located at the beginning of the stream. If an\n // ID3 version 2 tag was added, then it must be skipped to write the VBR\n // tag data.\n var id3v2TagSize = skipId3v2(stream);\n\n // Seek to the beginning of the stream\n stream.seek(id3v2TagSize);\n\n var buffer = new_byte(MAXFRAMESIZE);\n var bytes = getLameTagFrame(gfp, buffer);\n if (bytes > buffer.length) {\n return -1;\n }\n\n if (bytes < 1) {\n return 0;\n }\n\n // Put it all to disk again\n stream.write(buffer, 0, bytes);\n // success\n return 0;\n }\n\n}\n\nmodule.exports = VBRTag;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nLame = require('./Lame.js');\nPresets = require('./Presets.js');\nGainAnalysis = require('./GainAnalysis.js');\nQuantizePVT = require('./QuantizePVT.js');\nQuantize = require('./Quantize.js');\nTakehiro = require('./Takehiro.js');\nReservoir = require('./Reservoir.js');\nMPEGMode = require('./MPEGMode.js');\nBitStream = require('./BitStream.js');\nvar Encoder = require('./Encoder.js');\nvar Version = require('./Version.js');\nvar VBRTag = require('./VBRTag.js');\n\nfunction GetAudio() {\n var parse;\n var mpg;\n\n this.setModules = function (parse2, mpg2) {\n parse = parse2;\n mpg = mpg2;\n }\n}\n\n\nfunction Parse() {\n var ver;\n var id3;\n var pre;\n\n this.setModules = function (ver2, id32, pre2) {\n ver = ver2;\n id3 = id32;\n pre = pre2;\n }\n}\n\nfunction MPGLib() {\n}\n\nfunction ID3Tag() {\n var bits;\n var ver;\n\n this.setModules = function (_bits, _ver) {\n bits = _bits;\n ver = _ver;\n }\n}\n\nfunction Mp3Encoder(channels, samplerate, kbps) {\n if (arguments.length != 3) {\n console.error('WARN: Mp3Encoder(channels, samplerate, kbps) not specified');\n channels = 1;\n samplerate = 44100;\n kbps = 128;\n }\n var lame = new Lame();\n var gaud = new GetAudio();\n var ga = new GainAnalysis();\n var bs = new BitStream();\n var p = new Presets();\n var qupvt = new QuantizePVT();\n var qu = new Quantize();\n var vbr = new VBRTag();\n var ver = new Version();\n var id3 = new ID3Tag();\n var rv = new Reservoir();\n var tak = new Takehiro();\n var parse = new Parse();\n var mpg = new MPGLib();\n\n lame.setModules(ga, bs, p, qupvt, qu, vbr, ver, id3, mpg);\n bs.setModules(ga, mpg, ver, vbr);\n id3.setModules(bs, ver);\n p.setModules(lame);\n qu.setModules(bs, rv, qupvt, tak);\n qupvt.setModules(tak, rv, lame.enc.psy);\n rv.setModules(bs);\n tak.setModules(qupvt);\n vbr.setModules(lame, bs, ver);\n gaud.setModules(parse, mpg);\n parse.setModules(ver, id3, p);\n\n var gfp = lame.lame_init();\n\n gfp.num_channels = channels;\n gfp.in_samplerate = samplerate;\n gfp.brate = kbps;\n gfp.mode = MPEGMode.STEREO;\n gfp.quality = 3;\n gfp.bWriteVbrTag = false;\n gfp.disable_reservoir = true;\n gfp.write_id3tag_automatic = false;\n\n var retcode = lame.lame_init_params(gfp);\n assert(0 == retcode);\n var maxSamples = 1152;\n var mp3buf_size = 0 | (1.25 * maxSamples + 7200);\n var mp3buf = new_byte(mp3buf_size);\n\n this.encodeBuffer = function (left, right) {\n if (channels == 1) {\n right = left;\n }\n assert(left.length == right.length);\n if (left.length > maxSamples) {\n maxSamples = left.length;\n mp3buf_size = 0 | (1.25 * maxSamples + 7200);\n mp3buf = new_byte(mp3buf_size);\n }\n\n var _sz = lame.lame_encode_buffer(gfp, left, right, left.length, mp3buf, 0, mp3buf_size);\n return new Int8Array(mp3buf.subarray(0, _sz));\n };\n\n this.flush = function () {\n var _sz = lame.lame_encode_flush(gfp, mp3buf, 0, mp3buf_size);\n return new Int8Array(mp3buf.subarray(0, _sz));\n };\n}\n\nfunction WavHeader() {\n this.dataOffset = 0;\n this.dataLen = 0;\n this.channels = 0;\n this.sampleRate = 0;\n}\n\nfunction fourccToInt(fourcc) {\n return fourcc.charCodeAt(0) << 24 | fourcc.charCodeAt(1) << 16 | fourcc.charCodeAt(2) << 8 | fourcc.charCodeAt(3);\n}\n\nWavHeader.RIFF = fourccToInt(\"RIFF\");\nWavHeader.WAVE = fourccToInt(\"WAVE\");\nWavHeader.fmt_ = fourccToInt(\"fmt \");\nWavHeader.data = fourccToInt(\"data\");\n\nWavHeader.readHeader = function (dataView) {\n var w = new WavHeader();\n\n var header = dataView.getUint32(0, false);\n if (WavHeader.RIFF != header) {\n return;\n }\n var fileLen = dataView.getUint32(4, true);\n if (WavHeader.WAVE != dataView.getUint32(8, false)) {\n return;\n }\n if (WavHeader.fmt_ != dataView.getUint32(12, false)) {\n return;\n }\n var fmtLen = dataView.getUint32(16, true);\n var pos = 16 + 4;\n switch (fmtLen) {\n case 16:\n case 18:\n w.channels = dataView.getUint16(pos + 2, true);\n w.sampleRate = dataView.getUint32(pos + 4, true);\n break;\n default:\n throw 'extended fmt chunk not implemented';\n }\n pos += fmtLen;\n var data = WavHeader.data;\n var len = 0;\n while (data != header) {\n header = dataView.getUint32(pos, false);\n len = dataView.getUint32(pos + 4, true);\n if (data == header) {\n break;\n }\n pos += (len + 8);\n }\n w.dataLen = len;\n w.dataOffset = pos + 8;\n return w;\n};\n\nmodule.exports.Mp3Encoder = Mp3Encoder;\nmodule.exports.WavHeader = WavHeader;\n","import { Mp3Encoder } from 'lamejs';\n\nclass Encoder {\n constructor(config) {\n this.config = {\n sampleRate: 44100,\n bitRate: 128\n };\n\n Object.assign(this.config, config);\n\n this.mp3Encoder = new Mp3Encoder(\n 1,\n this.config.sampleRate,\n this.config.bitRate\n );\n\n // Audio is processed by frames of 1152 samples per audio channel\n // http://lame.sourceforge.net/tech-FAQ.txt\n this.maxSamples = 1152;\n\n this.samplesMono = null;\n this.clearBuffer();\n }\n\n /**\n * Clear active buffer\n */\n clearBuffer() {\n this.dataBuffer = [];\n }\n\n /**\n * Append new audio buffer to current active buffer\n * @param {Buffer} buffer\n */\n appendToBuffer(buffer) {\n this.dataBuffer.push(new Int8Array(buffer));\n }\n\n /**\n * Float current data to 16 bits PCM\n * @param {Float32Array} input\n * @param {Int16Array} output\n */\n floatTo16BitPCM(input, output) {\n for (let i = 0; i < input.length; i++) {\n const s = Math.max(-1, Math.min(1, input[i]));\n output[i] = (s < 0 ? s * 0x8000 : s * 0x7FFF);\n }\n }\n\n /**\n * Convert buffer to proper format\n * @param {Array} arrayBuffer\n */\n convertBuffer(arrayBuffer) {\n const data = new Float32Array(arrayBuffer);\n const out = new Int16Array(arrayBuffer.length);\n this.floatTo16BitPCM(data, out);\n\n return out;\n }\n\n /**\n * Encode and append current buffer to dataBuffer\n * @param {Array} arrayBuffer\n */\n encode(arrayBuffer) {\n this.samplesMono = this.convertBuffer(arrayBuffer);\n let remaining = this.samplesMono.length;\n\n for (let i = 0; remaining >= 0; i += this.maxSamples) {\n const left = this.samplesMono.subarray(i, i + this.maxSamples);\n const mp3buffer = this.mp3Encoder.encodeBuffer(left);\n this.appendToBuffer(mp3buffer);\n remaining -= this.maxSamples;\n }\n }\n\n /**\n * Return full dataBuffer\n */\n finish() {\n this.appendToBuffer(this.mp3Encoder.flush());\n\n return this.dataBuffer;\n }\n};\n\nexport default Encoder;\n","import Encoder from './encoder';\n\nclass MicRecorder {\n constructor(config) {\n this.config = {\n // 128 or 160 kbit/s – mid-range bitrate quality\n bitRate: 128,\n\n // There is a known issue with some macOS machines, where the recording\n // will sometimes have a loud 'pop' or 'pop-click' sound. This flag\n // prevents getting audio from the microphone a few milliseconds after\n // the begining of the recording. It also helps to remove the mouse\n // \"click\" sound from the output mp3 file.\n startRecordingAt: 300,\n deviceId: null,\n };\n\n this.activeStream = null;\n this.context = null;\n this.microphone = null;\n this.processor = null;\n this.startTime = 0;\n\n Object.assign(this.config, config);\n }\n\n /**\n * Starts to listen for the microphone sound\n * @param {MediaStream} stream\n */\n addMicrophoneListener(stream) {\n this.activeStream = stream;\n\n // This prevents the weird noise once you start listening to the microphone\n this.timerToStart = setTimeout(() => {\n delete this.timerToStart;\n }, this.config.startRecordingAt);\n\n // Set up Web Audio API to process data from the media stream (microphone).\n this.microphone = this.context.createMediaStreamSource(stream);\n\n // Settings a bufferSize of 0 instructs the browser to choose the best bufferSize\n this.processor = this.context.createScriptProcessor(0, 1, 1);\n\n // Add all buffers from LAME into an array.\n this.processor.onaudioprocess = (event) => {\n if (this.timerToStart) {\n return;\n }\n\n // Send microphone data to LAME for MP3 encoding while recording.\n this.lameEncoder.encode(event.inputBuffer.getChannelData(0));\n };\n\n // Begin retrieving microphone data.\n this.microphone.connect(this.processor);\n this.processor.connect(this.context.destination);\n };\n\n /**\n * Disconnect microphone, processor and remove activeStream\n */\n stop() {\n if (this.processor && this.microphone) {\n // Clean up the Web Audio API resources.\n this.microphone.disconnect();\n this.processor.disconnect();\n\n // If all references using this.context are destroyed, context is closed\n // automatically. DOMException is fired when trying to close again\n if (this.context && this.context.state !== 'closed') {\n this.context.close();\n }\n\n this.processor.onaudioprocess = null;\n\n // Stop all audio tracks. Also, removes recording icon from chrome tab\n this.activeStream.getAudioTracks().forEach(track => track.stop());\n }\n\n return this;\n };\n\n /**\n * Requests access to the microphone and start recording\n * @return Promise\n */\n start() {\n const AudioContext = window.AudioContext || window.webkitAudioContext;\n this.context = new AudioContext();\n this.config.sampleRate = this.context.sampleRate;\n this.lameEncoder = new Encoder(this.config);\n\n const audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true;\n\n return new Promise((resolve, reject) => {\n navigator.mediaDevices.getUserMedia({ audio })\n .then(stream => {\n this.addMicrophoneListener(stream);\n resolve(stream);\n }).catch(function(err) {\n reject(err);\n });\n })\n };\n\n /**\n * Return Mp3 Buffer and Blob with type mp3\n * @return {Promise}\n */\n getMp3() {\n const finalBuffer = this.lameEncoder.finish();\n\n return new Promise((resolve, reject) => {\n if (finalBuffer.length === 0) {\n reject(new Error('No buffer to send'));\n } else {\n resolve([finalBuffer, new Blob(finalBuffer, { type: 'audio/mp3' })]);\n this.lameEncoder.clearBuffer();\n }\n });\n };\n};\n\nexport default MicRecorder;\n"],"names":["new_byte","new_int","new_float","new_double","new_float_n","new_int_n","new_array_n","Arrays","System","Util","ShortBlock","Float","VbrMode","assert","Encoder","III_psy_xmin","require$$0","require$$1","FFT","MPEGMode","L3Side","GrInfo","LameInternalFlags","IIISideInfo","ScaleFac","NsPsy","VBRSeekInfo","GainAnalysis","MeanBits","Tables","QuantizePVT","Takehiro","BitStream","new_short_n","Lame","PsyModel","LameGlobalFlags","ATH","ReplayGain","CBRNewIterationLoop","Presets","CalcNoiseResult","Quantize","VBRQuantize","CalcNoiseData","Reservoir","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","VBRTag","Version","config","assign","mp3Encoder","Mp3Encoder","sampleRate","bitRate","maxSamples","samplesMono","clearBuffer","dataBuffer","buffer","push","Int8Array","input","output","i","length","s","Math","max","min","arrayBuffer","data","Float32Array","out","Int16Array","floatTo16BitPCM","convertBuffer","remaining","left","subarray","mp3buffer","encodeBuffer","appendToBuffer","flush","MicRecorder","activeStream","context","microphone","processor","startTime","stream","timerToStart","setTimeout","startRecordingAt","createMediaStreamSource","createScriptProcessor","onaudioprocess","event","lameEncoder","encode","inputBuffer","getChannelData","connect","destination","disconnect","state","close","getAudioTracks","forEach","track","stop","AudioContext","window","webkitAudioContext","audio","deviceId","exact","Promise","resolve","reject","mediaDevices","getUserMedia","then","addMicrophoneListener","catch","err","finalBuffer","finish","Error","Blob","type"],"mappings":";;;;;;AAAA,SAASA,UAAQ,CAAC,KAAK,EAAE;IACrB,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;CAC/B;;AAED,SAAS,SAAS,CAAC,KAAK,EAAE;IACtB,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;;AAED,SAASC,SAAO,CAAC,KAAK,EAAE;IACpB,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;;AAED,SAASC,WAAS,CAAC,KAAK,EAAE;IACtB,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;CAClC;;AAED,SAASC,YAAU,CAAC,KAAK,EAAE;IACvB,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;CAClC;;AAED,SAASC,aAAW,CAAC,IAAI,EAAE;IACvB,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;QAClB,OAAOF,WAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7B;IACD,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IACrB,IAAI,CAAC,GAAG,EAAE,CAAC;IACX,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,EAAE,EAAE;QACzB,CAAC,CAAC,IAAI,CAACE,aAAW,CAAC,IAAI,CAAC,CAAC,CAAC;KAC7B;IACD,OAAO,CAAC,CAAC;CACZ;AACD,SAASC,WAAS,CAAC,IAAI,EAAE;IACrB,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;QAClB,OAAOJ,SAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3B;IACD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WAAjB;;OALG,CAAP;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../node_modules/lamejs/src/js/common.js","../node_modules/lamejs/src/js/NewMDCT.js","../node_modules/lamejs/src/js/III_psy_xmin.js","../node_modules/lamejs/src/js/III_psy_ratio.js","../node_modules/lamejs/src/js/Encoder.js","../node_modules/lamejs/src/js/FFT.js","../node_modules/lamejs/src/js/PsyModel.js","../node_modules/lamejs/src/js/MPEGMode.js","../node_modules/lamejs/src/js/LameGlobalFlags.js","../node_modules/lamejs/src/js/L3Side.js","../node_modules/lamejs/src/js/GrInfo.js","../node_modules/lamejs/src/js/IIISideInfo.js","../node_modules/lamejs/src/js/ScaleFac.js","../node_modules/lamejs/src/js/NsPsy.js","../node_modules/lamejs/src/js/VBRSeekInfo.js","../node_modules/lamejs/src/js/LameInternalFlags.js","../node_modules/lamejs/src/js/ATH.js","../node_modules/lamejs/src/js/GainAnalysis.js","../node_modules/lamejs/src/js/ReplayGain.js","../node_modules/lamejs/src/js/MeanBits.js","../node_modules/lamejs/src/js/CBRNewIterationLoop.js","../node_modules/lamejs/src/js/Tables.js","../node_modules/lamejs/src/js/QuantizePVT.js","../node_modules/lamejs/src/js/Takehiro.js","../node_modules/lamejs/src/js/BitStream.js","../node_modules/lamejs/src/js/Lame.js","../node_modules/lamejs/src/js/Presets.js","../node_modules/lamejs/src/js/VBRQuantize.js","../node_modules/lamejs/src/js/CalcNoiseResult.js","../node_modules/lamejs/src/js/CalcNoiseData.js","../node_modules/lamejs/src/js/Quantize.js","../node_modules/lamejs/src/js/Reservoir.js","../node_modules/lamejs/src/js/Version.js","../node_modules/lamejs/src/js/VBRTag.js","../node_modules/lamejs/src/js/index.js","../src/encoder.js","../src/mic-recorder.js"],"sourcesContent":["function new_byte(count) {\n return new Int8Array(count);\n}\n\nfunction new_short(count) {\n return new Int16Array(count);\n}\n\nfunction new_int(count) {\n return new Int32Array(count);\n}\n\nfunction new_float(count) {\n return new Float32Array(count);\n}\n\nfunction new_double(count) {\n return new Float64Array(count);\n}\n\nfunction new_float_n(args) {\n if (args.length == 1) {\n return new_float(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_float_n(args));\n }\n return A;\n}\nfunction new_int_n(args) {\n if (args.length == 1) {\n return new_int(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_int_n(args));\n }\n return A;\n}\n\nfunction new_short_n(args) {\n if (args.length == 1) {\n return new_short(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_short_n(args));\n }\n return A;\n}\n\nfunction new_array_n(args) {\n if (args.length == 1) {\n return new Array(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_array_n(args));\n }\n return A;\n}\n\n\nvar Arrays = {};\n\nArrays.fill = function (a, fromIndex, toIndex, val) {\n if (arguments.length == 2) {\n for (var i = 0; i < a.length; i++) {\n a[i] = arguments[1];\n }\n } else {\n for (var i = fromIndex; i < toIndex; i++) {\n a[i] = val;\n }\n }\n};\n\nvar System = {};\n\nSystem.arraycopy = function (src, srcPos, dest, destPos, length) {\n var srcEnd = srcPos + length;\n while (srcPos < srcEnd)\n dest[destPos++] = src[srcPos++];\n};\n\n\nvar Util = {};\nUtil.SQRT2 = 1.41421356237309504880;\nUtil.FAST_LOG10 = function (x) {\n return Math.log10(x);\n};\n\nUtil.FAST_LOG10_X = function (x, y) {\n return Math.log10(x) * y;\n};\n\nfunction ShortBlock(ordinal) {\n this.ordinal = ordinal;\n}\n/**\n * LAME may use them, even different block types for L/R.\n */\nShortBlock.short_block_allowed = new ShortBlock(0);\n/**\n * LAME may use them, but always same block types in L/R.\n */\nShortBlock.short_block_coupled = new ShortBlock(1);\n/**\n * LAME will not use short blocks, long blocks only.\n */\nShortBlock.short_block_dispensed = new ShortBlock(2);\n/**\n * LAME will not use long blocks, short blocks only.\n */\nShortBlock.short_block_forced = new ShortBlock(3);\n\nvar Float = {};\nFloat.MAX_VALUE = 3.4028235e+38;\n\nfunction VbrMode(ordinal) {\n this.ordinal = ordinal;\n}\nVbrMode.vbr_off = new VbrMode(0);\nVbrMode.vbr_mt = new VbrMode(1);\nVbrMode.vbr_rh = new VbrMode(2);\nVbrMode.vbr_abr = new VbrMode(3);\nVbrMode.vbr_mtrh = new VbrMode(4);\nVbrMode.vbr_default = VbrMode.vbr_mtrh;\n\nvar assert = function (x) {\n //console.assert(x);\n};\n\nmodule.exports = {\n \"System\": System,\n \"VbrMode\": VbrMode,\n \"Float\": Float,\n \"ShortBlock\": ShortBlock,\n \"Util\": Util,\n \"Arrays\": Arrays,\n \"new_array_n\": new_array_n,\n \"new_byte\": new_byte,\n \"new_double\": new_double,\n \"new_float\": new_float,\n \"new_float_n\": new_float_n,\n \"new_int\": new_int,\n \"new_int_n\": new_int_n,\n \"new_short\": new_short,\n \"new_short_n\": new_short_n,\n \"assert\": assert\n};\n","/*\n * MP3 window subband -> subband filtering -> mdct routine\n *\n * Copyright (c) 1999-2000 Takehiro Tominaga\n *\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Library General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n/*\n * Special Thanks to Patrick De Smet for your advices.\n */\n\n/* $Id: NewMDCT.java,v 1.11 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n\nfunction NewMDCT() {\n\n\tvar enwindow = [\n\t\t\t-4.77e-07 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.03951e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.53674e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t2.841473e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t3.5758972e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t3.401756e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.83715e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.9182e-05 * 0.740951125354959 / 2.384e-06, /* 15 */\n\t\t\t1.2398e-05 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.91212e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t2.283096e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.6994476e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t-1.8756866e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t-2.630711e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t-2.47478e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t-1.4782e-05 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.063471690191471e-01, 1.960342806591213e-01,\n\n\t\t\t-4.77e-07 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.05858e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.30786e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t2.521515e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t3.5694122e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t3.643036e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.91821e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.6321e-05 * 0.773010453362737 / 2.384e-06, /* 14 */\n\t\t\t1.1444e-05 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.65462e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t2.110004e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.6112804e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t-1.9634247e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t-2.803326e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t-2.77042e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t-1.6689e-05 * 0.773010453362737 / 2.384e-06,\n\t\t\t8.206787908286602e-01, 3.901806440322567e-01,\n\n\t\t\t-4.77e-07 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.07288e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.02653e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t2.174854e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t3.5586357e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t3.858566e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.95159e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.3460e-05 * 0.803207531480645 / 2.384e-06, /* 13 */\n\t\t\t1.0014e-05 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.40190e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.937389e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.5233517e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t-2.0506859e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t-2.974033e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t-3.07560e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t-1.8120e-05 * 0.803207531480645 / 2.384e-06,\n\t\t\t7.416505462720353e-01, 5.805693545089249e-01,\n\n\t\t\t-4.77e-07 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.08242e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t8.68797e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.800537e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t3.5435200e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t4.049301e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t9.94205e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t9.0599e-05 * 0.831469612302545 / 2.384e-06, /* 12 */\n\t\t\t9.060e-06 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.16348e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.766682e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.4358521e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t-2.1372318e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t-3.14188e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t-3.39031e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t-1.9550e-05 * 0.831469612302545 / 2.384e-06,\n\t\t\t6.681786379192989e-01, 7.653668647301797e-01,\n\n\t\t\t-4.77e-07 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.08719e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t8.29220e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.399517e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t3.5242081e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t4.215240e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t9.89437e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t8.7261e-05 * 0.857728610000272 / 2.384e-06, /* 11 */\n\t\t\t8.106e-06 * 0.857728610000272 / 2.384e-06,\n\t\t\t9.3937e-05 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.597881e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.3489246e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t-2.2228718e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t-3.306866e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t-3.71456e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t-2.1458e-05 * 0.857728610000272 / 2.384e-06,\n\t\t\t5.993769336819237e-01, 9.427934736519954e-01,\n\n\t\t\t-4.77e-07 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.08719e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t7.8392e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t9.71317e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t3.5007000e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t4.357815e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t9.80854e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t8.3923e-05 * 0.881921264348355 / 2.384e-06, /* 10 */\n\t\t\t7.629e-06 * 0.881921264348355 / 2.384e-06,\n\t\t\t7.2956e-05 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.432419e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.2627602e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t-2.3074150e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t-3.467083e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t-4.04358e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t-2.3365e-05 * 0.881921264348355 / 2.384e-06,\n\t\t\t5.345111359507916e-01, 1.111140466039205e+00,\n\n\t\t\t-9.54e-07 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.08242e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t7.31945e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t5.15938e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t3.4730434e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t4.477024e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t9.68933e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t8.0585e-05 * 0.903989293123443 / 2.384e-06, /* 9 */\n\t\t\t6.676e-06 * 0.903989293123443 / 2.384e-06,\n\t\t\t5.2929e-05 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.269817e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.1775017e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t-2.3907185e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t-3.622532e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t-4.38213e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t-2.5272e-05 * 0.903989293123443 / 2.384e-06,\n\t\t\t4.729647758913199e-01, 1.268786568327291e+00,\n\n\t\t\t-9.54e-07 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.06812e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t6.74248e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.3379e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.4412861e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t4.573822e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t9.54151e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t7.6771e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t6.199e-06 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.4332e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.111031e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.0933399e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-2.4725437e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-3.771782e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-4.72546e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-2.7657e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t4.1421356237309504879e-01, /* tan(PI/8) */\n\t\t\t1.414213562373095e+00,\n\n\t\t\t-9.54e-07 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.05381e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t6.10352e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t-4.75883e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t3.4055710e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t4.649162e-03 * 0.941544065183021 / 2.384e-06,\n\t\t\t9.35555e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t7.3433e-05 * 0.941544065183021 / 2.384e-06, /* 7 */\n\t\t\t5.245e-06 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.7166e-05 * 0.941544065183021 / 2.384e-06,\n\t\t\t9.56535e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.0103703e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t-2.5527000e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t-3.914356e-03 * 0.941544065183021 / 2.384e-06,\n\t\t\t-5.07355e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t-3.0041e-05 * 0.941544065183021 / 2.384e-06,\n\t\t\t3.578057213145241e-01, 1.546020906725474e+00,\n\n\t\t\t-9.54e-07 * 0.956940335732209 / 2.384e-06,\n\t\t\t1.02520e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t5.39303e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t-1.011848e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t3.3659935e-02 * 0.956940335732209 / 2.384e-06,\n\t\t\t4.703045e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.15051e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t7.0095e-05 * 0.956940335732209 / 2.384e-06, /* 6 */\n\t\t\t4.768e-06 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.54e-07 * 0.956940335732209 / 2.384e-06,\n\t\t\t8.06808e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.287834e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t-2.6310921e-02 * 0.956940335732209 / 2.384e-06,\n\t\t\t-4.048824e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t-5.42164e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t-3.2425e-05 * 0.956940335732209 / 2.384e-06,\n\t\t\t3.033466836073424e-01, 1.662939224605090e+00,\n\n\t\t\t-1.431e-06 * 0.970031253194544 / 2.384e-06,\n\t\t\t9.9182e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t4.62532e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t-1.573563e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t3.3225536e-02 * 0.970031253194544 / 2.384e-06,\n\t\t\t4.737377e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t8.91685e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t6.6280e-05 * 0.970031253194544 / 2.384e-06, /* 5 */\n\t\t\t4.292e-06 * 0.970031253194544 / 2.384e-06,\n\t\t\t-1.3828e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t6.61850e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t8.487225e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t-2.7073860e-02 * 0.970031253194544 / 2.384e-06,\n\t\t\t-4.174709e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t-5.76973e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t-3.4809e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t2.504869601913055e-01, 1.763842528696710e+00,\n\n\t\t\t-1.431e-06 * 0.98078528040323 / 2.384e-06,\n\t\t\t9.5367e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t3.78609e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.161503e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t3.2754898e-02 * 0.98078528040323 / 2.384e-06,\n\t\t\t4.752159e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t8.66413e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t6.2943e-05 * 0.98078528040323 / 2.384e-06, /* 4 */\n\t\t\t3.815e-06 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.718e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t5.22137e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t7.703304e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.7815342e-02 * 0.98078528040323 / 2.384e-06,\n\t\t\t-4.290581e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t-6.11782e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t-3.7670e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t1.989123673796580e-01, 1.847759065022573e+00,\n\n\t\t\t-1.907e-06 * 0.989176509964781 / 2.384e-06,\n\t\t\t9.0122e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t2.88486e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t-2.774239e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t3.2248020e-02 * 0.989176509964781 / 2.384e-06,\n\t\t\t4.748821e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t8.38757e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t5.9605e-05 * 0.989176509964781 / 2.384e-06, /* 3 */\n\t\t\t3.338e-06 * 0.989176509964781 / 2.384e-06,\n\t\t\t-3.9577e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t3.88145e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t6.937027e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t-2.8532982e-02 * 0.989176509964781 / 2.384e-06,\n\t\t\t-4.395962e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t-6.46591e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t-4.0531e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t1.483359875383474e-01, 1.913880671464418e+00,\n\n\t\t\t-1.907e-06 * 0.995184726672197 / 2.384e-06,\n\t\t\t8.4400e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t1.91689e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t-3.411293e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t3.1706810e-02 * 0.995184726672197 / 2.384e-06,\n\t\t\t4.728317e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t8.09669e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t5.579e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t3.338e-06 * 0.995184726672197 / 2.384e-06,\n\t\t\t-5.0545e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t2.59876e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t6.189346e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t-2.9224873e-02 * 0.995184726672197 / 2.384e-06,\n\t\t\t-4.489899e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t-6.80923e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t-4.3392e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t9.849140335716425e-02, 1.961570560806461e+00,\n\n\t\t\t-2.384e-06 * 0.998795456205172 / 2.384e-06,\n\t\t\t7.7724e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t8.8215e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.072189e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t3.1132698e-02 * 0.998795456205172 / 2.384e-06,\n\t\t\t4.691124e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t7.79152e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t5.2929e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t2.861e-06 * 0.998795456205172 / 2.384e-06,\n\t\t\t-6.0558e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t1.37329e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t5.462170e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t-2.9890060e-02 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.570484e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t-7.14302e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.6253e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t4.912684976946725e-02, 1.990369453344394e+00,\n\n\t\t\t3.5780907e-02 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.7876148e-02 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t3.134727e-03 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t2.457142e-03 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t9.71317e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t2.18868e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.01566e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.3828e-05 * Util.SQRT2 * 0.5 / 2.384e-06,\n\n\t\t\t3.0526638e-02 / 2.384e-06, 4.638195e-03 / 2.384e-06,\n\t\t\t7.47204e-04 / 2.384e-06, 4.9591e-05 / 2.384e-06,\n\t\t\t4.756451e-03 / 2.384e-06, 2.1458e-05 / 2.384e-06,\n\t\t\t-6.9618e-05 / 2.384e-06, /* 2.384e-06/2.384e-06 */\n\t];\n\n\tvar NS = 12;\n\tvar NL = 36;\n\n\tvar win = [\n\t [\n\t 2.382191739347913e-13,\n\t 6.423305872147834e-13,\n\t 9.400849094049688e-13,\n\t 1.122435026096556e-12,\n\t 1.183840321267481e-12,\n\t 1.122435026096556e-12,\n\t 9.400849094049690e-13,\n\t 6.423305872147839e-13,\n\t 2.382191739347918e-13,\n\n\t 5.456116108943412e-12,\n\t 4.878985199565852e-12,\n\t 4.240448995017367e-12,\n\t 3.559909094758252e-12,\n\t 2.858043359288075e-12,\n\t 2.156177623817898e-12,\n\t 1.475637723558783e-12,\n\t 8.371015190102974e-13,\n\t 2.599706096327376e-13,\n\n\t -5.456116108943412e-12,\n\t -4.878985199565852e-12,\n\t -4.240448995017367e-12,\n\t -3.559909094758252e-12,\n\t -2.858043359288076e-12,\n\t -2.156177623817898e-12,\n\t -1.475637723558783e-12,\n\t -8.371015190102975e-13,\n\t -2.599706096327376e-13,\n\n\t -2.382191739347923e-13,\n\t -6.423305872147843e-13,\n\t -9.400849094049696e-13,\n\t -1.122435026096556e-12,\n\t -1.183840321267481e-12,\n\t -1.122435026096556e-12,\n\t -9.400849094049694e-13,\n\t -6.423305872147840e-13,\n\t -2.382191739347918e-13,\n\t ],\n\t [\n\t 2.382191739347913e-13,\n\t 6.423305872147834e-13,\n\t 9.400849094049688e-13,\n\t 1.122435026096556e-12,\n\t 1.183840321267481e-12,\n\t 1.122435026096556e-12,\n\t 9.400849094049688e-13,\n\t 6.423305872147841e-13,\n\t 2.382191739347918e-13,\n\n\t 5.456116108943413e-12,\n\t 4.878985199565852e-12,\n\t 4.240448995017367e-12,\n\t 3.559909094758253e-12,\n\t 2.858043359288075e-12,\n\t 2.156177623817898e-12,\n\t 1.475637723558782e-12,\n\t 8.371015190102975e-13,\n\t 2.599706096327376e-13,\n\n\t -5.461314069809755e-12,\n\t -4.921085770524055e-12,\n\t -4.343405037091838e-12,\n\t -3.732668368707687e-12,\n\t -3.093523840190885e-12,\n\t -2.430835727329465e-12,\n\t -1.734679010007751e-12,\n\t -9.748253656609281e-13,\n\t -2.797435120168326e-13,\n\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t -2.283748241799531e-13,\n\t -4.037858874020686e-13,\n\t -2.146547464825323e-13,\n\t ],\n\t [\n\t 1.316524975873958e-01, /* win[SHORT_TYPE] */\n\t 4.142135623730950e-01,\n\t 7.673269879789602e-01,\n\n\t 1.091308501069271e+00, /* tantab_l */\n\t 1.303225372841206e+00,\n\t 1.569685577117490e+00,\n\t 1.920982126971166e+00,\n\t 2.414213562373094e+00,\n\t 3.171594802363212e+00,\n\t 4.510708503662055e+00,\n\t 7.595754112725146e+00,\n\t 2.290376554843115e+01,\n\n\t 0.98480775301220802032, /* cx */\n\t 0.64278760968653936292,\n\t 0.34202014332566882393,\n\t 0.93969262078590842791,\n\t -0.17364817766693030343,\n\t -0.76604444311897790243,\n\t 0.86602540378443870761,\n\t 0.500000000000000e+00,\n\n\t -5.144957554275265e-01, /* ca */\n\t -4.717319685649723e-01,\n\t -3.133774542039019e-01,\n\t -1.819131996109812e-01,\n\t -9.457419252642064e-02,\n\t -4.096558288530405e-02,\n\t -1.419856857247115e-02,\n\t -3.699974673760037e-03,\n\n\t 8.574929257125442e-01, /* cs */\n\t 8.817419973177052e-01,\n\t 9.496286491027329e-01,\n\t 9.833145924917901e-01,\n\t 9.955178160675857e-01,\n\t 9.991605581781475e-01,\n\t 9.998991952444470e-01,\n\t 9.999931550702802e-01,\n\t ],\n\t [\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 2.283748241799531e-13,\n\t 4.037858874020686e-13,\n\t 2.146547464825323e-13,\n\n\t 5.461314069809755e-12,\n\t 4.921085770524055e-12,\n\t 4.343405037091838e-12,\n\t 3.732668368707687e-12,\n\t 3.093523840190885e-12,\n\t 2.430835727329466e-12,\n\t 1.734679010007751e-12,\n\t 9.748253656609281e-13,\n\t 2.797435120168326e-13,\n\n\t -5.456116108943413e-12,\n\t -4.878985199565852e-12,\n\t -4.240448995017367e-12,\n\t -3.559909094758253e-12,\n\t -2.858043359288075e-12,\n\t -2.156177623817898e-12,\n\t -1.475637723558782e-12,\n\t -8.371015190102975e-13,\n\t -2.599706096327376e-13,\n\n\t -2.382191739347913e-13,\n\t -6.423305872147834e-13,\n\t -9.400849094049688e-13,\n\t -1.122435026096556e-12,\n\t -1.183840321267481e-12,\n\t -1.122435026096556e-12,\n\t -9.400849094049688e-13,\n\t -6.423305872147841e-13,\n\t -2.382191739347918e-13,\n\t ]\n\t];\n\n\tvar tantab_l = win[Encoder.SHORT_TYPE];\n\tvar cx = win[Encoder.SHORT_TYPE];\n\tvar ca = win[Encoder.SHORT_TYPE];\n\tvar cs = win[Encoder.SHORT_TYPE];\n\n\t/**\n\t * new IDCT routine written by Takehiro TOMINAGA\n\t *\n\t * PURPOSE: Overlapping window on PCM samples
\n\t *\n\t * SEMANTICS:
\n\t * 32 16-bit pcm samples are scaled to fractional 2's complement and\n\t * concatenated to the end of the window buffer #x#. The updated window\n\t * buffer #x# is then windowed by the analysis window #c# to produce the\n\t * windowed sample #z#\n\t */\n\tvar order = [\n\t 0, 1, 16, 17, 8, 9, 24, 25, 4, 5, 20, 21, 12, 13, 28, 29,\n\t 2, 3, 18, 19, 10, 11, 26, 27, 6, 7, 22, 23, 14, 15, 30, 31\n\t];\n\n\t/**\n\t * returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32\n\t */\n\tfunction window_subband(x1, x1Pos, a) {\n\t\tvar wp = 10;\n\n\t\tvar x2 = x1Pos + 238 - 14 - 286;\n\n\t\tfor (var i = -15; i < 0; i++) {\n\t\t\tvar w, s, t;\n\n\t\t\tw = enwindow[wp + -10];\n\t\t\ts = x1[x2 + -224] * w;\n\t\t\tt = x1[x1Pos + 224] * w;\n\t\t\tw = enwindow[wp + -9];\n\t\t\ts += x1[x2 + -160] * w;\n\t\t\tt += x1[x1Pos + 160] * w;\n\t\t\tw = enwindow[wp + -8];\n\t\t\ts += x1[x2 + -96] * w;\n\t\t\tt += x1[x1Pos + 96] * w;\n\t\t\tw = enwindow[wp + -7];\n\t\t\ts += x1[x2 + -32] * w;\n\t\t\tt += x1[x1Pos + 32] * w;\n\t\t\tw = enwindow[wp + -6];\n\t\t\ts += x1[x2 + 32] * w;\n\t\t\tt += x1[x1Pos + -32] * w;\n\t\t\tw = enwindow[wp + -5];\n\t\t\ts += x1[x2 + 96] * w;\n\t\t\tt += x1[x1Pos + -96] * w;\n\t\t\tw = enwindow[wp + -4];\n\t\t\ts += x1[x2 + 160] * w;\n\t\t\tt += x1[x1Pos + -160] * w;\n\t\t\tw = enwindow[wp + -3];\n\t\t\ts += x1[x2 + 224] * w;\n\t\t\tt += x1[x1Pos + -224] * w;\n\n\t\t\tw = enwindow[wp + -2];\n\t\t\ts += x1[x1Pos + -256] * w;\n\t\t\tt -= x1[x2 + 256] * w;\n\t\t\tw = enwindow[wp + -1];\n\t\t\ts += x1[x1Pos + -192] * w;\n\t\t\tt -= x1[x2 + 192] * w;\n\t\t\tw = enwindow[wp + 0];\n\t\t\ts += x1[x1Pos + -128] * w;\n\t\t\tt -= x1[x2 + 128] * w;\n\t\t\tw = enwindow[wp + 1];\n\t\t\ts += x1[x1Pos + -64] * w;\n\t\t\tt -= x1[x2 + 64] * w;\n\t\t\tw = enwindow[wp + 2];\n\t\t\ts += x1[x1Pos + 0] * w;\n\t\t\tt -= x1[x2 + 0] * w;\n\t\t\tw = enwindow[wp + 3];\n\t\t\ts += x1[x1Pos + 64] * w;\n\t\t\tt -= x1[x2 + -64] * w;\n\t\t\tw = enwindow[wp + 4];\n\t\t\ts += x1[x1Pos + 128] * w;\n\t\t\tt -= x1[x2 + -128] * w;\n\t\t\tw = enwindow[wp + 5];\n\t\t\ts += x1[x1Pos + 192] * w;\n\t\t\tt -= x1[x2 + -192] * w;\n\n\t\t\t/*\n\t\t\t * this multiplyer could be removed, but it needs more 256 FLOAT\n\t\t\t * data. thinking about the data cache performance, I think we\n\t\t\t * should not use such a huge table. tt 2000/Oct/25\n\t\t\t */\n\t\t\ts *= enwindow[wp + 6];\n\t\t\tw = t - s;\n\t\t\ta[30 + i * 2] = t + s;\n\t\t\ta[31 + i * 2] = enwindow[wp + 7] * w;\n\t\t\twp += 18;\n\t\t\tx1Pos--;\n\t\t\tx2++;\n\t\t}\n\t\t{\n\t\t\tvar s, t, u, v;\n\t\t\tt = x1[x1Pos + -16] * enwindow[wp + -10];\n\t\t\ts = x1[x1Pos + -32] * enwindow[wp + -2];\n\t\t\tt += (x1[x1Pos + -48] - x1[x1Pos + 16]) * enwindow[wp + -9];\n\t\t\ts += x1[x1Pos + -96] * enwindow[wp + -1];\n\t\t\tt += (x1[x1Pos + -80] + x1[x1Pos + 48]) * enwindow[wp + -8];\n\t\t\ts += x1[x1Pos + -160] * enwindow[wp + 0];\n\t\t\tt += (x1[x1Pos + -112] - x1[x1Pos + 80]) * enwindow[wp + -7];\n\t\t\ts += x1[x1Pos + -224] * enwindow[wp + 1];\n\t\t\tt += (x1[x1Pos + -144] + x1[x1Pos + 112]) * enwindow[wp + -6];\n\t\t\ts -= x1[x1Pos + 32] * enwindow[wp + 2];\n\t\t\tt += (x1[x1Pos + -176] - x1[x1Pos + 144]) * enwindow[wp + -5];\n\t\t\ts -= x1[x1Pos + 96] * enwindow[wp + 3];\n\t\t\tt += (x1[x1Pos + -208] + x1[x1Pos + 176]) * enwindow[wp + -4];\n\t\t\ts -= x1[x1Pos + 160] * enwindow[wp + 4];\n\t\t\tt += (x1[x1Pos + -240] - x1[x1Pos + 208]) * enwindow[wp + -3];\n\t\t\ts -= x1[x1Pos + 224];\n\n\t\t\tu = s - t;\n\t\t\tv = s + t;\n\n\t\t\tt = a[14];\n\t\t\ts = a[15] - t;\n\n\t\t\ta[31] = v + t; /* A0 */\n\t\t\ta[30] = u + s; /* A1 */\n\t\t\ta[15] = u - s; /* A2 */\n\t\t\ta[14] = v - t; /* A3 */\n\t\t}\n\t\t{\n\t\t\tvar xr;\n\t\t\txr = a[28] - a[0];\n\t\t\ta[0] += a[28];\n\t\t\ta[28] = xr * enwindow[wp + -2 * 18 + 7];\n\t\t\txr = a[29] - a[1];\n\t\t\ta[1] += a[29];\n\t\t\ta[29] = xr * enwindow[wp + -2 * 18 + 7];\n\n\t\t\txr = a[26] - a[2];\n\t\t\ta[2] += a[26];\n\t\t\ta[26] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[27] - a[3];\n\t\t\ta[3] += a[27];\n\t\t\ta[27] = xr * enwindow[wp + -4 * 18 + 7];\n\n\t\t\txr = a[24] - a[4];\n\t\t\ta[4] += a[24];\n\t\t\ta[24] = xr * enwindow[wp + -6 * 18 + 7];\n\t\t\txr = a[25] - a[5];\n\t\t\ta[5] += a[25];\n\t\t\ta[25] = xr * enwindow[wp + -6 * 18 + 7];\n\n\t\t\txr = a[22] - a[6];\n\t\t\ta[6] += a[22];\n\t\t\ta[22] = xr * Util.SQRT2;\n\t\t\txr = a[23] - a[7];\n\t\t\ta[7] += a[23];\n\t\t\ta[23] = xr * Util.SQRT2 - a[7];\n\t\t\ta[7] -= a[6];\n\t\t\ta[22] -= a[7];\n\t\t\ta[23] -= a[22];\n\n\t\t\txr = a[6];\n\t\t\ta[6] = a[31] - xr;\n\t\t\ta[31] = a[31] + xr;\n\t\t\txr = a[7];\n\t\t\ta[7] = a[30] - xr;\n\t\t\ta[30] = a[30] + xr;\n\t\t\txr = a[22];\n\t\t\ta[22] = a[15] - xr;\n\t\t\ta[15] = a[15] + xr;\n\t\t\txr = a[23];\n\t\t\ta[23] = a[14] - xr;\n\t\t\ta[14] = a[14] + xr;\n\n\t\t\txr = a[20] - a[8];\n\t\t\ta[8] += a[20];\n\t\t\ta[20] = xr * enwindow[wp + -10 * 18 + 7];\n\t\t\txr = a[21] - a[9];\n\t\t\ta[9] += a[21];\n\t\t\ta[21] = xr * enwindow[wp + -10 * 18 + 7];\n\n\t\t\txr = a[18] - a[10];\n\t\t\ta[10] += a[18];\n\t\t\ta[18] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = a[19] - a[11];\n\t\t\ta[11] += a[19];\n\t\t\ta[19] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[16] - a[12];\n\t\t\ta[12] += a[16];\n\t\t\ta[16] = xr * enwindow[wp + -14 * 18 + 7];\n\t\t\txr = a[17] - a[13];\n\t\t\ta[13] += a[17];\n\t\t\ta[17] = xr * enwindow[wp + -14 * 18 + 7];\n\n\t\t\txr = -a[20] + a[24];\n\t\t\ta[20] += a[24];\n\t\t\ta[24] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = -a[21] + a[25];\n\t\t\ta[21] += a[25];\n\t\t\ta[25] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[4] - a[8];\n\t\t\ta[4] += a[8];\n\t\t\ta[8] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = a[5] - a[9];\n\t\t\ta[5] += a[9];\n\t\t\ta[9] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[0] - a[12];\n\t\t\ta[0] += a[12];\n\t\t\ta[12] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[1] - a[13];\n\t\t\ta[1] += a[13];\n\t\t\ta[13] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[16] - a[28];\n\t\t\ta[16] += a[28];\n\t\t\ta[28] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = -a[17] + a[29];\n\t\t\ta[17] += a[29];\n\t\t\ta[29] = xr * enwindow[wp + -4 * 18 + 7];\n\n\t\t\txr = Util.SQRT2 * (a[2] - a[10]);\n\t\t\ta[2] += a[10];\n\t\t\ta[10] = xr;\n\t\t\txr = Util.SQRT2 * (a[3] - a[11]);\n\t\t\ta[3] += a[11];\n\t\t\ta[11] = xr;\n\t\t\txr = Util.SQRT2 * (-a[18] + a[26]);\n\t\t\ta[18] += a[26];\n\t\t\ta[26] = xr - a[18];\n\t\t\txr = Util.SQRT2 * (-a[19] + a[27]);\n\t\t\ta[19] += a[27];\n\t\t\ta[27] = xr - a[19];\n\n\t\t\txr = a[2];\n\t\t\ta[19] -= a[3];\n\t\t\ta[3] -= xr;\n\t\t\ta[2] = a[31] - xr;\n\t\t\ta[31] += xr;\n\t\t\txr = a[3];\n\t\t\ta[11] -= a[19];\n\t\t\ta[18] -= xr;\n\t\t\ta[3] = a[30] - xr;\n\t\t\ta[30] += xr;\n\t\t\txr = a[18];\n\t\t\ta[27] -= a[11];\n\t\t\ta[19] -= xr;\n\t\t\ta[18] = a[15] - xr;\n\t\t\ta[15] += xr;\n\n\t\t\txr = a[19];\n\t\t\ta[10] -= xr;\n\t\t\ta[19] = a[14] - xr;\n\t\t\ta[14] += xr;\n\t\t\txr = a[10];\n\t\t\ta[11] -= xr;\n\t\t\ta[10] = a[23] - xr;\n\t\t\ta[23] += xr;\n\t\t\txr = a[11];\n\t\t\ta[26] -= xr;\n\t\t\ta[11] = a[22] - xr;\n\t\t\ta[22] += xr;\n\t\t\txr = a[26];\n\t\t\ta[27] -= xr;\n\t\t\ta[26] = a[7] - xr;\n\t\t\ta[7] += xr;\n\n\t\t\txr = a[27];\n\t\t\ta[27] = a[6] - xr;\n\t\t\ta[6] += xr;\n\n\t\t\txr = Util.SQRT2 * (a[0] - a[4]);\n\t\t\ta[0] += a[4];\n\t\t\ta[4] = xr;\n\t\t\txr = Util.SQRT2 * (a[1] - a[5]);\n\t\t\ta[1] += a[5];\n\t\t\ta[5] = xr;\n\t\t\txr = Util.SQRT2 * (a[16] - a[20]);\n\t\t\ta[16] += a[20];\n\t\t\ta[20] = xr;\n\t\t\txr = Util.SQRT2 * (a[17] - a[21]);\n\t\t\ta[17] += a[21];\n\t\t\ta[21] = xr;\n\n\t\t\txr = -Util.SQRT2 * (a[8] - a[12]);\n\t\t\ta[8] += a[12];\n\t\t\ta[12] = xr - a[8];\n\t\t\txr = -Util.SQRT2 * (a[9] - a[13]);\n\t\t\ta[9] += a[13];\n\t\t\ta[13] = xr - a[9];\n\t\t\txr = -Util.SQRT2 * (a[25] - a[29]);\n\t\t\ta[25] += a[29];\n\t\t\ta[29] = xr - a[25];\n\t\t\txr = -Util.SQRT2 * (a[24] + a[28]);\n\t\t\ta[24] -= a[28];\n\t\t\ta[28] = xr - a[24];\n\n\t\t\txr = a[24] - a[16];\n\t\t\ta[24] = xr;\n\t\t\txr = a[20] - xr;\n\t\t\ta[20] = xr;\n\t\t\txr = a[28] - xr;\n\t\t\ta[28] = xr;\n\n\t\t\txr = a[25] - a[17];\n\t\t\ta[25] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[17] - a[1];\n\t\t\ta[17] = xr;\n\t\t\txr = a[9] - xr;\n\t\t\ta[9] = xr;\n\t\t\txr = a[25] - xr;\n\t\t\ta[25] = xr;\n\t\t\txr = a[5] - xr;\n\t\t\ta[5] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[13] - xr;\n\t\t\ta[13] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[1] - a[0];\n\t\t\ta[1] = xr;\n\t\t\txr = a[16] - xr;\n\t\t\ta[16] = xr;\n\t\t\txr = a[17] - xr;\n\t\t\ta[17] = xr;\n\t\t\txr = a[8] - xr;\n\t\t\ta[8] = xr;\n\t\t\txr = a[9] - xr;\n\t\t\ta[9] = xr;\n\t\t\txr = a[24] - xr;\n\t\t\ta[24] = xr;\n\t\t\txr = a[25] - xr;\n\t\t\ta[25] = xr;\n\t\t\txr = a[4] - xr;\n\t\t\ta[4] = xr;\n\t\t\txr = a[5] - xr;\n\t\t\ta[5] = xr;\n\t\t\txr = a[20] - xr;\n\t\t\ta[20] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[12] - xr;\n\t\t\ta[12] = xr;\n\t\t\txr = a[13] - xr;\n\t\t\ta[13] = xr;\n\t\t\txr = a[28] - xr;\n\t\t\ta[28] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[0];\n\t\t\ta[0] += a[31];\n\t\t\ta[31] -= xr;\n\t\t\txr = a[1];\n\t\t\ta[1] += a[30];\n\t\t\ta[30] -= xr;\n\t\t\txr = a[16];\n\t\t\ta[16] += a[15];\n\t\t\ta[15] -= xr;\n\t\t\txr = a[17];\n\t\t\ta[17] += a[14];\n\t\t\ta[14] -= xr;\n\t\t\txr = a[8];\n\t\t\ta[8] += a[23];\n\t\t\ta[23] -= xr;\n\t\t\txr = a[9];\n\t\t\ta[9] += a[22];\n\t\t\ta[22] -= xr;\n\t\t\txr = a[24];\n\t\t\ta[24] += a[7];\n\t\t\ta[7] -= xr;\n\t\t\txr = a[25];\n\t\t\ta[25] += a[6];\n\t\t\ta[6] -= xr;\n\t\t\txr = a[4];\n\t\t\ta[4] += a[27];\n\t\t\ta[27] -= xr;\n\t\t\txr = a[5];\n\t\t\ta[5] += a[26];\n\t\t\ta[26] -= xr;\n\t\t\txr = a[20];\n\t\t\ta[20] += a[11];\n\t\t\ta[11] -= xr;\n\t\t\txr = a[21];\n\t\t\ta[21] += a[10];\n\t\t\ta[10] -= xr;\n\t\t\txr = a[12];\n\t\t\ta[12] += a[19];\n\t\t\ta[19] -= xr;\n\t\t\txr = a[13];\n\t\t\ta[13] += a[18];\n\t\t\ta[18] -= xr;\n\t\t\txr = a[28];\n\t\t\ta[28] += a[3];\n\t\t\ta[3] -= xr;\n\t\t\txr = a[29];\n\t\t\ta[29] += a[2];\n\t\t\ta[2] -= xr;\n\t\t}\n\t}\n\n\t/**\n\t * Function: Calculation of the MDCT In the case of long blocks (type 0,1,3)\n\t * there are 36 coefficents in the time domain and 18 in the frequency\n\t * domain.
\n\t * In the case of short blocks (type 2) there are 3 transformations with\n\t * short length. This leads to 12 coefficents in the time and 6 in the\n\t * frequency domain. In this case the results are stored side by side in the\n\t * vector out[].\n\t *\n\t * New layer3\n\t */\n\tfunction mdct_short(inout, inoutPos) {\n\t\tfor (var l = 0; l < 3; l++) {\n\t\t\tvar tc0, tc1, tc2, ts0, ts1, ts2;\n\n\t\t\tts0 = inout[inoutPos + 2 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t- inout[inoutPos + 5 * 3];\n\t\t\ttc0 = inout[inoutPos + 0 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t- inout[inoutPos + 3 * 3];\n\t\t\ttc1 = ts0 + tc0;\n\t\t\ttc2 = ts0 - tc0;\n\n\t\t\tts0 = inout[inoutPos + 5 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t+ inout[inoutPos + 2 * 3];\n\t\t\ttc0 = inout[inoutPos + 3 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t+ inout[inoutPos + 0 * 3];\n\t\t\tts1 = ts0 + tc0;\n\t\t\tts2 = -ts0 + tc0;\n\n\t\t\ttc0 = (inout[inoutPos + 1 * 3] * win[Encoder.SHORT_TYPE][1] - inout[inoutPos + 4 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tts0 = (inout[inoutPos + 4 * 3] * win[Encoder.SHORT_TYPE][1] + inout[inoutPos + 1 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 0] = tc1 * 1.907525191737280e-11 + tc0;\n\t\t\t/*\n\t\t\t * tritab_s[ 2 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 5] = -ts1 * 1.907525191737280e-11 + ts0;\n\t\t\t/*\n\t\t\t * tritab_s[0 ]\n\t\t\t */\n\t\t\ttc2 = tc2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 2]\n\t\t\t */\n\t\t\tts1 = ts1 * 0.5 * 1.907525191737281e-11 + ts0;\n\t\t\tinout[inoutPos + 3 * 1] = tc2 - ts1;\n\t\t\tinout[inoutPos + 3 * 2] = tc2 + ts1;\n\n\t\t\ttc1 = tc1 * 0.5 * 1.907525191737281e-11 - tc0;\n\t\t\tts2 = ts2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 0]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 3] = tc1 + ts2;\n\t\t\tinout[inoutPos + 3 * 4] = tc1 - ts2;\n\n\t\t\tinoutPos++;\n\t\t}\n\t}\n\n\tfunction mdct_long(out, outPos, _in) {\n\t\tvar ct, st;\n\t\t{\n\t\t\tvar tc1, tc2, tc3, tc4, ts5, ts6, ts7, ts8;\n\t\t\t/* 1,2, 5,6, 9,10, 13,14, 17 */\n\t\t\ttc1 = _in[17] - _in[9];\n\t\t\ttc3 = _in[15] - _in[11];\n\t\t\ttc4 = _in[14] - _in[12];\n\t\t\tts5 = _in[0] + _in[8];\n\t\t\tts6 = _in[1] + _in[7];\n\t\t\tts7 = _in[2] + _in[6];\n\t\t\tts8 = _in[3] + _in[5];\n\n\t\t\tout[outPos + 17] = (ts5 + ts7 - ts8) - (ts6 - _in[4]);\n\t\t\tst = (ts5 + ts7 - ts8) * cx[12 + 7] + (ts6 - _in[4]);\n\t\t\tct = (tc1 - tc3 - tc4) * cx[12 + 6];\n\t\t\tout[outPos + 5] = ct + st;\n\t\t\tout[outPos + 6] = ct - st;\n\n\t\t\ttc2 = (_in[16] - _in[10]) * cx[12 + 6];\n\t\t\tts6 = ts6 * cx[12 + 7] + _in[4];\n\t\t\tct = tc1 * cx[12 + 0] + tc2 + tc3 * cx[12 + 1] + tc4 * cx[12 + 2];\n\t\t\tst = -ts5 * cx[12 + 4] + ts6 - ts7 * cx[12 + 5] + ts8 * cx[12 + 3];\n\t\t\tout[outPos + 1] = ct + st;\n\t\t\tout[outPos + 2] = ct - st;\n\n\t\t\tct = tc1 * cx[12 + 1] - tc2 - tc3 * cx[12 + 2] + tc4 * cx[12 + 0];\n\t\t\tst = -ts5 * cx[12 + 5] + ts6 - ts7 * cx[12 + 3] + ts8 * cx[12 + 4];\n\t\t\tout[outPos + 9] = ct + st;\n\t\t\tout[outPos + 10] = ct - st;\n\n\t\t\tct = tc1 * cx[12 + 2] - tc2 + tc3 * cx[12 + 0] - tc4 * cx[12 + 1];\n\t\t\tst = ts5 * cx[12 + 3] - ts6 + ts7 * cx[12 + 4] - ts8 * cx[12 + 5];\n\t\t\tout[outPos + 13] = ct + st;\n\t\t\tout[outPos + 14] = ct - st;\n\t\t}\n\t\t{\n\t\t\tvar ts1, ts2, ts3, ts4, tc5, tc6, tc7, tc8;\n\n\t\t\tts1 = _in[8] - _in[0];\n\t\t\tts3 = _in[6] - _in[2];\n\t\t\tts4 = _in[5] - _in[3];\n\t\t\ttc5 = _in[17] + _in[9];\n\t\t\ttc6 = _in[16] + _in[10];\n\t\t\ttc7 = _in[15] + _in[11];\n\t\t\ttc8 = _in[14] + _in[12];\n\n\t\t\tout[outPos + 0] = (tc5 + tc7 + tc8) + (tc6 + _in[13]);\n\t\t\tct = (tc5 + tc7 + tc8) * cx[12 + 7] - (tc6 + _in[13]);\n\t\t\tst = (ts1 - ts3 + ts4) * cx[12 + 6];\n\t\t\tout[outPos + 11] = ct + st;\n\t\t\tout[outPos + 12] = ct - st;\n\n\t\t\tts2 = (_in[7] - _in[1]) * cx[12 + 6];\n\t\t\ttc6 = _in[13] - tc6 * cx[12 + 7];\n\t\t\tct = tc5 * cx[12 + 3] - tc6 + tc7 * cx[12 + 4] + tc8 * cx[12 + 5];\n\t\t\tst = ts1 * cx[12 + 2] + ts2 + ts3 * cx[12 + 0] + ts4 * cx[12 + 1];\n\t\t\tout[outPos + 3] = ct + st;\n\t\t\tout[outPos + 4] = ct - st;\n\n\t\t\tct = -tc5 * cx[12 + 5] + tc6 - tc7 * cx[12 + 3] - tc8 * cx[12 + 4];\n\t\t\tst = ts1 * cx[12 + 1] + ts2 - ts3 * cx[12 + 2] - ts4 * cx[12 + 0];\n\t\t\tout[outPos + 7] = ct + st;\n\t\t\tout[outPos + 8] = ct - st;\n\n\t\t\tct = -tc5 * cx[12 + 4] + tc6 - tc7 * cx[12 + 5] - tc8 * cx[12 + 3];\n\t\t\tst = ts1 * cx[12 + 0] - ts2 + ts3 * cx[12 + 1] - ts4 * cx[12 + 2];\n\t\t\tout[outPos + 15] = ct + st;\n\t\t\tout[outPos + 16] = ct - st;\n\t\t}\n\t}\n\n\tthis.mdct_sub48 = function(gfc, w0, w1) {\n\t\tvar wk = w0;\n\t\tvar wkPos = 286;\n\t\t/* thinking cache performance, ch->gr loop is better than gr->ch loop */\n\t\tfor (var ch = 0; ch < gfc.channels_out; ch++) {\n\t\t\tfor (var gr = 0; gr < gfc.mode_gr; gr++) {\n\t\t\t\tvar band;\n\t\t\t\tvar gi = (gfc.l3_side.tt[gr][ch]);\n\t\t\t\tvar mdct_enc = gi.xr;\n\t\t\t\tvar mdct_encPos = 0;\n\t\t\t\tvar samp = gfc.sb_sample[ch][1 - gr];\n\t\t\t\tvar sampPos = 0;\n\n\t\t\t\tfor (var k = 0; k < 18 / 2; k++) {\n\t\t\t\t\twindow_subband(wk, wkPos, samp[sampPos]);\n\t\t\t\t\twindow_subband(wk, wkPos + 32, samp[sampPos + 1]);\n\t\t\t\t\tsampPos += 2;\n\t\t\t\t\twkPos += 64;\n\t\t\t\t\t/*\n\t\t\t\t\t * Compensate for inversion in the analysis filter\n\t\t\t\t\t */\n\t\t\t\t\tfor (band = 1; band < 32; band += 2) {\n\t\t\t\t\t\tsamp[sampPos - 1][band] *= -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * Perform imdct of 18 previous subband samples + 18 current\n\t\t\t\t * subband samples\n\t\t\t\t */\n\t\t\t\tfor (band = 0; band < 32; band++, mdct_encPos += 18) {\n\t\t\t\t\tvar type = gi.block_type;\n\t\t\t\t\tvar band0 = gfc.sb_sample[ch][gr];\n\t\t\t\t\tvar band1 = gfc.sb_sample[ch][1 - gr];\n\t\t\t\t\tif (gi.mixed_block_flag != 0 && band < 2)\n\t\t\t\t\t\ttype = 0;\n\t\t\t\t\tif (gfc.amp_filter[band] < 1e-12) {\n\t\t\t\t\t\tArrays.fill(mdct_enc, mdct_encPos + 0,\n\t\t\t\t\t\t\t\tmdct_encPos + 18, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (gfc.amp_filter[band] < 1.0) {\n\t\t\t\t\t\t\tfor (var k = 0; k < 18; k++)\n\t\t\t\t\t\t\t\tband1[k][order[band]] *= gfc.amp_filter[band];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (type == Encoder.SHORT_TYPE) {\n\t\t\t\t\t\t\tfor (var k = -NS / 4; k < 0; k++) {\n\t\t\t\t\t\t\t\tvar w = win[Encoder.SHORT_TYPE][k + 3];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 9] = band0[9 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band0[8 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 18] = band0[14 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band0[15 + k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 10] = band0[15 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band0[14 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 19] = band1[2 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band1[3 + k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 11] = band1[3 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band1[2 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 20] = band1[8 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band1[9 + k][order[band]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmdct_short(mdct_enc, mdct_encPos);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar work = new_float(18);\n\t\t\t\t\t\t\tfor (var k = -NL / 4; k < 0; k++) {\n\t\t\t\t\t\t\t\tvar a, b;\n\t\t\t\t\t\t\t\ta = win[type][k + 27]\n\t\t\t\t\t\t\t\t\t\t* band1[k + 9][order[band]]\n\t\t\t\t\t\t\t\t\t\t+ win[type][k + 36]\n\t\t\t\t\t\t\t\t\t\t* band1[8 - k][order[band]];\n\t\t\t\t\t\t\t\tb = win[type][k + 9]\n\t\t\t\t\t\t\t\t\t\t* band0[k + 9][order[band]]\n\t\t\t\t\t\t\t\t\t\t- win[type][k + 18]\n\t\t\t\t\t\t\t\t\t\t* band0[8 - k][order[band]];\n\t\t\t\t\t\t\t\twork[k + 9] = a - b * tantab_l[3 + k + 9];\n\t\t\t\t\t\t\t\twork[k + 18] = a * tantab_l[3 + k + 9] + b;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmdct_long(mdct_enc, mdct_encPos, work);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * Perform aliasing reduction butterfly\n\t\t\t\t\t */\n\t\t\t\t\tif (type != Encoder.SHORT_TYPE && band != 0) {\n\t\t\t\t\t\tfor (var k = 7; k >= 0; --k) {\n\t\t\t\t\t\t\tvar bu, bd;\n\t\t\t\t\t\t\tbu = mdct_enc[mdct_encPos + k] * ca[20 + k]\n\t\t\t\t\t\t\t\t\t+ mdct_enc[mdct_encPos + -1 - k]\n\t\t\t\t\t\t\t\t\t* cs[28 + k];\n\t\t\t\t\t\t\tbd = mdct_enc[mdct_encPos + k] * cs[28 + k]\n\t\t\t\t\t\t\t\t\t- mdct_enc[mdct_encPos + -1 - k]\n\t\t\t\t\t\t\t\t\t* ca[20 + k];\n\n\t\t\t\t\t\t\tmdct_enc[mdct_encPos + -1 - k] = bu;\n\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k] = bd;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\twk = w1;\n\t\t\twkPos = 286;\n\t\t\tif (gfc.mode_gr == 1) {\n\t\t\t\tfor (var i = 0; i < 18; i++) {\n\t\t\t\t\tSystem.arraycopy(gfc.sb_sample[ch][1][i], 0,\n\t\t\t\t\t\t\tgfc.sb_sample[ch][0][i], 0, 32);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = NewMDCT;\n","var Encoder = require('./Encoder.js');\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nfunction III_psy_xmin() {\n this.l = new_float(Encoder.SBMAX_l);\n this.s = new_float_n([Encoder.SBMAX_s, 3]);\n\n var self = this;\n this.assign = function (iii_psy_xmin) {\n System.arraycopy(iii_psy_xmin.l, 0, self.l, 0, Encoder.SBMAX_l);\n for (var i = 0; i < Encoder.SBMAX_s; i++) {\n for (var j = 0; j < 3; j++) {\n self.s[i][j] = iii_psy_xmin.s[i][j];\n }\n }\n }\n}\n\nmodule.exports = III_psy_xmin;\n","//package mp3;\n\nvar III_psy_xmin = require('./III_psy_xmin.js');\n\nfunction III_psy_ratio() {\n\tthis.thm = new III_psy_xmin();\n\tthis.en = new III_psy_xmin();\n}\n\nmodule.exports = III_psy_ratio;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * ENCDELAY The encoder delay.\n *\n * Minimum allowed is MDCTDELAY (see below)\n *\n * The first 96 samples will be attenuated, so using a value less than 96\n * will result in corrupt data for the first 96-ENCDELAY samples.\n *\n * suggested: 576 set to 1160 to sync with FhG.\n */\nEncoder.ENCDELAY = 576;\n/**\n * make sure there is at least one complete frame after the last frame\n * containing real data\n *\n * Using a value of 288 would be sufficient for a a very sophisticated\n * decoder that can decode granule-by-granule instead of frame by frame. But\n * lets not assume this, and assume the decoder will not decode frame N\n * unless it also has data for frame N+1\n */\nEncoder.POSTDELAY = 1152;\n\n/**\n * delay of the MDCT used in mdct.c original ISO routines had a delay of\n * 528! Takehiro's routines:\n */\nEncoder.MDCTDELAY = 48;\nEncoder.FFTOFFSET = (224 + Encoder.MDCTDELAY);\n\n/**\n * Most decoders, including the one we use, have a delay of 528 samples.\n */\nEncoder.DECDELAY = 528;\n\n/**\n * number of subbands\n */\nEncoder.SBLIMIT = 32;\n\n/**\n * parition bands bands\n */\nEncoder.CBANDS = 64;\n\n/**\n * number of critical bands/scale factor bands where masking is computed\n */\nEncoder.SBPSY_l = 21;\nEncoder.SBPSY_s = 12;\n\n/**\n * total number of scalefactor bands encoded\n */\nEncoder.SBMAX_l = 22;\nEncoder.SBMAX_s = 13;\nEncoder.PSFB21 = 6;\nEncoder.PSFB12 = 6;\n\n/**\n * FFT sizes\n */\nEncoder.BLKSIZE = 1024;\nEncoder.HBLKSIZE = (Encoder.BLKSIZE / 2 + 1);\nEncoder.BLKSIZE_s = 256;\nEncoder.HBLKSIZE_s = (Encoder.BLKSIZE_s / 2 + 1);\n\nEncoder.NORM_TYPE = 0;\nEncoder.START_TYPE = 1;\nEncoder.SHORT_TYPE = 2;\nEncoder.STOP_TYPE = 3;\n\n/**\n *
\n * Mode Extention:\n * When we are in stereo mode, there are 4 possible methods to store these\n * two channels. The stereo modes -m? are using a subset of them.\n *\n *  -ms: MPG_MD_LR_LR\n *  -mj: MPG_MD_LR_LR and MPG_MD_MS_LR\n *  -mf: MPG_MD_MS_LR\n *  -mi: all\n * 
\n */\nEncoder.MPG_MD_LR_LR = 0;\nEncoder.MPG_MD_LR_I = 1;\nEncoder.MPG_MD_MS_LR = 2;\nEncoder.MPG_MD_MS_I = 3;\n\nEncoder.fircoef = [-0.0207887 * 5, -0.0378413 * 5,\n -0.0432472 * 5, -0.031183 * 5, 7.79609e-18 * 5, 0.0467745 * 5,\n 0.10091 * 5, 0.151365 * 5, 0.187098 * 5];\n\nfunction Encoder() {\n var NewMDCT = require('./NewMDCT.js');\n var III_psy_ratio = require('./III_psy_ratio.js');\n\n var FFTOFFSET = Encoder.FFTOFFSET;\n var MPG_MD_MS_LR = Encoder.MPG_MD_MS_LR;\n //BitStream bs;\n //PsyModel psy;\n //VBRTag vbr;\n //QuantizePVT qupvt;\n var bs = null;\n this.psy = null;\n var psy = null;\n var vbr = null;\n var qupvt = null;\n\n //public final void setModules(BitStream bs, PsyModel psy, QuantizePVT qupvt,\n // VBRTag vbr) {\n this.setModules = function (_bs, _psy, _qupvt, _vbr) {\n bs = _bs;\n this.psy = _psy;\n psy = _psy;\n vbr = _vbr;\n qupvt = _qupvt;\n };\n\n var newMDCT = new NewMDCT();\n\n /***********************************************************************\n *\n * encoder and decoder delays\n *\n ***********************************************************************/\n\n /**\n *
\n     * layer III enc->dec delay:  1056 (1057?)   (observed)\n     * layer  II enc->dec delay:   480  (481?)   (observed)\n     *\n     * polyphase 256-16             (dec or enc)        = 240\n     * mdct      256+32  (9*32)     (dec or enc)        = 288\n     * total:    512+16\n     *\n     * My guess is that delay of polyphase filterbank is actualy 240.5\n     * (there are technical reasons for this, see postings in mp3encoder).\n     * So total Encode+Decode delay = ENCDELAY + 528 + 1\n     * 
\n */\n\n\n /**\n * auto-adjust of ATH, useful for low volume Gabriel Bouvigne 3 feb 2001\n *\n * modifies some values in gfp.internal_flags.ATH (gfc.ATH)\n */\n//private void adjust_ATH(final LameInternalFlags gfc) {\n function adjust_ATH(gfc) {\n var gr2_max, max_pow;\n\n if (gfc.ATH.useAdjust == 0) {\n gfc.ATH.adjust = 1.0;\n /* no adjustment */\n return;\n }\n\n /* jd - 2001 mar 12, 27, jun 30 */\n /* loudness based on equal loudness curve; */\n /* use granule with maximum combined loudness */\n max_pow = gfc.loudness_sq[0][0];\n gr2_max = gfc.loudness_sq[1][0];\n if (gfc.channels_out == 2) {\n max_pow += gfc.loudness_sq[0][1];\n gr2_max += gfc.loudness_sq[1][1];\n } else {\n max_pow += max_pow;\n gr2_max += gr2_max;\n }\n if (gfc.mode_gr == 2) {\n max_pow = Math.max(max_pow, gr2_max);\n }\n max_pow *= 0.5;\n /* max_pow approaches 1.0 for full band noise */\n\n /* jd - 2001 mar 31, jun 30 */\n /* user tuning of ATH adjustment region */\n max_pow *= gfc.ATH.aaSensitivityP;\n\n /*\n * adjust ATH depending on range of maximum value\n */\n\n /* jd - 2001 feb27, mar12,20, jun30, jul22 */\n /* continuous curves based on approximation */\n /* to GB's original values. */\n /* For an increase in approximate loudness, */\n /* set ATH adjust to adjust_limit immediately */\n /* after a delay of one frame. */\n /* For a loudness decrease, reduce ATH adjust */\n /* towards adjust_limit gradually. */\n /* max_pow is a loudness squared or a power. */\n if (max_pow > 0.03125) { /* ((1 - 0.000625)/ 31.98) from curve below */\n if (gfc.ATH.adjust >= 1.0) {\n gfc.ATH.adjust = 1.0;\n } else {\n /* preceding frame has lower ATH adjust; */\n /* ascend only to the preceding adjust_limit */\n /* in case there is leading low volume */\n if (gfc.ATH.adjust < gfc.ATH.adjustLimit) {\n gfc.ATH.adjust = gfc.ATH.adjustLimit;\n }\n }\n gfc.ATH.adjustLimit = 1.0;\n } else { /* adjustment curve */\n /* about 32 dB maximum adjust (0.000625) */\n var adj_lim_new = 31.98 * max_pow + 0.000625;\n if (gfc.ATH.adjust >= adj_lim_new) { /* descend gradually */\n gfc.ATH.adjust *= adj_lim_new * 0.075 + 0.925;\n if (gfc.ATH.adjust < adj_lim_new) { /* stop descent */\n gfc.ATH.adjust = adj_lim_new;\n }\n } else { /* ascend */\n if (gfc.ATH.adjustLimit >= adj_lim_new) {\n gfc.ATH.adjust = adj_lim_new;\n } else {\n /* preceding frame has lower ATH adjust; */\n /* ascend only to the preceding adjust_limit */\n if (gfc.ATH.adjust < gfc.ATH.adjustLimit) {\n gfc.ATH.adjust = gfc.ATH.adjustLimit;\n }\n }\n }\n gfc.ATH.adjustLimit = adj_lim_new;\n }\n }\n\n /**\n *
\n     *  some simple statistics\n     *\n     *  bitrate index 0: free bitrate . not allowed in VBR mode\n     *  : bitrates, kbps depending on MPEG version\n     *  bitrate index 15: forbidden\n     *\n     *  mode_ext:\n     *  0:  LR\n     *  1:  LR-i\n     *  2:  MS\n     *  3:  MS-i\n     * 
\n */\n function updateStats(gfc) {\n var gr, ch;\n assert(0 <= gfc.bitrate_index && gfc.bitrate_index < 16);\n assert(0 <= gfc.mode_ext && gfc.mode_ext < 4);\n\n /* count bitrate indices */\n gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][4]++;\n gfc.bitrate_stereoMode_Hist[15][4]++;\n\n /* count 'em for every mode extension in case of 2 channel encoding */\n if (gfc.channels_out == 2) {\n gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][gfc.mode_ext]++;\n gfc.bitrate_stereoMode_Hist[15][gfc.mode_ext]++;\n }\n for (gr = 0; gr < gfc.mode_gr; ++gr) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n var bt = gfc.l3_side.tt[gr][ch].block_type | 0;\n if (gfc.l3_side.tt[gr][ch].mixed_block_flag != 0)\n bt = 4;\n gfc.bitrate_blockType_Hist[gfc.bitrate_index][bt]++;\n gfc.bitrate_blockType_Hist[gfc.bitrate_index][5]++;\n gfc.bitrate_blockType_Hist[15][bt]++;\n gfc.bitrate_blockType_Hist[15][5]++;\n }\n }\n }\n\n function lame_encode_frame_init(gfp, inbuf) {\n var gfc = gfp.internal_flags;\n\n var ch, gr;\n\n if (gfc.lame_encode_frame_init == 0) {\n /* prime the MDCT/polyphase filterbank with a short block */\n var i, j;\n var primebuff0 = new_float(286 + 1152 + 576);\n var primebuff1 = new_float(286 + 1152 + 576);\n gfc.lame_encode_frame_init = 1;\n for (i = 0, j = 0; i < 286 + 576 * (1 + gfc.mode_gr); ++i) {\n if (i < 576 * gfc.mode_gr) {\n primebuff0[i] = 0;\n if (gfc.channels_out == 2)\n primebuff1[i] = 0;\n } else {\n primebuff0[i] = inbuf[0][j];\n if (gfc.channels_out == 2)\n primebuff1[i] = inbuf[1][j];\n ++j;\n }\n }\n /* polyphase filtering / mdct */\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.l3_side.tt[gr][ch].block_type = Encoder.SHORT_TYPE;\n }\n }\n newMDCT.mdct_sub48(gfc, primebuff0, primebuff1);\n\n /* check FFT will not use a negative starting offset */\n assert(576 >= Encoder.FFTOFFSET);\n /* check if we have enough data for FFT */\n assert(gfc.mf_size >= (Encoder.BLKSIZE + gfp.framesize - Encoder.FFTOFFSET));\n /* check if we have enough data for polyphase filterbank */\n assert(gfc.mf_size >= (512 + gfp.framesize - 32));\n }\n\n }\n\n /**\n *
\n     * encodeframe()           Layer 3\n     *\n     * encode a single frame\n     *\n     *\n     *    lame_encode_frame()\n     *\n     *\n     *                           gr 0            gr 1\n     *    inbuf:           |--------------|--------------|--------------|\n     *\n     *\n     *    Polyphase (18 windows, each shifted 32)\n     *    gr 0:\n     *    window1          <----512---.\n     *    window18                 <----512---.\n     *\n     *    gr 1:\n     *    window1                         <----512---.\n     *    window18                                <----512---.\n     *\n     *\n     *\n     *    MDCT output:  |--------------|--------------|--------------|\n     *\n     *    FFT's                    <---------1024---------.\n     *                                             <---------1024-------.\n     *\n     *\n     *\n     *        inbuf = buffer of PCM data size=MP3 framesize\n     *        encoder acts on inbuf[ch][0], but output is delayed by MDCTDELAY\n     *        so the MDCT coefficints are from inbuf[ch][-MDCTDELAY]\n     *\n     *        psy-model FFT has a 1 granule delay, so we feed it data for the\n     *        next granule.\n     *        FFT is centered over granule:  224+576+224\n     *        So FFT starts at:   576-224-MDCTDELAY\n     *\n     *        MPEG2:  FFT ends at:  BLKSIZE+576-224-MDCTDELAY      (1328)\n     *        MPEG1:  FFT ends at:  BLKSIZE+2*576-224-MDCTDELAY    (1904)\n     *\n     *        MPEG2:  polyphase first window:  [0..511]\n     *                          18th window:   [544..1055]          (1056)\n     *        MPEG1:            36th window:   [1120..1631]         (1632)\n     *                data needed:  512+framesize-32\n     *\n     *        A close look newmdct.c shows that the polyphase filterbank\n     *        only uses data from [0..510] for each window.  Perhaps because the window\n     *        used by the filterbank is zero for the last point, so Takehiro's\n     *        code doesn't bother to compute with it.\n     *\n     *        FFT starts at 576-224-MDCTDELAY (304)  = 576-FFTOFFSET\n     *\n     * 
\n */\n\n\n this.lame_encode_mp3_frame = function (gfp, inbuf_l, inbuf_r, mp3buf, mp3bufPos, mp3buf_size) {\n var mp3count;\n var masking_LR = new_array_n([2, 2]);\n /*\n * LR masking &\n * energy\n */\n masking_LR[0][0] = new III_psy_ratio();\n masking_LR[0][1] = new III_psy_ratio();\n masking_LR[1][0] = new III_psy_ratio();\n masking_LR[1][1] = new III_psy_ratio();\n var masking_MS = new_array_n([2, 2]);\n /* MS masking & energy */\n masking_MS[0][0] = new III_psy_ratio();\n masking_MS[0][1] = new III_psy_ratio();\n masking_MS[1][0] = new III_psy_ratio();\n masking_MS[1][1] = new III_psy_ratio();\n //III_psy_ratio masking[][];\n var masking;\n /* pointer to selected maskings */\n var inbuf = [null, null];\n var gfc = gfp.internal_flags;\n\n var tot_ener = new_float_n([2, 4]);\n var ms_ener_ratio = [.5, .5];\n var pe = [[0., 0.], [0., 0.]];\n var pe_MS = [[0., 0.], [0., 0.]];\n\n//float[][] pe_use;\n var pe_use;\n\n var ch, gr;\n\n inbuf[0] = inbuf_l;\n inbuf[1] = inbuf_r;\n\n if (gfc.lame_encode_frame_init == 0) {\n /* first run? */\n lame_encode_frame_init(gfp, inbuf);\n\n }\n\n /********************** padding *****************************/\n /**\n *
\n         * padding method as described in\n         * \"MPEG-Layer3 / Bitstream Syntax and Decoding\"\n         * by Martin Sieler, Ralph Sperschneider\n         *\n         * note: there is no padding for the very first frame\n         *\n         * Robert Hegemann 2000-06-22\n         * 
\n */\n gfc.padding = 0;\n if ((gfc.slot_lag -= gfc.frac_SpF) < 0) {\n gfc.slot_lag += gfp.out_samplerate;\n gfc.padding = 1;\n }\n\n /****************************************\n * Stage 1: psychoacoustic model *\n ****************************************/\n\n if (gfc.psymodel != 0) {\n /*\n * psychoacoustic model psy model has a 1 granule (576) delay that\n * we must compensate for (mt 6/99).\n */\n var ret;\n var bufp = [null, null];\n /* address of beginning of left & right granule */\n var bufpPos = 0;\n /* address of beginning of left & right granule */\n var blocktype = new_int(2);\n\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n\n for (ch = 0; ch < gfc.channels_out; ch++) {\n bufp[ch] = inbuf[ch];\n bufpPos = 576 + gr * 576 - Encoder.FFTOFFSET;\n }\n if (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) {\n ret = psy.L3psycho_anal_vbr(gfp, bufp, bufpPos, gr,\n masking_LR, masking_MS, pe[gr], pe_MS[gr],\n tot_ener[gr], blocktype);\n } else {\n ret = psy.L3psycho_anal_ns(gfp, bufp, bufpPos, gr,\n masking_LR, masking_MS, pe[gr], pe_MS[gr],\n tot_ener[gr], blocktype);\n }\n if (ret != 0)\n return -4;\n\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n ms_ener_ratio[gr] = tot_ener[gr][2] + tot_ener[gr][3];\n if (ms_ener_ratio[gr] > 0)\n ms_ener_ratio[gr] = tot_ener[gr][3] / ms_ener_ratio[gr];\n }\n\n /* block type flags */\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n cod_info.block_type = blocktype[ch];\n cod_info.mixed_block_flag = 0;\n }\n }\n } else {\n /* no psy model */\n for (gr = 0; gr < gfc.mode_gr; gr++)\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.l3_side.tt[gr][ch].block_type = Encoder.NORM_TYPE;\n gfc.l3_side.tt[gr][ch].mixed_block_flag = 0;\n pe_MS[gr][ch] = pe[gr][ch] = 700;\n }\n }\n\n /* auto-adjust of ATH, useful for low volume */\n adjust_ATH(gfc);\n\n /****************************************\n * Stage 2: MDCT *\n ****************************************/\n\n /* polyphase filtering / mdct */\n newMDCT.mdct_sub48(gfc, inbuf[0], inbuf[1]);\n\n /****************************************\n * Stage 3: MS/LR decision *\n ****************************************/\n\n /* Here will be selected MS or LR coding of the 2 stereo channels */\n gfc.mode_ext = Encoder.MPG_MD_LR_LR;\n\n if (gfp.force_ms) {\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n } else if (gfp.mode == MPEGMode.JOINT_STEREO) {\n /*\n * ms_ratio = is scaled, for historical reasons, to look like a\n * ratio of side_channel / total. 0 = signal is 100% mono .5 = L & R\n * uncorrelated\n */\n\n /**\n *
\n             * [0] and [1] are the results for the two granules in MPEG-1,\n             * in MPEG-2 it's only a faked averaging of the same value\n             * _prev is the value of the last granule of the previous frame\n             * _next is the value of the first granule of the next frame\n             * 
\n */\n\n var sum_pe_MS = 0.;\n var sum_pe_LR = 0.;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n sum_pe_MS += pe_MS[gr][ch];\n sum_pe_LR += pe[gr][ch];\n }\n }\n\n /* based on PE: M/S coding would not use much more bits than L/R */\n if (sum_pe_MS <= 1.00 * sum_pe_LR) {\n\n var gi0 = gfc.l3_side.tt[0];\n var gi1 = gfc.l3_side.tt[gfc.mode_gr - 1];\n\n if (gi0[0].block_type == gi0[1].block_type\n && gi1[0].block_type == gi1[1].block_type) {\n\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n }\n }\n }\n\n /* bit and noise allocation */\n if (gfc.mode_ext == MPG_MD_MS_LR) {\n masking = masking_MS;\n /* use MS masking */\n pe_use = pe_MS;\n } else {\n masking = masking_LR;\n /* use LR masking */\n pe_use = pe;\n }\n\n /* copy data for MP3 frame analyzer */\n if (gfp.analysis && gfc.pinfo != null) {\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.pinfo.ms_ratio[gr] = gfc.ms_ratio[gr];\n gfc.pinfo.ms_ener_ratio[gr] = ms_ener_ratio[gr];\n gfc.pinfo.blocktype[gr][ch] = gfc.l3_side.tt[gr][ch].block_type;\n gfc.pinfo.pe[gr][ch] = pe_use[gr][ch];\n System.arraycopy(gfc.l3_side.tt[gr][ch].xr, 0,\n gfc.pinfo.xr[gr][ch], 0, 576);\n /*\n * in psymodel, LR and MS data was stored in pinfo. switch\n * to MS data:\n */\n if (gfc.mode_ext == MPG_MD_MS_LR) {\n gfc.pinfo.ers[gr][ch] = gfc.pinfo.ers[gr][ch + 2];\n System.arraycopy(gfc.pinfo.energy[gr][ch + 2], 0,\n gfc.pinfo.energy[gr][ch], 0,\n gfc.pinfo.energy[gr][ch].length);\n }\n }\n }\n }\n\n /****************************************\n * Stage 4: quantization loop *\n ****************************************/\n\n if (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_abr) {\n\n var i;\n var f;\n\n for (i = 0; i < 18; i++)\n gfc.nsPsy.pefirbuf[i] = gfc.nsPsy.pefirbuf[i + 1];\n\n f = 0.0;\n for (gr = 0; gr < gfc.mode_gr; gr++)\n for (ch = 0; ch < gfc.channels_out; ch++)\n f += pe_use[gr][ch];\n gfc.nsPsy.pefirbuf[18] = f;\n\n f = gfc.nsPsy.pefirbuf[9];\n for (i = 0; i < 9; i++)\n f += (gfc.nsPsy.pefirbuf[i] + gfc.nsPsy.pefirbuf[18 - i])\n * Encoder.fircoef[i];\n\n f = (670 * 5 * gfc.mode_gr * gfc.channels_out) / f;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n pe_use[gr][ch] *= f;\n }\n }\n }\n gfc.iteration_loop.iteration_loop(gfp, pe_use, ms_ener_ratio, masking);\n\n /****************************************\n * Stage 5: bitstream formatting *\n ****************************************/\n\n /* write the frame to the bitstream */\n bs.format_bitstream(gfp);\n\n /* copy mp3 bit buffer into array */\n mp3count = bs.copy_buffer(gfc, mp3buf, mp3bufPos, mp3buf_size, 1);\n\n if (gfp.bWriteVbrTag)\n vbr.addVbrFrame(gfp);\n\n if (gfp.analysis && gfc.pinfo != null) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var j;\n for (j = 0; j < FFTOFFSET; j++)\n gfc.pinfo.pcmdata[ch][j] = gfc.pinfo.pcmdata[ch][j\n + gfp.framesize];\n for (j = FFTOFFSET; j < 1600; j++) {\n gfc.pinfo.pcmdata[ch][j] = inbuf[ch][j - FFTOFFSET];\n }\n }\n qupvt.set_frame_pinfo(gfp, masking);\n }\n\n updateStats(gfc);\n\n return mp3count;\n }\n}\n\n\nmodule.exports = Encoder;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\nfunction FFT() {\n\n var window = new_float(Encoder.BLKSIZE);\n var window_s = new_float(Encoder.BLKSIZE_s / 2);\n\n var costab = [\n 9.238795325112867e-01, 3.826834323650898e-01,\n 9.951847266721969e-01, 9.801714032956060e-02,\n 9.996988186962042e-01, 2.454122852291229e-02,\n 9.999811752826011e-01, 6.135884649154475e-03\n ];\n\n function fht(fz, fzPos, n) {\n var tri = 0;\n var k4;\n var fi;\n var gi;\n\n n <<= 1;\n /* to get BLKSIZE, because of 3DNow! ASM routine */\n var fn = fzPos + n;\n k4 = 4;\n do {\n var s1, c1;\n var i, k1, k2, k3, kx;\n kx = k4 >> 1;\n k1 = k4;\n k2 = k4 << 1;\n k3 = k2 + k1;\n k4 = k2 << 1;\n fi = fzPos;\n gi = fi + kx;\n do {\n var f0, f1, f2, f3;\n f1 = fz[fi + 0] - fz[fi + k1];\n f0 = fz[fi + 0] + fz[fi + k1];\n f3 = fz[fi + k2] - fz[fi + k3];\n f2 = fz[fi + k2] + fz[fi + k3];\n fz[fi + k2] = f0 - f2;\n fz[fi + 0] = f0 + f2;\n fz[fi + k3] = f1 - f3;\n fz[fi + k1] = f1 + f3;\n f1 = fz[gi + 0] - fz[gi + k1];\n f0 = fz[gi + 0] + fz[gi + k1];\n f3 = (Util.SQRT2 * fz[gi + k3]);\n f2 = (Util.SQRT2 * fz[gi + k2]);\n fz[gi + k2] = f0 - f2;\n fz[gi + 0] = f0 + f2;\n fz[gi + k3] = f1 - f3;\n fz[gi + k1] = f1 + f3;\n gi += k4;\n fi += k4;\n } while (fi < fn);\n c1 = costab[tri + 0];\n s1 = costab[tri + 1];\n for (i = 1; i < kx; i++) {\n var c2, s2;\n c2 = 1 - (2 * s1) * s1;\n s2 = (2 * s1) * c1;\n fi = fzPos + i;\n gi = fzPos + k1 - i;\n do {\n var a, b, g0, f0, f1, g1, f2, g2, f3, g3;\n b = s2 * fz[fi + k1] - c2 * fz[gi + k1];\n a = c2 * fz[fi + k1] + s2 * fz[gi + k1];\n f1 = fz[fi + 0] - a;\n f0 = fz[fi + 0] + a;\n g1 = fz[gi + 0] - b;\n g0 = fz[gi + 0] + b;\n b = s2 * fz[fi + k3] - c2 * fz[gi + k3];\n a = c2 * fz[fi + k3] + s2 * fz[gi + k3];\n f3 = fz[fi + k2] - a;\n f2 = fz[fi + k2] + a;\n g3 = fz[gi + k2] - b;\n g2 = fz[gi + k2] + b;\n b = s1 * f2 - c1 * g3;\n a = c1 * f2 + s1 * g3;\n fz[fi + k2] = f0 - a;\n fz[fi + 0] = f0 + a;\n fz[gi + k3] = g1 - b;\n fz[gi + k1] = g1 + b;\n b = c1 * g2 - s1 * f3;\n a = s1 * g2 + c1 * f3;\n fz[gi + k2] = g0 - a;\n fz[gi + 0] = g0 + a;\n fz[fi + k3] = f1 - b;\n fz[fi + k1] = f1 + b;\n gi += k4;\n fi += k4;\n } while (fi < fn);\n c2 = c1;\n c1 = c2 * costab[tri + 0] - s1 * costab[tri + 1];\n s1 = c2 * costab[tri + 1] + s1 * costab[tri + 0];\n }\n tri += 2;\n } while (k4 < n);\n }\n\n var rv_tbl = [0x00, 0x80, 0x40,\n 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10,\n 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70,\n 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28,\n 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58,\n 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04,\n 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64,\n 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34,\n 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c,\n 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c,\n 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c,\n 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22,\n 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52,\n 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a,\n 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a,\n 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a,\n 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46,\n 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16,\n 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76,\n 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e,\n 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e,\n 0xde, 0x3e, 0xbe, 0x7e, 0xfe];\n\n this.fft_short = function (gfc, x_real, chn, buffer, bufPos) {\n for (var b = 0; b < 3; b++) {\n var x = Encoder.BLKSIZE_s / 2;\n var k = 0xffff & ((576 / 3) * (b + 1));\n var j = Encoder.BLKSIZE_s / 8 - 1;\n do {\n var f0, f1, f2, f3, w;\n var i = rv_tbl[j << 2] & 0xff;\n\n f0 = window_s[i] * buffer[chn][bufPos + i + k];\n w = window_s[0x7f - i] * buffer[chn][bufPos + i + k + 0x80];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window_s[i + 0x40] * buffer[chn][bufPos + i + k + 0x40];\n w = window_s[0x3f - i] * buffer[chn][bufPos + i + k + 0xc0];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x -= 4;\n x_real[b][x + 0] = f0 + f2;\n x_real[b][x + 2] = f0 - f2;\n x_real[b][x + 1] = f1 + f3;\n x_real[b][x + 3] = f1 - f3;\n\n f0 = window_s[i + 0x01] * buffer[chn][bufPos + i + k + 0x01];\n w = window_s[0x7e - i] * buffer[chn][bufPos + i + k + 0x81];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window_s[i + 0x41] * buffer[chn][bufPos + i + k + 0x41];\n w = window_s[0x3e - i] * buffer[chn][bufPos + i + k + 0xc1];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 0] = f0 + f2;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 2] = f0 - f2;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 1] = f1 + f3;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 3] = f1 - f3;\n } while (--j >= 0);\n\n fht(x_real[b], x, Encoder.BLKSIZE_s / 2);\n /* BLKSIZE_s/2 because of 3DNow! ASM routine */\n /* BLKSIZE/2 because of 3DNow! ASM routine */\n }\n }\n\n this.fft_long = function (gfc, y, chn, buffer, bufPos) {\n var jj = Encoder.BLKSIZE / 8 - 1;\n var x = Encoder.BLKSIZE / 2;\n\n do {\n var f0, f1, f2, f3, w;\n var i = rv_tbl[jj] & 0xff;\n f0 = window[i] * buffer[chn][bufPos + i];\n w = window[i + 0x200] * buffer[chn][bufPos + i + 0x200];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window[i + 0x100] * buffer[chn][bufPos + i + 0x100];\n w = window[i + 0x300] * buffer[chn][bufPos + i + 0x300];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x -= 4;\n y[x + 0] = f0 + f2;\n y[x + 2] = f0 - f2;\n y[x + 1] = f1 + f3;\n y[x + 3] = f1 - f3;\n\n f0 = window[i + 0x001] * buffer[chn][bufPos + i + 0x001];\n w = window[i + 0x201] * buffer[chn][bufPos + i + 0x201];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window[i + 0x101] * buffer[chn][bufPos + i + 0x101];\n w = window[i + 0x301] * buffer[chn][bufPos + i + 0x301];\n f3 = f2 - w;\n f2 = f2 + w;\n\n y[x + Encoder.BLKSIZE / 2 + 0] = f0 + f2;\n y[x + Encoder.BLKSIZE / 2 + 2] = f0 - f2;\n y[x + Encoder.BLKSIZE / 2 + 1] = f1 + f3;\n y[x + Encoder.BLKSIZE / 2 + 3] = f1 - f3;\n } while (--jj >= 0);\n\n fht(y, x, Encoder.BLKSIZE / 2);\n /* BLKSIZE/2 because of 3DNow! ASM routine */\n }\n\n this.init_fft = function (gfc) {\n /* The type of window used here will make no real difference, but */\n /*\n * in the interest of merging nspsytune stuff - switch to blackman\n * window\n */\n for (var i = 0; i < Encoder.BLKSIZE; i++)\n /* blackman window */\n window[i] = (0.42 - 0.5 * Math.cos(2 * Math.PI * (i + .5)\n / Encoder.BLKSIZE) + 0.08 * Math.cos(4 * Math.PI * (i + .5)\n / Encoder.BLKSIZE));\n\n for (var i = 0; i < Encoder.BLKSIZE_s / 2; i++)\n window_s[i] = (0.5 * (1.0 - Math.cos(2.0 * Math.PI\n * (i + 0.5) / Encoder.BLKSIZE_s)));\n\n }\n\n}\n\nmodule.exports = FFT;\n","/*\n * psymodel.c\n *\n * Copyright (c) 1999-2000 Mark Taylor\n * Copyright (c) 2001-2002 Naoki Shibata\n * Copyright (c) 2000-2003 Takehiro Tominaga\n * Copyright (c) 2000-2008 Robert Hegemann\n * Copyright (c) 2000-2005 Gabriel Bouvigne\n * Copyright (c) 2000-2005 Alexander Leidinger\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: PsyModel.java,v 1.27 2011/05/24 20:48:06 kenchis Exp $ */\n\n\n/*\n PSYCHO ACOUSTICS\n\n\n This routine computes the psycho acoustics, delayed by one granule.\n\n Input: buffer of PCM data (1024 samples).\n\n This window should be centered over the 576 sample granule window.\n The routine will compute the psycho acoustics for\n this granule, but return the psycho acoustics computed\n for the *previous* granule. This is because the block\n type of the previous granule can only be determined\n after we have computed the psycho acoustics for the following\n granule.\n\n Output: maskings and energies for each scalefactor band.\n block type, PE, and some correlation measures.\n The PE is used by CBR modes to determine if extra bits\n from the bit reservoir should be used. The correlation\n measures are used to determine mid/side or regular stereo.\n */\n/*\n Notation:\n\n barks: a non-linear frequency scale. Mapping from frequency to\n barks is given by freq2bark()\n\n scalefactor bands: The spectrum (frequencies) are broken into\n SBMAX \"scalefactor bands\". Thes bands\n are determined by the MPEG ISO spec. In\n the noise shaping/quantization code, we allocate\n bits among the partition bands to achieve the\n best possible quality\n\n partition bands: The spectrum is also broken into about\n 64 \"partition bands\". Each partition\n band is about .34 barks wide. There are about 2-5\n partition bands for each scalefactor band.\n\n LAME computes all psycho acoustic information for each partition\n band. Then at the end of the computations, this information\n is mapped to scalefactor bands. The energy in each scalefactor\n band is taken as the sum of the energy in all partition bands\n which overlap the scalefactor band. The maskings can be computed\n in the same way (and thus represent the average masking in that band)\n or by taking the minmum value multiplied by the number of\n partition bands used (which represents a minimum masking in that band).\n */\n/*\n The general outline is as follows:\n\n 1. compute the energy in each partition band\n 2. compute the tonality in each partition band\n 3. compute the strength of each partion band \"masker\"\n 4. compute the masking (via the spreading function applied to each masker)\n 5. Modifications for mid/side masking.\n\n Each partition band is considiered a \"masker\". The strength\n of the i'th masker in band j is given by:\n\n s3(bark(i)-bark(j))*strength(i)\n\n The strength of the masker is a function of the energy and tonality.\n The more tonal, the less masking. LAME uses a simple linear formula\n (controlled by NMT and TMN) which says the strength is given by the\n energy divided by a linear function of the tonality.\n */\n/*\n s3() is the \"spreading function\". It is given by a formula\n determined via listening tests.\n\n The total masking in the j'th partition band is the sum over\n all maskings i. It is thus given by the convolution of\n the strength with s3(), the \"spreading function.\"\n\n masking(j) = sum_over_i s3(i-j)*strength(i) = s3 o strength\n\n where \"o\" = convolution operator. s3 is given by a formula determined\n via listening tests. It is normalized so that s3 o 1 = 1.\n\n Note: instead of a simple convolution, LAME also has the\n option of using \"additive masking\"\n\n The most critical part is step 2, computing the tonality of each\n partition band. LAME has two tonality estimators. The first\n is based on the ISO spec, and measures how predictiable the\n signal is over time. The more predictable, the more tonal.\n The second measure is based on looking at the spectrum of\n a single granule. The more peaky the spectrum, the more\n tonal. By most indications, the latter approach is better.\n\n Finally, in step 5, the maskings for the mid and side\n channel are possibly increased. Under certain circumstances,\n noise in the mid & side channels is assumed to also\n be masked by strong maskers in the L or R channels.\n\n\n Other data computed by the psy-model:\n\n ms_ratio side-channel / mid-channel masking ratio (for previous granule)\n ms_ratio_next side-channel / mid-channel masking ratio for this granule\n\n percep_entropy[2] L and R values (prev granule) of PE - A measure of how\n much pre-echo is in the previous granule\n percep_entropy_MS[2] mid and side channel values (prev granule) of percep_entropy\n energy[4] L,R,M,S energy in each channel, prev granule\n blocktype_d[2] block type to use for previous granule\n */\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar FFT = require(\"./FFT.js\");\nvar Encoder = require(\"./Encoder.js\");\n\nfunction PsyModel() {\n\n var fft = new FFT();\n\n var LOG10 = 2.30258509299404568402;\n\n var rpelev = 2;\n var rpelev2 = 16;\n var rpelev_s = 2;\n var rpelev2_s = 16;\n\n /* size of each partition band, in barks: */\n var DELBARK = .34;\n\n /* tuned for output level (sensitive to energy scale) */\n var VO_SCALE = (1. / (14752 * 14752) / (Encoder.BLKSIZE / 2));\n\n var temporalmask_sustain_sec = 0.01;\n\n var NS_PREECHO_ATT0 = 0.8;\n var NS_PREECHO_ATT1 = 0.6;\n var NS_PREECHO_ATT2 = 0.3;\n\n var NS_MSFIX = 3.5;\n\n var NSATTACKTHRE = 4.4;\n var NSATTACKTHRE_S = 25;\n\n var NSFIRLEN = 21;\n\n /* size of each partition band, in barks: */\n var LN_TO_LOG10 = 0.2302585093;\n\n function NON_LINEAR_SCALE_ENERGY(x) {\n return x;\n }\n\n /**\n *
\n     *       L3psycho_anal.  Compute psycho acoustics.\n     *\n     *       Data returned to the calling program must be delayed by one\n     *       granule.\n     *\n     *       This is done in two places.\n     *       If we do not need to know the blocktype, the copying\n     *       can be done here at the top of the program: we copy the data for\n     *       the last granule (computed during the last call) before it is\n     *       overwritten with the new data.  It looks like this:\n     *\n     *       0. static psymodel_data\n     *       1. calling_program_data = psymodel_data\n     *       2. compute psymodel_data\n     *\n     *       For data which needs to know the blocktype, the copying must be\n     *       done at the end of this loop, and the old values must be saved:\n     *\n     *       0. static psymodel_data_old\n     *       1. compute psymodel_data\n     *       2. compute possible block type of this granule\n     *       3. compute final block type of previous granule based on #2.\n     *       4. calling_program_data = psymodel_data_old\n     *       5. psymodel_data_old = psymodel_data\n     *     psycho_loudness_approx\n     *       jd - 2001 mar 12\n     *    in:  energy   - BLKSIZE/2 elements of frequency magnitudes ^ 2\n     *         gfp      - uses out_samplerate, ATHtype (also needed for ATHformula)\n     *    returns: loudness^2 approximation, a positive value roughly tuned for a value\n     *             of 1.0 for signals near clipping.\n     *    notes:   When calibrated, feeding this function binary white noise at sample\n     *             values +32767 or -32768 should return values that approach 3.\n     *             ATHformula is used to approximate an equal loudness curve.\n     *    future:  Data indicates that the shape of the equal loudness curve varies\n     *             with intensity.  This function might be improved by using an equal\n     *             loudness curve shaped for typical playback levels (instead of the\n     *             ATH, that is shaped for the threshold).  A flexible realization might\n     *             simply bend the existing ATH curve to achieve the desired shape.\n     *             However, the potential gain may not be enough to justify an effort.\n     * 
\n */\n function psycho_loudness_approx(energy, gfc) {\n var loudness_power = 0.0;\n /* apply weights to power in freq. bands */\n for (var i = 0; i < Encoder.BLKSIZE / 2; ++i)\n loudness_power += energy[i] * gfc.ATH.eql_w[i];\n loudness_power *= VO_SCALE;\n\n return loudness_power;\n }\n\n function compute_ffts(gfp, fftenergy, fftenergy_s, wsamp_l, wsamp_lPos, wsamp_s, wsamp_sPos, gr_out, chn, buffer, bufPos) {\n var gfc = gfp.internal_flags;\n if (chn < 2) {\n fft.fft_long(gfc, wsamp_l[wsamp_lPos], chn, buffer, bufPos);\n fft.fft_short(gfc, wsamp_s[wsamp_sPos], chn, buffer, bufPos);\n }\n /* FFT data for mid and side channel is derived from L & R */\n else if (chn == 2) {\n for (var j = Encoder.BLKSIZE - 1; j >= 0; --j) {\n var l = wsamp_l[wsamp_lPos + 0][j];\n var r = wsamp_l[wsamp_lPos + 1][j];\n wsamp_l[wsamp_lPos + 0][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_l[wsamp_lPos + 1][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n for (var b = 2; b >= 0; --b) {\n for (var j = Encoder.BLKSIZE_s - 1; j >= 0; --j) {\n var l = wsamp_s[wsamp_sPos + 0][b][j];\n var r = wsamp_s[wsamp_sPos + 1][b][j];\n wsamp_s[wsamp_sPos + 0][b][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_s[wsamp_sPos + 1][b][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy[0] = NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos + 0][0]);\n fftenergy[0] *= fftenergy[0];\n\n for (var j = Encoder.BLKSIZE / 2 - 1; j >= 0; --j) {\n var re = (wsamp_l[wsamp_lPos + 0])[Encoder.BLKSIZE / 2 - j];\n var im = (wsamp_l[wsamp_lPos + 0])[Encoder.BLKSIZE / 2 + j];\n fftenergy[Encoder.BLKSIZE / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n for (var b = 2; b >= 0; --b) {\n fftenergy_s[b][0] = (wsamp_s[wsamp_sPos + 0])[b][0];\n fftenergy_s[b][0] *= fftenergy_s[b][0];\n for (var j = Encoder.BLKSIZE_s / 2 - 1; j >= 0; --j) {\n var re = (wsamp_s[wsamp_sPos + 0])[b][Encoder.BLKSIZE_s\n / 2 - j];\n var im = (wsamp_s[wsamp_sPos + 0])[b][Encoder.BLKSIZE_s\n / 2 + j];\n fftenergy_s[b][Encoder.BLKSIZE_s / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n }\n /* total energy */\n {\n var totalenergy = 0.0;\n for (var j = 11; j < Encoder.HBLKSIZE; j++)\n totalenergy += fftenergy[j];\n\n gfc.tot_ener[chn] = totalenergy;\n }\n\n if (gfp.analysis) {\n for (var j = 0; j < Encoder.HBLKSIZE; j++) {\n gfc.pinfo.energy[gr_out][chn][j] = gfc.pinfo.energy_save[chn][j];\n gfc.pinfo.energy_save[chn][j] = fftenergy[j];\n }\n gfc.pinfo.pe[gr_out][chn] = gfc.pe[chn];\n }\n\n /*********************************************************************\n * compute loudness approximation (used for ATH auto-level adjustment)\n *********************************************************************/\n if (gfp.athaa_loudapprox == 2 && chn < 2) {\n // no loudness for mid/side ch\n gfc.loudness_sq[gr_out][chn] = gfc.loudness_sq_save[chn];\n gfc.loudness_sq_save[chn] = psycho_loudness_approx(fftenergy, gfc);\n }\n }\n\n /* mask_add optimization */\n /* init the limit values used to avoid computing log in mask_add when it is not necessary */\n\n /**\n *
\n     *  For example, with i = 10*log10(m2/m1)/10*16         (= log10(m2/m1)*16)\n     *\n     * abs(i)>8 is equivalent (as i is an integer) to\n     * abs(i)>=9\n     * i>=9 || i<=-9\n     * equivalent to (as i is the biggest integer smaller than log10(m2/m1)*16\n     * or the smallest integer bigger than log10(m2/m1)*16 depending on the sign of log10(m2/m1)*16)\n     * log10(m2/m1)>=9/16 || log10(m2/m1)<=-9/16\n     * exp10 is strictly increasing thus this is equivalent to\n     * m2/m1 >= 10^(9/16) || m2/m1<=10^(-9/16) which are comparisons to constants\n     * 
\n */\n\n /**\n * as in if(i>8)\n */\n var I1LIMIT = 8;\n /**\n * as in if(i>24) . changed 23\n */\n var I2LIMIT = 23;\n /**\n * as in if(m<15)\n */\n var MLIMIT = 15;\n\n var ma_max_i1;\n var ma_max_i2;\n var ma_max_m;\n\n /**\n * This is the masking table:
\n * According to tonality, values are going from 0dB (TMN) to 9.3dB (NMT).
\n * After additive masking computation, 8dB are added, so final values are\n * going from 8dB to 17.3dB\n *\n * pow(10, -0.0..-0.6)\n */\n var tab = [1.0, 0.79433, 0.63096, 0.63096,\n 0.63096, 0.63096, 0.63096, 0.25119, 0.11749];\n\n function init_mask_add_max_values() {\n ma_max_i1 = Math.pow(10, (I1LIMIT + 1) / 16.0);\n ma_max_i2 = Math.pow(10, (I2LIMIT + 1) / 16.0);\n ma_max_m = Math.pow(10, (MLIMIT) / 10.0);\n }\n\n var table1 = [3.3246 * 3.3246,\n 3.23837 * 3.23837, 3.15437 * 3.15437, 3.00412 * 3.00412,\n 2.86103 * 2.86103, 2.65407 * 2.65407, 2.46209 * 2.46209,\n 2.284 * 2.284, 2.11879 * 2.11879, 1.96552 * 1.96552,\n 1.82335 * 1.82335, 1.69146 * 1.69146, 1.56911 * 1.56911,\n 1.46658 * 1.46658, 1.37074 * 1.37074, 1.31036 * 1.31036,\n 1.25264 * 1.25264, 1.20648 * 1.20648, 1.16203 * 1.16203,\n 1.12765 * 1.12765, 1.09428 * 1.09428, 1.0659 * 1.0659,\n 1.03826 * 1.03826, 1.01895 * 1.01895, 1];\n\n var table2 = [1.33352 * 1.33352,\n 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497,\n 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382,\n 1.22321 * 1.22321, 1.14758 * 1.14758, 1];\n\n var table3 = [2.35364 * 2.35364,\n 2.29259 * 2.29259, 2.23313 * 2.23313, 2.12675 * 2.12675,\n 2.02545 * 2.02545, 1.87894 * 1.87894, 1.74303 * 1.74303,\n 1.61695 * 1.61695, 1.49999 * 1.49999, 1.39148 * 1.39148,\n 1.29083 * 1.29083, 1.19746 * 1.19746, 1.11084 * 1.11084,\n 1.03826 * 1.03826];\n\n /**\n * addition of simultaneous masking Naoki Shibata 2000/7\n */\n function mask_add(m1, m2, kk, b, gfc, shortblock) {\n var ratio;\n\n if (m2 > m1) {\n if (m2 < (m1 * ma_max_i2))\n ratio = m2 / m1;\n else\n return (m1 + m2);\n } else {\n if (m1 >= (m2 * ma_max_i2))\n return (m1 + m2);\n ratio = m1 / m2;\n }\n\n /* Should always be true, just checking */\n assert(m1 >= 0);\n assert(m2 >= 0);\n\n m1 += m2;\n //if (((long)(b + 3) & 0xffffffff) <= 3 + 3) {\n if ((b + 3) <= 3 + 3) {\n /* approximately, 1 bark = 3 partitions */\n /* 65% of the cases */\n /* originally 'if(i > 8)' */\n if (ratio >= ma_max_i1) {\n /* 43% of the total */\n return m1;\n }\n\n /* 22% of the total */\n var i = 0 | (Util.FAST_LOG10_X(ratio, 16.0));\n return m1 * table2[i];\n }\n\n /**\n *
\n         * m<15 equ log10((m1+m2)/gfc.ATH.cb[k])<1.5\n         * equ (m1+m2)/gfc.ATH.cb[k]<10^1.5\n         * equ (m1+m2)<10^1.5 * gfc.ATH.cb[k]\n         * 
\n */\n var i = 0 | Util.FAST_LOG10_X(ratio, 16.0);\n if (shortblock != 0) {\n m2 = gfc.ATH.cb_s[kk] * gfc.ATH.adjust;\n } else {\n m2 = gfc.ATH.cb_l[kk] * gfc.ATH.adjust;\n }\n assert(m2 >= 0);\n if (m1 < ma_max_m * m2) {\n /* 3% of the total */\n /* Originally if (m > 0) { */\n if (m1 > m2) {\n var f, r;\n\n f = 1.0;\n if (i <= 13)\n f = table3[i];\n\n r = Util.FAST_LOG10_X(m1 / m2, 10.0 / 15.0);\n return m1 * ((table1[i] - f) * r + f);\n }\n\n if (i > 13)\n return m1;\n\n return m1 * table3[i];\n }\n\n /* 10% of total */\n return m1 * table1[i];\n }\n\n var table2_ = [1.33352 * 1.33352,\n 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497,\n 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382,\n 1.22321 * 1.22321, 1.14758 * 1.14758, 1];\n\n /**\n * addition of simultaneous masking Naoki Shibata 2000/7\n */\n function vbrpsy_mask_add(m1, m2, b) {\n var ratio;\n\n if (m1 < 0) {\n m1 = 0;\n }\n if (m2 < 0) {\n m2 = 0;\n }\n if (m1 <= 0) {\n return m2;\n }\n if (m2 <= 0) {\n return m1;\n }\n if (m2 > m1) {\n ratio = m2 / m1;\n } else {\n ratio = m1 / m2;\n }\n if (-2 <= b && b <= 2) {\n /* approximately, 1 bark = 3 partitions */\n /* originally 'if(i > 8)' */\n if (ratio >= ma_max_i1) {\n return m1 + m2;\n } else {\n var i = 0 | (Util.FAST_LOG10_X(ratio, 16.0));\n return (m1 + m2) * table2_[i];\n }\n }\n if (ratio < ma_max_i2) {\n return m1 + m2;\n }\n if (m1 < m2) {\n m1 = m2;\n }\n return m1;\n }\n\n /**\n * compute interchannel masking effects\n */\n function calc_interchannel_masking(gfp, ratio) {\n var gfc = gfp.internal_flags;\n if (gfc.channels_out > 1) {\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n var l = gfc.thm[0].l[sb];\n var r = gfc.thm[1].l[sb];\n gfc.thm[0].l[sb] += r * ratio;\n gfc.thm[1].l[sb] += l * ratio;\n }\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var l = gfc.thm[0].s[sb][sblock];\n var r = gfc.thm[1].s[sb][sblock];\n gfc.thm[0].s[sb][sblock] += r * ratio;\n gfc.thm[1].s[sb][sblock] += l * ratio;\n }\n }\n }\n }\n\n /**\n * compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper\n */\n function msfix1(gfc) {\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n /* use this fix if L & R masking differs by 2db or less */\n /* if db = 10*log10(x2/x1) < 2 */\n /* if (x2 < 1.58*x1) { */\n if (gfc.thm[0].l[sb] > 1.58 * gfc.thm[1].l[sb]\n || gfc.thm[1].l[sb] > 1.58 * gfc.thm[0].l[sb])\n continue;\n var mld = gfc.mld_l[sb] * gfc.en[3].l[sb];\n var rmid = Math.max(gfc.thm[2].l[sb],\n Math.min(gfc.thm[3].l[sb], mld));\n\n mld = gfc.mld_l[sb] * gfc.en[2].l[sb];\n var rside = Math.max(gfc.thm[3].l[sb],\n Math.min(gfc.thm[2].l[sb], mld));\n gfc.thm[2].l[sb] = rmid;\n gfc.thm[3].l[sb] = rside;\n }\n\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n if (gfc.thm[0].s[sb][sblock] > 1.58 * gfc.thm[1].s[sb][sblock]\n || gfc.thm[1].s[sb][sblock] > 1.58 * gfc.thm[0].s[sb][sblock])\n continue;\n var mld = gfc.mld_s[sb] * gfc.en[3].s[sb][sblock];\n var rmid = Math.max(gfc.thm[2].s[sb][sblock],\n Math.min(gfc.thm[3].s[sb][sblock], mld));\n\n mld = gfc.mld_s[sb] * gfc.en[2].s[sb][sblock];\n var rside = Math.max(gfc.thm[3].s[sb][sblock],\n Math.min(gfc.thm[2].s[sb][sblock], mld));\n\n gfc.thm[2].s[sb][sblock] = rmid;\n gfc.thm[3].s[sb][sblock] = rside;\n }\n }\n }\n\n /**\n * Adjust M/S maskings if user set \"msfix\"\n *\n * Naoki Shibata 2000\n */\n function ns_msfix(gfc, msfix, athadjust) {\n var msfix2 = msfix;\n var athlower = Math.pow(10, athadjust);\n\n msfix *= 2.0;\n msfix2 *= 2.0;\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n var thmLR, thmM, thmS, ath;\n ath = (gfc.ATH.cb_l[gfc.bm_l[sb]]) * athlower;\n thmLR = Math.min(Math.max(gfc.thm[0].l[sb], ath),\n Math.max(gfc.thm[1].l[sb], ath));\n thmM = Math.max(gfc.thm[2].l[sb], ath);\n thmS = Math.max(gfc.thm[3].l[sb], ath);\n if (thmLR * msfix < thmM + thmS) {\n var f = thmLR * msfix2 / (thmM + thmS);\n thmM *= f;\n thmS *= f;\n assert(thmM + thmS > 0);\n }\n gfc.thm[2].l[sb] = Math.min(thmM, gfc.thm[2].l[sb]);\n gfc.thm[3].l[sb] = Math.min(thmS, gfc.thm[3].l[sb]);\n }\n\n athlower *= ( Encoder.BLKSIZE_s / Encoder.BLKSIZE);\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var thmLR, thmM, thmS, ath;\n ath = (gfc.ATH.cb_s[gfc.bm_s[sb]]) * athlower;\n thmLR = Math.min(Math.max(gfc.thm[0].s[sb][sblock], ath),\n Math.max(gfc.thm[1].s[sb][sblock], ath));\n thmM = Math.max(gfc.thm[2].s[sb][sblock], ath);\n thmS = Math.max(gfc.thm[3].s[sb][sblock], ath);\n\n if (thmLR * msfix < thmM + thmS) {\n var f = thmLR * msfix / (thmM + thmS);\n thmM *= f;\n thmS *= f;\n assert(thmM + thmS > 0);\n }\n gfc.thm[2].s[sb][sblock] = Math.min(gfc.thm[2].s[sb][sblock],\n thmM);\n gfc.thm[3].s[sb][sblock] = Math.min(gfc.thm[3].s[sb][sblock],\n thmS);\n }\n }\n }\n\n /**\n * short block threshold calculation (part 2)\n *\n * partition band bo_s[sfb] is at the transition from scalefactor band sfb\n * to the next one sfb+1; enn and thmm have to be split between them\n */\n function convert_partition2scalefac_s(gfc, eb, thr, chn, sblock) {\n var sb, b;\n var enn = 0.0;\n var thmm = 0.0;\n for (sb = b = 0; sb < Encoder.SBMAX_s; ++b, ++sb) {\n var bo_s_sb = gfc.bo_s[sb];\n var npart_s = gfc.npart_s;\n var b_lim = bo_s_sb < npart_s ? bo_s_sb : npart_s;\n while (b < b_lim) {\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n enn += eb[b];\n thmm += thr[b];\n b++;\n }\n gfc.en[chn].s[sb][sblock] = enn;\n gfc.thm[chn].s[sb][sblock] = thmm;\n\n if (b >= npart_s) {\n ++sb;\n break;\n }\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n {\n /* at transition sfb . sfb+1 */\n var w_curr = gfc.PSY.bo_s_weight[sb];\n var w_next = 1.0 - w_curr;\n enn = w_curr * eb[b];\n thmm = w_curr * thr[b];\n gfc.en[chn].s[sb][sblock] += enn;\n gfc.thm[chn].s[sb][sblock] += thmm;\n enn = w_next * eb[b];\n thmm = w_next * thr[b];\n }\n }\n /* zero initialize the rest */\n for (; sb < Encoder.SBMAX_s; ++sb) {\n gfc.en[chn].s[sb][sblock] = 0;\n gfc.thm[chn].s[sb][sblock] = 0;\n }\n }\n\n /**\n * longblock threshold calculation (part 2)\n */\n function convert_partition2scalefac_l(gfc, eb, thr, chn) {\n var sb, b;\n var enn = 0.0;\n var thmm = 0.0;\n for (sb = b = 0; sb < Encoder.SBMAX_l; ++b, ++sb) {\n var bo_l_sb = gfc.bo_l[sb];\n var npart_l = gfc.npart_l;\n var b_lim = bo_l_sb < npart_l ? bo_l_sb : npart_l;\n while (b < b_lim) {\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n enn += eb[b];\n thmm += thr[b];\n b++;\n }\n gfc.en[chn].l[sb] = enn;\n gfc.thm[chn].l[sb] = thmm;\n\n if (b >= npart_l) {\n ++sb;\n break;\n }\n assert(eb[b] >= 0);\n assert(thr[b] >= 0);\n {\n /* at transition sfb . sfb+1 */\n var w_curr = gfc.PSY.bo_l_weight[sb];\n var w_next = 1.0 - w_curr;\n enn = w_curr * eb[b];\n thmm = w_curr * thr[b];\n gfc.en[chn].l[sb] += enn;\n gfc.thm[chn].l[sb] += thmm;\n enn = w_next * eb[b];\n thmm = w_next * thr[b];\n }\n }\n /* zero initialize the rest */\n for (; sb < Encoder.SBMAX_l; ++sb) {\n gfc.en[chn].l[sb] = 0;\n gfc.thm[chn].l[sb] = 0;\n }\n }\n\n function compute_masking_s(gfp, fftenergy_s, eb, thr, chn, sblock) {\n var gfc = gfp.internal_flags;\n var j, b;\n\n for (b = j = 0; b < gfc.npart_s; ++b) {\n var ebb = 0, m = 0;\n var n = gfc.numlines_s[b];\n for (var i = 0; i < n; ++i, ++j) {\n var el = fftenergy_s[sblock][j];\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n }\n assert(b == gfc.npart_s);\n assert(j == 129);\n for (j = b = 0; b < gfc.npart_s; b++) {\n var kk = gfc.s3ind_s[b][0];\n var ecb = gfc.s3_ss[j++] * eb[kk];\n ++kk;\n while (kk <= gfc.s3ind_s[b][1]) {\n ecb += gfc.s3_ss[j] * eb[kk];\n ++j;\n ++kk;\n }\n\n { /* limit calculated threshold by previous granule */\n var x = rpelev_s * gfc.nb_s1[chn][b];\n thr[b] = Math.min(ecb, x);\n }\n if (gfc.blocktype_old[chn & 1] == Encoder.SHORT_TYPE) {\n /* limit calculated threshold by even older granule */\n var x = rpelev2_s * gfc.nb_s2[chn][b];\n var y = thr[b];\n thr[b] = Math.min(x, y);\n }\n\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = ecb;\n assert(thr[b] >= 0);\n }\n for (; b <= Encoder.CBANDS; ++b) {\n eb[b] = 0;\n thr[b] = 0;\n }\n }\n\n function block_type_set(gfp, uselongblock, blocktype_d, blocktype) {\n var gfc = gfp.internal_flags;\n\n if (gfp.short_blocks == ShortBlock.short_block_coupled\n /* force both channels to use the same block type */\n /* this is necessary if the frame is to be encoded in ms_stereo. */\n /* But even without ms_stereo, FhG does this */\n && !(uselongblock[0] != 0 && uselongblock[1] != 0))\n uselongblock[0] = uselongblock[1] = 0;\n\n /*\n * update the blocktype of the previous granule, since it depends on\n * what happend in this granule\n */\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n blocktype[chn] = Encoder.NORM_TYPE;\n /* disable short blocks */\n if (gfp.short_blocks == ShortBlock.short_block_dispensed)\n uselongblock[chn] = 1;\n if (gfp.short_blocks == ShortBlock.short_block_forced)\n uselongblock[chn] = 0;\n\n if (uselongblock[chn] != 0) {\n /* no attack : use long blocks */\n assert(gfc.blocktype_old[chn] != Encoder.START_TYPE);\n if (gfc.blocktype_old[chn] == Encoder.SHORT_TYPE)\n blocktype[chn] = Encoder.STOP_TYPE;\n } else {\n /* attack : use short blocks */\n blocktype[chn] = Encoder.SHORT_TYPE;\n if (gfc.blocktype_old[chn] == Encoder.NORM_TYPE) {\n gfc.blocktype_old[chn] = Encoder.START_TYPE;\n }\n if (gfc.blocktype_old[chn] == Encoder.STOP_TYPE)\n gfc.blocktype_old[chn] = Encoder.SHORT_TYPE;\n }\n\n blocktype_d[chn] = gfc.blocktype_old[chn];\n // value returned to calling program\n gfc.blocktype_old[chn] = blocktype[chn];\n // save for next call to l3psy_anal\n }\n }\n\n function NS_INTERP(x, y, r) {\n /* was pow((x),(r))*pow((y),1-(r)) */\n if (r >= 1.0) {\n /* 99.7% of the time */\n return x;\n }\n if (r <= 0.0)\n return y;\n if (y > 0.0) {\n /* rest of the time */\n return (Math.pow(x / y, r) * y);\n }\n /* never happens */\n return 0.0;\n }\n\n /**\n * these values are tuned only for 44.1kHz...\n */\n var regcoef_s = [11.8, 13.6, 17.2, 32, 46.5,\n 51.3, 57.5, 67.1, 71.5, 84.6, 97.6, 130,\n /* 255.8 */\n ];\n\n function pecalc_s(mr, masking_lower) {\n var pe_s = 1236.28 / 4;\n for (var sb = 0; sb < Encoder.SBMAX_s - 1; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var thm = mr.thm.s[sb][sblock];\n assert(sb < regcoef_s.length);\n if (thm > 0.0) {\n var x = thm * masking_lower;\n var en = mr.en.s[sb][sblock];\n if (en > x) {\n if (en > x * 1e10) {\n pe_s += regcoef_s[sb] * (10.0 * LOG10);\n } else {\n assert(x > 0);\n pe_s += regcoef_s[sb] * Util.FAST_LOG10(en / x);\n }\n }\n }\n }\n }\n\n return pe_s;\n }\n\n /**\n * these values are tuned only for 44.1kHz...\n */\n var regcoef_l = [6.8, 5.8, 5.8, 6.4, 6.5, 9.9,\n 12.1, 14.4, 15, 18.9, 21.6, 26.9, 34.2, 40.2, 46.8, 56.5,\n 60.7, 73.9, 85.7, 93.4, 126.1,\n /* 241.3 */\n ];\n\n function pecalc_l(mr, masking_lower) {\n var pe_l = 1124.23 / 4;\n for (var sb = 0; sb < Encoder.SBMAX_l - 1; sb++) {\n var thm = mr.thm.l[sb];\n assert(sb < regcoef_l.length);\n if (thm > 0.0) {\n var x = thm * masking_lower;\n var en = mr.en.l[sb];\n if (en > x) {\n if (en > x * 1e10) {\n pe_l += regcoef_l[sb] * (10.0 * LOG10);\n } else {\n assert(x > 0);\n pe_l += regcoef_l[sb] * Util.FAST_LOG10(en / x);\n }\n }\n }\n }\n return pe_l;\n }\n\n function calc_energy(gfc, fftenergy, eb, max, avg) {\n var b, j;\n\n for (b = j = 0; b < gfc.npart_l; ++b) {\n var ebb = 0, m = 0;\n var i;\n for (i = 0; i < gfc.numlines_l[b]; ++i, ++j) {\n var el = fftenergy[j];\n assert(el >= 0);\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n max[b] = m;\n avg[b] = ebb * gfc.rnumlines_l[b];\n assert(gfc.rnumlines_l[b] >= 0);\n assert(ebb >= 0);\n assert(eb[b] >= 0);\n assert(max[b] >= 0);\n assert(avg[b] >= 0);\n }\n }\n\n function calc_mask_index_l(gfc, max, avg, mask_idx) {\n var last_tab_entry = tab.length - 1;\n var b = 0;\n var a = avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n\n for (b = 1; b < gfc.npart_l - 1; b++) {\n a = avg[b - 1] + avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_l[b - 1] + gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1) > 0);\n a = 20.0\n * (m * 3.0 - a)\n / (a * (gfc.numlines_l[b - 1] + gfc.numlines_l[b]\n + gfc.numlines_l[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n }\n assert(b > 0);\n assert(b == gfc.npart_l - 1);\n\n a = avg[b - 1] + avg[b];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n assert((gfc.numlines_l[b - 1] + gfc.numlines_l[b] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_l[b - 1] + gfc.numlines_l[b] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n assert(b == (gfc.npart_l - 1));\n }\n\n var fircoef = [\n -8.65163e-18 * 2, -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2,\n -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2, 0.0931738 * 2,\n -5.52212e-17 * 2, -0.313819 * 2\n ];\n\n this.L3psycho_anal_ns = function (gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, percep_entropy, percep_MS_entropy, energy, blocktype_d) {\n /*\n * to get a good cache performance, one has to think about the sequence,\n * in which the variables are used.\n */\n var gfc = gfp.internal_flags;\n\n /* fft and energy calculation */\n var wsamp_L = new_float_n([2, Encoder.BLKSIZE]);\n var wsamp_S = new_float_n([2, 3, Encoder.BLKSIZE_s]);\n\n /* convolution */\n var eb_l = new_float(Encoder.CBANDS + 1);\n var eb_s = new_float(Encoder.CBANDS + 1);\n var thr = new_float(Encoder.CBANDS + 2);\n\n /* block type */\n var blocktype = new_int(2), uselongblock = new_int(2);\n\n /* usual variables like loop indices, etc.. */\n var numchn, chn;\n var b, i, j, k;\n var sb, sblock;\n\n /* variables used for --nspsytune */\n var ns_hpfsmpl = new_float_n([2, 576]);\n var pcfact;\n var mask_idx_l = new_int(Encoder.CBANDS + 2), mask_idx_s = new_int(Encoder.CBANDS + 2);\n\n Arrays.fill(mask_idx_s, 0);\n\n numchn = gfc.channels_out;\n /* chn=2 and 3 = Mid and Side channels */\n if (gfp.mode == MPEGMode.JOINT_STEREO)\n numchn = 4;\n\n if (gfp.VBR == VbrMode.vbr_off)\n pcfact = gfc.ResvMax == 0 ? 0 : ( gfc.ResvSize)\n / gfc.ResvMax * 0.5;\n else if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh\n || gfp.VBR == VbrMode.vbr_mt) {\n pcfact = 0.6;\n } else\n pcfact = 1.0;\n\n /**********************************************************************\n * Apply HPF of fs/4 to the input signal. This is used for attack\n * detection / handling.\n **********************************************************************/\n /* Don't copy the input buffer into a temporary buffer */\n /* unroll the loop 2 times */\n for (chn = 0; chn < gfc.channels_out; chn++) {\n /* apply high pass filter of fs/4 */\n var firbuf = buffer[chn];\n var firbufPos = bufPos + 576 - 350 - NSFIRLEN + 192;\n assert(fircoef.length == ((NSFIRLEN - 1) / 2));\n for (i = 0; i < 576; i++) {\n var sum1, sum2;\n sum1 = firbuf[firbufPos + i + 10];\n sum2 = 0.0;\n for (j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) {\n sum1 += fircoef[j]\n * (firbuf[firbufPos + i + j] + firbuf[firbufPos + i\n + NSFIRLEN - j]);\n sum2 += fircoef[j + 1]\n * (firbuf[firbufPos + i + j + 1] + firbuf[firbufPos\n + i + NSFIRLEN - j - 1]);\n }\n ns_hpfsmpl[chn][i] = sum1 + sum2;\n }\n masking_ratio[gr_out][chn].en.assign(gfc.en[chn]);\n masking_ratio[gr_out][chn].thm.assign(gfc.thm[chn]);\n if (numchn > 2) {\n /* MS maskings */\n /* percep_MS_entropy [chn-2] = gfc . pe [chn]; */\n masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn + 2]);\n masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn + 2]);\n }\n }\n\n for (chn = 0; chn < numchn; chn++) {\n var wsamp_l;\n var wsamp_s;\n var en_subshort = new_float(12);\n var en_short = [0, 0, 0, 0];\n var attack_intensity = new_float(12);\n var ns_uselongblock = 1;\n var attackThreshold;\n var max = new_float(Encoder.CBANDS), avg = new_float(Encoder.CBANDS);\n var ns_attacks = [0, 0, 0, 0];\n var fftenergy = new_float(Encoder.HBLKSIZE);\n var fftenergy_s = new_float_n([3, Encoder.HBLKSIZE_s]);\n\n /*\n * rh 20040301: the following loops do access one off the limits so\n * I increase the array dimensions by one and initialize the\n * accessed values to zero\n */\n assert(gfc.npart_s <= Encoder.CBANDS);\n assert(gfc.npart_l <= Encoder.CBANDS);\n\n /***************************************************************\n * determine the block type (window type)\n ***************************************************************/\n /* calculate energies of each sub-shortblocks */\n for (i = 0; i < 3; i++) {\n en_subshort[i] = gfc.nsPsy.last_en_subshort[chn][i + 6];\n assert(gfc.nsPsy.last_en_subshort[chn][i + 4] > 0);\n attack_intensity[i] = en_subshort[i]\n / gfc.nsPsy.last_en_subshort[chn][i + 4];\n en_short[0] += en_subshort[i];\n }\n\n if (chn == 2) {\n for (i = 0; i < 576; i++) {\n var l, r;\n l = ns_hpfsmpl[0][i];\n r = ns_hpfsmpl[1][i];\n ns_hpfsmpl[0][i] = l + r;\n ns_hpfsmpl[1][i] = l - r;\n }\n }\n {\n var pf = ns_hpfsmpl[chn & 1];\n var pfPos = 0;\n for (i = 0; i < 9; i++) {\n var pfe = pfPos + 576 / 9;\n var p = 1.;\n for (; pfPos < pfe; pfPos++)\n if (p < Math.abs(pf[pfPos]))\n p = Math.abs(pf[pfPos]);\n\n gfc.nsPsy.last_en_subshort[chn][i] = en_subshort[i + 3] = p;\n en_short[1 + i / 3] += p;\n if (p > en_subshort[i + 3 - 2]) {\n assert(en_subshort[i + 3 - 2] > 0);\n p = p / en_subshort[i + 3 - 2];\n } else if (en_subshort[i + 3 - 2] > p * 10.0) {\n assert(p > 0);\n p = en_subshort[i + 3 - 2] / (p * 10.0);\n } else\n p = 0.0;\n attack_intensity[i + 3] = p;\n }\n }\n\n if (gfp.analysis) {\n var x = attack_intensity[0];\n for (i = 1; i < 12; i++)\n if (x < attack_intensity[i])\n x = attack_intensity[i];\n gfc.pinfo.ers[gr_out][chn] = gfc.pinfo.ers_save[chn];\n gfc.pinfo.ers_save[chn] = x;\n }\n\n /* compare energies between sub-shortblocks */\n attackThreshold = (chn == 3) ? gfc.nsPsy.attackthre_s\n : gfc.nsPsy.attackthre;\n for (i = 0; i < 12; i++)\n if (0 == ns_attacks[i / 3]\n && attack_intensity[i] > attackThreshold)\n ns_attacks[i / 3] = (i % 3) + 1;\n\n /*\n * should have energy change between short blocks, in order to avoid\n * periodic signals\n */\n for (i = 1; i < 4; i++) {\n var ratio;\n if (en_short[i - 1] > en_short[i]) {\n assert(en_short[i] > 0);\n ratio = en_short[i - 1] / en_short[i];\n } else {\n assert(en_short[i - 1] > 0);\n ratio = en_short[i] / en_short[i - 1];\n }\n if (ratio < 1.7) {\n ns_attacks[i] = 0;\n if (i == 1)\n ns_attacks[0] = 0;\n }\n }\n\n if (ns_attacks[0] != 0 && gfc.nsPsy.lastAttacks[chn] != 0)\n ns_attacks[0] = 0;\n\n if (gfc.nsPsy.lastAttacks[chn] == 3\n || (ns_attacks[0] + ns_attacks[1] + ns_attacks[2] + ns_attacks[3]) != 0) {\n ns_uselongblock = 0;\n\n if (ns_attacks[1] != 0 && ns_attacks[0] != 0)\n ns_attacks[1] = 0;\n if (ns_attacks[2] != 0 && ns_attacks[1] != 0)\n ns_attacks[2] = 0;\n if (ns_attacks[3] != 0 && ns_attacks[2] != 0)\n ns_attacks[3] = 0;\n }\n\n if (chn < 2) {\n uselongblock[chn] = ns_uselongblock;\n } else {\n if (ns_uselongblock == 0) {\n uselongblock[0] = uselongblock[1] = 0;\n }\n }\n\n /*\n * there is a one granule delay. Copy maskings computed last call\n * into masking_ratio to return to calling program.\n */\n energy[chn] = gfc.tot_ener[chn];\n\n /*********************************************************************\n * compute FFTs\n *********************************************************************/\n wsamp_s = wsamp_S;\n wsamp_l = wsamp_L;\n compute_ffts(gfp, fftenergy, fftenergy_s, wsamp_l, (chn & 1),\n wsamp_s, (chn & 1), gr_out, chn, buffer, bufPos);\n\n /*********************************************************************\n * Calculate the energy and the tonality of each partition.\n *********************************************************************/\n calc_energy(gfc, fftenergy, eb_l, max, avg);\n calc_mask_index_l(gfc, max, avg, mask_idx_l);\n /* compute masking thresholds for short blocks */\n for (sblock = 0; sblock < 3; sblock++) {\n var enn, thmm;\n compute_masking_s(gfp, fftenergy_s, eb_s, thr, chn, sblock);\n convert_partition2scalefac_s(gfc, eb_s, thr, chn, sblock);\n /**** short block pre-echo control ****/\n for (sb = 0; sb < Encoder.SBMAX_s; sb++) {\n thmm = gfc.thm[chn].s[sb][sblock];\n\n thmm *= NS_PREECHO_ATT0;\n if (ns_attacks[sblock] >= 2 || ns_attacks[sblock + 1] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT1 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n if (ns_attacks[sblock] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n } else if ((sblock != 0 && ns_attacks[sblock - 1] == 3)\n || (sblock == 0 && gfc.nsPsy.lastAttacks[chn] == 3)) {\n var idx = (sblock != 2) ? sblock + 1 : 0;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n /* pulse like signal detection for fatboy.wav and so on */\n enn = en_subshort[sblock * 3 + 3]\n + en_subshort[sblock * 3 + 4]\n + en_subshort[sblock * 3 + 5];\n if (en_subshort[sblock * 3 + 5] * 6 < enn) {\n thmm *= 0.5;\n if (en_subshort[sblock * 3 + 4] * 6 < enn)\n thmm *= 0.5;\n }\n\n gfc.thm[chn].s[sb][sblock] = thmm;\n }\n }\n gfc.nsPsy.lastAttacks[chn] = ns_attacks[2];\n\n /*********************************************************************\n * convolve the partitioned energy and unpredictability with the\n * spreading function, s3_l[b][k]\n ********************************************************************/\n k = 0;\n {\n for (b = 0; b < gfc.npart_l; b++) {\n /*\n * convolve the partitioned energy with the spreading\n * function\n */\n var kk = gfc.s3ind[b][0];\n var eb2 = eb_l[kk] * tab[mask_idx_l[kk]];\n var ecb = gfc.s3_ll[k++] * eb2;\n while (++kk <= gfc.s3ind[b][1]) {\n eb2 = eb_l[kk] * tab[mask_idx_l[kk]];\n ecb = mask_add(ecb, gfc.s3_ll[k++] * eb2, kk, kk - b,\n gfc, 0);\n }\n ecb *= 0.158489319246111;\n /* pow(10,-0.8) */\n\n /**** long block pre-echo control ****/\n /**\n *
\n                     * dont use long block pre-echo control if previous granule was\n                     * a short block.  This is to avoid the situation:\n                     * frame0:  quiet (very low masking)\n                     * frame1:  surge  (triggers short blocks)\n                     * frame2:  regular frame.  looks like pre-echo when compared to\n                     *          frame0, but all pre-echo was in frame1.\n                     * 
\n */\n /*\n * chn=0,1 L and R channels\n *\n * chn=2,3 S and M channels.\n */\n\n if (gfc.blocktype_old[chn & 1] == Encoder.SHORT_TYPE)\n thr[b] = ecb;\n else\n thr[b] = NS_INTERP(\n Math.min(ecb, Math.min(rpelev\n * gfc.nb_1[chn][b], rpelev2\n * gfc.nb_2[chn][b])), ecb, pcfact);\n\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = ecb;\n }\n }\n for (; b <= Encoder.CBANDS; ++b) {\n eb_l[b] = 0;\n thr[b] = 0;\n }\n /* compute masking thresholds for long blocks */\n convert_partition2scalefac_l(gfc, eb_l, thr, chn);\n }\n /* end loop over chn */\n\n if (gfp.mode == MPEGMode.STEREO || gfp.mode == MPEGMode.JOINT_STEREO) {\n if (gfp.interChRatio > 0.0) {\n calc_interchannel_masking(gfp, gfp.interChRatio);\n }\n }\n\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n var msfix;\n msfix1(gfc);\n msfix = gfp.msfix;\n if (Math.abs(msfix) > 0.0)\n ns_msfix(gfc, msfix, gfp.ATHlower * gfc.ATH.adjust);\n }\n\n /***************************************************************\n * determine final block type\n ***************************************************************/\n block_type_set(gfp, uselongblock, blocktype_d, blocktype);\n\n /*********************************************************************\n * compute the value of PE to return ... no delay and advance\n *********************************************************************/\n for (chn = 0; chn < numchn; chn++) {\n var ppe;\n var ppePos = 0;\n var type;\n var mr;\n\n if (chn > 1) {\n ppe = percep_MS_entropy;\n ppePos = -2;\n type = Encoder.NORM_TYPE;\n if (blocktype_d[0] == Encoder.SHORT_TYPE\n || blocktype_d[1] == Encoder.SHORT_TYPE)\n type = Encoder.SHORT_TYPE;\n mr = masking_MS_ratio[gr_out][chn - 2];\n } else {\n ppe = percep_entropy;\n ppePos = 0;\n type = blocktype_d[chn];\n mr = masking_ratio[gr_out][chn];\n }\n\n if (type == Encoder.SHORT_TYPE)\n ppe[ppePos + chn] = pecalc_s(mr, gfc.masking_lower);\n else\n ppe[ppePos + chn] = pecalc_l(mr, gfc.masking_lower);\n\n if (gfp.analysis)\n gfc.pinfo.pe[gr_out][chn] = ppe[ppePos + chn];\n\n }\n return 0;\n }\n\n function vbrpsy_compute_fft_l(gfp, buffer, bufPos, chn, gr_out, fftenergy, wsamp_l, wsamp_lPos) {\n var gfc = gfp.internal_flags;\n if (chn < 2) {\n fft.fft_long(gfc, wsamp_l[wsamp_lPos], chn, buffer, bufPos);\n } else if (chn == 2) {\n /* FFT data for mid and side channel is derived from L & R */\n for (var j = Encoder.BLKSIZE - 1; j >= 0; --j) {\n var l = wsamp_l[wsamp_lPos + 0][j];\n var r = wsamp_l[wsamp_lPos + 1][j];\n wsamp_l[wsamp_lPos + 0][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_l[wsamp_lPos + 1][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy[0] = NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos + 0][0]);\n fftenergy[0] *= fftenergy[0];\n\n for (var j = Encoder.BLKSIZE / 2 - 1; j >= 0; --j) {\n var re = wsamp_l[wsamp_lPos + 0][Encoder.BLKSIZE / 2 - j];\n var im = wsamp_l[wsamp_lPos + 0][Encoder.BLKSIZE / 2 + j];\n fftenergy[Encoder.BLKSIZE / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n /* total energy */\n {\n var totalenergy = 0.0;\n for (var j = 11; j < Encoder.HBLKSIZE; j++)\n totalenergy += fftenergy[j];\n\n gfc.tot_ener[chn] = totalenergy;\n }\n\n if (gfp.analysis) {\n for (var j = 0; j < Encoder.HBLKSIZE; j++) {\n gfc.pinfo.energy[gr_out][chn][j] = gfc.pinfo.energy_save[chn][j];\n gfc.pinfo.energy_save[chn][j] = fftenergy[j];\n }\n gfc.pinfo.pe[gr_out][chn] = gfc.pe[chn];\n }\n }\n\n function vbrpsy_compute_fft_s(gfp, buffer, bufPos, chn, sblock, fftenergy_s, wsamp_s, wsamp_sPos) {\n var gfc = gfp.internal_flags;\n\n if (sblock == 0 && chn < 2) {\n fft.fft_short(gfc, wsamp_s[wsamp_sPos], chn, buffer, bufPos);\n }\n if (chn == 2) {\n /* FFT data for mid and side channel is derived from L & R */\n for (var j = Encoder.BLKSIZE_s - 1; j >= 0; --j) {\n var l = wsamp_s[wsamp_sPos + 0][sblock][j];\n var r = wsamp_s[wsamp_sPos + 1][sblock][j];\n wsamp_s[wsamp_sPos + 0][sblock][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_s[wsamp_sPos + 1][sblock][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy_s[sblock][0] = wsamp_s[wsamp_sPos + 0][sblock][0];\n fftenergy_s[sblock][0] *= fftenergy_s[sblock][0];\n for (var j = Encoder.BLKSIZE_s / 2 - 1; j >= 0; --j) {\n var re = wsamp_s[wsamp_sPos + 0][sblock][Encoder.BLKSIZE_s / 2 - j];\n var im = wsamp_s[wsamp_sPos + 0][sblock][Encoder.BLKSIZE_s / 2 + j];\n fftenergy_s[sblock][Encoder.BLKSIZE_s / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n }\n\n /**\n * compute loudness approximation (used for ATH auto-level adjustment)\n */\n function vbrpsy_compute_loudness_approximation_l(gfp, gr_out, chn, fftenergy) {\n var gfc = gfp.internal_flags;\n if (gfp.athaa_loudapprox == 2 && chn < 2) {\n // no loudness for mid/side ch\n gfc.loudness_sq[gr_out][chn] = gfc.loudness_sq_save[chn];\n gfc.loudness_sq_save[chn] = psycho_loudness_approx(fftenergy, gfc);\n }\n }\n\n var fircoef_ = [-8.65163e-18 * 2,\n -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2,\n -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2,\n 0.0931738 * 2, -5.52212e-17 * 2, -0.313819 * 2];\n\n /**\n * Apply HPF of fs/4 to the input signal. This is used for attack detection\n * / handling.\n */\n function vbrpsy_attack_detection(gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, energy, sub_short_factor, ns_attacks, uselongblock) {\n var ns_hpfsmpl = new_float_n([2, 576]);\n var gfc = gfp.internal_flags;\n var n_chn_out = gfc.channels_out;\n /* chn=2 and 3 = Mid and Side channels */\n var n_chn_psy = (gfp.mode == MPEGMode.JOINT_STEREO) ? 4 : n_chn_out;\n /* Don't copy the input buffer into a temporary buffer */\n /* unroll the loop 2 times */\n for (var chn = 0; chn < n_chn_out; chn++) {\n /* apply high pass filter of fs/4 */\n firbuf = buffer[chn];\n var firbufPos = bufPos + 576 - 350 - NSFIRLEN + 192;\n assert(fircoef_.length == ((NSFIRLEN - 1) / 2));\n for (var i = 0; i < 576; i++) {\n var sum1, sum2;\n sum1 = firbuf[firbufPos + i + 10];\n sum2 = 0.0;\n for (var j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) {\n sum1 += fircoef_[j]\n * (firbuf[firbufPos + i + j] + firbuf[firbufPos + i\n + NSFIRLEN - j]);\n sum2 += fircoef_[j + 1]\n * (firbuf[firbufPos + i + j + 1] + firbuf[firbufPos\n + i + NSFIRLEN - j - 1]);\n }\n ns_hpfsmpl[chn][i] = sum1 + sum2;\n }\n masking_ratio[gr_out][chn].en.assign(gfc.en[chn]);\n masking_ratio[gr_out][chn].thm.assign(gfc.thm[chn]);\n if (n_chn_psy > 2) {\n /* MS maskings */\n /* percep_MS_entropy [chn-2] = gfc . pe [chn]; */\n masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn + 2]);\n masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn + 2]);\n }\n }\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var attack_intensity = new_float(12);\n var en_subshort = new_float(12);\n var en_short = [0, 0, 0, 0];\n var pf = ns_hpfsmpl[chn & 1];\n var pfPos = 0;\n var attackThreshold = (chn == 3) ? gfc.nsPsy.attackthre_s\n : gfc.nsPsy.attackthre;\n var ns_uselongblock = 1;\n\n if (chn == 2) {\n for (var i = 0, j = 576; j > 0; ++i, --j) {\n var l = ns_hpfsmpl[0][i];\n var r = ns_hpfsmpl[1][i];\n ns_hpfsmpl[0][i] = l + r;\n ns_hpfsmpl[1][i] = l - r;\n }\n }\n /***************************************************************\n * determine the block type (window type)\n ***************************************************************/\n /* calculate energies of each sub-shortblocks */\n for (var i = 0; i < 3; i++) {\n en_subshort[i] = gfc.nsPsy.last_en_subshort[chn][i + 6];\n assert(gfc.nsPsy.last_en_subshort[chn][i + 4] > 0);\n attack_intensity[i] = en_subshort[i]\n / gfc.nsPsy.last_en_subshort[chn][i + 4];\n en_short[0] += en_subshort[i];\n }\n\n for (var i = 0; i < 9; i++) {\n var pfe = pfPos + 576 / 9;\n var p = 1.;\n for (; pfPos < pfe; pfPos++)\n if (p < Math.abs(pf[pfPos]))\n p = Math.abs(pf[pfPos]);\n\n gfc.nsPsy.last_en_subshort[chn][i] = en_subshort[i + 3] = p;\n en_short[1 + i / 3] += p;\n if (p > en_subshort[i + 3 - 2]) {\n assert(en_subshort[i + 3 - 2] > 0);\n p = p / en_subshort[i + 3 - 2];\n } else if (en_subshort[i + 3 - 2] > p * 10.0) {\n assert(p > 0);\n p = en_subshort[i + 3 - 2] / (p * 10.0);\n } else {\n p = 0.0;\n }\n attack_intensity[i + 3] = p;\n }\n /* pulse like signal detection for fatboy.wav and so on */\n for (var i = 0; i < 3; ++i) {\n var enn = en_subshort[i * 3 + 3]\n + en_subshort[i * 3 + 4] + en_subshort[i * 3 + 5];\n var factor = 1.;\n if (en_subshort[i * 3 + 5] * 6 < enn) {\n factor *= 0.5;\n if (en_subshort[i * 3 + 4] * 6 < enn) {\n factor *= 0.5;\n }\n }\n sub_short_factor[chn][i] = factor;\n }\n\n if (gfp.analysis) {\n var x = attack_intensity[0];\n for (var i = 1; i < 12; i++) {\n if (x < attack_intensity[i]) {\n x = attack_intensity[i];\n }\n }\n gfc.pinfo.ers[gr_out][chn] = gfc.pinfo.ers_save[chn];\n gfc.pinfo.ers_save[chn] = x;\n }\n\n /* compare energies between sub-shortblocks */\n for (var i = 0; i < 12; i++) {\n if (0 == ns_attacks[chn][i / 3]\n && attack_intensity[i] > attackThreshold) {\n ns_attacks[chn][i / 3] = (i % 3) + 1;\n }\n }\n\n /*\n * should have energy change between short blocks, in order to avoid\n * periodic signals\n */\n /* Good samples to show the effect are Trumpet test songs */\n /*\n * GB: tuned (1) to avoid too many short blocks for test sample\n * TRUMPET\n */\n /*\n * RH: tuned (2) to let enough short blocks through for test sample\n * FSOL and SNAPS\n */\n for (var i = 1; i < 4; i++) {\n var u = en_short[i - 1];\n var v = en_short[i];\n var m = Math.max(u, v);\n if (m < 40000) { /* (2) */\n if (u < 1.7 * v && v < 1.7 * u) { /* (1) */\n if (i == 1 && ns_attacks[chn][0] <= ns_attacks[chn][i]) {\n ns_attacks[chn][0] = 0;\n }\n ns_attacks[chn][i] = 0;\n }\n }\n }\n\n if (ns_attacks[chn][0] <= gfc.nsPsy.lastAttacks[chn]) {\n ns_attacks[chn][0] = 0;\n }\n\n if (gfc.nsPsy.lastAttacks[chn] == 3\n || (ns_attacks[chn][0] + ns_attacks[chn][1]\n + ns_attacks[chn][2] + ns_attacks[chn][3]) != 0) {\n ns_uselongblock = 0;\n\n if (ns_attacks[chn][1] != 0 && ns_attacks[chn][0] != 0) {\n ns_attacks[chn][1] = 0;\n }\n if (ns_attacks[chn][2] != 0 && ns_attacks[chn][1] != 0) {\n ns_attacks[chn][2] = 0;\n }\n if (ns_attacks[chn][3] != 0 && ns_attacks[chn][2] != 0) {\n ns_attacks[chn][3] = 0;\n }\n }\n if (chn < 2) {\n uselongblock[chn] = ns_uselongblock;\n } else {\n if (ns_uselongblock == 0) {\n uselongblock[0] = uselongblock[1] = 0;\n }\n }\n\n /*\n * there is a one granule delay. Copy maskings computed last call\n * into masking_ratio to return to calling program.\n */\n energy[chn] = gfc.tot_ener[chn];\n }\n }\n\n function vbrpsy_skip_masking_s(gfc, chn, sblock) {\n if (sblock == 0) {\n for (var b = 0; b < gfc.npart_s; b++) {\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = 0;\n }\n }\n }\n\n function vbrpsy_skip_masking_l(gfc, chn) {\n for (var b = 0; b < gfc.npart_l; b++) {\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = 0;\n }\n }\n\n function psyvbr_calc_mask_index_s(gfc, max, avg, mask_idx) {\n var last_tab_entry = tab.length - 1;\n var b = 0;\n var a = avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n\n for (b = 1; b < gfc.npart_s - 1; b++) {\n a = avg[b - 1] + avg[b] + avg[b + 1];\n assert(b + 1 < gfc.npart_s);\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_s[b - 1] + gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1) > 0);\n a = 20.0\n * (m * 3.0 - a)\n / (a * (gfc.numlines_s[b - 1] + gfc.numlines_s[b]\n + gfc.numlines_s[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n }\n assert(b > 0);\n assert(b == gfc.npart_s - 1);\n\n a = avg[b - 1] + avg[b];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n assert((gfc.numlines_s[b - 1] + gfc.numlines_s[b] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_s[b - 1] + gfc.numlines_s[b] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n assert(b == (gfc.npart_s - 1));\n }\n\n function vbrpsy_compute_masking_s(gfp, fftenergy_s, eb, thr, chn, sblock) {\n var gfc = gfp.internal_flags;\n var max = new float[Encoder.CBANDS], avg = new_float(Encoder.CBANDS);\n var i, j, b;\n var mask_idx_s = new int[Encoder.CBANDS];\n\n for (b = j = 0; b < gfc.npart_s; ++b) {\n var ebb = 0, m = 0;\n var n = gfc.numlines_s[b];\n for (i = 0; i < n; ++i, ++j) {\n var el = fftenergy_s[sblock][j];\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n assert(ebb >= 0);\n max[b] = m;\n assert(n > 0);\n avg[b] = ebb / n;\n assert(avg[b] >= 0);\n }\n assert(b == gfc.npart_s);\n assert(j == 129);\n for (; b < Encoder.CBANDS; ++b) {\n max[b] = 0;\n avg[b] = 0;\n }\n psyvbr_calc_mask_index_s(gfc, max, avg, mask_idx_s);\n for (j = b = 0; b < gfc.npart_s; b++) {\n var kk = gfc.s3ind_s[b][0];\n var last = gfc.s3ind_s[b][1];\n var dd, dd_n;\n var x, ecb, avg_mask;\n dd = mask_idx_s[kk];\n dd_n = 1;\n ecb = gfc.s3_ss[j] * eb[kk] * tab[mask_idx_s[kk]];\n ++j;\n ++kk;\n while (kk <= last) {\n dd += mask_idx_s[kk];\n dd_n += 1;\n x = gfc.s3_ss[j] * eb[kk] * tab[mask_idx_s[kk]];\n ecb = vbrpsy_mask_add(ecb, x, kk - b);\n ++j;\n ++kk;\n }\n dd = (1 + 2 * dd) / (2 * dd_n);\n avg_mask = tab[dd] * 0.5;\n ecb *= avg_mask;\n thr[b] = ecb;\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = ecb;\n {\n /*\n * if THR exceeds EB, the quantization routines will take the\n * difference from other bands. in case of strong tonal samples\n * (tonaltest.wav) this leads to heavy distortions. that's why\n * we limit THR here.\n */\n x = max[b];\n x *= gfc.minval_s[b];\n x *= avg_mask;\n if (thr[b] > x) {\n thr[b] = x;\n }\n }\n if (gfc.masking_lower > 1) {\n thr[b] *= gfc.masking_lower;\n }\n if (thr[b] > eb[b]) {\n thr[b] = eb[b];\n }\n if (gfc.masking_lower < 1) {\n thr[b] *= gfc.masking_lower;\n }\n\n assert(thr[b] >= 0);\n }\n for (; b < Encoder.CBANDS; ++b) {\n eb[b] = 0;\n thr[b] = 0;\n }\n }\n\n function vbrpsy_compute_masking_l(gfc, fftenergy, eb_l, thr, chn) {\n var max = new_float(Encoder.CBANDS), avg = new_float(Encoder.CBANDS);\n var mask_idx_l = new_int(Encoder.CBANDS + 2);\n var b;\n\n /*********************************************************************\n * Calculate the energy and the tonality of each partition.\n *********************************************************************/\n calc_energy(gfc, fftenergy, eb_l, max, avg);\n calc_mask_index_l(gfc, max, avg, mask_idx_l);\n\n /*********************************************************************\n * convolve the partitioned energy and unpredictability with the\n * spreading function, s3_l[b][k]\n ********************************************************************/\n var k = 0;\n for (b = 0; b < gfc.npart_l; b++) {\n var x, ecb, avg_mask, t;\n /* convolve the partitioned energy with the spreading function */\n var kk = gfc.s3ind[b][0];\n var last = gfc.s3ind[b][1];\n var dd = 0, dd_n = 0;\n dd = mask_idx_l[kk];\n dd_n += 1;\n ecb = gfc.s3_ll[k] * eb_l[kk] * tab[mask_idx_l[kk]];\n ++k;\n ++kk;\n while (kk <= last) {\n dd += mask_idx_l[kk];\n dd_n += 1;\n x = gfc.s3_ll[k] * eb_l[kk] * tab[mask_idx_l[kk]];\n t = vbrpsy_mask_add(ecb, x, kk - b);\n ecb = t;\n ++k;\n ++kk;\n }\n dd = (1 + 2 * dd) / (2 * dd_n);\n avg_mask = tab[dd] * 0.5;\n ecb *= avg_mask;\n\n /**** long block pre-echo control ****/\n /**\n *
\n             * dont use long block pre-echo control if previous granule was\n             * a short block.  This is to avoid the situation:\n             * frame0:  quiet (very low masking)\n             * frame1:  surge  (triggers short blocks)\n             * frame2:  regular frame.  looks like pre-echo when compared to\n             *          frame0, but all pre-echo was in frame1.\n             * 
\n */\n /*\n * chn=0,1 L and R channels chn=2,3 S and M channels.\n */\n if (gfc.blocktype_old[chn & 0x01] == Encoder.SHORT_TYPE) {\n var ecb_limit = rpelev * gfc.nb_1[chn][b];\n if (ecb_limit > 0) {\n thr[b] = Math.min(ecb, ecb_limit);\n } else {\n /**\n *
\n                     * Robert 071209:\n                     * Because we don't calculate long block psy when we know a granule\n                     * should be of short blocks, we don't have any clue how the granule\n                     * before would have looked like as a long block. So we have to guess\n                     * a little bit for this END_TYPE block.\n                     * Most of the time we get away with this sloppyness. (fingers crossed :)\n                     * The speed increase is worth it.\n                     * 
\n */\n thr[b] = Math.min(ecb, eb_l[b] * NS_PREECHO_ATT2);\n }\n } else {\n var ecb_limit_2 = rpelev2 * gfc.nb_2[chn][b];\n var ecb_limit_1 = rpelev * gfc.nb_1[chn][b];\n var ecb_limit;\n if (ecb_limit_2 <= 0) {\n ecb_limit_2 = ecb;\n }\n if (ecb_limit_1 <= 0) {\n ecb_limit_1 = ecb;\n }\n if (gfc.blocktype_old[chn & 0x01] == Encoder.NORM_TYPE) {\n ecb_limit = Math.min(ecb_limit_1, ecb_limit_2);\n } else {\n ecb_limit = ecb_limit_1;\n }\n thr[b] = Math.min(ecb, ecb_limit);\n }\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = ecb;\n {\n /*\n * if THR exceeds EB, the quantization routines will take the\n * difference from other bands. in case of strong tonal samples\n * (tonaltest.wav) this leads to heavy distortions. that's why\n * we limit THR here.\n */\n x = max[b];\n x *= gfc.minval_l[b];\n x *= avg_mask;\n if (thr[b] > x) {\n thr[b] = x;\n }\n }\n if (gfc.masking_lower > 1) {\n thr[b] *= gfc.masking_lower;\n }\n if (thr[b] > eb_l[b]) {\n thr[b] = eb_l[b];\n }\n if (gfc.masking_lower < 1) {\n thr[b] *= gfc.masking_lower;\n }\n assert(thr[b] >= 0);\n }\n for (; b < Encoder.CBANDS; ++b) {\n eb_l[b] = 0;\n thr[b] = 0;\n }\n }\n\n function vbrpsy_compute_block_type(gfp, uselongblock) {\n var gfc = gfp.internal_flags;\n\n if (gfp.short_blocks == ShortBlock.short_block_coupled\n /* force both channels to use the same block type */\n /* this is necessary if the frame is to be encoded in ms_stereo. */\n /* But even without ms_stereo, FhG does this */\n && !(uselongblock[0] != 0 && uselongblock[1] != 0))\n uselongblock[0] = uselongblock[1] = 0;\n\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n /* disable short blocks */\n if (gfp.short_blocks == ShortBlock.short_block_dispensed) {\n uselongblock[chn] = 1;\n }\n if (gfp.short_blocks == ShortBlock.short_block_forced) {\n uselongblock[chn] = 0;\n }\n }\n }\n\n function vbrpsy_apply_block_type(gfp, uselongblock, blocktype_d) {\n var gfc = gfp.internal_flags;\n\n /*\n * update the blocktype of the previous granule, since it depends on\n * what happend in this granule\n */\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n var blocktype = Encoder.NORM_TYPE;\n /* disable short blocks */\n\n if (uselongblock[chn] != 0) {\n /* no attack : use long blocks */\n assert(gfc.blocktype_old[chn] != Encoder.START_TYPE);\n if (gfc.blocktype_old[chn] == Encoder.SHORT_TYPE)\n blocktype = Encoder.STOP_TYPE;\n } else {\n /* attack : use short blocks */\n blocktype = Encoder.SHORT_TYPE;\n if (gfc.blocktype_old[chn] == Encoder.NORM_TYPE) {\n gfc.blocktype_old[chn] = Encoder.START_TYPE;\n }\n if (gfc.blocktype_old[chn] == Encoder.STOP_TYPE)\n gfc.blocktype_old[chn] = Encoder.SHORT_TYPE;\n }\n\n blocktype_d[chn] = gfc.blocktype_old[chn];\n // value returned to calling program\n gfc.blocktype_old[chn] = blocktype;\n // save for next call to l3psy_anal\n }\n }\n\n /**\n * compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper\n */\n function vbrpsy_compute_MS_thresholds(eb, thr, cb_mld, ath_cb, athadjust, msfix, n) {\n var msfix2 = msfix * 2;\n var athlower = msfix > 0 ? Math.pow(10, athadjust) : 1;\n var rside, rmid;\n for (var b = 0; b < n; ++b) {\n var ebM = eb[2][b];\n var ebS = eb[3][b];\n var thmL = thr[0][b];\n var thmR = thr[1][b];\n var thmM = thr[2][b];\n var thmS = thr[3][b];\n\n /* use this fix if L & R masking differs by 2db or less */\n if (thmL <= 1.58 * thmR && thmR <= 1.58 * thmL) {\n var mld_m = cb_mld[b] * ebS;\n var mld_s = cb_mld[b] * ebM;\n rmid = Math.max(thmM, Math.min(thmS, mld_m));\n rside = Math.max(thmS, Math.min(thmM, mld_s));\n } else {\n rmid = thmM;\n rside = thmS;\n }\n if (msfix > 0) {\n /***************************************************************/\n /* Adjust M/S maskings if user set \"msfix\" */\n /***************************************************************/\n /* Naoki Shibata 2000 */\n var thmLR, thmMS;\n var ath = ath_cb[b] * athlower;\n thmLR = Math.min(Math.max(thmL, ath), Math.max(thmR, ath));\n thmM = Math.max(rmid, ath);\n thmS = Math.max(rside, ath);\n thmMS = thmM + thmS;\n if (thmMS > 0 && (thmLR * msfix2) < thmMS) {\n var f = thmLR * msfix2 / thmMS;\n thmM *= f;\n thmS *= f;\n assert(thmMS > 0);\n }\n rmid = Math.min(thmM, rmid);\n rside = Math.min(thmS, rside);\n }\n if (rmid > ebM) {\n rmid = ebM;\n }\n if (rside > ebS) {\n rside = ebS;\n }\n thr[2][b] = rmid;\n thr[3][b] = rside;\n }\n }\n\n this.L3psycho_anal_vbr = function (gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, percep_entropy, percep_MS_entropy, energy, blocktype_d) {\n var gfc = gfp.internal_flags;\n\n /* fft and energy calculation */\n var wsamp_l;\n var wsamp_s;\n var fftenergy = new_float(Encoder.HBLKSIZE);\n var fftenergy_s = new_float_n([3, Encoder.HBLKSIZE_s]);\n var wsamp_L = new_float_n([2, Encoder.BLKSIZE]);\n var wsamp_S = new_float_n([2, 3, Encoder.BLKSIZE_s]);\n var eb = new_float_n([4, Encoder.CBANDS]), thr = new_float_n([4, Encoder.CBANDS]);\n var sub_short_factor = new_float_n([4, 3]);\n var pcfact = 0.6;\n\n /* block type */\n var ns_attacks = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0],\n [0, 0, 0, 0]];\n var uselongblock = new_int(2);\n\n /* usual variables like loop indices, etc.. */\n\n /* chn=2 and 3 = Mid and Side channels */\n var n_chn_psy = (gfp.mode == MPEGMode.JOINT_STEREO) ? 4\n : gfc.channels_out;\n\n vbrpsy_attack_detection(gfp, buffer, bufPos, gr_out, masking_ratio,\n masking_MS_ratio, energy, sub_short_factor, ns_attacks,\n uselongblock);\n\n vbrpsy_compute_block_type(gfp, uselongblock);\n\n /* LONG BLOCK CASE */\n {\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n wsamp_l = wsamp_L;\n vbrpsy_compute_fft_l(gfp, buffer, bufPos, chn, gr_out,\n fftenergy, wsamp_l, ch01);\n\n vbrpsy_compute_loudness_approximation_l(gfp, gr_out, chn,\n fftenergy);\n\n if (uselongblock[ch01] != 0) {\n vbrpsy_compute_masking_l(gfc, fftenergy, eb[chn], thr[chn],\n chn);\n } else {\n vbrpsy_skip_masking_l(gfc, chn);\n }\n }\n if ((uselongblock[0] + uselongblock[1]) == 2) {\n /* M/S channel */\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n vbrpsy_compute_MS_thresholds(eb, thr, gfc.mld_cb_l,\n gfc.ATH.cb_l, gfp.ATHlower * gfc.ATH.adjust,\n gfp.msfix, gfc.npart_l);\n }\n }\n /* TODO: apply adaptive ATH masking here ?? */\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n if (uselongblock[ch01] != 0) {\n convert_partition2scalefac_l(gfc, eb[chn], thr[chn], chn);\n }\n }\n }\n\n /* SHORT BLOCKS CASE */\n {\n for (var sblock = 0; sblock < 3; sblock++) {\n for (var chn = 0; chn < n_chn_psy; ++chn) {\n var ch01 = chn & 0x01;\n\n if (uselongblock[ch01] != 0) {\n vbrpsy_skip_masking_s(gfc, chn, sblock);\n } else {\n /* compute masking thresholds for short blocks */\n wsamp_s = wsamp_S;\n vbrpsy_compute_fft_s(gfp, buffer, bufPos, chn, sblock,\n fftenergy_s, wsamp_s, ch01);\n vbrpsy_compute_masking_s(gfp, fftenergy_s, eb[chn],\n thr[chn], chn, sblock);\n }\n }\n if ((uselongblock[0] + uselongblock[1]) == 0) {\n /* M/S channel */\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n vbrpsy_compute_MS_thresholds(eb, thr, gfc.mld_cb_s,\n gfc.ATH.cb_s, gfp.ATHlower * gfc.ATH.adjust,\n gfp.msfix, gfc.npart_s);\n }\n /* L/R channel */\n }\n /* TODO: apply adaptive ATH masking here ?? */\n for (var chn = 0; chn < n_chn_psy; ++chn) {\n var ch01 = chn & 0x01;\n if (0 == uselongblock[ch01]) {\n convert_partition2scalefac_s(gfc, eb[chn], thr[chn],\n chn, sblock);\n }\n }\n }\n\n /**** short block pre-echo control ****/\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n\n if (uselongblock[ch01] != 0) {\n continue;\n }\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n var new_thmm = new_float(3);\n for (var sblock = 0; sblock < 3; sblock++) {\n var thmm = gfc.thm[chn].s[sb][sblock];\n thmm *= NS_PREECHO_ATT0;\n\n if (ns_attacks[chn][sblock] >= 2\n || ns_attacks[chn][sblock + 1] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT1 * pcfact);\n thmm = Math.min(thmm, p);\n } else if (ns_attacks[chn][sblock] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n } else if ((sblock != 0 && ns_attacks[chn][sblock - 1] == 3)\n || (sblock == 0 && gfc.nsPsy.lastAttacks[chn] == 3)) {\n var idx = (sblock != 2) ? sblock + 1 : 0;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n /* pulse like signal detection for fatboy.wav and so on */\n thmm *= sub_short_factor[chn][sblock];\n\n new_thmm[sblock] = thmm;\n }\n for (var sblock = 0; sblock < 3; sblock++) {\n gfc.thm[chn].s[sb][sblock] = new_thmm[sblock];\n }\n }\n }\n }\n for (var chn = 0; chn < n_chn_psy; chn++) {\n gfc.nsPsy.lastAttacks[chn] = ns_attacks[chn][2];\n }\n\n /***************************************************************\n * determine final block type\n ***************************************************************/\n vbrpsy_apply_block_type(gfp, uselongblock, blocktype_d);\n\n /*********************************************************************\n * compute the value of PE to return ... no delay and advance\n *********************************************************************/\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ppe;\n var ppePos;\n var type;\n var mr;\n\n if (chn > 1) {\n ppe = percep_MS_entropy;\n ppePos = -2;\n type = Encoder.NORM_TYPE;\n if (blocktype_d[0] == Encoder.SHORT_TYPE\n || blocktype_d[1] == Encoder.SHORT_TYPE)\n type = Encoder.SHORT_TYPE;\n mr = masking_MS_ratio[gr_out][chn - 2];\n } else {\n ppe = percep_entropy;\n ppePos = 0;\n type = blocktype_d[chn];\n mr = masking_ratio[gr_out][chn];\n }\n\n if (type == Encoder.SHORT_TYPE) {\n ppe[ppePos + chn] = pecalc_s(mr, gfc.masking_lower);\n } else {\n ppe[ppePos + chn] = pecalc_l(mr, gfc.masking_lower);\n }\n\n if (gfp.analysis) {\n gfc.pinfo.pe[gr_out][chn] = ppe[ppePos + chn];\n }\n }\n return 0;\n }\n\n function s3_func_x(bark, hf_slope) {\n var tempx = bark, tempy;\n\n if (tempx >= 0) {\n tempy = -tempx * 27;\n } else {\n tempy = tempx * hf_slope;\n }\n if (tempy <= -72.0) {\n return 0;\n }\n return Math.exp(tempy * LN_TO_LOG10);\n }\n\n function norm_s3_func_x(hf_slope) {\n var lim_a = 0, lim_b = 0;\n {\n var x = 0, l, h;\n for (x = 0; s3_func_x(x, hf_slope) > 1e-20; x -= 1)\n ;\n l = x;\n h = 0;\n while (Math.abs(h - l) > 1e-12) {\n x = (h + l) / 2;\n if (s3_func_x(x, hf_slope) > 0) {\n h = x;\n } else {\n l = x;\n }\n }\n lim_a = l;\n }\n {\n var x = 0, l, h;\n for (x = 0; s3_func_x(x, hf_slope) > 1e-20; x += 1)\n ;\n l = 0;\n h = x;\n while (Math.abs(h - l) > 1e-12) {\n x = (h + l) / 2;\n if (s3_func_x(x, hf_slope) > 0) {\n l = x;\n } else {\n h = x;\n }\n }\n lim_b = h;\n }\n {\n var sum = 0;\n var m = 1000;\n var i;\n for (i = 0; i <= m; ++i) {\n var x = lim_a + i * (lim_b - lim_a) / m;\n var y = s3_func_x(x, hf_slope);\n sum += y;\n }\n {\n var norm = (m + 1) / (sum * (lim_b - lim_a));\n /* printf( \"norm = %lf\\n\",norm); */\n return norm;\n }\n }\n }\n\n /**\n * The spreading function. Values returned in units of energy\n */\n function s3_func(bark) {\n var tempx, x, tempy, temp;\n tempx = bark;\n if (tempx >= 0)\n tempx *= 3;\n else\n tempx *= 1.5;\n\n if (tempx >= 0.5 && tempx <= 2.5) {\n temp = tempx - 0.5;\n x = 8.0 * (temp * temp - 2.0 * temp);\n } else\n x = 0.0;\n tempx += 0.474;\n tempy = 15.811389 + 7.5 * tempx - 17.5\n * Math.sqrt(1.0 + tempx * tempx);\n\n if (tempy <= -60.0)\n return 0.0;\n\n tempx = Math.exp((x + tempy) * LN_TO_LOG10);\n\n /**\n *
\n         * Normalization.  The spreading function should be normalized so that:\n         * +inf\n         * /\n         * |  s3 [ bark ]  d(bark)   =  1\n         * /\n         * -inf\n         * 
\n */\n tempx /= .6609193;\n return tempx;\n }\n\n /**\n * see for example \"Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7\n */\n function freq2bark(freq) {\n /* input: freq in hz output: barks */\n if (freq < 0)\n freq = 0;\n freq = freq * 0.001;\n return 13.0 * Math.atan(.76 * freq) + 3.5\n * Math.atan(freq * freq / (7.5 * 7.5));\n }\n\n function init_numline(numlines, bo, bm, bval, bval_width, mld, bo_w, sfreq, blksize, scalepos, deltafreq, sbmax) {\n var b_frq = new_float(Encoder.CBANDS + 1);\n var sample_freq_frac = sfreq / (sbmax > 15 ? 2 * 576 : 2 * 192);\n var partition = new_int(Encoder.HBLKSIZE);\n var i;\n sfreq /= blksize;\n var j = 0;\n var ni = 0;\n /* compute numlines, the number of spectral lines in each partition band */\n /* each partition band should be about DELBARK wide. */\n for (i = 0; i < Encoder.CBANDS; i++) {\n var bark1;\n var j2;\n bark1 = freq2bark(sfreq * j);\n\n b_frq[i] = sfreq * j;\n\n for (j2 = j; freq2bark(sfreq * j2) - bark1 < DELBARK\n && j2 <= blksize / 2; j2++)\n ;\n\n numlines[i] = j2 - j;\n ni = i + 1;\n\n while (j < j2) {\n assert(j < Encoder.HBLKSIZE);\n partition[j++] = i;\n }\n if (j > blksize / 2) {\n j = blksize / 2;\n ++i;\n break;\n }\n }\n assert(i < Encoder.CBANDS);\n b_frq[i] = sfreq * j;\n\n for (var sfb = 0; sfb < sbmax; sfb++) {\n var i1, i2, start, end;\n var arg;\n start = scalepos[sfb];\n end = scalepos[sfb + 1];\n\n i1 = 0 | Math.floor(.5 + deltafreq * (start - .5));\n if (i1 < 0)\n i1 = 0;\n i2 = 0 | Math.floor(.5 + deltafreq * (end - .5));\n\n if (i2 > blksize / 2)\n i2 = blksize / 2;\n\n bm[sfb] = (partition[i1] + partition[i2]) / 2;\n bo[sfb] = partition[i2];\n var f_tmp = sample_freq_frac * end;\n /*\n * calculate how much of this band belongs to current scalefactor\n * band\n */\n bo_w[sfb] = (f_tmp - b_frq[bo[sfb]])\n / (b_frq[bo[sfb] + 1] - b_frq[bo[sfb]]);\n if (bo_w[sfb] < 0) {\n bo_w[sfb] = 0;\n } else {\n if (bo_w[sfb] > 1) {\n bo_w[sfb] = 1;\n }\n }\n /* setup stereo demasking thresholds */\n /* formula reverse enginerred from plot in paper */\n arg = freq2bark(sfreq * scalepos[sfb] * deltafreq);\n arg = ( Math.min(arg, 15.5) / 15.5);\n\n mld[sfb] = Math.pow(10.0,\n 1.25 * (1 - Math.cos(Math.PI * arg)) - 2.5);\n }\n\n /* compute bark values of each critical band */\n j = 0;\n for (var k = 0; k < ni; k++) {\n var w = numlines[k];\n var bark1, bark2;\n\n bark1 = freq2bark(sfreq * (j));\n bark2 = freq2bark(sfreq * (j + w - 1));\n bval[k] = .5 * (bark1 + bark2);\n\n bark1 = freq2bark(sfreq * (j - .5));\n bark2 = freq2bark(sfreq * (j + w - .5));\n bval_width[k] = bark2 - bark1;\n j += w;\n }\n\n return ni;\n }\n\n function init_s3_values(s3ind, npart, bval, bval_width, norm, use_old_s3) {\n var s3 = new_float_n([Encoder.CBANDS, Encoder.CBANDS]);\n /*\n * The s3 array is not linear in the bark scale.\n *\n * bval[x] should be used to get the bark value.\n */\n var j;\n var numberOfNoneZero = 0;\n\n /**\n *
\n         * s[i][j], the value of the spreading function,\n         * centered at band j (masker), for band i (maskee)\n         *\n         * i.e.: sum over j to spread into signal barkval=i\n         * NOTE: i and j are used opposite as in the ISO docs\n         * 
\n */\n if (use_old_s3) {\n for (var i = 0; i < npart; i++) {\n for (j = 0; j < npart; j++) {\n var v = s3_func(bval[i] - bval[j]) * bval_width[j];\n s3[i][j] = v * norm[i];\n }\n }\n } else {\n for (j = 0; j < npart; j++) {\n var hf_slope = 15 + Math.min(21 / bval[j], 12);\n var s3_x_norm = norm_s3_func_x(hf_slope);\n for (var i = 0; i < npart; i++) {\n var v = s3_x_norm\n * s3_func_x(bval[i] - bval[j], hf_slope)\n * bval_width[j];\n s3[i][j] = v * norm[i];\n }\n }\n }\n for (var i = 0; i < npart; i++) {\n for (j = 0; j < npart; j++) {\n if (s3[i][j] > 0.0)\n break;\n }\n s3ind[i][0] = j;\n\n for (j = npart - 1; j > 0; j--) {\n if (s3[i][j] > 0.0)\n break;\n }\n s3ind[i][1] = j;\n numberOfNoneZero += (s3ind[i][1] - s3ind[i][0] + 1);\n }\n\n var p = new_float(numberOfNoneZero);\n var k = 0;\n for (var i = 0; i < npart; i++)\n for (j = s3ind[i][0]; j <= s3ind[i][1]; j++)\n p[k++] = s3[i][j];\n\n return p;\n }\n\n function stereo_demask(f) {\n /* setup stereo demasking thresholds */\n /* formula reverse enginerred from plot in paper */\n var arg = freq2bark(f);\n arg = (Math.min(arg, 15.5) / 15.5);\n\n return Math.pow(10.0,\n 1.25 * (1 - Math.cos(Math.PI * arg)) - 2.5);\n }\n\n /**\n * NOTE: the bitrate reduction from the inter-channel masking effect is low\n * compared to the chance of getting annyoing artefacts. L3psycho_anal_vbr\n * does not use this feature. (Robert 071216)\n */\n this.psymodel_init = function (gfp) {\n var gfc = gfp.internal_flags;\n var i;\n var useOldS3 = true;\n var bvl_a = 13, bvl_b = 24;\n var snr_l_a = 0, snr_l_b = 0;\n var snr_s_a = -8.25, snr_s_b = -4.5;\n var bval = new_float(Encoder.CBANDS);\n var bval_width = new_float(Encoder.CBANDS);\n var norm = new_float(Encoder.CBANDS);\n var sfreq = gfp.out_samplerate;\n\n switch (gfp.experimentalZ) {\n default:\n case 0:\n useOldS3 = true;\n break;\n case 1:\n useOldS3 = (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) ? false\n : true;\n break;\n case 2:\n useOldS3 = false;\n break;\n case 3:\n bvl_a = 8;\n snr_l_a = -1.75;\n snr_l_b = -0.0125;\n snr_s_a = -8.25;\n snr_s_b = -2.25;\n break;\n }\n gfc.ms_ener_ratio_old = .25;\n gfc.blocktype_old[0] = gfc.blocktype_old[1] = Encoder.NORM_TYPE;\n // the vbr header is long blocks\n\n for (i = 0; i < 4; ++i) {\n for (var j = 0; j < Encoder.CBANDS; ++j) {\n gfc.nb_1[i][j] = 1e20;\n gfc.nb_2[i][j] = 1e20;\n gfc.nb_s1[i][j] = gfc.nb_s2[i][j] = 1.0;\n }\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n gfc.en[i].l[sb] = 1e20;\n gfc.thm[i].l[sb] = 1e20;\n }\n for (var j = 0; j < 3; ++j) {\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n gfc.en[i].s[sb][j] = 1e20;\n gfc.thm[i].s[sb][j] = 1e20;\n }\n gfc.nsPsy.lastAttacks[i] = 0;\n }\n for (var j = 0; j < 9; j++)\n gfc.nsPsy.last_en_subshort[i][j] = 10.;\n }\n\n /* init. for loudness approx. -jd 2001 mar 27 */\n gfc.loudness_sq_save[0] = gfc.loudness_sq_save[1] = 0.0;\n\n /*************************************************************************\n * now compute the psychoacoustic model specific constants\n ************************************************************************/\n /* compute numlines, bo, bm, bval, bval_width, mld */\n\n gfc.npart_l = init_numline(gfc.numlines_l, gfc.bo_l, gfc.bm_l, bval,\n bval_width, gfc.mld_l, gfc.PSY.bo_l_weight, sfreq,\n Encoder.BLKSIZE, gfc.scalefac_band.l, Encoder.BLKSIZE\n / (2.0 * 576), Encoder.SBMAX_l);\n assert(gfc.npart_l < Encoder.CBANDS);\n /* compute the spreading function */\n for (i = 0; i < gfc.npart_l; i++) {\n var snr = snr_l_a;\n if (bval[i] >= bvl_a) {\n snr = snr_l_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) + snr_l_a\n * (bvl_b - bval[i]) / (bvl_b - bvl_a);\n }\n norm[i] = Math.pow(10.0, snr / 10.0);\n if (gfc.numlines_l[i] > 0) {\n gfc.rnumlines_l[i] = 1.0 / gfc.numlines_l[i];\n } else {\n gfc.rnumlines_l[i] = 0;\n }\n }\n gfc.s3_ll = init_s3_values(gfc.s3ind, gfc.npart_l, bval, bval_width,\n norm, useOldS3);\n\n /* compute long block specific values, ATH and MINVAL */\n var j = 0;\n for (i = 0; i < gfc.npart_l; i++) {\n var x;\n\n /* ATH */\n x = Float.MAX_VALUE;\n for (var k = 0; k < gfc.numlines_l[i]; k++, j++) {\n var freq = sfreq * j / (1000.0 * Encoder.BLKSIZE);\n var level;\n /*\n * ATH below 100 Hz constant, not further climbing\n */\n level = this.ATHformula(freq * 1000, gfp) - 20;\n // scale to FFT units; returned value is in dB\n level = Math.pow(10., 0.1 * level);\n // convert from dB . energy\n level *= gfc.numlines_l[i];\n if (x > level)\n x = level;\n }\n gfc.ATH.cb_l[i] = x;\n\n /*\n * MINVAL. For low freq, the strength of the masking is limited by\n * minval this is an ISO MPEG1 thing, dont know if it is really\n * needed\n */\n /*\n * FIXME: it does work to reduce low-freq problems in S53-Wind-Sax\n * and lead-voice samples, but introduces some 3 kbps bit bloat too.\n * TODO: Further refinement of the shape of this hack.\n */\n x = -20 + bval[i] * 20 / 10;\n if (x > 6) {\n x = 100;\n }\n if (x < -15) {\n x = -15;\n }\n x -= 8.;\n gfc.minval_l[i] = (Math.pow(10.0, x / 10.) * gfc.numlines_l[i]);\n }\n\n /************************************************************************\n * do the same things for short blocks\n ************************************************************************/\n gfc.npart_s = init_numline(gfc.numlines_s, gfc.bo_s, gfc.bm_s, bval,\n bval_width, gfc.mld_s, gfc.PSY.bo_s_weight, sfreq,\n Encoder.BLKSIZE_s, gfc.scalefac_band.s, Encoder.BLKSIZE_s\n / (2.0 * 192), Encoder.SBMAX_s);\n assert(gfc.npart_s < Encoder.CBANDS);\n\n /* SNR formula. short block is normalized by SNR. is it still right ? */\n j = 0;\n for (i = 0; i < gfc.npart_s; i++) {\n var x;\n var snr = snr_s_a;\n if (bval[i] >= bvl_a) {\n snr = snr_s_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) + snr_s_a\n * (bvl_b - bval[i]) / (bvl_b - bvl_a);\n }\n norm[i] = Math.pow(10.0, snr / 10.0);\n\n /* ATH */\n x = Float.MAX_VALUE;\n for (var k = 0; k < gfc.numlines_s[i]; k++, j++) {\n var freq = sfreq * j / (1000.0 * Encoder.BLKSIZE_s);\n var level;\n /* freq = Min(.1,freq); */\n /*\n * ATH below 100 Hz constant, not\n * further climbing\n */\n level = this.ATHformula(freq * 1000, gfp) - 20;\n // scale to FFT units; returned value is in dB\n level = Math.pow(10., 0.1 * level);\n // convert from dB . energy\n level *= gfc.numlines_s[i];\n if (x > level)\n x = level;\n }\n gfc.ATH.cb_s[i] = x;\n\n /*\n * MINVAL. For low freq, the strength of the masking is limited by\n * minval this is an ISO MPEG1 thing, dont know if it is really\n * needed\n */\n x = (-7.0 + bval[i] * 7.0 / 12.0);\n if (bval[i] > 12) {\n x *= 1 + Math.log(1 + x) * 3.1;\n }\n if (bval[i] < 12) {\n x *= 1 + Math.log(1 - x) * 2.3;\n }\n if (x < -15) {\n x = -15;\n }\n x -= 8;\n gfc.minval_s[i] = Math.pow(10.0, x / 10)\n * gfc.numlines_s[i];\n }\n\n gfc.s3_ss = init_s3_values(gfc.s3ind_s, gfc.npart_s, bval, bval_width,\n norm, useOldS3);\n\n init_mask_add_max_values();\n fft.init_fft(gfc);\n\n /* setup temporal masking */\n gfc.decay = Math.exp(-1.0 * LOG10\n / (temporalmask_sustain_sec * sfreq / 192.0));\n\n {\n var msfix;\n msfix = NS_MSFIX;\n if ((gfp.exp_nspsytune & 2) != 0)\n msfix = 1.0;\n if (Math.abs(gfp.msfix) > 0.0)\n msfix = gfp.msfix;\n gfp.msfix = msfix;\n\n /*\n * spread only from npart_l bands. Normally, we use the spreading\n * function to convolve from npart_l down to npart_l bands\n */\n for (var b = 0; b < gfc.npart_l; b++)\n if (gfc.s3ind[b][1] > gfc.npart_l - 1)\n gfc.s3ind[b][1] = gfc.npart_l - 1;\n }\n\n /*\n * prepare for ATH auto adjustment: we want to decrease the ATH by 12 dB\n * per second\n */\n var frame_duration = (576. * gfc.mode_gr / sfreq);\n gfc.ATH.decay = Math.pow(10., -12. / 10. * frame_duration);\n gfc.ATH.adjust = 0.01;\n /* minimum, for leading low loudness */\n gfc.ATH.adjustLimit = 1.0;\n /* on lead, allow adjust up to maximum */\n\n assert(gfc.bo_l[Encoder.SBMAX_l - 1] <= gfc.npart_l);\n assert(gfc.bo_s[Encoder.SBMAX_s - 1] <= gfc.npart_s);\n\n if (gfp.ATHtype != -1) {\n /* compute equal loudness weights (eql_w) */\n var freq;\n var freq_inc = gfp.out_samplerate\n / (Encoder.BLKSIZE);\n var eql_balance = 0.0;\n freq = 0.0;\n for (i = 0; i < Encoder.BLKSIZE / 2; ++i) {\n /* convert ATH dB to relative power (not dB) */\n /* to determine eql_w */\n freq += freq_inc;\n gfc.ATH.eql_w[i] = 1. / Math.pow(10, this.ATHformula(freq, gfp) / 10);\n eql_balance += gfc.ATH.eql_w[i];\n }\n eql_balance = 1.0 / eql_balance;\n for (i = Encoder.BLKSIZE / 2; --i >= 0;) { /* scale weights */\n gfc.ATH.eql_w[i] *= eql_balance;\n }\n }\n {\n for (var b = j = 0; b < gfc.npart_s; ++b) {\n for (i = 0; i < gfc.numlines_s[b]; ++i) {\n ++j;\n }\n }\n assert(j == 129);\n for (var b = j = 0; b < gfc.npart_l; ++b) {\n for (i = 0; i < gfc.numlines_l[b]; ++i) {\n ++j;\n }\n }\n assert(j == 513);\n }\n j = 0;\n for (i = 0; i < gfc.npart_l; i++) {\n var freq = sfreq * (j + gfc.numlines_l[i] / 2) / (1.0 * Encoder.BLKSIZE);\n gfc.mld_cb_l[i] = stereo_demask(freq);\n j += gfc.numlines_l[i];\n }\n for (; i < Encoder.CBANDS; ++i) {\n gfc.mld_cb_l[i] = 1;\n }\n j = 0;\n for (i = 0; i < gfc.npart_s; i++) {\n var freq = sfreq * (j + gfc.numlines_s[i] / 2) / (1.0 * Encoder.BLKSIZE_s);\n gfc.mld_cb_s[i] = stereo_demask(freq);\n j += gfc.numlines_s[i];\n }\n for (; i < Encoder.CBANDS; ++i) {\n gfc.mld_cb_s[i] = 1;\n }\n return 0;\n }\n\n /**\n * Those ATH formulas are returning their minimum value for input = -1\n */\n function ATHformula_GB(f, value) {\n /**\n *
\n         *  from Painter & Spanias\n         *           modified by Gabriel Bouvigne to better fit the reality\n         *           ath =    3.640 * pow(f,-0.8)\n         *           - 6.800 * exp(-0.6*pow(f-3.4,2.0))\n         *           + 6.000 * exp(-0.15*pow(f-8.7,2.0))\n         *           + 0.6* 0.001 * pow(f,4.0);\n         *\n         *\n         *           In the past LAME was using the Painter &Spanias formula.\n         *           But we had some recurrent problems with HF content.\n         *           We measured real ATH values, and found the older formula\n         *           to be inaccurate in the higher part. So we made this new\n         *           formula and this solved most of HF problematic test cases.\n         *           The tradeoff is that in VBR mode it increases a lot the\n         *           bitrate.\n         * 
\n */\n\n /*\n * This curve can be adjusted according to the VBR scale: it adjusts\n * from something close to Painter & Spanias on V9 up to Bouvigne's\n * formula for V0. This way the VBR bitrate is more balanced according\n * to the -V value.\n */\n\n // the following Hack allows to ask for the lowest value\n if (f < -.3)\n f = 3410;\n\n // convert to khz\n f /= 1000;\n f = Math.max(0.1, f);\n var ath = 3.640 * Math.pow(f, -0.8) - 6.800\n * Math.exp(-0.6 * Math.pow(f - 3.4, 2.0)) + 6.000\n * Math.exp(-0.15 * Math.pow(f - 8.7, 2.0))\n + (0.6 + 0.04 * value) * 0.001 * Math.pow(f, 4.0);\n return ath;\n }\n\n this.ATHformula = function (f, gfp) {\n var ath;\n switch (gfp.ATHtype) {\n case 0:\n ath = ATHformula_GB(f, 9);\n break;\n case 1:\n // over sensitive, should probably be removed\n ath = ATHformula_GB(f, -1);\n break;\n case 2:\n ath = ATHformula_GB(f, 0);\n break;\n case 3:\n // modification of GB formula by Roel\n ath = ATHformula_GB(f, 1) + 6;\n break;\n case 4:\n ath = ATHformula_GB(f, gfp.ATHcurve);\n break;\n default:\n ath = ATHformula_GB(f, 0);\n break;\n }\n return ath;\n }\n\n}\n\nmodule.exports = PsyModel;\n","//package mp3;\n\n/* MPEG modes */\nfunction MPEGMode(ordinal) {\n var _ordinal = ordinal;\n this.ordinal = function () {\n return _ordinal;\n }\n}\n\nMPEGMode.STEREO = new MPEGMode(0);\nMPEGMode.JOINT_STEREO = new MPEGMode(1);\nMPEGMode.DUAL_CHANNEL = new MPEGMode(2);\nMPEGMode.MONO = new MPEGMode(3);\nMPEGMode.NOT_SET = new MPEGMode(4);\n\nmodule.exports = MPEGMode;\n","var MPEGMode = require('./MPEGMode.js');\n\nfunction LameGlobalFlags() {\n\n this.class_id = 0;\n\n /* input description */\n\n /**\n * number of samples. default=-1\n */\n this.num_samples = 0;\n /**\n * input number of channels. default=2\n */\n this.num_channels = 0;\n /**\n * input_samp_rate in Hz. default=44.1 kHz\n */\n this.in_samplerate = 0;\n /**\n * output_samp_rate. default: LAME picks best value at least not used for\n * MP3 decoding: Remember 44.1 kHz MP3s and AC97\n */\n this.out_samplerate = 0;\n /**\n * scale input by this amount before encoding at least not used for MP3\n * decoding\n */\n this.scale = 0.;\n /**\n * scale input of channel 0 (left) by this amount before encoding\n */\n this.scale_left = 0.;\n /**\n * scale input of channel 1 (right) by this amount before encoding\n */\n this.scale_right = 0.;\n\n /* general control params */\n /**\n * collect data for a MP3 frame analyzer?\n */\n this.analysis = false;\n /**\n * add Xing VBR tag?\n */\n this.bWriteVbrTag = false;\n\n /**\n * use lame/mpglib to convert mp3 to wav\n */\n this.decode_only = false;\n /**\n * quality setting 0=best, 9=worst default=5\n */\n this.quality = 0;\n /**\n * see enum default = LAME picks best value\n */\n this.mode = MPEGMode.STEREO;\n /**\n * force M/S mode. requires mode=1\n */\n this.force_ms = false;\n /**\n * use free format? default=0\n */\n this.free_format = false;\n /**\n * find the RG value? default=0\n */\n this.findReplayGain = false;\n /**\n * decode on the fly? default=0\n */\n this.decode_on_the_fly = false;\n /**\n * 1 (default) writes ID3 tags, 0 not\n */\n this.write_id3tag_automatic = false;\n\n /*\n * set either brate>0 or compression_ratio>0, LAME will compute the value of\n * the variable not set. Default is compression_ratio = 11.025\n */\n /**\n * bitrate\n */\n this.brate = 0;\n /**\n * sizeof(wav file)/sizeof(mp3 file)\n */\n this.compression_ratio = 0.;\n\n /* frame params */\n /**\n * mark as copyright. default=0\n */\n this.copyright = 0;\n /**\n * mark as original. default=1\n */\n this.original = 0;\n /**\n * the MP3 'private extension' bit. Meaningless\n */\n this.extension = 0;\n /**\n * Input PCM is emphased PCM (for instance from one of the rarely emphased\n * CDs), it is STRONGLY not recommended to use this, because psycho does not\n * take it into account, and last but not least many decoders don't care\n * about these bits\n */\n this.emphasis = 0;\n /**\n * use 2 bytes per frame for a CRC checksum. default=0\n */\n this.error_protection = 0;\n /**\n * enforce ISO spec as much as possible\n */\n this.strict_ISO = false;\n\n /**\n * use bit reservoir?\n */\n this.disable_reservoir = false;\n\n /* quantization/noise shaping */\n this.quant_comp = 0;\n this.quant_comp_short = 0;\n this.experimentalY = false;\n this.experimentalZ = 0;\n this.exp_nspsytune = 0;\n\n this.preset = 0;\n\n /* VBR control */\n this.VBR = null;\n /**\n * Range [0,...,1[\n */\n this.VBR_q_frac = 0.;\n /**\n * Range [0,...,9]\n */\n this.VBR_q = 0;\n this.VBR_mean_bitrate_kbps = 0;\n this.VBR_min_bitrate_kbps = 0;\n this.VBR_max_bitrate_kbps = 0;\n /**\n * strictly enforce VBR_min_bitrate normaly, it will be violated for analog\n * silence\n */\n this.VBR_hard_min = 0;\n\n /* resampling and filtering */\n\n /**\n * freq in Hz. 0=lame choses. -1=no filter\n */\n this.lowpassfreq = 0;\n /**\n * freq in Hz. 0=lame choses. -1=no filter\n */\n this.highpassfreq = 0;\n /**\n * freq width of filter, in Hz (default=15%)\n */\n this.lowpasswidth = 0;\n /**\n * freq width of filter, in Hz (default=15%)\n */\n this.highpasswidth = 0;\n\n /*\n * psycho acoustics and other arguments which you should not change unless\n * you know what you are doing\n */\n\n this.maskingadjust = 0.;\n this.maskingadjust_short = 0.;\n /**\n * only use ATH\n */\n this.ATHonly = false;\n /**\n * only use ATH for short blocks\n */\n this.ATHshort = false;\n /**\n * disable ATH\n */\n this.noATH = false;\n /**\n * select ATH formula\n */\n this.ATHtype = 0;\n /**\n * change ATH formula 4 shape\n */\n this.ATHcurve = 0.;\n /**\n * lower ATH by this many db\n */\n this.ATHlower = 0.;\n /**\n * select ATH auto-adjust scheme\n */\n this.athaa_type = 0;\n /**\n * select ATH auto-adjust loudness calc\n */\n this.athaa_loudapprox = 0;\n /**\n * dB, tune active region of auto-level\n */\n this.athaa_sensitivity = 0.;\n this.short_blocks = null;\n /**\n * use temporal masking effect\n */\n this.useTemporal = false;\n this.interChRatio = 0.;\n /**\n * Naoki's adjustment of Mid/Side maskings\n */\n this.msfix = 0.;\n\n /**\n * 0 off, 1 on\n */\n this.tune = false;\n /**\n * used to pass values for debugging and stuff\n */\n this.tune_value_a = 0.;\n\n /************************************************************************/\n /* internal variables, do not set... */\n /* provided because they may be of use to calling application */\n /************************************************************************/\n\n /**\n * 0=MPEG-2/2.5 1=MPEG-1\n */\n this.version = 0;\n this.encoder_delay = 0;\n /**\n * number of samples of padding appended to input\n */\n this.encoder_padding = 0;\n this.framesize = 0;\n /**\n * number of frames encoded\n */\n this.frameNum = 0;\n /**\n * is this struct owned by calling program or lame?\n */\n this.lame_allocated_gfp = 0;\n /**************************************************************************/\n /* more internal variables are stored in this structure: */\n /**************************************************************************/\n this.internal_flags = null;\n}\n\nmodule.exports = LameGlobalFlags;\n","var Encoder = require('./Encoder.js');\n\nvar L3Side = {};\n\n\n\t/**\n\t * max scalefactor band, max(SBMAX_l, SBMAX_s*3, (SBMAX_s-3)*3+8)\n\t */\nL3Side.SFBMAX = (Encoder.SBMAX_s * 3);\n\nmodule.exports = L3Side;\n","//package mp3;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar L3Side = require('./L3Side.js');\n\nfunction GrInfo() {\n //float xr[] = new float[576];\n this.xr = new_float(576);\n //int l3_enc[] = new int[576];\n this.l3_enc = new_int(576);\n //int scalefac[] = new int[L3Side.SFBMAX];\n this.scalefac = new_int(L3Side.SFBMAX);\n this.xrpow_max = 0.;\n\n this.part2_3_length = 0;\n this.big_values = 0;\n this.count1 = 0;\n this.global_gain = 0;\n this.scalefac_compress = 0;\n this.block_type = 0;\n this.mixed_block_flag = 0;\n this.table_select = new_int(3);\n this.subblock_gain = new_int(3 + 1);\n this.region0_count = 0;\n this.region1_count = 0;\n this.preflag = 0;\n this.scalefac_scale = 0;\n this.count1table_select = 0;\n\n this.part2_length = 0;\n this.sfb_lmax = 0;\n this.sfb_smin = 0;\n this.psy_lmax = 0;\n this.sfbmax = 0;\n this.psymax = 0;\n this.sfbdivide = 0;\n this.width = new_int(L3Side.SFBMAX);\n this.window = new_int(L3Side.SFBMAX);\n this.count1bits = 0;\n /**\n * added for LSF\n */\n this.sfb_partition_table = null;\n this.slen = new_int(4);\n\n this.max_nonzero_coeff = 0;\n\n var self = this;\n function clone_int(array) {\n return new Int32Array(array);\n }\n function clone_float(array) {\n return new Float32Array(array);\n }\n this.assign = function (other) {\n self.xr = clone_float(other.xr); //.slice(0); //clone();\n self.l3_enc = clone_int(other.l3_enc); //.slice(0); //clone();\n self.scalefac = clone_int(other.scalefac);//.slice(0); //clone();\n self.xrpow_max = other.xrpow_max;\n\n self.part2_3_length = other.part2_3_length;\n self.big_values = other.big_values;\n self.count1 = other.count1;\n self.global_gain = other.global_gain;\n self.scalefac_compress = other.scalefac_compress;\n self.block_type = other.block_type;\n self.mixed_block_flag = other.mixed_block_flag;\n self.table_select = clone_int(other.table_select);//.slice(0); //clone();\n self.subblock_gain = clone_int(other.subblock_gain); //.slice(0); //.clone();\n self.region0_count = other.region0_count;\n self.region1_count = other.region1_count;\n self.preflag = other.preflag;\n self.scalefac_scale = other.scalefac_scale;\n self.count1table_select = other.count1table_select;\n\n self.part2_length = other.part2_length;\n self.sfb_lmax = other.sfb_lmax;\n self.sfb_smin = other.sfb_smin;\n self.psy_lmax = other.psy_lmax;\n self.sfbmax = other.sfbmax;\n self.psymax = other.psymax;\n self.sfbdivide = other.sfbdivide;\n self.width = clone_int(other.width); //.slice(0); //.clone();\n self.window = clone_int(other.window); //.slice(0); //.clone();\n self.count1bits = other.count1bits;\n\n self.sfb_partition_table = other.sfb_partition_table.slice(0); //.clone();\n self.slen = clone_int(other.slen); //.slice(0); //.clone();\n self.max_nonzero_coeff = other.max_nonzero_coeff;\n }\n}\n\nmodule.exports = GrInfo;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar GrInfo = require('./GrInfo.js');\n\nfunction IIISideInfo() {\n this.tt = [[null, null], [null, null]];\n this.main_data_begin = 0;\n this.private_bits = 0;\n this.resvDrain_pre = 0;\n this.resvDrain_post = 0;\n this.scfsi = [new_int(4), new_int(4)];\n\n for (var gr = 0; gr < 2; gr++) {\n for (var ch = 0; ch < 2; ch++) {\n this.tt[gr][ch] = new GrInfo();\n }\n }\n}\n\nmodule.exports = IIISideInfo;\n","//package mp3;\n\n/**\n * Layer III side information.\n *\n * @author Ken\n *\n */\n\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\nfunction ScaleFac(arrL, arrS, arr21, arr12) {\n\n this.l = new_int(1 + Encoder.SBMAX_l);\n this.s = new_int(1 + Encoder.SBMAX_s);\n this.psfb21 = new_int(1 + Encoder.PSFB21);\n this.psfb12 = new_int(1 + Encoder.PSFB12);\n var l = this.l;\n var s = this.s;\n\n if (arguments.length == 4) {\n //public ScaleFac(final int[] arrL, final int[] arrS, final int[] arr21,\n // final int[] arr12) {\n this.arrL = arguments[0];\n this.arrS = arguments[1];\n this.arr21 = arguments[2];\n this.arr12 = arguments[3];\n\n System.arraycopy(this.arrL, 0, l, 0, Math.min(this.arrL.length, this.l.length));\n System.arraycopy(this.arrS, 0, s, 0, Math.min(this.arrS.length, this.s.length));\n System.arraycopy(this.arr21, 0, this.psfb21, 0, Math.min(this.arr21.length, this.psfb21.length));\n System.arraycopy(this.arr12, 0, this.psfb12, 0, Math.min(this.arr12.length, this.psfb12.length));\n }\n}\n\nmodule.exports = ScaleFac;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n//package mp3;\n\n/**\n * Variables used for --nspsytune\n *\n * @author Ken\n *\n */\nfunction NsPsy() {\n this.last_en_subshort = new_float_n([4, 9]);\n this.lastAttacks = new_int(4);\n this.pefirbuf = new_float(19);\n this.longfact = new_float(Encoder.SBMAX_l);\n this.shortfact = new_float(Encoder.SBMAX_s);\n\n /**\n * short block tuning\n */\n this.attackthre = 0.;\n this.attackthre_s = 0.;\n}\n\nmodule.exports = NsPsy;\n","//package mp3;\n\nfunction VBRSeekInfo() {\n /**\n * What we have seen so far.\n */\n this.sum = 0;\n /**\n * How many frames we have seen in this chunk.\n */\n this.seen = 0;\n /**\n * How many frames we want to collect into one chunk.\n */\n this.want = 0;\n /**\n * Actual position in our bag.\n */\n this.pos = 0;\n /**\n * Size of our bag.\n */\n this.size = 0;\n /**\n * Pointer to our bag.\n */\n this.bag = null;\n this.nVbrNumFrames = 0;\n this.nBytesWritten = 0;\n /* VBR tag data */\n this.TotalFrameSize = 0;\n}\n\nmodule.exports = VBRSeekInfo;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar IIISideInfo = require('./IIISideInfo.js');\nvar ScaleFac = require('./ScaleFac.js');\nvar NsPsy = require('./NsPsy.js');\nvar VBRSeekInfo = require('./VBRSeekInfo.js');\nvar III_psy_xmin = require('./III_psy_xmin.js');\nvar Encoder = require('./Encoder.js');\nvar L3Side = require('./L3Side.js');\n\n\nLameInternalFlags.MFSIZE = (3 * 1152 + Encoder.ENCDELAY - Encoder.MDCTDELAY);\nLameInternalFlags.MAX_HEADER_BUF = 256;\nLameInternalFlags.MAX_BITS_PER_CHANNEL = 4095;\nLameInternalFlags.MAX_BITS_PER_GRANULE = 7680;\nLameInternalFlags.BPC = 320;\n\nfunction LameInternalFlags() {\n var MAX_HEADER_LEN = 40;\n\n\n /********************************************************************\n * internal variables NOT set by calling program, and should not be *\n * modified by the calling program *\n ********************************************************************/\n\n /**\n * Some remarks to the Class_ID field: The Class ID is an Identifier for a\n * pointer to this struct. It is very unlikely that a pointer to\n * lame_global_flags has the same 32 bits in it's structure (large and other\n * special properties, for instance prime).\n *\n * To test that the structure is right and initialized, use: if ( gfc .\n * Class_ID == LAME_ID ) ... Other remark: If you set a flag to 0 for uninit\n * data and 1 for init data, the right test should be \"if (flag == 1)\" and\n * NOT \"if (flag)\". Unintended modification of this element will be\n * otherwise misinterpreted as an init.\n */\n this.Class_ID = 0;\n\n this.lame_encode_frame_init = 0;\n this.iteration_init_init = 0;\n this.fill_buffer_resample_init = 0;\n\n //public float mfbuf[][] = new float[2][MFSIZE];\n this.mfbuf = new_float_n([2, LameInternalFlags.MFSIZE]);\n\n /**\n * granules per frame\n */\n this.mode_gr = 0;\n /**\n * number of channels in the input data stream (PCM or decoded PCM)\n */\n this.channels_in = 0;\n /**\n * number of channels in the output data stream (not used for decoding)\n */\n this.channels_out = 0;\n /**\n * input_samp_rate/output_samp_rate\n */\n //public double resample_ratio;\n this.resample_ratio = 0.;\n\n this.mf_samples_to_encode = 0;\n this.mf_size = 0;\n /**\n * min bitrate index\n */\n this.VBR_min_bitrate = 0;\n /**\n * max bitrate index\n */\n this.VBR_max_bitrate = 0;\n this.bitrate_index = 0;\n this.samplerate_index = 0;\n this.mode_ext = 0;\n\n /* lowpass and highpass filter control */\n /**\n * normalized frequency bounds of passband\n */\n this.lowpass1 = 0.;\n this.lowpass2 = 0.;\n /**\n * normalized frequency bounds of passband\n */\n this.highpass1 = 0.;\n this.highpass2 = 0.;\n\n /**\n * 0 = none 1 = ISO AAC model 2 = allow scalefac_select=1\n */\n this.noise_shaping = 0;\n\n /**\n * 0 = ISO model: amplify all distorted bands
\n * 1 = amplify within 50% of max (on db scale)
\n * 2 = amplify only most distorted band
\n * 3 = method 1 and refine with method 2
\n */\n this.noise_shaping_amp = 0;\n /**\n * 0 = no substep
\n * 1 = use substep shaping at last step(VBR only)
\n * (not implemented yet)
\n * 2 = use substep inside loop
\n * 3 = use substep inside loop and last step
\n */\n this.substep_shaping = 0;\n\n /**\n * 1 = gpsycho. 0 = none\n */\n this.psymodel = 0;\n /**\n * 0 = stop at over=0, all scalefacs amplified or
\n * a scalefac has reached max value
\n * 1 = stop when all scalefacs amplified or a scalefac has reached max value
\n * 2 = stop when all scalefacs amplified\n */\n this.noise_shaping_stop = 0;\n\n /**\n * 0 = no, 1 = yes\n */\n this.subblock_gain = 0;\n /**\n * 0 = no. 1=outside loop 2=inside loop(slow)\n */\n this.use_best_huffman = 0;\n\n /**\n * 0 = stop early after 0 distortion found. 1 = full search\n */\n this.full_outer_loop = 0;\n\n //public IIISideInfo l3_side = new IIISideInfo();\n this.l3_side = new IIISideInfo();\n this.ms_ratio = new_float(2);\n\n /* used for padding */\n /**\n * padding for the current frame?\n */\n this.padding = 0;\n this.frac_SpF = 0;\n this.slot_lag = 0;\n\n /**\n * optional ID3 tags\n */\n //public ID3TagSpec tag_spec;\n this.tag_spec = null;\n this.nMusicCRC = 0;\n\n /* variables used by Quantize */\n //public int OldValue[] = new int[2];\n this.OldValue = new_int(2);\n //public int CurrentStep[] = new int[2];\n this.CurrentStep = new_int(2);\n\n this.masking_lower = 0.;\n //public int bv_scf[] = new int[576];\n this.bv_scf = new_int(576);\n //public int pseudohalf[] = new int[L3Side.SFBMAX];\n this.pseudohalf = new_int(L3Side.SFBMAX);\n\n /**\n * will be set in lame_init_params\n */\n this.sfb21_extra = false;\n\n /* BPC = maximum number of filter convolution windows to precompute */\n //public float[][] inbuf_old = new float[2][];\n this.inbuf_old = new Array(2);\n //public float[][] blackfilt = new float[2 * BPC + 1][];\n this.blackfilt = new Array(2 * LameInternalFlags.BPC + 1);\n //public double itime[] = new double[2];\n this.itime = new_double(2);\n this.sideinfo_len = 0;\n\n /* variables for newmdct.c */\n //public float sb_sample[][][][] = new float[2][2][18][Encoder.SBLIMIT];\n this.sb_sample = new_float_n([2, 2, 18, Encoder.SBLIMIT]);\n this.amp_filter = new_float(32);\n\n /* variables for BitStream */\n\n /**\n *
\n     * mpeg1: buffer=511 bytes  smallest frame: 96-38(sideinfo)=58\n     * max number of frames in reservoir:  8\n     * mpeg2: buffer=255 bytes.  smallest frame: 24-23bytes=1\n     * with VBR, if you are encoding all silence, it is possible to\n     * have 8kbs/24khz frames with 1byte of data each, which means we need\n     * to buffer up to 255 headers!\n     * 
\n */\n /**\n * also, max_header_buf has to be a power of two\n */\n /**\n * max size of header is 38\n */\n\n function Header() {\n this.write_timing = 0;\n this.ptr = 0;\n //public byte buf[] = new byte[MAX_HEADER_LEN];\n this.buf = new_byte(MAX_HEADER_LEN);\n }\n\n this.header = new Array(LameInternalFlags.MAX_HEADER_BUF);\n\n this.h_ptr = 0;\n this.w_ptr = 0;\n this.ancillary_flag = 0;\n\n /* variables for Reservoir */\n /**\n * in bits\n */\n this.ResvSize = 0;\n /**\n * in bits\n */\n this.ResvMax = 0;\n\n //public ScaleFac scalefac_band = new ScaleFac();\n this.scalefac_band = new ScaleFac();\n\n /* daa from PsyModel */\n /* The static variables \"r\", \"phi_sav\", \"new\", \"old\" and \"oldest\" have */\n /* to be remembered for the unpredictability measure. For \"r\" and */\n /* \"phi_sav\", the first index from the left is the channel select and */\n /* the second index is the \"age\" of the data. */\n this.minval_l = new_float(Encoder.CBANDS);\n this.minval_s = new_float(Encoder.CBANDS);\n this.nb_1 = new_float_n([4, Encoder.CBANDS]);\n this.nb_2 = new_float_n([4, Encoder.CBANDS]);\n this.nb_s1 = new_float_n([4, Encoder.CBANDS]);\n this.nb_s2 = new_float_n([4, Encoder.CBANDS]);\n this.s3_ss = null;\n this.s3_ll = null;\n this.decay = 0.;\n\n //public III_psy_xmin[] thm = new III_psy_xmin[4];\n //public III_psy_xmin[] en = new III_psy_xmin[4];\n this.thm = new Array(4);\n this.en = new Array(4);\n\n /**\n * fft and energy calculation\n */\n this.tot_ener = new_float(4);\n\n /* loudness calculation (for adaptive threshold of hearing) */\n /**\n * loudness^2 approx. per granule and channel\n */\n this.loudness_sq = new_float_n([2, 2]);\n /**\n * account for granule delay of L3psycho_anal\n */\n this.loudness_sq_save = new_float(2);\n\n /**\n * Scale Factor Bands\n */\n this.mld_l = new_float(Encoder.SBMAX_l);\n this.mld_s = new_float(Encoder.SBMAX_s);\n this.bm_l = new_int(Encoder.SBMAX_l);\n this.bo_l = new_int(Encoder.SBMAX_l);\n this.bm_s = new_int(Encoder.SBMAX_s);\n this.bo_s = new_int(Encoder.SBMAX_s);\n this.npart_l = 0;\n this.npart_s = 0;\n\n this.s3ind = new_int_n([Encoder.CBANDS, 2]);\n this.s3ind_s = new_int_n([Encoder.CBANDS, 2]);\n\n this.numlines_s = new_int(Encoder.CBANDS);\n this.numlines_l = new_int(Encoder.CBANDS);\n this.rnumlines_l = new_float(Encoder.CBANDS);\n this.mld_cb_l = new_float(Encoder.CBANDS);\n this.mld_cb_s = new_float(Encoder.CBANDS);\n this.numlines_s_num1 = 0;\n this.numlines_l_num1 = 0;\n\n /* ratios */\n this.pe = new_float(4);\n this.ms_ratio_s_old = 0.;\n this.ms_ratio_l_old = 0.;\n this.ms_ener_ratio_old = 0.;\n\n /**\n * block type\n */\n this.blocktype_old = new_int(2);\n\n /**\n * variables used for --nspsytune\n */\n this.nsPsy = new NsPsy();\n\n /**\n * used for Xing VBR header\n */\n this.VBR_seek_table = new VBRSeekInfo();\n\n /**\n * all ATH related stuff\n */\n //public ATH ATH;\n this.ATH = null;\n\n this.PSY = null;\n\n this.nogap_total = 0;\n this.nogap_current = 0;\n\n /* ReplayGain */\n this.decode_on_the_fly = true;\n this.findReplayGain = true;\n this.findPeakSample = true;\n this.PeakSample = 0.;\n this.RadioGain = 0;\n this.AudiophileGain = 0;\n //public ReplayGain rgdata;\n this.rgdata = null;\n\n /**\n * gain change required for preventing clipping\n */\n this.noclipGainChange = 0;\n /**\n * user-specified scale factor required for preventing clipping\n */\n this.noclipScale = 0.;\n\n /* simple statistics */\n this.bitrate_stereoMode_Hist = new_int_n([16, 4 + 1]);\n /**\n * norm/start/short/stop/mixed(short)/sum\n */\n this.bitrate_blockType_Hist = new_int_n([16, 4 + 1 + 1]);\n\n //public PlottingData pinfo;\n //public MPGLib.mpstr_tag hip;\n this.pinfo = null;\n this.hip = null;\n\n this.in_buffer_nsamples = 0;\n //public float[] in_buffer_0;\n //public float[] in_buffer_1;\n this.in_buffer_0 = null;\n this.in_buffer_1 = null;\n\n //public IIterationLoop iteration_loop;\n this.iteration_loop = null;\n\n for (var i = 0; i < this.en.length; i++) {\n this.en[i] = new III_psy_xmin();\n }\n for (var i = 0; i < this.thm.length; i++) {\n this.thm[i] = new III_psy_xmin();\n }\n for (var i = 0; i < this.header.length; i++) {\n this.header[i] = new Header();\n }\n\n}\n\nmodule.exports = LameInternalFlags;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n/**\n * ATH related stuff, if something new ATH related has to be added, please plug\n * it here into the ATH.\n */\nfunction ATH() {\n /**\n * Method for the auto adjustment.\n */\n this.useAdjust = 0;\n /**\n * factor for tuning the (sample power) point below which adaptive threshold\n * of hearing adjustment occurs\n */\n this.aaSensitivityP = 0.;\n /**\n * Lowering based on peak volume, 1 = no lowering.\n */\n this.adjust = 0.;\n /**\n * Limit for dynamic ATH adjust.\n */\n this.adjustLimit = 0.;\n /**\n * Determined to lower x dB each second.\n */\n this.decay = 0.;\n /**\n * Lowest ATH value.\n */\n this.floor = 0.;\n /**\n * ATH for sfbs in long blocks.\n */\n this.l = new_float(Encoder.SBMAX_l);\n /**\n * ATH for sfbs in short blocks.\n */\n this.s = new_float(Encoder.SBMAX_s);\n /**\n * ATH for partitioned sfb21 in long blocks.\n */\n this.psfb21 = new_float(Encoder.PSFB21);\n /**\n * ATH for partitioned sfb12 in short blocks.\n */\n this.psfb12 = new_float(Encoder.PSFB12);\n /**\n * ATH for long block convolution bands.\n */\n this.cb_l = new_float(Encoder.CBANDS);\n /**\n * ATH for short block convolution bands.\n */\n this.cb_s = new_float(Encoder.CBANDS);\n /**\n * Equal loudness weights (based on ATH).\n */\n this.eql_w = new_float(Encoder.BLKSIZE / 2);\n}\n\nmodule.exports = ATH;\n","/*\n * ReplayGainAnalysis - analyzes input samples and give the recommended dB change\n * Copyright (C) 2001 David Robinson and Glen Sawyer\n * Improvements and optimizations added by Frank Klemm, and by Marcel Muller \n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * concept and filter values by David Robinson (David@Robinson.org)\n * -- blame him if you think the idea is flawed\n * original coding by Glen Sawyer (mp3gain@hotmail.com)\n * -- blame him if you think this runs too slowly, or the coding is otherwise flawed\n *\n * lots of code improvements by Frank Klemm ( http://www.uni-jena.de/~pfk/mpp/ )\n * -- credit him for all the _good_ programming ;)\n *\n *\n * For an explanation of the concepts and the basic algorithms involved, go to:\n * http://www.replaygain.org/\n */\n\n/*\n * Here's the deal. Call\n *\n * InitGainAnalysis ( long samplefreq );\n *\n * to initialize everything. Call\n *\n * AnalyzeSamples ( var Float_t* left_samples,\n * var Float_t* right_samples,\n * size_t num_samples,\n * int num_channels );\n *\n * as many times as you want, with as many or as few samples as you want.\n * If mono, pass the sample buffer in through left_samples, leave\n * right_samples NULL, and make sure num_channels = 1.\n *\n * GetTitleGain()\n *\n * will return the recommended dB level change for all samples analyzed\n * SINCE THE LAST TIME you called GetTitleGain() OR InitGainAnalysis().\n *\n * GetAlbumGain()\n *\n * will return the recommended dB level change for all samples analyzed\n * since InitGainAnalysis() was called and finalized with GetTitleGain().\n *\n * Pseudo-code to process an album:\n *\n * Float_t l_samples [4096];\n * Float_t r_samples [4096];\n * size_t num_samples;\n * unsigned int num_songs;\n * unsigned int i;\n *\n * InitGainAnalysis ( 44100 );\n * for ( i = 1; i <= num_songs; i++ ) {\n * while ( ( num_samples = getSongSamples ( song[i], left_samples, right_samples ) ) > 0 )\n * AnalyzeSamples ( left_samples, right_samples, num_samples, 2 );\n * fprintf (\"Recommended dB change for song %2d: %+6.2 dB\\n\", i, GetTitleGain() );\n * }\n * fprintf (\"Recommended dB change for whole album: %+6.2 dB\\n\", GetAlbumGain() );\n */\n\n/*\n * So here's the main source of potential code confusion:\n *\n * The filters applied to the incoming samples are IIR filters,\n * meaning they rely on up to number of previous samples\n * AND up to number of previous filtered samples.\n *\n * I set up the AnalyzeSamples routine to minimize memory usage and interface\n * complexity. The speed isn't compromised too much (I don't think), but the\n * internal complexity is higher than it should be for such a relatively\n * simple routine.\n *\n * Optimization/clarity suggestions are welcome.\n */\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * Table entries per dB\n */\nGainAnalysis.STEPS_per_dB = 100.;\n/**\n * Table entries for 0...MAX_dB (normal max. values are 70...80 dB)\n */\nGainAnalysis.MAX_dB = 120.;\nGainAnalysis.GAIN_NOT_ENOUGH_SAMPLES = -24601;\nGainAnalysis.GAIN_ANALYSIS_ERROR = 0;\nGainAnalysis.GAIN_ANALYSIS_OK = 1;\nGainAnalysis.INIT_GAIN_ANALYSIS_ERROR = 0;\nGainAnalysis.INIT_GAIN_ANALYSIS_OK = 1;\n\nGainAnalysis.YULE_ORDER = 10;\nGainAnalysis.MAX_ORDER = GainAnalysis.YULE_ORDER;\n\nGainAnalysis.MAX_SAMP_FREQ = 48000;\nGainAnalysis.RMS_WINDOW_TIME_NUMERATOR = 1;\nGainAnalysis.RMS_WINDOW_TIME_DENOMINATOR = 20;\nGainAnalysis.MAX_SAMPLES_PER_WINDOW = ((GainAnalysis.MAX_SAMP_FREQ * GainAnalysis.RMS_WINDOW_TIME_NUMERATOR) / GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR + 1);\n\nfunction GainAnalysis() {\n /**\n * calibration value for 89dB\n */\n var PINK_REF = 64.82;\n\n var YULE_ORDER = GainAnalysis.YULE_ORDER;\n /**\n * percentile which is louder than the proposed level\n */\n var RMS_PERCENTILE = 0.95;\n /**\n * maximum allowed sample frequency [Hz]\n */\n var MAX_SAMP_FREQ = GainAnalysis.MAX_SAMP_FREQ;\n var RMS_WINDOW_TIME_NUMERATOR = GainAnalysis.RMS_WINDOW_TIME_NUMERATOR;\n /**\n * numerator / denominator = time slice size [s]\n */\n var RMS_WINDOW_TIME_DENOMINATOR = GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR;\n /**\n * max. Samples per Time slice\n */\n var MAX_SAMPLES_PER_WINDOW = GainAnalysis.MAX_SAMPLES_PER_WINDOW;\n\n\n var ABYule = [\n [0.03857599435200, -3.84664617118067, -0.02160367184185,\n 7.81501653005538, -0.00123395316851, -11.34170355132042,\n -0.00009291677959, 13.05504219327545, -0.01655260341619,\n -12.28759895145294, 0.02161526843274, 9.48293806319790,\n -0.02074045215285, -5.87257861775999, 0.00594298065125,\n 2.75465861874613, 0.00306428023191, -0.86984376593551,\n 0.00012025322027, 0.13919314567432, 0.00288463683916],\n [0.05418656406430, -3.47845948550071, -0.02911007808948,\n 6.36317777566148, -0.00848709379851, -8.54751527471874,\n -0.00851165645469, 9.47693607801280, -0.00834990904936,\n -8.81498681370155, 0.02245293253339, 6.85401540936998,\n -0.02596338512915, -4.39470996079559, 0.01624864962975,\n 2.19611684890774, -0.00240879051584, -0.75104302451432,\n 0.00674613682247, 0.13149317958808, -0.00187763777362],\n [0.15457299681924, -2.37898834973084, -0.09331049056315,\n 2.84868151156327, -0.06247880153653, -2.64577170229825,\n 0.02163541888798, 2.23697657451713, -0.05588393329856,\n -1.67148153367602, 0.04781476674921, 1.00595954808547,\n 0.00222312597743, -0.45953458054983, 0.03174092540049,\n 0.16378164858596, -0.01390589421898, -0.05032077717131,\n 0.00651420667831, 0.02347897407020, -0.00881362733839],\n [0.30296907319327, -1.61273165137247, -0.22613988682123,\n 1.07977492259970, -0.08587323730772, -0.25656257754070,\n 0.03282930172664, -0.16276719120440, -0.00915702933434,\n -0.22638893773906, -0.02364141202522, 0.39120800788284,\n -0.00584456039913, -0.22138138954925, 0.06276101321749,\n 0.04500235387352, -0.00000828086748, 0.02005851806501,\n 0.00205861885564, 0.00302439095741, -0.02950134983287],\n [0.33642304856132, -1.49858979367799, -0.25572241425570,\n 0.87350271418188, -0.11828570177555, 0.12205022308084,\n 0.11921148675203, -0.80774944671438, -0.07834489609479,\n 0.47854794562326, -0.00469977914380, -0.12453458140019,\n -0.00589500224440, -0.04067510197014, 0.05724228140351,\n 0.08333755284107, 0.00832043980773, -0.04237348025746,\n -0.01635381384540, 0.02977207319925, -0.01760176568150],\n [0.44915256608450, -0.62820619233671, -0.14351757464547,\n 0.29661783706366, -0.22784394429749, -0.37256372942400,\n -0.01419140100551, 0.00213767857124, 0.04078262797139,\n -0.42029820170918, -0.12398163381748, 0.22199650564824,\n 0.04097565135648, 0.00613424350682, 0.10478503600251,\n 0.06747620744683, -0.01863887810927, 0.05784820375801,\n -0.03193428438915, 0.03222754072173, 0.00541907748707],\n [0.56619470757641, -1.04800335126349, -0.75464456939302,\n 0.29156311971249, 0.16242137742230, -0.26806001042947,\n 0.16744243493672, 0.00819999645858, -0.18901604199609,\n 0.45054734505008, 0.30931782841830, -0.33032403314006,\n -0.27562961986224, 0.06739368333110, 0.00647310677246,\n -0.04784254229033, 0.08647503780351, 0.01639907836189,\n -0.03788984554840, 0.01807364323573, -0.00588215443421],\n [0.58100494960553, -0.51035327095184, -0.53174909058578,\n -0.31863563325245, -0.14289799034253, -0.20256413484477,\n 0.17520704835522, 0.14728154134330, 0.02377945217615,\n 0.38952639978999, 0.15558449135573, -0.23313271880868,\n -0.25344790059353, -0.05246019024463, 0.01628462406333,\n -0.02505961724053, 0.06920467763959, 0.02442357316099,\n -0.03721611395801, 0.01818801111503, -0.00749618797172],\n [0.53648789255105, -0.25049871956020, -0.42163034350696,\n -0.43193942311114, -0.00275953611929, -0.03424681017675,\n 0.04267842219415, -0.04678328784242, -0.10214864179676,\n 0.26408300200955, 0.14590772289388, 0.15113130533216,\n -0.02459864859345, -0.17556493366449, -0.11202315195388,\n -0.18823009262115, -0.04060034127000, 0.05477720428674,\n 0.04788665548180, 0.04704409688120, -0.02217936801134]];\n\n var ABButter = [\n [0.98621192462708, -1.97223372919527, -1.97242384925416,\n 0.97261396931306, 0.98621192462708],\n [0.98500175787242, -1.96977855582618, -1.97000351574484,\n 0.97022847566350, 0.98500175787242],\n [0.97938932735214, -1.95835380975398, -1.95877865470428,\n 0.95920349965459, 0.97938932735214],\n [0.97531843204928, -1.95002759149878, -1.95063686409857,\n 0.95124613669835, 0.97531843204928],\n [0.97316523498161, -1.94561023566527, -1.94633046996323,\n 0.94705070426118, 0.97316523498161],\n [0.96454515552826, -1.92783286977036, -1.92909031105652,\n 0.93034775234268, 0.96454515552826],\n [0.96009142950541, -1.91858953033784, -1.92018285901082,\n 0.92177618768381, 0.96009142950541],\n [0.95856916599601, -1.91542108074780, -1.91713833199203,\n 0.91885558323625, 0.95856916599601],\n [0.94597685600279, -1.88903307939452, -1.89195371200558,\n 0.89487434461664, 0.94597685600279]];\n\n\n /**\n * When calling this procedure, make sure that ip[-order] and op[-order]\n * point to real data\n */\n //private void filterYule(final float[] input, int inputPos, float[] output,\n //int outputPos, int nSamples, final float[] kernel) {\n function filterYule(input, inputPos, output, outputPos, nSamples, kernel) {\n\n while ((nSamples--) != 0) {\n /* 1e-10 is a hack to avoid slowdown because of denormals */\n output[outputPos] = 1e-10 + input[inputPos + 0] * kernel[0]\n - output[outputPos - 1] * kernel[1] + input[inputPos - 1]\n * kernel[2] - output[outputPos - 2] * kernel[3]\n + input[inputPos - 2] * kernel[4] - output[outputPos - 3]\n * kernel[5] + input[inputPos - 3] * kernel[6]\n - output[outputPos - 4] * kernel[7] + input[inputPos - 4]\n * kernel[8] - output[outputPos - 5] * kernel[9]\n + input[inputPos - 5] * kernel[10] - output[outputPos - 6]\n * kernel[11] + input[inputPos - 6] * kernel[12]\n - output[outputPos - 7] * kernel[13] + input[inputPos - 7]\n * kernel[14] - output[outputPos - 8] * kernel[15]\n + input[inputPos - 8] * kernel[16] - output[outputPos - 9]\n * kernel[17] + input[inputPos - 9] * kernel[18]\n - output[outputPos - 10] * kernel[19]\n + input[inputPos - 10] * kernel[20];\n ++outputPos;\n ++inputPos;\n }\n }\n\n//private void filterButter(final float[] input, int inputPos,\n// float[] output, int outputPos, int nSamples, final float[] kernel) {\n function filterButter(input, inputPos, output, outputPos, nSamples, kernel) {\n\n while ((nSamples--) != 0) {\n output[outputPos] = input[inputPos + 0] * kernel[0]\n - output[outputPos - 1] * kernel[1] + input[inputPos - 1]\n * kernel[2] - output[outputPos - 2] * kernel[3]\n + input[inputPos - 2] * kernel[4];\n ++outputPos;\n ++inputPos;\n }\n }\n\n /**\n * @return INIT_GAIN_ANALYSIS_OK if successful, INIT_GAIN_ANALYSIS_ERROR if\n * not\n */\n function ResetSampleFrequency(rgData, samplefreq) {\n /* zero out initial values */\n for (var i = 0; i < MAX_ORDER; i++)\n rgData.linprebuf[i] = rgData.lstepbuf[i] = rgData.loutbuf[i] = rgData.rinprebuf[i] = rgData.rstepbuf[i] = rgData.routbuf[i] = 0.;\n\n switch (0 | (samplefreq)) {\n case 48000:\n rgData.reqindex = 0;\n break;\n case 44100:\n rgData.reqindex = 1;\n break;\n case 32000:\n rgData.reqindex = 2;\n break;\n case 24000:\n rgData.reqindex = 3;\n break;\n case 22050:\n rgData.reqindex = 4;\n break;\n case 16000:\n rgData.reqindex = 5;\n break;\n case 12000:\n rgData.reqindex = 6;\n break;\n case 11025:\n rgData.reqindex = 7;\n break;\n case 8000:\n rgData.reqindex = 8;\n break;\n default:\n return INIT_GAIN_ANALYSIS_ERROR;\n }\n\n rgData.sampleWindow = 0 | ((samplefreq * RMS_WINDOW_TIME_NUMERATOR\n + RMS_WINDOW_TIME_DENOMINATOR - 1) / RMS_WINDOW_TIME_DENOMINATOR);\n\n rgData.lsum = 0.;\n rgData.rsum = 0.;\n rgData.totsamp = 0;\n\n Arrays.ill(rgData.A, 0);\n\n return INIT_GAIN_ANALYSIS_OK;\n }\n\n this.InitGainAnalysis = function (rgData, samplefreq) {\n if (ResetSampleFrequency(rgData, samplefreq) != INIT_GAIN_ANALYSIS_OK) {\n return INIT_GAIN_ANALYSIS_ERROR;\n }\n\n rgData.linpre = MAX_ORDER;\n rgData.rinpre = MAX_ORDER;\n rgData.lstep = MAX_ORDER;\n rgData.rstep = MAX_ORDER;\n rgData.lout = MAX_ORDER;\n rgData.rout = MAX_ORDER;\n\n Arrays.fill(rgData.B, 0);\n\n return INIT_GAIN_ANALYSIS_OK;\n };\n\n /**\n * square\n */\n function fsqr(d) {\n return d * d;\n }\n\n this.AnalyzeSamples = function (rgData, left_samples, left_samplesPos, right_samples, right_samplesPos, num_samples,\n num_channels) {\n var curleft;\n var curleftBase;\n var curright;\n var currightBase;\n var batchsamples;\n var cursamples;\n var cursamplepos;\n\n if (num_samples == 0)\n return GAIN_ANALYSIS_OK;\n\n cursamplepos = 0;\n batchsamples = num_samples;\n\n switch (num_channels) {\n case 1:\n right_samples = left_samples;\n right_samplesPos = left_samplesPos;\n break;\n case 2:\n break;\n default:\n return GAIN_ANALYSIS_ERROR;\n }\n\n if (num_samples < MAX_ORDER) {\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER, num_samples);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER, num_samples);\n } else {\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER, MAX_ORDER);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER, MAX_ORDER);\n }\n\n while (batchsamples > 0) {\n cursamples = batchsamples > rgData.sampleWindow - rgData.totsamp ? rgData.sampleWindow\n - rgData.totsamp\n : batchsamples;\n if (cursamplepos < MAX_ORDER) {\n curleft = rgData.linpre + cursamplepos;\n curleftBase = rgData.linprebuf;\n curright = rgData.rinpre + cursamplepos;\n currightBase = rgData.rinprebuf;\n if (cursamples > MAX_ORDER - cursamplepos)\n cursamples = MAX_ORDER - cursamplepos;\n } else {\n curleft = left_samplesPos + cursamplepos;\n curleftBase = left_samples;\n curright = right_samplesPos + cursamplepos;\n currightBase = right_samples;\n }\n\n filterYule(curleftBase, curleft, rgData.lstepbuf, rgData.lstep\n + rgData.totsamp, cursamples, ABYule[rgData.reqindex]);\n filterYule(currightBase, curright, rgData.rstepbuf, rgData.rstep\n + rgData.totsamp, cursamples, ABYule[rgData.reqindex]);\n\n filterButter(rgData.lstepbuf, rgData.lstep + rgData.totsamp,\n rgData.loutbuf, rgData.lout + rgData.totsamp, cursamples,\n ABButter[rgData.reqindex]);\n filterButter(rgData.rstepbuf, rgData.rstep + rgData.totsamp,\n rgData.routbuf, rgData.rout + rgData.totsamp, cursamples,\n ABButter[rgData.reqindex]);\n\n curleft = rgData.lout + rgData.totsamp;\n /* Get the squared values */\n curleftBase = rgData.loutbuf;\n curright = rgData.rout + rgData.totsamp;\n currightBase = rgData.routbuf;\n\n var i = cursamples % 8;\n while ((i--) != 0) {\n rgData.lsum += fsqr(curleftBase[curleft++]);\n rgData.rsum += fsqr(currightBase[curright++]);\n }\n i = cursamples / 8;\n while ((i--) != 0) {\n rgData.lsum += fsqr(curleftBase[curleft + 0])\n + fsqr(curleftBase[curleft + 1])\n + fsqr(curleftBase[curleft + 2])\n + fsqr(curleftBase[curleft + 3])\n + fsqr(curleftBase[curleft + 4])\n + fsqr(curleftBase[curleft + 5])\n + fsqr(curleftBase[curleft + 6])\n + fsqr(curleftBase[curleft + 7]);\n curleft += 8;\n rgData.rsum += fsqr(currightBase[curright + 0])\n + fsqr(currightBase[curright + 1])\n + fsqr(currightBase[curright + 2])\n + fsqr(currightBase[curright + 3])\n + fsqr(currightBase[curright + 4])\n + fsqr(currightBase[curright + 5])\n + fsqr(currightBase[curright + 6])\n + fsqr(currightBase[curright + 7]);\n curright += 8;\n }\n\n batchsamples -= cursamples;\n cursamplepos += cursamples;\n rgData.totsamp += cursamples;\n if (rgData.totsamp == rgData.sampleWindow) {\n /* Get the Root Mean Square (RMS) for this set of samples */\n var val = GainAnalysis.STEPS_per_dB\n * 10.\n * Math.log10((rgData.lsum + rgData.rsum)\n / rgData.totsamp * 0.5 + 1.e-37);\n var ival = (val <= 0) ? 0 : 0 | val;\n if (ival >= rgData.A.length)\n ival = rgData.A.length - 1;\n rgData.A[ival]++;\n rgData.lsum = rgData.rsum = 0.;\n\n System.arraycopy(rgData.loutbuf, rgData.totsamp,\n rgData.loutbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.routbuf, rgData.totsamp,\n rgData.routbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.lstepbuf, rgData.totsamp,\n rgData.lstepbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.rstepbuf, rgData.totsamp,\n rgData.rstepbuf, 0, MAX_ORDER);\n rgData.totsamp = 0;\n }\n if (rgData.totsamp > rgData.sampleWindow) {\n /*\n * somehow I really screwed up: Error in programming! Contact\n * author about totsamp > sampleWindow\n */\n return GAIN_ANALYSIS_ERROR;\n }\n }\n if (num_samples < MAX_ORDER) {\n System.arraycopy(rgData.linprebuf, num_samples, rgData.linprebuf,\n 0, MAX_ORDER - num_samples);\n System.arraycopy(rgData.rinprebuf, num_samples, rgData.rinprebuf,\n 0, MAX_ORDER - num_samples);\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER - num_samples, num_samples);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER - num_samples, num_samples);\n } else {\n System.arraycopy(left_samples, left_samplesPos + num_samples\n - MAX_ORDER, rgData.linprebuf, 0, MAX_ORDER);\n System.arraycopy(right_samples, right_samplesPos + num_samples\n - MAX_ORDER, rgData.rinprebuf, 0, MAX_ORDER);\n }\n\n return GAIN_ANALYSIS_OK;\n };\n\n function analyzeResult(Array, len) {\n var i;\n\n var elems = 0;\n for (i = 0; i < len; i++)\n elems += Array[i];\n if (elems == 0)\n return GAIN_NOT_ENOUGH_SAMPLES;\n\n var upper = 0 | Math.ceil(elems * (1. - RMS_PERCENTILE));\n for (i = len; i-- > 0;) {\n if ((upper -= Array[i]) <= 0)\n break;\n }\n\n //return (float) ((float) PINK_REF - (float) i / (float) STEPS_per_dB);\n return (PINK_REF - i / GainAnalysis.STEPS_per_dB);\n }\n\n this.GetTitleGain = function (rgData) {\n var retval = analyzeResult(rgData.A, rgData.A.length);\n\n for (var i = 0; i < rgData.A.length; i++) {\n rgData.B[i] += rgData.A[i];\n rgData.A[i] = 0;\n }\n\n for (var i = 0; i < MAX_ORDER; i++)\n rgData.linprebuf[i] = rgData.lstepbuf[i] = rgData.loutbuf[i] = rgData.rinprebuf[i] = rgData.rstepbuf[i] = rgData.routbuf[i] = 0.;\n\n rgData.totsamp = 0;\n rgData.lsum = rgData.rsum = 0.;\n return retval;\n }\n\n}\n\nmodule.exports = GainAnalysis;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar GainAnalysis = require('./GainAnalysis.js');\n\nfunction ReplayGain() {\n this.linprebuf = new_float(GainAnalysis.MAX_ORDER * 2);\n /**\n * left input samples, with pre-buffer\n */\n this.linpre = 0;\n this.lstepbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n /**\n * left \"first step\" (i.e. post first filter) samples\n */\n this.lstep = 0;\n this.loutbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n /**\n * left \"out\" (i.e. post second filter) samples\n */\n this.lout = 0;\n this.rinprebuf = new_float(GainAnalysis.MAX_ORDER * 2);\n /**\n * right input samples ...\n */\n this.rinpre = 0;\n this.rstepbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n this.rstep = 0;\n this.routbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n this.rout = 0;\n /**\n * number of samples required to reach number of milliseconds required\n * for RMS window\n */\n this.sampleWindow = 0;\n this.totsamp = 0;\n this.lsum = 0.;\n this.rsum = 0.;\n this.freqindex = 0;\n this.first = 0;\n this.A = new_int(0 | (GainAnalysis.STEPS_per_dB * GainAnalysis.MAX_dB));\n this.B = new_int(0 | (GainAnalysis.STEPS_per_dB * GainAnalysis.MAX_dB));\n\n}\n\nmodule.exports = ReplayGain;\n","function MeanBits(meanBits) {\n this.bits = meanBits;\n}\n\nmodule.exports = MeanBits;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar MeanBits = require('./MeanBits.js');\nvar Encoder = require('./Encoder.js');\nvar L3Side = require('./L3Side.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nfunction CBRNewIterationLoop(_quantize) {\n var quantize = _quantize;\n this.quantize = quantize;\n\tthis.iteration_loop = function(gfp, pe, ms_ener_ratio, ratio) {\n\t\tvar gfc = gfp.internal_flags;\n var l3_xmin = new_float(L3Side.SFBMAX);\n\t\tvar xrpow = new_float(576);\n\t\tvar targ_bits = new_int(2);\n\t\tvar mean_bits = 0, max_bits;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tvar mb = new MeanBits(mean_bits);\n\t\tthis.quantize.rv.ResvFrameBegin(gfp, mb);\n\t\tmean_bits = mb.bits;\n\n\t\t/* quantize! */\n\t\tfor (var gr = 0; gr < gfc.mode_gr; gr++) {\n\n\t\t\t/*\n\t\t\t * calculate needed bits\n\t\t\t */\n\t\t\tmax_bits = this.quantize.qupvt.on_pe(gfp, pe, targ_bits, mean_bits,\n\t\t\t\t\tgr, gr);\n\n\t\t\tif (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n\t\t\t\tthis.quantize.ms_convert(gfc.l3_side, gr);\n\t\t\t\tthis.quantize.qupvt.reduce_side(targ_bits, ms_ener_ratio[gr],\n\t\t\t\t\t\tmean_bits, max_bits);\n\t\t\t}\n\n\t\t\tfor (var ch = 0; ch < gfc.channels_out; ch++) {\n\t\t\t\tvar adjust, masking_lower_db;\n\t\t\t\tvar cod_info = l3_side.tt[gr][ch];\n\n\t\t\t\tif (cod_info.block_type != Encoder.SHORT_TYPE) {\n\t\t\t\t\t// NORM, START or STOP type\n\t\t\t\t\tadjust = 0;\n\t\t\t\t\tmasking_lower_db = gfc.PSY.mask_adjust - adjust;\n\t\t\t\t} else {\n\t\t\t\t\tadjust = 0;\n\t\t\t\t\tmasking_lower_db = gfc.PSY.mask_adjust_short - adjust;\n\t\t\t\t}\n\t\t\t\tgfc.masking_lower = Math.pow(10.0,\n\t\t\t\t\t\tmasking_lower_db * 0.1);\n\n\t\t\t\t/*\n\t\t\t\t * init_outer_loop sets up cod_info, scalefac and xrpow\n\t\t\t\t */\n\t\t\t\tthis.quantize.init_outer_loop(gfc, cod_info);\n\t\t\t\tif (this.quantize.init_xrpow(gfc, cod_info, xrpow)) {\n\t\t\t\t\t/*\n\t\t\t\t\t * xr contains energy we will have to encode calculate the\n\t\t\t\t\t * masking abilities find some good quantization in\n\t\t\t\t\t * outer_loop\n\t\t\t\t\t */\n\t\t\t\t\tthis.quantize.qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n\t\t\t\t\t\t\tl3_xmin);\n\t\t\t\t\tthis.quantize.outer_loop(gfp, cod_info, l3_xmin, xrpow, ch,\n\t\t\t\t\t\t\ttarg_bits[ch]);\n\t\t\t\t}\n\n\t\t\t\tthis.quantize.iteration_finish_one(gfc, gr, ch);\n\t\t\t\tassert (cod_info.part2_3_length <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n\t\t\t\tassert (cod_info.part2_3_length <= targ_bits[ch]);\n\t\t\t} /* for ch */\n\t\t} /* for gr */\n\n\t\tthis.quantize.rv.ResvFrameEnd(gfc, mean_bits);\n\t}\n}\nmodule.exports = CBRNewIterationLoop;\n","function HuffCodeTab(len, max, tab, hl) {\n this.xlen = len;\n this.linmax = max;\n this.table = tab;\n this.hlen = hl;\n}\n\nvar Tables = {};\n\n\nTables.t1HB = [\n 1, 1,\n 1, 0\n];\n\nTables.t2HB = [\n 1, 2, 1,\n 3, 1, 1,\n 3, 2, 0\n];\n\nTables.t3HB = [\n 3, 2, 1,\n 1, 1, 1,\n 3, 2, 0\n];\n\nTables.t5HB = [\n 1, 2, 6, 5,\n 3, 1, 4, 4,\n 7, 5, 7, 1,\n 6, 1, 1, 0\n];\n\nTables.t6HB = [\n 7, 3, 5, 1,\n 6, 2, 3, 2,\n 5, 4, 4, 1,\n 3, 3, 2, 0\n];\n\nTables.t7HB = [\n 1, 2, 10, 19, 16, 10,\n 3, 3, 7, 10, 5, 3,\n 11, 4, 13, 17, 8, 4,\n 12, 11, 18, 15, 11, 2,\n 7, 6, 9, 14, 3, 1,\n 6, 4, 5, 3, 2, 0\n];\n\nTables.t8HB = [\n 3, 4, 6, 18, 12, 5,\n 5, 1, 2, 16, 9, 3,\n 7, 3, 5, 14, 7, 3,\n 19, 17, 15, 13, 10, 4,\n 13, 5, 8, 11, 5, 1,\n 12, 4, 4, 1, 1, 0\n];\n\nTables.t9HB = [\n 7, 5, 9, 14, 15, 7,\n 6, 4, 5, 5, 6, 7,\n 7, 6, 8, 8, 8, 5,\n 15, 6, 9, 10, 5, 1,\n 11, 7, 9, 6, 4, 1,\n 14, 4, 6, 2, 6, 0\n];\n\nTables.t10HB = [\n 1, 2, 10, 23, 35, 30, 12, 17,\n 3, 3, 8, 12, 18, 21, 12, 7,\n 11, 9, 15, 21, 32, 40, 19, 6,\n 14, 13, 22, 34, 46, 23, 18, 7,\n 20, 19, 33, 47, 27, 22, 9, 3,\n 31, 22, 41, 26, 21, 20, 5, 3,\n 14, 13, 10, 11, 16, 6, 5, 1,\n 9, 8, 7, 8, 4, 4, 2, 0\n];\n\nTables.t11HB = [\n 3, 4, 10, 24, 34, 33, 21, 15,\n 5, 3, 4, 10, 32, 17, 11, 10,\n 11, 7, 13, 18, 30, 31, 20, 5,\n 25, 11, 19, 59, 27, 18, 12, 5,\n 35, 33, 31, 58, 30, 16, 7, 5,\n 28, 26, 32, 19, 17, 15, 8, 14,\n 14, 12, 9, 13, 14, 9, 4, 1,\n 11, 4, 6, 6, 6, 3, 2, 0\n];\n\nTables.t12HB = [\n 9, 6, 16, 33, 41, 39, 38, 26,\n 7, 5, 6, 9, 23, 16, 26, 11,\n 17, 7, 11, 14, 21, 30, 10, 7,\n 17, 10, 15, 12, 18, 28, 14, 5,\n 32, 13, 22, 19, 18, 16, 9, 5,\n 40, 17, 31, 29, 17, 13, 4, 2,\n 27, 12, 11, 15, 10, 7, 4, 1,\n 27, 12, 8, 12, 6, 3, 1, 0\n];\n\nTables.t13HB = [\n 1, 5, 14, 21, 34, 51, 46, 71, 42, 52, 68, 52, 67, 44, 43, 19,\n 3, 4, 12, 19, 31, 26, 44, 33, 31, 24, 32, 24, 31, 35, 22, 14,\n 15, 13, 23, 36, 59, 49, 77, 65, 29, 40, 30, 40, 27, 33, 42, 16,\n 22, 20, 37, 61, 56, 79, 73, 64, 43, 76, 56, 37, 26, 31, 25, 14,\n 35, 16, 60, 57, 97, 75, 114, 91, 54, 73, 55, 41, 48, 53, 23, 24,\n 58, 27, 50, 96, 76, 70, 93, 84, 77, 58, 79, 29, 74, 49, 41, 17,\n 47, 45, 78, 74, 115, 94, 90, 79, 69, 83, 71, 50, 59, 38, 36, 15,\n 72, 34, 56, 95, 92, 85, 91, 90, 86, 73, 77, 65, 51, 44, 43, 42,\n 43, 20, 30, 44, 55, 78, 72, 87, 78, 61, 46, 54, 37, 30, 20, 16,\n 53, 25, 41, 37, 44, 59, 54, 81, 66, 76, 57, 54, 37, 18, 39, 11,\n 35, 33, 31, 57, 42, 82, 72, 80, 47, 58, 55, 21, 22, 26, 38, 22,\n 53, 25, 23, 38, 70, 60, 51, 36, 55, 26, 34, 23, 27, 14, 9, 7,\n 34, 32, 28, 39, 49, 75, 30, 52, 48, 40, 52, 28, 18, 17, 9, 5,\n 45, 21, 34, 64, 56, 50, 49, 45, 31, 19, 12, 15, 10, 7, 6, 3,\n 48, 23, 20, 39, 36, 35, 53, 21, 16, 23, 13, 10, 6, 1, 4, 2,\n 16, 15, 17, 27, 25, 20, 29, 11, 17, 12, 16, 8, 1, 1, 0, 1\n];\n\nTables.t15HB = [\n 7, 12, 18, 53, 47, 76, 124, 108, 89, 123, 108, 119, 107, 81, 122, 63,\n 13, 5, 16, 27, 46, 36, 61, 51, 42, 70, 52, 83, 65, 41, 59, 36,\n 19, 17, 15, 24, 41, 34, 59, 48, 40, 64, 50, 78, 62, 80, 56, 33,\n 29, 28, 25, 43, 39, 63, 55, 93, 76, 59, 93, 72, 54, 75, 50, 29,\n 52, 22, 42, 40, 67, 57, 95, 79, 72, 57, 89, 69, 49, 66, 46, 27,\n 77, 37, 35, 66, 58, 52, 91, 74, 62, 48, 79, 63, 90, 62, 40, 38,\n 125, 32, 60, 56, 50, 92, 78, 65, 55, 87, 71, 51, 73, 51, 70, 30,\n 109, 53, 49, 94, 88, 75, 66, 122, 91, 73, 56, 42, 64, 44, 21, 25,\n 90, 43, 41, 77, 73, 63, 56, 92, 77, 66, 47, 67, 48, 53, 36, 20,\n 71, 34, 67, 60, 58, 49, 88, 76, 67, 106, 71, 54, 38, 39, 23, 15,\n 109, 53, 51, 47, 90, 82, 58, 57, 48, 72, 57, 41, 23, 27, 62, 9,\n 86, 42, 40, 37, 70, 64, 52, 43, 70, 55, 42, 25, 29, 18, 11, 11,\n 118, 68, 30, 55, 50, 46, 74, 65, 49, 39, 24, 16, 22, 13, 14, 7,\n 91, 44, 39, 38, 34, 63, 52, 45, 31, 52, 28, 19, 14, 8, 9, 3,\n 123, 60, 58, 53, 47, 43, 32, 22, 37, 24, 17, 12, 15, 10, 2, 1,\n 71, 37, 34, 30, 28, 20, 17, 26, 21, 16, 10, 6, 8, 6, 2, 0\n];\n\nTables.t16HB = [\n 1, 5, 14, 44, 74, 63, 110, 93, 172, 149, 138, 242, 225, 195, 376, 17,\n 3, 4, 12, 20, 35, 62, 53, 47, 83, 75, 68, 119, 201, 107, 207, 9,\n 15, 13, 23, 38, 67, 58, 103, 90, 161, 72, 127, 117, 110, 209, 206, 16,\n 45, 21, 39, 69, 64, 114, 99, 87, 158, 140, 252, 212, 199, 387, 365, 26,\n 75, 36, 68, 65, 115, 101, 179, 164, 155, 264, 246, 226, 395, 382, 362, 9,\n 66, 30, 59, 56, 102, 185, 173, 265, 142, 253, 232, 400, 388, 378, 445, 16,\n 111, 54, 52, 100, 184, 178, 160, 133, 257, 244, 228, 217, 385, 366, 715, 10,\n 98, 48, 91, 88, 165, 157, 148, 261, 248, 407, 397, 372, 380, 889, 884, 8,\n 85, 84, 81, 159, 156, 143, 260, 249, 427, 401, 392, 383, 727, 713, 708, 7,\n 154, 76, 73, 141, 131, 256, 245, 426, 406, 394, 384, 735, 359, 710, 352, 11,\n 139, 129, 67, 125, 247, 233, 229, 219, 393, 743, 737, 720, 885, 882, 439, 4,\n 243, 120, 118, 115, 227, 223, 396, 746, 742, 736, 721, 712, 706, 223, 436, 6,\n 202, 224, 222, 218, 216, 389, 386, 381, 364, 888, 443, 707, 440, 437, 1728, 4,\n 747, 211, 210, 208, 370, 379, 734, 723, 714, 1735, 883, 877, 876, 3459, 865, 2,\n 377, 369, 102, 187, 726, 722, 358, 711, 709, 866, 1734, 871, 3458, 870, 434, 0,\n 12, 10, 7, 11, 10, 17, 11, 9, 13, 12, 10, 7, 5, 3, 1, 3\n];\n\nTables.t24HB = [\n 15, 13, 46, 80, 146, 262, 248, 434, 426, 669, 653, 649, 621, 517, 1032, 88,\n 14, 12, 21, 38, 71, 130, 122, 216, 209, 198, 327, 345, 319, 297, 279, 42,\n 47, 22, 41, 74, 68, 128, 120, 221, 207, 194, 182, 340, 315, 295, 541, 18,\n 81, 39, 75, 70, 134, 125, 116, 220, 204, 190, 178, 325, 311, 293, 271, 16,\n 147, 72, 69, 135, 127, 118, 112, 210, 200, 188, 352, 323, 306, 285, 540, 14,\n 263, 66, 129, 126, 119, 114, 214, 202, 192, 180, 341, 317, 301, 281, 262, 12,\n 249, 123, 121, 117, 113, 215, 206, 195, 185, 347, 330, 308, 291, 272, 520, 10,\n 435, 115, 111, 109, 211, 203, 196, 187, 353, 332, 313, 298, 283, 531, 381, 17,\n 427, 212, 208, 205, 201, 193, 186, 177, 169, 320, 303, 286, 268, 514, 377, 16,\n 335, 199, 197, 191, 189, 181, 174, 333, 321, 305, 289, 275, 521, 379, 371, 11,\n 668, 184, 183, 179, 175, 344, 331, 314, 304, 290, 277, 530, 383, 373, 366, 10,\n 652, 346, 171, 168, 164, 318, 309, 299, 287, 276, 263, 513, 375, 368, 362, 6,\n 648, 322, 316, 312, 307, 302, 292, 284, 269, 261, 512, 376, 370, 364, 359, 4,\n 620, 300, 296, 294, 288, 282, 273, 266, 515, 380, 374, 369, 365, 361, 357, 2,\n 1033, 280, 278, 274, 267, 264, 259, 382, 378, 372, 367, 363, 360, 358, 356, 0,\n 43, 20, 19, 17, 15, 13, 11, 9, 7, 6, 4, 7, 5, 3, 1, 3\n];\n\nTables.t32HB = [\n 1 << 0, 5 << 1, 4 << 1, 5 << 2, 6 << 1, 5 << 2, 4 << 2, 4 << 3,\n 7 << 1, 3 << 2, 6 << 2, 0 << 3, 7 << 2, 2 << 3, 3 << 3, 1 << 4\n];\n\nTables.t33HB = [\n 15 << 0, 14 << 1, 13 << 1, 12 << 2, 11 << 1, 10 << 2, 9 << 2, 8 << 3,\n 7 << 1, 6 << 2, 5 << 2, 4 << 3, 3 << 2, 2 << 3, 1 << 3, 0 << 4\n];\n\nTables.t1l = [\n 1, 4,\n 3, 5\n];\n\nTables.t2l = [\n 1, 4, 7,\n 4, 5, 7,\n 6, 7, 8\n];\n\nTables.t3l = [\n 2, 3, 7,\n 4, 4, 7,\n 6, 7, 8\n];\n\nTables.t5l = [\n 1, 4, 7, 8,\n 4, 5, 8, 9,\n 7, 8, 9, 10,\n 8, 8, 9, 10\n];\n\nTables.t6l = [\n 3, 4, 6, 8,\n 4, 4, 6, 7,\n 5, 6, 7, 8,\n 7, 7, 8, 9\n];\n\nTables.t7l = [\n 1, 4, 7, 9, 9, 10,\n 4, 6, 8, 9, 9, 10,\n 7, 7, 9, 10, 10, 11,\n 8, 9, 10, 11, 11, 11,\n 8, 9, 10, 11, 11, 12,\n 9, 10, 11, 12, 12, 12\n];\n\nTables.t8l = [\n 2, 4, 7, 9, 9, 10,\n 4, 4, 6, 10, 10, 10,\n 7, 6, 8, 10, 10, 11,\n 9, 10, 10, 11, 11, 12,\n 9, 9, 10, 11, 12, 12,\n 10, 10, 11, 11, 13, 13\n];\n\nTables.t9l = [\n 3, 4, 6, 7, 9, 10,\n 4, 5, 6, 7, 8, 10,\n 5, 6, 7, 8, 9, 10,\n 7, 7, 8, 9, 9, 10,\n 8, 8, 9, 9, 10, 11,\n 9, 9, 10, 10, 11, 11\n];\n\nTables.t10l = [\n 1, 4, 7, 9, 10, 10, 10, 11,\n 4, 6, 8, 9, 10, 11, 10, 10,\n 7, 8, 9, 10, 11, 12, 11, 11,\n 8, 9, 10, 11, 12, 12, 11, 12,\n 9, 10, 11, 12, 12, 12, 12, 12,\n 10, 11, 12, 12, 13, 13, 12, 13,\n 9, 10, 11, 12, 12, 12, 13, 13,\n 10, 10, 11, 12, 12, 13, 13, 13\n];\n\nTables.t11l = [\n 2, 4, 6, 8, 9, 10, 9, 10,\n 4, 5, 6, 8, 10, 10, 9, 10,\n 6, 7, 8, 9, 10, 11, 10, 10,\n 8, 8, 9, 11, 10, 12, 10, 11,\n 9, 10, 10, 11, 11, 12, 11, 12,\n 9, 10, 11, 12, 12, 13, 12, 13,\n 9, 9, 9, 10, 11, 12, 12, 12,\n 9, 9, 10, 11, 12, 12, 12, 12\n];\n\nTables.t12l = [\n 4, 4, 6, 8, 9, 10, 10, 10,\n 4, 5, 6, 7, 9, 9, 10, 10,\n 6, 6, 7, 8, 9, 10, 9, 10,\n 7, 7, 8, 8, 9, 10, 10, 10,\n 8, 8, 9, 9, 10, 10, 10, 11,\n 9, 9, 10, 10, 10, 11, 10, 11,\n 9, 9, 9, 10, 10, 11, 11, 12,\n 10, 10, 10, 11, 11, 11, 11, 12\n];\n\nTables.t13l = [\n 1, 5, 7, 8, 9, 10, 10, 11, 10, 11, 12, 12, 13, 13, 14, 14,\n 4, 6, 8, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 14, 14, 14,\n 7, 8, 9, 10, 11, 11, 12, 12, 11, 12, 12, 13, 13, 14, 15, 15,\n 8, 9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15,\n 9, 9, 11, 11, 12, 12, 13, 13, 12, 13, 13, 14, 14, 15, 15, 16,\n 10, 10, 11, 12, 12, 12, 13, 13, 13, 13, 14, 13, 15, 15, 16, 16,\n 10, 11, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16,\n 11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 18, 18,\n 10, 10, 11, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 17, 17,\n 11, 11, 12, 12, 13, 13, 13, 15, 14, 15, 15, 16, 16, 16, 18, 17,\n 11, 12, 12, 13, 13, 14, 14, 15, 14, 15, 16, 15, 16, 17, 18, 19,\n 12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18,\n 12, 13, 13, 14, 14, 15, 14, 15, 16, 16, 17, 17, 17, 18, 18, 18,\n 13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 17, 18, 18,\n 14, 14, 14, 15, 15, 15, 17, 16, 16, 19, 17, 17, 17, 19, 18, 18,\n 13, 14, 15, 16, 16, 16, 17, 16, 17, 17, 18, 18, 21, 20, 21, 18\n];\n\nTables.t15l = [\n 3, 5, 6, 8, 8, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 14,\n 5, 5, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13,\n 6, 7, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13,\n 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13,\n 8, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13,\n 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 14,\n 10, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14,\n 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14,\n 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14,\n 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14,\n 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 14,\n 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15,\n 12, 12, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15,\n 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15,\n 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 15,\n 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15\n];\n\nTables.t16_5l = [\n 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 11,\n 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 11,\n 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 12,\n 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 13,\n 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 12,\n 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 13,\n 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 13,\n 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 13,\n 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 13,\n 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 14,\n 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 13,\n 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 14,\n 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 14,\n 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 14,\n 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 14,\n 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 12\n];\n\nTables.t16l = [\n 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 10,\n 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 10,\n 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 11,\n 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 12,\n 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 11,\n 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 12,\n 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 12,\n 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 12,\n 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 12,\n 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 13,\n 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 12,\n 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 13,\n 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 13,\n 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 13,\n 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 13,\n 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10\n];\n\nTables.t24l = [\n 4, 5, 7, 8, 9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 10,\n 5, 6, 7, 8, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 10,\n 7, 7, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 9,\n 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 9,\n 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 9,\n 10, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 9,\n 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 9,\n 11, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 10,\n 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 10,\n 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 10,\n 12, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10,\n 12, 12, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10,\n 13, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 10,\n 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 6\n];\n\nTables.t32l = [\n 1 + 0, 4 + 1, 4 + 1, 5 + 2, 4 + 1, 6 + 2, 5 + 2, 6 + 3,\n 4 + 1, 5 + 2, 5 + 2, 6 + 3, 5 + 2, 6 + 3, 6 + 3, 6 + 4\n];\n\nTables.t33l = [\n 4 + 0, 4 + 1, 4 + 1, 4 + 2, 4 + 1, 4 + 2, 4 + 2, 4 + 3,\n 4 + 1, 4 + 2, 4 + 2, 4 + 3, 4 + 2, 4 + 3, 4 + 3, 4 + 4\n];\n\nTables.ht = [\n /* xlen, linmax, table, hlen */\n new HuffCodeTab(0, 0, null, null),\n new HuffCodeTab(2, 0, Tables.t1HB, Tables.t1l),\n new HuffCodeTab(3, 0, Tables.t2HB, Tables.t2l),\n new HuffCodeTab(3, 0, Tables.t3HB, Tables.t3l),\n new HuffCodeTab(0, 0, null, null), /* Apparently not used */\n new HuffCodeTab(4, 0, Tables.t5HB, Tables.t5l),\n new HuffCodeTab(4, 0, Tables.t6HB, Tables.t6l),\n new HuffCodeTab(6, 0, Tables.t7HB, Tables.t7l),\n new HuffCodeTab(6, 0, Tables.t8HB, Tables.t8l),\n new HuffCodeTab(6, 0, Tables.t9HB, Tables.t9l),\n new HuffCodeTab(8, 0, Tables.t10HB, Tables.t10l),\n new HuffCodeTab(8, 0, Tables.t11HB, Tables.t11l),\n new HuffCodeTab(8, 0, Tables.t12HB, Tables.t12l),\n new HuffCodeTab(16, 0, Tables.t13HB, Tables.t13l),\n new HuffCodeTab(0, 0, null, Tables.t16_5l), /* Apparently not used */\n new HuffCodeTab(16, 0, Tables.t15HB, Tables.t15l),\n\n new HuffCodeTab(1, 1, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(2, 3, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(3, 7, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(4, 15, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(6, 63, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(8, 255, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(10, 1023, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(13, 8191, Tables.t16HB, Tables.t16l),\n\n new HuffCodeTab(4, 15, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(5, 31, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(6, 63, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(7, 127, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(8, 255, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(9, 511, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(11, 2047, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(13, 8191, Tables.t24HB, Tables.t24l),\n\n new HuffCodeTab(0, 0, Tables.t32HB, Tables.t32l),\n new HuffCodeTab(0, 0, Tables.t33HB, Tables.t33l),\n];\n\n/**\n * \n * for (i = 0; i < 16*16; i++) [\n * largetbl[i] = ((ht[16].hlen[i]) << 16) + ht[24].hlen[i];\n * ]\n * \n *\n */\nTables.largetbl = [\n 0x010004, 0x050005, 0x070007, 0x090008, 0x0a0009, 0x0a000a, 0x0b000a, 0x0b000b,\n 0x0c000b, 0x0c000c, 0x0c000c, 0x0d000c, 0x0d000c, 0x0d000c, 0x0e000d, 0x0a000a,\n 0x040005, 0x060006, 0x080007, 0x090008, 0x0a0009, 0x0b000a, 0x0b000a, 0x0b000b,\n 0x0c000b, 0x0c000b, 0x0c000c, 0x0d000c, 0x0e000c, 0x0d000c, 0x0e000c, 0x0a000a,\n 0x070007, 0x080007, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000b,\n 0x0d000b, 0x0c000b, 0x0d000b, 0x0d000c, 0x0d000c, 0x0e000c, 0x0e000d, 0x0b0009,\n 0x090008, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0c000b,\n 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0c0009,\n 0x0a0009, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000a, 0x0d000b,\n 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000d, 0x0b0009,\n 0x0a000a, 0x0a0009, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0e000b,\n 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0c0009,\n 0x0b000a, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0d000b, 0x0d000b,\n 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000d, 0x0c0009,\n 0x0b000b, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b,\n 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x11000d, 0x11000d, 0x0c000a,\n 0x0b000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b,\n 0x0f000b, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000d, 0x10000d, 0x0c000a,\n 0x0c000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b, 0x0f000c,\n 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0f000d, 0x10000d, 0x0f000d, 0x0d000a,\n 0x0c000c, 0x0d000b, 0x0c000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c,\n 0x0f000c, 0x10000c, 0x10000c, 0x10000d, 0x11000d, 0x11000d, 0x10000d, 0x0c000a,\n 0x0d000c, 0x0d000c, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x10000c,\n 0x10000c, 0x10000c, 0x10000c, 0x10000d, 0x10000d, 0x0f000d, 0x10000d, 0x0d000a,\n 0x0d000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c,\n 0x0f000c, 0x11000c, 0x10000d, 0x10000d, 0x10000d, 0x10000d, 0x12000d, 0x0d000a,\n 0x0f000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000c,\n 0x10000d, 0x12000d, 0x11000d, 0x11000d, 0x11000d, 0x13000d, 0x11000d, 0x0d000a,\n 0x0e000d, 0x0f000c, 0x0d000c, 0x0e000c, 0x10000c, 0x10000c, 0x0f000c, 0x10000d,\n 0x10000d, 0x11000d, 0x12000d, 0x11000d, 0x13000d, 0x11000d, 0x10000d, 0x0d000a,\n 0x0a0009, 0x0a0009, 0x0a0009, 0x0b0009, 0x0b0009, 0x0c0009, 0x0c0009, 0x0c0009,\n 0x0d0009, 0x0d0009, 0x0d0009, 0x0d000a, 0x0d000a, 0x0d000a, 0x0d000a, 0x0a0006\n];\n/**\n * \n * for (i = 0; i < 3*3; i++) [\n * table23[i] = ((ht[2].hlen[i]) << 16) + ht[3].hlen[i];\n * ]\n * \n *\n */\nTables.table23 = [\n 0x010002, 0x040003, 0x070007,\n 0x040004, 0x050004, 0x070007,\n 0x060006, 0x070007, 0x080008\n];\n\n/**\n * \n * for (i = 0; i < 4*4; i++) [\n * table56[i] = ((ht[5].hlen[i]) << 16) + ht[6].hlen[i];\n * ]\n * \n *\n */\nTables.table56 = [\n 0x010003, 0x040004, 0x070006, 0x080008, 0x040004, 0x050004, 0x080006, 0x090007,\n 0x070005, 0x080006, 0x090007, 0x0a0008, 0x080007, 0x080007, 0x090008, 0x0a0009\n];\n\nTables.bitrate_table = [\n [0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1], /* MPEG 2 */\n [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1], /* MPEG 1 */\n [0, 8, 16, 24, 32, 40, 48, 56, 64, -1, -1, -1, -1, -1, -1, -1], /* MPEG 2.5 */\n];\n\n/**\n * MPEG 2, MPEG 1, MPEG 2.5.\n */\nTables.samplerate_table = [\n [22050, 24000, 16000, -1],\n [44100, 48000, 32000, -1],\n [11025, 12000, 8000, -1],\n];\n\n/**\n * This is the scfsi_band table from 2.4.2.7 of the IS.\n */\nTables.scfsi_band = [0, 6, 11, 16, 21];\n\nmodule.exports = Tables;\n","/*\n * quantize_pvt source file\n *\n * Copyright (c) 1999-2002 Takehiro Tominaga\n * Copyright (c) 2000-2002 Robert Hegemann\n * Copyright (c) 2001 Naoki Shibata\n * Copyright (c) 2002-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: QuantizePVT.java,v 1.24 2011/05/24 20:48:06 kenchis Exp $ */\nvar ScaleFac = require('./ScaleFac.js');\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\nvar MeanBits = require('./MeanBits.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nQuantizePVT.Q_MAX = (256 + 1);\nQuantizePVT.Q_MAX2 = 116;\nQuantizePVT.LARGE_BITS = 100000;\nQuantizePVT.IXMAX_VAL = 8206;\n\nfunction QuantizePVT() {\n\n var tak = null;\n var rv = null;\n var psy = null;\n\n this.setModules = function (_tk, _rv, _psy) {\n tak = _tk;\n rv = _rv;\n psy = _psy;\n };\n\n function POW20(x) {\n assert(0 <= (x + QuantizePVT.Q_MAX2) && x < QuantizePVT.Q_MAX);\n return pow20[x + QuantizePVT.Q_MAX2];\n }\n\n this.IPOW20 = function (x) {\n assert(0 <= x && x < QuantizePVT.Q_MAX);\n return ipow20[x];\n }\n\n /**\n * smallest such that 1.0+DBL_EPSILON != 1.0\n */\n var DBL_EPSILON = 2.2204460492503131e-016;\n\n /**\n * ix always <= 8191+15. see count_bits()\n */\n var IXMAX_VAL = QuantizePVT.IXMAX_VAL;\n\n var PRECALC_SIZE = (IXMAX_VAL + 2);\n\n var Q_MAX = QuantizePVT.Q_MAX;\n\n\n /**\n * \n * minimum possible number of\n * -cod_info.global_gain + ((scalefac[] + (cod_info.preflag ? pretab[sfb] : 0))\n * << (cod_info.scalefac_scale + 1)) + cod_info.subblock_gain[cod_info.window[sfb]] * 8;\n *\n * for long block, 0+((15+3)<<2) = 18*4 = 72\n * for short block, 0+(15<<2)+7*8 = 15*4+56 = 116\n * \n */\n var Q_MAX2 = QuantizePVT.Q_MAX2;\n\n var LARGE_BITS = QuantizePVT.LARGE_BITS;\n\n\n /**\n * Assuming dynamic range=96dB, this value should be 92\n */\n var NSATHSCALE = 100;\n\n /**\n * The following table is used to implement the scalefactor partitioning for\n * MPEG2 as described in section 2.4.3.2 of the IS. The indexing corresponds\n * to the way the tables are presented in the IS:\n *\n * [table_number][row_in_table][column of nr_of_sfb]\n */\n this.nr_of_sfb_block = [\n [[6, 5, 5, 5], [9, 9, 9, 9], [6, 9, 9, 9]],\n [[6, 5, 7, 3], [9, 9, 12, 6], [6, 9, 12, 6]],\n [[11, 10, 0, 0], [18, 18, 0, 0], [15, 18, 0, 0]],\n [[7, 7, 7, 0], [12, 12, 12, 0], [6, 15, 12, 0]],\n [[6, 6, 6, 3], [12, 9, 9, 6], [6, 12, 9, 6]],\n [[8, 8, 5, 0], [15, 12, 9, 0], [6, 18, 9, 0]]];\n\n /**\n * Table B.6: layer3 preemphasis\n */\n var pretab = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n 2, 2, 3, 3, 3, 2, 0];\n this.pretab = pretab;\n\n /**\n * Here are MPEG1 Table B.8 and MPEG2 Table B.1 -- Layer III scalefactor\n * bands.
\n * Index into this using a method such as:
\n * idx = fr_ps.header.sampling_frequency + (fr_ps.header.version * 3)\n */\n this.sfBandIndex = [\n // Table B.2.b: 22.05 kHz\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132, 174, 192]\n , [0, 0, 0, 0, 0, 0, 0] // sfb21 pseudo sub bands\n , [0, 0, 0, 0, 0, 0, 0] // sfb12 pseudo sub bands\n ),\n /* Table B.2.c: 24 kHz */ /* docs: 332. mpg123(broken): 330 */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232, 278, 332, 394, 464,\n 540, 576],\n [0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136, 180, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.2.a: 16 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.b: 44.1 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 52, 62, 74, 90, 110, 134, 162, 196, 238, 288, 342, 418,\n 576],\n [0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84, 106, 136, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.c: 48 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 60, 72, 88, 106, 128, 156, 190, 230, 276, 330, 384,\n 576],\n [0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80, 100, 126, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.a: 32 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 54, 66, 82, 102, 126, 156, 194, 240, 296, 364, 448, 550,\n 576],\n [0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138, 180, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 11.025 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3,\n 402 / 3, 522 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 12 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3,\n 402 / 3, 522 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 8 kHz */\n new ScaleFac([0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 160, 192, 232, 280, 336, 400, 476, 566, 568, 570,\n 572, 574, 576],\n [0 / 3, 24 / 3, 48 / 3, 72 / 3, 108 / 3, 156 / 3, 216 / 3, 288 / 3, 372 / 3, 480 / 3, 486 / 3,\n 492 / 3, 498 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n )\n ];\n\n var pow20 = new_float(Q_MAX + Q_MAX2 + 1);\n var ipow20 = new_float(Q_MAX);\n var pow43 = new_float(PRECALC_SIZE);\n\n var adj43 = new_float(PRECALC_SIZE);\n this.adj43 = adj43;\n\n /**\n *
\n     * compute the ATH for each scalefactor band cd range: 0..96db\n     *\n     * Input: 3.3kHz signal 32767 amplitude (3.3kHz is where ATH is smallest =\n     * -5db) longblocks: sfb=12 en0/bw=-11db max_en0 = 1.3db shortblocks: sfb=5\n     * -9db 0db\n     *\n     * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) longblocks: amp=1\n     * sfb=12 en0/bw=-103 db max_en0 = -92db amp=32767 sfb=12 -12 db -1.4db\n     *\n     * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) shortblocks: amp=1\n     * sfb=5 en0/bw= -99 -86 amp=32767 sfb=5 -9 db 4db\n     *\n     *\n     * MAX energy of largest wave at 3.3kHz = 1db AVE energy of largest wave at\n     * 3.3kHz = -11db Let's take AVE: -11db = maximum signal in sfb=12. Dynamic\n     * range of CD: 96db. Therefor energy of smallest audible wave in sfb=12 =\n     * -11 - 96 = -107db = ATH at 3.3kHz.\n     *\n     * ATH formula for this wave: -5db. To adjust to LAME scaling, we need ATH =\n     * ATH_formula - 103 (db) ATH = ATH * 2.5e-10 (ener)\n     * 
\n */\n function ATHmdct(gfp, f) {\n var ath = psy.ATHformula(f, gfp);\n\n ath -= NSATHSCALE;\n\n /* modify the MDCT scaling for the ATH and convert to energy */\n ath = Math.pow(10.0, ath / 10.0 + gfp.ATHlower);\n return ath;\n }\n\n function compute_ath(gfp) {\n var ATH_l = gfp.internal_flags.ATH.l;\n var ATH_psfb21 = gfp.internal_flags.ATH.psfb21;\n var ATH_s = gfp.internal_flags.ATH.s;\n var ATH_psfb12 = gfp.internal_flags.ATH.psfb12;\n var gfc = gfp.internal_flags;\n var samp_freq = gfp.out_samplerate;\n\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n var start = gfc.scalefac_band.l[sfb];\n var end = gfc.scalefac_band.l[sfb + 1];\n ATH_l[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 576);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_l[sfb] = Math.min(ATH_l[sfb], ATH_f);\n }\n }\n\n for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {\n var start = gfc.scalefac_band.psfb21[sfb];\n var end = gfc.scalefac_band.psfb21[sfb + 1];\n ATH_psfb21[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 576);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_psfb21[sfb] = Math.min(ATH_psfb21[sfb], ATH_f);\n }\n }\n\n for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n ATH_s[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 192);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_s[sfb] = Math.min(ATH_s[sfb], ATH_f);\n }\n ATH_s[sfb] *= (gfc.scalefac_band.s[sfb + 1] - gfc.scalefac_band.s[sfb]);\n }\n\n for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {\n var start = gfc.scalefac_band.psfb12[sfb];\n var end = gfc.scalefac_band.psfb12[sfb + 1];\n ATH_psfb12[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 192);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_psfb12[sfb] = Math.min(ATH_psfb12[sfb], ATH_f);\n }\n /* not sure about the following */\n ATH_psfb12[sfb] *= (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]);\n }\n\n /*\n * no-ATH mode: reduce ATH to -200 dB\n */\n if (gfp.noATH) {\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n ATH_l[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {\n ATH_psfb21[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {\n ATH_s[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {\n ATH_psfb12[sfb] = 1E-20;\n }\n }\n\n /*\n * work in progress, don't rely on it too much\n */\n gfc.ATH.floor = 10. * Math.log10(ATHmdct(gfp, -1.));\n }\n\n /**\n * initialization for iteration_loop\n */\n this.iteration_init = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n var i;\n\n if (gfc.iteration_init_init == 0) {\n gfc.iteration_init_init = 1;\n\n l3_side.main_data_begin = 0;\n compute_ath(gfp);\n\n pow43[0] = 0.0;\n for (i = 1; i < PRECALC_SIZE; i++)\n pow43[i] = Math.pow(i, 4.0 / 3.0);\n\n for (i = 0; i < PRECALC_SIZE - 1; i++)\n adj43[i] = ((i + 1) - Math.pow(\n 0.5 * (pow43[i] + pow43[i + 1]), 0.75));\n adj43[i] = 0.5;\n\n for (i = 0; i < Q_MAX; i++)\n ipow20[i] = Math.pow(2.0, (i - 210) * -0.1875);\n for (i = 0; i <= Q_MAX + Q_MAX2; i++)\n pow20[i] = Math.pow(2.0, (i - 210 - Q_MAX2) * 0.25);\n\n tak.huffman_init(gfc);\n\n {\n var bass, alto, treble, sfb21;\n\n i = (gfp.exp_nspsytune >> 2) & 63;\n if (i >= 32)\n i -= 64;\n bass = Math.pow(10, i / 4.0 / 10.0);\n\n i = (gfp.exp_nspsytune >> 8) & 63;\n if (i >= 32)\n i -= 64;\n alto = Math.pow(10, i / 4.0 / 10.0);\n\n i = (gfp.exp_nspsytune >> 14) & 63;\n if (i >= 32)\n i -= 64;\n treble = Math.pow(10, i / 4.0 / 10.0);\n\n /*\n * to be compatible with Naoki's original code, the next 6 bits\n * define only the amount of changing treble for sfb21\n */\n i = (gfp.exp_nspsytune >> 20) & 63;\n if (i >= 32)\n i -= 64;\n sfb21 = treble * Math.pow(10, i / 4.0 / 10.0);\n for (i = 0; i < Encoder.SBMAX_l; i++) {\n var f;\n if (i <= 6)\n f = bass;\n else if (i <= 13)\n f = alto;\n else if (i <= 20)\n f = treble;\n else\n f = sfb21;\n\n gfc.nsPsy.longfact[i] = f;\n }\n for (i = 0; i < Encoder.SBMAX_s; i++) {\n var f;\n if (i <= 5)\n f = bass;\n else if (i <= 10)\n f = alto;\n else if (i <= 11)\n f = treble;\n else\n f = sfb21;\n\n gfc.nsPsy.shortfact[i] = f;\n }\n }\n }\n }\n\n /**\n * allocate bits among 2 channels based on PE
\n * mt 6/99
\n * bugfixes rh 8/01: often allocated more than the allowed 4095 bits\n */\n this.on_pe = function (gfp, pe,\n targ_bits, mean_bits, gr, cbr) {\n var gfc = gfp.internal_flags;\n var tbits = 0, bits;\n var add_bits = new_int(2);\n var ch;\n\n /* allocate targ_bits for granule */\n var mb = new MeanBits(tbits);\n var extra_bits = rv.ResvMaxBits(gfp, mean_bits, mb, cbr);\n tbits = mb.bits;\n /* maximum allowed bits for this granule */\n var max_bits = tbits + extra_bits;\n if (max_bits > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n // hard limit per granule\n max_bits = LameInternalFlags.MAX_BITS_PER_GRANULE;\n }\n for (bits = 0, ch = 0; ch < gfc.channels_out; ++ch) {\n /******************************************************************\n * allocate bits for each channel\n ******************************************************************/\n targ_bits[ch] = Math.min(LameInternalFlags.MAX_BITS_PER_CHANNEL,\n tbits / gfc.channels_out);\n\n add_bits[ch] = 0 | (targ_bits[ch] * pe[gr][ch] / 700.0 - targ_bits[ch]);\n\n /* at most increase bits by 1.5*average */\n if (add_bits[ch] > mean_bits * 3 / 4)\n add_bits[ch] = mean_bits * 3 / 4;\n if (add_bits[ch] < 0)\n add_bits[ch] = 0;\n\n if (add_bits[ch] + targ_bits[ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL)\n add_bits[ch] = Math.max(0,\n LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[ch]);\n\n bits += add_bits[ch];\n }\n if (bits > extra_bits) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n add_bits[ch] = extra_bits * add_bits[ch] / bits;\n }\n }\n\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[ch] += add_bits[ch];\n extra_bits -= add_bits[ch];\n }\n\n for (bits = 0, ch = 0; ch < gfc.channels_out; ++ch) {\n bits += targ_bits[ch];\n }\n if (bits > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n var sum = 0;\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[ch] *= LameInternalFlags.MAX_BITS_PER_GRANULE;\n targ_bits[ch] /= bits;\n sum += targ_bits[ch];\n }\n assert(sum <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n }\n\n return max_bits;\n }\n\n this.reduce_side = function (targ_bits, ms_ener_ratio, mean_bits, max_bits) {\n assert(max_bits <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n assert(targ_bits[0] + targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n\n /*\n * ms_ener_ratio = 0: allocate 66/33 mid/side fac=.33 ms_ener_ratio =.5:\n * allocate 50/50 mid/side fac= 0\n */\n /* 75/25 split is fac=.5 */\n var fac = .33 * (.5 - ms_ener_ratio) / .5;\n if (fac < 0)\n fac = 0;\n if (fac > .5)\n fac = .5;\n\n /* number of bits to move from side channel to mid channel */\n /* move_bits = fac*targ_bits[1]; */\n var move_bits = 0 | (fac * .5 * (targ_bits[0] + targ_bits[1]));\n\n if (move_bits > LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[0]) {\n move_bits = LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[0];\n }\n if (move_bits < 0)\n move_bits = 0;\n\n if (targ_bits[1] >= 125) {\n /* dont reduce side channel below 125 bits */\n if (targ_bits[1] - move_bits > 125) {\n\n /* if mid channel already has 2x more than average, dont bother */\n /* mean_bits = bits per granule (for both channels) */\n if (targ_bits[0] < mean_bits)\n targ_bits[0] += move_bits;\n targ_bits[1] -= move_bits;\n } else {\n targ_bits[0] += targ_bits[1] - 125;\n targ_bits[1] = 125;\n }\n }\n\n move_bits = targ_bits[0] + targ_bits[1];\n if (move_bits > max_bits) {\n targ_bits[0] = (max_bits * targ_bits[0]) / move_bits;\n targ_bits[1] = (max_bits * targ_bits[1]) / move_bits;\n }\n assert(targ_bits[0] <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n assert(targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n assert(targ_bits[0] + targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n };\n\n /**\n * Robert Hegemann 2001-04-27:\n * this adjusts the ATH, keeping the original noise floor\n * affects the higher frequencies more than the lower ones\n */\n this.athAdjust = function (a, x, athFloor) {\n /*\n * work in progress\n */\n var o = 90.30873362;\n var p = 94.82444863;\n var u = Util.FAST_LOG10_X(x, 10.0);\n var v = a * a;\n var w = 0.0;\n u -= athFloor;\n /* undo scaling */\n if (v > 1E-20)\n w = 1. + Util.FAST_LOG10_X(v, 10.0 / o);\n if (w < 0)\n w = 0.;\n u *= w;\n u += athFloor + o - p;\n /* redo scaling */\n\n return Math.pow(10., 0.1 * u);\n };\n\n /**\n * Calculate the allowed distortion for each scalefactor band, as determined\n * by the psychoacoustic model. xmin(sb) = ratio(sb) * en(sb) / bw(sb)\n *\n * returns number of sfb's with energy > ATH\n */\n this.calc_xmin = function (gfp, ratio, cod_info, pxmin) {\n var pxminPos = 0;\n var gfc = gfp.internal_flags;\n var gsfb, j = 0, ath_over = 0;\n var ATH = gfc.ATH;\n var xr = cod_info.xr;\n var enable_athaa_fix = (gfp.VBR == VbrMode.vbr_mtrh) ? 1 : 0;\n var masking_lower = gfc.masking_lower;\n\n if (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) {\n /* was already done in PSY-Model */\n masking_lower = 1.0;\n }\n\n for (gsfb = 0; gsfb < cod_info.psy_lmax; gsfb++) {\n var en0, xmin;\n var rh1, rh2;\n var width, l;\n\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n xmin = athAdjust(ATH.adjust, ATH.l[gsfb], ATH.floor);\n else\n xmin = ATH.adjust * ATH.l[gsfb];\n\n width = cod_info.width[gsfb];\n rh1 = xmin / width;\n rh2 = DBL_EPSILON;\n l = width >> 1;\n en0 = 0.0;\n do {\n var xa, xb;\n xa = xr[j] * xr[j];\n en0 += xa;\n rh2 += (xa < rh1) ? xa : rh1;\n j++;\n xb = xr[j] * xr[j];\n en0 += xb;\n rh2 += (xb < rh1) ? xb : rh1;\n j++;\n } while (--l > 0);\n if (en0 > xmin)\n ath_over++;\n\n if (gsfb == Encoder.SBPSY_l) {\n var x = xmin * gfc.nsPsy.longfact[gsfb];\n if (rh2 < x) {\n rh2 = x;\n }\n }\n if (enable_athaa_fix != 0) {\n xmin = rh2;\n }\n if (!gfp.ATHonly) {\n var e = ratio.en.l[gsfb];\n if (e > 0.0) {\n var x;\n x = en0 * ratio.thm.l[gsfb] * masking_lower / e;\n if (enable_athaa_fix != 0)\n x *= gfc.nsPsy.longfact[gsfb];\n if (xmin < x)\n xmin = x;\n }\n }\n if (enable_athaa_fix != 0)\n pxmin[pxminPos++] = xmin;\n else\n pxmin[pxminPos++] = xmin * gfc.nsPsy.longfact[gsfb];\n }\n /* end of long block loop */\n\n /* use this function to determine the highest non-zero coeff */\n var max_nonzero = 575;\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type, but not SHORT\n var k = 576;\n while (k-- != 0 && BitStream.EQ(xr[k], 0)) {\n max_nonzero = k;\n }\n }\n cod_info.max_nonzero_coeff = max_nonzero;\n\n for (var sfb = cod_info.sfb_smin; gsfb < cod_info.psymax; sfb++, gsfb += 3) {\n var width, b;\n var tmpATH;\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n tmpATH = athAdjust(ATH.adjust, ATH.s[sfb], ATH.floor);\n else\n tmpATH = ATH.adjust * ATH.s[sfb];\n\n width = cod_info.width[gsfb];\n for (b = 0; b < 3; b++) {\n var en0 = 0.0, xmin;\n var rh1, rh2;\n var l = width >> 1;\n\n rh1 = tmpATH / width;\n rh2 = DBL_EPSILON;\n do {\n var xa, xb;\n xa = xr[j] * xr[j];\n en0 += xa;\n rh2 += (xa < rh1) ? xa : rh1;\n j++;\n xb = xr[j] * xr[j];\n en0 += xb;\n rh2 += (xb < rh1) ? xb : rh1;\n j++;\n } while (--l > 0);\n if (en0 > tmpATH)\n ath_over++;\n if (sfb == Encoder.SBPSY_s) {\n var x = tmpATH * gfc.nsPsy.shortfact[sfb];\n if (rh2 < x) {\n rh2 = x;\n }\n }\n if (enable_athaa_fix != 0)\n xmin = rh2;\n else\n xmin = tmpATH;\n\n if (!gfp.ATHonly && !gfp.ATHshort) {\n var e = ratio.en.s[sfb][b];\n if (e > 0.0) {\n var x;\n x = en0 * ratio.thm.s[sfb][b] * masking_lower / e;\n if (enable_athaa_fix != 0)\n x *= gfc.nsPsy.shortfact[sfb];\n if (xmin < x)\n xmin = x;\n }\n }\n if (enable_athaa_fix != 0)\n pxmin[pxminPos++] = xmin;\n else\n pxmin[pxminPos++] = xmin * gfc.nsPsy.shortfact[sfb];\n }\n /* b */\n if (gfp.useTemporal) {\n if (pxmin[pxminPos - 3] > pxmin[pxminPos - 3 + 1])\n pxmin[pxminPos - 3 + 1] += (pxmin[pxminPos - 3] - pxmin[pxminPos - 3 + 1])\n * gfc.decay;\n if (pxmin[pxminPos - 3 + 1] > pxmin[pxminPos - 3 + 2])\n pxmin[pxminPos - 3 + 2] += (pxmin[pxminPos - 3 + 1] - pxmin[pxminPos - 3 + 2])\n * gfc.decay;\n }\n }\n /* end of short block sfb loop */\n\n return ath_over;\n };\n\n function StartLine(j) {\n this.s = j;\n }\n\n this.calc_noise_core = function (cod_info, startline, l, step) {\n var noise = 0;\n var j = startline.s;\n var ix = cod_info.l3_enc;\n\n if (j > cod_info.count1) {\n while ((l--) != 0) {\n var temp;\n temp = cod_info.xr[j];\n j++;\n noise += temp * temp;\n temp = cod_info.xr[j];\n j++;\n noise += temp * temp;\n }\n } else if (j > cod_info.big_values) {\n var ix01 = new_float(2);\n ix01[0] = 0;\n ix01[1] = step;\n while ((l--) != 0) {\n var temp;\n temp = Math.abs(cod_info.xr[j]) - ix01[ix[j]];\n j++;\n noise += temp * temp;\n temp = Math.abs(cod_info.xr[j]) - ix01[ix[j]];\n j++;\n noise += temp * temp;\n }\n } else {\n while ((l--) != 0) {\n var temp;\n temp = Math.abs(cod_info.xr[j]) - pow43[ix[j]] * step;\n j++;\n noise += temp * temp;\n temp = Math.abs(cod_info.xr[j]) - pow43[ix[j]] * step;\n j++;\n noise += temp * temp;\n }\n }\n\n startline.s = j;\n return noise;\n }\n\n /**\n *
\n     * -oo dB  =>  -1.00\n     * - 6 dB  =>  -0.97\n     * - 3 dB  =>  -0.80\n     * - 2 dB  =>  -0.64\n     * - 1 dB  =>  -0.38\n     *   0 dB  =>   0.00\n     * + 1 dB  =>  +0.49\n     * + 2 dB  =>  +1.06\n     * + 3 dB  =>  +1.68\n     * + 6 dB  =>  +3.69\n     * +10 dB  =>  +6.45\n     * 
\n */\n this.calc_noise = function (cod_info, l3_xmin, distort, res, prev_noise) {\n var distortPos = 0;\n var l3_xminPos = 0;\n var sfb, l, over = 0;\n var over_noise_db = 0;\n /* 0 dB relative to masking */\n var tot_noise_db = 0;\n /* -200 dB relative to masking */\n var max_noise = -20.0;\n var j = 0;\n var scalefac = cod_info.scalefac;\n var scalefacPos = 0;\n\n res.over_SSD = 0;\n\n for (sfb = 0; sfb < cod_info.psymax; sfb++) {\n var s = cod_info.global_gain\n - (((scalefac[scalefacPos++]) + (cod_info.preflag != 0 ? pretab[sfb]\n : 0)) << (cod_info.scalefac_scale + 1))\n - cod_info.subblock_gain[cod_info.window[sfb]] * 8;\n var noise = 0.0;\n\n if (prev_noise != null && (prev_noise.step[sfb] == s)) {\n\n /* use previously computed values */\n noise = prev_noise.noise[sfb];\n j += cod_info.width[sfb];\n distort[distortPos++] = noise / l3_xmin[l3_xminPos++];\n\n noise = prev_noise.noise_log[sfb];\n\n } else {\n var step = POW20(s);\n l = cod_info.width[sfb] >> 1;\n\n if ((j + cod_info.width[sfb]) > cod_info.max_nonzero_coeff) {\n var usefullsize;\n usefullsize = cod_info.max_nonzero_coeff - j + 1;\n\n if (usefullsize > 0)\n l = usefullsize >> 1;\n else\n l = 0;\n }\n\n var sl = new StartLine(j);\n noise = this.calc_noise_core(cod_info, sl, l, step);\n j = sl.s;\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.step[sfb] = s;\n prev_noise.noise[sfb] = noise;\n }\n\n noise = distort[distortPos++] = noise / l3_xmin[l3_xminPos++];\n\n /* multiplying here is adding in dB, but can overflow */\n noise = Util.FAST_LOG10(Math.max(noise, 1E-20));\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.noise_log[sfb] = noise;\n }\n }\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.global_gain = cod_info.global_gain;\n }\n\n tot_noise_db += noise;\n\n if (noise > 0.0) {\n var tmp;\n\n tmp = Math.max(0 | (noise * 10 + .5), 1);\n res.over_SSD += tmp * tmp;\n\n over++;\n /* multiplying here is adding in dB -but can overflow */\n /* over_noise *= noise; */\n over_noise_db += noise;\n }\n max_noise = Math.max(max_noise, noise);\n\n }\n\n res.over_count = over;\n res.tot_noise = tot_noise_db;\n res.over_noise = over_noise_db;\n res.max_noise = max_noise;\n\n return over;\n }\n\n /**\n * updates plotting data\n *\n * Mark Taylor 2000-??-??\n *\n * Robert Hegemann: moved noise/distortion calc into it\n */\n this.set_pinfo = function (gfp, cod_info, ratio, gr, ch) {\n var gfc = gfp.internal_flags;\n var sfb, sfb2;\n var l;\n var en0, en1;\n var ifqstep = (cod_info.scalefac_scale == 0) ? .5 : 1.0;\n var scalefac = cod_info.scalefac;\n\n var l3_xmin = new_float(L3Side.SFBMAX);\n var xfsf = new_float(L3Side.SFBMAX);\n var noise = new CalcNoiseResult();\n\n calc_xmin(gfp, ratio, cod_info, l3_xmin);\n calc_noise(cod_info, l3_xmin, xfsf, noise, null);\n\n var j = 0;\n sfb2 = cod_info.sfb_lmax;\n if (cod_info.block_type != Encoder.SHORT_TYPE\n && 0 == cod_info.mixed_block_flag)\n sfb2 = 22;\n for (sfb = 0; sfb < sfb2; sfb++) {\n var start = gfc.scalefac_band.l[sfb];\n var end = gfc.scalefac_band.l[sfb + 1];\n var bw = end - start;\n for (en0 = 0.0; j < end; j++)\n en0 += cod_info.xr[j] * cod_info.xr[j];\n en0 /= bw;\n /* convert to MDCT units */\n /* scaling so it shows up on FFT plot */\n en1 = 1e15;\n gfc.pinfo.en[gr][ch][sfb] = en1 * en0;\n gfc.pinfo.xfsf[gr][ch][sfb] = en1 * l3_xmin[sfb] * xfsf[sfb] / bw;\n\n if (ratio.en.l[sfb] > 0 && !gfp.ATHonly)\n en0 = en0 / ratio.en.l[sfb];\n else\n en0 = 0.0;\n\n gfc.pinfo.thr[gr][ch][sfb] = en1\n * Math.max(en0 * ratio.thm.l[sfb], gfc.ATH.l[sfb]);\n\n /* there is no scalefactor bands >= SBPSY_l */\n gfc.pinfo.LAMEsfb[gr][ch][sfb] = 0;\n if (cod_info.preflag != 0 && sfb >= 11)\n gfc.pinfo.LAMEsfb[gr][ch][sfb] = -ifqstep * pretab[sfb];\n\n if (sfb < Encoder.SBPSY_l) {\n /* scfsi should be decoded by caller side */\n assert(scalefac[sfb] >= 0);\n gfc.pinfo.LAMEsfb[gr][ch][sfb] -= ifqstep * scalefac[sfb];\n }\n }\n /* for sfb */\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n sfb2 = sfb;\n for (sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n var bw = end - start;\n for (var i = 0; i < 3; i++) {\n for (en0 = 0.0, l = start; l < end; l++) {\n en0 += cod_info.xr[j] * cod_info.xr[j];\n j++;\n }\n en0 = Math.max(en0 / bw, 1e-20);\n /* convert to MDCT units */\n /* scaling so it shows up on FFT plot */\n en1 = 1e15;\n\n gfc.pinfo.en_s[gr][ch][3 * sfb + i] = en1 * en0;\n gfc.pinfo.xfsf_s[gr][ch][3 * sfb + i] = en1 * l3_xmin[sfb2]\n * xfsf[sfb2] / bw;\n if (ratio.en.s[sfb][i] > 0)\n en0 = en0 / ratio.en.s[sfb][i];\n else\n en0 = 0.0;\n if (gfp.ATHonly || gfp.ATHshort)\n en0 = 0;\n\n gfc.pinfo.thr_s[gr][ch][3 * sfb + i] = en1\n * Math.max(en0 * ratio.thm.s[sfb][i],\n gfc.ATH.s[sfb]);\n\n /* there is no scalefactor bands >= SBPSY_s */\n gfc.pinfo.LAMEsfb_s[gr][ch][3 * sfb + i] = -2.0\n * cod_info.subblock_gain[i];\n if (sfb < Encoder.SBPSY_s) {\n gfc.pinfo.LAMEsfb_s[gr][ch][3 * sfb + i] -= ifqstep\n * scalefac[sfb2];\n }\n sfb2++;\n }\n }\n }\n /* block type short */\n gfc.pinfo.LAMEqss[gr][ch] = cod_info.global_gain;\n gfc.pinfo.LAMEmainbits[gr][ch] = cod_info.part2_3_length\n + cod_info.part2_length;\n gfc.pinfo.LAMEsfbits[gr][ch] = cod_info.part2_length;\n\n gfc.pinfo.over[gr][ch] = noise.over_count;\n gfc.pinfo.max_noise[gr][ch] = noise.max_noise * 10.0;\n gfc.pinfo.over_noise[gr][ch] = noise.over_noise * 10.0;\n gfc.pinfo.tot_noise[gr][ch] = noise.tot_noise * 10.0;\n gfc.pinfo.over_SSD[gr][ch] = noise.over_SSD;\n }\n\n /**\n * updates plotting data for a whole frame\n *\n * Robert Hegemann 2000-10-21\n */\n function set_frame_pinfo(gfp, ratio) {\n var gfc = gfp.internal_flags;\n\n gfc.masking_lower = 1.0;\n\n /*\n * for every granule and channel patch l3_enc and set info\n */\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n var scalefac_sav = new_int(L3Side.SFBMAX);\n System.arraycopy(cod_info.scalefac, 0, scalefac_sav, 0,\n scalefac_sav.length);\n\n /*\n * reconstruct the scalefactors in case SCFSI was used\n */\n if (gr == 1) {\n var sfb;\n for (sfb = 0; sfb < cod_info.sfb_lmax; sfb++) {\n if (cod_info.scalefac[sfb] < 0) /* scfsi */\n cod_info.scalefac[sfb] = gfc.l3_side.tt[0][ch].scalefac[sfb];\n }\n }\n\n set_pinfo(gfp, cod_info, ratio[gr][ch], gr, ch);\n System.arraycopy(scalefac_sav, 0, cod_info.scalefac, 0,\n scalefac_sav.length);\n }\n /* for ch */\n }\n /* for gr */\n }\n\n}\n\nmodule.exports = QuantizePVT;\n","/*\n *\tMP3 huffman table selecting and bit counting\n *\n *\tCopyright (c) 1999-2005 Takehiro TOMINAGA\n *\tCopyright (c) 2002-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\t See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Takehiro.java,v 1.26 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\nvar Tables = require('./Tables.js');\nvar GrInfo = require('./GrInfo.js');\nvar QuantizePVT = require('./QuantizePVT.js');\n\n\nfunction Takehiro() {\n\n var qupvt = null;\n this.qupvt = null;\n\n this.setModules = function (_qupvt) {\n this.qupvt = _qupvt;\n qupvt = _qupvt;\n }\n\n function Bits(b) {\n this.bits = 0 | b;\n }\n\n var subdv_table = [[0, 0], /* 0 bands */\n [0, 0], /* 1 bands */\n [0, 0], /* 2 bands */\n [0, 0], /* 3 bands */\n [0, 0], /* 4 bands */\n [0, 1], /* 5 bands */\n [1, 1], /* 6 bands */\n [1, 1], /* 7 bands */\n [1, 2], /* 8 bands */\n [2, 2], /* 9 bands */\n [2, 3], /* 10 bands */\n [2, 3], /* 11 bands */\n [3, 4], /* 12 bands */\n [3, 4], /* 13 bands */\n [3, 4], /* 14 bands */\n [4, 5], /* 15 bands */\n [4, 5], /* 16 bands */\n [4, 6], /* 17 bands */\n [5, 6], /* 18 bands */\n [5, 6], /* 19 bands */\n [5, 7], /* 20 bands */\n [6, 7], /* 21 bands */\n [6, 7], /* 22 bands */\n ];\n\n /**\n * nonlinear quantization of xr More accurate formula than the ISO formula.\n * Takes into account the fact that we are quantizing xr . ix, but we want\n * ix^4/3 to be as close as possible to x^4/3. (taking the nearest int would\n * mean ix is as close as possible to xr, which is different.)\n *\n * From Segher Boessenkool 11/1999\n *\n * 09/2000: ASM code removed in favor of IEEE754 hack by Takehiro Tominaga.\n * If you need the ASM code, check CVS circa Aug 2000.\n *\n * 01/2004: Optimizations by Gabriel Bouvigne\n */\n function quantize_lines_xrpow_01(l, istep, xr, xrPos, ix, ixPos) {\n var compareval0 = (1.0 - 0.4054) / istep;\n\n assert(l > 0);\n l = l >> 1;\n while ((l--) != 0) {\n ix[ixPos++] = (compareval0 > xr[xrPos++]) ? 0 : 1;\n ix[ixPos++] = (compareval0 > xr[xrPos++]) ? 0 : 1;\n }\n }\n\n /**\n * XRPOW_FTOI is a macro to convert floats to ints.
\n * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
\n * ROUNDFAC= -0.0946
\n *\n * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]
\n * ROUNDFAC=0.4054
\n *\n * Note: using floor() or 0| is extremely slow. On machines where the\n * TAKEHIRO_IEEE754_HACK code above does not work, it is worthwile to write\n * some ASM for XRPOW_FTOI().\n */\n function quantize_lines_xrpow(l, istep, xr, xrPos, ix, ixPos) {\n assert(l > 0);\n\n l = l >> 1;\n var remaining = l % 2;\n l = l >> 1;\n while (l-- != 0) {\n var x0, x1, x2, x3;\n var rx0, rx1, rx2, rx3;\n\n x0 = xr[xrPos++] * istep;\n x1 = xr[xrPos++] * istep;\n rx0 = 0 | x0;\n x2 = xr[xrPos++] * istep;\n rx1 = 0 | x1;\n x3 = xr[xrPos++] * istep;\n rx2 = 0 | x2;\n x0 += qupvt.adj43[rx0];\n rx3 = 0 | x3;\n x1 += qupvt.adj43[rx1];\n ix[ixPos++] = 0 | x0;\n x2 += qupvt.adj43[rx2];\n ix[ixPos++] = 0 | x1;\n x3 += qupvt.adj43[rx3];\n ix[ixPos++] = 0 | x2;\n ix[ixPos++] = 0 | x3;\n }\n if (remaining != 0) {\n var x0, x1;\n var rx0, rx1;\n\n x0 = xr[xrPos++] * istep;\n x1 = xr[xrPos++] * istep;\n rx0 = 0 | x0;\n rx1 = 0 | x1;\n x0 += qupvt.adj43[rx0];\n x1 += qupvt.adj43[rx1];\n ix[ixPos++] = 0 | x0;\n ix[ixPos++] = 0 | x1;\n }\n }\n\n /**\n * Quantization function This function will select which lines to quantize\n * and call the proper quantization function\n */\n function quantize_xrpow(xp, pi, istep, codInfo, prevNoise) {\n /* quantize on xr^(3/4) instead of xr */\n var sfb;\n var sfbmax;\n var j = 0;\n var prev_data_use;\n var accumulate = 0;\n var accumulate01 = 0;\n var xpPos = 0;\n var iData = pi;\n var iDataPos = 0;\n var acc_iData = iData;\n var acc_iDataPos = 0;\n var acc_xp = xp;\n var acc_xpPos = 0;\n\n /*\n * Reusing previously computed data does not seems to work if global\n * gain is changed. Finding why it behaves this way would allow to use a\n * cache of previously computed values (let's 10 cached values per sfb)\n * that would probably provide a noticeable speedup\n */\n prev_data_use = (prevNoise != null && (codInfo.global_gain == prevNoise.global_gain));\n\n if (codInfo.block_type == Encoder.SHORT_TYPE)\n sfbmax = 38;\n else\n sfbmax = 21;\n\n for (sfb = 0; sfb <= sfbmax; sfb++) {\n var step = -1;\n\n if (prev_data_use || codInfo.block_type == Encoder.NORM_TYPE) {\n step = codInfo.global_gain\n - ((codInfo.scalefac[sfb] + (codInfo.preflag != 0 ? qupvt.pretab[sfb]\n : 0)) << (codInfo.scalefac_scale + 1))\n - codInfo.subblock_gain[codInfo.window[sfb]] * 8;\n }\n assert(codInfo.width[sfb] >= 0);\n if (prev_data_use && (prevNoise.step[sfb] == step)) {\n /*\n * do not recompute this part, but compute accumulated lines\n */\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n } else { /* should compute this part */\n var l = codInfo.width[sfb];\n\n if ((j + codInfo.width[sfb]) > codInfo.max_nonzero_coeff) {\n /* do not compute upper zero part */\n var usefullsize;\n usefullsize = codInfo.max_nonzero_coeff - j + 1;\n Arrays.fill(pi, codInfo.max_nonzero_coeff, 576, 0);\n l = usefullsize;\n\n if (l < 0) {\n l = 0;\n }\n\n /* no need to compute higher sfb values */\n sfb = sfbmax + 1;\n }\n\n /* accumulate lines to quantize */\n if (0 == accumulate && 0 == accumulate01) {\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n if (prevNoise != null && prevNoise.sfb_count1 > 0\n && sfb >= prevNoise.sfb_count1\n && prevNoise.step[sfb] > 0\n && step >= prevNoise.step[sfb]) {\n\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate = 0;\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n accumulate01 += l;\n } else {\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n accumulate += l;\n }\n\n if (l <= 0) {\n /*\n * rh: 20040215 may happen due to \"prev_data_use\"\n * optimization\n */\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n\n break;\n /* ends for-loop */\n }\n }\n if (sfb <= sfbmax) {\n iDataPos += codInfo.width[sfb];\n xpPos += codInfo.width[sfb];\n j += codInfo.width[sfb];\n }\n }\n if (accumulate != 0) { /* last data part */\n quantize_lines_xrpow(accumulate, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n if (accumulate01 != 0) { /* last data part */\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n\n }\n\n /**\n * ix_max\n */\n function ix_max(ix, ixPos, endPos) {\n var max1 = 0, max2 = 0;\n\n do {\n var x1 = ix[ixPos++];\n var x2 = ix[ixPos++];\n if (max1 < x1)\n max1 = x1;\n\n if (max2 < x2)\n max2 = x2;\n } while (ixPos < endPos);\n if (max1 < max2)\n max1 = max2;\n return max1;\n }\n\n function count_bit_ESC(ix, ixPos, end, t1, t2, s) {\n /* ESC-table is used */\n var linbits = Tables.ht[t1].xlen * 65536 + Tables.ht[t2].xlen;\n var sum = 0, sum2;\n\n do {\n var x = ix[ixPos++];\n var y = ix[ixPos++];\n\n if (x != 0) {\n if (x > 14) {\n x = 15;\n sum += linbits;\n }\n x *= 16;\n }\n\n if (y != 0) {\n if (y > 14) {\n y = 15;\n sum += linbits;\n }\n x += y;\n }\n\n sum += Tables.largetbl[x];\n } while (ixPos < end);\n\n sum2 = sum & 0xffff;\n sum >>= 16;\n\n if (sum > sum2) {\n sum = sum2;\n t1 = t2;\n }\n\n s.bits += sum;\n return t1;\n }\n\n function count_bit_noESC(ix, ixPos, end, s) {\n /* No ESC-words */\n var sum1 = 0;\n var hlen1 = Tables.ht[1].hlen;\n\n do {\n var x = ix[ixPos + 0] * 2 + ix[ixPos + 1];\n ixPos += 2;\n sum1 += hlen1[x];\n } while (ixPos < end);\n\n s.bits += sum1;\n return 1;\n }\n\n function count_bit_noESC_from2(ix, ixPos, end, t1, s) {\n /* No ESC-words */\n var sum = 0, sum2;\n var xlen = Tables.ht[t1].xlen;\n var hlen;\n if (t1 == 2)\n hlen = Tables.table23;\n else\n hlen = Tables.table56;\n\n do {\n var x = ix[ixPos + 0] * xlen + ix[ixPos + 1];\n ixPos += 2;\n sum += hlen[x];\n } while (ixPos < end);\n\n sum2 = sum & 0xffff;\n sum >>= 16;\n\n if (sum > sum2) {\n sum = sum2;\n t1++;\n }\n\n s.bits += sum;\n return t1;\n }\n\n function count_bit_noESC_from3(ix, ixPos, end, t1, s) {\n /* No ESC-words */\n var sum1 = 0;\n var sum2 = 0;\n var sum3 = 0;\n var xlen = Tables.ht[t1].xlen;\n var hlen1 = Tables.ht[t1].hlen;\n var hlen2 = Tables.ht[t1 + 1].hlen;\n var hlen3 = Tables.ht[t1 + 2].hlen;\n\n do {\n var x = ix[ixPos + 0] * xlen + ix[ixPos + 1];\n ixPos += 2;\n sum1 += hlen1[x];\n sum2 += hlen2[x];\n sum3 += hlen3[x];\n } while (ixPos < end);\n var t = t1;\n if (sum1 > sum2) {\n sum1 = sum2;\n t++;\n }\n if (sum1 > sum3) {\n sum1 = sum3;\n t = t1 + 2;\n }\n s.bits += sum1;\n\n return t;\n }\n\n /*************************************************************************/\n /* choose table */\n /*************************************************************************/\n\n var huf_tbl_noESC = [1, 2, 5, 7, 7, 10, 10, 13, 13,\n 13, 13, 13, 13, 13, 13];\n\n /**\n * Choose the Huffman table that will encode ix[begin..end] with the fewest\n * bits.\n *\n * Note: This code contains knowledge about the sizes and characteristics of\n * the Huffman tables as defined in the IS (Table B.7), and will not work\n * with any arbitrary tables.\n */\n function choose_table(ix, ixPos, endPos, s) {\n var max = ix_max(ix, ixPos, endPos);\n\n switch (max) {\n case 0:\n return max;\n\n case 1:\n return count_bit_noESC(ix, ixPos, endPos, s);\n\n case 2:\n case 3:\n return count_bit_noESC_from2(ix, ixPos, endPos,\n huf_tbl_noESC[max - 1], s);\n\n case 4:\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n return count_bit_noESC_from3(ix, ixPos, endPos,\n huf_tbl_noESC[max - 1], s);\n\n default:\n /* try tables with linbits */\n if (max > QuantizePVT.IXMAX_VAL) {\n s.bits = QuantizePVT.LARGE_BITS;\n return -1;\n }\n max -= 15;\n var choice2;\n for (choice2 = 24; choice2 < 32; choice2++) {\n if (Tables.ht[choice2].linmax >= max) {\n break;\n }\n }\n var choice;\n for (choice = choice2 - 8; choice < 24; choice++) {\n if (Tables.ht[choice].linmax >= max) {\n break;\n }\n }\n return count_bit_ESC(ix, ixPos, endPos, choice, choice2, s);\n }\n }\n\n /**\n * count_bit\n */\n this.noquant_count_bits = function (gfc, gi, prev_noise) {\n var ix = gi.l3_enc;\n var i = Math.min(576, ((gi.max_nonzero_coeff + 2) >> 1) << 1);\n\n if (prev_noise != null)\n prev_noise.sfb_count1 = 0;\n\n /* Determine count1 region */\n for (; i > 1; i -= 2)\n if ((ix[i - 1] | ix[i - 2]) != 0)\n break;\n gi.count1 = i;\n\n /* Determines the number of bits to encode the quadruples. */\n var a1 = 0;\n var a2 = 0;\n for (; i > 3; i -= 4) {\n var p;\n /* hack to check if all values <= 1 */\n //throw \"TODO: HACK if ((((long) ix[i - 1] | (long) ix[i - 2] | (long) ix[i - 3] | (long) ix[i - 4]) & 0xffffffffL) > 1L \"\n //if (true) {\n if (((ix[i - 1] | ix[i - 2] | ix[i - 3] | ix[i - 4]) & 0x7fffffff) > 1) {\n break;\n }\n p = ((ix[i - 4] * 2 + ix[i - 3]) * 2 + ix[i - 2]) * 2 + ix[i - 1];\n a1 += Tables.t32l[p];\n a2 += Tables.t33l[p];\n }\n var bits = a1;\n gi.count1table_select = 0;\n if (a1 > a2) {\n bits = a2;\n gi.count1table_select = 1;\n }\n\n gi.count1bits = bits;\n gi.big_values = i;\n if (i == 0)\n return bits;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n a1 = 3 * gfc.scalefac_band.s[3];\n if (a1 > gi.big_values)\n a1 = gi.big_values;\n a2 = gi.big_values;\n\n } else if (gi.block_type == Encoder.NORM_TYPE) {\n assert(i <= 576);\n /* bv_scf has 576 entries (0..575) */\n a1 = gi.region0_count = gfc.bv_scf[i - 2];\n a2 = gi.region1_count = gfc.bv_scf[i - 1];\n\n assert(a1 + a2 + 2 < Encoder.SBPSY_l);\n a2 = gfc.scalefac_band.l[a1 + a2 + 2];\n a1 = gfc.scalefac_band.l[a1 + 1];\n if (a2 < i) {\n var bi = new Bits(bits);\n gi.table_select[2] = choose_table(ix, a2, i, bi);\n bits = bi.bits;\n }\n } else {\n gi.region0_count = 7;\n /* gi.region1_count = SBPSY_l - 7 - 1; */\n gi.region1_count = Encoder.SBMAX_l - 1 - 7 - 1;\n a1 = gfc.scalefac_band.l[7 + 1];\n a2 = i;\n if (a1 > a2) {\n a1 = a2;\n }\n }\n\n /* have to allow for the case when bigvalues < region0 < region1 */\n /* (and region0, region1 are ignored) */\n a1 = Math.min(a1, i);\n a2 = Math.min(a2, i);\n\n assert(a1 >= 0);\n assert(a2 >= 0);\n\n /* Count the number of bits necessary to code the bigvalues region. */\n if (0 < a1) {\n var bi = new Bits(bits);\n gi.table_select[0] = choose_table(ix, 0, a1, bi);\n bits = bi.bits;\n }\n if (a1 < a2) {\n var bi = new Bits(bits);\n gi.table_select[1] = choose_table(ix, a1, a2, bi);\n bits = bi.bits;\n }\n if (gfc.use_best_huffman == 2) {\n gi.part2_3_length = bits;\n best_huffman_divide(gfc, gi);\n bits = gi.part2_3_length;\n }\n\n if (prev_noise != null) {\n if (gi.block_type == Encoder.NORM_TYPE) {\n var sfb = 0;\n while (gfc.scalefac_band.l[sfb] < gi.big_values) {\n sfb++;\n }\n prev_noise.sfb_count1 = sfb;\n }\n }\n\n return bits;\n }\n\n this.count_bits = function (gfc, xr, gi, prev_noise) {\n var ix = gi.l3_enc;\n\n /* since quantize_xrpow uses table lookup, we need to check this first: */\n var w = (QuantizePVT.IXMAX_VAL) / qupvt.IPOW20(gi.global_gain);\n\n if (gi.xrpow_max > w)\n return QuantizePVT.LARGE_BITS;\n\n quantize_xrpow(xr, ix, qupvt.IPOW20(gi.global_gain), gi, prev_noise);\n\n if ((gfc.substep_shaping & 2) != 0) {\n var j = 0;\n /* 0.634521682242439 = 0.5946*2**(.5*0.1875) */\n var gain = gi.global_gain + gi.scalefac_scale;\n var roundfac = 0.634521682242439 / qupvt.IPOW20(gain);\n for (var sfb = 0; sfb < gi.sfbmax; sfb++) {\n var width = gi.width[sfb];\n assert(width >= 0);\n if (0 == gfc.pseudohalf[sfb]) {\n j += width;\n } else {\n var k;\n for (k = j, j += width; k < j; ++k) {\n ix[k] = (xr[k] >= roundfac) ? ix[k] : 0;\n }\n }\n }\n }\n return this.noquant_count_bits(gfc, gi, prev_noise);\n }\n\n /**\n * re-calculate the best scalefac_compress using scfsi the saved bits are\n * kept in the bit reservoir.\n */\n function recalc_divide_init(gfc, cod_info, ix, r01_bits, r01_div, r0_tbl, r1_tbl) {\n var bigv = cod_info.big_values;\n\n for (var r0 = 0; r0 <= 7 + 15; r0++) {\n r01_bits[r0] = QuantizePVT.LARGE_BITS;\n }\n\n for (var r0 = 0; r0 < 16; r0++) {\n var a1 = gfc.scalefac_band.l[r0 + 1];\n if (a1 >= bigv)\n break;\n var r0bits = 0;\n var bi = new Bits(r0bits);\n var r0t = choose_table(ix, 0, a1, bi);\n r0bits = bi.bits;\n\n for (var r1 = 0; r1 < 8; r1++) {\n var a2 = gfc.scalefac_band.l[r0 + r1 + 2];\n if (a2 >= bigv)\n break;\n var bits = r0bits;\n bi = new Bits(bits);\n var r1t = choose_table(ix, a1, a2, bi);\n bits = bi.bits;\n if (r01_bits[r0 + r1] > bits) {\n r01_bits[r0 + r1] = bits;\n r01_div[r0 + r1] = r0;\n r0_tbl[r0 + r1] = r0t;\n r1_tbl[r0 + r1] = r1t;\n }\n }\n }\n }\n\n function recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div, r0_tbl, r1_tbl) {\n var bigv = cod_info2.big_values;\n\n for (var r2 = 2; r2 < Encoder.SBMAX_l + 1; r2++) {\n var a2 = gfc.scalefac_band.l[r2];\n if (a2 >= bigv)\n break;\n var bits = r01_bits[r2 - 2] + cod_info2.count1bits;\n if (gi.part2_3_length <= bits)\n break;\n\n var bi = new Bits(bits);\n var r2t = choose_table(ix, a2, bigv, bi);\n bits = bi.bits;\n if (gi.part2_3_length <= bits)\n continue;\n\n gi.assign(cod_info2);\n gi.part2_3_length = bits;\n gi.region0_count = r01_div[r2 - 2];\n gi.region1_count = r2 - 2 - r01_div[r2 - 2];\n gi.table_select[0] = r0_tbl[r2 - 2];\n gi.table_select[1] = r1_tbl[r2 - 2];\n gi.table_select[2] = r2t;\n }\n }\n\n this.best_huffman_divide = function (gfc, gi) {\n var cod_info2 = new GrInfo();\n var ix = gi.l3_enc;\n var r01_bits = new_int(7 + 15 + 1);\n var r01_div = new_int(7 + 15 + 1);\n var r0_tbl = new_int(7 + 15 + 1);\n var r1_tbl = new_int(7 + 15 + 1);\n\n /* SHORT BLOCK stuff fails for MPEG2 */\n if (gi.block_type == Encoder.SHORT_TYPE && gfc.mode_gr == 1)\n return;\n\n cod_info2.assign(gi);\n if (gi.block_type == Encoder.NORM_TYPE) {\n recalc_divide_init(gfc, gi, ix, r01_bits, r01_div, r0_tbl, r1_tbl);\n recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div,\n r0_tbl, r1_tbl);\n }\n var i = cod_info2.big_values;\n if (i == 0 || (ix[i - 2] | ix[i - 1]) > 1)\n return;\n\n i = gi.count1 + 2;\n if (i > 576)\n return;\n\n /* Determines the number of bits to encode the quadruples. */\n cod_info2.assign(gi);\n cod_info2.count1 = i;\n var a1 = 0;\n var a2 = 0;\n\n assert(i <= 576);\n\n for (; i > cod_info2.big_values; i -= 4) {\n var p = ((ix[i - 4] * 2 + ix[i - 3]) * 2 + ix[i - 2]) * 2\n + ix[i - 1];\n a1 += Tables.t32l[p];\n a2 += Tables.t33l[p];\n }\n cod_info2.big_values = i;\n\n cod_info2.count1table_select = 0;\n if (a1 > a2) {\n a1 = a2;\n cod_info2.count1table_select = 1;\n }\n\n cod_info2.count1bits = a1;\n\n if (cod_info2.block_type == Encoder.NORM_TYPE)\n recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div,\n r0_tbl, r1_tbl);\n else {\n /* Count the number of bits necessary to code the bigvalues region. */\n cod_info2.part2_3_length = a1;\n a1 = gfc.scalefac_band.l[7 + 1];\n if (a1 > i) {\n a1 = i;\n }\n if (a1 > 0) {\n var bi = new Bits(cod_info2.part2_3_length);\n cod_info2.table_select[0] = choose_table(ix, 0, a1, bi);\n cod_info2.part2_3_length = bi.bits;\n }\n if (i > a1) {\n var bi = new Bits(cod_info2.part2_3_length);\n cod_info2.table_select[1] = choose_table(ix, a1, i, bi);\n cod_info2.part2_3_length = bi.bits;\n }\n if (gi.part2_3_length > cod_info2.part2_3_length)\n gi.assign(cod_info2);\n }\n }\n\n var slen1_n = [1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16];\n var slen2_n = [1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8];\n var slen1_tab = [0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4];\n var slen2_tab = [0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3];\n Takehiro.slen1_tab = slen1_tab;\n Takehiro.slen2_tab = slen2_tab;\n\n function scfsi_calc(ch, l3_side) {\n var sfb;\n var gi = l3_side.tt[1][ch];\n var g0 = l3_side.tt[0][ch];\n\n for (var i = 0; i < Tables.scfsi_band.length - 1; i++) {\n for (sfb = Tables.scfsi_band[i]; sfb < Tables.scfsi_band[i + 1]; sfb++) {\n if (g0.scalefac[sfb] != gi.scalefac[sfb]\n && gi.scalefac[sfb] >= 0)\n break;\n }\n if (sfb == Tables.scfsi_band[i + 1]) {\n for (sfb = Tables.scfsi_band[i]; sfb < Tables.scfsi_band[i + 1]; sfb++) {\n gi.scalefac[sfb] = -1;\n }\n l3_side.scfsi[ch][i] = 1;\n }\n }\n var s1 = 0;\n var c1 = 0;\n for (sfb = 0; sfb < 11; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n c1++;\n if (s1 < gi.scalefac[sfb])\n s1 = gi.scalefac[sfb];\n }\n var s2 = 0;\n var c2 = 0;\n for (; sfb < Encoder.SBPSY_l; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n c2++;\n if (s2 < gi.scalefac[sfb])\n s2 = gi.scalefac[sfb];\n }\n\n for (var i = 0; i < 16; i++) {\n if (s1 < slen1_n[i] && s2 < slen2_n[i]) {\n var c = slen1_tab[i] * c1 + slen2_tab[i] * c2;\n if (gi.part2_length > c) {\n gi.part2_length = c;\n gi.scalefac_compress = i;\n }\n }\n }\n }\n\n /**\n * Find the optimal way to store the scalefactors. Only call this routine\n * after final scalefactors have been chosen and the channel/granule will\n * not be re-encoded.\n */\n this.best_scalefac_store = function (gfc, gr, ch, l3_side) {\n /* use scalefac_scale if we can */\n var gi = l3_side.tt[gr][ch];\n var sfb, i, j, l;\n var recalc = 0;\n\n /*\n * remove scalefacs from bands with ix=0. This idea comes from the AAC\n * ISO docs. added mt 3/00\n */\n /* check if l3_enc=0 */\n j = 0;\n for (sfb = 0; sfb < gi.sfbmax; sfb++) {\n var width = gi.width[sfb];\n assert(width >= 0);\n j += width;\n for (l = -width; l < 0; l++) {\n if (gi.l3_enc[l + j] != 0)\n break;\n }\n if (l == 0)\n gi.scalefac[sfb] = recalc = -2;\n /* anything goes. */\n /*\n * only best_scalefac_store and calc_scfsi know--and only they\n * should know--about the magic number -2.\n */\n }\n\n if (0 == gi.scalefac_scale && 0 == gi.preflag) {\n var s = 0;\n for (sfb = 0; sfb < gi.sfbmax; sfb++)\n if (gi.scalefac[sfb] > 0)\n s |= gi.scalefac[sfb];\n\n if (0 == (s & 1) && s != 0) {\n for (sfb = 0; sfb < gi.sfbmax; sfb++)\n if (gi.scalefac[sfb] > 0)\n gi.scalefac[sfb] >>= 1;\n\n gi.scalefac_scale = recalc = 1;\n }\n }\n\n if (0 == gi.preflag && gi.block_type != Encoder.SHORT_TYPE\n && gfc.mode_gr == 2) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (gi.scalefac[sfb] < qupvt.pretab[sfb]\n && gi.scalefac[sfb] != -2)\n break;\n if (sfb == Encoder.SBPSY_l) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (gi.scalefac[sfb] > 0)\n gi.scalefac[sfb] -= qupvt.pretab[sfb];\n\n gi.preflag = recalc = 1;\n }\n }\n\n for (i = 0; i < 4; i++)\n l3_side.scfsi[ch][i] = 0;\n\n if (gfc.mode_gr == 2 && gr == 1\n && l3_side.tt[0][ch].block_type != Encoder.SHORT_TYPE\n && l3_side.tt[1][ch].block_type != Encoder.SHORT_TYPE) {\n scfsi_calc(ch, l3_side);\n recalc = 0;\n }\n for (sfb = 0; sfb < gi.sfbmax; sfb++) {\n if (gi.scalefac[sfb] == -2) {\n gi.scalefac[sfb] = 0;\n /* if anything goes, then 0 is a good choice */\n }\n }\n if (recalc != 0) {\n if (gfc.mode_gr == 2) {\n this.scale_bitcount(gi);\n } else {\n this.scale_bitcount_lsf(gfc, gi);\n }\n }\n }\n\n function all_scalefactors_not_negative(scalefac, n) {\n for (var i = 0; i < n; ++i) {\n if (scalefac[i] < 0)\n return false;\n }\n return true;\n }\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 18*slen1_tab[i] + 18*slen2_tab[i]\n */\n var scale_short = [0, 18, 36, 54, 54, 36, 54, 72,\n 54, 72, 90, 72, 90, 108, 108, 126];\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 17*slen1_tab[i] + 18*slen2_tab[i]\n */\n var scale_mixed = [0, 18, 36, 54, 51, 35, 53, 71,\n 52, 70, 88, 69, 87, 105, 104, 122];\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 11*slen1_tab[i] + 10*slen2_tab[i]\n */\n var scale_long = [0, 10, 20, 30, 33, 21, 31, 41, 32, 42,\n 52, 43, 53, 63, 64, 74];\n\n /**\n * Also calculates the number of bits necessary to code the scalefactors.\n */\n this.scale_bitcount = function (cod_info) {\n var k, sfb, max_slen1 = 0, max_slen2 = 0;\n\n /* maximum values */\n var tab;\n var scalefac = cod_info.scalefac;\n\n assert(all_scalefactors_not_negative(scalefac, cod_info.sfbmax));\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n tab = scale_short;\n if (cod_info.mixed_block_flag != 0)\n tab = scale_mixed;\n } else { /* block_type == 1,2,or 3 */\n tab = scale_long;\n if (0 == cod_info.preflag) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (scalefac[sfb] < qupvt.pretab[sfb])\n break;\n\n if (sfb == Encoder.SBPSY_l) {\n cod_info.preflag = 1;\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n scalefac[sfb] -= qupvt.pretab[sfb];\n }\n }\n }\n\n for (sfb = 0; sfb < cod_info.sfbdivide; sfb++)\n if (max_slen1 < scalefac[sfb])\n max_slen1 = scalefac[sfb];\n\n for (; sfb < cod_info.sfbmax; sfb++)\n if (max_slen2 < scalefac[sfb])\n max_slen2 = scalefac[sfb];\n\n /*\n * from Takehiro TOMINAGA 10/99 loop over *all*\n * posible values of scalefac_compress to find the one which uses the\n * smallest number of bits. ISO would stop at first valid index\n */\n cod_info.part2_length = QuantizePVT.LARGE_BITS;\n for (k = 0; k < 16; k++) {\n if (max_slen1 < slen1_n[k] && max_slen2 < slen2_n[k]\n && cod_info.part2_length > tab[k]) {\n cod_info.part2_length = tab[k];\n cod_info.scalefac_compress = k;\n }\n }\n return cod_info.part2_length == QuantizePVT.LARGE_BITS;\n }\n\n /**\n * table of largest scalefactor values for MPEG2\n */\n var max_range_sfac_tab = [[15, 15, 7, 7],\n [15, 15, 7, 0], [7, 3, 0, 0], [15, 31, 31, 0],\n [7, 7, 7, 0], [3, 3, 0, 0]];\n\n /**\n * Also counts the number of bits to encode the scalefacs but for MPEG 2\n * Lower sampling frequencies (24, 22.05 and 16 kHz.)\n *\n * This is reverse-engineered from section 2.4.3.2 of the MPEG2 IS,\n * \"Audio Decoding Layer III\"\n */\n this.scale_bitcount_lsf = function (gfc, cod_info) {\n var table_number, row_in_table, partition, nr_sfb, window;\n var over;\n var i, sfb;\n var max_sfac = new_int(4);\n//var partition_table;\n var scalefac = cod_info.scalefac;\n\n /*\n * Set partition table. Note that should try to use table one, but do\n * not yet...\n */\n if (cod_info.preflag != 0)\n table_number = 2;\n else\n table_number = 0;\n\n for (i = 0; i < 4; i++)\n max_sfac[i] = 0;\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n row_in_table = 1;\n var partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (sfb = 0, partition = 0; partition < 4; partition++) {\n nr_sfb = partition_table[partition] / 3;\n for (i = 0; i < nr_sfb; i++, sfb++)\n for (window = 0; window < 3; window++)\n if (scalefac[sfb * 3 + window] > max_sfac[partition])\n max_sfac[partition] = scalefac[sfb * 3 + window];\n }\n } else {\n row_in_table = 0;\n var partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (sfb = 0, partition = 0; partition < 4; partition++) {\n nr_sfb = partition_table[partition];\n for (i = 0; i < nr_sfb; i++, sfb++)\n if (scalefac[sfb] > max_sfac[partition])\n max_sfac[partition] = scalefac[sfb];\n }\n }\n\n for (over = false, partition = 0; partition < 4; partition++) {\n if (max_sfac[partition] > max_range_sfac_tab[table_number][partition])\n over = true;\n }\n if (!over) {\n var slen1, slen2, slen3, slen4;\n\n cod_info.sfb_partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (partition = 0; partition < 4; partition++)\n cod_info.slen[partition] = log2tab[max_sfac[partition]];\n\n /* set scalefac_compress */\n slen1 = cod_info.slen[0];\n slen2 = cod_info.slen[1];\n slen3 = cod_info.slen[2];\n slen4 = cod_info.slen[3];\n\n switch (table_number) {\n case 0:\n cod_info.scalefac_compress = (((slen1 * 5) + slen2) << 4)\n + (slen3 << 2) + slen4;\n break;\n\n case 1:\n cod_info.scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2)\n + slen3;\n break;\n\n case 2:\n cod_info.scalefac_compress = 500 + (slen1 * 3) + slen2;\n break;\n\n default:\n System.err.printf(\"intensity stereo not implemented yet\\n\");\n break;\n }\n }\n if (!over) {\n assert(cod_info.sfb_partition_table != null);\n cod_info.part2_length = 0;\n for (partition = 0; partition < 4; partition++)\n cod_info.part2_length += cod_info.slen[partition]\n * cod_info.sfb_partition_table[partition];\n }\n return over;\n }\n\n /*\n * Since no bands have been over-amplified, we can set scalefac_compress and\n * slen[] for the formatter\n */\n var log2tab = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4,\n 4, 4, 4, 4];\n\n this.huffman_init = function (gfc) {\n for (var i = 2; i <= 576; i += 2) {\n var scfb_anz = 0, bv_index;\n while (gfc.scalefac_band.l[++scfb_anz] < i)\n ;\n\n bv_index = subdv_table[scfb_anz][0]; // .region0_count\n while (gfc.scalefac_band.l[bv_index + 1] > i)\n bv_index--;\n\n if (bv_index < 0) {\n /*\n * this is an indication that everything is going to be encoded\n * as region0: bigvalues < region0 < region1 so lets set\n * region0, region1 to some value larger than bigvalues\n */\n bv_index = subdv_table[scfb_anz][0]; // .region0_count\n }\n\n gfc.bv_scf[i - 2] = bv_index;\n\n bv_index = subdv_table[scfb_anz][1]; // .region1_count\n while (gfc.scalefac_band.l[bv_index + gfc.bv_scf[i - 2] + 2] > i)\n bv_index--;\n\n if (bv_index < 0) {\n bv_index = subdv_table[scfb_anz][1]; // .region1_count\n }\n\n gfc.bv_scf[i - 1] = bv_index;\n }\n }\n}\n\nmodule.exports = Takehiro;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Takehiro = require('./Takehiro.js');\nvar Tables = require('./Tables.js');\nvar Encoder = require('./Encoder.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nBitStream.EQ = function (a, b) {\n return (Math.abs(a) > Math.abs(b)) ? (Math.abs((a) - (b)) <= (Math\n .abs(a) * 1e-6))\n : (Math.abs((a) - (b)) <= (Math.abs(b) * 1e-6));\n};\n\nBitStream.NEQ = function (a, b) {\n return !BitStream.EQ(a, b);\n};\n\nfunction BitStream() {\n var self = this;\n var CRC16_POLYNOMIAL = 0x8005;\n\n /*\n * we work with ints, so when doing bit manipulation, we limit ourselves to\n * MAX_LENGTH-2 just to be on the safe side\n */\n var MAX_LENGTH = 32;\n\n //GainAnalysis ga;\n //MPGLib mpg;\n //Version ver;\n //VBRTag vbr;\n var ga = null;\n var mpg = null;\n var ver = null;\n var vbr = null;\n\n //public final void setModules(GainAnalysis ga, MPGLib mpg, Version ver,\n //\tVBRTag vbr) {\n\n this.setModules = function (_ga, _mpg, _ver, _vbr) {\n ga = _ga;\n mpg = _mpg;\n ver = _ver;\n vbr = _vbr;\n };\n\n /**\n * Bit stream buffer.\n */\n //private byte[] buf;\n var buf = null;\n /**\n * Bit counter of bit stream.\n */\n var totbit = 0;\n /**\n * Pointer to top byte in buffer.\n */\n var bufByteIdx = 0;\n /**\n * Pointer to top bit of top byte in buffer.\n */\n var bufBitIdx = 0;\n\n /**\n * compute bitsperframe and mean_bits for a layer III frame\n */\n this.getframebits = function (gfp) {\n var gfc = gfp.internal_flags;\n var bit_rate;\n\n /* get bitrate in kbps [?] */\n if (gfc.bitrate_index != 0)\n bit_rate = Tables.bitrate_table[gfp.version][gfc.bitrate_index];\n else\n bit_rate = gfp.brate;\n assert(8 <= bit_rate && bit_rate <= 640);\n\n /* main encoding routine toggles padding on and off */\n /* one Layer3 Slot consists of 8 bits */\n var bytes = 0 | (gfp.version + 1) * 72000 * bit_rate / gfp.out_samplerate + gfc.padding;\n return 8 * bytes;\n };\n\n function putheader_bits(gfc) {\n System.arraycopy(gfc.header[gfc.w_ptr].buf, 0, buf, bufByteIdx, gfc.sideinfo_len);\n bufByteIdx += gfc.sideinfo_len;\n totbit += gfc.sideinfo_len * 8;\n gfc.w_ptr = (gfc.w_ptr + 1) & (LameInternalFlags.MAX_HEADER_BUF - 1);\n }\n\n /**\n * write j bits into the bit stream\n */\n function putbits2(gfc, val, j) {\n assert(j < MAX_LENGTH - 2);\n\n while (j > 0) {\n var k;\n if (bufBitIdx == 0) {\n bufBitIdx = 8;\n bufByteIdx++;\n assert(bufByteIdx < Lame.LAME_MAXMP3BUFFER);\n assert(gfc.header[gfc.w_ptr].write_timing >= totbit);\n if (gfc.header[gfc.w_ptr].write_timing == totbit) {\n putheader_bits(gfc);\n }\n buf[bufByteIdx] = 0;\n }\n\n k = Math.min(j, bufBitIdx);\n j -= k;\n\n bufBitIdx -= k;\n\n assert(j < MAX_LENGTH);\n /* 32 too large on 32 bit machines */\n assert(bufBitIdx < MAX_LENGTH);\n\n buf[bufByteIdx] |= ((val >> j) << bufBitIdx);\n totbit += k;\n }\n }\n\n /**\n * write j bits into the bit stream, ignoring frame headers\n */\n function putbits_noheaders(gfc, val, j) {\n assert(j < MAX_LENGTH - 2);\n\n while (j > 0) {\n var k;\n if (bufBitIdx == 0) {\n bufBitIdx = 8;\n bufByteIdx++;\n assert(bufByteIdx < Lame.LAME_MAXMP3BUFFER);\n buf[bufByteIdx] = 0;\n }\n\n k = Math.min(j, bufBitIdx);\n j -= k;\n\n bufBitIdx -= k;\n\n assert(j < MAX_LENGTH);\n /* 32 too large on 32 bit machines */\n assert(bufBitIdx < MAX_LENGTH);\n\n buf[bufByteIdx] |= ((val >> j) << bufBitIdx);\n totbit += k;\n }\n }\n\n /**\n * Some combinations of bitrate, Fs, and stereo make it impossible to stuff\n * out a frame using just main_data, due to the limited number of bits to\n * indicate main_data_length. In these situations, we put stuffing bits into\n * the ancillary data...\n */\n function drain_into_ancillary(gfp, remainingBits) {\n var gfc = gfp.internal_flags;\n var i;\n assert(remainingBits >= 0);\n\n if (remainingBits >= 8) {\n putbits2(gfc, 0x4c, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x41, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x4d, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x45, 8);\n remainingBits -= 8;\n }\n\n if (remainingBits >= 32) {\n var version = ver.getLameShortVersion();\n if (remainingBits >= 32)\n for (i = 0; i < version.length && remainingBits >= 8; ++i) {\n remainingBits -= 8;\n putbits2(gfc, version.charAt(i), 8);\n }\n }\n\n for (; remainingBits >= 1; remainingBits -= 1) {\n putbits2(gfc, gfc.ancillary_flag, 1);\n gfc.ancillary_flag ^= (!gfp.disable_reservoir ? 1 : 0);\n }\n\n assert(remainingBits == 0);\n\n }\n\n /**\n * write N bits into the header\n */\n function writeheader(gfc, val, j) {\n var ptr = gfc.header[gfc.h_ptr].ptr;\n\n while (j > 0) {\n var k = Math.min(j, 8 - (ptr & 7));\n j -= k;\n assert(j < MAX_LENGTH);\n /* >> 32 too large for 32 bit machines */\n\n gfc.header[gfc.h_ptr].buf[ptr >> 3] |= ((val >> j)) << (8 - (ptr & 7) - k);\n ptr += k;\n }\n gfc.header[gfc.h_ptr].ptr = ptr;\n }\n\n function CRC_update(value, crc) {\n value <<= 8;\n for (var i = 0; i < 8; i++) {\n value <<= 1;\n crc <<= 1;\n\n if ((((crc ^ value) & 0x10000) != 0))\n crc ^= CRC16_POLYNOMIAL;\n }\n return crc;\n }\n\n this.CRC_writeheader = function (gfc, header) {\n var crc = 0xffff;\n /* (jo) init crc16 for error_protection */\n\n crc = CRC_update(header[2] & 0xff, crc);\n crc = CRC_update(header[3] & 0xff, crc);\n for (var i = 6; i < gfc.sideinfo_len; i++) {\n crc = CRC_update(header[i] & 0xff, crc);\n }\n\n header[4] = (byte)(crc >> 8);\n header[5] = (byte)(crc & 255);\n };\n\n function encodeSideInfo2(gfp, bitsPerFrame) {\n var gfc = gfp.internal_flags;\n var l3_side;\n var gr, ch;\n\n l3_side = gfc.l3_side;\n gfc.header[gfc.h_ptr].ptr = 0;\n Arrays.fill(gfc.header[gfc.h_ptr].buf, 0, gfc.sideinfo_len, 0);\n if (gfp.out_samplerate < 16000)\n writeheader(gfc, 0xffe, 12);\n else\n writeheader(gfc, 0xfff, 12);\n writeheader(gfc, (gfp.version), 1);\n writeheader(gfc, 4 - 3, 2);\n writeheader(gfc, (!gfp.error_protection ? 1 : 0), 1);\n writeheader(gfc, (gfc.bitrate_index), 4);\n writeheader(gfc, (gfc.samplerate_index), 2);\n writeheader(gfc, (gfc.padding), 1);\n writeheader(gfc, (gfp.extension), 1);\n writeheader(gfc, (gfp.mode.ordinal()), 2);\n writeheader(gfc, (gfc.mode_ext), 2);\n writeheader(gfc, (gfp.copyright), 1);\n writeheader(gfc, (gfp.original), 1);\n writeheader(gfc, (gfp.emphasis), 2);\n if (gfp.error_protection) {\n writeheader(gfc, 0, 16);\n /* dummy */\n }\n\n if (gfp.version == 1) {\n /* MPEG1 */\n assert(l3_side.main_data_begin >= 0);\n writeheader(gfc, (l3_side.main_data_begin), 9);\n\n if (gfc.channels_out == 2)\n writeheader(gfc, l3_side.private_bits, 3);\n else\n writeheader(gfc, l3_side.private_bits, 5);\n\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var band;\n for (band = 0; band < 4; band++) {\n writeheader(gfc, l3_side.scfsi[ch][band], 1);\n }\n }\n\n for (gr = 0; gr < 2; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n writeheader(gfc, gi.part2_3_length + gi.part2_length, 12);\n writeheader(gfc, gi.big_values / 2, 9);\n writeheader(gfc, gi.global_gain, 8);\n writeheader(gfc, gi.scalefac_compress, 4);\n\n if (gi.block_type != Encoder.NORM_TYPE) {\n writeheader(gfc, 1, 1);\n /* window_switching_flag */\n writeheader(gfc, gi.block_type, 2);\n writeheader(gfc, gi.mixed_block_flag, 1);\n\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n\n writeheader(gfc, gi.subblock_gain[0], 3);\n writeheader(gfc, gi.subblock_gain[1], 3);\n writeheader(gfc, gi.subblock_gain[2], 3);\n } else {\n writeheader(gfc, 0, 1);\n /* window_switching_flag */\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n if (gi.table_select[2] == 14)\n gi.table_select[2] = 16;\n writeheader(gfc, gi.table_select[2], 5);\n\n assert(0 <= gi.region0_count && gi.region0_count < 16);\n assert(0 <= gi.region1_count && gi.region1_count < 8);\n writeheader(gfc, gi.region0_count, 4);\n writeheader(gfc, gi.region1_count, 3);\n }\n writeheader(gfc, gi.preflag, 1);\n writeheader(gfc, gi.scalefac_scale, 1);\n writeheader(gfc, gi.count1table_select, 1);\n }\n }\n } else {\n /* MPEG2 */\n assert(l3_side.main_data_begin >= 0);\n writeheader(gfc, (l3_side.main_data_begin), 8);\n writeheader(gfc, l3_side.private_bits, gfc.channels_out);\n\n gr = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n writeheader(gfc, gi.part2_3_length + gi.part2_length, 12);\n writeheader(gfc, gi.big_values / 2, 9);\n writeheader(gfc, gi.global_gain, 8);\n writeheader(gfc, gi.scalefac_compress, 9);\n\n if (gi.block_type != Encoder.NORM_TYPE) {\n writeheader(gfc, 1, 1);\n /* window_switching_flag */\n writeheader(gfc, gi.block_type, 2);\n writeheader(gfc, gi.mixed_block_flag, 1);\n\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n\n writeheader(gfc, gi.subblock_gain[0], 3);\n writeheader(gfc, gi.subblock_gain[1], 3);\n writeheader(gfc, gi.subblock_gain[2], 3);\n } else {\n writeheader(gfc, 0, 1);\n /* window_switching_flag */\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n if (gi.table_select[2] == 14)\n gi.table_select[2] = 16;\n writeheader(gfc, gi.table_select[2], 5);\n\n assert(0 <= gi.region0_count && gi.region0_count < 16);\n assert(0 <= gi.region1_count && gi.region1_count < 8);\n writeheader(gfc, gi.region0_count, 4);\n writeheader(gfc, gi.region1_count, 3);\n }\n\n writeheader(gfc, gi.scalefac_scale, 1);\n writeheader(gfc, gi.count1table_select, 1);\n }\n }\n\n if (gfp.error_protection) {\n /* (jo) error_protection: add crc16 information to header */\n CRC_writeheader(gfc, gfc.header[gfc.h_ptr].buf);\n }\n\n {\n var old = gfc.h_ptr;\n assert(gfc.header[old].ptr == gfc.sideinfo_len * 8);\n\n gfc.h_ptr = (old + 1) & (LameInternalFlags.MAX_HEADER_BUF - 1);\n gfc.header[gfc.h_ptr].write_timing = gfc.header[old].write_timing\n + bitsPerFrame;\n\n if (gfc.h_ptr == gfc.w_ptr) {\n /* yikes! we are out of header buffer space */\n System.err\n .println(\"Error: MAX_HEADER_BUF too small in bitstream.c \\n\");\n }\n\n }\n }\n\n function huffman_coder_count1(gfc, gi) {\n /* Write count1 area */\n var h = Tables.ht[gi.count1table_select + 32];\n var i, bits = 0;\n\n var ix = gi.big_values;\n var xr = gi.big_values;\n assert(gi.count1table_select < 2);\n\n for (i = (gi.count1 - gi.big_values) / 4; i > 0; --i) {\n var huffbits = 0;\n var p = 0, v;\n\n v = gi.l3_enc[ix + 0];\n if (v != 0) {\n p += 8;\n if (gi.xr[xr + 0] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 1];\n if (v != 0) {\n p += 4;\n huffbits *= 2;\n if (gi.xr[xr + 1] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 2];\n if (v != 0) {\n p += 2;\n huffbits *= 2;\n if (gi.xr[xr + 2] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 3];\n if (v != 0) {\n p++;\n huffbits *= 2;\n if (gi.xr[xr + 3] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n ix += 4;\n xr += 4;\n putbits2(gfc, huffbits + h.table[p], h.hlen[p]);\n bits += h.hlen[p];\n }\n return bits;\n }\n\n /**\n * Implements the pseudocode of page 98 of the IS\n */\n function Huffmancode(gfc, tableindex, start, end, gi) {\n var h = Tables.ht[tableindex];\n var bits = 0;\n\n assert(tableindex < 32);\n if (0 == tableindex)\n return bits;\n\n for (var i = start; i < end; i += 2) {\n var cbits = 0;\n var xbits = 0;\n var linbits = h.xlen;\n var xlen = h.xlen;\n var ext = 0;\n var x1 = gi.l3_enc[i];\n var x2 = gi.l3_enc[i + 1];\n\n if (x1 != 0) {\n if (gi.xr[i] < 0)\n ext++;\n cbits--;\n }\n\n if (tableindex > 15) {\n /* use ESC-words */\n if (x1 > 14) {\n var linbits_x1 = x1 - 15;\n assert(linbits_x1 <= h.linmax);\n ext |= linbits_x1 << 1;\n xbits = linbits;\n x1 = 15;\n }\n\n if (x2 > 14) {\n var linbits_x2 = x2 - 15;\n assert(linbits_x2 <= h.linmax);\n ext <<= linbits;\n ext |= linbits_x2;\n xbits += linbits;\n x2 = 15;\n }\n xlen = 16;\n }\n\n if (x2 != 0) {\n ext <<= 1;\n if (gi.xr[i + 1] < 0)\n ext++;\n cbits--;\n }\n\n assert((x1 | x2) < 16);\n\n x1 = x1 * xlen + x2;\n xbits -= cbits;\n cbits += h.hlen[x1];\n\n assert(cbits <= MAX_LENGTH);\n assert(xbits <= MAX_LENGTH);\n\n putbits2(gfc, h.table[x1], cbits);\n putbits2(gfc, ext, xbits);\n bits += cbits + xbits;\n }\n return bits;\n }\n\n /**\n * Note the discussion of huffmancodebits() on pages 28 and 29 of the IS, as\n * well as the definitions of the side information on pages 26 and 27.\n */\n function ShortHuffmancodebits(gfc, gi) {\n var region1Start = 3 * gfc.scalefac_band.s[3];\n if (region1Start > gi.big_values)\n region1Start = gi.big_values;\n\n /* short blocks do not have a region2 */\n var bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);\n bits += Huffmancode(gfc, gi.table_select[1], region1Start,\n gi.big_values, gi);\n return bits;\n }\n\n function LongHuffmancodebits(gfc, gi) {\n var bigvalues, bits;\n var region1Start, region2Start;\n\n bigvalues = gi.big_values;\n assert(0 <= bigvalues && bigvalues <= 576);\n\n var i = gi.region0_count + 1;\n assert(0 <= i);\n assert(i < gfc.scalefac_band.l.length);\n region1Start = gfc.scalefac_band.l[i];\n i += gi.region1_count + 1;\n assert(0 <= i);\n assert(i < gfc.scalefac_band.l.length);\n region2Start = gfc.scalefac_band.l[i];\n\n if (region1Start > bigvalues)\n region1Start = bigvalues;\n\n if (region2Start > bigvalues)\n region2Start = bigvalues;\n\n bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);\n bits += Huffmancode(gfc, gi.table_select[1], region1Start,\n region2Start, gi);\n bits += Huffmancode(gfc, gi.table_select[2], region2Start, bigvalues,\n gi);\n return bits;\n }\n\n function writeMainData(gfp) {\n var gr, ch, sfb, data_bits, tot_bits = 0;\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n\n if (gfp.version == 1) {\n /* MPEG 1 */\n for (gr = 0; gr < 2; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n var slen1 = Takehiro.slen1_tab[gi.scalefac_compress];\n var slen2 = Takehiro.slen2_tab[gi.scalefac_compress];\n data_bits = 0;\n for (sfb = 0; sfb < gi.sfbdivide; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n /* scfsi is used */\n putbits2(gfc, gi.scalefac[sfb], slen1);\n data_bits += slen1;\n }\n for (; sfb < gi.sfbmax; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n /* scfsi is used */\n putbits2(gfc, gi.scalefac[sfb], slen2);\n data_bits += slen2;\n }\n assert(data_bits == gi.part2_length);\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n data_bits += ShortHuffmancodebits(gfc, gi);\n } else {\n data_bits += LongHuffmancodebits(gfc, gi);\n }\n data_bits += huffman_coder_count1(gfc, gi);\n /* does bitcount in quantize.c agree with actual bit count? */\n assert(data_bits == gi.part2_3_length + gi.part2_length);\n tot_bits += data_bits;\n }\n /* for ch */\n }\n /* for gr */\n } else {\n /* MPEG 2 */\n gr = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n var i, sfb_partition, scale_bits = 0;\n assert(gi.sfb_partition_table != null);\n data_bits = 0;\n sfb = 0;\n sfb_partition = 0;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n for (; sfb_partition < 4; sfb_partition++) {\n var sfbs = gi.sfb_partition_table[sfb_partition] / 3;\n var slen = gi.slen[sfb_partition];\n for (i = 0; i < sfbs; i++, sfb++) {\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 0], 0), slen);\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 1], 0), slen);\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 2], 0), slen);\n scale_bits += 3 * slen;\n }\n }\n data_bits += ShortHuffmancodebits(gfc, gi);\n } else {\n for (; sfb_partition < 4; sfb_partition++) {\n var sfbs = gi.sfb_partition_table[sfb_partition];\n var slen = gi.slen[sfb_partition];\n for (i = 0; i < sfbs; i++, sfb++) {\n putbits2(gfc, Math.max(gi.scalefac[sfb], 0), slen);\n scale_bits += slen;\n }\n }\n data_bits += LongHuffmancodebits(gfc, gi);\n }\n data_bits += huffman_coder_count1(gfc, gi);\n /* does bitcount in quantize.c agree with actual bit count? */\n assert(data_bits == gi.part2_3_length);\n assert(scale_bits == gi.part2_length);\n tot_bits += scale_bits + data_bits;\n }\n /* for ch */\n }\n /* for gf */\n return tot_bits;\n }\n\n /* main_data */\n\n function TotalBytes() {\n this.total = 0;\n }\n\n /*\n * compute the number of bits required to flush all mp3 frames currently in\n * the buffer. This should be the same as the reservoir size. Only call this\n * routine between frames - i.e. only after all headers and data have been\n * added to the buffer by format_bitstream().\n *\n * Also compute total_bits_output = size of mp3 buffer (including frame\n * headers which may not have yet been send to the mp3 buffer) + number of\n * bits needed to flush all mp3 frames.\n *\n * total_bytes_output is the size of the mp3 output buffer if\n * lame_encode_flush_nogap() was called right now.\n */\n function compute_flushbits(gfp, total_bytes_output) {\n var gfc = gfp.internal_flags;\n var flushbits, remaining_headers;\n var bitsPerFrame;\n var last_ptr, first_ptr;\n first_ptr = gfc.w_ptr;\n /* first header to add to bitstream */\n last_ptr = gfc.h_ptr - 1;\n /* last header to add to bitstream */\n if (last_ptr == -1)\n last_ptr = LameInternalFlags.MAX_HEADER_BUF - 1;\n\n /* add this many bits to bitstream so we can flush all headers */\n flushbits = gfc.header[last_ptr].write_timing - totbit;\n total_bytes_output.total = flushbits;\n\n if (flushbits >= 0) {\n /* if flushbits >= 0, some headers have not yet been written */\n /* reduce flushbits by the size of the headers */\n remaining_headers = 1 + last_ptr - first_ptr;\n if (last_ptr < first_ptr)\n remaining_headers = 1 + last_ptr - first_ptr\n + LameInternalFlags.MAX_HEADER_BUF;\n flushbits -= remaining_headers * 8 * gfc.sideinfo_len;\n }\n\n /*\n * finally, add some bits so that the last frame is complete these bits\n * are not necessary to decode the last frame, but some decoders will\n * ignore last frame if these bits are missing\n */\n bitsPerFrame = self.getframebits(gfp);\n flushbits += bitsPerFrame;\n total_bytes_output.total += bitsPerFrame;\n /* round up: */\n if ((total_bytes_output.total % 8) != 0)\n total_bytes_output.total = 1 + (total_bytes_output.total / 8);\n else\n total_bytes_output.total = (total_bytes_output.total / 8);\n total_bytes_output.total += bufByteIdx + 1;\n\n if (flushbits < 0) {\n System.err.println(\"strange error flushing buffer ... \\n\");\n }\n return flushbits;\n }\n\n this.flush_bitstream = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side;\n var flushbits;\n var last_ptr = gfc.h_ptr - 1;\n /* last header to add to bitstream */\n if (last_ptr == -1)\n last_ptr = LameInternalFlags.MAX_HEADER_BUF - 1;\n l3_side = gfc.l3_side;\n\n if ((flushbits = compute_flushbits(gfp, new TotalBytes())) < 0)\n return;\n drain_into_ancillary(gfp, flushbits);\n\n /* check that the 100% of the last frame has been written to bitstream */\n assert(gfc.header[last_ptr].write_timing + this.getframebits(gfp) == totbit);\n\n /*\n * we have padded out all frames with ancillary data, which is the same\n * as filling the bitreservoir with ancillary data, so :\n */\n gfc.ResvSize = 0;\n l3_side.main_data_begin = 0;\n\n /* save the ReplayGain value */\n if (gfc.findReplayGain) {\n var RadioGain = ga.GetTitleGain(gfc.rgdata);\n assert(NEQ(RadioGain, GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES));\n gfc.RadioGain = Math.floor(RadioGain * 10.0 + 0.5) | 0;\n /* round to nearest */\n }\n\n /* find the gain and scale change required for no clipping */\n if (gfc.findPeakSample) {\n gfc.noclipGainChange = Math.ceil(Math\n .log10(gfc.PeakSample / 32767.0) * 20.0 * 10.0) | 0;\n /* round up */\n\n if (gfc.noclipGainChange > 0) {\n /* clipping occurs */\n if (EQ(gfp.scale, 1.0) || EQ(gfp.scale, 0.0))\n gfc.noclipScale = (Math\n .floor((32767.0 / gfc.PeakSample) * 100.0) / 100.0);\n /* round down */\n else {\n /*\n * the user specified his own scaling factor. We could\n * suggest the scaling factor of\n * (32767.0/gfp.PeakSample)*(gfp.scale) but it's usually\n * very inaccurate. So we'd rather not advice him on the\n * scaling factor.\n */\n gfc.noclipScale = -1;\n }\n } else\n /* no clipping */\n gfc.noclipScale = -1;\n }\n };\n\n this.add_dummy_byte = function (gfp, val, n) {\n var gfc = gfp.internal_flags;\n var i;\n\n while (n-- > 0) {\n putbits_noheaders(gfc, val, 8);\n\n for (i = 0; i < LameInternalFlags.MAX_HEADER_BUF; ++i)\n gfc.header[i].write_timing += 8;\n }\n };\n\n /**\n * This is called after a frame of audio has been quantized and coded. It\n * will write the encoded audio to the bitstream. Note that from a layer3\n * encoder's perspective the bit stream is primarily a series of main_data()\n * blocks, with header and side information inserted at the proper locations\n * to maintain framing. (See Figure A.7 in the IS).\n */\n this.format_bitstream = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side;\n l3_side = gfc.l3_side;\n\n var bitsPerFrame = this.getframebits(gfp);\n drain_into_ancillary(gfp, l3_side.resvDrain_pre);\n\n encodeSideInfo2(gfp, bitsPerFrame);\n var bits = 8 * gfc.sideinfo_len;\n bits += writeMainData(gfp);\n drain_into_ancillary(gfp, l3_side.resvDrain_post);\n bits += l3_side.resvDrain_post;\n\n l3_side.main_data_begin += (bitsPerFrame - bits) / 8;\n\n /*\n * compare number of bits needed to clear all buffered mp3 frames with\n * what we think the resvsize is:\n */\n if (compute_flushbits(gfp, new TotalBytes()) != gfc.ResvSize) {\n System.err.println(\"Internal buffer inconsistency. flushbits <> ResvSize\");\n }\n\n /*\n * compare main_data_begin for the next frame with what we think the\n * resvsize is:\n */\n if ((l3_side.main_data_begin * 8) != gfc.ResvSize) {\n System.err.printf(\"bit reservoir error: \\n\"\n + \"l3_side.main_data_begin: %d \\n\"\n + \"Resvoir size: %d \\n\"\n + \"resv drain (post) %d \\n\"\n + \"resv drain (pre) %d \\n\"\n + \"header and sideinfo: %d \\n\"\n + \"data bits: %d \\n\"\n + \"total bits: %d (remainder: %d) \\n\"\n + \"bitsperframe: %d \\n\",\n 8 * l3_side.main_data_begin, gfc.ResvSize,\n l3_side.resvDrain_post, l3_side.resvDrain_pre,\n 8 * gfc.sideinfo_len, bits - l3_side.resvDrain_post - 8\n * gfc.sideinfo_len, bits, bits % 8, bitsPerFrame);\n\n System.err.println(\"This is a fatal error. It has several possible causes:\");\n System.err.println(\"90%% LAME compiled with buggy version of gcc using advanced optimizations\");\n System.err.println(\" 9%% Your system is overclocked\");\n System.err.println(\" 1%% bug in LAME encoding library\");\n\n gfc.ResvSize = l3_side.main_data_begin * 8;\n }\n //;\n assert(totbit % 8 == 0);\n\n if (totbit > 1000000000) {\n /*\n * to avoid totbit overflow, (at 8h encoding at 128kbs) lets reset\n * bit counter\n */\n var i;\n for (i = 0; i < LameInternalFlags.MAX_HEADER_BUF; ++i)\n gfc.header[i].write_timing -= totbit;\n totbit = 0;\n }\n\n return 0;\n };\n\n /**\n *
\n     * copy data out of the internal MP3 bit buffer into a user supplied\n     *       unsigned char buffer.\n     *\n     *       mp3data=0      indicates data in buffer is an id3tags and VBR tags\n     *       mp3data=1      data is real mp3 frame data.\n     * 
\n */\n this.copy_buffer = function (gfc, buffer, bufferPos, size, mp3data) {\n var minimum = bufByteIdx + 1;\n if (minimum <= 0)\n return 0;\n if (size != 0 && minimum > size) {\n /* buffer is too small */\n return -1;\n }\n System.arraycopy(buf, 0, buffer, bufferPos, minimum);\n bufByteIdx = -1;\n bufBitIdx = 0;\n\n if (mp3data != 0) {\n var crc = new_int(1);\n crc[0] = gfc.nMusicCRC;\n vbr.updateMusicCRC(crc, buffer, bufferPos, minimum);\n gfc.nMusicCRC = crc[0];\n\n /**\n * sum number of bytes belonging to the mp3 stream this info will be\n * written into the Xing/LAME header for seeking\n */\n if (minimum > 0) {\n gfc.VBR_seek_table.nBytesWritten += minimum;\n }\n\n if (gfc.decode_on_the_fly) { /* decode the frame */\n var pcm_buf = new_float_n([2, 1152]);\n var mp3_in = minimum;\n var samples_out = -1;\n var i;\n\n /* re-synthesis to pcm. Repeat until we get a samples_out=0 */\n while (samples_out != 0) {\n\n samples_out = mpg.hip_decode1_unclipped(gfc.hip, buffer,\n bufferPos, mp3_in, pcm_buf[0], pcm_buf[1]);\n /*\n * samples_out = 0: need more data to decode samples_out =\n * -1: error. Lets assume 0 pcm output samples_out = number\n * of samples output\n */\n\n /*\n * set the lenght of the mp3 input buffer to zero, so that\n * in the next iteration of the loop we will be querying\n * mpglib about buffered data\n */\n mp3_in = 0;\n\n if (samples_out == -1) {\n /*\n * error decoding. Not fatal, but might screw up the\n * ReplayGain tag. What should we do? Ignore for now\n */\n samples_out = 0;\n }\n if (samples_out > 0) {\n /* process the PCM data */\n\n /*\n * this should not be possible, and indicates we have\n * overflown the pcm_buf buffer\n */\n assert(samples_out <= 1152);\n\n if (gfc.findPeakSample) {\n for (i = 0; i < samples_out; i++) {\n if (pcm_buf[0][i] > gfc.PeakSample)\n gfc.PeakSample = pcm_buf[0][i];\n else if (-pcm_buf[0][i] > gfc.PeakSample)\n gfc.PeakSample = -pcm_buf[0][i];\n }\n if (gfc.channels_out > 1)\n for (i = 0; i < samples_out; i++) {\n if (pcm_buf[1][i] > gfc.PeakSample)\n gfc.PeakSample = pcm_buf[1][i];\n else if (-pcm_buf[1][i] > gfc.PeakSample)\n gfc.PeakSample = -pcm_buf[1][i];\n }\n }\n\n if (gfc.findReplayGain)\n if (ga.AnalyzeSamples(gfc.rgdata, pcm_buf[0], 0,\n pcm_buf[1], 0, samples_out,\n gfc.channels_out) == GainAnalysis.GAIN_ANALYSIS_ERROR)\n return -6;\n\n }\n /* if (samples_out>0) */\n }\n /* while (samples_out!=0) */\n }\n /* if (gfc.decode_on_the_fly) */\n\n }\n /* if (mp3data) */\n return minimum;\n };\n\n this.init_bit_stream_w = function (gfc) {\n buf = new_byte(Lame.LAME_MAXMP3BUFFER);\n\n gfc.h_ptr = gfc.w_ptr = 0;\n gfc.header[gfc.h_ptr].write_timing = 0;\n bufByteIdx = -1;\n bufBitIdx = 0;\n totbit = 0;\n };\n\n // From machine.h\n\n\n}\n\nmodule.exports = BitStream;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar new_short_n = common.new_short_n;\nvar assert = common.assert;\n\nvar PsyModel = require('./PsyModel.js');\nvar LameGlobalFlags = require('./LameGlobalFlags.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\nvar ATH = require('./ATH.js');\nvar ReplayGain = require('./ReplayGain.js');\nvar CBRNewIterationLoop = require('./CBRNewIterationLoop.js');\nvar BitStream = require('./BitStream.js');\nvar Tables = require('./Tables.js');\nvar Encoder = require('./Encoder.js');\n\nfunction Lame() {\n var self = this;\n var LAME_MAXALBUMART = (128 * 1024);\n\n Lame.V9 = 410;\n Lame.V8 = 420;\n Lame.V7 = 430;\n Lame.V6 = 440;\n Lame.V5 = 450;\n Lame.V4 = 460;\n Lame.V3 = 470;\n Lame.V2 = 480;\n Lame.V1 = 490;\n Lame.V0 = 500;\n\n /* still there for compatibility */\n\n Lame.R3MIX = 1000;\n Lame.STANDARD = 1001;\n Lame.EXTREME = 1002;\n Lame.INSANE = 1003;\n Lame.STANDARD_FAST = 1004;\n Lame.EXTREME_FAST = 1005;\n Lame.MEDIUM = 1006;\n Lame.MEDIUM_FAST = 1007;\n\n /**\n * maximum size of mp3buffer needed if you encode at most 1152 samples for\n * each call to lame_encode_buffer. see lame_encode_buffer() below\n * (LAME_MAXMP3BUFFER is now obsolete)\n */\n var LAME_MAXMP3BUFFER = (16384 + LAME_MAXALBUMART);\n Lame.LAME_MAXMP3BUFFER = LAME_MAXMP3BUFFER;\n\n var ga;\n var bs;\n var p;\n var qupvt;\n var qu;\n var psy = new PsyModel();\n var vbr;\n var ver;\n var id3;\n var mpglib;\n this.enc = new Encoder();\n\n this.setModules = function (_ga, _bs, _p, _qupvt, _qu, _vbr, _ver, _id3, _mpglib) {\n ga = _ga;\n bs = _bs;\n p = _p;\n qupvt = _qupvt;\n qu = _qu;\n vbr = _vbr;\n ver = _ver;\n id3 = _id3;\n mpglib = _mpglib;\n this.enc.setModules(bs, psy, qupvt, vbr);\n }\n\n /**\n * PSY Model related stuff\n */\n function PSY() {\n /**\n * The dbQ stuff.\n */\n this.mask_adjust = 0.;\n /**\n * The dbQ stuff.\n */\n this.mask_adjust_short = 0.;\n /* at transition from one scalefactor band to next */\n /**\n * Band weight long scalefactor bands.\n */\n this.bo_l_weight = new_float(Encoder.SBMAX_l);\n /**\n * Band weight short scalefactor bands.\n */\n this.bo_s_weight = new_float(Encoder.SBMAX_s);\n }\n\n function LowPassHighPass() {\n this.lowerlimit = 0.;\n }\n\n function BandPass(bitrate, lPass) {\n this.lowpass = lPass;\n }\n\n var LAME_ID = 0xFFF88E3B;\n\n function lame_init_old(gfp) {\n var gfc;\n\n gfp.class_id = LAME_ID;\n\n gfc = gfp.internal_flags = new LameInternalFlags();\n\n /* Global flags. set defaults here for non-zero values */\n /* see lame.h for description */\n /*\n * set integer values to -1 to mean that LAME will compute the best\n * value, UNLESS the calling program as set it (and the value is no\n * longer -1)\n */\n\n gfp.mode = MPEGMode.NOT_SET;\n gfp.original = 1;\n gfp.in_samplerate = 44100;\n gfp.num_channels = 2;\n gfp.num_samples = -1;\n\n gfp.bWriteVbrTag = true;\n gfp.quality = -1;\n gfp.short_blocks = null;\n gfc.subblock_gain = -1;\n\n gfp.lowpassfreq = 0;\n gfp.highpassfreq = 0;\n gfp.lowpasswidth = -1;\n gfp.highpasswidth = -1;\n\n gfp.VBR = VbrMode.vbr_off;\n gfp.VBR_q = 4;\n gfp.ATHcurve = -1;\n gfp.VBR_mean_bitrate_kbps = 128;\n gfp.VBR_min_bitrate_kbps = 0;\n gfp.VBR_max_bitrate_kbps = 0;\n gfp.VBR_hard_min = 0;\n gfc.VBR_min_bitrate = 1;\n /* not 0 ????? */\n gfc.VBR_max_bitrate = 13;\n /* not 14 ????? */\n\n gfp.quant_comp = -1;\n gfp.quant_comp_short = -1;\n\n gfp.msfix = -1;\n\n gfc.resample_ratio = 1;\n\n gfc.OldValue[0] = 180;\n gfc.OldValue[1] = 180;\n gfc.CurrentStep[0] = 4;\n gfc.CurrentStep[1] = 4;\n gfc.masking_lower = 1;\n gfc.nsPsy.attackthre = -1;\n gfc.nsPsy.attackthre_s = -1;\n\n gfp.scale = -1;\n\n gfp.athaa_type = -1;\n gfp.ATHtype = -1;\n /* default = -1 = set in lame_init_params */\n gfp.athaa_loudapprox = -1;\n /* 1 = flat loudness approx. (total energy) */\n /* 2 = equal loudness curve */\n gfp.athaa_sensitivity = 0.0;\n /* no offset */\n gfp.useTemporal = null;\n gfp.interChRatio = -1;\n\n /*\n * The reason for int mf_samples_to_encode = ENCDELAY + POSTDELAY;\n * ENCDELAY = internal encoder delay. And then we have to add\n * POSTDELAY=288 because of the 50% MDCT overlap. A 576 MDCT granule\n * decodes to 1152 samples. To synthesize the 576 samples centered under\n * this granule we need the previous granule for the first 288 samples\n * (no problem), and the next granule for the next 288 samples (not\n * possible if this is last granule). So we need to pad with 288 samples\n * to make sure we can encode the 576 samples we are interested in.\n */\n gfc.mf_samples_to_encode = Encoder.ENCDELAY + Encoder.POSTDELAY;\n gfp.encoder_padding = 0;\n gfc.mf_size = Encoder.ENCDELAY - Encoder.MDCTDELAY;\n /*\n * we pad input with this many 0's\n */\n\n gfp.findReplayGain = false;\n gfp.decode_on_the_fly = false;\n\n gfc.decode_on_the_fly = false;\n gfc.findReplayGain = false;\n gfc.findPeakSample = false;\n\n gfc.RadioGain = 0;\n gfc.AudiophileGain = 0;\n gfc.noclipGainChange = 0;\n gfc.noclipScale = -1.0;\n\n gfp.preset = 0;\n\n gfp.write_id3tag_automatic = true;\n return 0;\n }\n\n this.lame_init = function () {\n var gfp = new LameGlobalFlags();\n\n var ret = lame_init_old(gfp);\n if (ret != 0) {\n return null;\n }\n\n gfp.lame_allocated_gfp = 1;\n return gfp;\n }\n\n function filter_coef(x) {\n if (x > 1.0)\n return 0.0;\n if (x <= 0.0)\n return 1.0;\n\n return Math.cos(Math.PI / 2 * x);\n }\n\n this.nearestBitrateFullIndex = function (bitrate) {\n /* borrowed from DM abr presets */\n\n var full_bitrate_table = [8, 16, 24, 32, 40, 48, 56, 64, 80,\n 96, 112, 128, 160, 192, 224, 256, 320];\n\n var lower_range = 0, lower_range_kbps = 0, upper_range = 0, upper_range_kbps = 0;\n\n /* We assume specified bitrate will be 320kbps */\n upper_range_kbps = full_bitrate_table[16];\n upper_range = 16;\n lower_range_kbps = full_bitrate_table[16];\n lower_range = 16;\n\n /*\n * Determine which significant bitrates the value specified falls\n * between, if loop ends without breaking then we were correct above\n * that the value was 320\n */\n for (var b = 0; b < 16; b++) {\n if ((Math.max(bitrate, full_bitrate_table[b + 1])) != bitrate) {\n upper_range_kbps = full_bitrate_table[b + 1];\n upper_range = b + 1;\n lower_range_kbps = full_bitrate_table[b];\n lower_range = (b);\n break;\n /* We found upper range */\n }\n }\n\n /* Determine which range the value specified is closer to */\n if ((upper_range_kbps - bitrate) > (bitrate - lower_range_kbps)) {\n return lower_range;\n }\n return upper_range;\n }\n\n function optimum_samplefreq(lowpassfreq, input_samplefreq) {\n /*\n * Rules:\n *\n * - if possible, sfb21 should NOT be used\n */\n var suggested_samplefreq = 44100;\n\n if (input_samplefreq >= 48000)\n suggested_samplefreq = 48000;\n else if (input_samplefreq >= 44100)\n suggested_samplefreq = 44100;\n else if (input_samplefreq >= 32000)\n suggested_samplefreq = 32000;\n else if (input_samplefreq >= 24000)\n suggested_samplefreq = 24000;\n else if (input_samplefreq >= 22050)\n suggested_samplefreq = 22050;\n else if (input_samplefreq >= 16000)\n suggested_samplefreq = 16000;\n else if (input_samplefreq >= 12000)\n suggested_samplefreq = 12000;\n else if (input_samplefreq >= 11025)\n suggested_samplefreq = 11025;\n else if (input_samplefreq >= 8000)\n suggested_samplefreq = 8000;\n\n if (lowpassfreq == -1)\n return suggested_samplefreq;\n\n if (lowpassfreq <= 15960)\n suggested_samplefreq = 44100;\n if (lowpassfreq <= 15250)\n suggested_samplefreq = 32000;\n if (lowpassfreq <= 11220)\n suggested_samplefreq = 24000;\n if (lowpassfreq <= 9970)\n suggested_samplefreq = 22050;\n if (lowpassfreq <= 7230)\n suggested_samplefreq = 16000;\n if (lowpassfreq <= 5420)\n suggested_samplefreq = 12000;\n if (lowpassfreq <= 4510)\n suggested_samplefreq = 11025;\n if (lowpassfreq <= 3970)\n suggested_samplefreq = 8000;\n\n if (input_samplefreq < suggested_samplefreq) {\n /*\n * choose a valid MPEG sample frequency above the input sample\n * frequency to avoid SFB21/12 bitrate bloat rh 061115\n */\n if (input_samplefreq > 44100) {\n return 48000;\n }\n if (input_samplefreq > 32000) {\n return 44100;\n }\n if (input_samplefreq > 24000) {\n return 32000;\n }\n if (input_samplefreq > 22050) {\n return 24000;\n }\n if (input_samplefreq > 16000) {\n return 22050;\n }\n if (input_samplefreq > 12000) {\n return 16000;\n }\n if (input_samplefreq > 11025) {\n return 12000;\n }\n if (input_samplefreq > 8000) {\n return 11025;\n }\n return 8000;\n }\n return suggested_samplefreq;\n }\n\n /**\n * convert samp freq in Hz to index\n */\n function SmpFrqIndex(sample_freq, gpf) {\n switch (sample_freq) {\n case 44100:\n gpf.version = 1;\n return 0;\n case 48000:\n gpf.version = 1;\n return 1;\n case 32000:\n gpf.version = 1;\n return 2;\n case 22050:\n gpf.version = 0;\n return 0;\n case 24000:\n gpf.version = 0;\n return 1;\n case 16000:\n gpf.version = 0;\n return 2;\n case 11025:\n gpf.version = 0;\n return 0;\n case 12000:\n gpf.version = 0;\n return 1;\n case 8000:\n gpf.version = 0;\n return 2;\n default:\n gpf.version = 0;\n return -1;\n }\n }\n\n /**\n * @param bRate\n * legal rates from 8 to 320\n */\n function FindNearestBitrate(bRate, version, samplerate) {\n /* MPEG-1 or MPEG-2 LSF */\n if (samplerate < 16000)\n version = 2;\n\n var bitrate = Tables.bitrate_table[version][1];\n\n for (var i = 2; i <= 14; i++) {\n if (Tables.bitrate_table[version][i] > 0) {\n if (Math.abs(Tables.bitrate_table[version][i] - bRate) < Math\n .abs(bitrate - bRate))\n bitrate = Tables.bitrate_table[version][i];\n }\n }\n return bitrate;\n }\n\n /**\n * @param bRate\n * legal rates from 32 to 448 kbps\n * @param version\n * MPEG-1 or MPEG-2/2.5 LSF\n */\n function BitrateIndex(bRate, version, samplerate) {\n /* convert bitrate in kbps to index */\n if (samplerate < 16000)\n version = 2;\n for (var i = 0; i <= 14; i++) {\n if (Tables.bitrate_table[version][i] > 0) {\n if (Tables.bitrate_table[version][i] == bRate) {\n return i;\n }\n }\n }\n return -1;\n }\n\n function optimum_bandwidth(lh, bitrate) {\n /**\n *
\n         *  Input:\n         *      bitrate     total bitrate in kbps\n         *\n         *   Output:\n         *      lowerlimit: best lowpass frequency limit for input filter in Hz\n         *      upperlimit: best highpass frequency limit for input filter in Hz\n         * 
\n */\n var freq_map = [new BandPass(8, 2000),\n new BandPass(16, 3700), new BandPass(24, 3900),\n new BandPass(32, 5500), new BandPass(40, 7000),\n new BandPass(48, 7500), new BandPass(56, 10000),\n new BandPass(64, 11000), new BandPass(80, 13500),\n new BandPass(96, 15100), new BandPass(112, 15600),\n new BandPass(128, 17000), new BandPass(160, 17500),\n new BandPass(192, 18600), new BandPass(224, 19400),\n new BandPass(256, 19700), new BandPass(320, 20500)];\n\n var table_index = self.nearestBitrateFullIndex(bitrate);\n lh.lowerlimit = freq_map[table_index].lowpass;\n }\n\n function lame_init_params_ppflt(gfp) {\n var gfc = gfp.internal_flags;\n /***************************************************************/\n /* compute info needed for polyphase filter (filter type==0, default) */\n /***************************************************************/\n\n var lowpass_band = 32;\n var highpass_band = -1;\n\n if (gfc.lowpass1 > 0) {\n var minband = 999;\n for (var band = 0; band <= 31; band++) {\n var freq = (band / 31.0);\n /* this band and above will be zeroed: */\n if (freq >= gfc.lowpass2) {\n lowpass_band = Math.min(lowpass_band, band);\n }\n if (gfc.lowpass1 < freq && freq < gfc.lowpass2) {\n minband = Math.min(minband, band);\n }\n }\n\n /*\n * compute the *actual* transition band implemented by the polyphase\n * filter\n */\n if (minband == 999) {\n gfc.lowpass1 = (lowpass_band - .75) / 31.0;\n } else {\n gfc.lowpass1 = (minband - .75) / 31.0;\n }\n gfc.lowpass2 = lowpass_band / 31.0;\n }\n\n /*\n * make sure highpass filter is within 90% of what the effective\n * highpass frequency will be\n */\n if (gfc.highpass2 > 0) {\n if (gfc.highpass2 < .9 * (.75 / 31.0)) {\n gfc.highpass1 = 0;\n gfc.highpass2 = 0;\n System.err.println(\"Warning: highpass filter disabled. \"\n + \"highpass frequency too small\\n\");\n }\n }\n\n if (gfc.highpass2 > 0) {\n var maxband = -1;\n for (var band = 0; band <= 31; band++) {\n var freq = band / 31.0;\n /* this band and below will be zereod */\n if (freq <= gfc.highpass1) {\n highpass_band = Math.max(highpass_band, band);\n }\n if (gfc.highpass1 < freq && freq < gfc.highpass2) {\n maxband = Math.max(maxband, band);\n }\n }\n /*\n * compute the *actual* transition band implemented by the polyphase\n * filter\n */\n gfc.highpass1 = highpass_band / 31.0;\n if (maxband == -1) {\n gfc.highpass2 = (highpass_band + .75) / 31.0;\n } else {\n gfc.highpass2 = (maxband + .75) / 31.0;\n }\n }\n\n for (var band = 0; band < 32; band++) {\n var fc1, fc2;\n var freq = band / 31.0;\n if (gfc.highpass2 > gfc.highpass1) {\n fc1 = filter_coef((gfc.highpass2 - freq)\n / (gfc.highpass2 - gfc.highpass1 + 1e-20));\n } else {\n fc1 = 1.0;\n }\n if (gfc.lowpass2 > gfc.lowpass1) {\n fc2 = filter_coef((freq - gfc.lowpass1)\n / (gfc.lowpass2 - gfc.lowpass1 + 1e-20));\n } else {\n fc2 = 1.0;\n }\n gfc.amp_filter[band] = (fc1 * fc2);\n }\n }\n\n function lame_init_qval(gfp) {\n var gfc = gfp.internal_flags;\n\n switch (gfp.quality) {\n default:\n case 9: /* no psymodel, no noise shaping */\n gfc.psymodel = 0;\n gfc.noise_shaping = 0;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 8:\n gfp.quality = 7;\n //$FALL-THROUGH$\n case 7:\n /*\n * use psymodel (for short block and m/s switching), but no noise\n * shapping\n */\n gfc.psymodel = 1;\n gfc.noise_shaping = 0;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 6:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 5:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 4:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 3:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 1;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 2:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 1;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n /* inner loop */\n gfc.full_outer_loop = 0;\n break;\n\n case 1:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 2;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 0:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 2;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n /*\n * type 2 disabled because of it slowness, in favor of full outer\n * loop search\n */\n gfc.full_outer_loop = 0;\n /*\n * full outer loop search disabled because of audible distortions it\n * may generate rh 060629\n */\n break;\n }\n\n }\n\n function lame_init_bitstream(gfp) {\n var gfc = gfp.internal_flags;\n gfp.frameNum = 0;\n\n if (gfp.write_id3tag_automatic) {\n id3.id3tag_write_v2(gfp);\n }\n /* initialize histogram data optionally used by frontend */\n\n gfc.bitrate_stereoMode_Hist = new_int_n([16, 4 + 1]);\n gfc.bitrate_blockType_Hist = new_int_n([16, 4 + 1 + 1]);\n\n gfc.PeakSample = 0.0;\n\n /* Write initial VBR Header to bitstream and init VBR data */\n if (gfp.bWriteVbrTag)\n vbr.InitVbrTag(gfp);\n }\n\n /********************************************************************\n * initialize internal params based on data in gf (globalflags struct filled\n * in by calling program)\n *\n * OUTLINE:\n *\n * We first have some complex code to determine bitrate, output samplerate\n * and mode. It is complicated by the fact that we allow the user to set\n * some or all of these parameters, and need to determine best possible\n * values for the rest of them:\n *\n * 1. set some CPU related flags 2. check if we are mono.mono, stereo.mono\n * or stereo.stereo 3. compute bitrate and output samplerate: user may have\n * set compression ratio user may have set a bitrate user may have set a\n * output samplerate 4. set some options which depend on output samplerate\n * 5. compute the actual compression ratio 6. set mode based on compression\n * ratio\n *\n * The remaining code is much simpler - it just sets options based on the\n * mode & compression ratio:\n *\n * set allow_diff_short based on mode select lowpass filter based on\n * compression ratio & mode set the bitrate index, and min/max bitrates for\n * VBR modes disable VBR tag if it is not appropriate initialize the\n * bitstream initialize scalefac_band data set sideinfo_len (based on\n * channels, CRC, out_samplerate) write an id3v2 tag into the bitstream\n * write VBR tag into the bitstream set mpeg1/2 flag estimate the number of\n * frames (based on a lot of data)\n *\n * now we set more flags: nspsytune: see code VBR modes see code CBR/ABR see\n * code\n *\n * Finally, we set the algorithm flags based on the gfp.quality value\n * lame_init_qval(gfp);\n *\n ********************************************************************/\n this.lame_init_params = function (gfp) {\n var gfc = gfp.internal_flags;\n\n gfc.Class_ID = 0;\n if (gfc.ATH == null)\n gfc.ATH = new ATH();\n if (gfc.PSY == null)\n gfc.PSY = new PSY();\n if (gfc.rgdata == null)\n gfc.rgdata = new ReplayGain();\n\n gfc.channels_in = gfp.num_channels;\n if (gfc.channels_in == 1)\n gfp.mode = MPEGMode.MONO;\n gfc.channels_out = (gfp.mode == MPEGMode.MONO) ? 1 : 2;\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n if (gfp.mode == MPEGMode.MONO)\n gfp.force_ms = false;\n /*\n * don't allow forced mid/side stereo for mono output\n */\n\n if (gfp.VBR == VbrMode.vbr_off && gfp.VBR_mean_bitrate_kbps != 128\n && gfp.brate == 0)\n gfp.brate = gfp.VBR_mean_bitrate_kbps;\n\n if (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_mtrh\n || gfp.VBR == VbrMode.vbr_mt) {\n /* these modes can handle free format condition */\n } else {\n gfp.free_format = false;\n /* mode can't be mixed with free format */\n }\n\n if (gfp.VBR == VbrMode.vbr_off && gfp.brate == 0) {\n /* no bitrate or compression ratio specified, use 11.025 */\n if (BitStream.EQ(gfp.compression_ratio, 0))\n gfp.compression_ratio = 11.025;\n /*\n * rate to compress a CD down to exactly 128000 bps\n */\n }\n\n /* find bitrate if user specify a compression ratio */\n if (gfp.VBR == VbrMode.vbr_off && gfp.compression_ratio > 0) {\n\n if (gfp.out_samplerate == 0)\n gfp.out_samplerate = map2MP3Frequency((int)(0.97 * gfp.in_samplerate));\n /*\n * round up with a margin of 3 %\n */\n\n /*\n * choose a bitrate for the output samplerate which achieves\n * specified compression ratio\n */\n gfp.brate = 0 | (gfp.out_samplerate * 16 * gfc.channels_out / (1.e3 * gfp.compression_ratio));\n\n /* we need the version for the bitrate table look up */\n gfc.samplerate_index = SmpFrqIndex(gfp.out_samplerate, gfp);\n\n if (!gfp.free_format) /*\n * for non Free Format find the nearest allowed\n * bitrate\n */\n gfp.brate = FindNearestBitrate(gfp.brate, gfp.version,\n gfp.out_samplerate);\n }\n\n if (gfp.out_samplerate != 0) {\n if (gfp.out_samplerate < 16000) {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 8);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 64);\n } else if (gfp.out_samplerate < 32000) {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 8);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 160);\n } else {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 32);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 320);\n }\n }\n\n /****************************************************************/\n /* if a filter has not been enabled, see if we should add one: */\n /****************************************************************/\n if (gfp.lowpassfreq == 0) {\n var lowpass = 16000.;\n\n switch (gfp.VBR) {\n case VbrMode.vbr_off:\n {\n var lh = new LowPassHighPass();\n optimum_bandwidth(lh, gfp.brate);\n lowpass = lh.lowerlimit;\n break;\n }\n case VbrMode.vbr_abr:\n {\n var lh = new LowPassHighPass();\n optimum_bandwidth(lh, gfp.VBR_mean_bitrate_kbps);\n lowpass = lh.lowerlimit;\n break;\n }\n case VbrMode.vbr_rh:\n {\n var x = [19500, 19000, 18600, 18000, 17500, 16000,\n 15600, 14900, 12500, 10000, 3950];\n if (0 <= gfp.VBR_q && gfp.VBR_q <= 9) {\n var a = x[gfp.VBR_q], b = x[gfp.VBR_q + 1], m = gfp.VBR_q_frac;\n lowpass = linear_int(a, b, m);\n } else {\n lowpass = 19500;\n }\n break;\n }\n default:\n {\n var x = [19500, 19000, 18500, 18000, 17500, 16500,\n 15500, 14500, 12500, 9500, 3950];\n if (0 <= gfp.VBR_q && gfp.VBR_q <= 9) {\n var a = x[gfp.VBR_q], b = x[gfp.VBR_q + 1], m = gfp.VBR_q_frac;\n lowpass = linear_int(a, b, m);\n } else {\n lowpass = 19500;\n }\n }\n }\n if (gfp.mode == MPEGMode.MONO\n && (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_abr))\n lowpass *= 1.5;\n\n gfp.lowpassfreq = lowpass | 0;\n }\n\n if (gfp.out_samplerate == 0) {\n if (2 * gfp.lowpassfreq > gfp.in_samplerate) {\n gfp.lowpassfreq = gfp.in_samplerate / 2;\n }\n gfp.out_samplerate = optimum_samplefreq(gfp.lowpassfreq | 0,\n gfp.in_samplerate);\n }\n\n gfp.lowpassfreq = Math.min(20500, gfp.lowpassfreq);\n gfp.lowpassfreq = Math.min(gfp.out_samplerate / 2, gfp.lowpassfreq);\n\n if (gfp.VBR == VbrMode.vbr_off) {\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.brate);\n }\n if (gfp.VBR == VbrMode.vbr_abr) {\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.VBR_mean_bitrate_kbps);\n }\n\n /*\n * do not compute ReplayGain values and do not find the peak sample if\n * we can't store them\n */\n if (!gfp.bWriteVbrTag) {\n gfp.findReplayGain = false;\n gfp.decode_on_the_fly = false;\n gfc.findPeakSample = false;\n }\n gfc.findReplayGain = gfp.findReplayGain;\n gfc.decode_on_the_fly = gfp.decode_on_the_fly;\n\n if (gfc.decode_on_the_fly)\n gfc.findPeakSample = true;\n\n if (gfc.findReplayGain) {\n if (ga.InitGainAnalysis(gfc.rgdata, gfp.out_samplerate) == GainAnalysis.INIT_GAIN_ANALYSIS_ERROR) {\n gfp.internal_flags = null;\n return -6;\n }\n }\n\n if (gfc.decode_on_the_fly && !gfp.decode_only) {\n if (gfc.hip != null) {\n mpglib.hip_decode_exit(gfc.hip);\n }\n gfc.hip = mpglib.hip_decode_init();\n }\n\n gfc.mode_gr = gfp.out_samplerate <= 24000 ? 1 : 2;\n /*\n * Number of granules per frame\n */\n gfp.framesize = 576 * gfc.mode_gr;\n gfp.encoder_delay = Encoder.ENCDELAY;\n\n gfc.resample_ratio = gfp.in_samplerate / gfp.out_samplerate;\n\n /**\n *
\n         *  sample freq       bitrate     compression ratio\n         *     [kHz]      [kbps/channel]   for 16 bit input\n         *     44.1            56               12.6\n         *     44.1            64               11.025\n         *     44.1            80                8.82\n         *     22.05           24               14.7\n         *     22.05           32               11.025\n         *     22.05           40                8.82\n         *     16              16               16.0\n         *     16              24               10.667\n         * 
\n */\n /**\n *
\n         *  For VBR, take a guess at the compression_ratio.\n         *  For example:\n         *\n         *    VBR_q    compression     like\n         *     -        4.4         320 kbps/44 kHz\n         *   0...1      5.5         256 kbps/44 kHz\n         *     2        7.3         192 kbps/44 kHz\n         *     4        8.8         160 kbps/44 kHz\n         *     6       11           128 kbps/44 kHz\n         *     9       14.7          96 kbps\n         *\n         *  for lower bitrates, downsample with --resample\n         * 
\n */\n switch (gfp.VBR) {\n case VbrMode.vbr_mt:\n case VbrMode.vbr_rh:\n case VbrMode.vbr_mtrh:\n {\n /* numbers are a bit strange, but they determine the lowpass value */\n var cmp = [5.7, 6.5, 7.3, 8.2, 10, 11.9, 13, 14,\n 15, 16.5];\n gfp.compression_ratio = cmp[gfp.VBR_q];\n }\n break;\n case VbrMode.vbr_abr:\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.VBR_mean_bitrate_kbps);\n break;\n default:\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.brate);\n break;\n }\n\n /*\n * mode = -1 (not set by user) or mode = MONO (because of only 1 input\n * channel). If mode has not been set, then select J-STEREO\n */\n if (gfp.mode == MPEGMode.NOT_SET) {\n gfp.mode = MPEGMode.JOINT_STEREO;\n }\n\n /* apply user driven high pass filter */\n if (gfp.highpassfreq > 0) {\n gfc.highpass1 = 2. * gfp.highpassfreq;\n\n if (gfp.highpasswidth >= 0)\n gfc.highpass2 = 2. * (gfp.highpassfreq + gfp.highpasswidth);\n else\n /* 0% above on default */\n gfc.highpass2 = (1 + 0.00) * 2. * gfp.highpassfreq;\n\n gfc.highpass1 /= gfp.out_samplerate;\n gfc.highpass2 /= gfp.out_samplerate;\n } else {\n gfc.highpass1 = 0;\n gfc.highpass2 = 0;\n }\n /* apply user driven low pass filter */\n if (gfp.lowpassfreq > 0) {\n gfc.lowpass2 = 2. * gfp.lowpassfreq;\n if (gfp.lowpasswidth >= 0) {\n gfc.lowpass1 = 2. * (gfp.lowpassfreq - gfp.lowpasswidth);\n if (gfc.lowpass1 < 0) /* has to be >= 0 */\n gfc.lowpass1 = 0;\n } else { /* 0% below on default */\n gfc.lowpass1 = (1 - 0.00) * 2. * gfp.lowpassfreq;\n }\n gfc.lowpass1 /= gfp.out_samplerate;\n gfc.lowpass2 /= gfp.out_samplerate;\n } else {\n gfc.lowpass1 = 0;\n gfc.lowpass2 = 0;\n }\n\n /**********************************************************************/\n /* compute info needed for polyphase filter (filter type==0, default) */\n /**********************************************************************/\n lame_init_params_ppflt(gfp);\n /*******************************************************\n * samplerate and bitrate index\n *******************************************************/\n gfc.samplerate_index = SmpFrqIndex(gfp.out_samplerate, gfp);\n if (gfc.samplerate_index < 0) {\n gfp.internal_flags = null;\n return -1;\n }\n\n if (gfp.VBR == VbrMode.vbr_off) {\n if (gfp.free_format) {\n gfc.bitrate_index = 0;\n } else {\n gfp.brate = FindNearestBitrate(gfp.brate, gfp.version,\n gfp.out_samplerate);\n gfc.bitrate_index = BitrateIndex(gfp.brate, gfp.version,\n gfp.out_samplerate);\n if (gfc.bitrate_index <= 0) {\n gfp.internal_flags = null;\n return -1;\n }\n }\n } else {\n gfc.bitrate_index = 1;\n }\n\n /* for CBR, we will write an \"info\" tag. */\n\n if (gfp.analysis)\n gfp.bWriteVbrTag = false;\n\n /* some file options not allowed if output is: not specified or stdout */\n if (gfc.pinfo != null)\n gfp.bWriteVbrTag = false;\n /* disable Xing VBR tag */\n\n bs.init_bit_stream_w(gfc);\n\n var j = gfc.samplerate_index + (3 * gfp.version) + 6\n * (gfp.out_samplerate < 16000 ? 1 : 0);\n for (var i = 0; i < Encoder.SBMAX_l + 1; i++)\n gfc.scalefac_band.l[i] = qupvt.sfBandIndex[j].l[i];\n\n for (var i = 0; i < Encoder.PSFB21 + 1; i++) {\n var size = (gfc.scalefac_band.l[22] - gfc.scalefac_band.l[21])\n / Encoder.PSFB21;\n var start = gfc.scalefac_band.l[21] + i * size;\n gfc.scalefac_band.psfb21[i] = start;\n }\n gfc.scalefac_band.psfb21[Encoder.PSFB21] = 576;\n\n for (var i = 0; i < Encoder.SBMAX_s + 1; i++)\n gfc.scalefac_band.s[i] = qupvt.sfBandIndex[j].s[i];\n\n for (var i = 0; i < Encoder.PSFB12 + 1; i++) {\n var size = (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12])\n / Encoder.PSFB12;\n var start = gfc.scalefac_band.s[12] + i * size;\n gfc.scalefac_band.psfb12[i] = start;\n }\n gfc.scalefac_band.psfb12[Encoder.PSFB12] = 192;\n /* determine the mean bitrate for main data */\n if (gfp.version == 1) /* MPEG 1 */\n gfc.sideinfo_len = (gfc.channels_out == 1) ? 4 + 17 : 4 + 32;\n else\n /* MPEG 2 */\n gfc.sideinfo_len = (gfc.channels_out == 1) ? 4 + 9 : 4 + 17;\n\n if (gfp.error_protection)\n gfc.sideinfo_len += 2;\n\n lame_init_bitstream(gfp);\n\n gfc.Class_ID = LAME_ID;\n\n {\n var k;\n\n for (k = 0; k < 19; k++)\n gfc.nsPsy.pefirbuf[k] = 700 * gfc.mode_gr * gfc.channels_out;\n\n if (gfp.ATHtype == -1)\n gfp.ATHtype = 4;\n }\n assert(gfp.VBR_q <= 9);\n assert(gfp.VBR_q >= 0);\n\n switch (gfp.VBR) {\n\n case VbrMode.vbr_mt:\n gfp.VBR = VbrMode.vbr_mtrh;\n //$FALL-THROUGH$\n case VbrMode.vbr_mtrh:\n {\n if (gfp.useTemporal == null) {\n gfp.useTemporal = false;\n /* off by default for this VBR mode */\n }\n\n p.apply_preset(gfp, 500 - (gfp.VBR_q * 10), 0);\n /**\n *
\n                 *   The newer VBR code supports only a limited\n                 *     subset of quality levels:\n                 *     9-5=5 are the same, uses x^3/4 quantization\n                 *   4-0=0 are the same  5 plus best huffman divide code\n                 * 
\n */\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n if (gfp.quality < 5)\n gfp.quality = 0;\n if (gfp.quality > 5)\n gfp.quality = 5;\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n /*\n * sfb21 extra only with MPEG-1 at higher sampling rates\n */\n if (gfp.experimentalY)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = (gfp.out_samplerate > 44000);\n\n gfc.iteration_loop = new VBRNewIterationLoop(qu);\n break;\n\n }\n case VbrMode.vbr_rh:\n {\n\n p.apply_preset(gfp, 500 - (gfp.VBR_q * 10), 0);\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n /*\n * sfb21 extra only with MPEG-1 at higher sampling rates\n */\n if (gfp.experimentalY)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = (gfp.out_samplerate > 44000);\n\n /*\n * VBR needs at least the output of GPSYCHO, so we have to garantee\n * that by setting a minimum quality level, actually level 6 does\n * it. down to level 6\n */\n if (gfp.quality > 6)\n gfp.quality = 6;\n\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n\n gfc.iteration_loop = new VBROldIterationLoop(qu);\n break;\n }\n\n default: /* cbr/abr */\n {\n var vbrmode;\n\n /*\n * no sfb21 extra with CBR code\n */\n gfc.sfb21_extra = false;\n\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n\n vbrmode = gfp.VBR;\n if (vbrmode == VbrMode.vbr_off)\n gfp.VBR_mean_bitrate_kbps = gfp.brate;\n /* second, set parameters depending on bitrate */\n p.apply_preset(gfp, gfp.VBR_mean_bitrate_kbps, 0);\n gfp.VBR = vbrmode;\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n if (vbrmode == VbrMode.vbr_off) {\n gfc.iteration_loop = new CBRNewIterationLoop(qu);\n } else {\n gfc.iteration_loop = new ABRIterationLoop(qu);\n }\n break;\n }\n }\n assert(gfp.scale >= 0);\n /* initialize default values common for all modes */\n\n if (gfp.VBR != VbrMode.vbr_off) { /* choose a min/max bitrate for VBR */\n /* if the user didn't specify VBR_max_bitrate: */\n gfc.VBR_min_bitrate = 1;\n /*\n * default: allow 8 kbps (MPEG-2) or 32 kbps (MPEG-1)\n */\n gfc.VBR_max_bitrate = 14;\n /*\n * default: allow 160 kbps (MPEG-2) or 320 kbps (MPEG-1)\n */\n if (gfp.out_samplerate < 16000)\n gfc.VBR_max_bitrate = 8;\n /* default: allow 64 kbps (MPEG-2.5) */\n if (gfp.VBR_min_bitrate_kbps != 0) {\n gfp.VBR_min_bitrate_kbps = FindNearestBitrate(\n gfp.VBR_min_bitrate_kbps, gfp.version,\n gfp.out_samplerate);\n gfc.VBR_min_bitrate = BitrateIndex(gfp.VBR_min_bitrate_kbps,\n gfp.version, gfp.out_samplerate);\n if (gfc.VBR_min_bitrate < 0)\n return -1;\n }\n if (gfp.VBR_max_bitrate_kbps != 0) {\n gfp.VBR_max_bitrate_kbps = FindNearestBitrate(\n gfp.VBR_max_bitrate_kbps, gfp.version,\n gfp.out_samplerate);\n gfc.VBR_max_bitrate = BitrateIndex(gfp.VBR_max_bitrate_kbps,\n gfp.version, gfp.out_samplerate);\n if (gfc.VBR_max_bitrate < 0)\n return -1;\n }\n gfp.VBR_min_bitrate_kbps = Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate];\n gfp.VBR_max_bitrate_kbps = Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate];\n gfp.VBR_mean_bitrate_kbps = Math.min(\n Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate],\n gfp.VBR_mean_bitrate_kbps);\n gfp.VBR_mean_bitrate_kbps = Math.max(\n Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate],\n gfp.VBR_mean_bitrate_kbps);\n }\n\n /* just another daily changing developer switch */\n if (gfp.tune) {\n gfc.PSY.mask_adjust += gfp.tune_value_a;\n gfc.PSY.mask_adjust_short += gfp.tune_value_a;\n }\n\n /* initialize internal qval settings */\n lame_init_qval(gfp);\n assert(gfp.scale >= 0);\n /*\n * automatic ATH adjustment on\n */\n if (gfp.athaa_type < 0)\n gfc.ATH.useAdjust = 3;\n else\n gfc.ATH.useAdjust = gfp.athaa_type;\n\n /* initialize internal adaptive ATH settings -jd */\n gfc.ATH.aaSensitivityP = Math.pow(10.0, gfp.athaa_sensitivity\n / -10.0);\n\n if (gfp.short_blocks == null) {\n gfp.short_blocks = ShortBlock.short_block_allowed;\n }\n\n /*\n * Note Jan/2003: Many hardware decoders cannot handle short blocks in\n * regular stereo mode unless they are coupled (same type in both\n * channels) it is a rare event (1 frame per min. or so) that LAME would\n * use uncoupled short blocks, so lets turn them off until we decide how\n * to handle this. No other encoders allow uncoupled short blocks, even\n * though it is in the standard.\n */\n /*\n * rh 20040217: coupling makes no sense for mono and dual-mono streams\n */\n if (gfp.short_blocks == ShortBlock.short_block_allowed\n && (gfp.mode == MPEGMode.JOINT_STEREO || gfp.mode == MPEGMode.STEREO)) {\n gfp.short_blocks = ShortBlock.short_block_coupled;\n }\n\n if (gfp.quant_comp < 0)\n gfp.quant_comp = 1;\n if (gfp.quant_comp_short < 0)\n gfp.quant_comp_short = 0;\n\n if (gfp.msfix < 0)\n gfp.msfix = 0;\n\n /* select psychoacoustic model */\n gfp.exp_nspsytune = gfp.exp_nspsytune | 1;\n\n if (gfp.internal_flags.nsPsy.attackthre < 0)\n gfp.internal_flags.nsPsy.attackthre = PsyModel.NSATTACKTHRE;\n if (gfp.internal_flags.nsPsy.attackthre_s < 0)\n gfp.internal_flags.nsPsy.attackthre_s = PsyModel.NSATTACKTHRE_S;\n\n assert(gfp.scale >= 0);\n\n if (gfp.scale < 0)\n gfp.scale = 1;\n\n if (gfp.ATHtype < 0)\n gfp.ATHtype = 4;\n\n if (gfp.ATHcurve < 0)\n gfp.ATHcurve = 4;\n\n if (gfp.athaa_loudapprox < 0)\n gfp.athaa_loudapprox = 2;\n\n if (gfp.interChRatio < 0)\n gfp.interChRatio = 0;\n\n if (gfp.useTemporal == null)\n gfp.useTemporal = true;\n /* on by default */\n\n /*\n * padding method as described in\n * \"MPEG-Layer3 / Bitstream Syntax and Decoding\" by Martin Sieler, Ralph\n * Sperschneider\n *\n * note: there is no padding for the very first frame\n *\n * Robert Hegemann 2000-06-22\n */\n gfc.slot_lag = gfc.frac_SpF = 0;\n if (gfp.VBR == VbrMode.vbr_off)\n gfc.slot_lag = gfc.frac_SpF = (((gfp.version + 1) * 72000 * gfp.brate) % gfp.out_samplerate) | 0;\n\n qupvt.iteration_init(gfp);\n psy.psymodel_init(gfp);\n assert(gfp.scale >= 0);\n return 0;\n }\n\n function update_inbuffer_size(gfc, nsamples) {\n if (gfc.in_buffer_0 == null || gfc.in_buffer_nsamples < nsamples) {\n gfc.in_buffer_0 = new_float(nsamples);\n gfc.in_buffer_1 = new_float(nsamples);\n gfc.in_buffer_nsamples = nsamples;\n }\n }\n\n this.lame_encode_flush = function (gfp, mp3buffer, mp3bufferPos, mp3buffer_size) {\n var gfc = gfp.internal_flags;\n var buffer = new_short_n([2, 1152]);\n var imp3 = 0, mp3count, mp3buffer_size_remaining;\n\n /*\n * we always add POSTDELAY=288 padding to make sure granule with real\n * data can be complety decoded (because of 50% overlap with next\n * granule\n */\n var end_padding;\n var frames_left;\n var samples_to_encode = gfc.mf_samples_to_encode - Encoder.POSTDELAY;\n var mf_needed = calcNeeded(gfp);\n\n /* Was flush already called? */\n if (gfc.mf_samples_to_encode < 1) {\n return 0;\n }\n mp3count = 0;\n\n if (gfp.in_samplerate != gfp.out_samplerate) {\n /*\n * delay due to resampling; needs to be fixed, if resampling code\n * gets changed\n */\n samples_to_encode += 16. * gfp.out_samplerate / gfp.in_samplerate;\n }\n end_padding = gfp.framesize - (samples_to_encode % gfp.framesize);\n if (end_padding < 576)\n end_padding += gfp.framesize;\n gfp.encoder_padding = end_padding;\n\n frames_left = (samples_to_encode + end_padding) / gfp.framesize;\n\n /*\n * send in a frame of 0 padding until all internal sample buffers are\n * flushed\n */\n while (frames_left > 0 && imp3 >= 0) {\n var bunch = mf_needed - gfc.mf_size;\n var frame_num = gfp.frameNum;\n\n bunch *= gfp.in_samplerate;\n bunch /= gfp.out_samplerate;\n if (bunch > 1152)\n bunch = 1152;\n if (bunch < 1)\n bunch = 1;\n\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n imp3 = this.lame_encode_buffer(gfp, buffer[0], buffer[1], bunch,\n mp3buffer, mp3bufferPos, mp3buffer_size_remaining);\n\n mp3bufferPos += imp3;\n mp3count += imp3;\n frames_left -= (frame_num != gfp.frameNum) ? 1 : 0;\n }\n /*\n * Set gfc.mf_samples_to_encode to 0, so we may detect and break loops\n * calling it more than once in a row.\n */\n gfc.mf_samples_to_encode = 0;\n\n if (imp3 < 0) {\n /* some type of fatal error */\n return imp3;\n }\n\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n /* mp3 related stuff. bit buffer might still contain some mp3 data */\n bs.flush_bitstream(gfp);\n imp3 = bs.copy_buffer(gfc, mp3buffer, mp3bufferPos,\n mp3buffer_size_remaining, 1);\n if (imp3 < 0) {\n /* some type of fatal error */\n return imp3;\n }\n mp3bufferPos += imp3;\n mp3count += imp3;\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n if (gfp.write_id3tag_automatic) {\n /* write a id3 tag to the bitstream */\n id3.id3tag_write_v1(gfp);\n\n imp3 = bs.copy_buffer(gfc, mp3buffer, mp3bufferPos,\n mp3buffer_size_remaining, 0);\n\n if (imp3 < 0) {\n return imp3;\n }\n mp3count += imp3;\n }\n return mp3count;\n };\n\n this.lame_encode_buffer = function (gfp, buffer_l, buffer_r, nsamples, mp3buf, mp3bufPos, mp3buf_size) {\n var gfc = gfp.internal_flags;\n var in_buffer = [null, null];\n\n if (gfc.Class_ID != LAME_ID)\n return -3;\n\n if (nsamples == 0)\n return 0;\n\n update_inbuffer_size(gfc, nsamples);\n\n in_buffer[0] = gfc.in_buffer_0;\n in_buffer[1] = gfc.in_buffer_1;\n\n /* make a copy of input buffer, changing type to sample_t */\n for (var i = 0; i < nsamples; i++) {\n in_buffer[0][i] = buffer_l[i];\n if (gfc.channels_in > 1)\n in_buffer[1][i] = buffer_r[i];\n }\n\n return lame_encode_buffer_sample(gfp, in_buffer[0], in_buffer[1],\n nsamples, mp3buf, mp3bufPos, mp3buf_size);\n }\n\n function calcNeeded(gfp) {\n var mf_needed = Encoder.BLKSIZE + gfp.framesize - Encoder.FFTOFFSET;\n /*\n * amount needed for FFT\n */\n mf_needed = Math.max(mf_needed, 512 + gfp.framesize - 32);\n assert(LameInternalFlags.MFSIZE >= mf_needed);\n\n return mf_needed;\n }\n\n function lame_encode_buffer_sample(gfp, buffer_l, buffer_r, nsamples, mp3buf, mp3bufPos, mp3buf_size) {\n var gfc = gfp.internal_flags;\n var mp3size = 0, ret, i, ch, mf_needed;\n var mp3out;\n var mfbuf = [null, null];\n var in_buffer = [null, null];\n\n if (gfc.Class_ID != LAME_ID)\n return -3;\n\n if (nsamples == 0)\n return 0;\n\n /* copy out any tags that may have been written into bitstream */\n mp3out = bs.copy_buffer(gfc, mp3buf, mp3bufPos, mp3buf_size, 0);\n if (mp3out < 0)\n return mp3out;\n /* not enough buffer space */\n mp3bufPos += mp3out;\n mp3size += mp3out;\n\n in_buffer[0] = buffer_l;\n in_buffer[1] = buffer_r;\n\n /* Apply user defined re-scaling */\n\n /* user selected scaling of the samples */\n if (BitStream.NEQ(gfp.scale, 0) && BitStream.NEQ(gfp.scale, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] *= gfp.scale;\n if (gfc.channels_out == 2)\n in_buffer[1][i] *= gfp.scale;\n }\n }\n\n /* user selected scaling of the channel 0 (left) samples */\n if (BitStream.NEQ(gfp.scale_left, 0)\n && BitStream.NEQ(gfp.scale_left, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] *= gfp.scale_left;\n }\n }\n\n /* user selected scaling of the channel 1 (right) samples */\n if (BitStream.NEQ(gfp.scale_right, 0)\n && BitStream.NEQ(gfp.scale_right, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[1][i] *= gfp.scale_right;\n }\n }\n\n /* Downsample to Mono if 2 channels in and 1 channel out */\n if (gfp.num_channels == 2 && gfc.channels_out == 1) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] = 0.5 * ( in_buffer[0][i] + in_buffer[1][i]);\n in_buffer[1][i] = 0.0;\n }\n }\n\n mf_needed = calcNeeded(gfp);\n\n mfbuf[0] = gfc.mfbuf[0];\n mfbuf[1] = gfc.mfbuf[1];\n\n var in_bufferPos = 0;\n while (nsamples > 0) {\n var in_buffer_ptr = [null, null];\n var n_in = 0;\n /* number of input samples processed with fill_buffer */\n var n_out = 0;\n /* number of samples output with fill_buffer */\n /* n_in <> n_out if we are resampling */\n\n in_buffer_ptr[0] = in_buffer[0];\n in_buffer_ptr[1] = in_buffer[1];\n /* copy in new samples into mfbuf, with resampling */\n var inOut = new InOut();\n fill_buffer(gfp, mfbuf, in_buffer_ptr, in_bufferPos, nsamples,\n inOut);\n n_in = inOut.n_in;\n n_out = inOut.n_out;\n\n /* compute ReplayGain of resampled input if requested */\n if (gfc.findReplayGain && !gfc.decode_on_the_fly)\n if (ga.AnalyzeSamples(gfc.rgdata, mfbuf[0], gfc.mf_size,\n mfbuf[1], gfc.mf_size, n_out, gfc.channels_out) == GainAnalysis.GAIN_ANALYSIS_ERROR)\n return -6;\n\n /* update in_buffer counters */\n nsamples -= n_in;\n in_bufferPos += n_in;\n if (gfc.channels_out == 2)\n ;// in_bufferPos += n_in;\n\n /* update mfbuf[] counters */\n gfc.mf_size += n_out;\n assert(gfc.mf_size <= LameInternalFlags.MFSIZE);\n\n /*\n * lame_encode_flush may have set gfc.mf_sample_to_encode to 0 so we\n * have to reinitialize it here when that happened.\n */\n if (gfc.mf_samples_to_encode < 1) {\n gfc.mf_samples_to_encode = Encoder.ENCDELAY + Encoder.POSTDELAY;\n }\n gfc.mf_samples_to_encode += n_out;\n\n if (gfc.mf_size >= mf_needed) {\n /* encode the frame. */\n /* mp3buf = pointer to current location in buffer */\n /* mp3buf_size = size of original mp3 output buffer */\n /* = 0 if we should not worry about the */\n /* buffer size because calling program is */\n /* to lazy to compute it */\n /* mp3size = size of data written to buffer so far */\n /* mp3buf_size-mp3size = amount of space avalable */\n\n var buf_size = mp3buf_size - mp3size;\n if (mp3buf_size == 0)\n buf_size = 0;\n\n ret = lame_encode_frame(gfp, mfbuf[0], mfbuf[1], mp3buf,\n mp3bufPos, buf_size);\n\n if (ret < 0)\n return ret;\n mp3bufPos += ret;\n mp3size += ret;\n\n /* shift out old samples */\n gfc.mf_size -= gfp.framesize;\n gfc.mf_samples_to_encode -= gfp.framesize;\n for (ch = 0; ch < gfc.channels_out; ch++)\n for (i = 0; i < gfc.mf_size; i++)\n mfbuf[ch][i] = mfbuf[ch][i + gfp.framesize];\n }\n }\n assert(nsamples == 0);\n\n return mp3size;\n }\n\n function lame_encode_frame(gfp, inbuf_l, inbuf_r, mp3buf, mp3bufPos, mp3buf_size) {\n var ret = self.enc.lame_encode_mp3_frame(gfp, inbuf_l, inbuf_r, mp3buf,\n mp3bufPos, mp3buf_size);\n gfp.frameNum++;\n return ret;\n }\n\n function InOut() {\n this.n_in = 0;\n this.n_out = 0;\n }\n\n\n function NumUsed() {\n this.num_used = 0;\n }\n\n /**\n * Greatest common divisor.\n *

\n * Joint work of Euclid and M. Hendry\n */\n function gcd(i, j) {\n return j != 0 ? gcd(j, i % j) : i;\n }\n\n /**\n * Resampling via FIR filter, blackman window.\n */\n function blackman(x, fcn, l) {\n /*\n * This algorithm from: SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C\n * S.D. Stearns and R.A. David, Prentice-Hall, 1992\n */\n var wcn = (Math.PI * fcn);\n\n x /= l;\n if (x < 0)\n x = 0;\n if (x > 1)\n x = 1;\n var x2 = x - .5;\n\n var bkwn = 0.42 - 0.5 * Math.cos(2 * x * Math.PI) + 0.08 * Math.cos(4 * x * Math.PI);\n if (Math.abs(x2) < 1e-9)\n return (wcn / Math.PI);\n else\n return (bkwn * Math.sin(l * wcn * x2) / (Math.PI * l * x2));\n }\n\n function fill_buffer_resample(gfp, outbuf, outbufPos, desired_len, inbuf, in_bufferPos, len, num_used, ch) {\n var gfc = gfp.internal_flags;\n var i, j = 0, k;\n /* number of convolution functions to pre-compute */\n var bpc = gfp.out_samplerate\n / gcd(gfp.out_samplerate, gfp.in_samplerate);\n if (bpc > LameInternalFlags.BPC)\n bpc = LameInternalFlags.BPC;\n\n var intratio = (Math.abs(gfc.resample_ratio\n - Math.floor(.5 + gfc.resample_ratio)) < .0001) ? 1 : 0;\n var fcn = 1.00 / gfc.resample_ratio;\n if (fcn > 1.00)\n fcn = 1.00;\n var filter_l = 31;\n if (0 == filter_l % 2)\n --filter_l;\n /* must be odd */\n filter_l += intratio;\n /* unless resample_ratio=int, it must be even */\n\n var BLACKSIZE = filter_l + 1;\n /* size of data needed for FIR */\n\n if (gfc.fill_buffer_resample_init == 0) {\n gfc.inbuf_old[0] = new_float(BLACKSIZE);\n gfc.inbuf_old[1] = new_float(BLACKSIZE);\n for (i = 0; i <= 2 * bpc; ++i)\n gfc.blackfilt[i] = new_float(BLACKSIZE);\n\n gfc.itime[0] = 0;\n gfc.itime[1] = 0;\n\n /* precompute blackman filter coefficients */\n for (j = 0; j <= 2 * bpc; j++) {\n var sum = 0.;\n var offset = (j - bpc) / (2. * bpc);\n for (i = 0; i <= filter_l; i++)\n sum += gfc.blackfilt[j][i] = blackman(i - offset, fcn,\n filter_l);\n for (i = 0; i <= filter_l; i++)\n gfc.blackfilt[j][i] /= sum;\n }\n gfc.fill_buffer_resample_init = 1;\n }\n\n var inbuf_old = gfc.inbuf_old[ch];\n\n /* time of j'th element in inbuf = itime + j/ifreq; */\n /* time of k'th element in outbuf = j/ofreq */\n for (k = 0; k < desired_len; k++) {\n var time0;\n var joff;\n\n time0 = k * gfc.resample_ratio;\n /* time of k'th output sample */\n j = 0 | Math.floor(time0 - gfc.itime[ch]);\n\n /* check if we need more input data */\n if ((filter_l + j - filter_l / 2) >= len)\n break;\n\n /* blackman filter. by default, window centered at j+.5(filter_l%2) */\n /* but we want a window centered at time0. */\n var offset = (time0 - gfc.itime[ch] - (j + .5 * (filter_l % 2)));\n assert(Math.abs(offset) <= .501);\n\n /* find the closest precomputed window for this offset: */\n joff = 0 | Math.floor((offset * 2 * bpc) + bpc + .5);\n var xvalue = 0.;\n for (i = 0; i <= filter_l; ++i) {\n var j2 = i + j - filter_l / 2;\n var y;\n assert(j2 < len);\n assert(j2 + BLACKSIZE >= 0);\n y = (j2 < 0) ? inbuf_old[BLACKSIZE + j2] : inbuf[in_bufferPos\n + j2];\n xvalue += y * gfc.blackfilt[joff][i];\n }\n outbuf[outbufPos + k] = xvalue;\n }\n\n /* k = number of samples added to outbuf */\n /* last k sample used data from [j-filter_l/2,j+filter_l-filter_l/2] */\n\n /* how many samples of input data were used: */\n num_used.num_used = Math.min(len, filter_l + j - filter_l / 2);\n\n /*\n * adjust our input time counter. Incriment by the number of samples\n * used, then normalize so that next output sample is at time 0, next\n * input buffer is at time itime[ch]\n */\n gfc.itime[ch] += num_used.num_used - k * gfc.resample_ratio;\n\n /* save the last BLACKSIZE samples into the inbuf_old buffer */\n if (num_used.num_used >= BLACKSIZE) {\n for (i = 0; i < BLACKSIZE; i++)\n inbuf_old[i] = inbuf[in_bufferPos + num_used.num_used + i\n - BLACKSIZE];\n } else {\n /* shift in num_used.num_used samples into inbuf_old */\n var n_shift = BLACKSIZE - num_used.num_used;\n /*\n * number of samples to\n * shift\n */\n\n /*\n * shift n_shift samples by num_used.num_used, to make room for the\n * num_used new samples\n */\n for (i = 0; i < n_shift; ++i)\n inbuf_old[i] = inbuf_old[i + num_used.num_used];\n\n /* shift in the num_used.num_used samples */\n for (j = 0; i < BLACKSIZE; ++i, ++j)\n inbuf_old[i] = inbuf[in_bufferPos + j];\n\n assert(j == num_used.num_used);\n }\n return k;\n /* return the number samples created at the new samplerate */\n }\n\n function fill_buffer(gfp, mfbuf, in_buffer, in_bufferPos, nsamples, io) {\n var gfc = gfp.internal_flags;\n\n /* copy in new samples into mfbuf, with resampling if necessary */\n if ((gfc.resample_ratio < .9999) || (gfc.resample_ratio > 1.0001)) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var numUsed = new NumUsed();\n io.n_out = fill_buffer_resample(gfp, mfbuf[ch], gfc.mf_size,\n gfp.framesize, in_buffer[ch], in_bufferPos, nsamples,\n numUsed, ch);\n io.n_in = numUsed.num_used;\n }\n } else {\n io.n_out = Math.min(gfp.framesize, nsamples);\n io.n_in = io.n_out;\n for (var i = 0; i < io.n_out; ++i) {\n mfbuf[0][gfc.mf_size + i] = in_buffer[0][in_bufferPos + i];\n if (gfc.channels_out == 2)\n mfbuf[1][gfc.mf_size + i] = in_buffer[1][in_bufferPos + i];\n }\n }\n }\n\n}\n\nmodule.exports = Lame;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nfunction Presets() {\n function VBRPresets(qual, comp, compS,\n y, shThreshold, shThresholdS,\n adj, adjShort, lower,\n curve, sens, inter,\n joint, mod, fix) {\n this.vbr_q = qual;\n this.quant_comp = comp;\n this.quant_comp_s = compS;\n this.expY = y;\n this.st_lrm = shThreshold;\n this.st_s = shThresholdS;\n this.masking_adj = adj;\n this.masking_adj_short = adjShort;\n this.ath_lower = lower;\n this.ath_curve = curve;\n this.ath_sensitivity = sens;\n this.interch = inter;\n this.safejoint = joint;\n this.sfb21mod = mod;\n this.msfix = fix;\n }\n\n function ABRPresets(kbps, comp, compS,\n joint, fix, shThreshold,\n shThresholdS, bass, sc,\n mask, lower, curve,\n interCh, sfScale) {\n this.quant_comp = comp;\n this.quant_comp_s = compS;\n this.safejoint = joint;\n this.nsmsfix = fix;\n this.st_lrm = shThreshold;\n this.st_s = shThresholdS;\n this.nsbass = bass;\n this.scale = sc;\n this.masking_adj = mask;\n this.ath_lower = lower;\n this.ath_curve = curve;\n this.interch = interCh;\n this.sfscale = sfScale;\n }\n\n var lame;\n\n this.setModules = function (_lame) {\n lame = _lame;\n };\n\n /**\n *

\n     * Switch mappings for VBR mode VBR_RH\n     *             vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix\n     * 
\n */\n var vbr_old_switch_map = [\n new VBRPresets(0, 9, 9, 0, 5.20, 125.0, -4.2, -6.3, 4.8, 1, 0, 0, 2, 21, 0.97),\n new VBRPresets(1, 9, 9, 0, 5.30, 125.0, -3.6, -5.6, 4.5, 1.5, 0, 0, 2, 21, 1.35),\n new VBRPresets(2, 9, 9, 0, 5.60, 125.0, -2.2, -3.5, 2.8, 2, 0, 0, 2, 21, 1.49),\n new VBRPresets(3, 9, 9, 1, 5.80, 130.0, -1.8, -2.8, 2.6, 3, -4, 0, 2, 20, 1.64),\n new VBRPresets(4, 9, 9, 1, 6.00, 135.0, -0.7, -1.1, 1.1, 3.5, -8, 0, 2, 0, 1.79),\n new VBRPresets(5, 9, 9, 1, 6.40, 140.0, 0.5, 0.4, -7.5, 4, -12, 0.0002, 0, 0, 1.95),\n new VBRPresets(6, 9, 9, 1, 6.60, 145.0, 0.67, 0.65, -14.7, 6.5, -19, 0.0004, 0, 0, 2.30),\n new VBRPresets(7, 9, 9, 1, 6.60, 145.0, 0.8, 0.75, -19.7, 8, -22, 0.0006, 0, 0, 2.70),\n new VBRPresets(8, 9, 9, 1, 6.60, 145.0, 1.2, 1.15, -27.5, 10, -23, 0.0007, 0, 0, 0),\n new VBRPresets(9, 9, 9, 1, 6.60, 145.0, 1.6, 1.6, -36, 11, -25, 0.0008, 0, 0, 0),\n new VBRPresets(10, 9, 9, 1, 6.60, 145.0, 2.0, 2.0, -36, 12, -25, 0.0008, 0, 0, 0)\n ];\n\n /**\n *
\n     *                 vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix\n     * 
\n */\n var vbr_psy_switch_map = [\n new VBRPresets(0, 9, 9, 0, 4.20, 25.0, -7.0, -4.0, 7.5, 1, 0, 0, 2, 26, 0.97),\n new VBRPresets(1, 9, 9, 0, 4.20, 25.0, -5.6, -3.6, 4.5, 1.5, 0, 0, 2, 21, 1.35),\n new VBRPresets(2, 9, 9, 0, 4.20, 25.0, -4.4, -1.8, 2, 2, 0, 0, 2, 18, 1.49),\n new VBRPresets(3, 9, 9, 1, 4.20, 25.0, -3.4, -1.25, 1.1, 3, -4, 0, 2, 15, 1.64),\n new VBRPresets(4, 9, 9, 1, 4.20, 25.0, -2.2, 0.1, 0, 3.5, -8, 0, 2, 0, 1.79),\n new VBRPresets(5, 9, 9, 1, 4.20, 25.0, -1.0, 1.65, -7.7, 4, -12, 0.0002, 0, 0, 1.95),\n new VBRPresets(6, 9, 9, 1, 4.20, 25.0, -0.0, 2.47, -7.7, 6.5, -19, 0.0004, 0, 0, 2),\n new VBRPresets(7, 9, 9, 1, 4.20, 25.0, 0.5, 2.0, -14.5, 8, -22, 0.0006, 0, 0, 2),\n new VBRPresets(8, 9, 9, 1, 4.20, 25.0, 1.0, 2.4, -22.0, 10, -23, 0.0007, 0, 0, 2),\n new VBRPresets(9, 9, 9, 1, 4.20, 25.0, 1.5, 2.95, -30.0, 11, -25, 0.0008, 0, 0, 2),\n new VBRPresets(10, 9, 9, 1, 4.20, 25.0, 2.0, 2.95, -36.0, 12, -30, 0.0008, 0, 0, 2)\n ];\n\n function apply_vbr_preset(gfp, a, enforce) {\n var vbr_preset = gfp.VBR == VbrMode.vbr_rh ? vbr_old_switch_map\n : vbr_psy_switch_map;\n\n var x = gfp.VBR_q_frac;\n var p = vbr_preset[a];\n var q = vbr_preset[a + 1];\n var set = p;\n\n // NOOP(vbr_q);\n // NOOP(quant_comp);\n // NOOP(quant_comp_s);\n // NOOP(expY);\n p.st_lrm = p.st_lrm + x * (q.st_lrm - p.st_lrm);\n // LERP(st_lrm);\n p.st_s = p.st_s + x * (q.st_s - p.st_s);\n // LERP(st_s);\n p.masking_adj = p.masking_adj + x * (q.masking_adj - p.masking_adj);\n // LERP(masking_adj);\n p.masking_adj_short = p.masking_adj_short + x\n * (q.masking_adj_short - p.masking_adj_short);\n // LERP(masking_adj_short);\n p.ath_lower = p.ath_lower + x * (q.ath_lower - p.ath_lower);\n // LERP(ath_lower);\n p.ath_curve = p.ath_curve + x * (q.ath_curve - p.ath_curve);\n // LERP(ath_curve);\n p.ath_sensitivity = p.ath_sensitivity + x\n * (q.ath_sensitivity - p.ath_sensitivity);\n // LERP(ath_sensitivity);\n p.interch = p.interch + x * (q.interch - p.interch);\n // LERP(interch);\n // NOOP(safejoint);\n // NOOP(sfb21mod);\n p.msfix = p.msfix + x * (q.msfix - p.msfix);\n // LERP(msfix);\n\n lame_set_VBR_q(gfp, set.vbr_q);\n\n if (enforce != 0)\n gfp.quant_comp = set.quant_comp;\n else if (!(Math.abs(gfp.quant_comp - -1) > 0))\n gfp.quant_comp = set.quant_comp;\n // SET_OPTION(quant_comp, set.quant_comp, -1);\n if (enforce != 0)\n gfp.quant_comp_short = set.quant_comp_s;\n else if (!(Math.abs(gfp.quant_comp_short - -1) > 0))\n gfp.quant_comp_short = set.quant_comp_s;\n // SET_OPTION(quant_comp_short, set.quant_comp_s, -1);\n if (set.expY != 0) {\n gfp.experimentalY = set.expY != 0;\n }\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre = set.st_lrm;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre = set.st_lrm;\n // SET_OPTION(short_threshold_lrm, set.st_lrm, -1);\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre_s = set.st_s;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre_s = set.st_s;\n // SET_OPTION(short_threshold_s, set.st_s, -1);\n if (enforce != 0)\n gfp.maskingadjust = set.masking_adj;\n else if (!(Math.abs(gfp.maskingadjust - 0) > 0))\n gfp.maskingadjust = set.masking_adj;\n // SET_OPTION(maskingadjust, set.masking_adj, 0);\n if (enforce != 0)\n gfp.maskingadjust_short = set.masking_adj_short;\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = set.masking_adj_short;\n // SET_OPTION(maskingadjust_short, set.masking_adj_short, 0);\n if (enforce != 0)\n gfp.ATHlower = -set.ath_lower / 10.0;\n else if (!(Math.abs((-gfp.ATHlower * 10.0) - 0) > 0))\n gfp.ATHlower = -set.ath_lower / 10.0;\n // SET_OPTION(ATHlower, set.ath_lower, 0);\n if (enforce != 0)\n gfp.ATHcurve = set.ath_curve;\n else if (!(Math.abs(gfp.ATHcurve - -1) > 0))\n gfp.ATHcurve = set.ath_curve;\n // SET_OPTION(ATHcurve, set.ath_curve, -1);\n if (enforce != 0)\n gfp.athaa_sensitivity = set.ath_sensitivity;\n else if (!(Math.abs(gfp.athaa_sensitivity - -1) > 0))\n gfp.athaa_sensitivity = set.ath_sensitivity;\n // SET_OPTION(athaa_sensitivity, set.ath_sensitivity, 0);\n if (set.interch > 0) {\n if (enforce != 0)\n gfp.interChRatio = set.interch;\n else if (!(Math.abs(gfp.interChRatio - -1) > 0))\n gfp.interChRatio = set.interch;\n // SET_OPTION(interChRatio, set.interch, -1);\n }\n\n /* parameters for which there is no proper set/get interface */\n if (set.safejoint > 0) {\n gfp.exp_nspsytune = gfp.exp_nspsytune | set.safejoint;\n }\n if (set.sfb21mod > 0) {\n gfp.exp_nspsytune = gfp.exp_nspsytune | (set.sfb21mod << 20);\n }\n if (enforce != 0)\n gfp.msfix = set.msfix;\n else if (!(Math.abs(gfp.msfix - -1) > 0))\n gfp.msfix = set.msfix;\n // SET_OPTION(msfix, set.msfix, -1);\n\n if (enforce == 0) {\n gfp.VBR_q = a;\n gfp.VBR_q_frac = x;\n }\n }\n\n /**\n *
\n     *  Switch mappings for ABR mode\n     *\n     *              kbps  quant q_s safejoint nsmsfix st_lrm  st_s  ns-bass scale   msk ath_lwr ath_curve  interch , sfscale\n     * 
\n */\n var abr_switch_map = [\n new ABRPresets(8, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -30.0, 11, 0.0012, 1), /* 8, impossible to use in stereo */\n new ABRPresets(16, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -25.0, 11, 0.0010, 1), /* 16 */\n new ABRPresets(24, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -20.0, 11, 0.0010, 1), /* 24 */\n new ABRPresets(32, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -15.0, 11, 0.0010, 1), /* 32 */\n new ABRPresets(40, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -10.0, 11, 0.0009, 1), /* 40 */\n new ABRPresets(48, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -10.0, 11, 0.0009, 1), /* 48 */\n new ABRPresets(56, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -6.0, 11, 0.0008, 1), /* 56 */\n new ABRPresets(64, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -2.0, 11, 0.0008, 1), /* 64 */\n new ABRPresets(80, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, .0, 8, 0.0007, 1), /* 80 */\n new ABRPresets(96, 9, 9, 0, 2.50, 6.60, 145, 0, 0.95, 0, 1.0, 5.5, 0.0006, 1), /* 96 */\n new ABRPresets(112, 9, 9, 0, 2.25, 6.60, 145, 0, 0.95, 0, 2.0, 4.5, 0.0005, 1), /* 112 */\n new ABRPresets(128, 9, 9, 0, 1.95, 6.40, 140, 0, 0.95, 0, 3.0, 4, 0.0002, 1), /* 128 */\n new ABRPresets(160, 9, 9, 1, 1.79, 6.00, 135, 0, 0.95, -2, 5.0, 3.5, 0, 1), /* 160 */\n new ABRPresets(192, 9, 9, 1, 1.49, 5.60, 125, 0, 0.97, -4, 7.0, 3, 0, 0), /* 192 */\n new ABRPresets(224, 9, 9, 1, 1.25, 5.20, 125, 0, 0.98, -6, 9.0, 2, 0, 0), /* 224 */\n new ABRPresets(256, 9, 9, 1, 0.97, 5.20, 125, 0, 1.00, -8, 10.0, 1, 0, 0), /* 256 */\n new ABRPresets(320, 9, 9, 1, 0.90, 5.20, 125, 0, 1.00, -10, 12.0, 0, 0, 0) /* 320 */\n ];\n\n function apply_abr_preset(gfp, preset, enforce) {\n /* Variables for the ABR stuff */\n var actual_bitrate = preset;\n\n var r = lame.nearestBitrateFullIndex(preset);\n\n gfp.VBR = VbrMode.vbr_abr;\n gfp.VBR_mean_bitrate_kbps = actual_bitrate;\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps, 320);\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps, 8);\n gfp.brate = gfp.VBR_mean_bitrate_kbps;\n if (gfp.VBR_mean_bitrate_kbps > 320) {\n gfp.disable_reservoir = true;\n }\n\n /* parameters for which there is no proper set/get interface */\n if (abr_switch_map[r].safejoint > 0)\n gfp.exp_nspsytune = gfp.exp_nspsytune | 2;\n /* safejoint */\n\n if (abr_switch_map[r].sfscale > 0) {\n gfp.internal_flags.noise_shaping = 2;\n }\n /* ns-bass tweaks */\n if (Math.abs(abr_switch_map[r].nsbass) > 0) {\n var k = (int)(abr_switch_map[r].nsbass * 4);\n if (k < 0)\n k += 64;\n gfp.exp_nspsytune = gfp.exp_nspsytune | (k << 2);\n }\n\n if (enforce != 0)\n gfp.quant_comp = abr_switch_map[r].quant_comp;\n else if (!(Math.abs(gfp.quant_comp - -1) > 0))\n gfp.quant_comp = abr_switch_map[r].quant_comp;\n // SET_OPTION(quant_comp, abr_switch_map[r].quant_comp, -1);\n if (enforce != 0)\n gfp.quant_comp_short = abr_switch_map[r].quant_comp_s;\n else if (!(Math.abs(gfp.quant_comp_short - -1) > 0))\n gfp.quant_comp_short = abr_switch_map[r].quant_comp_s;\n // SET_OPTION(quant_comp_short, abr_switch_map[r].quant_comp_s, -1);\n\n if (enforce != 0)\n gfp.msfix = abr_switch_map[r].nsmsfix;\n else if (!(Math.abs(gfp.msfix - -1) > 0))\n gfp.msfix = abr_switch_map[r].nsmsfix;\n // SET_OPTION(msfix, abr_switch_map[r].nsmsfix, -1);\n\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre = abr_switch_map[r].st_lrm;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre = abr_switch_map[r].st_lrm;\n // SET_OPTION(short_threshold_lrm, abr_switch_map[r].st_lrm, -1);\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre_s = abr_switch_map[r].st_s;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre_s = abr_switch_map[r].st_s;\n // SET_OPTION(short_threshold_s, abr_switch_map[r].st_s, -1);\n\n /*\n * ABR seems to have big problems with clipping, especially at low\n * bitrates\n */\n /*\n * so we compensate for that here by using a scale value depending on\n * bitrate\n */\n if (enforce != 0)\n gfp.scale = abr_switch_map[r].scale;\n else if (!(Math.abs(gfp.scale - -1) > 0))\n gfp.scale = abr_switch_map[r].scale;\n // SET_OPTION(scale, abr_switch_map[r].scale, -1);\n\n if (enforce != 0)\n gfp.maskingadjust = abr_switch_map[r].masking_adj;\n else if (!(Math.abs(gfp.maskingadjust - 0) > 0))\n gfp.maskingadjust = abr_switch_map[r].masking_adj;\n // SET_OPTION(maskingadjust, abr_switch_map[r].masking_adj, 0);\n if (abr_switch_map[r].masking_adj > 0) {\n if (enforce != 0)\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * .9);\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * .9);\n // SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj *\n // .9, 0);\n } else {\n if (enforce != 0)\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * 1.1);\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * 1.1);\n // SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj *\n // 1.1, 0);\n }\n\n if (enforce != 0)\n gfp.ATHlower = -abr_switch_map[r].ath_lower / 10.;\n else if (!(Math.abs((-gfp.ATHlower * 10.) - 0) > 0))\n gfp.ATHlower = -abr_switch_map[r].ath_lower / 10.;\n // SET_OPTION(ATHlower, abr_switch_map[r].ath_lower, 0);\n if (enforce != 0)\n gfp.ATHcurve = abr_switch_map[r].ath_curve;\n else if (!(Math.abs(gfp.ATHcurve - -1) > 0))\n gfp.ATHcurve = abr_switch_map[r].ath_curve;\n // SET_OPTION(ATHcurve, abr_switch_map[r].ath_curve, -1);\n\n if (enforce != 0)\n gfp.interChRatio = abr_switch_map[r].interch;\n else if (!(Math.abs(gfp.interChRatio - -1) > 0))\n gfp.interChRatio = abr_switch_map[r].interch;\n // SET_OPTION(interChRatio, abr_switch_map[r].interch, -1);\n\n return preset;\n }\n\n this.apply_preset = function(gfp, preset, enforce) {\n /* translate legacy presets */\n switch (preset) {\n case Lame.R3MIX:\n {\n preset = Lame.V3;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.MEDIUM:\n {\n preset = Lame.V4;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.MEDIUM_FAST:\n {\n preset = Lame.V4;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.STANDARD:\n {\n preset = Lame.V2;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.STANDARD_FAST:\n {\n preset = Lame.V2;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.EXTREME:\n {\n preset = Lame.V0;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.EXTREME_FAST:\n {\n preset = Lame.V0;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.INSANE:\n {\n preset = 320;\n gfp.preset = preset;\n apply_abr_preset(gfp, preset, enforce);\n gfp.VBR = VbrMode.vbr_off;\n return preset;\n }\n }\n\n gfp.preset = preset;\n {\n switch (preset) {\n case Lame.V9:\n apply_vbr_preset(gfp, 9, enforce);\n return preset;\n case Lame.V8:\n apply_vbr_preset(gfp, 8, enforce);\n return preset;\n case Lame.V7:\n apply_vbr_preset(gfp, 7, enforce);\n return preset;\n case Lame.V6:\n apply_vbr_preset(gfp, 6, enforce);\n return preset;\n case Lame.V5:\n apply_vbr_preset(gfp, 5, enforce);\n return preset;\n case Lame.V4:\n apply_vbr_preset(gfp, 4, enforce);\n return preset;\n case Lame.V3:\n apply_vbr_preset(gfp, 3, enforce);\n return preset;\n case Lame.V2:\n apply_vbr_preset(gfp, 2, enforce);\n return preset;\n case Lame.V1:\n apply_vbr_preset(gfp, 1, enforce);\n return preset;\n case Lame.V0:\n apply_vbr_preset(gfp, 0, enforce);\n return preset;\n default:\n break;\n }\n }\n if (8 <= preset && preset <= 320) {\n return apply_abr_preset(gfp, preset, enforce);\n }\n\n /* no corresponding preset found */\n gfp.preset = 0;\n return preset;\n }\n\n // Rest from getset.c:\n\n /**\n * VBR quality level.
\n * 0 = highest
\n * 9 = lowest\n */\n function lame_set_VBR_q(gfp, VBR_q) {\n var ret = 0;\n\n if (0 > VBR_q) {\n /* Unknown VBR quality level! */\n ret = -1;\n VBR_q = 0;\n }\n if (9 < VBR_q) {\n ret = -1;\n VBR_q = 9;\n }\n\n gfp.VBR_q = VBR_q;\n gfp.VBR_q_frac = 0;\n return ret;\n }\n\n}\n\nmodule.exports = Presets;\n","function VBRQuantize() {\n var qupvt;\n var tak;\n\n this.setModules = function (_qupvt, _tk) {\n qupvt = _qupvt;\n tak = _tk;\n }\n //TODO\n\n}\n\nmodule.exports = VBRQuantize;\n","//package mp3;\n\nfunction CalcNoiseResult() {\n /**\n * sum of quantization noise > masking\n */\n this.over_noise = 0.;\n /**\n * sum of all quantization noise\n */\n this.tot_noise = 0.;\n /**\n * max quantization noise\n */\n this.max_noise = 0.;\n /**\n * number of quantization noise > masking\n */\n this.over_count = 0;\n /**\n * SSD-like cost of distorted bands\n */\n this.over_SSD = 0;\n this.bits = 0;\n}\n\nmodule.exports = CalcNoiseResult;\n","var common = require('./common.js');\nvar new_float = common.new_float;\nvar new_int = common.new_int;\nvar assert = common.assert;\n\nfunction CalcNoiseData() {\n this.global_gain = 0;\n this.sfb_count1 = 0;\n this.step = new_int(39);\n this.noise = new_float(39);\n this.noise_log = new_float(39);\n}\n\nmodule.exports = CalcNoiseData;\n","/*\n * MP3 quantization\n *\n * Copyright (c) 1999-2000 Mark Taylor\n * Copyright (c) 1999-2003 Takehiro Tominaga\n * Copyright (c) 2000-2007 Robert Hegemann\n * Copyright (c) 2001-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Quantize.java,v 1.24 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar VBRQuantize = require('./VBRQuantize.js');\nvar CalcNoiseResult = require('./CalcNoiseResult.js');\nvar CalcNoiseData = require('./CalcNoiseData.js');\nvar Encoder = require('./Encoder.js');\nvar GrInfo = require('./GrInfo.js');\nvar L3Side = require('./L3Side.js');\n\nfunction Quantize() {\n var bs;\n this.rv = null;\n var rv;\n this.qupvt = null;\n var qupvt;\n\n var vbr = new VBRQuantize();\n var tk;\n\n this.setModules = function (_bs, _rv, _qupvt, _tk) {\n bs = _bs;\n rv = _rv;\n this.rv = _rv;\n qupvt = _qupvt;\n this.qupvt = _qupvt;\n tk = _tk;\n vbr.setModules(qupvt, tk);\n }\n\n /**\n * convert from L/R <. Mid/Side\n */\n this.ms_convert = function (l3_side, gr) {\n for (var i = 0; i < 576; ++i) {\n var l = l3_side.tt[gr][0].xr[i];\n var r = l3_side.tt[gr][1].xr[i];\n l3_side.tt[gr][0].xr[i] = (l + r) * (Util.SQRT2 * 0.5);\n l3_side.tt[gr][1].xr[i] = (l - r) * (Util.SQRT2 * 0.5);\n }\n };\n\n /**\n * mt 6/99\n *\n * initializes cod_info, scalefac and xrpow\n *\n * returns 0 if all energies in xr are zero, else 1\n */\n function init_xrpow_core(cod_info, xrpow, upper, sum) {\n sum = 0;\n for (var i = 0; i <= upper; ++i) {\n var tmp = Math.abs(cod_info.xr[i]);\n sum += tmp;\n xrpow[i] = Math.sqrt(tmp * Math.sqrt(tmp));\n\n if (xrpow[i] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[i];\n }\n return sum;\n }\n\n this.init_xrpow = function (gfc, cod_info, xrpow) {\n var sum = 0;\n var upper = 0 | cod_info.max_nonzero_coeff;\n\n assert(xrpow != null);\n cod_info.xrpow_max = 0;\n\n /*\n * check if there is some energy we have to quantize and calculate xrpow\n * matching our fresh scalefactors\n */\n assert(0 <= upper && upper <= 575);\n\n Arrays.fill(xrpow, upper, 576, 0);\n\n sum = init_xrpow_core(cod_info, xrpow, upper, sum);\n\n /*\n * return 1 if we have something to quantize, else 0\n */\n if (sum > 1E-20) {\n var j = 0;\n if ((gfc.substep_shaping & 2) != 0)\n j = 1;\n\n for (var i = 0; i < cod_info.psymax; i++)\n gfc.pseudohalf[i] = j;\n\n return true;\n }\n\n Arrays.fill(cod_info.l3_enc, 0, 576, 0);\n return false;\n }\n\n /**\n * Gabriel Bouvigne feb/apr 2003
\n * Analog silence detection in partitionned sfb21 or sfb12 for short blocks\n *\n * From top to bottom of sfb, changes to 0 coeffs which are below ath. It\n * stops on the first coeff higher than ath.\n */\n function psfb21_analogsilence(gfc, cod_info) {\n var ath = gfc.ATH;\n var xr = cod_info.xr;\n\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n /* NORM, START or STOP type, but not SHORT blocks */\n var stop = false;\n for (var gsfb = Encoder.PSFB21 - 1; gsfb >= 0 && !stop; gsfb--) {\n var start = gfc.scalefac_band.psfb21[gsfb];\n var end = gfc.scalefac_band.psfb21[gsfb + 1];\n var ath21 = qupvt.athAdjust(ath.adjust, ath.psfb21[gsfb],\n ath.floor);\n\n if (gfc.nsPsy.longfact[21] > 1e-12)\n ath21 *= gfc.nsPsy.longfact[21];\n\n for (var j = end - 1; j >= start; j--) {\n if (Math.abs(xr[j]) < ath21)\n xr[j] = 0;\n else {\n stop = true;\n break;\n }\n }\n }\n } else {\n /* note: short blocks coeffs are reordered */\n for (var block = 0; block < 3; block++) {\n var stop = false;\n for (var gsfb = Encoder.PSFB12 - 1; gsfb >= 0 && !stop; gsfb--) {\n var start = gfc.scalefac_band.s[12]\n * 3\n + (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12])\n * block\n + (gfc.scalefac_band.psfb12[gsfb] - gfc.scalefac_band.psfb12[0]);\n var end = start\n + (gfc.scalefac_band.psfb12[gsfb + 1] - gfc.scalefac_band.psfb12[gsfb]);\n var ath12 = qupvt.athAdjust(ath.adjust, ath.psfb12[gsfb],\n ath.floor);\n\n if (gfc.nsPsy.shortfact[12] > 1e-12)\n ath12 *= gfc.nsPsy.shortfact[12];\n\n for (var j = end - 1; j >= start; j--) {\n if (Math.abs(xr[j]) < ath12)\n xr[j] = 0;\n else {\n stop = true;\n break;\n }\n }\n }\n }\n }\n\n }\n\n this.init_outer_loop = function (gfc, cod_info) {\n /*\n * initialize fresh cod_info\n */\n cod_info.part2_3_length = 0;\n cod_info.big_values = 0;\n cod_info.count1 = 0;\n cod_info.global_gain = 210;\n cod_info.scalefac_compress = 0;\n /* mixed_block_flag, block_type was set in psymodel.c */\n cod_info.table_select[0] = 0;\n cod_info.table_select[1] = 0;\n cod_info.table_select[2] = 0;\n cod_info.subblock_gain[0] = 0;\n cod_info.subblock_gain[1] = 0;\n cod_info.subblock_gain[2] = 0;\n cod_info.subblock_gain[3] = 0;\n /* this one is always 0 */\n cod_info.region0_count = 0;\n cod_info.region1_count = 0;\n cod_info.preflag = 0;\n cod_info.scalefac_scale = 0;\n cod_info.count1table_select = 0;\n cod_info.part2_length = 0;\n cod_info.sfb_lmax = Encoder.SBPSY_l;\n cod_info.sfb_smin = Encoder.SBPSY_s;\n cod_info.psy_lmax = gfc.sfb21_extra ? Encoder.SBMAX_l : Encoder.SBPSY_l;\n cod_info.psymax = cod_info.psy_lmax;\n cod_info.sfbmax = cod_info.sfb_lmax;\n cod_info.sfbdivide = 11;\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n cod_info.width[sfb] = gfc.scalefac_band.l[sfb + 1]\n - gfc.scalefac_band.l[sfb];\n /* which is always 0. */\n cod_info.window[sfb] = 3;\n }\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n var ixwork = new_float(576);\n\n cod_info.sfb_smin = 0;\n cod_info.sfb_lmax = 0;\n if (cod_info.mixed_block_flag != 0) {\n /*\n * MPEG-1: sfbs 0-7 long block, 3-12 short blocks MPEG-2(.5):\n * sfbs 0-5 long block, 3-12 short blocks\n */\n cod_info.sfb_smin = 3;\n cod_info.sfb_lmax = gfc.mode_gr * 2 + 4;\n }\n cod_info.psymax = cod_info.sfb_lmax\n + 3\n * ((gfc.sfb21_extra ? Encoder.SBMAX_s : Encoder.SBPSY_s) - cod_info.sfb_smin);\n cod_info.sfbmax = cod_info.sfb_lmax + 3\n * (Encoder.SBPSY_s - cod_info.sfb_smin);\n cod_info.sfbdivide = cod_info.sfbmax - 18;\n cod_info.psy_lmax = cod_info.sfb_lmax;\n /* re-order the short blocks, for more efficient encoding below */\n /* By Takehiro TOMINAGA */\n /*\n * Within each scalefactor band, data is given for successive time\n * windows, beginning with window 0 and ending with window 2. Within\n * each window, the quantized values are then arranged in order of\n * increasing frequency...\n */\n var ix = gfc.scalefac_band.l[cod_info.sfb_lmax];\n System.arraycopy(cod_info.xr, 0, ixwork, 0, 576);\n for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n for (var window = 0; window < 3; window++) {\n for (var l = start; l < end; l++) {\n cod_info.xr[ix++] = ixwork[3 * l + window];\n }\n }\n }\n\n var j = cod_info.sfb_lmax;\n for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n cod_info.width[j] = cod_info.width[j + 1] = cod_info.width[j + 2] = gfc.scalefac_band.s[sfb + 1]\n - gfc.scalefac_band.s[sfb];\n cod_info.window[j] = 0;\n cod_info.window[j + 1] = 1;\n cod_info.window[j + 2] = 2;\n j += 3;\n }\n }\n\n cod_info.count1bits = 0;\n cod_info.sfb_partition_table = qupvt.nr_of_sfb_block[0][0];\n cod_info.slen[0] = 0;\n cod_info.slen[1] = 0;\n cod_info.slen[2] = 0;\n cod_info.slen[3] = 0;\n\n cod_info.max_nonzero_coeff = 575;\n\n /*\n * fresh scalefactors are all zero\n */\n Arrays.fill(cod_info.scalefac, 0);\n\n psfb21_analogsilence(gfc, cod_info);\n };\n\n function BinSearchDirection(ordinal) {\n this.ordinal = ordinal;\n }\n\n BinSearchDirection.BINSEARCH_NONE = new BinSearchDirection(0);\n BinSearchDirection.BINSEARCH_UP = new BinSearchDirection(1);\n BinSearchDirection.BINSEARCH_DOWN = new BinSearchDirection(2);\n\n /**\n * author/date??\n *\n * binary step size search used by outer_loop to get a quantizer step size\n * to start with\n */\n function bin_search_StepSize(gfc, cod_info, desired_rate, ch, xrpow) {\n var nBits;\n var CurrentStep = gfc.CurrentStep[ch];\n var flagGoneOver = false;\n var start = gfc.OldValue[ch];\n var Direction = BinSearchDirection.BINSEARCH_NONE;\n cod_info.global_gain = start;\n desired_rate -= cod_info.part2_length;\n\n assert(CurrentStep != 0);\n for (; ;) {\n var step;\n nBits = tk.count_bits(gfc, xrpow, cod_info, null);\n\n if (CurrentStep == 1 || nBits == desired_rate)\n break;\n /* nothing to adjust anymore */\n\n if (nBits > desired_rate) {\n /* increase Quantize_StepSize */\n if (Direction == BinSearchDirection.BINSEARCH_DOWN)\n flagGoneOver = true;\n\n if (flagGoneOver)\n CurrentStep /= 2;\n Direction = BinSearchDirection.BINSEARCH_UP;\n step = CurrentStep;\n } else {\n /* decrease Quantize_StepSize */\n if (Direction == BinSearchDirection.BINSEARCH_UP)\n flagGoneOver = true;\n\n if (flagGoneOver)\n CurrentStep /= 2;\n Direction = BinSearchDirection.BINSEARCH_DOWN;\n step = -CurrentStep;\n }\n cod_info.global_gain += step;\n if (cod_info.global_gain < 0) {\n cod_info.global_gain = 0;\n flagGoneOver = true;\n }\n if (cod_info.global_gain > 255) {\n cod_info.global_gain = 255;\n flagGoneOver = true;\n }\n }\n\n assert(cod_info.global_gain >= 0);\n assert(cod_info.global_gain < 256);\n\n while (nBits > desired_rate && cod_info.global_gain < 255) {\n cod_info.global_gain++;\n nBits = tk.count_bits(gfc, xrpow, cod_info, null);\n }\n gfc.CurrentStep[ch] = (start - cod_info.global_gain >= 4) ? 4 : 2;\n gfc.OldValue[ch] = cod_info.global_gain;\n cod_info.part2_3_length = nBits;\n return nBits;\n }\n\n this.trancate_smallspectrums = function (gfc, gi, l3_xmin, work) {\n var distort = new_float(L3Side.SFBMAX);\n\n if ((0 == (gfc.substep_shaping & 4) && gi.block_type == Encoder.SHORT_TYPE)\n || (gfc.substep_shaping & 0x80) != 0)\n return;\n qupvt.calc_noise(gi, l3_xmin, distort, new CalcNoiseResult(), null);\n for (var j = 0; j < 576; j++) {\n var xr = 0.0;\n if (gi.l3_enc[j] != 0)\n xr = Math.abs(gi.xr[j]);\n work[j] = xr;\n }\n\n var j = 0;\n var sfb = 8;\n if (gi.block_type == Encoder.SHORT_TYPE)\n sfb = 6;\n do {\n var allowedNoise, trancateThreshold;\n var nsame, start;\n\n var width = gi.width[sfb];\n j += width;\n if (distort[sfb] >= 1.0)\n continue;\n\n Arrays.sort(work, j - width, width);\n if (BitStream.EQ(work[j - 1], 0.0))\n continue;\n /* all zero sfb */\n\n allowedNoise = (1.0 - distort[sfb]) * l3_xmin[sfb];\n trancateThreshold = 0.0;\n start = 0;\n do {\n var noise;\n for (nsame = 1; start + nsame < width; nsame++)\n if (BitStream.NEQ(work[start + j - width], work[start + j\n + nsame - width]))\n break;\n\n noise = work[start + j - width] * work[start + j - width]\n * nsame;\n if (allowedNoise < noise) {\n if (start != 0)\n trancateThreshold = work[start + j - width - 1];\n break;\n }\n allowedNoise -= noise;\n start += nsame;\n } while (start < width);\n if (BitStream.EQ(trancateThreshold, 0.0))\n continue;\n\n do {\n if (Math.abs(gi.xr[j - width]) <= trancateThreshold)\n gi.l3_enc[j - width] = 0;\n } while (--width > 0);\n } while (++sfb < gi.psymax);\n\n gi.part2_3_length = tk.noquant_count_bits(gfc, gi, null);\n };\n\n /**\n * author/date??\n *\n * Function: Returns zero if there is a scalefac which has not been\n * amplified. Otherwise it returns one.\n */\n function loop_break(cod_info) {\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++)\n if (cod_info.scalefac[sfb]\n + cod_info.subblock_gain[cod_info.window[sfb]] == 0)\n return false;\n\n return true;\n }\n\n /* mt 5/99: Function: Improved calc_noise for a single channel */\n\n function penalties(noise) {\n return Util.FAST_LOG10((0.368 + 0.632 * noise * noise * noise));\n }\n\n /**\n * author/date??\n *\n * several different codes to decide which quantization is better\n */\n function get_klemm_noise(distort, gi) {\n var klemm_noise = 1E-37;\n for (var sfb = 0; sfb < gi.psymax; sfb++)\n klemm_noise += penalties(distort[sfb]);\n\n return Math.max(1e-20, klemm_noise);\n }\n\n function quant_compare(quant_comp, best, calc, gi, distort) {\n /**\n * noise is given in decibels (dB) relative to masking thesholds.
\n *\n * over_noise: ??? (the previous comment is fully wrong)
\n * tot_noise: ??? (the previous comment is fully wrong)
\n * max_noise: max quantization noise\n */\n var better;\n\n switch (quant_comp) {\n default:\n case 9:\n {\n if (best.over_count > 0) {\n /* there are distorted sfb */\n better = calc.over_SSD <= best.over_SSD;\n if (calc.over_SSD == best.over_SSD)\n better = calc.bits < best.bits;\n } else {\n /* no distorted sfb */\n better = ((calc.max_noise < 0) && ((calc.max_noise * 10 + calc.bits) <= (best.max_noise * 10 + best.bits)));\n }\n break;\n }\n\n case 0:\n better = calc.over_count < best.over_count\n || (calc.over_count == best.over_count && calc.over_noise < best.over_noise)\n || (calc.over_count == best.over_count\n && BitStream.EQ(calc.over_noise, best.over_noise) && calc.tot_noise < best.tot_noise);\n break;\n\n case 8:\n calc.max_noise = get_klemm_noise(distort, gi);\n //$FALL-THROUGH$\n case 1:\n better = calc.max_noise < best.max_noise;\n break;\n case 2:\n better = calc.tot_noise < best.tot_noise;\n break;\n case 3:\n better = (calc.tot_noise < best.tot_noise)\n && (calc.max_noise < best.max_noise);\n break;\n case 4:\n better = (calc.max_noise <= 0.0 && best.max_noise > 0.2)\n || (calc.max_noise <= 0.0 && best.max_noise < 0.0\n && best.max_noise > calc.max_noise - 0.2 && calc.tot_noise < best.tot_noise)\n || (calc.max_noise <= 0.0 && best.max_noise > 0.0\n && best.max_noise > calc.max_noise - 0.2 && calc.tot_noise < best.tot_noise\n + best.over_noise)\n || (calc.max_noise > 0.0 && best.max_noise > -0.05\n && best.max_noise > calc.max_noise - 0.1 && calc.tot_noise\n + calc.over_noise < best.tot_noise\n + best.over_noise)\n || (calc.max_noise > 0.0 && best.max_noise > -0.1\n && best.max_noise > calc.max_noise - 0.15 && calc.tot_noise\n + calc.over_noise + calc.over_noise < best.tot_noise\n + best.over_noise + best.over_noise);\n break;\n case 5:\n better = calc.over_noise < best.over_noise\n || (BitStream.EQ(calc.over_noise, best.over_noise) && calc.tot_noise < best.tot_noise);\n break;\n case 6:\n better = calc.over_noise < best.over_noise\n || (BitStream.EQ(calc.over_noise, best.over_noise) && (calc.max_noise < best.max_noise || (BitStream\n .EQ(calc.max_noise, best.max_noise) && calc.tot_noise <= best.tot_noise)));\n break;\n case 7:\n better = calc.over_count < best.over_count\n || calc.over_noise < best.over_noise;\n break;\n }\n\n if (best.over_count == 0) {\n /*\n * If no distorted bands, only use this quantization if it is\n * better, and if it uses less bits. Unfortunately, part2_3_length\n * is sometimes a poor estimator of the final size at low bitrates.\n */\n better = better && calc.bits < best.bits;\n }\n\n return better;\n }\n\n /**\n * author/date??\n *\n *
\n     *  Amplify the scalefactor bands that violate the masking threshold.\n     *  See ISO 11172-3 Section C.1.5.4.3.5\n     *\n     *  distort[] = noise/masking\n     *  distort[] > 1   ==> noise is not masked\n     *  distort[] < 1   ==> noise is masked\n     *  max_dist = maximum value of distort[]\n     *\n     *  Three algorithms:\n     *  noise_shaping_amp\n     *        0             Amplify all bands with distort[]>1.\n     *\n     *        1             Amplify all bands with distort[] >= max_dist^(.5);\n     *                     ( 50% in the db scale)\n     *\n     *        2             Amplify first band with distort[] >= max_dist;\n     *\n     *\n     *  For algorithms 0 and 1, if max_dist < 1, then amplify all bands\n     *  with distort[] >= .95*max_dist.  This is to make sure we always\n     *  amplify at least one band.\n     * 
\n */\n function amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine) {\n var gfc = gfp.internal_flags;\n var ifqstep34;\n\n if (cod_info.scalefac_scale == 0) {\n ifqstep34 = 1.29683955465100964055;\n /* 2**(.75*.5) */\n } else {\n ifqstep34 = 1.68179283050742922612;\n /* 2**(.75*1) */\n }\n\n /* compute maximum value of distort[] */\n var trigger = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n if (trigger < distort[sfb])\n trigger = distort[sfb];\n }\n\n var noise_shaping_amp = gfc.noise_shaping_amp;\n if (noise_shaping_amp == 3) {\n if (bRefine)\n noise_shaping_amp = 2;\n else\n noise_shaping_amp = 1;\n }\n switch (noise_shaping_amp) {\n case 2:\n /* amplify exactly 1 band */\n break;\n\n case 1:\n /* amplify bands within 50% of max (on db scale) */\n if (trigger > 1.0)\n trigger = Math.pow(trigger, .5);\n else\n trigger *= .95;\n break;\n\n case 0:\n default:\n /* ISO algorithm. amplify all bands with distort>1 */\n if (trigger > 1.0)\n trigger = 1.0;\n else\n trigger *= .95;\n break;\n }\n\n var j = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n var width = cod_info.width[sfb];\n var l;\n j += width;\n if (distort[sfb] < trigger)\n continue;\n\n if ((gfc.substep_shaping & 2) != 0) {\n gfc.pseudohalf[sfb] = (0 == gfc.pseudohalf[sfb]) ? 1 : 0;\n if (0 == gfc.pseudohalf[sfb] && gfc.noise_shaping_amp == 2)\n return;\n }\n cod_info.scalefac[sfb]++;\n for (l = -width; l < 0; l++) {\n xrpow[j + l] *= ifqstep34;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n\n if (gfc.noise_shaping_amp == 2)\n return;\n }\n }\n\n /**\n * Takehiro Tominaga 2000-xx-xx\n *\n * turns on scalefac scale and adjusts scalefactors\n */\n function inc_scalefac_scale(cod_info, xrpow) {\n var ifqstep34 = 1.29683955465100964055;\n\n var j = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n var width = cod_info.width[sfb];\n var s = cod_info.scalefac[sfb];\n if (cod_info.preflag != 0)\n s += qupvt.pretab[sfb];\n j += width;\n if ((s & 1) != 0) {\n s++;\n for (var l = -width; l < 0; l++) {\n xrpow[j + l] *= ifqstep34;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n }\n cod_info.scalefac[sfb] = s >> 1;\n }\n cod_info.preflag = 0;\n cod_info.scalefac_scale = 1;\n }\n\n /**\n * Takehiro Tominaga 2000-xx-xx\n *\n * increases the subblock gain and adjusts scalefactors\n */\n function inc_subblock_gain(gfc, cod_info, xrpow) {\n var sfb;\n var scalefac = cod_info.scalefac;\n\n /* subbloc_gain can't do anything in the long block region */\n for (sfb = 0; sfb < cod_info.sfb_lmax; sfb++) {\n if (scalefac[sfb] >= 16)\n return true;\n }\n\n for (var window = 0; window < 3; window++) {\n var s1 = 0;\n var s2 = 0;\n\n for (sfb = cod_info.sfb_lmax + window; sfb < cod_info.sfbdivide; sfb += 3) {\n if (s1 < scalefac[sfb])\n s1 = scalefac[sfb];\n }\n for (; sfb < cod_info.sfbmax; sfb += 3) {\n if (s2 < scalefac[sfb])\n s2 = scalefac[sfb];\n }\n\n if (s1 < 16 && s2 < 8)\n continue;\n\n if (cod_info.subblock_gain[window] >= 7)\n return true;\n\n /*\n * even though there is no scalefactor for sfb12 subblock gain\n * affects upper frequencies too, that's why we have to go up to\n * SBMAX_s\n */\n cod_info.subblock_gain[window]++;\n var j = gfc.scalefac_band.l[cod_info.sfb_lmax];\n for (sfb = cod_info.sfb_lmax + window; sfb < cod_info.sfbmax; sfb += 3) {\n var amp;\n var width = cod_info.width[sfb];\n var s = scalefac[sfb];\n assert(s >= 0);\n s = s - (4 >> cod_info.scalefac_scale);\n if (s >= 0) {\n scalefac[sfb] = s;\n j += width * 3;\n continue;\n }\n\n scalefac[sfb] = 0;\n {\n var gain = 210 + (s << (cod_info.scalefac_scale + 1));\n amp = qupvt.IPOW20(gain);\n }\n j += width * (window + 1);\n for (var l = -width; l < 0; l++) {\n xrpow[j + l] *= amp;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n j += width * (3 - window - 1);\n }\n\n {\n var amp = qupvt.IPOW20(202);\n j += cod_info.width[sfb] * (window + 1);\n for (var l = -cod_info.width[sfb]; l < 0; l++) {\n xrpow[j + l] *= amp;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n }\n }\n return false;\n }\n\n /**\n *
\n     *  Takehiro Tominaga /date??\n     *  Robert Hegemann 2000-09-06: made a function of it\n     *\n     *  amplifies scalefactor bands,\n     *   - if all are already amplified returns 0\n     *   - if some bands are amplified too much:\n     *      * try to increase scalefac_scale\n     *      * if already scalefac_scale was set\n     *          try on short blocks to increase subblock gain\n     * 
\n */\n function balance_noise(gfp, cod_info, distort, xrpow, bRefine) {\n var gfc = gfp.internal_flags;\n\n amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine);\n\n /*\n * check to make sure we have not amplified too much loop_break returns\n * 0 if there is an unamplified scalefac scale_bitcount returns 0 if no\n * scalefactors are too large\n */\n\n var status = loop_break(cod_info);\n\n if (status)\n return false;\n /* all bands amplified */\n\n /*\n * not all scalefactors have been amplified. so these scalefacs are\n * possibly valid. encode them:\n */\n if (gfc.mode_gr == 2)\n status = tk.scale_bitcount(cod_info);\n else\n status = tk.scale_bitcount_lsf(gfc, cod_info);\n\n if (!status)\n return true;\n /* amplified some bands not exceeding limits */\n\n /*\n * some scalefactors are too large. lets try setting scalefac_scale=1\n */\n if (gfc.noise_shaping > 1) {\n Arrays.fill(gfc.pseudohalf, 0);\n if (0 == cod_info.scalefac_scale) {\n inc_scalefac_scale(cod_info, xrpow);\n status = false;\n } else {\n if (cod_info.block_type == Encoder.SHORT_TYPE\n && gfc.subblock_gain > 0) {\n status = (inc_subblock_gain(gfc, cod_info, xrpow) || loop_break(cod_info));\n }\n }\n }\n\n if (!status) {\n if (gfc.mode_gr == 2)\n status = tk.scale_bitcount(cod_info);\n else\n status = tk.scale_bitcount_lsf(gfc, cod_info);\n }\n return !status;\n }\n\n /**\n *
\n     *  Function: The outer iteration loop controls the masking conditions\n     *  of all scalefactorbands. It computes the best scalefac and\n     *  global gain. This module calls the inner iteration loop\n     *\n     *  mt 5/99 completely rewritten to allow for bit reservoir control,\n     *  mid/side channels with L/R or mid/side masking thresholds,\n     *  and chooses best quantization instead of last quantization when\n     *  no distortion free quantization can be found.\n     *\n     *  added VBR support mt 5/99\n     *\n     *  some code shuffle rh 9/00\n     * 
\n *\n * @param l3_xmin\n * allowed distortion\n * @param xrpow\n * coloured magnitudes of spectral\n * @param targ_bits\n * maximum allowed bits\n */\n this.outer_loop = function (gfp, cod_info, l3_xmin, xrpow, ch, targ_bits) {\n var gfc = gfp.internal_flags;\n var cod_info_w = new GrInfo();\n var save_xrpow = new_float(576);\n var distort = new_float(L3Side.SFBMAX);\n var best_noise_info = new CalcNoiseResult();\n var better;\n var prev_noise = new CalcNoiseData();\n var best_part2_3_length = 9999999;\n var bEndOfSearch = false;\n var bRefine = false;\n var best_ggain_pass1 = 0;\n\n bin_search_StepSize(gfc, cod_info, targ_bits, ch, xrpow);\n\n if (0 == gfc.noise_shaping)\n /* fast mode, no noise shaping, we are ready */\n return 100;\n /* default noise_info.over_count */\n\n /* compute the distortion in this quantization */\n /* coefficients and thresholds both l/r (or both mid/side) */\n qupvt.calc_noise(cod_info, l3_xmin, distort, best_noise_info,\n prev_noise);\n best_noise_info.bits = cod_info.part2_3_length;\n\n cod_info_w.assign(cod_info);\n var age = 0;\n System.arraycopy(xrpow, 0, save_xrpow, 0, 576);\n\n while (!bEndOfSearch) {\n /* BEGIN MAIN LOOP */\n do {\n var noise_info = new CalcNoiseResult();\n var search_limit;\n var maxggain = 255;\n\n /*\n * When quantization with no distorted bands is found, allow up\n * to X new unsuccesful tries in serial. This gives us more\n * possibilities for different quant_compare modes. Much more\n * than 3 makes not a big difference, it is only slower.\n */\n\n if ((gfc.substep_shaping & 2) != 0) {\n search_limit = 20;\n } else {\n search_limit = 3;\n }\n\n /*\n * Check if the last scalefactor band is distorted. in VBR mode\n * we can't get rid of the distortion, so quit now and VBR mode\n * will try again with more bits. (makes a 10% speed increase,\n * the files I tested were binary identical, 2000/05/20 Robert\n * Hegemann) distort[] > 1 means noise > allowed noise\n */\n if (gfc.sfb21_extra) {\n if (distort[cod_info_w.sfbmax] > 1.0)\n break;\n if (cod_info_w.block_type == Encoder.SHORT_TYPE\n && (distort[cod_info_w.sfbmax + 1] > 1.0 || distort[cod_info_w.sfbmax + 2] > 1.0))\n break;\n }\n\n /* try a new scalefactor conbination on cod_info_w */\n if (!balance_noise(gfp, cod_info_w, distort, xrpow, bRefine))\n break;\n if (cod_info_w.scalefac_scale != 0)\n maxggain = 254;\n\n /*\n * inner_loop starts with the initial quantization step computed\n * above and slowly increases until the bits < huff_bits. Thus\n * it is important not to start with too large of an inital\n * quantization step. Too small is ok, but inner_loop will take\n * longer\n */\n var huff_bits = targ_bits - cod_info_w.part2_length;\n if (huff_bits <= 0)\n break;\n\n /*\n * increase quantizer stepsize until needed bits are below\n * maximum\n */\n while ((cod_info_w.part2_3_length = tk.count_bits(gfc, xrpow,\n cod_info_w, prev_noise)) > huff_bits\n && cod_info_w.global_gain <= maxggain)\n cod_info_w.global_gain++;\n\n if (cod_info_w.global_gain > maxggain)\n break;\n\n if (best_noise_info.over_count == 0) {\n\n while ((cod_info_w.part2_3_length = tk.count_bits(gfc,\n xrpow, cod_info_w, prev_noise)) > best_part2_3_length\n && cod_info_w.global_gain <= maxggain)\n cod_info_w.global_gain++;\n\n if (cod_info_w.global_gain > maxggain)\n break;\n }\n\n /* compute the distortion in this quantization */\n qupvt.calc_noise(cod_info_w, l3_xmin, distort, noise_info,\n prev_noise);\n noise_info.bits = cod_info_w.part2_3_length;\n\n /*\n * check if this quantization is better than our saved\n * quantization\n */\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type\n better = gfp.quant_comp;\n } else\n better = gfp.quant_comp_short;\n\n better = quant_compare(better, best_noise_info, noise_info,\n cod_info_w, distort) ? 1 : 0;\n\n /* save data so we can restore this quantization later */\n if (better != 0) {\n best_part2_3_length = cod_info.part2_3_length;\n best_noise_info = noise_info;\n cod_info.assign(cod_info_w);\n age = 0;\n /* save data so we can restore this quantization later */\n /* store for later reuse */\n System.arraycopy(xrpow, 0, save_xrpow, 0, 576);\n } else {\n /* early stop? */\n if (gfc.full_outer_loop == 0) {\n if (++age > search_limit\n && best_noise_info.over_count == 0)\n break;\n if ((gfc.noise_shaping_amp == 3) && bRefine && age > 30)\n break;\n if ((gfc.noise_shaping_amp == 3)\n && bRefine\n && (cod_info_w.global_gain - best_ggain_pass1) > 15)\n break;\n }\n }\n } while ((cod_info_w.global_gain + cod_info_w.scalefac_scale) < 255);\n\n if (gfc.noise_shaping_amp == 3) {\n if (!bRefine) {\n /* refine search */\n cod_info_w.assign(cod_info);\n System.arraycopy(save_xrpow, 0, xrpow, 0, 576);\n age = 0;\n best_ggain_pass1 = cod_info_w.global_gain;\n\n bRefine = true;\n } else {\n /* search already refined, stop */\n bEndOfSearch = true;\n }\n\n } else {\n bEndOfSearch = true;\n }\n }\n\n assert((cod_info.global_gain + cod_info.scalefac_scale) <= 255);\n /*\n * finish up\n */\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n /* restore for reuse on next try */\n System.arraycopy(save_xrpow, 0, xrpow, 0, 576);\n /*\n * do the 'substep shaping'\n */\n else if ((gfc.substep_shaping & 1) != 0)\n trancate_smallspectrums(gfc, cod_info, l3_xmin, xrpow);\n\n return best_noise_info.over_count;\n }\n\n /**\n * Robert Hegemann 2000-09-06\n *\n * update reservoir status after FINAL quantization/bitrate\n */\n this.iteration_finish_one = function (gfc, gr, ch) {\n var l3_side = gfc.l3_side;\n var cod_info = l3_side.tt[gr][ch];\n\n /*\n * try some better scalefac storage\n */\n tk.best_scalefac_store(gfc, gr, ch, l3_side);\n\n /*\n * best huffman_divide may save some bits too\n */\n if (gfc.use_best_huffman == 1)\n tk.best_huffman_divide(gfc, cod_info);\n\n /*\n * update reservoir status after FINAL quantization/bitrate\n */\n rv.ResvAdjust(gfc, cod_info);\n };\n\n /**\n *\n * 2000-09-04 Robert Hegemann\n *\n * @param l3_xmin\n * allowed distortion of the scalefactor\n * @param xrpow\n * coloured magnitudes of spectral values\n */\n this.VBR_encode_granule = function (gfp, cod_info, l3_xmin, xrpow, ch, min_bits, max_bits) {\n var gfc = gfp.internal_flags;\n var bst_cod_info = new GrInfo();\n var bst_xrpow = new_float(576);\n var Max_bits = max_bits;\n var real_bits = max_bits + 1;\n var this_bits = (max_bits + min_bits) / 2;\n var dbits, over, found = 0;\n var sfb21_extra = gfc.sfb21_extra;\n\n assert(Max_bits <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n Arrays.fill(bst_cod_info.l3_enc, 0);\n\n /*\n * search within round about 40 bits of optimal\n */\n do {\n assert(this_bits >= min_bits);\n assert(this_bits <= max_bits);\n assert(min_bits <= max_bits);\n\n if (this_bits > Max_bits - 42)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = sfb21_extra;\n\n over = outer_loop(gfp, cod_info, l3_xmin, xrpow, ch, this_bits);\n\n /*\n * is quantization as good as we are looking for ? in this case: is\n * no scalefactor band distorted?\n */\n if (over <= 0) {\n found = 1;\n /*\n * now we know it can be done with \"real_bits\" and maybe we can\n * skip some iterations\n */\n real_bits = cod_info.part2_3_length;\n\n /*\n * store best quantization so far\n */\n bst_cod_info.assign(cod_info);\n System.arraycopy(xrpow, 0, bst_xrpow, 0, 576);\n\n /*\n * try with fewer bits\n */\n max_bits = real_bits - 32;\n dbits = max_bits - min_bits;\n this_bits = (max_bits + min_bits) / 2;\n } else {\n /*\n * try with more bits\n */\n min_bits = this_bits + 32;\n dbits = max_bits - min_bits;\n this_bits = (max_bits + min_bits) / 2;\n\n if (found != 0) {\n found = 2;\n /*\n * start again with best quantization so far\n */\n cod_info.assign(bst_cod_info);\n System.arraycopy(bst_xrpow, 0, xrpow, 0, 576);\n }\n }\n } while (dbits > 12);\n\n gfc.sfb21_extra = sfb21_extra;\n\n /*\n * found=0 => nothing found, use last one found=1 => we just found the\n * best and left the loop found=2 => we restored a good one and have now\n * l3_enc to restore too\n */\n if (found == 2) {\n System.arraycopy(bst_cod_info.l3_enc, 0, cod_info.l3_enc, 0, 576);\n }\n assert(cod_info.part2_3_length <= Max_bits);\n }\n\n /**\n * Robert Hegemann 2000-09-05\n *\n * calculates * how many bits are available for analog silent granules * how\n * many bits to use for the lowest allowed bitrate * how many bits each\n * bitrate would provide\n */\n this.get_framebits = function (gfp, frameBits) {\n var gfc = gfp.internal_flags;\n\n /*\n * always use at least this many bits per granule per channel unless we\n * detect analog silence, see below\n */\n gfc.bitrate_index = gfc.VBR_min_bitrate;\n var bitsPerFrame = bs.getframebits(gfp);\n\n /*\n * bits for analog silence\n */\n gfc.bitrate_index = 1;\n bitsPerFrame = bs.getframebits(gfp);\n\n for (var i = 1; i <= gfc.VBR_max_bitrate; i++) {\n gfc.bitrate_index = i;\n var mb = new MeanBits(bitsPerFrame);\n frameBits[i] = rv.ResvFrameBegin(gfp, mb);\n bitsPerFrame = mb.bits;\n }\n };\n\n /* RH: this one needs to be overhauled sometime */\n\n /**\n *
\n     *  2000-09-04 Robert Hegemann\n     *\n     *  * converts LR to MS coding when necessary\n     *  * calculates allowed/adjusted quantization noise amounts\n     *  * detects analog silent frames\n     *\n     *  some remarks:\n     *  - lower masking depending on Quality setting\n     *  - quality control together with adjusted ATH MDCT scaling\n     *    on lower quality setting allocate more noise from\n     *    ATH masking, and on higher quality setting allocate\n     *    less noise from ATH masking.\n     *  - experiments show that going more than 2dB over GPSYCHO's\n     *    limits ends up in very annoying artefacts\n     * 
\n */\n this.VBR_old_prepare = function (gfp, pe, ms_ener_ratio, ratio, l3_xmin, frameBits, min_bits,\n max_bits, bands) {\n var gfc = gfp.internal_flags;\n\n var masking_lower_db, adjust = 0.0;\n var analog_silence = 1;\n var bits = 0;\n\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n var avg = rv.ResvFrameBegin(gfp, new MeanBits(0)) / gfc.mode_gr;\n\n get_framebits(gfp, frameBits);\n\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n var mxb = qupvt.on_pe(gfp, pe, max_bits[gr], avg, gr, 0);\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n ms_convert(gfc.l3_side, gr);\n qupvt.reduce_side(max_bits[gr], ms_ener_ratio[gr], avg, mxb);\n }\n for (var ch = 0; ch < gfc.channels_out; ++ch) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type\n adjust = 1.28 / (1 + Math\n .exp(3.5 - pe[gr][ch] / 300.)) - 0.05;\n masking_lower_db = gfc.PSY.mask_adjust - adjust;\n } else {\n adjust = 2.56 / (1 + Math\n .exp(3.5 - pe[gr][ch] / 300.)) - 0.14;\n masking_lower_db = gfc.PSY.mask_adjust_short - adjust;\n }\n gfc.masking_lower = Math.pow(10.0,\n masking_lower_db * 0.1);\n\n init_outer_loop(gfc, cod_info);\n bands[gr][ch] = qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n l3_xmin[gr][ch]);\n if (bands[gr][ch] != 0)\n analog_silence = 0;\n\n min_bits[gr][ch] = 126;\n\n bits += max_bits[gr][ch];\n }\n }\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n if (bits > frameBits[gfc.VBR_max_bitrate]) {\n max_bits[gr][ch] *= frameBits[gfc.VBR_max_bitrate];\n max_bits[gr][ch] /= bits;\n }\n if (min_bits[gr][ch] > max_bits[gr][ch])\n min_bits[gr][ch] = max_bits[gr][ch];\n\n }\n /* for ch */\n }\n /* for gr */\n\n return analog_silence;\n };\n\n this.bitpressure_strategy = function (gfc, l3_xmin, min_bits, max_bits) {\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var gi = gfc.l3_side.tt[gr][ch];\n var pxmin = l3_xmin[gr][ch];\n var pxminPos = 0;\n for (var sfb = 0; sfb < gi.psy_lmax; sfb++)\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_l / Encoder.SBMAX_l;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n for (var sfb = gi.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n }\n }\n max_bits[gr][ch] = 0 | Math.max(min_bits[gr][ch],\n 0.9 * max_bits[gr][ch]);\n }\n }\n };\n\n this.VBR_new_prepare = function (gfp, pe, ratio, l3_xmin, frameBits, max_bits) {\n var gfc = gfp.internal_flags;\n\n var analog_silence = 1;\n var avg = 0, bits = 0;\n var maximum_framebits;\n\n if (!gfp.free_format) {\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n\n var mb = new MeanBits(avg);\n rv.ResvFrameBegin(gfp, mb);\n avg = mb.bits;\n\n get_framebits(gfp, frameBits);\n maximum_framebits = frameBits[gfc.VBR_max_bitrate];\n } else {\n gfc.bitrate_index = 0;\n var mb = new MeanBits(avg);\n maximum_framebits = rv.ResvFrameBegin(gfp, mb);\n avg = mb.bits;\n frameBits[0] = maximum_framebits;\n }\n\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n qupvt.on_pe(gfp, pe, max_bits[gr], avg, gr, 0);\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n ms_convert(gfc.l3_side, gr);\n }\n for (var ch = 0; ch < gfc.channels_out; ++ch) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n\n gfc.masking_lower = Math.pow(10.0,\n gfc.PSY.mask_adjust * 0.1);\n\n init_outer_loop(gfc, cod_info);\n if (0 != qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n l3_xmin[gr][ch]))\n analog_silence = 0;\n\n bits += max_bits[gr][ch];\n }\n }\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n if (bits > maximum_framebits) {\n max_bits[gr][ch] *= maximum_framebits;\n max_bits[gr][ch] /= bits;\n }\n\n }\n /* for ch */\n }\n /* for gr */\n\n return analog_silence;\n };\n\n /**\n * calculates target bits for ABR encoding\n *\n * mt 2000/05/31\n */\n this.calc_target_bits = function (gfp, pe, ms_ener_ratio, targ_bits, analog_silence_bits, max_frame_bits) {\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n var res_factor;\n var gr, ch, totbits, mean_bits = 0;\n\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n var mb = new MeanBits(mean_bits);\n max_frame_bits[0] = rv.ResvFrameBegin(gfp, mb);\n mean_bits = mb.bits;\n\n gfc.bitrate_index = 1;\n mean_bits = bs.getframebits(gfp) - gfc.sideinfo_len * 8;\n analog_silence_bits[0] = mean_bits / (gfc.mode_gr * gfc.channels_out);\n\n mean_bits = gfp.VBR_mean_bitrate_kbps * gfp.framesize * 1000;\n if ((gfc.substep_shaping & 1) != 0)\n mean_bits *= 1.09;\n mean_bits /= gfp.out_samplerate;\n mean_bits -= gfc.sideinfo_len * 8;\n mean_bits /= (gfc.mode_gr * gfc.channels_out);\n\n /**\n *
\n         *           res_factor is the percentage of the target bitrate that should\n         *           be used on average.  the remaining bits are added to the\n         *           bitreservoir and used for difficult to encode frames.\n         *\n         *           Since we are tracking the average bitrate, we should adjust\n         *           res_factor \"on the fly\", increasing it if the average bitrate\n         *           is greater than the requested bitrate, and decreasing it\n         *           otherwise.  Reasonable ranges are from .9 to 1.0\n         *\n         *           Until we get the above suggestion working, we use the following\n         *           tuning:\n         *           compression ratio    res_factor\n         *           5.5  (256kbps)         1.0      no need for bitreservoir\n         *           11   (128kbps)         .93      7% held for reservoir\n         *\n         *           with linear interpolation for other values.\n         * 
\n */\n res_factor = .93 + .07 * (11.0 - gfp.compression_ratio)\n / (11.0 - 5.5);\n if (res_factor < .90)\n res_factor = .90;\n if (res_factor > 1.00)\n res_factor = 1.00;\n\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n var sum = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n targ_bits[gr][ch] = (int)(res_factor * mean_bits);\n\n if (pe[gr][ch] > 700) {\n var add_bits = (int)((pe[gr][ch] - 700) / 1.4);\n\n var cod_info = l3_side.tt[gr][ch];\n targ_bits[gr][ch] = (int)(res_factor * mean_bits);\n\n /* short blocks use a little extra, no matter what the pe */\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n if (add_bits < mean_bits / 2)\n add_bits = mean_bits / 2;\n }\n /* at most increase bits by 1.5*average */\n if (add_bits > mean_bits * 3 / 2)\n add_bits = mean_bits * 3 / 2;\n else if (add_bits < 0)\n add_bits = 0;\n\n targ_bits[gr][ch] += add_bits;\n }\n if (targ_bits[gr][ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL) {\n targ_bits[gr][ch] = LameInternalFlags.MAX_BITS_PER_CHANNEL;\n }\n sum += targ_bits[gr][ch];\n }\n /* for ch */\n if (sum > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[gr][ch] *= LameInternalFlags.MAX_BITS_PER_GRANULE;\n targ_bits[gr][ch] /= sum;\n }\n }\n }\n /* for gr */\n\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR)\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n qupvt.reduce_side(targ_bits[gr], ms_ener_ratio[gr], mean_bits\n * gfc.channels_out,\n LameInternalFlags.MAX_BITS_PER_GRANULE);\n }\n\n /*\n * sum target bits\n */\n totbits = 0;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n if (targ_bits[gr][ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL)\n targ_bits[gr][ch] = LameInternalFlags.MAX_BITS_PER_CHANNEL;\n totbits += targ_bits[gr][ch];\n }\n }\n\n /*\n * repartion target bits if needed\n */\n if (totbits > max_frame_bits[0]) {\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n targ_bits[gr][ch] *= max_frame_bits[0];\n targ_bits[gr][ch] /= totbits;\n }\n }\n }\n }\n\n}\n\nmodule.exports = Quantize;\n","/*\n * bit reservoir source file\n *\n * Copyright (c) 1999-2000 Mark Taylor\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Reservoir.java,v 1.9 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n/**\n * ResvFrameBegin:
\n * Called (repeatedly) at the beginning of a frame. Updates the maximum size of\n * the reservoir, and checks to make sure main_data_begin was set properly by\n * the formatter
\n * Background information:\n * \n * This is the original text from the ISO standard. Because of sooo many bugs\n * and irritations correcting comments are added in brackets []. A '^W' means\n * you should remove the last word.\n * \n *
\n *  1. The following rule can be used to calculate the maximum\n *     number of bits used for one granule [^W frame]:
\n * At the highest possible bitrate of Layer III (320 kbps\n * per stereo signal [^W^W^W], 48 kHz) the frames must be of\n * [^W^W^W are designed to have] constant length, i.e.\n * one buffer [^W^W the frame] length is:
\n * \n * 320 kbps * 1152/48 kHz = 7680 bit = 960 byte\n * \n * This value is used as the maximum buffer per channel [^W^W] at\n * lower bitrates [than 320 kbps]. At 64 kbps mono or 128 kbps\n * stereo the main granule length is 64 kbps * 576/48 kHz = 768 bit\n * [per granule and channel] at 48 kHz sampling frequency.\n * This means that there is a maximum deviation (short time buffer\n * [= reservoir]) of 7680 - 2*2*768 = 4608 bits is allowed at 64 kbps.\n * The actual deviation is equal to the number of bytes [with the\n * meaning of octets] denoted by the main_data_end offset pointer.\n * The actual maximum deviation is (2^9-1)*8 bit = 4088 bits\n * [for MPEG-1 and (2^8-1)*8 bit for MPEG-2, both are hard limits].\n * ... The xchange of buffer bits between the left and right channel\n * is allowed without restrictions [exception: dual channel].\n * Because of the [constructed] constraint on the buffer size\n * main_data_end is always set to 0 in the case of bit_rate_index==14,\n * i.e. data rate 320 kbps per stereo signal [^W^W^W]. In this case\n * all data are allocated between adjacent header [^W sync] words\n * [, i.e. there is no buffering at all].\n *
\n */\n\nvar common = require('./common.js');\nvar assert = common.assert;\n\nfunction Reservoir() {\n\tvar bs;\n\n\tthis.setModules = function(_bs) {\n\t\tbs = _bs;\n\t}\n\n\tthis.ResvFrameBegin = function(gfp, mean_bits) {\n\t\tvar gfc = gfp.internal_flags;\n\t\tvar maxmp3buf;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tvar frameLength = bs.getframebits(gfp);\n\t\tmean_bits.bits = (frameLength - gfc.sideinfo_len * 8) / gfc.mode_gr;\n\n\t\t/**\n\t\t *
\n\t\t *  Meaning of the variables:\n\t\t *      resvLimit: (0, 8, ..., 8*255 (MPEG-2), 8*511 (MPEG-1))\n\t\t *          Number of bits can be stored in previous frame(s) due to\n\t\t *          counter size constaints\n\t\t *      maxmp3buf: ( ??? ... 8*1951 (MPEG-1 and 2), 8*2047 (MPEG-2.5))\n\t\t *          Number of bits allowed to encode one frame (you can take 8*511 bit\n\t\t *          from the bit reservoir and at most 8*1440 bit from the current\n\t\t *          frame (320 kbps, 32 kHz), so 8*1951 bit is the largest possible\n\t\t *          value for MPEG-1 and -2)\n\t\t * \n\t\t *          maximum allowed granule/channel size times 4 = 8*2047 bits.,\n\t\t *          so this is the absolute maximum supported by the format.\n\t\t * \n\t\t * \n\t\t *      fullFrameBits:  maximum number of bits available for encoding\n\t\t *                      the current frame.\n\t\t * \n\t\t *      mean_bits:      target number of bits per granule.\n\t\t * \n\t\t *      frameLength:\n\t\t * \n\t\t *      gfc.ResvMax:   maximum allowed reservoir\n\t\t * \n\t\t *      gfc.ResvSize:  current reservoir size\n\t\t * \n\t\t *      l3_side.resvDrain_pre:\n\t\t *         ancillary data to be added to previous frame:\n\t\t *         (only usefull in VBR modes if it is possible to have\n\t\t *         maxmp3buf < fullFrameBits)).  Currently disabled,\n\t\t *         see #define NEW_DRAIN\n\t\t *         2010-02-13: RH now enabled, it seems to be needed for CBR too,\n\t\t *                     as there exists one example, where the FhG decoder\n\t\t *                     can't decode a -b320 CBR file anymore.\n\t\t * \n\t\t *      l3_side.resvDrain_post:\n\t\t *         ancillary data to be added to this frame:\n\t\t * \n\t\t * 
\n\t\t */\n\n\t\t/* main_data_begin has 9 bits in MPEG-1, 8 bits MPEG-2 */\n\t\tvar resvLimit = (8 * 256) * gfc.mode_gr - 8;\n\n\t\t/*\n\t\t * maximum allowed frame size. dont use more than this number of bits,\n\t\t * even if the frame has the space for them:\n\t\t */\n\t\tif (gfp.brate > 320) {\n\t\t\t/* in freeformat the buffer is constant */\n\t\t\tmaxmp3buf = 8 * ((int) ((gfp.brate * 1000)\n\t\t\t\t\t/ (gfp.out_samplerate / 1152) / 8 + .5));\n\t\t} else {\n\t\t\t/*\n\t\t\t * all mp3 decoders should have enough buffer to handle this value:\n\t\t\t * size of a 320kbps 32kHz frame\n\t\t\t */\n\t\t\tmaxmp3buf = 8 * 1440;\n\n\t\t\t/*\n\t\t\t * Bouvigne suggests this more lax interpretation of the ISO doc\n\t\t\t * instead of using 8*960.\n\t\t\t */\n\n\t\t\tif (gfp.strict_ISO) {\n\t\t\t\tmaxmp3buf = 8 * ((int) (320000 / (gfp.out_samplerate / 1152) / 8 + .5));\n\t\t\t}\n\t\t}\n\n\t\tgfc.ResvMax = maxmp3buf - frameLength;\n\t\tif (gfc.ResvMax > resvLimit)\n\t\t\tgfc.ResvMax = resvLimit;\n\t\tif (gfc.ResvMax < 0 || gfp.disable_reservoir)\n\t\t\tgfc.ResvMax = 0;\n\n\t\tvar fullFrameBits = mean_bits.bits * gfc.mode_gr\n\t\t\t\t+ Math.min(gfc.ResvSize, gfc.ResvMax);\n\n\t\tif (fullFrameBits > maxmp3buf)\n\t\t\tfullFrameBits = maxmp3buf;\n\n\t\tassert (0 == gfc.ResvMax % 8);\n\t\tassert (gfc.ResvMax >= 0);\n\n\t\tl3_side.resvDrain_pre = 0;\n\n\t\t// frame analyzer code\n\t\tif (gfc.pinfo != null) {\n\t\t\t/*\n\t\t\t * expected bits per channel per granule [is this also right for\n\t\t\t * mono/stereo, MPEG-1/2 ?]\n\t\t\t */\n\t\t\tgfc.pinfo.mean_bits = mean_bits.bits / 2;\n\t\t\tgfc.pinfo.resvsize = gfc.ResvSize;\n\t\t}\n\n\t\treturn fullFrameBits;\n\t}\n\n\t/**\n\t * returns targ_bits: target number of bits to use for 1 granule
\n\t * extra_bits: amount extra available from reservoir
\n\t * Mark Taylor 4/99\n\t */\n\tthis.ResvMaxBits = function(gfp, mean_bits, targ_bits, cbr) {\n\t\tvar gfc = gfp.internal_flags;\n\t\tvar add_bits;\n var ResvSize = gfc.ResvSize, ResvMax = gfc.ResvMax;\n\n\t\t/* compensate the saved bits used in the 1st granule */\n\t\tif (cbr != 0)\n\t\t\tResvSize += mean_bits;\n\n\t\tif ((gfc.substep_shaping & 1) != 0)\n\t\t\tResvMax *= 0.9;\n\n\t\ttarg_bits.bits = mean_bits;\n\n\t\t/* extra bits if the reservoir is almost full */\n\t\tif (ResvSize * 10 > ResvMax * 9) {\n\t\t\tadd_bits = ResvSize - (ResvMax * 9) / 10;\n\t\t\ttarg_bits.bits += add_bits;\n\t\t\tgfc.substep_shaping |= 0x80;\n\t\t} else {\n\t\t\tadd_bits = 0;\n\t\t\tgfc.substep_shaping &= 0x7f;\n\t\t\t/*\n\t\t\t * build up reservoir. this builds the reservoir a little slower\n\t\t\t * than FhG. It could simple be mean_bits/15, but this was rigged to\n\t\t\t * always produce 100 (the old value) at 128kbs\n\t\t\t */\n\t\t\tif (!gfp.disable_reservoir && 0 == (gfc.substep_shaping & 1))\n\t\t\t\ttarg_bits.bits -= .1 * mean_bits;\n\t\t}\n\n\t\t/* amount from the reservoir we are allowed to use. ISO says 6/10 */\n\t\tvar extra_bits = (ResvSize < (gfc.ResvMax * 6) / 10 ? ResvSize\n\t\t\t\t: (gfc.ResvMax * 6) / 10);\n\t\textra_bits -= add_bits;\n\n\t\tif (extra_bits < 0)\n\t\t\textra_bits = 0;\n\t\treturn extra_bits;\n\t}\n\n\t/**\n\t * Called after a granule's bit allocation. Readjusts the size of the\n\t * reservoir to reflect the granule's usage.\n\t */\n\tthis.ResvAdjust = function(gfc, gi) {\n\t\tgfc.ResvSize -= gi.part2_3_length + gi.part2_length;\n\t}\n\n\t/**\n\t * Called after all granules in a frame have been allocated. Makes sure that\n\t * the reservoir size is within limits, possibly by adding stuffing bits.\n\t */\n\tthis.ResvFrameEnd = function(gfc, mean_bits) {\n\t\tvar over_bits;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tgfc.ResvSize += mean_bits * gfc.mode_gr;\n\t\tvar stuffingBits = 0;\n\t\tl3_side.resvDrain_post = 0;\n\t\tl3_side.resvDrain_pre = 0;\n\n\t\t/* we must be byte aligned */\n\t\tif ((over_bits = gfc.ResvSize % 8) != 0)\n\t\t\tstuffingBits += over_bits;\n\n\t\tover_bits = (gfc.ResvSize - stuffingBits) - gfc.ResvMax;\n\t\tif (over_bits > 0) {\n\t\t\tassert (0 == over_bits % 8);\n\t\t\tassert (over_bits >= 0);\n\t\t\tstuffingBits += over_bits;\n\t\t}\n\n\t\t/*\n\t\t * NOTE: enabling the NEW_DRAIN code fixes some problems with FhG\n\t\t * decoder shipped with MS Windows operating systems. Using this, it is\n\t\t * even possible to use Gabriel's lax buffer consideration again, which\n\t\t * assumes, any decoder should have a buffer large enough for a 320 kbps\n\t\t * frame at 32 kHz sample rate.\n\t\t * \n\t\t * old drain code: lame -b320 BlackBird.wav --. does not play with\n\t\t * GraphEdit.exe using FhG decoder V1.5 Build 50\n\t\t * \n\t\t * new drain code: lame -b320 BlackBird.wav --. plays fine with\n\t\t * GraphEdit.exe using FhG decoder V1.5 Build 50\n\t\t * \n\t\t * Robert Hegemann, 2010-02-13.\n\t\t */\n\t\t/*\n\t\t * drain as many bits as possible into previous frame ancillary data In\n\t\t * particular, in VBR mode ResvMax may have changed, and we have to make\n\t\t * sure main_data_begin does not create a reservoir bigger than ResvMax\n\t\t * mt 4/00\n\t\t */\n\t\t{\n\t\t\tvar mdb_bytes = Math.min(l3_side.main_data_begin * 8, stuffingBits) / 8;\n\t\t\tl3_side.resvDrain_pre += 8 * mdb_bytes;\n\t\t\tstuffingBits -= 8 * mdb_bytes;\n\t\t\tgfc.ResvSize -= 8 * mdb_bytes;\n\t\t\tl3_side.main_data_begin -= mdb_bytes;\n\t\t}\n\t\t/* drain the rest into this frames ancillary data */\n\t\tl3_side.resvDrain_post += stuffingBits;\n\t\tgfc.ResvSize -= stuffingBits;\n\t}\n}\n\nmodule.exports = Reservoir;\n","function Version() {\n\n /**\n * URL for the LAME website.\n */\n var LAME_URL = \"http://www.mp3dev.org/\";\n\n /**\n * Major version number.\n */\n var LAME_MAJOR_VERSION = 3;\n /**\n * Minor version number.\n */\n var LAME_MINOR_VERSION = 98;\n /**\n * Patch level.\n */\n var LAME_PATCH_VERSION = 4;\n\n /**\n * Major version number.\n */\n var PSY_MAJOR_VERSION = 0;\n /**\n * Minor version number.\n */\n var PSY_MINOR_VERSION = 93;\n\n /**\n * A string which describes the version of LAME.\n *\n * @return string which describes the version of LAME\n */\n this.getLameVersion = function () {\n // primary to write screen reports\n return (LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \".\" + LAME_PATCH_VERSION);\n }\n\n /**\n * The short version of the LAME version string.\n *\n * @return short version of the LAME version string\n */\n this.getLameShortVersion = function () {\n // Adding date and time to version string makes it harder for output\n // validation\n return (LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \".\" + LAME_PATCH_VERSION);\n }\n\n /**\n * The shortest version of the LAME version string.\n *\n * @return shortest version of the LAME version string\n */\n this.getLameVeryShortVersion = function () {\n // Adding date and time to version string makes it harder for output\n return (\"LAME\" + LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \"r\");\n }\n\n /**\n * String which describes the version of GPSYCHO\n *\n * @return string which describes the version of GPSYCHO\n */\n this.getPsyVersion = function () {\n return (PSY_MAJOR_VERSION + \".\" + PSY_MINOR_VERSION);\n }\n\n /**\n * String which is a URL for the LAME website.\n *\n * @return string which is a URL for the LAME website\n */\n this.getLameUrl = function () {\n return LAME_URL;\n }\n\n /**\n * Quite useless for a java version, however we are compatible ;-)\n *\n * @return \"32bits\"\n */\n this.getLameOsBitness = function () {\n return \"32bits\";\n }\n\n}\n\nmodule.exports = Version;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * A Vbr header may be present in the ancillary data field of the first frame of\n * an mp3 bitstream
\n * The Vbr header (optionally) contains\n *
    \n *
  • frames total number of audio frames in the bitstream\n *
  • bytes total number of bytes in the bitstream\n *
  • toc table of contents\n *
\n *\n * toc (table of contents) gives seek points for random access.
\n * The ith entry determines the seek point for i-percent duration.
\n * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes
\n * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes\n */\nVBRTag.NUMTOCENTRIES = 100;\nVBRTag.MAXFRAMESIZE = 2880;\n\nfunction VBRTag() {\n\n var lame;\n var bs;\n var v;\n\n this.setModules = function (_lame, _bs, _v) {\n lame = _lame;\n bs = _bs;\n v = _v;\n };\n\n var FRAMES_FLAG = 0x0001;\n var BYTES_FLAG = 0x0002;\n var TOC_FLAG = 0x0004;\n var VBR_SCALE_FLAG = 0x0008;\n\n var NUMTOCENTRIES = VBRTag.NUMTOCENTRIES;\n\n /**\n * (0xB40) the max freeformat 640 32kHz framesize.\n */\n var MAXFRAMESIZE = VBRTag.MAXFRAMESIZE;\n\n /**\n *
\n     *    4 bytes for Header Tag\n     *    4 bytes for Header Flags\n     *  100 bytes for entry (toc)\n     *    4 bytes for frame size\n     *    4 bytes for stream size\n     *    4 bytes for VBR scale. a VBR quality indicator: 0=best 100=worst\n     *   20 bytes for LAME tag.  for example, \"LAME3.12 (beta 6)\"\n     * ___________\n     *  140 bytes\n     * 
\n */\n var VBRHEADERSIZE = (NUMTOCENTRIES + 4 + 4 + 4 + 4 + 4);\n\n var LAMEHEADERSIZE = (VBRHEADERSIZE + 9 + 1 + 1 + 8\n + 1 + 1 + 3 + 1 + 1 + 2 + 4 + 2 + 2);\n\n /**\n * The size of the Xing header MPEG-1, bit rate in kbps.\n */\n var XING_BITRATE1 = 128;\n /**\n * The size of the Xing header MPEG-2, bit rate in kbps.\n */\n var XING_BITRATE2 = 64;\n /**\n * The size of the Xing header MPEG-2.5, bit rate in kbps.\n */\n var XING_BITRATE25 = 32;\n\n /**\n * ISO-8859-1 charset for byte to string operations.\n */\n var ISO_8859_1 = null; //Charset.forName(\"ISO-8859-1\");\n\n /**\n * VBR header magic string.\n */\n var VBRTag0 = \"Xing\";\n /**\n * VBR header magic string (VBR == VBRMode.vbr_off).\n */\n var VBRTag1 = \"Info\";\n\n /**\n * Lookup table for fast CRC-16 computation. Uses the polynomial\n * x^16+x^15+x^2+1\n */\n var crc16Lookup = [0x0000, 0xC0C1, 0xC181, 0x0140,\n 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741,\n 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41,\n 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, 0xCB81, 0x0B40,\n 0xC901, 0x09C0, 0x0880, 0xC841, 0xD801, 0x18C0, 0x1980, 0xD941,\n 0x1B00, 0xDBC1, 0xDA81, 0x1A40, 0x1E00, 0xDEC1, 0xDF81, 0x1F40,\n 0xDD01, 0x1DC0, 0x1C80, 0xDC41, 0x1400, 0xD4C1, 0xD581, 0x1540,\n 0xD701, 0x17C0, 0x1680, 0xD641, 0xD201, 0x12C0, 0x1380, 0xD341,\n 0x1100, 0xD1C1, 0xD081, 0x1040, 0xF001, 0x30C0, 0x3180, 0xF141,\n 0x3300, 0xF3C1, 0xF281, 0x3240, 0x3600, 0xF6C1, 0xF781, 0x3740,\n 0xF501, 0x35C0, 0x3480, 0xF441, 0x3C00, 0xFCC1, 0xFD81, 0x3D40,\n 0xFF01, 0x3FC0, 0x3E80, 0xFE41, 0xFA01, 0x3AC0, 0x3B80, 0xFB41,\n 0x3900, 0xF9C1, 0xF881, 0x3840, 0x2800, 0xE8C1, 0xE981, 0x2940,\n 0xEB01, 0x2BC0, 0x2A80, 0xEA41, 0xEE01, 0x2EC0, 0x2F80, 0xEF41,\n 0x2D00, 0xEDC1, 0xEC81, 0x2C40, 0xE401, 0x24C0, 0x2580, 0xE541,\n 0x2700, 0xE7C1, 0xE681, 0x2640, 0x2200, 0xE2C1, 0xE381, 0x2340,\n 0xE101, 0x21C0, 0x2080, 0xE041, 0xA001, 0x60C0, 0x6180, 0xA141,\n 0x6300, 0xA3C1, 0xA281, 0x6240, 0x6600, 0xA6C1, 0xA781, 0x6740,\n 0xA501, 0x65C0, 0x6480, 0xA441, 0x6C00, 0xACC1, 0xAD81, 0x6D40,\n 0xAF01, 0x6FC0, 0x6E80, 0xAE41, 0xAA01, 0x6AC0, 0x6B80, 0xAB41,\n 0x6900, 0xA9C1, 0xA881, 0x6840, 0x7800, 0xB8C1, 0xB981, 0x7940,\n 0xBB01, 0x7BC0, 0x7A80, 0xBA41, 0xBE01, 0x7EC0, 0x7F80, 0xBF41,\n 0x7D00, 0xBDC1, 0xBC81, 0x7C40, 0xB401, 0x74C0, 0x7580, 0xB541,\n 0x7700, 0xB7C1, 0xB681, 0x7640, 0x7200, 0xB2C1, 0xB381, 0x7340,\n 0xB101, 0x71C0, 0x7080, 0xB041, 0x5000, 0x90C1, 0x9181, 0x5140,\n 0x9301, 0x53C0, 0x5280, 0x9241, 0x9601, 0x56C0, 0x5780, 0x9741,\n 0x5500, 0x95C1, 0x9481, 0x5440, 0x9C01, 0x5CC0, 0x5D80, 0x9D41,\n 0x5F00, 0x9FC1, 0x9E81, 0x5E40, 0x5A00, 0x9AC1, 0x9B81, 0x5B40,\n 0x9901, 0x59C0, 0x5880, 0x9841, 0x8801, 0x48C0, 0x4980, 0x8941,\n 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 0x4E00, 0x8EC1, 0x8F81, 0x4F40,\n 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 0x4400, 0x84C1, 0x8581, 0x4540,\n 0x8701, 0x47C0, 0x4680, 0x8641, 0x8201, 0x42C0, 0x4380, 0x8341,\n 0x4100, 0x81C1, 0x8081, 0x4040];\n\n /***********************************************************************\n * Robert Hegemann 2001-01-17\n ***********************************************************************/\n\n function addVbr(v, bitrate) {\n v.nVbrNumFrames++;\n v.sum += bitrate;\n v.seen++;\n\n if (v.seen < v.want) {\n return;\n }\n\n if (v.pos < v.size) {\n v.bag[v.pos] = v.sum;\n v.pos++;\n v.seen = 0;\n }\n if (v.pos == v.size) {\n for (var i = 1; i < v.size; i += 2) {\n v.bag[i / 2] = v.bag[i];\n }\n v.want *= 2;\n v.pos /= 2;\n }\n }\n\n function xingSeekTable(v, t) {\n if (v.pos <= 0)\n return;\n\n for (var i = 1; i < NUMTOCENTRIES; ++i) {\n var j = i / NUMTOCENTRIES, act, sum;\n var indx = 0 | (Math.floor(j * v.pos));\n if (indx > v.pos - 1)\n indx = v.pos - 1;\n act = v.bag[indx];\n sum = v.sum;\n var seek_point = 0 | (256. * act / sum);\n if (seek_point > 255)\n seek_point = 255;\n t[i] = 0xff & seek_point;\n }\n }\n\n /**\n * Add VBR entry, used to fill the VBR TOC entries.\n *\n * @param gfp\n * global flags\n */\n this.addVbrFrame = function (gfp) {\n var gfc = gfp.internal_flags;\n var kbps = Tables.bitrate_table[gfp.version][gfc.bitrate_index];\n assert(gfc.VBR_seek_table.bag != null);\n addVbr(gfc.VBR_seek_table, kbps);\n }\n\n /**\n * Read big endian integer (4-bytes) from header.\n *\n * @param buf\n * header containing the integer\n * @param bufPos\n * offset into the header\n * @return extracted integer\n */\n function extractInteger(buf, bufPos) {\n var x = buf[bufPos + 0] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 1] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 2] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 3] & 0xff;\n return x;\n }\n\n /**\n * Write big endian integer (4-bytes) in the header.\n *\n * @param buf\n * header to write the integer into\n * @param bufPos\n * offset into the header\n * @param value\n * integer value to write\n */\n function createInteger(buf, bufPos, value) {\n buf[bufPos + 0] = 0xff & ((value >> 24) & 0xff);\n buf[bufPos + 1] = 0xff & ((value >> 16) & 0xff);\n buf[bufPos + 2] = 0xff & ((value >> 8) & 0xff);\n buf[bufPos + 3] = 0xff & (value & 0xff);\n }\n\n /**\n * Write big endian short (2-bytes) in the header.\n *\n * @param buf\n * header to write the integer into\n * @param bufPos\n * offset into the header\n * @param value\n * integer value to write\n */\n function createShort(buf, bufPos, value) {\n buf[bufPos + 0] = 0xff & ((value >> 8) & 0xff);\n buf[bufPos + 1] = 0xff & (value & 0xff);\n }\n\n /**\n * Check for magic strings (Xing/Info).\n *\n * @param buf\n * header to check\n * @param bufPos\n * header offset to check\n * @return magic string found\n */\n function isVbrTag(buf, bufPos) {\n return new String(buf, bufPos, VBRTag0.length(), ISO_8859_1)\n .equals(VBRTag0)\n || new String(buf, bufPos, VBRTag1.length(), ISO_8859_1)\n .equals(VBRTag1);\n }\n\n function shiftInBitsValue(x, n, v) {\n return 0xff & ((x << n) | (v & ~(-1 << n)));\n }\n\n /**\n * Construct the MP3 header using the settings of the global flags.\n *\n * \n *\n * @param gfp\n * global flags\n * @param buffer\n * header\n */\n function setLameTagFrameHeader(gfp, buffer) {\n var gfc = gfp.internal_flags;\n\n // MP3 Sync Word\n buffer[0] = shiftInBitsValue(buffer[0], 8, 0xff);\n\n buffer[1] = shiftInBitsValue(buffer[1], 3, 7);\n buffer[1] = shiftInBitsValue(buffer[1], 1,\n (gfp.out_samplerate < 16000) ? 0 : 1);\n // Version\n buffer[1] = shiftInBitsValue(buffer[1], 1, gfp.version);\n // 01 == Layer 3\n buffer[1] = shiftInBitsValue(buffer[1], 2, 4 - 3);\n // Error protection\n buffer[1] = shiftInBitsValue(buffer[1], 1, (!gfp.error_protection) ? 1\n : 0);\n\n // Bit rate\n buffer[2] = shiftInBitsValue(buffer[2], 4, gfc.bitrate_index);\n // Frequency\n buffer[2] = shiftInBitsValue(buffer[2], 2, gfc.samplerate_index);\n // Pad. Bit\n buffer[2] = shiftInBitsValue(buffer[2], 1, 0);\n // Priv. Bit\n buffer[2] = shiftInBitsValue(buffer[2], 1, gfp.extension);\n\n // Mode\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfp.mode.ordinal());\n // Mode extension (Used with Joint Stereo)\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfc.mode_ext);\n // Copy\n buffer[3] = shiftInBitsValue(buffer[3], 1, gfp.copyright);\n // Original\n buffer[3] = shiftInBitsValue(buffer[3], 1, gfp.original);\n // Emphasis\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfp.emphasis);\n\n /* the default VBR header. 48 kbps layer III, no padding, no crc */\n /* but sampling freq, mode and copyright/copy protection taken */\n /* from first valid frame */\n buffer[0] = 0xff;\n var abyte = 0xff & (buffer[1] & 0xf1);\n var bitrate;\n if (1 == gfp.version) {\n bitrate = XING_BITRATE1;\n } else {\n if (gfp.out_samplerate < 16000)\n bitrate = XING_BITRATE25;\n else\n bitrate = XING_BITRATE2;\n }\n\n if (gfp.VBR == VbrMode.vbr_off)\n bitrate = gfp.brate;\n\n var bbyte;\n if (gfp.free_format)\n bbyte = 0x00;\n else\n bbyte = 0xff & (16 * lame.BitrateIndex(bitrate, gfp.version,\n gfp.out_samplerate));\n\n /*\n * Use as much of the info from the real frames in the Xing header:\n * samplerate, channels, crc, etc...\n */\n if (gfp.version == 1) {\n /* MPEG1 */\n buffer[1] = 0xff & (abyte | 0x0a);\n /* was 0x0b; */\n abyte = 0xff & (buffer[2] & 0x0d);\n /* AF keep also private bit */\n buffer[2] = 0xff & (bbyte | abyte);\n /* 64kbs MPEG1 frame */\n } else {\n /* MPEG2 */\n buffer[1] = 0xff & (abyte | 0x02);\n /* was 0x03; */\n abyte = 0xff & (buffer[2] & 0x0d);\n /* AF keep also private bit */\n buffer[2] = 0xff & (bbyte | abyte);\n /* 64kbs MPEG2 frame */\n }\n }\n\n /**\n * Get VBR tag information\n *\n * @param buf\n * header to analyze\n * @param bufPos\n * offset into the header\n * @return VBR tag data\n */\n this.getVbrTag = function (buf) {\n var pTagData = new VBRTagData();\n var bufPos = 0;\n\n /* get Vbr header data */\n pTagData.flags = 0;\n\n /* get selected MPEG header data */\n var hId = (buf[bufPos + 1] >> 3) & 1;\n var hSrIndex = (buf[bufPos + 2] >> 2) & 3;\n var hMode = (buf[bufPos + 3] >> 6) & 3;\n var hBitrate = ((buf[bufPos + 2] >> 4) & 0xf);\n hBitrate = Tables.bitrate_table[hId][hBitrate];\n\n /* check for FFE syncword */\n if ((buf[bufPos + 1] >> 4) == 0xE)\n pTagData.samprate = Tables.samplerate_table[2][hSrIndex];\n else\n pTagData.samprate = Tables.samplerate_table[hId][hSrIndex];\n\n /* determine offset of header */\n if (hId != 0) {\n /* mpeg1 */\n if (hMode != 3)\n bufPos += (32 + 4);\n else\n bufPos += (17 + 4);\n } else {\n /* mpeg2 */\n if (hMode != 3)\n bufPos += (17 + 4);\n else\n bufPos += (9 + 4);\n }\n\n if (!isVbrTag(buf, bufPos))\n return null;\n\n bufPos += 4;\n\n pTagData.hId = hId;\n\n /* get flags */\n var head_flags = pTagData.flags = extractInteger(buf, bufPos);\n bufPos += 4;\n\n if ((head_flags & FRAMES_FLAG) != 0) {\n pTagData.frames = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n if ((head_flags & BYTES_FLAG) != 0) {\n pTagData.bytes = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n if ((head_flags & TOC_FLAG) != 0) {\n if (pTagData.toc != null) {\n for (var i = 0; i < NUMTOCENTRIES; i++)\n pTagData.toc[i] = buf[bufPos + i];\n }\n bufPos += NUMTOCENTRIES;\n }\n\n pTagData.vbrScale = -1;\n\n if ((head_flags & VBR_SCALE_FLAG) != 0) {\n pTagData.vbrScale = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n pTagData.headersize = ((hId + 1) * 72000 * hBitrate)\n / pTagData.samprate;\n\n bufPos += 21;\n var encDelay = buf[bufPos + 0] << 4;\n encDelay += buf[bufPos + 1] >> 4;\n var encPadding = (buf[bufPos + 1] & 0x0F) << 8;\n encPadding += buf[bufPos + 2] & 0xff;\n /* check for reasonable values (this may be an old Xing header, */\n /* not a INFO tag) */\n if (encDelay < 0 || encDelay > 3000)\n encDelay = -1;\n if (encPadding < 0 || encPadding > 3000)\n encPadding = -1;\n\n pTagData.encDelay = encDelay;\n pTagData.encPadding = encPadding;\n\n /* success */\n return pTagData;\n }\n\n /**\n * Initializes the header\n *\n * @param gfp\n * global flags\n */\n this.InitVbrTag = function (gfp) {\n var gfc = gfp.internal_flags;\n\n /**\n *
\n         * Xing VBR pretends to be a 48kbs layer III frame.  (at 44.1kHz).\n         * (at 48kHz they use 56kbs since 48kbs frame not big enough for\n         * table of contents)\n         * let's always embed Xing header inside a 64kbs layer III frame.\n         * this gives us enough room for a LAME version string too.\n         * size determined by sampling frequency (MPEG1)\n         * 32kHz:    216 bytes@48kbs    288bytes@ 64kbs\n         * 44.1kHz:  156 bytes          208bytes@64kbs     (+1 if padding = 1)\n         * 48kHz:    144 bytes          192\n         *\n         * MPEG 2 values are the same since the framesize and samplerate\n         * are each reduced by a factor of 2.\n         * 
\n */\n var kbps_header;\n if (1 == gfp.version) {\n kbps_header = XING_BITRATE1;\n } else {\n if (gfp.out_samplerate < 16000)\n kbps_header = XING_BITRATE25;\n else\n kbps_header = XING_BITRATE2;\n }\n\n if (gfp.VBR == VbrMode.vbr_off)\n kbps_header = gfp.brate;\n\n // make sure LAME Header fits into Frame\n var totalFrameSize = ((gfp.version + 1) * 72000 * kbps_header)\n / gfp.out_samplerate;\n var headerSize = (gfc.sideinfo_len + LAMEHEADERSIZE);\n gfc.VBR_seek_table.TotalFrameSize = totalFrameSize;\n if (totalFrameSize < headerSize || totalFrameSize > MAXFRAMESIZE) {\n /* disable tag, it wont fit */\n gfp.bWriteVbrTag = false;\n return;\n }\n\n gfc.VBR_seek_table.nVbrNumFrames = 0;\n gfc.VBR_seek_table.nBytesWritten = 0;\n gfc.VBR_seek_table.sum = 0;\n\n gfc.VBR_seek_table.seen = 0;\n gfc.VBR_seek_table.want = 1;\n gfc.VBR_seek_table.pos = 0;\n\n if (gfc.VBR_seek_table.bag == null) {\n gfc.VBR_seek_table.bag = new int[400];\n gfc.VBR_seek_table.size = 400;\n }\n\n // write dummy VBR tag of all 0's into bitstream\n var buffer = new_byte(MAXFRAMESIZE);\n\n setLameTagFrameHeader(gfp, buffer);\n var n = gfc.VBR_seek_table.TotalFrameSize;\n for (var i = 0; i < n; ++i) {\n bs.add_dummy_byte(gfp, buffer[i] & 0xff, 1);\n }\n }\n\n /**\n * Fast CRC-16 computation (uses table crc16Lookup).\n *\n * @param value\n * @param crc\n * @return\n */\n function crcUpdateLookup(value, crc) {\n var tmp = crc ^ value;\n crc = (crc >> 8) ^ crc16Lookup[tmp & 0xff];\n return crc;\n }\n\n this.updateMusicCRC = function (crc, buffer, bufferPos, size) {\n for (var i = 0; i < size; ++i)\n crc[0] = crcUpdateLookup(buffer[bufferPos + i], crc[0]);\n }\n\n /**\n * Write LAME info: mini version + info on various switches used (Jonathan\n * Dee 2001/08/31).\n *\n * @param gfp\n * global flags\n * @param musicLength\n * music length\n * @param streamBuffer\n * pointer to output buffer\n * @param streamBufferPos\n * offset into the output buffer\n * @param crc\n * computation of CRC-16 of Lame Tag so far (starting at frame\n * sync)\n * @return number of bytes written to the stream\n */\n function putLameVBR(gfp, musicLength, streamBuffer, streamBufferPos, crc) {\n var gfc = gfp.internal_flags;\n var bytesWritten = 0;\n\n /* encoder delay */\n var encDelay = gfp.encoder_delay;\n /* encoder padding */\n var encPadding = gfp.encoder_padding;\n\n /* recall: gfp.VBR_q is for example set by the switch -V */\n /* gfp.quality by -q, -h, -f, etc */\n var quality = (100 - 10 * gfp.VBR_q - gfp.quality);\n\n var version = v.getLameVeryShortVersion();\n var vbr;\n var revision = 0x00;\n var revMethod;\n // numbering different in vbr_mode vs. Lame tag\n var vbrTypeTranslator = [1, 5, 3, 2, 4, 0, 3];\n var lowpass = 0 | (((gfp.lowpassfreq / 100.0) + .5) > 255 ? 255\n : (gfp.lowpassfreq / 100.0) + .5);\n var peakSignalAmplitude = 0;\n var radioReplayGain = 0;\n var audiophileReplayGain = 0;\n var noiseShaping = gfp.internal_flags.noise_shaping;\n var stereoMode = 0;\n var nonOptimal = 0;\n var sourceFreq = 0;\n var misc = 0;\n var musicCRC = 0;\n\n // psy model type: Gpsycho or NsPsytune\n var expNPsyTune = (gfp.exp_nspsytune & 1) != 0;\n var safeJoint = (gfp.exp_nspsytune & 2) != 0;\n var noGapMore = false;\n var noGapPrevious = false;\n var noGapCount = gfp.internal_flags.nogap_total;\n var noGapCurr = gfp.internal_flags.nogap_current;\n\n // 4 bits\n var athType = gfp.ATHtype;\n var flags = 0;\n\n // vbr modes\n var abrBitrate;\n switch (gfp.VBR) {\n case vbr_abr:\n abrBitrate = gfp.VBR_mean_bitrate_kbps;\n break;\n case vbr_off:\n abrBitrate = gfp.brate;\n break;\n default:\n abrBitrate = gfp.VBR_min_bitrate_kbps;\n }\n\n // revision and vbr method\n if (gfp.VBR.ordinal() < vbrTypeTranslator.length)\n vbr = vbrTypeTranslator[gfp.VBR.ordinal()];\n else\n vbr = 0x00; // unknown\n\n revMethod = 0x10 * revision + vbr;\n\n // ReplayGain\n if (gfc.findReplayGain) {\n if (gfc.RadioGain > 0x1FE)\n gfc.RadioGain = 0x1FE;\n if (gfc.RadioGain < -0x1FE)\n gfc.RadioGain = -0x1FE;\n\n // set name code\n radioReplayGain = 0x2000;\n // set originator code to `determined automatically'\n radioReplayGain |= 0xC00;\n\n if (gfc.RadioGain >= 0) {\n // set gain adjustment\n radioReplayGain |= gfc.RadioGain;\n } else {\n // set the sign bit\n radioReplayGain |= 0x200;\n // set gain adjustment\n radioReplayGain |= -gfc.RadioGain;\n }\n }\n\n // peak sample\n if (gfc.findPeakSample)\n peakSignalAmplitude = Math\n .abs(0 | ((( gfc.PeakSample) / 32767.0) * Math.pow(2, 23) + .5));\n\n // nogap\n if (noGapCount != -1) {\n if (noGapCurr > 0)\n noGapPrevious = true;\n\n if (noGapCurr < noGapCount - 1)\n noGapMore = true;\n }\n\n // flags\n flags = athType + ((expNPsyTune ? 1 : 0) << 4)\n + ((safeJoint ? 1 : 0) << 5) + ((noGapMore ? 1 : 0) << 6)\n + ((noGapPrevious ? 1 : 0) << 7);\n\n if (quality < 0)\n quality = 0;\n\n // stereo mode field (Intensity stereo is not implemented)\n switch (gfp.mode) {\n case MONO:\n stereoMode = 0;\n break;\n case STEREO:\n stereoMode = 1;\n break;\n case DUAL_CHANNEL:\n stereoMode = 2;\n break;\n case JOINT_STEREO:\n if (gfp.force_ms)\n stereoMode = 4;\n else\n stereoMode = 3;\n break;\n case NOT_SET:\n //$FALL-THROUGH$\n default:\n stereoMode = 7;\n break;\n }\n\n if (gfp.in_samplerate <= 32000)\n sourceFreq = 0x00;\n else if (gfp.in_samplerate == 48000)\n sourceFreq = 0x02;\n else if (gfp.in_samplerate > 48000)\n sourceFreq = 0x03;\n else {\n // default is 44100Hz\n sourceFreq = 0x01;\n }\n\n // Check if the user overrided the default LAME behavior with some\n // nasty options\n if (gfp.short_blocks == ShortBlock.short_block_forced\n || gfp.short_blocks == ShortBlock.short_block_dispensed\n || ((gfp.lowpassfreq == -1) && (gfp.highpassfreq == -1)) || /* \"-k\" */\n (gfp.scale_left < gfp.scale_right)\n || (gfp.scale_left > gfp.scale_right)\n || (gfp.disable_reservoir && gfp.brate < 320) || gfp.noATH\n || gfp.ATHonly || (athType == 0) || gfp.in_samplerate <= 32000)\n nonOptimal = 1;\n\n misc = noiseShaping + (stereoMode << 2) + (nonOptimal << 5)\n + (sourceFreq << 6);\n\n musicCRC = gfc.nMusicCRC;\n\n // Write all this information into the stream\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten, quality);\n bytesWritten += 4;\n\n for (var j = 0; j < 9; j++) {\n streamBuffer[streamBufferPos + bytesWritten + j] = 0xff & version .charAt(j);\n }\n bytesWritten += 9;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & revMethod;\n bytesWritten++;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & lowpass;\n bytesWritten++;\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten,\n peakSignalAmplitude);\n bytesWritten += 4;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten,\n radioReplayGain);\n bytesWritten += 2;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten,\n audiophileReplayGain);\n bytesWritten += 2;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & flags;\n bytesWritten++;\n\n if (abrBitrate >= 255)\n streamBuffer[streamBufferPos + bytesWritten] = 0xFF;\n else\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & abrBitrate;\n bytesWritten++;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & (encDelay >> 4);\n streamBuffer[streamBufferPos + bytesWritten + 1] = 0xff & ((encDelay << 4) + (encPadding >> 8));\n streamBuffer[streamBufferPos + bytesWritten + 2] = 0xff & encPadding;\n\n bytesWritten += 3;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & misc;\n bytesWritten++;\n\n // unused in rev0\n streamBuffer[streamBufferPos + bytesWritten++] = 0;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, gfp.preset);\n bytesWritten += 2;\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten, musicLength);\n bytesWritten += 4;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, musicCRC);\n bytesWritten += 2;\n\n // Calculate tag CRC.... must be done here, since it includes previous\n // information\n\n for (var i = 0; i < bytesWritten; i++)\n crc = crcUpdateLookup(streamBuffer[streamBufferPos + i], crc);\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, crc);\n bytesWritten += 2;\n\n return bytesWritten;\n }\n\n function skipId3v2(fpStream) {\n // seek to the beginning of the stream\n fpStream.seek(0);\n // read 10 bytes in case there's an ID3 version 2 header here\n var id3v2Header = new_byte(10);\n fpStream.readFully(id3v2Header);\n /* does the stream begin with the ID3 version 2 file identifier? */\n var id3v2TagSize;\n if (!new String(id3v2Header, \"ISO-8859-1\").startsWith(\"ID3\")) {\n /*\n * the tag size (minus the 10-byte header) is encoded into four\n * bytes where the most significant bit is clear in each byte\n */\n id3v2TagSize = (((id3v2Header[6] & 0x7f) << 21)\n | ((id3v2Header[7] & 0x7f) << 14)\n | ((id3v2Header[8] & 0x7f) << 7) | (id3v2Header[9] & 0x7f))\n + id3v2Header.length;\n } else {\n /* no ID3 version 2 tag in this stream */\n id3v2TagSize = 0;\n }\n return id3v2TagSize;\n }\n\n this.getLameTagFrame = function (gfp, buffer) {\n var gfc = gfp.internal_flags;\n\n if (!gfp.bWriteVbrTag) {\n return 0;\n }\n if (gfc.Class_ID != Lame.LAME_ID) {\n return 0;\n }\n if (gfc.VBR_seek_table.pos <= 0) {\n return 0;\n }\n if (buffer.length < gfc.VBR_seek_table.TotalFrameSize) {\n return gfc.VBR_seek_table.TotalFrameSize;\n }\n\n Arrays.fill(buffer, 0, gfc.VBR_seek_table.TotalFrameSize, 0);\n\n // 4 bytes frame header\n setLameTagFrameHeader(gfp, buffer);\n\n // Create TOC entries\n var toc = new_byte(NUMTOCENTRIES);\n\n if (gfp.free_format) {\n for (var i = 1; i < NUMTOCENTRIES; ++i)\n toc[i] = 0xff & (255 * i / 100);\n } else {\n xingSeekTable(gfc.VBR_seek_table, toc);\n }\n\n // Start writing the tag after the zero frame\n var streamIndex = gfc.sideinfo_len;\n /**\n * Note: Xing header specifies that Xing data goes in the ancillary data\n * with NO ERROR PROTECTION. If error protecton in enabled, the Xing\n * data still starts at the same offset, and now it is in sideinfo data\n * block, and thus will not decode correctly by non-Xing tag aware\n * players\n */\n if (gfp.error_protection)\n streamIndex -= 2;\n\n // Put Vbr tag\n if (gfp.VBR == VbrMode.vbr_off) {\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(0);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(1);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(2);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(3);\n\n } else {\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(0);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(1);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(2);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(3);\n }\n\n // Put header flags\n createInteger(buffer, streamIndex, FRAMES_FLAG + BYTES_FLAG + TOC_FLAG\n + VBR_SCALE_FLAG);\n streamIndex += 4;\n\n // Put Total Number of frames\n createInteger(buffer, streamIndex, gfc.VBR_seek_table.nVbrNumFrames);\n streamIndex += 4;\n\n // Put total audio stream size, including Xing/LAME Header\n var streamSize = (gfc.VBR_seek_table.nBytesWritten + gfc.VBR_seek_table.TotalFrameSize);\n createInteger(buffer, streamIndex, 0 | streamSize);\n streamIndex += 4;\n\n /* Put TOC */\n System.arraycopy(toc, 0, buffer, streamIndex, toc.length);\n streamIndex += toc.length;\n\n if (gfp.error_protection) {\n // (jo) error_protection: add crc16 information to header\n bs.CRC_writeheader(gfc, buffer);\n }\n\n // work out CRC so far: initially crc = 0\n var crc = 0x00;\n for (var i = 0; i < streamIndex; i++)\n crc = crcUpdateLookup(buffer[i], crc);\n // Put LAME VBR info\n streamIndex += putLameVBR(gfp, streamSize, buffer, streamIndex, crc);\n\n return gfc.VBR_seek_table.TotalFrameSize;\n }\n\n /**\n * Write final VBR tag to the file.\n *\n * @param gfp\n * global flags\n * @param stream\n * stream to add the VBR tag to\n * @return 0 (OK), -1 else\n * @throws IOException\n * I/O error\n */\n this.putVbrTag = function (gfp, stream) {\n var gfc = gfp.internal_flags;\n\n if (gfc.VBR_seek_table.pos <= 0)\n return -1;\n\n // Seek to end of file\n stream.seek(stream.length());\n\n // Get file size, abort if file has zero length.\n if (stream.length() == 0)\n return -1;\n\n // The VBR tag may NOT be located at the beginning of the stream. If an\n // ID3 version 2 tag was added, then it must be skipped to write the VBR\n // tag data.\n var id3v2TagSize = skipId3v2(stream);\n\n // Seek to the beginning of the stream\n stream.seek(id3v2TagSize);\n\n var buffer = new_byte(MAXFRAMESIZE);\n var bytes = getLameTagFrame(gfp, buffer);\n if (bytes > buffer.length) {\n return -1;\n }\n\n if (bytes < 1) {\n return 0;\n }\n\n // Put it all to disk again\n stream.write(buffer, 0, bytes);\n // success\n return 0;\n }\n\n}\n\nmodule.exports = VBRTag;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nLame = require('./Lame.js');\nPresets = require('./Presets.js');\nGainAnalysis = require('./GainAnalysis.js');\nQuantizePVT = require('./QuantizePVT.js');\nQuantize = require('./Quantize.js');\nTakehiro = require('./Takehiro.js');\nReservoir = require('./Reservoir.js');\nMPEGMode = require('./MPEGMode.js');\nBitStream = require('./BitStream.js');\nvar Encoder = require('./Encoder.js');\nvar Version = require('./Version.js');\nvar VBRTag = require('./VBRTag.js');\n\nfunction GetAudio() {\n var parse;\n var mpg;\n\n this.setModules = function (parse2, mpg2) {\n parse = parse2;\n mpg = mpg2;\n }\n}\n\n\nfunction Parse() {\n var ver;\n var id3;\n var pre;\n\n this.setModules = function (ver2, id32, pre2) {\n ver = ver2;\n id3 = id32;\n pre = pre2;\n }\n}\n\nfunction MPGLib() {\n}\n\nfunction ID3Tag() {\n var bits;\n var ver;\n\n this.setModules = function (_bits, _ver) {\n bits = _bits;\n ver = _ver;\n }\n}\n\nfunction Mp3Encoder(channels, samplerate, kbps) {\n if (arguments.length != 3) {\n console.error('WARN: Mp3Encoder(channels, samplerate, kbps) not specified');\n channels = 1;\n samplerate = 44100;\n kbps = 128;\n }\n var lame = new Lame();\n var gaud = new GetAudio();\n var ga = new GainAnalysis();\n var bs = new BitStream();\n var p = new Presets();\n var qupvt = new QuantizePVT();\n var qu = new Quantize();\n var vbr = new VBRTag();\n var ver = new Version();\n var id3 = new ID3Tag();\n var rv = new Reservoir();\n var tak = new Takehiro();\n var parse = new Parse();\n var mpg = new MPGLib();\n\n lame.setModules(ga, bs, p, qupvt, qu, vbr, ver, id3, mpg);\n bs.setModules(ga, mpg, ver, vbr);\n id3.setModules(bs, ver);\n p.setModules(lame);\n qu.setModules(bs, rv, qupvt, tak);\n qupvt.setModules(tak, rv, lame.enc.psy);\n rv.setModules(bs);\n tak.setModules(qupvt);\n vbr.setModules(lame, bs, ver);\n gaud.setModules(parse, mpg);\n parse.setModules(ver, id3, p);\n\n var gfp = lame.lame_init();\n\n gfp.num_channels = channels;\n gfp.in_samplerate = samplerate;\n gfp.brate = kbps;\n gfp.mode = MPEGMode.STEREO;\n gfp.quality = 3;\n gfp.bWriteVbrTag = false;\n gfp.disable_reservoir = true;\n gfp.write_id3tag_automatic = false;\n\n var retcode = lame.lame_init_params(gfp);\n assert(0 == retcode);\n var maxSamples = 1152;\n var mp3buf_size = 0 | (1.25 * maxSamples + 7200);\n var mp3buf = new_byte(mp3buf_size);\n\n this.encodeBuffer = function (left, right) {\n if (channels == 1) {\n right = left;\n }\n assert(left.length == right.length);\n if (left.length > maxSamples) {\n maxSamples = left.length;\n mp3buf_size = 0 | (1.25 * maxSamples + 7200);\n mp3buf = new_byte(mp3buf_size);\n }\n\n var _sz = lame.lame_encode_buffer(gfp, left, right, left.length, mp3buf, 0, mp3buf_size);\n return new Int8Array(mp3buf.subarray(0, _sz));\n };\n\n this.flush = function () {\n var _sz = lame.lame_encode_flush(gfp, mp3buf, 0, mp3buf_size);\n return new Int8Array(mp3buf.subarray(0, _sz));\n };\n}\n\nfunction WavHeader() {\n this.dataOffset = 0;\n this.dataLen = 0;\n this.channels = 0;\n this.sampleRate = 0;\n}\n\nfunction fourccToInt(fourcc) {\n return fourcc.charCodeAt(0) << 24 | fourcc.charCodeAt(1) << 16 | fourcc.charCodeAt(2) << 8 | fourcc.charCodeAt(3);\n}\n\nWavHeader.RIFF = fourccToInt(\"RIFF\");\nWavHeader.WAVE = fourccToInt(\"WAVE\");\nWavHeader.fmt_ = fourccToInt(\"fmt \");\nWavHeader.data = fourccToInt(\"data\");\n\nWavHeader.readHeader = function (dataView) {\n var w = new WavHeader();\n\n var header = dataView.getUint32(0, false);\n if (WavHeader.RIFF != header) {\n return;\n }\n var fileLen = dataView.getUint32(4, true);\n if (WavHeader.WAVE != dataView.getUint32(8, false)) {\n return;\n }\n if (WavHeader.fmt_ != dataView.getUint32(12, false)) {\n return;\n }\n var fmtLen = dataView.getUint32(16, true);\n var pos = 16 + 4;\n switch (fmtLen) {\n case 16:\n case 18:\n w.channels = dataView.getUint16(pos + 2, true);\n w.sampleRate = dataView.getUint32(pos + 4, true);\n break;\n default:\n throw 'extended fmt chunk not implemented';\n }\n pos += fmtLen;\n var data = WavHeader.data;\n var len = 0;\n while (data != header) {\n header = dataView.getUint32(pos, false);\n len = dataView.getUint32(pos + 4, true);\n if (data == header) {\n break;\n }\n pos += (len + 8);\n }\n w.dataLen = len;\n w.dataOffset = pos + 8;\n return w;\n};\n\nmodule.exports.Mp3Encoder = Mp3Encoder;\nmodule.exports.WavHeader = WavHeader;\n","import { Mp3Encoder } from 'lamejs';\n\nclass Encoder {\n constructor(config) {\n this.config = {\n sampleRate: 44100,\n bitRate: 128\n };\n\n Object.assign(this.config, config);\n\n this.mp3Encoder = new Mp3Encoder(\n 1,\n this.config.sampleRate,\n this.config.bitRate\n );\n\n // Audio is processed by frames of 1152 samples per audio channel\n // http://lame.sourceforge.net/tech-FAQ.txt\n this.maxSamples = 1152;\n\n this.samplesMono = null;\n this.clearBuffer();\n }\n\n /**\n * Clear active buffer\n */\n clearBuffer() {\n this.dataBuffer = [];\n }\n\n /**\n * Append new audio buffer to current active buffer\n * @param {Buffer} buffer\n */\n appendToBuffer(buffer) {\n this.dataBuffer.push(new Int8Array(buffer));\n }\n\n /**\n * Float current data to 16 bits PCM\n * @param {Float32Array} input\n * @param {Int16Array} output\n */\n floatTo16BitPCM(input, output) {\n for (let i = 0; i < input.length; i++) {\n const s = Math.max(-1, Math.min(1, input[i]));\n output[i] = (s < 0 ? s * 0x8000 : s * 0x7FFF);\n }\n }\n\n /**\n * Convert buffer to proper format\n * @param {Array} arrayBuffer\n */\n convertBuffer(arrayBuffer) {\n const data = new Float32Array(arrayBuffer);\n const out = new Int16Array(arrayBuffer.length);\n this.floatTo16BitPCM(data, out);\n\n return out;\n }\n\n /**\n * Encode and append current buffer to dataBuffer\n * @param {Array} arrayBuffer\n */\n encode(arrayBuffer) {\n this.samplesMono = this.convertBuffer(arrayBuffer);\n let remaining = this.samplesMono.length;\n\n for (let i = 0; remaining >= 0; i += this.maxSamples) {\n const left = this.samplesMono.subarray(i, i + this.maxSamples);\n const mp3buffer = this.mp3Encoder.encodeBuffer(left);\n this.appendToBuffer(mp3buffer);\n remaining -= this.maxSamples;\n }\n }\n\n /**\n * Return full dataBuffer\n */\n finish() {\n this.appendToBuffer(this.mp3Encoder.flush());\n\n return this.dataBuffer;\n }\n};\n\nexport default Encoder;\n","import Encoder from './encoder';\n\nclass MicRecorder {\n constructor(config) {\n this.config = {\n // 128 or 160 kbit/s – mid-range bitrate quality\n bitRate: 128,\n\n // There is a known issue with some macOS machines, where the recording\n // will sometimes have a loud 'pop' or 'pop-click' sound. This flag\n // prevents getting audio from the microphone a few milliseconds after\n // the begining of the recording. It also helps to remove the mouse\n // \"click\" sound from the output mp3 file.\n startRecordingAt: 300,\n deviceId: null,\n };\n\n this.activeStream = null;\n this.context = null;\n this.microphone = null;\n this.processor = null;\n this.startTime = 0;\n\n Object.assign(this.config, config);\n }\n\n /**\n * Starts to listen for the microphone sound\n * @param {MediaStream} stream\n */\n addMicrophoneListener(stream) {\n this.activeStream = stream;\n\n // This prevents the weird noise once you start listening to the microphone\n this.timerToStart = setTimeout(() => {\n delete this.timerToStart;\n }, this.config.startRecordingAt);\n\n // Set up Web Audio API to process data from the media stream (microphone).\n this.microphone = this.context.createMediaStreamSource(stream);\n\n // Settings a bufferSize of 0 instructs the browser to choose the best bufferSize\n this.processor = this.context.createScriptProcessor(0, 1, 1);\n\n // Add all buffers from LAME into an array.\n this.processor.onaudioprocess = (event) => {\n if (this.timerToStart) {\n return;\n }\n\n // Send microphone data to LAME for MP3 encoding while recording.\n this.lameEncoder.encode(event.inputBuffer.getChannelData(0));\n };\n\n this.connectMicrophone();\n };\n\n /**\n * Requests access to the microphone and starts recording\n * @return Promise\n */\n initialize() {\n const AudioContext = window.AudioContext || window.webkitAudioContext;\n this.context = new AudioContext();\n this.config.sampleRate = this.context.sampleRate;\n this.lameEncoder = new Encoder(this.config);\n\n const audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true;\n\n return new Promise((resolve, reject) => {\n navigator.mediaDevices.getUserMedia({ audio })\n .then(stream => {\n this.addMicrophoneListener(stream);\n resolve(stream);\n }).catch(function(err) {\n reject(err);\n });\n })\n };\n\n /**\n * Initializes or resumes recording\n * @return Promise\n */\n start() {\n if (!this.processor || !this.microphone) {\n return this.initialize();\n } else {\n this.connectMicrophone();\n return Promise.resolve();\n }\n }\n\n /**\n * Pause recording\n * @return Promise\n */\n pause() {\n this.disconnectMicrophone();\n return Promise.resolve();\n };\n\n /**\n * Start retrieving microphone data\n */\n connectMicrophone() {\n if (this.processor && this.microphone) {\n this.microphone.connect(this.processor);\n this.processor.connect(this.context.destination);\n }\n }\n\n /**\n * Stop retrieving microphone data\n */\n disconnectMicrophone() {\n if (this.processor && this.microphone) {\n this.microphone.disconnect();\n this.processor.disconnect();\n }\n }\n\n /**\n * Disconnect microphone, processor and remove activeStream\n * @return MicRecorder\n */\n stop() {\n if (this.processor && this.microphone) {\n // Clean up the Web Audio API resources.\n this.disconnectMicrophone();\n\n // If all references using this.context are destroyed, context is closed\n // automatically. DOMException is fired when trying to close again\n if (this.context && this.context.state !== 'closed') {\n this.context.close();\n }\n\n this.processor.onaudioprocess = null;\n\n // Stop all audio tracks. Also, removes recording icon from chrome tab\n this.activeStream.getAudioTracks().forEach(track => track.stop());\n this.processor = null;\n this.microphone = null;\n }\n\n return this;\n };\n\n /**\n * Return Mp3 Buffer and Blob with type mp3\n * @return Promise\n */\n getMp3() {\n const finalBuffer = this.lameEncoder.finish();\n\n return new Promise((resolve, reject) => {\n if (finalBuffer.length === 0) {\n reject(new Error('No buffer to send'));\n } else {\n resolve([finalBuffer, new Blob(finalBuffer, { type: 'audio/mp3' })]);\n this.lameEncoder.clearBuffer();\n }\n });\n };\n}\n\nexport default MicRecorder;\n"],"names":["new_byte","new_int","new_float","new_double","new_float_n","new_int_n","new_array_n","Arrays","System","Util","ShortBlock","Float","VbrMode","assert","Encoder","III_psy_xmin","require$$0","require$$1","FFT","MPEGMode","L3Side","GrInfo","LameInternalFlags","IIISideInfo","ScaleFac","NsPsy","VBRSeekInfo","GainAnalysis","MeanBits","Tables","QuantizePVT","Takehiro","BitStream","new_short_n","Lame","PsyModel","LameGlobalFlags","ATH","ReplayGain","CBRNewIterationLoop","Presets","CalcNoiseResult","Quantize","VBRQuantize","CalcNoiseData","Reservoir","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","VBRTag","Version","config","assign","mp3Encoder","Mp3Encoder","sampleRate","bitRate","maxSamples","samplesMono","clearBuffer","dataBuffer","buffer","push","Int8Array","input","output","i","length","s","Math","max","min","arrayBuffer","data","Float32Array","out","Int16Array","floatTo16BitPCM","convertBuffer","remaining","left","subarray","mp3buffer","encodeBuffer","appendToBuffer","flush","MicRecorder","activeStream","context","microphone","processor","startTime","stream","timerToStart","setTimeout","startRecordingAt","createMediaStreamSource","createScriptProcessor","onaudioprocess","event","lameEncoder","encode","inputBuffer","getChannelData","connectMicrophone","AudioContext","window","webkitAudioContext","audio","deviceId","exact","Promise","resolve","reject","mediaDevices","getUserMedia","then","addMicrophoneListener","catch","err","initialize","disconnectMicrophone","connect","destination","disconnect","state","close","getAudioTracks","forEach","track","stop","finalBuffer","finish","Error","Blob","type"],"mappings":";;;;;;AAAA,SAASA,UAAQ,CAAC,KAAK,EAAE;IACrB,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;CAC/B;;AAED,SAAS,SAAS,CAAC,KAAK,EAAE;IACtB,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;;AAED,SAASC,SAAO,CAAC,KAAK,EAAE;IACpB,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;;AAED,SAASC,WAAS,CAAC,KAAK,EAAE;IACtB,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;CAClC;;AAED,SAASC,YAAU,CAAC,KAAK,EAAE;IACvB,OAAO,IAAI,YAAY,CAAC,KAA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;;;;4BAQI;WACDS,oBAAL;aACOV,QAAQC,OAAR,EAAP;;;;;;;;;wCAMkB;UACd,KAAKtB,SAAL,IAAkB,KAAKD,UAA3B,EAAuC;aAChCA,UAAL,CAAgBiC,OAAhB,CAAwB,KAAKhC,SAA7B;aACKA,SAAL,CAAegC,OAAf,CAAuB,KAAKlC,OAAL,CAAamC,WAApC;;;;;;;;;;2CAOmB;UACjB,KAAKjC,SAAL,IAAkB,KAAKD,UAA3B,EAAuC;aAChCA,UAAL,CAAgBmC,UAAhB;aACKlC,SAAL,CAAekC,UAAf;;;;;;;;;;;2BAQG;UACD,KAAKlC,SAAL,IAAkB,KAAKD,UAA3B,EAAuC;;aAEhCgC,oBAAL;;;;YAII,KAAKjC,OAAL,IAAgB,KAAKA,OAAL,CAAaqC,KAAb,KAAuB,QAA3C,EAAqD;eAC9CrC,OAAL,CAAasC,KAAb;;;aAGGpC,SAAL,CAAeQ,cAAf,GAAgC,IAAhC;;;aAGKX,YAAL,CAAkBwC,cAAlB,GAAmCC,OAAnC,CAA2C;iBAASC,MAAMC,IAAN,EAAT;SAA3C;aACKxC,SAAL,GAAiB,IAAjB;aACKD,UAAL,GAAkB,IAAlB;;;aAGK,IAAP;;;;;;;;;;6BAOO;;;UACD0C,cAAc,KAAK/B,WAAL,CAAiBgC,MAAjB,EAApB;;aAEO,IAAIrB,OAAJ,CAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;YAClCkB,YAAYhE,MAAZ,KAAuB,CAA3B,EAA8B;iBACrB,IAAIkE,KAAJ,CAAU,mBAAV,CAAP;SADF,MAEO;kBACG,CAACF,WAAD,EAAc,IAAIG,IAAJ,CAASH,WAAT,EAAsB,EAAEI,MAAM,WAAR,EAAtB,CAAd,CAAR;iBACKnC,WAAL,CAAiBzC,WAAjB;;OALG,CAAP;;;;;;;;;;;;"} \ No newline at end of file diff --git a/samples/index.html b/samples/index.html index ced9bc2..680ea78 100644 --- a/samples/index.html +++ b/samples/index.html @@ -12,7 +12,8 @@

Mic Recorder to Mp3 Example


- + +

@@ -25,19 +26,43 @@

Mic Recorder to Mp3 Example

- \ No newline at end of file + diff --git a/src/mic-recorder.js b/src/mic-recorder.js index d13d97e..ed7958a 100644 --- a/src/mic-recorder.js +++ b/src/mic-recorder.js @@ -52,19 +52,82 @@ class MicRecorder { this.lameEncoder.encode(event.inputBuffer.getChannelData(0)); }; - // Begin retrieving microphone data. - this.microphone.connect(this.processor); - this.processor.connect(this.context.destination); + this.connectMicrophone(); }; + /** + * Requests access to the microphone and starts recording + * @return Promise + */ + initialize() { + const AudioContext = window.AudioContext || window.webkitAudioContext; + this.context = new AudioContext(); + this.config.sampleRate = this.context.sampleRate; + this.lameEncoder = new Encoder(this.config); + + const audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true; + + return new Promise((resolve, reject) => { + navigator.mediaDevices.getUserMedia({ audio }) + .then(stream => { + this.addMicrophoneListener(stream); + resolve(stream); + }).catch(function(err) { + reject(err); + }); + }) + }; + + /** + * Initializes or resumes recording + * @return Promise + */ + start() { + if (!this.processor || !this.microphone) { + return this.initialize(); + } else { + this.connectMicrophone(); + return Promise.resolve(); + } + } + + /** + * Pause recording + * @return Promise + */ + pause() { + this.disconnectMicrophone(); + return Promise.resolve(); + }; + + /** + * Start retrieving microphone data + */ + connectMicrophone() { + if (this.processor && this.microphone) { + this.microphone.connect(this.processor); + this.processor.connect(this.context.destination); + } + } + + /** + * Stop retrieving microphone data + */ + disconnectMicrophone() { + if (this.processor && this.microphone) { + this.microphone.disconnect(); + this.processor.disconnect(); + } + } + /** * Disconnect microphone, processor and remove activeStream + * @return MicRecorder */ stop() { if (this.processor && this.microphone) { // Clean up the Web Audio API resources. - this.microphone.disconnect(); - this.processor.disconnect(); + this.disconnectMicrophone(); // If all references using this.context are destroyed, context is closed // automatically. DOMException is fired when trying to close again @@ -76,37 +139,16 @@ class MicRecorder { // Stop all audio tracks. Also, removes recording icon from chrome tab this.activeStream.getAudioTracks().forEach(track => track.stop()); + this.processor = null; + this.microphone = null; } return this; }; - /** - * Requests access to the microphone and start recording - * @return Promise - */ - start() { - const AudioContext = window.AudioContext || window.webkitAudioContext; - this.context = new AudioContext(); - this.config.sampleRate = this.context.sampleRate; - this.lameEncoder = new Encoder(this.config); - - const audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true; - - return new Promise((resolve, reject) => { - navigator.mediaDevices.getUserMedia({ audio }) - .then(stream => { - this.addMicrophoneListener(stream); - resolve(stream); - }).catch(function(err) { - reject(err); - }); - }) - }; - /** * Return Mp3 Buffer and Blob with type mp3 - * @return {Promise} + * @return Promise */ getMp3() { const finalBuffer = this.lameEncoder.finish(); @@ -120,6 +162,6 @@ class MicRecorder { } }); }; -}; +} export default MicRecorder; From dc7aa8836aa386e5f268fb213c4fa9d85267818c Mon Sep 17 00:00:00 2001 From: Maciej Kubiak Date: Sun, 9 Aug 2020 00:58:48 +0200 Subject: [PATCH 2/2] Encode after record Added new config param: encodeAfterRecord (#13) Updated sample to show this feature too --- dist/index.js | 37 +++++++++++++++++++++++++++++++------ dist/index.js.map | 2 +- samples/index.html | 24 +++++++++++++++++++++--- src/encoder.js | 2 +- src/mic-recorder.js | 32 +++++++++++++++++++++++++++----- 5 files changed, 81 insertions(+), 16 deletions(-) diff --git a/dist/index.js b/dist/index.js index eb82986..4d34609 100644 --- a/dist/index.js +++ b/dist/index.js @@ -15816,13 +15816,17 @@ var MicRecorder = function () { // 128 or 160 kbit/s – mid-range bitrate quality bitRate: 128, + deviceId: null, + // Encode to mp3 after finish recording + // Encoding during recording may result in distorted audio + // This could be crucial on mobile devices + encodeAfterRecord: true, // There is a known issue with some macOS machines, where the recording // will sometimes have a loud 'pop' or 'pop-click' sound. This flag // prevents getting audio from the microphone a few milliseconds after - // the begining of the recording. It also helps to remove the mouse + // the beginning of the recording. It also helps to remove the mouse // "click" sound from the output mp3 file. - startRecordingAt: 300, - deviceId: null + startRecordingAt: 300 }; this.activeStream = null; @@ -15830,6 +15834,7 @@ var MicRecorder = function () { this.microphone = null; this.processor = null; this.startTime = 0; + this.rawChunksBuffer = null; Object.assign(this.config, config); } @@ -15864,8 +15869,15 @@ var MicRecorder = function () { return; } - // Send microphone data to LAME for MP3 encoding while recording. - _this.lameEncoder.encode(event.inputBuffer.getChannelData(0)); + var rawChunk = event.inputBuffer.getChannelData(0); + + if (_this.config.encodeAfterRecord) { + // Save copy of raw chunk for future encoding + _this.rawChunksBuffer.push(Object.assign([], rawChunk)); + } else { + // Send microphone data to LAME for MP3 encoding while recording. + _this.lameEncoder.encode(rawChunk); + } }; this.connectMicrophone(); @@ -15881,12 +15893,18 @@ var MicRecorder = function () { value: function initialize() { var _this2 = this; + var _config = this.config, + deviceId = _config.deviceId, + encodeAfterRecord = _config.encodeAfterRecord; + var AudioContext = window.AudioContext || window.webkitAudioContext; this.context = new AudioContext(); this.config.sampleRate = this.context.sampleRate; + this.rawChunksBuffer = encodeAfterRecord ? [] : null; this.lameEncoder = new Encoder(this.config); + this.i = 0; - var audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true; + var audio = deviceId ? { deviceId: { exact: deviceId } } : true; return new Promise(function (resolve, reject) { navigator.mediaDevices.getUserMedia({ audio: audio }).then(function (stream) { @@ -15993,6 +16011,13 @@ var MicRecorder = function () { value: function getMp3() { var _this3 = this; + if (this.config.encodeAfterRecord) { + this.rawChunksBuffer.forEach(function (rawChunk) { + _this3.lameEncoder.encode(rawChunk); + }); + this.rawChunksBuffer = null; + } + var finalBuffer = this.lameEncoder.finish(); return new Promise(function (resolve, reject) { diff --git a/dist/index.js.map b/dist/index.js.map index 54d7ec4..121b64b 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../node_modules/lamejs/src/js/common.js","../node_modules/lamejs/src/js/NewMDCT.js","../node_modules/lamejs/src/js/III_psy_xmin.js","../node_modules/lamejs/src/js/III_psy_ratio.js","../node_modules/lamejs/src/js/Encoder.js","../node_modules/lamejs/src/js/FFT.js","../node_modules/lamejs/src/js/PsyModel.js","../node_modules/lamejs/src/js/MPEGMode.js","../node_modules/lamejs/src/js/LameGlobalFlags.js","../node_modules/lamejs/src/js/L3Side.js","../node_modules/lamejs/src/js/GrInfo.js","../node_modules/lamejs/src/js/IIISideInfo.js","../node_modules/lamejs/src/js/ScaleFac.js","../node_modules/lamejs/src/js/NsPsy.js","../node_modules/lamejs/src/js/VBRSeekInfo.js","../node_modules/lamejs/src/js/LameInternalFlags.js","../node_modules/lamejs/src/js/ATH.js","../node_modules/lamejs/src/js/GainAnalysis.js","../node_modules/lamejs/src/js/ReplayGain.js","../node_modules/lamejs/src/js/MeanBits.js","../node_modules/lamejs/src/js/CBRNewIterationLoop.js","../node_modules/lamejs/src/js/Tables.js","../node_modules/lamejs/src/js/QuantizePVT.js","../node_modules/lamejs/src/js/Takehiro.js","../node_modules/lamejs/src/js/BitStream.js","../node_modules/lamejs/src/js/Lame.js","../node_modules/lamejs/src/js/Presets.js","../node_modules/lamejs/src/js/VBRQuantize.js","../node_modules/lamejs/src/js/CalcNoiseResult.js","../node_modules/lamejs/src/js/CalcNoiseData.js","../node_modules/lamejs/src/js/Quantize.js","../node_modules/lamejs/src/js/Reservoir.js","../node_modules/lamejs/src/js/Version.js","../node_modules/lamejs/src/js/VBRTag.js","../node_modules/lamejs/src/js/index.js","../src/encoder.js","../src/mic-recorder.js"],"sourcesContent":["function new_byte(count) {\n return new Int8Array(count);\n}\n\nfunction new_short(count) {\n return new Int16Array(count);\n}\n\nfunction new_int(count) {\n return new Int32Array(count);\n}\n\nfunction new_float(count) {\n return new Float32Array(count);\n}\n\nfunction new_double(count) {\n return new Float64Array(count);\n}\n\nfunction new_float_n(args) {\n if (args.length == 1) {\n return new_float(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_float_n(args));\n }\n return A;\n}\nfunction new_int_n(args) {\n if (args.length == 1) {\n return new_int(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_int_n(args));\n }\n return A;\n}\n\nfunction new_short_n(args) {\n if (args.length == 1) {\n return new_short(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_short_n(args));\n }\n return A;\n}\n\nfunction new_array_n(args) {\n if (args.length == 1) {\n return new Array(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_array_n(args));\n }\n return A;\n}\n\n\nvar Arrays = {};\n\nArrays.fill = function (a, fromIndex, toIndex, val) {\n if (arguments.length == 2) {\n for (var i = 0; i < a.length; i++) {\n a[i] = arguments[1];\n }\n } else {\n for (var i = fromIndex; i < toIndex; i++) {\n a[i] = val;\n }\n }\n};\n\nvar System = {};\n\nSystem.arraycopy = function (src, srcPos, dest, destPos, length) {\n var srcEnd = srcPos + length;\n while (srcPos < srcEnd)\n dest[destPos++] = src[srcPos++];\n};\n\n\nvar Util = {};\nUtil.SQRT2 = 1.41421356237309504880;\nUtil.FAST_LOG10 = function (x) {\n return Math.log10(x);\n};\n\nUtil.FAST_LOG10_X = function (x, y) {\n return Math.log10(x) * y;\n};\n\nfunction ShortBlock(ordinal) {\n this.ordinal = ordinal;\n}\n/**\n * LAME may use them, even different block types for L/R.\n */\nShortBlock.short_block_allowed = new ShortBlock(0);\n/**\n * LAME may use them, but always same block types in L/R.\n */\nShortBlock.short_block_coupled = new ShortBlock(1);\n/**\n * LAME will not use short blocks, long blocks only.\n */\nShortBlock.short_block_dispensed = new ShortBlock(2);\n/**\n * LAME will not use long blocks, short blocks only.\n */\nShortBlock.short_block_forced = new ShortBlock(3);\n\nvar Float = {};\nFloat.MAX_VALUE = 3.4028235e+38;\n\nfunction VbrMode(ordinal) {\n this.ordinal = ordinal;\n}\nVbrMode.vbr_off = new VbrMode(0);\nVbrMode.vbr_mt = new VbrMode(1);\nVbrMode.vbr_rh = new VbrMode(2);\nVbrMode.vbr_abr = new VbrMode(3);\nVbrMode.vbr_mtrh = new VbrMode(4);\nVbrMode.vbr_default = VbrMode.vbr_mtrh;\n\nvar assert = function (x) {\n //console.assert(x);\n};\n\nmodule.exports = {\n \"System\": System,\n \"VbrMode\": VbrMode,\n \"Float\": Float,\n \"ShortBlock\": ShortBlock,\n \"Util\": Util,\n \"Arrays\": Arrays,\n \"new_array_n\": new_array_n,\n \"new_byte\": new_byte,\n \"new_double\": new_double,\n \"new_float\": new_float,\n \"new_float_n\": new_float_n,\n \"new_int\": new_int,\n \"new_int_n\": new_int_n,\n \"new_short\": new_short,\n \"new_short_n\": new_short_n,\n \"assert\": assert\n};\n","/*\n * MP3 window subband -> subband filtering -> mdct routine\n *\n * Copyright (c) 1999-2000 Takehiro Tominaga\n *\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Library General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n/*\n * Special Thanks to Patrick De Smet for your advices.\n */\n\n/* $Id: NewMDCT.java,v 1.11 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n\nfunction NewMDCT() {\n\n\tvar enwindow = [\n\t\t\t-4.77e-07 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.03951e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.53674e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t2.841473e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t3.5758972e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t3.401756e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.83715e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.9182e-05 * 0.740951125354959 / 2.384e-06, /* 15 */\n\t\t\t1.2398e-05 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.91212e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t2.283096e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.6994476e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t-1.8756866e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t-2.630711e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t-2.47478e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t-1.4782e-05 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.063471690191471e-01, 1.960342806591213e-01,\n\n\t\t\t-4.77e-07 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.05858e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.30786e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t2.521515e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t3.5694122e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t3.643036e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.91821e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.6321e-05 * 0.773010453362737 / 2.384e-06, /* 14 */\n\t\t\t1.1444e-05 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.65462e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t2.110004e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.6112804e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t-1.9634247e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t-2.803326e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t-2.77042e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t-1.6689e-05 * 0.773010453362737 / 2.384e-06,\n\t\t\t8.206787908286602e-01, 3.901806440322567e-01,\n\n\t\t\t-4.77e-07 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.07288e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.02653e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t2.174854e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t3.5586357e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t3.858566e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.95159e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.3460e-05 * 0.803207531480645 / 2.384e-06, /* 13 */\n\t\t\t1.0014e-05 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.40190e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.937389e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.5233517e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t-2.0506859e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t-2.974033e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t-3.07560e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t-1.8120e-05 * 0.803207531480645 / 2.384e-06,\n\t\t\t7.416505462720353e-01, 5.805693545089249e-01,\n\n\t\t\t-4.77e-07 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.08242e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t8.68797e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.800537e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t3.5435200e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t4.049301e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t9.94205e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t9.0599e-05 * 0.831469612302545 / 2.384e-06, /* 12 */\n\t\t\t9.060e-06 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.16348e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.766682e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.4358521e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t-2.1372318e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t-3.14188e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t-3.39031e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t-1.9550e-05 * 0.831469612302545 / 2.384e-06,\n\t\t\t6.681786379192989e-01, 7.653668647301797e-01,\n\n\t\t\t-4.77e-07 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.08719e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t8.29220e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.399517e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t3.5242081e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t4.215240e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t9.89437e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t8.7261e-05 * 0.857728610000272 / 2.384e-06, /* 11 */\n\t\t\t8.106e-06 * 0.857728610000272 / 2.384e-06,\n\t\t\t9.3937e-05 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.597881e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.3489246e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t-2.2228718e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t-3.306866e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t-3.71456e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t-2.1458e-05 * 0.857728610000272 / 2.384e-06,\n\t\t\t5.993769336819237e-01, 9.427934736519954e-01,\n\n\t\t\t-4.77e-07 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.08719e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t7.8392e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t9.71317e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t3.5007000e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t4.357815e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t9.80854e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t8.3923e-05 * 0.881921264348355 / 2.384e-06, /* 10 */\n\t\t\t7.629e-06 * 0.881921264348355 / 2.384e-06,\n\t\t\t7.2956e-05 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.432419e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.2627602e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t-2.3074150e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t-3.467083e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t-4.04358e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t-2.3365e-05 * 0.881921264348355 / 2.384e-06,\n\t\t\t5.345111359507916e-01, 1.111140466039205e+00,\n\n\t\t\t-9.54e-07 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.08242e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t7.31945e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t5.15938e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t3.4730434e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t4.477024e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t9.68933e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t8.0585e-05 * 0.903989293123443 / 2.384e-06, /* 9 */\n\t\t\t6.676e-06 * 0.903989293123443 / 2.384e-06,\n\t\t\t5.2929e-05 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.269817e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.1775017e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t-2.3907185e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t-3.622532e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t-4.38213e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t-2.5272e-05 * 0.903989293123443 / 2.384e-06,\n\t\t\t4.729647758913199e-01, 1.268786568327291e+00,\n\n\t\t\t-9.54e-07 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.06812e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t6.74248e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.3379e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.4412861e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t4.573822e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t9.54151e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t7.6771e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t6.199e-06 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.4332e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.111031e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.0933399e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-2.4725437e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-3.771782e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-4.72546e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-2.7657e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t4.1421356237309504879e-01, /* tan(PI/8) */\n\t\t\t1.414213562373095e+00,\n\n\t\t\t-9.54e-07 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.05381e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t6.10352e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t-4.75883e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t3.4055710e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t4.649162e-03 * 0.941544065183021 / 2.384e-06,\n\t\t\t9.35555e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t7.3433e-05 * 0.941544065183021 / 2.384e-06, /* 7 */\n\t\t\t5.245e-06 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.7166e-05 * 0.941544065183021 / 2.384e-06,\n\t\t\t9.56535e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.0103703e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t-2.5527000e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t-3.914356e-03 * 0.941544065183021 / 2.384e-06,\n\t\t\t-5.07355e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t-3.0041e-05 * 0.941544065183021 / 2.384e-06,\n\t\t\t3.578057213145241e-01, 1.546020906725474e+00,\n\n\t\t\t-9.54e-07 * 0.956940335732209 / 2.384e-06,\n\t\t\t1.02520e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t5.39303e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t-1.011848e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t3.3659935e-02 * 0.956940335732209 / 2.384e-06,\n\t\t\t4.703045e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.15051e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t7.0095e-05 * 0.956940335732209 / 2.384e-06, /* 6 */\n\t\t\t4.768e-06 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.54e-07 * 0.956940335732209 / 2.384e-06,\n\t\t\t8.06808e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.287834e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t-2.6310921e-02 * 0.956940335732209 / 2.384e-06,\n\t\t\t-4.048824e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t-5.42164e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t-3.2425e-05 * 0.956940335732209 / 2.384e-06,\n\t\t\t3.033466836073424e-01, 1.662939224605090e+00,\n\n\t\t\t-1.431e-06 * 0.970031253194544 / 2.384e-06,\n\t\t\t9.9182e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t4.62532e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t-1.573563e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t3.3225536e-02 * 0.970031253194544 / 2.384e-06,\n\t\t\t4.737377e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t8.91685e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t6.6280e-05 * 0.970031253194544 / 2.384e-06, /* 5 */\n\t\t\t4.292e-06 * 0.970031253194544 / 2.384e-06,\n\t\t\t-1.3828e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t6.61850e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t8.487225e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t-2.7073860e-02 * 0.970031253194544 / 2.384e-06,\n\t\t\t-4.174709e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t-5.76973e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t-3.4809e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t2.504869601913055e-01, 1.763842528696710e+00,\n\n\t\t\t-1.431e-06 * 0.98078528040323 / 2.384e-06,\n\t\t\t9.5367e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t3.78609e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.161503e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t3.2754898e-02 * 0.98078528040323 / 2.384e-06,\n\t\t\t4.752159e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t8.66413e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t6.2943e-05 * 0.98078528040323 / 2.384e-06, /* 4 */\n\t\t\t3.815e-06 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.718e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t5.22137e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t7.703304e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.7815342e-02 * 0.98078528040323 / 2.384e-06,\n\t\t\t-4.290581e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t-6.11782e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t-3.7670e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t1.989123673796580e-01, 1.847759065022573e+00,\n\n\t\t\t-1.907e-06 * 0.989176509964781 / 2.384e-06,\n\t\t\t9.0122e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t2.88486e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t-2.774239e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t3.2248020e-02 * 0.989176509964781 / 2.384e-06,\n\t\t\t4.748821e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t8.38757e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t5.9605e-05 * 0.989176509964781 / 2.384e-06, /* 3 */\n\t\t\t3.338e-06 * 0.989176509964781 / 2.384e-06,\n\t\t\t-3.9577e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t3.88145e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t6.937027e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t-2.8532982e-02 * 0.989176509964781 / 2.384e-06,\n\t\t\t-4.395962e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t-6.46591e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t-4.0531e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t1.483359875383474e-01, 1.913880671464418e+00,\n\n\t\t\t-1.907e-06 * 0.995184726672197 / 2.384e-06,\n\t\t\t8.4400e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t1.91689e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t-3.411293e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t3.1706810e-02 * 0.995184726672197 / 2.384e-06,\n\t\t\t4.728317e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t8.09669e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t5.579e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t3.338e-06 * 0.995184726672197 / 2.384e-06,\n\t\t\t-5.0545e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t2.59876e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t6.189346e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t-2.9224873e-02 * 0.995184726672197 / 2.384e-06,\n\t\t\t-4.489899e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t-6.80923e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t-4.3392e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t9.849140335716425e-02, 1.961570560806461e+00,\n\n\t\t\t-2.384e-06 * 0.998795456205172 / 2.384e-06,\n\t\t\t7.7724e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t8.8215e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.072189e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t3.1132698e-02 * 0.998795456205172 / 2.384e-06,\n\t\t\t4.691124e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t7.79152e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t5.2929e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t2.861e-06 * 0.998795456205172 / 2.384e-06,\n\t\t\t-6.0558e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t1.37329e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t5.462170e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t-2.9890060e-02 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.570484e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t-7.14302e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.6253e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t4.912684976946725e-02, 1.990369453344394e+00,\n\n\t\t\t3.5780907e-02 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.7876148e-02 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t3.134727e-03 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t2.457142e-03 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t9.71317e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t2.18868e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.01566e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.3828e-05 * Util.SQRT2 * 0.5 / 2.384e-06,\n\n\t\t\t3.0526638e-02 / 2.384e-06, 4.638195e-03 / 2.384e-06,\n\t\t\t7.47204e-04 / 2.384e-06, 4.9591e-05 / 2.384e-06,\n\t\t\t4.756451e-03 / 2.384e-06, 2.1458e-05 / 2.384e-06,\n\t\t\t-6.9618e-05 / 2.384e-06, /* 2.384e-06/2.384e-06 */\n\t];\n\n\tvar NS = 12;\n\tvar NL = 36;\n\n\tvar win = [\n\t [\n\t 2.382191739347913e-13,\n\t 6.423305872147834e-13,\n\t 9.400849094049688e-13,\n\t 1.122435026096556e-12,\n\t 1.183840321267481e-12,\n\t 1.122435026096556e-12,\n\t 9.400849094049690e-13,\n\t 6.423305872147839e-13,\n\t 2.382191739347918e-13,\n\n\t 5.456116108943412e-12,\n\t 4.878985199565852e-12,\n\t 4.240448995017367e-12,\n\t 3.559909094758252e-12,\n\t 2.858043359288075e-12,\n\t 2.156177623817898e-12,\n\t 1.475637723558783e-12,\n\t 8.371015190102974e-13,\n\t 2.599706096327376e-13,\n\n\t -5.456116108943412e-12,\n\t -4.878985199565852e-12,\n\t -4.240448995017367e-12,\n\t -3.559909094758252e-12,\n\t -2.858043359288076e-12,\n\t -2.156177623817898e-12,\n\t -1.475637723558783e-12,\n\t -8.371015190102975e-13,\n\t -2.599706096327376e-13,\n\n\t -2.382191739347923e-13,\n\t -6.423305872147843e-13,\n\t -9.400849094049696e-13,\n\t -1.122435026096556e-12,\n\t -1.183840321267481e-12,\n\t -1.122435026096556e-12,\n\t -9.400849094049694e-13,\n\t -6.423305872147840e-13,\n\t -2.382191739347918e-13,\n\t ],\n\t [\n\t 2.382191739347913e-13,\n\t 6.423305872147834e-13,\n\t 9.400849094049688e-13,\n\t 1.122435026096556e-12,\n\t 1.183840321267481e-12,\n\t 1.122435026096556e-12,\n\t 9.400849094049688e-13,\n\t 6.423305872147841e-13,\n\t 2.382191739347918e-13,\n\n\t 5.456116108943413e-12,\n\t 4.878985199565852e-12,\n\t 4.240448995017367e-12,\n\t 3.559909094758253e-12,\n\t 2.858043359288075e-12,\n\t 2.156177623817898e-12,\n\t 1.475637723558782e-12,\n\t 8.371015190102975e-13,\n\t 2.599706096327376e-13,\n\n\t -5.461314069809755e-12,\n\t -4.921085770524055e-12,\n\t -4.343405037091838e-12,\n\t -3.732668368707687e-12,\n\t -3.093523840190885e-12,\n\t -2.430835727329465e-12,\n\t -1.734679010007751e-12,\n\t -9.748253656609281e-13,\n\t -2.797435120168326e-13,\n\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t -2.283748241799531e-13,\n\t -4.037858874020686e-13,\n\t -2.146547464825323e-13,\n\t ],\n\t [\n\t 1.316524975873958e-01, /* win[SHORT_TYPE] */\n\t 4.142135623730950e-01,\n\t 7.673269879789602e-01,\n\n\t 1.091308501069271e+00, /* tantab_l */\n\t 1.303225372841206e+00,\n\t 1.569685577117490e+00,\n\t 1.920982126971166e+00,\n\t 2.414213562373094e+00,\n\t 3.171594802363212e+00,\n\t 4.510708503662055e+00,\n\t 7.595754112725146e+00,\n\t 2.290376554843115e+01,\n\n\t 0.98480775301220802032, /* cx */\n\t 0.64278760968653936292,\n\t 0.34202014332566882393,\n\t 0.93969262078590842791,\n\t -0.17364817766693030343,\n\t -0.76604444311897790243,\n\t 0.86602540378443870761,\n\t 0.500000000000000e+00,\n\n\t -5.144957554275265e-01, /* ca */\n\t -4.717319685649723e-01,\n\t -3.133774542039019e-01,\n\t -1.819131996109812e-01,\n\t -9.457419252642064e-02,\n\t -4.096558288530405e-02,\n\t -1.419856857247115e-02,\n\t -3.699974673760037e-03,\n\n\t 8.574929257125442e-01, /* cs */\n\t 8.817419973177052e-01,\n\t 9.496286491027329e-01,\n\t 9.833145924917901e-01,\n\t 9.955178160675857e-01,\n\t 9.991605581781475e-01,\n\t 9.998991952444470e-01,\n\t 9.999931550702802e-01,\n\t ],\n\t [\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 2.283748241799531e-13,\n\t 4.037858874020686e-13,\n\t 2.146547464825323e-13,\n\n\t 5.461314069809755e-12,\n\t 4.921085770524055e-12,\n\t 4.343405037091838e-12,\n\t 3.732668368707687e-12,\n\t 3.093523840190885e-12,\n\t 2.430835727329466e-12,\n\t 1.734679010007751e-12,\n\t 9.748253656609281e-13,\n\t 2.797435120168326e-13,\n\n\t -5.456116108943413e-12,\n\t -4.878985199565852e-12,\n\t -4.240448995017367e-12,\n\t -3.559909094758253e-12,\n\t -2.858043359288075e-12,\n\t -2.156177623817898e-12,\n\t -1.475637723558782e-12,\n\t -8.371015190102975e-13,\n\t -2.599706096327376e-13,\n\n\t -2.382191739347913e-13,\n\t -6.423305872147834e-13,\n\t -9.400849094049688e-13,\n\t -1.122435026096556e-12,\n\t -1.183840321267481e-12,\n\t -1.122435026096556e-12,\n\t -9.400849094049688e-13,\n\t -6.423305872147841e-13,\n\t -2.382191739347918e-13,\n\t ]\n\t];\n\n\tvar tantab_l = win[Encoder.SHORT_TYPE];\n\tvar cx = win[Encoder.SHORT_TYPE];\n\tvar ca = win[Encoder.SHORT_TYPE];\n\tvar cs = win[Encoder.SHORT_TYPE];\n\n\t/**\n\t * new IDCT routine written by Takehiro TOMINAGA\n\t *\n\t * PURPOSE: Overlapping window on PCM samples
\n\t *\n\t * SEMANTICS:
\n\t * 32 16-bit pcm samples are scaled to fractional 2's complement and\n\t * concatenated to the end of the window buffer #x#. The updated window\n\t * buffer #x# is then windowed by the analysis window #c# to produce the\n\t * windowed sample #z#\n\t */\n\tvar order = [\n\t 0, 1, 16, 17, 8, 9, 24, 25, 4, 5, 20, 21, 12, 13, 28, 29,\n\t 2, 3, 18, 19, 10, 11, 26, 27, 6, 7, 22, 23, 14, 15, 30, 31\n\t];\n\n\t/**\n\t * returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32\n\t */\n\tfunction window_subband(x1, x1Pos, a) {\n\t\tvar wp = 10;\n\n\t\tvar x2 = x1Pos + 238 - 14 - 286;\n\n\t\tfor (var i = -15; i < 0; i++) {\n\t\t\tvar w, s, t;\n\n\t\t\tw = enwindow[wp + -10];\n\t\t\ts = x1[x2 + -224] * w;\n\t\t\tt = x1[x1Pos + 224] * w;\n\t\t\tw = enwindow[wp + -9];\n\t\t\ts += x1[x2 + -160] * w;\n\t\t\tt += x1[x1Pos + 160] * w;\n\t\t\tw = enwindow[wp + -8];\n\t\t\ts += x1[x2 + -96] * w;\n\t\t\tt += x1[x1Pos + 96] * w;\n\t\t\tw = enwindow[wp + -7];\n\t\t\ts += x1[x2 + -32] * w;\n\t\t\tt += x1[x1Pos + 32] * w;\n\t\t\tw = enwindow[wp + -6];\n\t\t\ts += x1[x2 + 32] * w;\n\t\t\tt += x1[x1Pos + -32] * w;\n\t\t\tw = enwindow[wp + -5];\n\t\t\ts += x1[x2 + 96] * w;\n\t\t\tt += x1[x1Pos + -96] * w;\n\t\t\tw = enwindow[wp + -4];\n\t\t\ts += x1[x2 + 160] * w;\n\t\t\tt += x1[x1Pos + -160] * w;\n\t\t\tw = enwindow[wp + -3];\n\t\t\ts += x1[x2 + 224] * w;\n\t\t\tt += x1[x1Pos + -224] * w;\n\n\t\t\tw = enwindow[wp + -2];\n\t\t\ts += x1[x1Pos + -256] * w;\n\t\t\tt -= x1[x2 + 256] * w;\n\t\t\tw = enwindow[wp + -1];\n\t\t\ts += x1[x1Pos + -192] * w;\n\t\t\tt -= x1[x2 + 192] * w;\n\t\t\tw = enwindow[wp + 0];\n\t\t\ts += x1[x1Pos + -128] * w;\n\t\t\tt -= x1[x2 + 128] * w;\n\t\t\tw = enwindow[wp + 1];\n\t\t\ts += x1[x1Pos + -64] * w;\n\t\t\tt -= x1[x2 + 64] * w;\n\t\t\tw = enwindow[wp + 2];\n\t\t\ts += x1[x1Pos + 0] * w;\n\t\t\tt -= x1[x2 + 0] * w;\n\t\t\tw = enwindow[wp + 3];\n\t\t\ts += x1[x1Pos + 64] * w;\n\t\t\tt -= x1[x2 + -64] * w;\n\t\t\tw = enwindow[wp + 4];\n\t\t\ts += x1[x1Pos + 128] * w;\n\t\t\tt -= x1[x2 + -128] * w;\n\t\t\tw = enwindow[wp + 5];\n\t\t\ts += x1[x1Pos + 192] * w;\n\t\t\tt -= x1[x2 + -192] * w;\n\n\t\t\t/*\n\t\t\t * this multiplyer could be removed, but it needs more 256 FLOAT\n\t\t\t * data. thinking about the data cache performance, I think we\n\t\t\t * should not use such a huge table. tt 2000/Oct/25\n\t\t\t */\n\t\t\ts *= enwindow[wp + 6];\n\t\t\tw = t - s;\n\t\t\ta[30 + i * 2] = t + s;\n\t\t\ta[31 + i * 2] = enwindow[wp + 7] * w;\n\t\t\twp += 18;\n\t\t\tx1Pos--;\n\t\t\tx2++;\n\t\t}\n\t\t{\n\t\t\tvar s, t, u, v;\n\t\t\tt = x1[x1Pos + -16] * enwindow[wp + -10];\n\t\t\ts = x1[x1Pos + -32] * enwindow[wp + -2];\n\t\t\tt += (x1[x1Pos + -48] - x1[x1Pos + 16]) * enwindow[wp + -9];\n\t\t\ts += x1[x1Pos + -96] * enwindow[wp + -1];\n\t\t\tt += (x1[x1Pos + -80] + x1[x1Pos + 48]) * enwindow[wp + -8];\n\t\t\ts += x1[x1Pos + -160] * enwindow[wp + 0];\n\t\t\tt += (x1[x1Pos + -112] - x1[x1Pos + 80]) * enwindow[wp + -7];\n\t\t\ts += x1[x1Pos + -224] * enwindow[wp + 1];\n\t\t\tt += (x1[x1Pos + -144] + x1[x1Pos + 112]) * enwindow[wp + -6];\n\t\t\ts -= x1[x1Pos + 32] * enwindow[wp + 2];\n\t\t\tt += (x1[x1Pos + -176] - x1[x1Pos + 144]) * enwindow[wp + -5];\n\t\t\ts -= x1[x1Pos + 96] * enwindow[wp + 3];\n\t\t\tt += (x1[x1Pos + -208] + x1[x1Pos + 176]) * enwindow[wp + -4];\n\t\t\ts -= x1[x1Pos + 160] * enwindow[wp + 4];\n\t\t\tt += (x1[x1Pos + -240] - x1[x1Pos + 208]) * enwindow[wp + -3];\n\t\t\ts -= x1[x1Pos + 224];\n\n\t\t\tu = s - t;\n\t\t\tv = s + t;\n\n\t\t\tt = a[14];\n\t\t\ts = a[15] - t;\n\n\t\t\ta[31] = v + t; /* A0 */\n\t\t\ta[30] = u + s; /* A1 */\n\t\t\ta[15] = u - s; /* A2 */\n\t\t\ta[14] = v - t; /* A3 */\n\t\t}\n\t\t{\n\t\t\tvar xr;\n\t\t\txr = a[28] - a[0];\n\t\t\ta[0] += a[28];\n\t\t\ta[28] = xr * enwindow[wp + -2 * 18 + 7];\n\t\t\txr = a[29] - a[1];\n\t\t\ta[1] += a[29];\n\t\t\ta[29] = xr * enwindow[wp + -2 * 18 + 7];\n\n\t\t\txr = a[26] - a[2];\n\t\t\ta[2] += a[26];\n\t\t\ta[26] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[27] - a[3];\n\t\t\ta[3] += a[27];\n\t\t\ta[27] = xr * enwindow[wp + -4 * 18 + 7];\n\n\t\t\txr = a[24] - a[4];\n\t\t\ta[4] += a[24];\n\t\t\ta[24] = xr * enwindow[wp + -6 * 18 + 7];\n\t\t\txr = a[25] - a[5];\n\t\t\ta[5] += a[25];\n\t\t\ta[25] = xr * enwindow[wp + -6 * 18 + 7];\n\n\t\t\txr = a[22] - a[6];\n\t\t\ta[6] += a[22];\n\t\t\ta[22] = xr * Util.SQRT2;\n\t\t\txr = a[23] - a[7];\n\t\t\ta[7] += a[23];\n\t\t\ta[23] = xr * Util.SQRT2 - a[7];\n\t\t\ta[7] -= a[6];\n\t\t\ta[22] -= a[7];\n\t\t\ta[23] -= a[22];\n\n\t\t\txr = a[6];\n\t\t\ta[6] = a[31] - xr;\n\t\t\ta[31] = a[31] + xr;\n\t\t\txr = a[7];\n\t\t\ta[7] = a[30] - xr;\n\t\t\ta[30] = a[30] + xr;\n\t\t\txr = a[22];\n\t\t\ta[22] = a[15] - xr;\n\t\t\ta[15] = a[15] + xr;\n\t\t\txr = a[23];\n\t\t\ta[23] = a[14] - xr;\n\t\t\ta[14] = a[14] + xr;\n\n\t\t\txr = a[20] - a[8];\n\t\t\ta[8] += a[20];\n\t\t\ta[20] = xr * enwindow[wp + -10 * 18 + 7];\n\t\t\txr = a[21] - a[9];\n\t\t\ta[9] += a[21];\n\t\t\ta[21] = xr * enwindow[wp + -10 * 18 + 7];\n\n\t\t\txr = a[18] - a[10];\n\t\t\ta[10] += a[18];\n\t\t\ta[18] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = a[19] - a[11];\n\t\t\ta[11] += a[19];\n\t\t\ta[19] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[16] - a[12];\n\t\t\ta[12] += a[16];\n\t\t\ta[16] = xr * enwindow[wp + -14 * 18 + 7];\n\t\t\txr = a[17] - a[13];\n\t\t\ta[13] += a[17];\n\t\t\ta[17] = xr * enwindow[wp + -14 * 18 + 7];\n\n\t\t\txr = -a[20] + a[24];\n\t\t\ta[20] += a[24];\n\t\t\ta[24] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = -a[21] + a[25];\n\t\t\ta[21] += a[25];\n\t\t\ta[25] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[4] - a[8];\n\t\t\ta[4] += a[8];\n\t\t\ta[8] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = a[5] - a[9];\n\t\t\ta[5] += a[9];\n\t\t\ta[9] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[0] - a[12];\n\t\t\ta[0] += a[12];\n\t\t\ta[12] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[1] - a[13];\n\t\t\ta[1] += a[13];\n\t\t\ta[13] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[16] - a[28];\n\t\t\ta[16] += a[28];\n\t\t\ta[28] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = -a[17] + a[29];\n\t\t\ta[17] += a[29];\n\t\t\ta[29] = xr * enwindow[wp + -4 * 18 + 7];\n\n\t\t\txr = Util.SQRT2 * (a[2] - a[10]);\n\t\t\ta[2] += a[10];\n\t\t\ta[10] = xr;\n\t\t\txr = Util.SQRT2 * (a[3] - a[11]);\n\t\t\ta[3] += a[11];\n\t\t\ta[11] = xr;\n\t\t\txr = Util.SQRT2 * (-a[18] + a[26]);\n\t\t\ta[18] += a[26];\n\t\t\ta[26] = xr - a[18];\n\t\t\txr = Util.SQRT2 * (-a[19] + a[27]);\n\t\t\ta[19] += a[27];\n\t\t\ta[27] = xr - a[19];\n\n\t\t\txr = a[2];\n\t\t\ta[19] -= a[3];\n\t\t\ta[3] -= xr;\n\t\t\ta[2] = a[31] - xr;\n\t\t\ta[31] += xr;\n\t\t\txr = a[3];\n\t\t\ta[11] -= a[19];\n\t\t\ta[18] -= xr;\n\t\t\ta[3] = a[30] - xr;\n\t\t\ta[30] += xr;\n\t\t\txr = a[18];\n\t\t\ta[27] -= a[11];\n\t\t\ta[19] -= xr;\n\t\t\ta[18] = a[15] - xr;\n\t\t\ta[15] += xr;\n\n\t\t\txr = a[19];\n\t\t\ta[10] -= xr;\n\t\t\ta[19] = a[14] - xr;\n\t\t\ta[14] += xr;\n\t\t\txr = a[10];\n\t\t\ta[11] -= xr;\n\t\t\ta[10] = a[23] - xr;\n\t\t\ta[23] += xr;\n\t\t\txr = a[11];\n\t\t\ta[26] -= xr;\n\t\t\ta[11] = a[22] - xr;\n\t\t\ta[22] += xr;\n\t\t\txr = a[26];\n\t\t\ta[27] -= xr;\n\t\t\ta[26] = a[7] - xr;\n\t\t\ta[7] += xr;\n\n\t\t\txr = a[27];\n\t\t\ta[27] = a[6] - xr;\n\t\t\ta[6] += xr;\n\n\t\t\txr = Util.SQRT2 * (a[0] - a[4]);\n\t\t\ta[0] += a[4];\n\t\t\ta[4] = xr;\n\t\t\txr = Util.SQRT2 * (a[1] - a[5]);\n\t\t\ta[1] += a[5];\n\t\t\ta[5] = xr;\n\t\t\txr = Util.SQRT2 * (a[16] - a[20]);\n\t\t\ta[16] += a[20];\n\t\t\ta[20] = xr;\n\t\t\txr = Util.SQRT2 * (a[17] - a[21]);\n\t\t\ta[17] += a[21];\n\t\t\ta[21] = xr;\n\n\t\t\txr = -Util.SQRT2 * (a[8] - a[12]);\n\t\t\ta[8] += a[12];\n\t\t\ta[12] = xr - a[8];\n\t\t\txr = -Util.SQRT2 * (a[9] - a[13]);\n\t\t\ta[9] += a[13];\n\t\t\ta[13] = xr - a[9];\n\t\t\txr = -Util.SQRT2 * (a[25] - a[29]);\n\t\t\ta[25] += a[29];\n\t\t\ta[29] = xr - a[25];\n\t\t\txr = -Util.SQRT2 * (a[24] + a[28]);\n\t\t\ta[24] -= a[28];\n\t\t\ta[28] = xr - a[24];\n\n\t\t\txr = a[24] - a[16];\n\t\t\ta[24] = xr;\n\t\t\txr = a[20] - xr;\n\t\t\ta[20] = xr;\n\t\t\txr = a[28] - xr;\n\t\t\ta[28] = xr;\n\n\t\t\txr = a[25] - a[17];\n\t\t\ta[25] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[17] - a[1];\n\t\t\ta[17] = xr;\n\t\t\txr = a[9] - xr;\n\t\t\ta[9] = xr;\n\t\t\txr = a[25] - xr;\n\t\t\ta[25] = xr;\n\t\t\txr = a[5] - xr;\n\t\t\ta[5] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[13] - xr;\n\t\t\ta[13] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[1] - a[0];\n\t\t\ta[1] = xr;\n\t\t\txr = a[16] - xr;\n\t\t\ta[16] = xr;\n\t\t\txr = a[17] - xr;\n\t\t\ta[17] = xr;\n\t\t\txr = a[8] - xr;\n\t\t\ta[8] = xr;\n\t\t\txr = a[9] - xr;\n\t\t\ta[9] = xr;\n\t\t\txr = a[24] - xr;\n\t\t\ta[24] = xr;\n\t\t\txr = a[25] - xr;\n\t\t\ta[25] = xr;\n\t\t\txr = a[4] - xr;\n\t\t\ta[4] = xr;\n\t\t\txr = a[5] - xr;\n\t\t\ta[5] = xr;\n\t\t\txr = a[20] - xr;\n\t\t\ta[20] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[12] - xr;\n\t\t\ta[12] = xr;\n\t\t\txr = a[13] - xr;\n\t\t\ta[13] = xr;\n\t\t\txr = a[28] - xr;\n\t\t\ta[28] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[0];\n\t\t\ta[0] += a[31];\n\t\t\ta[31] -= xr;\n\t\t\txr = a[1];\n\t\t\ta[1] += a[30];\n\t\t\ta[30] -= xr;\n\t\t\txr = a[16];\n\t\t\ta[16] += a[15];\n\t\t\ta[15] -= xr;\n\t\t\txr = a[17];\n\t\t\ta[17] += a[14];\n\t\t\ta[14] -= xr;\n\t\t\txr = a[8];\n\t\t\ta[8] += a[23];\n\t\t\ta[23] -= xr;\n\t\t\txr = a[9];\n\t\t\ta[9] += a[22];\n\t\t\ta[22] -= xr;\n\t\t\txr = a[24];\n\t\t\ta[24] += a[7];\n\t\t\ta[7] -= xr;\n\t\t\txr = a[25];\n\t\t\ta[25] += a[6];\n\t\t\ta[6] -= xr;\n\t\t\txr = a[4];\n\t\t\ta[4] += a[27];\n\t\t\ta[27] -= xr;\n\t\t\txr = a[5];\n\t\t\ta[5] += a[26];\n\t\t\ta[26] -= xr;\n\t\t\txr = a[20];\n\t\t\ta[20] += a[11];\n\t\t\ta[11] -= xr;\n\t\t\txr = a[21];\n\t\t\ta[21] += a[10];\n\t\t\ta[10] -= xr;\n\t\t\txr = a[12];\n\t\t\ta[12] += a[19];\n\t\t\ta[19] -= xr;\n\t\t\txr = a[13];\n\t\t\ta[13] += a[18];\n\t\t\ta[18] -= xr;\n\t\t\txr = a[28];\n\t\t\ta[28] += a[3];\n\t\t\ta[3] -= xr;\n\t\t\txr = a[29];\n\t\t\ta[29] += a[2];\n\t\t\ta[2] -= xr;\n\t\t}\n\t}\n\n\t/**\n\t * Function: Calculation of the MDCT In the case of long blocks (type 0,1,3)\n\t * there are 36 coefficents in the time domain and 18 in the frequency\n\t * domain.
\n\t * In the case of short blocks (type 2) there are 3 transformations with\n\t * short length. This leads to 12 coefficents in the time and 6 in the\n\t * frequency domain. In this case the results are stored side by side in the\n\t * vector out[].\n\t *\n\t * New layer3\n\t */\n\tfunction mdct_short(inout, inoutPos) {\n\t\tfor (var l = 0; l < 3; l++) {\n\t\t\tvar tc0, tc1, tc2, ts0, ts1, ts2;\n\n\t\t\tts0 = inout[inoutPos + 2 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t- inout[inoutPos + 5 * 3];\n\t\t\ttc0 = inout[inoutPos + 0 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t- inout[inoutPos + 3 * 3];\n\t\t\ttc1 = ts0 + tc0;\n\t\t\ttc2 = ts0 - tc0;\n\n\t\t\tts0 = inout[inoutPos + 5 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t+ inout[inoutPos + 2 * 3];\n\t\t\ttc0 = inout[inoutPos + 3 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t+ inout[inoutPos + 0 * 3];\n\t\t\tts1 = ts0 + tc0;\n\t\t\tts2 = -ts0 + tc0;\n\n\t\t\ttc0 = (inout[inoutPos + 1 * 3] * win[Encoder.SHORT_TYPE][1] - inout[inoutPos + 4 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tts0 = (inout[inoutPos + 4 * 3] * win[Encoder.SHORT_TYPE][1] + inout[inoutPos + 1 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 0] = tc1 * 1.907525191737280e-11 + tc0;\n\t\t\t/*\n\t\t\t * tritab_s[ 2 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 5] = -ts1 * 1.907525191737280e-11 + ts0;\n\t\t\t/*\n\t\t\t * tritab_s[0 ]\n\t\t\t */\n\t\t\ttc2 = tc2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 2]\n\t\t\t */\n\t\t\tts1 = ts1 * 0.5 * 1.907525191737281e-11 + ts0;\n\t\t\tinout[inoutPos + 3 * 1] = tc2 - ts1;\n\t\t\tinout[inoutPos + 3 * 2] = tc2 + ts1;\n\n\t\t\ttc1 = tc1 * 0.5 * 1.907525191737281e-11 - tc0;\n\t\t\tts2 = ts2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 0]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 3] = tc1 + ts2;\n\t\t\tinout[inoutPos + 3 * 4] = tc1 - ts2;\n\n\t\t\tinoutPos++;\n\t\t}\n\t}\n\n\tfunction mdct_long(out, outPos, _in) {\n\t\tvar ct, st;\n\t\t{\n\t\t\tvar tc1, tc2, tc3, tc4, ts5, ts6, ts7, ts8;\n\t\t\t/* 1,2, 5,6, 9,10, 13,14, 17 */\n\t\t\ttc1 = _in[17] - _in[9];\n\t\t\ttc3 = _in[15] - _in[11];\n\t\t\ttc4 = _in[14] - _in[12];\n\t\t\tts5 = _in[0] + _in[8];\n\t\t\tts6 = _in[1] + _in[7];\n\t\t\tts7 = _in[2] + _in[6];\n\t\t\tts8 = _in[3] + _in[5];\n\n\t\t\tout[outPos + 17] = (ts5 + ts7 - ts8) - (ts6 - _in[4]);\n\t\t\tst = (ts5 + ts7 - ts8) * cx[12 + 7] + (ts6 - _in[4]);\n\t\t\tct = (tc1 - tc3 - tc4) * cx[12 + 6];\n\t\t\tout[outPos + 5] = ct + st;\n\t\t\tout[outPos + 6] = ct - st;\n\n\t\t\ttc2 = (_in[16] - _in[10]) * cx[12 + 6];\n\t\t\tts6 = ts6 * cx[12 + 7] + _in[4];\n\t\t\tct = tc1 * cx[12 + 0] + tc2 + tc3 * cx[12 + 1] + tc4 * cx[12 + 2];\n\t\t\tst = -ts5 * cx[12 + 4] + ts6 - ts7 * cx[12 + 5] + ts8 * cx[12 + 3];\n\t\t\tout[outPos + 1] = ct + st;\n\t\t\tout[outPos + 2] = ct - st;\n\n\t\t\tct = tc1 * cx[12 + 1] - tc2 - tc3 * cx[12 + 2] + tc4 * cx[12 + 0];\n\t\t\tst = -ts5 * cx[12 + 5] + ts6 - ts7 * cx[12 + 3] + ts8 * cx[12 + 4];\n\t\t\tout[outPos + 9] = ct + st;\n\t\t\tout[outPos + 10] = ct - st;\n\n\t\t\tct = tc1 * cx[12 + 2] - tc2 + tc3 * cx[12 + 0] - tc4 * cx[12 + 1];\n\t\t\tst = ts5 * cx[12 + 3] - ts6 + ts7 * cx[12 + 4] - ts8 * cx[12 + 5];\n\t\t\tout[outPos + 13] = ct + st;\n\t\t\tout[outPos + 14] = ct - st;\n\t\t}\n\t\t{\n\t\t\tvar ts1, ts2, ts3, ts4, tc5, tc6, tc7, tc8;\n\n\t\t\tts1 = _in[8] - _in[0];\n\t\t\tts3 = _in[6] - _in[2];\n\t\t\tts4 = _in[5] - _in[3];\n\t\t\ttc5 = _in[17] + _in[9];\n\t\t\ttc6 = _in[16] + _in[10];\n\t\t\ttc7 = _in[15] + _in[11];\n\t\t\ttc8 = _in[14] + _in[12];\n\n\t\t\tout[outPos + 0] = (tc5 + tc7 + tc8) + (tc6 + _in[13]);\n\t\t\tct = (tc5 + tc7 + tc8) * cx[12 + 7] - (tc6 + _in[13]);\n\t\t\tst = (ts1 - ts3 + ts4) * cx[12 + 6];\n\t\t\tout[outPos + 11] = ct + st;\n\t\t\tout[outPos + 12] = ct - st;\n\n\t\t\tts2 = (_in[7] - _in[1]) * cx[12 + 6];\n\t\t\ttc6 = _in[13] - tc6 * cx[12 + 7];\n\t\t\tct = tc5 * cx[12 + 3] - tc6 + tc7 * cx[12 + 4] + tc8 * cx[12 + 5];\n\t\t\tst = ts1 * cx[12 + 2] + ts2 + ts3 * cx[12 + 0] + ts4 * cx[12 + 1];\n\t\t\tout[outPos + 3] = ct + st;\n\t\t\tout[outPos + 4] = ct - st;\n\n\t\t\tct = -tc5 * cx[12 + 5] + tc6 - tc7 * cx[12 + 3] - tc8 * cx[12 + 4];\n\t\t\tst = ts1 * cx[12 + 1] + ts2 - ts3 * cx[12 + 2] - ts4 * cx[12 + 0];\n\t\t\tout[outPos + 7] = ct + st;\n\t\t\tout[outPos + 8] = ct - st;\n\n\t\t\tct = -tc5 * cx[12 + 4] + tc6 - tc7 * cx[12 + 5] - tc8 * cx[12 + 3];\n\t\t\tst = ts1 * cx[12 + 0] - ts2 + ts3 * cx[12 + 1] - ts4 * cx[12 + 2];\n\t\t\tout[outPos + 15] = ct + st;\n\t\t\tout[outPos + 16] = ct - st;\n\t\t}\n\t}\n\n\tthis.mdct_sub48 = function(gfc, w0, w1) {\n\t\tvar wk = w0;\n\t\tvar wkPos = 286;\n\t\t/* thinking cache performance, ch->gr loop is better than gr->ch loop */\n\t\tfor (var ch = 0; ch < gfc.channels_out; ch++) {\n\t\t\tfor (var gr = 0; gr < gfc.mode_gr; gr++) {\n\t\t\t\tvar band;\n\t\t\t\tvar gi = (gfc.l3_side.tt[gr][ch]);\n\t\t\t\tvar mdct_enc = gi.xr;\n\t\t\t\tvar mdct_encPos = 0;\n\t\t\t\tvar samp = gfc.sb_sample[ch][1 - gr];\n\t\t\t\tvar sampPos = 0;\n\n\t\t\t\tfor (var k = 0; k < 18 / 2; k++) {\n\t\t\t\t\twindow_subband(wk, wkPos, samp[sampPos]);\n\t\t\t\t\twindow_subband(wk, wkPos + 32, samp[sampPos + 1]);\n\t\t\t\t\tsampPos += 2;\n\t\t\t\t\twkPos += 64;\n\t\t\t\t\t/*\n\t\t\t\t\t * Compensate for inversion in the analysis filter\n\t\t\t\t\t */\n\t\t\t\t\tfor (band = 1; band < 32; band += 2) {\n\t\t\t\t\t\tsamp[sampPos - 1][band] *= -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * Perform imdct of 18 previous subband samples + 18 current\n\t\t\t\t * subband samples\n\t\t\t\t */\n\t\t\t\tfor (band = 0; band < 32; band++, mdct_encPos += 18) {\n\t\t\t\t\tvar type = gi.block_type;\n\t\t\t\t\tvar band0 = gfc.sb_sample[ch][gr];\n\t\t\t\t\tvar band1 = gfc.sb_sample[ch][1 - gr];\n\t\t\t\t\tif (gi.mixed_block_flag != 0 && band < 2)\n\t\t\t\t\t\ttype = 0;\n\t\t\t\t\tif (gfc.amp_filter[band] < 1e-12) {\n\t\t\t\t\t\tArrays.fill(mdct_enc, mdct_encPos + 0,\n\t\t\t\t\t\t\t\tmdct_encPos + 18, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (gfc.amp_filter[band] < 1.0) {\n\t\t\t\t\t\t\tfor (var k = 0; k < 18; k++)\n\t\t\t\t\t\t\t\tband1[k][order[band]] *= gfc.amp_filter[band];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (type == Encoder.SHORT_TYPE) {\n\t\t\t\t\t\t\tfor (var k = -NS / 4; k < 0; k++) {\n\t\t\t\t\t\t\t\tvar w = win[Encoder.SHORT_TYPE][k + 3];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 9] = band0[9 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band0[8 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 18] = band0[14 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band0[15 + k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 10] = band0[15 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band0[14 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 19] = band1[2 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band1[3 + k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 11] = band1[3 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band1[2 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 20] = band1[8 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band1[9 + k][order[band]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmdct_short(mdct_enc, mdct_encPos);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar work = new_float(18);\n\t\t\t\t\t\t\tfor (var k = -NL / 4; k < 0; k++) {\n\t\t\t\t\t\t\t\tvar a, b;\n\t\t\t\t\t\t\t\ta = win[type][k + 27]\n\t\t\t\t\t\t\t\t\t\t* band1[k + 9][order[band]]\n\t\t\t\t\t\t\t\t\t\t+ win[type][k + 36]\n\t\t\t\t\t\t\t\t\t\t* band1[8 - k][order[band]];\n\t\t\t\t\t\t\t\tb = win[type][k + 9]\n\t\t\t\t\t\t\t\t\t\t* band0[k + 9][order[band]]\n\t\t\t\t\t\t\t\t\t\t- win[type][k + 18]\n\t\t\t\t\t\t\t\t\t\t* band0[8 - k][order[band]];\n\t\t\t\t\t\t\t\twork[k + 9] = a - b * tantab_l[3 + k + 9];\n\t\t\t\t\t\t\t\twork[k + 18] = a * tantab_l[3 + k + 9] + b;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmdct_long(mdct_enc, mdct_encPos, work);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * Perform aliasing reduction butterfly\n\t\t\t\t\t */\n\t\t\t\t\tif (type != Encoder.SHORT_TYPE && band != 0) {\n\t\t\t\t\t\tfor (var k = 7; k >= 0; --k) {\n\t\t\t\t\t\t\tvar bu, bd;\n\t\t\t\t\t\t\tbu = mdct_enc[mdct_encPos + k] * ca[20 + k]\n\t\t\t\t\t\t\t\t\t+ mdct_enc[mdct_encPos + -1 - k]\n\t\t\t\t\t\t\t\t\t* cs[28 + k];\n\t\t\t\t\t\t\tbd = mdct_enc[mdct_encPos + k] * cs[28 + k]\n\t\t\t\t\t\t\t\t\t- mdct_enc[mdct_encPos + -1 - k]\n\t\t\t\t\t\t\t\t\t* ca[20 + k];\n\n\t\t\t\t\t\t\tmdct_enc[mdct_encPos + -1 - k] = bu;\n\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k] = bd;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\twk = w1;\n\t\t\twkPos = 286;\n\t\t\tif (gfc.mode_gr == 1) {\n\t\t\t\tfor (var i = 0; i < 18; i++) {\n\t\t\t\t\tSystem.arraycopy(gfc.sb_sample[ch][1][i], 0,\n\t\t\t\t\t\t\tgfc.sb_sample[ch][0][i], 0, 32);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = NewMDCT;\n","var Encoder = require('./Encoder.js');\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nfunction III_psy_xmin() {\n this.l = new_float(Encoder.SBMAX_l);\n this.s = new_float_n([Encoder.SBMAX_s, 3]);\n\n var self = this;\n this.assign = function (iii_psy_xmin) {\n System.arraycopy(iii_psy_xmin.l, 0, self.l, 0, Encoder.SBMAX_l);\n for (var i = 0; i < Encoder.SBMAX_s; i++) {\n for (var j = 0; j < 3; j++) {\n self.s[i][j] = iii_psy_xmin.s[i][j];\n }\n }\n }\n}\n\nmodule.exports = III_psy_xmin;\n","//package mp3;\n\nvar III_psy_xmin = require('./III_psy_xmin.js');\n\nfunction III_psy_ratio() {\n\tthis.thm = new III_psy_xmin();\n\tthis.en = new III_psy_xmin();\n}\n\nmodule.exports = III_psy_ratio;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * ENCDELAY The encoder delay.\n *\n * Minimum allowed is MDCTDELAY (see below)\n *\n * The first 96 samples will be attenuated, so using a value less than 96\n * will result in corrupt data for the first 96-ENCDELAY samples.\n *\n * suggested: 576 set to 1160 to sync with FhG.\n */\nEncoder.ENCDELAY = 576;\n/**\n * make sure there is at least one complete frame after the last frame\n * containing real data\n *\n * Using a value of 288 would be sufficient for a a very sophisticated\n * decoder that can decode granule-by-granule instead of frame by frame. But\n * lets not assume this, and assume the decoder will not decode frame N\n * unless it also has data for frame N+1\n */\nEncoder.POSTDELAY = 1152;\n\n/**\n * delay of the MDCT used in mdct.c original ISO routines had a delay of\n * 528! Takehiro's routines:\n */\nEncoder.MDCTDELAY = 48;\nEncoder.FFTOFFSET = (224 + Encoder.MDCTDELAY);\n\n/**\n * Most decoders, including the one we use, have a delay of 528 samples.\n */\nEncoder.DECDELAY = 528;\n\n/**\n * number of subbands\n */\nEncoder.SBLIMIT = 32;\n\n/**\n * parition bands bands\n */\nEncoder.CBANDS = 64;\n\n/**\n * number of critical bands/scale factor bands where masking is computed\n */\nEncoder.SBPSY_l = 21;\nEncoder.SBPSY_s = 12;\n\n/**\n * total number of scalefactor bands encoded\n */\nEncoder.SBMAX_l = 22;\nEncoder.SBMAX_s = 13;\nEncoder.PSFB21 = 6;\nEncoder.PSFB12 = 6;\n\n/**\n * FFT sizes\n */\nEncoder.BLKSIZE = 1024;\nEncoder.HBLKSIZE = (Encoder.BLKSIZE / 2 + 1);\nEncoder.BLKSIZE_s = 256;\nEncoder.HBLKSIZE_s = (Encoder.BLKSIZE_s / 2 + 1);\n\nEncoder.NORM_TYPE = 0;\nEncoder.START_TYPE = 1;\nEncoder.SHORT_TYPE = 2;\nEncoder.STOP_TYPE = 3;\n\n/**\n *
\n * Mode Extention:\n * When we are in stereo mode, there are 4 possible methods to store these\n * two channels. The stereo modes -m? are using a subset of them.\n *\n *  -ms: MPG_MD_LR_LR\n *  -mj: MPG_MD_LR_LR and MPG_MD_MS_LR\n *  -mf: MPG_MD_MS_LR\n *  -mi: all\n * 
\n */\nEncoder.MPG_MD_LR_LR = 0;\nEncoder.MPG_MD_LR_I = 1;\nEncoder.MPG_MD_MS_LR = 2;\nEncoder.MPG_MD_MS_I = 3;\n\nEncoder.fircoef = [-0.0207887 * 5, -0.0378413 * 5,\n -0.0432472 * 5, -0.031183 * 5, 7.79609e-18 * 5, 0.0467745 * 5,\n 0.10091 * 5, 0.151365 * 5, 0.187098 * 5];\n\nfunction Encoder() {\n var NewMDCT = require('./NewMDCT.js');\n var III_psy_ratio = require('./III_psy_ratio.js');\n\n var FFTOFFSET = Encoder.FFTOFFSET;\n var MPG_MD_MS_LR = Encoder.MPG_MD_MS_LR;\n //BitStream bs;\n //PsyModel psy;\n //VBRTag vbr;\n //QuantizePVT qupvt;\n var bs = null;\n this.psy = null;\n var psy = null;\n var vbr = null;\n var qupvt = null;\n\n //public final void setModules(BitStream bs, PsyModel psy, QuantizePVT qupvt,\n // VBRTag vbr) {\n this.setModules = function (_bs, _psy, _qupvt, _vbr) {\n bs = _bs;\n this.psy = _psy;\n psy = _psy;\n vbr = _vbr;\n qupvt = _qupvt;\n };\n\n var newMDCT = new NewMDCT();\n\n /***********************************************************************\n *\n * encoder and decoder delays\n *\n ***********************************************************************/\n\n /**\n *
\n     * layer III enc->dec delay:  1056 (1057?)   (observed)\n     * layer  II enc->dec delay:   480  (481?)   (observed)\n     *\n     * polyphase 256-16             (dec or enc)        = 240\n     * mdct      256+32  (9*32)     (dec or enc)        = 288\n     * total:    512+16\n     *\n     * My guess is that delay of polyphase filterbank is actualy 240.5\n     * (there are technical reasons for this, see postings in mp3encoder).\n     * So total Encode+Decode delay = ENCDELAY + 528 + 1\n     * 
\n */\n\n\n /**\n * auto-adjust of ATH, useful for low volume Gabriel Bouvigne 3 feb 2001\n *\n * modifies some values in gfp.internal_flags.ATH (gfc.ATH)\n */\n//private void adjust_ATH(final LameInternalFlags gfc) {\n function adjust_ATH(gfc) {\n var gr2_max, max_pow;\n\n if (gfc.ATH.useAdjust == 0) {\n gfc.ATH.adjust = 1.0;\n /* no adjustment */\n return;\n }\n\n /* jd - 2001 mar 12, 27, jun 30 */\n /* loudness based on equal loudness curve; */\n /* use granule with maximum combined loudness */\n max_pow = gfc.loudness_sq[0][0];\n gr2_max = gfc.loudness_sq[1][0];\n if (gfc.channels_out == 2) {\n max_pow += gfc.loudness_sq[0][1];\n gr2_max += gfc.loudness_sq[1][1];\n } else {\n max_pow += max_pow;\n gr2_max += gr2_max;\n }\n if (gfc.mode_gr == 2) {\n max_pow = Math.max(max_pow, gr2_max);\n }\n max_pow *= 0.5;\n /* max_pow approaches 1.0 for full band noise */\n\n /* jd - 2001 mar 31, jun 30 */\n /* user tuning of ATH adjustment region */\n max_pow *= gfc.ATH.aaSensitivityP;\n\n /*\n * adjust ATH depending on range of maximum value\n */\n\n /* jd - 2001 feb27, mar12,20, jun30, jul22 */\n /* continuous curves based on approximation */\n /* to GB's original values. */\n /* For an increase in approximate loudness, */\n /* set ATH adjust to adjust_limit immediately */\n /* after a delay of one frame. */\n /* For a loudness decrease, reduce ATH adjust */\n /* towards adjust_limit gradually. */\n /* max_pow is a loudness squared or a power. */\n if (max_pow > 0.03125) { /* ((1 - 0.000625)/ 31.98) from curve below */\n if (gfc.ATH.adjust >= 1.0) {\n gfc.ATH.adjust = 1.0;\n } else {\n /* preceding frame has lower ATH adjust; */\n /* ascend only to the preceding adjust_limit */\n /* in case there is leading low volume */\n if (gfc.ATH.adjust < gfc.ATH.adjustLimit) {\n gfc.ATH.adjust = gfc.ATH.adjustLimit;\n }\n }\n gfc.ATH.adjustLimit = 1.0;\n } else { /* adjustment curve */\n /* about 32 dB maximum adjust (0.000625) */\n var adj_lim_new = 31.98 * max_pow + 0.000625;\n if (gfc.ATH.adjust >= adj_lim_new) { /* descend gradually */\n gfc.ATH.adjust *= adj_lim_new * 0.075 + 0.925;\n if (gfc.ATH.adjust < adj_lim_new) { /* stop descent */\n gfc.ATH.adjust = adj_lim_new;\n }\n } else { /* ascend */\n if (gfc.ATH.adjustLimit >= adj_lim_new) {\n gfc.ATH.adjust = adj_lim_new;\n } else {\n /* preceding frame has lower ATH adjust; */\n /* ascend only to the preceding adjust_limit */\n if (gfc.ATH.adjust < gfc.ATH.adjustLimit) {\n gfc.ATH.adjust = gfc.ATH.adjustLimit;\n }\n }\n }\n gfc.ATH.adjustLimit = adj_lim_new;\n }\n }\n\n /**\n *
\n     *  some simple statistics\n     *\n     *  bitrate index 0: free bitrate . not allowed in VBR mode\n     *  : bitrates, kbps depending on MPEG version\n     *  bitrate index 15: forbidden\n     *\n     *  mode_ext:\n     *  0:  LR\n     *  1:  LR-i\n     *  2:  MS\n     *  3:  MS-i\n     * 
\n */\n function updateStats(gfc) {\n var gr, ch;\n assert(0 <= gfc.bitrate_index && gfc.bitrate_index < 16);\n assert(0 <= gfc.mode_ext && gfc.mode_ext < 4);\n\n /* count bitrate indices */\n gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][4]++;\n gfc.bitrate_stereoMode_Hist[15][4]++;\n\n /* count 'em for every mode extension in case of 2 channel encoding */\n if (gfc.channels_out == 2) {\n gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][gfc.mode_ext]++;\n gfc.bitrate_stereoMode_Hist[15][gfc.mode_ext]++;\n }\n for (gr = 0; gr < gfc.mode_gr; ++gr) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n var bt = gfc.l3_side.tt[gr][ch].block_type | 0;\n if (gfc.l3_side.tt[gr][ch].mixed_block_flag != 0)\n bt = 4;\n gfc.bitrate_blockType_Hist[gfc.bitrate_index][bt]++;\n gfc.bitrate_blockType_Hist[gfc.bitrate_index][5]++;\n gfc.bitrate_blockType_Hist[15][bt]++;\n gfc.bitrate_blockType_Hist[15][5]++;\n }\n }\n }\n\n function lame_encode_frame_init(gfp, inbuf) {\n var gfc = gfp.internal_flags;\n\n var ch, gr;\n\n if (gfc.lame_encode_frame_init == 0) {\n /* prime the MDCT/polyphase filterbank with a short block */\n var i, j;\n var primebuff0 = new_float(286 + 1152 + 576);\n var primebuff1 = new_float(286 + 1152 + 576);\n gfc.lame_encode_frame_init = 1;\n for (i = 0, j = 0; i < 286 + 576 * (1 + gfc.mode_gr); ++i) {\n if (i < 576 * gfc.mode_gr) {\n primebuff0[i] = 0;\n if (gfc.channels_out == 2)\n primebuff1[i] = 0;\n } else {\n primebuff0[i] = inbuf[0][j];\n if (gfc.channels_out == 2)\n primebuff1[i] = inbuf[1][j];\n ++j;\n }\n }\n /* polyphase filtering / mdct */\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.l3_side.tt[gr][ch].block_type = Encoder.SHORT_TYPE;\n }\n }\n newMDCT.mdct_sub48(gfc, primebuff0, primebuff1);\n\n /* check FFT will not use a negative starting offset */\n assert(576 >= Encoder.FFTOFFSET);\n /* check if we have enough data for FFT */\n assert(gfc.mf_size >= (Encoder.BLKSIZE + gfp.framesize - Encoder.FFTOFFSET));\n /* check if we have enough data for polyphase filterbank */\n assert(gfc.mf_size >= (512 + gfp.framesize - 32));\n }\n\n }\n\n /**\n *
\n     * encodeframe()           Layer 3\n     *\n     * encode a single frame\n     *\n     *\n     *    lame_encode_frame()\n     *\n     *\n     *                           gr 0            gr 1\n     *    inbuf:           |--------------|--------------|--------------|\n     *\n     *\n     *    Polyphase (18 windows, each shifted 32)\n     *    gr 0:\n     *    window1          <----512---.\n     *    window18                 <----512---.\n     *\n     *    gr 1:\n     *    window1                         <----512---.\n     *    window18                                <----512---.\n     *\n     *\n     *\n     *    MDCT output:  |--------------|--------------|--------------|\n     *\n     *    FFT's                    <---------1024---------.\n     *                                             <---------1024-------.\n     *\n     *\n     *\n     *        inbuf = buffer of PCM data size=MP3 framesize\n     *        encoder acts on inbuf[ch][0], but output is delayed by MDCTDELAY\n     *        so the MDCT coefficints are from inbuf[ch][-MDCTDELAY]\n     *\n     *        psy-model FFT has a 1 granule delay, so we feed it data for the\n     *        next granule.\n     *        FFT is centered over granule:  224+576+224\n     *        So FFT starts at:   576-224-MDCTDELAY\n     *\n     *        MPEG2:  FFT ends at:  BLKSIZE+576-224-MDCTDELAY      (1328)\n     *        MPEG1:  FFT ends at:  BLKSIZE+2*576-224-MDCTDELAY    (1904)\n     *\n     *        MPEG2:  polyphase first window:  [0..511]\n     *                          18th window:   [544..1055]          (1056)\n     *        MPEG1:            36th window:   [1120..1631]         (1632)\n     *                data needed:  512+framesize-32\n     *\n     *        A close look newmdct.c shows that the polyphase filterbank\n     *        only uses data from [0..510] for each window.  Perhaps because the window\n     *        used by the filterbank is zero for the last point, so Takehiro's\n     *        code doesn't bother to compute with it.\n     *\n     *        FFT starts at 576-224-MDCTDELAY (304)  = 576-FFTOFFSET\n     *\n     * 
\n */\n\n\n this.lame_encode_mp3_frame = function (gfp, inbuf_l, inbuf_r, mp3buf, mp3bufPos, mp3buf_size) {\n var mp3count;\n var masking_LR = new_array_n([2, 2]);\n /*\n * LR masking &\n * energy\n */\n masking_LR[0][0] = new III_psy_ratio();\n masking_LR[0][1] = new III_psy_ratio();\n masking_LR[1][0] = new III_psy_ratio();\n masking_LR[1][1] = new III_psy_ratio();\n var masking_MS = new_array_n([2, 2]);\n /* MS masking & energy */\n masking_MS[0][0] = new III_psy_ratio();\n masking_MS[0][1] = new III_psy_ratio();\n masking_MS[1][0] = new III_psy_ratio();\n masking_MS[1][1] = new III_psy_ratio();\n //III_psy_ratio masking[][];\n var masking;\n /* pointer to selected maskings */\n var inbuf = [null, null];\n var gfc = gfp.internal_flags;\n\n var tot_ener = new_float_n([2, 4]);\n var ms_ener_ratio = [.5, .5];\n var pe = [[0., 0.], [0., 0.]];\n var pe_MS = [[0., 0.], [0., 0.]];\n\n//float[][] pe_use;\n var pe_use;\n\n var ch, gr;\n\n inbuf[0] = inbuf_l;\n inbuf[1] = inbuf_r;\n\n if (gfc.lame_encode_frame_init == 0) {\n /* first run? */\n lame_encode_frame_init(gfp, inbuf);\n\n }\n\n /********************** padding *****************************/\n /**\n *
\n         * padding method as described in\n         * \"MPEG-Layer3 / Bitstream Syntax and Decoding\"\n         * by Martin Sieler, Ralph Sperschneider\n         *\n         * note: there is no padding for the very first frame\n         *\n         * Robert Hegemann 2000-06-22\n         * 
\n */\n gfc.padding = 0;\n if ((gfc.slot_lag -= gfc.frac_SpF) < 0) {\n gfc.slot_lag += gfp.out_samplerate;\n gfc.padding = 1;\n }\n\n /****************************************\n * Stage 1: psychoacoustic model *\n ****************************************/\n\n if (gfc.psymodel != 0) {\n /*\n * psychoacoustic model psy model has a 1 granule (576) delay that\n * we must compensate for (mt 6/99).\n */\n var ret;\n var bufp = [null, null];\n /* address of beginning of left & right granule */\n var bufpPos = 0;\n /* address of beginning of left & right granule */\n var blocktype = new_int(2);\n\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n\n for (ch = 0; ch < gfc.channels_out; ch++) {\n bufp[ch] = inbuf[ch];\n bufpPos = 576 + gr * 576 - Encoder.FFTOFFSET;\n }\n if (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) {\n ret = psy.L3psycho_anal_vbr(gfp, bufp, bufpPos, gr,\n masking_LR, masking_MS, pe[gr], pe_MS[gr],\n tot_ener[gr], blocktype);\n } else {\n ret = psy.L3psycho_anal_ns(gfp, bufp, bufpPos, gr,\n masking_LR, masking_MS, pe[gr], pe_MS[gr],\n tot_ener[gr], blocktype);\n }\n if (ret != 0)\n return -4;\n\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n ms_ener_ratio[gr] = tot_ener[gr][2] + tot_ener[gr][3];\n if (ms_ener_ratio[gr] > 0)\n ms_ener_ratio[gr] = tot_ener[gr][3] / ms_ener_ratio[gr];\n }\n\n /* block type flags */\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n cod_info.block_type = blocktype[ch];\n cod_info.mixed_block_flag = 0;\n }\n }\n } else {\n /* no psy model */\n for (gr = 0; gr < gfc.mode_gr; gr++)\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.l3_side.tt[gr][ch].block_type = Encoder.NORM_TYPE;\n gfc.l3_side.tt[gr][ch].mixed_block_flag = 0;\n pe_MS[gr][ch] = pe[gr][ch] = 700;\n }\n }\n\n /* auto-adjust of ATH, useful for low volume */\n adjust_ATH(gfc);\n\n /****************************************\n * Stage 2: MDCT *\n ****************************************/\n\n /* polyphase filtering / mdct */\n newMDCT.mdct_sub48(gfc, inbuf[0], inbuf[1]);\n\n /****************************************\n * Stage 3: MS/LR decision *\n ****************************************/\n\n /* Here will be selected MS or LR coding of the 2 stereo channels */\n gfc.mode_ext = Encoder.MPG_MD_LR_LR;\n\n if (gfp.force_ms) {\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n } else if (gfp.mode == MPEGMode.JOINT_STEREO) {\n /*\n * ms_ratio = is scaled, for historical reasons, to look like a\n * ratio of side_channel / total. 0 = signal is 100% mono .5 = L & R\n * uncorrelated\n */\n\n /**\n *
\n             * [0] and [1] are the results for the two granules in MPEG-1,\n             * in MPEG-2 it's only a faked averaging of the same value\n             * _prev is the value of the last granule of the previous frame\n             * _next is the value of the first granule of the next frame\n             * 
\n */\n\n var sum_pe_MS = 0.;\n var sum_pe_LR = 0.;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n sum_pe_MS += pe_MS[gr][ch];\n sum_pe_LR += pe[gr][ch];\n }\n }\n\n /* based on PE: M/S coding would not use much more bits than L/R */\n if (sum_pe_MS <= 1.00 * sum_pe_LR) {\n\n var gi0 = gfc.l3_side.tt[0];\n var gi1 = gfc.l3_side.tt[gfc.mode_gr - 1];\n\n if (gi0[0].block_type == gi0[1].block_type\n && gi1[0].block_type == gi1[1].block_type) {\n\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n }\n }\n }\n\n /* bit and noise allocation */\n if (gfc.mode_ext == MPG_MD_MS_LR) {\n masking = masking_MS;\n /* use MS masking */\n pe_use = pe_MS;\n } else {\n masking = masking_LR;\n /* use LR masking */\n pe_use = pe;\n }\n\n /* copy data for MP3 frame analyzer */\n if (gfp.analysis && gfc.pinfo != null) {\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.pinfo.ms_ratio[gr] = gfc.ms_ratio[gr];\n gfc.pinfo.ms_ener_ratio[gr] = ms_ener_ratio[gr];\n gfc.pinfo.blocktype[gr][ch] = gfc.l3_side.tt[gr][ch].block_type;\n gfc.pinfo.pe[gr][ch] = pe_use[gr][ch];\n System.arraycopy(gfc.l3_side.tt[gr][ch].xr, 0,\n gfc.pinfo.xr[gr][ch], 0, 576);\n /*\n * in psymodel, LR and MS data was stored in pinfo. switch\n * to MS data:\n */\n if (gfc.mode_ext == MPG_MD_MS_LR) {\n gfc.pinfo.ers[gr][ch] = gfc.pinfo.ers[gr][ch + 2];\n System.arraycopy(gfc.pinfo.energy[gr][ch + 2], 0,\n gfc.pinfo.energy[gr][ch], 0,\n gfc.pinfo.energy[gr][ch].length);\n }\n }\n }\n }\n\n /****************************************\n * Stage 4: quantization loop *\n ****************************************/\n\n if (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_abr) {\n\n var i;\n var f;\n\n for (i = 0; i < 18; i++)\n gfc.nsPsy.pefirbuf[i] = gfc.nsPsy.pefirbuf[i + 1];\n\n f = 0.0;\n for (gr = 0; gr < gfc.mode_gr; gr++)\n for (ch = 0; ch < gfc.channels_out; ch++)\n f += pe_use[gr][ch];\n gfc.nsPsy.pefirbuf[18] = f;\n\n f = gfc.nsPsy.pefirbuf[9];\n for (i = 0; i < 9; i++)\n f += (gfc.nsPsy.pefirbuf[i] + gfc.nsPsy.pefirbuf[18 - i])\n * Encoder.fircoef[i];\n\n f = (670 * 5 * gfc.mode_gr * gfc.channels_out) / f;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n pe_use[gr][ch] *= f;\n }\n }\n }\n gfc.iteration_loop.iteration_loop(gfp, pe_use, ms_ener_ratio, masking);\n\n /****************************************\n * Stage 5: bitstream formatting *\n ****************************************/\n\n /* write the frame to the bitstream */\n bs.format_bitstream(gfp);\n\n /* copy mp3 bit buffer into array */\n mp3count = bs.copy_buffer(gfc, mp3buf, mp3bufPos, mp3buf_size, 1);\n\n if (gfp.bWriteVbrTag)\n vbr.addVbrFrame(gfp);\n\n if (gfp.analysis && gfc.pinfo != null) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var j;\n for (j = 0; j < FFTOFFSET; j++)\n gfc.pinfo.pcmdata[ch][j] = gfc.pinfo.pcmdata[ch][j\n + gfp.framesize];\n for (j = FFTOFFSET; j < 1600; j++) {\n gfc.pinfo.pcmdata[ch][j] = inbuf[ch][j - FFTOFFSET];\n }\n }\n qupvt.set_frame_pinfo(gfp, masking);\n }\n\n updateStats(gfc);\n\n return mp3count;\n }\n}\n\n\nmodule.exports = Encoder;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\nfunction FFT() {\n\n var window = new_float(Encoder.BLKSIZE);\n var window_s = new_float(Encoder.BLKSIZE_s / 2);\n\n var costab = [\n 9.238795325112867e-01, 3.826834323650898e-01,\n 9.951847266721969e-01, 9.801714032956060e-02,\n 9.996988186962042e-01, 2.454122852291229e-02,\n 9.999811752826011e-01, 6.135884649154475e-03\n ];\n\n function fht(fz, fzPos, n) {\n var tri = 0;\n var k4;\n var fi;\n var gi;\n\n n <<= 1;\n /* to get BLKSIZE, because of 3DNow! ASM routine */\n var fn = fzPos + n;\n k4 = 4;\n do {\n var s1, c1;\n var i, k1, k2, k3, kx;\n kx = k4 >> 1;\n k1 = k4;\n k2 = k4 << 1;\n k3 = k2 + k1;\n k4 = k2 << 1;\n fi = fzPos;\n gi = fi + kx;\n do {\n var f0, f1, f2, f3;\n f1 = fz[fi + 0] - fz[fi + k1];\n f0 = fz[fi + 0] + fz[fi + k1];\n f3 = fz[fi + k2] - fz[fi + k3];\n f2 = fz[fi + k2] + fz[fi + k3];\n fz[fi + k2] = f0 - f2;\n fz[fi + 0] = f0 + f2;\n fz[fi + k3] = f1 - f3;\n fz[fi + k1] = f1 + f3;\n f1 = fz[gi + 0] - fz[gi + k1];\n f0 = fz[gi + 0] + fz[gi + k1];\n f3 = (Util.SQRT2 * fz[gi + k3]);\n f2 = (Util.SQRT2 * fz[gi + k2]);\n fz[gi + k2] = f0 - f2;\n fz[gi + 0] = f0 + f2;\n fz[gi + k3] = f1 - f3;\n fz[gi + k1] = f1 + f3;\n gi += k4;\n fi += k4;\n } while (fi < fn);\n c1 = costab[tri + 0];\n s1 = costab[tri + 1];\n for (i = 1; i < kx; i++) {\n var c2, s2;\n c2 = 1 - (2 * s1) * s1;\n s2 = (2 * s1) * c1;\n fi = fzPos + i;\n gi = fzPos + k1 - i;\n do {\n var a, b, g0, f0, f1, g1, f2, g2, f3, g3;\n b = s2 * fz[fi + k1] - c2 * fz[gi + k1];\n a = c2 * fz[fi + k1] + s2 * fz[gi + k1];\n f1 = fz[fi + 0] - a;\n f0 = fz[fi + 0] + a;\n g1 = fz[gi + 0] - b;\n g0 = fz[gi + 0] + b;\n b = s2 * fz[fi + k3] - c2 * fz[gi + k3];\n a = c2 * fz[fi + k3] + s2 * fz[gi + k3];\n f3 = fz[fi + k2] - a;\n f2 = fz[fi + k2] + a;\n g3 = fz[gi + k2] - b;\n g2 = fz[gi + k2] + b;\n b = s1 * f2 - c1 * g3;\n a = c1 * f2 + s1 * g3;\n fz[fi + k2] = f0 - a;\n fz[fi + 0] = f0 + a;\n fz[gi + k3] = g1 - b;\n fz[gi + k1] = g1 + b;\n b = c1 * g2 - s1 * f3;\n a = s1 * g2 + c1 * f3;\n fz[gi + k2] = g0 - a;\n fz[gi + 0] = g0 + a;\n fz[fi + k3] = f1 - b;\n fz[fi + k1] = f1 + b;\n gi += k4;\n fi += k4;\n } while (fi < fn);\n c2 = c1;\n c1 = c2 * costab[tri + 0] - s1 * costab[tri + 1];\n s1 = c2 * costab[tri + 1] + s1 * costab[tri + 0];\n }\n tri += 2;\n } while (k4 < n);\n }\n\n var rv_tbl = [0x00, 0x80, 0x40,\n 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10,\n 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70,\n 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28,\n 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58,\n 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04,\n 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64,\n 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34,\n 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c,\n 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c,\n 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c,\n 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22,\n 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52,\n 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a,\n 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a,\n 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a,\n 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46,\n 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16,\n 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76,\n 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e,\n 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e,\n 0xde, 0x3e, 0xbe, 0x7e, 0xfe];\n\n this.fft_short = function (gfc, x_real, chn, buffer, bufPos) {\n for (var b = 0; b < 3; b++) {\n var x = Encoder.BLKSIZE_s / 2;\n var k = 0xffff & ((576 / 3) * (b + 1));\n var j = Encoder.BLKSIZE_s / 8 - 1;\n do {\n var f0, f1, f2, f3, w;\n var i = rv_tbl[j << 2] & 0xff;\n\n f0 = window_s[i] * buffer[chn][bufPos + i + k];\n w = window_s[0x7f - i] * buffer[chn][bufPos + i + k + 0x80];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window_s[i + 0x40] * buffer[chn][bufPos + i + k + 0x40];\n w = window_s[0x3f - i] * buffer[chn][bufPos + i + k + 0xc0];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x -= 4;\n x_real[b][x + 0] = f0 + f2;\n x_real[b][x + 2] = f0 - f2;\n x_real[b][x + 1] = f1 + f3;\n x_real[b][x + 3] = f1 - f3;\n\n f0 = window_s[i + 0x01] * buffer[chn][bufPos + i + k + 0x01];\n w = window_s[0x7e - i] * buffer[chn][bufPos + i + k + 0x81];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window_s[i + 0x41] * buffer[chn][bufPos + i + k + 0x41];\n w = window_s[0x3e - i] * buffer[chn][bufPos + i + k + 0xc1];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 0] = f0 + f2;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 2] = f0 - f2;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 1] = f1 + f3;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 3] = f1 - f3;\n } while (--j >= 0);\n\n fht(x_real[b], x, Encoder.BLKSIZE_s / 2);\n /* BLKSIZE_s/2 because of 3DNow! ASM routine */\n /* BLKSIZE/2 because of 3DNow! ASM routine */\n }\n }\n\n this.fft_long = function (gfc, y, chn, buffer, bufPos) {\n var jj = Encoder.BLKSIZE / 8 - 1;\n var x = Encoder.BLKSIZE / 2;\n\n do {\n var f0, f1, f2, f3, w;\n var i = rv_tbl[jj] & 0xff;\n f0 = window[i] * buffer[chn][bufPos + i];\n w = window[i + 0x200] * buffer[chn][bufPos + i + 0x200];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window[i + 0x100] * buffer[chn][bufPos + i + 0x100];\n w = window[i + 0x300] * buffer[chn][bufPos + i + 0x300];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x -= 4;\n y[x + 0] = f0 + f2;\n y[x + 2] = f0 - f2;\n y[x + 1] = f1 + f3;\n y[x + 3] = f1 - f3;\n\n f0 = window[i + 0x001] * buffer[chn][bufPos + i + 0x001];\n w = window[i + 0x201] * buffer[chn][bufPos + i + 0x201];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window[i + 0x101] * buffer[chn][bufPos + i + 0x101];\n w = window[i + 0x301] * buffer[chn][bufPos + i + 0x301];\n f3 = f2 - w;\n f2 = f2 + w;\n\n y[x + Encoder.BLKSIZE / 2 + 0] = f0 + f2;\n y[x + Encoder.BLKSIZE / 2 + 2] = f0 - f2;\n y[x + Encoder.BLKSIZE / 2 + 1] = f1 + f3;\n y[x + Encoder.BLKSIZE / 2 + 3] = f1 - f3;\n } while (--jj >= 0);\n\n fht(y, x, Encoder.BLKSIZE / 2);\n /* BLKSIZE/2 because of 3DNow! ASM routine */\n }\n\n this.init_fft = function (gfc) {\n /* The type of window used here will make no real difference, but */\n /*\n * in the interest of merging nspsytune stuff - switch to blackman\n * window\n */\n for (var i = 0; i < Encoder.BLKSIZE; i++)\n /* blackman window */\n window[i] = (0.42 - 0.5 * Math.cos(2 * Math.PI * (i + .5)\n / Encoder.BLKSIZE) + 0.08 * Math.cos(4 * Math.PI * (i + .5)\n / Encoder.BLKSIZE));\n\n for (var i = 0; i < Encoder.BLKSIZE_s / 2; i++)\n window_s[i] = (0.5 * (1.0 - Math.cos(2.0 * Math.PI\n * (i + 0.5) / Encoder.BLKSIZE_s)));\n\n }\n\n}\n\nmodule.exports = FFT;\n","/*\n * psymodel.c\n *\n * Copyright (c) 1999-2000 Mark Taylor\n * Copyright (c) 2001-2002 Naoki Shibata\n * Copyright (c) 2000-2003 Takehiro Tominaga\n * Copyright (c) 2000-2008 Robert Hegemann\n * Copyright (c) 2000-2005 Gabriel Bouvigne\n * Copyright (c) 2000-2005 Alexander Leidinger\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: PsyModel.java,v 1.27 2011/05/24 20:48:06 kenchis Exp $ */\n\n\n/*\n PSYCHO ACOUSTICS\n\n\n This routine computes the psycho acoustics, delayed by one granule.\n\n Input: buffer of PCM data (1024 samples).\n\n This window should be centered over the 576 sample granule window.\n The routine will compute the psycho acoustics for\n this granule, but return the psycho acoustics computed\n for the *previous* granule. This is because the block\n type of the previous granule can only be determined\n after we have computed the psycho acoustics for the following\n granule.\n\n Output: maskings and energies for each scalefactor band.\n block type, PE, and some correlation measures.\n The PE is used by CBR modes to determine if extra bits\n from the bit reservoir should be used. The correlation\n measures are used to determine mid/side or regular stereo.\n */\n/*\n Notation:\n\n barks: a non-linear frequency scale. Mapping from frequency to\n barks is given by freq2bark()\n\n scalefactor bands: The spectrum (frequencies) are broken into\n SBMAX \"scalefactor bands\". Thes bands\n are determined by the MPEG ISO spec. In\n the noise shaping/quantization code, we allocate\n bits among the partition bands to achieve the\n best possible quality\n\n partition bands: The spectrum is also broken into about\n 64 \"partition bands\". Each partition\n band is about .34 barks wide. There are about 2-5\n partition bands for each scalefactor band.\n\n LAME computes all psycho acoustic information for each partition\n band. Then at the end of the computations, this information\n is mapped to scalefactor bands. The energy in each scalefactor\n band is taken as the sum of the energy in all partition bands\n which overlap the scalefactor band. The maskings can be computed\n in the same way (and thus represent the average masking in that band)\n or by taking the minmum value multiplied by the number of\n partition bands used (which represents a minimum masking in that band).\n */\n/*\n The general outline is as follows:\n\n 1. compute the energy in each partition band\n 2. compute the tonality in each partition band\n 3. compute the strength of each partion band \"masker\"\n 4. compute the masking (via the spreading function applied to each masker)\n 5. Modifications for mid/side masking.\n\n Each partition band is considiered a \"masker\". The strength\n of the i'th masker in band j is given by:\n\n s3(bark(i)-bark(j))*strength(i)\n\n The strength of the masker is a function of the energy and tonality.\n The more tonal, the less masking. LAME uses a simple linear formula\n (controlled by NMT and TMN) which says the strength is given by the\n energy divided by a linear function of the tonality.\n */\n/*\n s3() is the \"spreading function\". It is given by a formula\n determined via listening tests.\n\n The total masking in the j'th partition band is the sum over\n all maskings i. It is thus given by the convolution of\n the strength with s3(), the \"spreading function.\"\n\n masking(j) = sum_over_i s3(i-j)*strength(i) = s3 o strength\n\n where \"o\" = convolution operator. s3 is given by a formula determined\n via listening tests. It is normalized so that s3 o 1 = 1.\n\n Note: instead of a simple convolution, LAME also has the\n option of using \"additive masking\"\n\n The most critical part is step 2, computing the tonality of each\n partition band. LAME has two tonality estimators. The first\n is based on the ISO spec, and measures how predictiable the\n signal is over time. The more predictable, the more tonal.\n The second measure is based on looking at the spectrum of\n a single granule. The more peaky the spectrum, the more\n tonal. By most indications, the latter approach is better.\n\n Finally, in step 5, the maskings for the mid and side\n channel are possibly increased. Under certain circumstances,\n noise in the mid & side channels is assumed to also\n be masked by strong maskers in the L or R channels.\n\n\n Other data computed by the psy-model:\n\n ms_ratio side-channel / mid-channel masking ratio (for previous granule)\n ms_ratio_next side-channel / mid-channel masking ratio for this granule\n\n percep_entropy[2] L and R values (prev granule) of PE - A measure of how\n much pre-echo is in the previous granule\n percep_entropy_MS[2] mid and side channel values (prev granule) of percep_entropy\n energy[4] L,R,M,S energy in each channel, prev granule\n blocktype_d[2] block type to use for previous granule\n */\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar FFT = require(\"./FFT.js\");\nvar Encoder = require(\"./Encoder.js\");\n\nfunction PsyModel() {\n\n var fft = new FFT();\n\n var LOG10 = 2.30258509299404568402;\n\n var rpelev = 2;\n var rpelev2 = 16;\n var rpelev_s = 2;\n var rpelev2_s = 16;\n\n /* size of each partition band, in barks: */\n var DELBARK = .34;\n\n /* tuned for output level (sensitive to energy scale) */\n var VO_SCALE = (1. / (14752 * 14752) / (Encoder.BLKSIZE / 2));\n\n var temporalmask_sustain_sec = 0.01;\n\n var NS_PREECHO_ATT0 = 0.8;\n var NS_PREECHO_ATT1 = 0.6;\n var NS_PREECHO_ATT2 = 0.3;\n\n var NS_MSFIX = 3.5;\n\n var NSATTACKTHRE = 4.4;\n var NSATTACKTHRE_S = 25;\n\n var NSFIRLEN = 21;\n\n /* size of each partition band, in barks: */\n var LN_TO_LOG10 = 0.2302585093;\n\n function NON_LINEAR_SCALE_ENERGY(x) {\n return x;\n }\n\n /**\n *
\n     *       L3psycho_anal.  Compute psycho acoustics.\n     *\n     *       Data returned to the calling program must be delayed by one\n     *       granule.\n     *\n     *       This is done in two places.\n     *       If we do not need to know the blocktype, the copying\n     *       can be done here at the top of the program: we copy the data for\n     *       the last granule (computed during the last call) before it is\n     *       overwritten with the new data.  It looks like this:\n     *\n     *       0. static psymodel_data\n     *       1. calling_program_data = psymodel_data\n     *       2. compute psymodel_data\n     *\n     *       For data which needs to know the blocktype, the copying must be\n     *       done at the end of this loop, and the old values must be saved:\n     *\n     *       0. static psymodel_data_old\n     *       1. compute psymodel_data\n     *       2. compute possible block type of this granule\n     *       3. compute final block type of previous granule based on #2.\n     *       4. calling_program_data = psymodel_data_old\n     *       5. psymodel_data_old = psymodel_data\n     *     psycho_loudness_approx\n     *       jd - 2001 mar 12\n     *    in:  energy   - BLKSIZE/2 elements of frequency magnitudes ^ 2\n     *         gfp      - uses out_samplerate, ATHtype (also needed for ATHformula)\n     *    returns: loudness^2 approximation, a positive value roughly tuned for a value\n     *             of 1.0 for signals near clipping.\n     *    notes:   When calibrated, feeding this function binary white noise at sample\n     *             values +32767 or -32768 should return values that approach 3.\n     *             ATHformula is used to approximate an equal loudness curve.\n     *    future:  Data indicates that the shape of the equal loudness curve varies\n     *             with intensity.  This function might be improved by using an equal\n     *             loudness curve shaped for typical playback levels (instead of the\n     *             ATH, that is shaped for the threshold).  A flexible realization might\n     *             simply bend the existing ATH curve to achieve the desired shape.\n     *             However, the potential gain may not be enough to justify an effort.\n     * 
\n */\n function psycho_loudness_approx(energy, gfc) {\n var loudness_power = 0.0;\n /* apply weights to power in freq. bands */\n for (var i = 0; i < Encoder.BLKSIZE / 2; ++i)\n loudness_power += energy[i] * gfc.ATH.eql_w[i];\n loudness_power *= VO_SCALE;\n\n return loudness_power;\n }\n\n function compute_ffts(gfp, fftenergy, fftenergy_s, wsamp_l, wsamp_lPos, wsamp_s, wsamp_sPos, gr_out, chn, buffer, bufPos) {\n var gfc = gfp.internal_flags;\n if (chn < 2) {\n fft.fft_long(gfc, wsamp_l[wsamp_lPos], chn, buffer, bufPos);\n fft.fft_short(gfc, wsamp_s[wsamp_sPos], chn, buffer, bufPos);\n }\n /* FFT data for mid and side channel is derived from L & R */\n else if (chn == 2) {\n for (var j = Encoder.BLKSIZE - 1; j >= 0; --j) {\n var l = wsamp_l[wsamp_lPos + 0][j];\n var r = wsamp_l[wsamp_lPos + 1][j];\n wsamp_l[wsamp_lPos + 0][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_l[wsamp_lPos + 1][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n for (var b = 2; b >= 0; --b) {\n for (var j = Encoder.BLKSIZE_s - 1; j >= 0; --j) {\n var l = wsamp_s[wsamp_sPos + 0][b][j];\n var r = wsamp_s[wsamp_sPos + 1][b][j];\n wsamp_s[wsamp_sPos + 0][b][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_s[wsamp_sPos + 1][b][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy[0] = NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos + 0][0]);\n fftenergy[0] *= fftenergy[0];\n\n for (var j = Encoder.BLKSIZE / 2 - 1; j >= 0; --j) {\n var re = (wsamp_l[wsamp_lPos + 0])[Encoder.BLKSIZE / 2 - j];\n var im = (wsamp_l[wsamp_lPos + 0])[Encoder.BLKSIZE / 2 + j];\n fftenergy[Encoder.BLKSIZE / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n for (var b = 2; b >= 0; --b) {\n fftenergy_s[b][0] = (wsamp_s[wsamp_sPos + 0])[b][0];\n fftenergy_s[b][0] *= fftenergy_s[b][0];\n for (var j = Encoder.BLKSIZE_s / 2 - 1; j >= 0; --j) {\n var re = (wsamp_s[wsamp_sPos + 0])[b][Encoder.BLKSIZE_s\n / 2 - j];\n var im = (wsamp_s[wsamp_sPos + 0])[b][Encoder.BLKSIZE_s\n / 2 + j];\n fftenergy_s[b][Encoder.BLKSIZE_s / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n }\n /* total energy */\n {\n var totalenergy = 0.0;\n for (var j = 11; j < Encoder.HBLKSIZE; j++)\n totalenergy += fftenergy[j];\n\n gfc.tot_ener[chn] = totalenergy;\n }\n\n if (gfp.analysis) {\n for (var j = 0; j < Encoder.HBLKSIZE; j++) {\n gfc.pinfo.energy[gr_out][chn][j] = gfc.pinfo.energy_save[chn][j];\n gfc.pinfo.energy_save[chn][j] = fftenergy[j];\n }\n gfc.pinfo.pe[gr_out][chn] = gfc.pe[chn];\n }\n\n /*********************************************************************\n * compute loudness approximation (used for ATH auto-level adjustment)\n *********************************************************************/\n if (gfp.athaa_loudapprox == 2 && chn < 2) {\n // no loudness for mid/side ch\n gfc.loudness_sq[gr_out][chn] = gfc.loudness_sq_save[chn];\n gfc.loudness_sq_save[chn] = psycho_loudness_approx(fftenergy, gfc);\n }\n }\n\n /* mask_add optimization */\n /* init the limit values used to avoid computing log in mask_add when it is not necessary */\n\n /**\n *
\n     *  For example, with i = 10*log10(m2/m1)/10*16         (= log10(m2/m1)*16)\n     *\n     * abs(i)>8 is equivalent (as i is an integer) to\n     * abs(i)>=9\n     * i>=9 || i<=-9\n     * equivalent to (as i is the biggest integer smaller than log10(m2/m1)*16\n     * or the smallest integer bigger than log10(m2/m1)*16 depending on the sign of log10(m2/m1)*16)\n     * log10(m2/m1)>=9/16 || log10(m2/m1)<=-9/16\n     * exp10 is strictly increasing thus this is equivalent to\n     * m2/m1 >= 10^(9/16) || m2/m1<=10^(-9/16) which are comparisons to constants\n     * 
\n */\n\n /**\n * as in if(i>8)\n */\n var I1LIMIT = 8;\n /**\n * as in if(i>24) . changed 23\n */\n var I2LIMIT = 23;\n /**\n * as in if(m<15)\n */\n var MLIMIT = 15;\n\n var ma_max_i1;\n var ma_max_i2;\n var ma_max_m;\n\n /**\n * This is the masking table:
\n * According to tonality, values are going from 0dB (TMN) to 9.3dB (NMT).
\n * After additive masking computation, 8dB are added, so final values are\n * going from 8dB to 17.3dB\n *\n * pow(10, -0.0..-0.6)\n */\n var tab = [1.0, 0.79433, 0.63096, 0.63096,\n 0.63096, 0.63096, 0.63096, 0.25119, 0.11749];\n\n function init_mask_add_max_values() {\n ma_max_i1 = Math.pow(10, (I1LIMIT + 1) / 16.0);\n ma_max_i2 = Math.pow(10, (I2LIMIT + 1) / 16.0);\n ma_max_m = Math.pow(10, (MLIMIT) / 10.0);\n }\n\n var table1 = [3.3246 * 3.3246,\n 3.23837 * 3.23837, 3.15437 * 3.15437, 3.00412 * 3.00412,\n 2.86103 * 2.86103, 2.65407 * 2.65407, 2.46209 * 2.46209,\n 2.284 * 2.284, 2.11879 * 2.11879, 1.96552 * 1.96552,\n 1.82335 * 1.82335, 1.69146 * 1.69146, 1.56911 * 1.56911,\n 1.46658 * 1.46658, 1.37074 * 1.37074, 1.31036 * 1.31036,\n 1.25264 * 1.25264, 1.20648 * 1.20648, 1.16203 * 1.16203,\n 1.12765 * 1.12765, 1.09428 * 1.09428, 1.0659 * 1.0659,\n 1.03826 * 1.03826, 1.01895 * 1.01895, 1];\n\n var table2 = [1.33352 * 1.33352,\n 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497,\n 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382,\n 1.22321 * 1.22321, 1.14758 * 1.14758, 1];\n\n var table3 = [2.35364 * 2.35364,\n 2.29259 * 2.29259, 2.23313 * 2.23313, 2.12675 * 2.12675,\n 2.02545 * 2.02545, 1.87894 * 1.87894, 1.74303 * 1.74303,\n 1.61695 * 1.61695, 1.49999 * 1.49999, 1.39148 * 1.39148,\n 1.29083 * 1.29083, 1.19746 * 1.19746, 1.11084 * 1.11084,\n 1.03826 * 1.03826];\n\n /**\n * addition of simultaneous masking Naoki Shibata 2000/7\n */\n function mask_add(m1, m2, kk, b, gfc, shortblock) {\n var ratio;\n\n if (m2 > m1) {\n if (m2 < (m1 * ma_max_i2))\n ratio = m2 / m1;\n else\n return (m1 + m2);\n } else {\n if (m1 >= (m2 * ma_max_i2))\n return (m1 + m2);\n ratio = m1 / m2;\n }\n\n /* Should always be true, just checking */\n assert(m1 >= 0);\n assert(m2 >= 0);\n\n m1 += m2;\n //if (((long)(b + 3) & 0xffffffff) <= 3 + 3) {\n if ((b + 3) <= 3 + 3) {\n /* approximately, 1 bark = 3 partitions */\n /* 65% of the cases */\n /* originally 'if(i > 8)' */\n if (ratio >= ma_max_i1) {\n /* 43% of the total */\n return m1;\n }\n\n /* 22% of the total */\n var i = 0 | (Util.FAST_LOG10_X(ratio, 16.0));\n return m1 * table2[i];\n }\n\n /**\n *
\n         * m<15 equ log10((m1+m2)/gfc.ATH.cb[k])<1.5\n         * equ (m1+m2)/gfc.ATH.cb[k]<10^1.5\n         * equ (m1+m2)<10^1.5 * gfc.ATH.cb[k]\n         * 
\n */\n var i = 0 | Util.FAST_LOG10_X(ratio, 16.0);\n if (shortblock != 0) {\n m2 = gfc.ATH.cb_s[kk] * gfc.ATH.adjust;\n } else {\n m2 = gfc.ATH.cb_l[kk] * gfc.ATH.adjust;\n }\n assert(m2 >= 0);\n if (m1 < ma_max_m * m2) {\n /* 3% of the total */\n /* Originally if (m > 0) { */\n if (m1 > m2) {\n var f, r;\n\n f = 1.0;\n if (i <= 13)\n f = table3[i];\n\n r = Util.FAST_LOG10_X(m1 / m2, 10.0 / 15.0);\n return m1 * ((table1[i] - f) * r + f);\n }\n\n if (i > 13)\n return m1;\n\n return m1 * table3[i];\n }\n\n /* 10% of total */\n return m1 * table1[i];\n }\n\n var table2_ = [1.33352 * 1.33352,\n 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497,\n 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382,\n 1.22321 * 1.22321, 1.14758 * 1.14758, 1];\n\n /**\n * addition of simultaneous masking Naoki Shibata 2000/7\n */\n function vbrpsy_mask_add(m1, m2, b) {\n var ratio;\n\n if (m1 < 0) {\n m1 = 0;\n }\n if (m2 < 0) {\n m2 = 0;\n }\n if (m1 <= 0) {\n return m2;\n }\n if (m2 <= 0) {\n return m1;\n }\n if (m2 > m1) {\n ratio = m2 / m1;\n } else {\n ratio = m1 / m2;\n }\n if (-2 <= b && b <= 2) {\n /* approximately, 1 bark = 3 partitions */\n /* originally 'if(i > 8)' */\n if (ratio >= ma_max_i1) {\n return m1 + m2;\n } else {\n var i = 0 | (Util.FAST_LOG10_X(ratio, 16.0));\n return (m1 + m2) * table2_[i];\n }\n }\n if (ratio < ma_max_i2) {\n return m1 + m2;\n }\n if (m1 < m2) {\n m1 = m2;\n }\n return m1;\n }\n\n /**\n * compute interchannel masking effects\n */\n function calc_interchannel_masking(gfp, ratio) {\n var gfc = gfp.internal_flags;\n if (gfc.channels_out > 1) {\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n var l = gfc.thm[0].l[sb];\n var r = gfc.thm[1].l[sb];\n gfc.thm[0].l[sb] += r * ratio;\n gfc.thm[1].l[sb] += l * ratio;\n }\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var l = gfc.thm[0].s[sb][sblock];\n var r = gfc.thm[1].s[sb][sblock];\n gfc.thm[0].s[sb][sblock] += r * ratio;\n gfc.thm[1].s[sb][sblock] += l * ratio;\n }\n }\n }\n }\n\n /**\n * compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper\n */\n function msfix1(gfc) {\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n /* use this fix if L & R masking differs by 2db or less */\n /* if db = 10*log10(x2/x1) < 2 */\n /* if (x2 < 1.58*x1) { */\n if (gfc.thm[0].l[sb] > 1.58 * gfc.thm[1].l[sb]\n || gfc.thm[1].l[sb] > 1.58 * gfc.thm[0].l[sb])\n continue;\n var mld = gfc.mld_l[sb] * gfc.en[3].l[sb];\n var rmid = Math.max(gfc.thm[2].l[sb],\n Math.min(gfc.thm[3].l[sb], mld));\n\n mld = gfc.mld_l[sb] * gfc.en[2].l[sb];\n var rside = Math.max(gfc.thm[3].l[sb],\n Math.min(gfc.thm[2].l[sb], mld));\n gfc.thm[2].l[sb] = rmid;\n gfc.thm[3].l[sb] = rside;\n }\n\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n if (gfc.thm[0].s[sb][sblock] > 1.58 * gfc.thm[1].s[sb][sblock]\n || gfc.thm[1].s[sb][sblock] > 1.58 * gfc.thm[0].s[sb][sblock])\n continue;\n var mld = gfc.mld_s[sb] * gfc.en[3].s[sb][sblock];\n var rmid = Math.max(gfc.thm[2].s[sb][sblock],\n Math.min(gfc.thm[3].s[sb][sblock], mld));\n\n mld = gfc.mld_s[sb] * gfc.en[2].s[sb][sblock];\n var rside = Math.max(gfc.thm[3].s[sb][sblock],\n Math.min(gfc.thm[2].s[sb][sblock], mld));\n\n gfc.thm[2].s[sb][sblock] = rmid;\n gfc.thm[3].s[sb][sblock] = rside;\n }\n }\n }\n\n /**\n * Adjust M/S maskings if user set \"msfix\"\n *\n * Naoki Shibata 2000\n */\n function ns_msfix(gfc, msfix, athadjust) {\n var msfix2 = msfix;\n var athlower = Math.pow(10, athadjust);\n\n msfix *= 2.0;\n msfix2 *= 2.0;\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n var thmLR, thmM, thmS, ath;\n ath = (gfc.ATH.cb_l[gfc.bm_l[sb]]) * athlower;\n thmLR = Math.min(Math.max(gfc.thm[0].l[sb], ath),\n Math.max(gfc.thm[1].l[sb], ath));\n thmM = Math.max(gfc.thm[2].l[sb], ath);\n thmS = Math.max(gfc.thm[3].l[sb], ath);\n if (thmLR * msfix < thmM + thmS) {\n var f = thmLR * msfix2 / (thmM + thmS);\n thmM *= f;\n thmS *= f;\n assert(thmM + thmS > 0);\n }\n gfc.thm[2].l[sb] = Math.min(thmM, gfc.thm[2].l[sb]);\n gfc.thm[3].l[sb] = Math.min(thmS, gfc.thm[3].l[sb]);\n }\n\n athlower *= ( Encoder.BLKSIZE_s / Encoder.BLKSIZE);\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var thmLR, thmM, thmS, ath;\n ath = (gfc.ATH.cb_s[gfc.bm_s[sb]]) * athlower;\n thmLR = Math.min(Math.max(gfc.thm[0].s[sb][sblock], ath),\n Math.max(gfc.thm[1].s[sb][sblock], ath));\n thmM = Math.max(gfc.thm[2].s[sb][sblock], ath);\n thmS = Math.max(gfc.thm[3].s[sb][sblock], ath);\n\n if (thmLR * msfix < thmM + thmS) {\n var f = thmLR * msfix / (thmM + thmS);\n thmM *= f;\n thmS *= f;\n assert(thmM + thmS > 0);\n }\n gfc.thm[2].s[sb][sblock] = Math.min(gfc.thm[2].s[sb][sblock],\n thmM);\n gfc.thm[3].s[sb][sblock] = Math.min(gfc.thm[3].s[sb][sblock],\n thmS);\n }\n }\n }\n\n /**\n * short block threshold calculation (part 2)\n *\n * partition band bo_s[sfb] is at the transition from scalefactor band sfb\n * to the next one sfb+1; enn and thmm have to be split between them\n */\n function convert_partition2scalefac_s(gfc, eb, thr, chn, sblock) {\n var sb, b;\n var enn = 0.0;\n var thmm = 0.0;\n for (sb = b = 0; sb < Encoder.SBMAX_s; ++b, ++sb) {\n var bo_s_sb = gfc.bo_s[sb];\n var npart_s = gfc.npart_s;\n var b_lim = bo_s_sb < npart_s ? bo_s_sb : npart_s;\n while (b < b_lim) {\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n enn += eb[b];\n thmm += thr[b];\n b++;\n }\n gfc.en[chn].s[sb][sblock] = enn;\n gfc.thm[chn].s[sb][sblock] = thmm;\n\n if (b >= npart_s) {\n ++sb;\n break;\n }\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n {\n /* at transition sfb . sfb+1 */\n var w_curr = gfc.PSY.bo_s_weight[sb];\n var w_next = 1.0 - w_curr;\n enn = w_curr * eb[b];\n thmm = w_curr * thr[b];\n gfc.en[chn].s[sb][sblock] += enn;\n gfc.thm[chn].s[sb][sblock] += thmm;\n enn = w_next * eb[b];\n thmm = w_next * thr[b];\n }\n }\n /* zero initialize the rest */\n for (; sb < Encoder.SBMAX_s; ++sb) {\n gfc.en[chn].s[sb][sblock] = 0;\n gfc.thm[chn].s[sb][sblock] = 0;\n }\n }\n\n /**\n * longblock threshold calculation (part 2)\n */\n function convert_partition2scalefac_l(gfc, eb, thr, chn) {\n var sb, b;\n var enn = 0.0;\n var thmm = 0.0;\n for (sb = b = 0; sb < Encoder.SBMAX_l; ++b, ++sb) {\n var bo_l_sb = gfc.bo_l[sb];\n var npart_l = gfc.npart_l;\n var b_lim = bo_l_sb < npart_l ? bo_l_sb : npart_l;\n while (b < b_lim) {\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n enn += eb[b];\n thmm += thr[b];\n b++;\n }\n gfc.en[chn].l[sb] = enn;\n gfc.thm[chn].l[sb] = thmm;\n\n if (b >= npart_l) {\n ++sb;\n break;\n }\n assert(eb[b] >= 0);\n assert(thr[b] >= 0);\n {\n /* at transition sfb . sfb+1 */\n var w_curr = gfc.PSY.bo_l_weight[sb];\n var w_next = 1.0 - w_curr;\n enn = w_curr * eb[b];\n thmm = w_curr * thr[b];\n gfc.en[chn].l[sb] += enn;\n gfc.thm[chn].l[sb] += thmm;\n enn = w_next * eb[b];\n thmm = w_next * thr[b];\n }\n }\n /* zero initialize the rest */\n for (; sb < Encoder.SBMAX_l; ++sb) {\n gfc.en[chn].l[sb] = 0;\n gfc.thm[chn].l[sb] = 0;\n }\n }\n\n function compute_masking_s(gfp, fftenergy_s, eb, thr, chn, sblock) {\n var gfc = gfp.internal_flags;\n var j, b;\n\n for (b = j = 0; b < gfc.npart_s; ++b) {\n var ebb = 0, m = 0;\n var n = gfc.numlines_s[b];\n for (var i = 0; i < n; ++i, ++j) {\n var el = fftenergy_s[sblock][j];\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n }\n assert(b == gfc.npart_s);\n assert(j == 129);\n for (j = b = 0; b < gfc.npart_s; b++) {\n var kk = gfc.s3ind_s[b][0];\n var ecb = gfc.s3_ss[j++] * eb[kk];\n ++kk;\n while (kk <= gfc.s3ind_s[b][1]) {\n ecb += gfc.s3_ss[j] * eb[kk];\n ++j;\n ++kk;\n }\n\n { /* limit calculated threshold by previous granule */\n var x = rpelev_s * gfc.nb_s1[chn][b];\n thr[b] = Math.min(ecb, x);\n }\n if (gfc.blocktype_old[chn & 1] == Encoder.SHORT_TYPE) {\n /* limit calculated threshold by even older granule */\n var x = rpelev2_s * gfc.nb_s2[chn][b];\n var y = thr[b];\n thr[b] = Math.min(x, y);\n }\n\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = ecb;\n assert(thr[b] >= 0);\n }\n for (; b <= Encoder.CBANDS; ++b) {\n eb[b] = 0;\n thr[b] = 0;\n }\n }\n\n function block_type_set(gfp, uselongblock, blocktype_d, blocktype) {\n var gfc = gfp.internal_flags;\n\n if (gfp.short_blocks == ShortBlock.short_block_coupled\n /* force both channels to use the same block type */\n /* this is necessary if the frame is to be encoded in ms_stereo. */\n /* But even without ms_stereo, FhG does this */\n && !(uselongblock[0] != 0 && uselongblock[1] != 0))\n uselongblock[0] = uselongblock[1] = 0;\n\n /*\n * update the blocktype of the previous granule, since it depends on\n * what happend in this granule\n */\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n blocktype[chn] = Encoder.NORM_TYPE;\n /* disable short blocks */\n if (gfp.short_blocks == ShortBlock.short_block_dispensed)\n uselongblock[chn] = 1;\n if (gfp.short_blocks == ShortBlock.short_block_forced)\n uselongblock[chn] = 0;\n\n if (uselongblock[chn] != 0) {\n /* no attack : use long blocks */\n assert(gfc.blocktype_old[chn] != Encoder.START_TYPE);\n if (gfc.blocktype_old[chn] == Encoder.SHORT_TYPE)\n blocktype[chn] = Encoder.STOP_TYPE;\n } else {\n /* attack : use short blocks */\n blocktype[chn] = Encoder.SHORT_TYPE;\n if (gfc.blocktype_old[chn] == Encoder.NORM_TYPE) {\n gfc.blocktype_old[chn] = Encoder.START_TYPE;\n }\n if (gfc.blocktype_old[chn] == Encoder.STOP_TYPE)\n gfc.blocktype_old[chn] = Encoder.SHORT_TYPE;\n }\n\n blocktype_d[chn] = gfc.blocktype_old[chn];\n // value returned to calling program\n gfc.blocktype_old[chn] = blocktype[chn];\n // save for next call to l3psy_anal\n }\n }\n\n function NS_INTERP(x, y, r) {\n /* was pow((x),(r))*pow((y),1-(r)) */\n if (r >= 1.0) {\n /* 99.7% of the time */\n return x;\n }\n if (r <= 0.0)\n return y;\n if (y > 0.0) {\n /* rest of the time */\n return (Math.pow(x / y, r) * y);\n }\n /* never happens */\n return 0.0;\n }\n\n /**\n * these values are tuned only for 44.1kHz...\n */\n var regcoef_s = [11.8, 13.6, 17.2, 32, 46.5,\n 51.3, 57.5, 67.1, 71.5, 84.6, 97.6, 130,\n /* 255.8 */\n ];\n\n function pecalc_s(mr, masking_lower) {\n var pe_s = 1236.28 / 4;\n for (var sb = 0; sb < Encoder.SBMAX_s - 1; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var thm = mr.thm.s[sb][sblock];\n assert(sb < regcoef_s.length);\n if (thm > 0.0) {\n var x = thm * masking_lower;\n var en = mr.en.s[sb][sblock];\n if (en > x) {\n if (en > x * 1e10) {\n pe_s += regcoef_s[sb] * (10.0 * LOG10);\n } else {\n assert(x > 0);\n pe_s += regcoef_s[sb] * Util.FAST_LOG10(en / x);\n }\n }\n }\n }\n }\n\n return pe_s;\n }\n\n /**\n * these values are tuned only for 44.1kHz...\n */\n var regcoef_l = [6.8, 5.8, 5.8, 6.4, 6.5, 9.9,\n 12.1, 14.4, 15, 18.9, 21.6, 26.9, 34.2, 40.2, 46.8, 56.5,\n 60.7, 73.9, 85.7, 93.4, 126.1,\n /* 241.3 */\n ];\n\n function pecalc_l(mr, masking_lower) {\n var pe_l = 1124.23 / 4;\n for (var sb = 0; sb < Encoder.SBMAX_l - 1; sb++) {\n var thm = mr.thm.l[sb];\n assert(sb < regcoef_l.length);\n if (thm > 0.0) {\n var x = thm * masking_lower;\n var en = mr.en.l[sb];\n if (en > x) {\n if (en > x * 1e10) {\n pe_l += regcoef_l[sb] * (10.0 * LOG10);\n } else {\n assert(x > 0);\n pe_l += regcoef_l[sb] * Util.FAST_LOG10(en / x);\n }\n }\n }\n }\n return pe_l;\n }\n\n function calc_energy(gfc, fftenergy, eb, max, avg) {\n var b, j;\n\n for (b = j = 0; b < gfc.npart_l; ++b) {\n var ebb = 0, m = 0;\n var i;\n for (i = 0; i < gfc.numlines_l[b]; ++i, ++j) {\n var el = fftenergy[j];\n assert(el >= 0);\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n max[b] = m;\n avg[b] = ebb * gfc.rnumlines_l[b];\n assert(gfc.rnumlines_l[b] >= 0);\n assert(ebb >= 0);\n assert(eb[b] >= 0);\n assert(max[b] >= 0);\n assert(avg[b] >= 0);\n }\n }\n\n function calc_mask_index_l(gfc, max, avg, mask_idx) {\n var last_tab_entry = tab.length - 1;\n var b = 0;\n var a = avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n\n for (b = 1; b < gfc.npart_l - 1; b++) {\n a = avg[b - 1] + avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_l[b - 1] + gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1) > 0);\n a = 20.0\n * (m * 3.0 - a)\n / (a * (gfc.numlines_l[b - 1] + gfc.numlines_l[b]\n + gfc.numlines_l[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n }\n assert(b > 0);\n assert(b == gfc.npart_l - 1);\n\n a = avg[b - 1] + avg[b];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n assert((gfc.numlines_l[b - 1] + gfc.numlines_l[b] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_l[b - 1] + gfc.numlines_l[b] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n assert(b == (gfc.npart_l - 1));\n }\n\n var fircoef = [\n -8.65163e-18 * 2, -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2,\n -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2, 0.0931738 * 2,\n -5.52212e-17 * 2, -0.313819 * 2\n ];\n\n this.L3psycho_anal_ns = function (gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, percep_entropy, percep_MS_entropy, energy, blocktype_d) {\n /*\n * to get a good cache performance, one has to think about the sequence,\n * in which the variables are used.\n */\n var gfc = gfp.internal_flags;\n\n /* fft and energy calculation */\n var wsamp_L = new_float_n([2, Encoder.BLKSIZE]);\n var wsamp_S = new_float_n([2, 3, Encoder.BLKSIZE_s]);\n\n /* convolution */\n var eb_l = new_float(Encoder.CBANDS + 1);\n var eb_s = new_float(Encoder.CBANDS + 1);\n var thr = new_float(Encoder.CBANDS + 2);\n\n /* block type */\n var blocktype = new_int(2), uselongblock = new_int(2);\n\n /* usual variables like loop indices, etc.. */\n var numchn, chn;\n var b, i, j, k;\n var sb, sblock;\n\n /* variables used for --nspsytune */\n var ns_hpfsmpl = new_float_n([2, 576]);\n var pcfact;\n var mask_idx_l = new_int(Encoder.CBANDS + 2), mask_idx_s = new_int(Encoder.CBANDS + 2);\n\n Arrays.fill(mask_idx_s, 0);\n\n numchn = gfc.channels_out;\n /* chn=2 and 3 = Mid and Side channels */\n if (gfp.mode == MPEGMode.JOINT_STEREO)\n numchn = 4;\n\n if (gfp.VBR == VbrMode.vbr_off)\n pcfact = gfc.ResvMax == 0 ? 0 : ( gfc.ResvSize)\n / gfc.ResvMax * 0.5;\n else if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh\n || gfp.VBR == VbrMode.vbr_mt) {\n pcfact = 0.6;\n } else\n pcfact = 1.0;\n\n /**********************************************************************\n * Apply HPF of fs/4 to the input signal. This is used for attack\n * detection / handling.\n **********************************************************************/\n /* Don't copy the input buffer into a temporary buffer */\n /* unroll the loop 2 times */\n for (chn = 0; chn < gfc.channels_out; chn++) {\n /* apply high pass filter of fs/4 */\n var firbuf = buffer[chn];\n var firbufPos = bufPos + 576 - 350 - NSFIRLEN + 192;\n assert(fircoef.length == ((NSFIRLEN - 1) / 2));\n for (i = 0; i < 576; i++) {\n var sum1, sum2;\n sum1 = firbuf[firbufPos + i + 10];\n sum2 = 0.0;\n for (j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) {\n sum1 += fircoef[j]\n * (firbuf[firbufPos + i + j] + firbuf[firbufPos + i\n + NSFIRLEN - j]);\n sum2 += fircoef[j + 1]\n * (firbuf[firbufPos + i + j + 1] + firbuf[firbufPos\n + i + NSFIRLEN - j - 1]);\n }\n ns_hpfsmpl[chn][i] = sum1 + sum2;\n }\n masking_ratio[gr_out][chn].en.assign(gfc.en[chn]);\n masking_ratio[gr_out][chn].thm.assign(gfc.thm[chn]);\n if (numchn > 2) {\n /* MS maskings */\n /* percep_MS_entropy [chn-2] = gfc . pe [chn]; */\n masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn + 2]);\n masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn + 2]);\n }\n }\n\n for (chn = 0; chn < numchn; chn++) {\n var wsamp_l;\n var wsamp_s;\n var en_subshort = new_float(12);\n var en_short = [0, 0, 0, 0];\n var attack_intensity = new_float(12);\n var ns_uselongblock = 1;\n var attackThreshold;\n var max = new_float(Encoder.CBANDS), avg = new_float(Encoder.CBANDS);\n var ns_attacks = [0, 0, 0, 0];\n var fftenergy = new_float(Encoder.HBLKSIZE);\n var fftenergy_s = new_float_n([3, Encoder.HBLKSIZE_s]);\n\n /*\n * rh 20040301: the following loops do access one off the limits so\n * I increase the array dimensions by one and initialize the\n * accessed values to zero\n */\n assert(gfc.npart_s <= Encoder.CBANDS);\n assert(gfc.npart_l <= Encoder.CBANDS);\n\n /***************************************************************\n * determine the block type (window type)\n ***************************************************************/\n /* calculate energies of each sub-shortblocks */\n for (i = 0; i < 3; i++) {\n en_subshort[i] = gfc.nsPsy.last_en_subshort[chn][i + 6];\n assert(gfc.nsPsy.last_en_subshort[chn][i + 4] > 0);\n attack_intensity[i] = en_subshort[i]\n / gfc.nsPsy.last_en_subshort[chn][i + 4];\n en_short[0] += en_subshort[i];\n }\n\n if (chn == 2) {\n for (i = 0; i < 576; i++) {\n var l, r;\n l = ns_hpfsmpl[0][i];\n r = ns_hpfsmpl[1][i];\n ns_hpfsmpl[0][i] = l + r;\n ns_hpfsmpl[1][i] = l - r;\n }\n }\n {\n var pf = ns_hpfsmpl[chn & 1];\n var pfPos = 0;\n for (i = 0; i < 9; i++) {\n var pfe = pfPos + 576 / 9;\n var p = 1.;\n for (; pfPos < pfe; pfPos++)\n if (p < Math.abs(pf[pfPos]))\n p = Math.abs(pf[pfPos]);\n\n gfc.nsPsy.last_en_subshort[chn][i] = en_subshort[i + 3] = p;\n en_short[1 + i / 3] += p;\n if (p > en_subshort[i + 3 - 2]) {\n assert(en_subshort[i + 3 - 2] > 0);\n p = p / en_subshort[i + 3 - 2];\n } else if (en_subshort[i + 3 - 2] > p * 10.0) {\n assert(p > 0);\n p = en_subshort[i + 3 - 2] / (p * 10.0);\n } else\n p = 0.0;\n attack_intensity[i + 3] = p;\n }\n }\n\n if (gfp.analysis) {\n var x = attack_intensity[0];\n for (i = 1; i < 12; i++)\n if (x < attack_intensity[i])\n x = attack_intensity[i];\n gfc.pinfo.ers[gr_out][chn] = gfc.pinfo.ers_save[chn];\n gfc.pinfo.ers_save[chn] = x;\n }\n\n /* compare energies between sub-shortblocks */\n attackThreshold = (chn == 3) ? gfc.nsPsy.attackthre_s\n : gfc.nsPsy.attackthre;\n for (i = 0; i < 12; i++)\n if (0 == ns_attacks[i / 3]\n && attack_intensity[i] > attackThreshold)\n ns_attacks[i / 3] = (i % 3) + 1;\n\n /*\n * should have energy change between short blocks, in order to avoid\n * periodic signals\n */\n for (i = 1; i < 4; i++) {\n var ratio;\n if (en_short[i - 1] > en_short[i]) {\n assert(en_short[i] > 0);\n ratio = en_short[i - 1] / en_short[i];\n } else {\n assert(en_short[i - 1] > 0);\n ratio = en_short[i] / en_short[i - 1];\n }\n if (ratio < 1.7) {\n ns_attacks[i] = 0;\n if (i == 1)\n ns_attacks[0] = 0;\n }\n }\n\n if (ns_attacks[0] != 0 && gfc.nsPsy.lastAttacks[chn] != 0)\n ns_attacks[0] = 0;\n\n if (gfc.nsPsy.lastAttacks[chn] == 3\n || (ns_attacks[0] + ns_attacks[1] + ns_attacks[2] + ns_attacks[3]) != 0) {\n ns_uselongblock = 0;\n\n if (ns_attacks[1] != 0 && ns_attacks[0] != 0)\n ns_attacks[1] = 0;\n if (ns_attacks[2] != 0 && ns_attacks[1] != 0)\n ns_attacks[2] = 0;\n if (ns_attacks[3] != 0 && ns_attacks[2] != 0)\n ns_attacks[3] = 0;\n }\n\n if (chn < 2) {\n uselongblock[chn] = ns_uselongblock;\n } else {\n if (ns_uselongblock == 0) {\n uselongblock[0] = uselongblock[1] = 0;\n }\n }\n\n /*\n * there is a one granule delay. Copy maskings computed last call\n * into masking_ratio to return to calling program.\n */\n energy[chn] = gfc.tot_ener[chn];\n\n /*********************************************************************\n * compute FFTs\n *********************************************************************/\n wsamp_s = wsamp_S;\n wsamp_l = wsamp_L;\n compute_ffts(gfp, fftenergy, fftenergy_s, wsamp_l, (chn & 1),\n wsamp_s, (chn & 1), gr_out, chn, buffer, bufPos);\n\n /*********************************************************************\n * Calculate the energy and the tonality of each partition.\n *********************************************************************/\n calc_energy(gfc, fftenergy, eb_l, max, avg);\n calc_mask_index_l(gfc, max, avg, mask_idx_l);\n /* compute masking thresholds for short blocks */\n for (sblock = 0; sblock < 3; sblock++) {\n var enn, thmm;\n compute_masking_s(gfp, fftenergy_s, eb_s, thr, chn, sblock);\n convert_partition2scalefac_s(gfc, eb_s, thr, chn, sblock);\n /**** short block pre-echo control ****/\n for (sb = 0; sb < Encoder.SBMAX_s; sb++) {\n thmm = gfc.thm[chn].s[sb][sblock];\n\n thmm *= NS_PREECHO_ATT0;\n if (ns_attacks[sblock] >= 2 || ns_attacks[sblock + 1] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT1 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n if (ns_attacks[sblock] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n } else if ((sblock != 0 && ns_attacks[sblock - 1] == 3)\n || (sblock == 0 && gfc.nsPsy.lastAttacks[chn] == 3)) {\n var idx = (sblock != 2) ? sblock + 1 : 0;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n /* pulse like signal detection for fatboy.wav and so on */\n enn = en_subshort[sblock * 3 + 3]\n + en_subshort[sblock * 3 + 4]\n + en_subshort[sblock * 3 + 5];\n if (en_subshort[sblock * 3 + 5] * 6 < enn) {\n thmm *= 0.5;\n if (en_subshort[sblock * 3 + 4] * 6 < enn)\n thmm *= 0.5;\n }\n\n gfc.thm[chn].s[sb][sblock] = thmm;\n }\n }\n gfc.nsPsy.lastAttacks[chn] = ns_attacks[2];\n\n /*********************************************************************\n * convolve the partitioned energy and unpredictability with the\n * spreading function, s3_l[b][k]\n ********************************************************************/\n k = 0;\n {\n for (b = 0; b < gfc.npart_l; b++) {\n /*\n * convolve the partitioned energy with the spreading\n * function\n */\n var kk = gfc.s3ind[b][0];\n var eb2 = eb_l[kk] * tab[mask_idx_l[kk]];\n var ecb = gfc.s3_ll[k++] * eb2;\n while (++kk <= gfc.s3ind[b][1]) {\n eb2 = eb_l[kk] * tab[mask_idx_l[kk]];\n ecb = mask_add(ecb, gfc.s3_ll[k++] * eb2, kk, kk - b,\n gfc, 0);\n }\n ecb *= 0.158489319246111;\n /* pow(10,-0.8) */\n\n /**** long block pre-echo control ****/\n /**\n *
\n                     * dont use long block pre-echo control if previous granule was\n                     * a short block.  This is to avoid the situation:\n                     * frame0:  quiet (very low masking)\n                     * frame1:  surge  (triggers short blocks)\n                     * frame2:  regular frame.  looks like pre-echo when compared to\n                     *          frame0, but all pre-echo was in frame1.\n                     * 
\n */\n /*\n * chn=0,1 L and R channels\n *\n * chn=2,3 S and M channels.\n */\n\n if (gfc.blocktype_old[chn & 1] == Encoder.SHORT_TYPE)\n thr[b] = ecb;\n else\n thr[b] = NS_INTERP(\n Math.min(ecb, Math.min(rpelev\n * gfc.nb_1[chn][b], rpelev2\n * gfc.nb_2[chn][b])), ecb, pcfact);\n\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = ecb;\n }\n }\n for (; b <= Encoder.CBANDS; ++b) {\n eb_l[b] = 0;\n thr[b] = 0;\n }\n /* compute masking thresholds for long blocks */\n convert_partition2scalefac_l(gfc, eb_l, thr, chn);\n }\n /* end loop over chn */\n\n if (gfp.mode == MPEGMode.STEREO || gfp.mode == MPEGMode.JOINT_STEREO) {\n if (gfp.interChRatio > 0.0) {\n calc_interchannel_masking(gfp, gfp.interChRatio);\n }\n }\n\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n var msfix;\n msfix1(gfc);\n msfix = gfp.msfix;\n if (Math.abs(msfix) > 0.0)\n ns_msfix(gfc, msfix, gfp.ATHlower * gfc.ATH.adjust);\n }\n\n /***************************************************************\n * determine final block type\n ***************************************************************/\n block_type_set(gfp, uselongblock, blocktype_d, blocktype);\n\n /*********************************************************************\n * compute the value of PE to return ... no delay and advance\n *********************************************************************/\n for (chn = 0; chn < numchn; chn++) {\n var ppe;\n var ppePos = 0;\n var type;\n var mr;\n\n if (chn > 1) {\n ppe = percep_MS_entropy;\n ppePos = -2;\n type = Encoder.NORM_TYPE;\n if (blocktype_d[0] == Encoder.SHORT_TYPE\n || blocktype_d[1] == Encoder.SHORT_TYPE)\n type = Encoder.SHORT_TYPE;\n mr = masking_MS_ratio[gr_out][chn - 2];\n } else {\n ppe = percep_entropy;\n ppePos = 0;\n type = blocktype_d[chn];\n mr = masking_ratio[gr_out][chn];\n }\n\n if (type == Encoder.SHORT_TYPE)\n ppe[ppePos + chn] = pecalc_s(mr, gfc.masking_lower);\n else\n ppe[ppePos + chn] = pecalc_l(mr, gfc.masking_lower);\n\n if (gfp.analysis)\n gfc.pinfo.pe[gr_out][chn] = ppe[ppePos + chn];\n\n }\n return 0;\n }\n\n function vbrpsy_compute_fft_l(gfp, buffer, bufPos, chn, gr_out, fftenergy, wsamp_l, wsamp_lPos) {\n var gfc = gfp.internal_flags;\n if (chn < 2) {\n fft.fft_long(gfc, wsamp_l[wsamp_lPos], chn, buffer, bufPos);\n } else if (chn == 2) {\n /* FFT data for mid and side channel is derived from L & R */\n for (var j = Encoder.BLKSIZE - 1; j >= 0; --j) {\n var l = wsamp_l[wsamp_lPos + 0][j];\n var r = wsamp_l[wsamp_lPos + 1][j];\n wsamp_l[wsamp_lPos + 0][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_l[wsamp_lPos + 1][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy[0] = NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos + 0][0]);\n fftenergy[0] *= fftenergy[0];\n\n for (var j = Encoder.BLKSIZE / 2 - 1; j >= 0; --j) {\n var re = wsamp_l[wsamp_lPos + 0][Encoder.BLKSIZE / 2 - j];\n var im = wsamp_l[wsamp_lPos + 0][Encoder.BLKSIZE / 2 + j];\n fftenergy[Encoder.BLKSIZE / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n /* total energy */\n {\n var totalenergy = 0.0;\n for (var j = 11; j < Encoder.HBLKSIZE; j++)\n totalenergy += fftenergy[j];\n\n gfc.tot_ener[chn] = totalenergy;\n }\n\n if (gfp.analysis) {\n for (var j = 0; j < Encoder.HBLKSIZE; j++) {\n gfc.pinfo.energy[gr_out][chn][j] = gfc.pinfo.energy_save[chn][j];\n gfc.pinfo.energy_save[chn][j] = fftenergy[j];\n }\n gfc.pinfo.pe[gr_out][chn] = gfc.pe[chn];\n }\n }\n\n function vbrpsy_compute_fft_s(gfp, buffer, bufPos, chn, sblock, fftenergy_s, wsamp_s, wsamp_sPos) {\n var gfc = gfp.internal_flags;\n\n if (sblock == 0 && chn < 2) {\n fft.fft_short(gfc, wsamp_s[wsamp_sPos], chn, buffer, bufPos);\n }\n if (chn == 2) {\n /* FFT data for mid and side channel is derived from L & R */\n for (var j = Encoder.BLKSIZE_s - 1; j >= 0; --j) {\n var l = wsamp_s[wsamp_sPos + 0][sblock][j];\n var r = wsamp_s[wsamp_sPos + 1][sblock][j];\n wsamp_s[wsamp_sPos + 0][sblock][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_s[wsamp_sPos + 1][sblock][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy_s[sblock][0] = wsamp_s[wsamp_sPos + 0][sblock][0];\n fftenergy_s[sblock][0] *= fftenergy_s[sblock][0];\n for (var j = Encoder.BLKSIZE_s / 2 - 1; j >= 0; --j) {\n var re = wsamp_s[wsamp_sPos + 0][sblock][Encoder.BLKSIZE_s / 2 - j];\n var im = wsamp_s[wsamp_sPos + 0][sblock][Encoder.BLKSIZE_s / 2 + j];\n fftenergy_s[sblock][Encoder.BLKSIZE_s / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n }\n\n /**\n * compute loudness approximation (used for ATH auto-level adjustment)\n */\n function vbrpsy_compute_loudness_approximation_l(gfp, gr_out, chn, fftenergy) {\n var gfc = gfp.internal_flags;\n if (gfp.athaa_loudapprox == 2 && chn < 2) {\n // no loudness for mid/side ch\n gfc.loudness_sq[gr_out][chn] = gfc.loudness_sq_save[chn];\n gfc.loudness_sq_save[chn] = psycho_loudness_approx(fftenergy, gfc);\n }\n }\n\n var fircoef_ = [-8.65163e-18 * 2,\n -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2,\n -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2,\n 0.0931738 * 2, -5.52212e-17 * 2, -0.313819 * 2];\n\n /**\n * Apply HPF of fs/4 to the input signal. This is used for attack detection\n * / handling.\n */\n function vbrpsy_attack_detection(gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, energy, sub_short_factor, ns_attacks, uselongblock) {\n var ns_hpfsmpl = new_float_n([2, 576]);\n var gfc = gfp.internal_flags;\n var n_chn_out = gfc.channels_out;\n /* chn=2 and 3 = Mid and Side channels */\n var n_chn_psy = (gfp.mode == MPEGMode.JOINT_STEREO) ? 4 : n_chn_out;\n /* Don't copy the input buffer into a temporary buffer */\n /* unroll the loop 2 times */\n for (var chn = 0; chn < n_chn_out; chn++) {\n /* apply high pass filter of fs/4 */\n firbuf = buffer[chn];\n var firbufPos = bufPos + 576 - 350 - NSFIRLEN + 192;\n assert(fircoef_.length == ((NSFIRLEN - 1) / 2));\n for (var i = 0; i < 576; i++) {\n var sum1, sum2;\n sum1 = firbuf[firbufPos + i + 10];\n sum2 = 0.0;\n for (var j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) {\n sum1 += fircoef_[j]\n * (firbuf[firbufPos + i + j] + firbuf[firbufPos + i\n + NSFIRLEN - j]);\n sum2 += fircoef_[j + 1]\n * (firbuf[firbufPos + i + j + 1] + firbuf[firbufPos\n + i + NSFIRLEN - j - 1]);\n }\n ns_hpfsmpl[chn][i] = sum1 + sum2;\n }\n masking_ratio[gr_out][chn].en.assign(gfc.en[chn]);\n masking_ratio[gr_out][chn].thm.assign(gfc.thm[chn]);\n if (n_chn_psy > 2) {\n /* MS maskings */\n /* percep_MS_entropy [chn-2] = gfc . pe [chn]; */\n masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn + 2]);\n masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn + 2]);\n }\n }\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var attack_intensity = new_float(12);\n var en_subshort = new_float(12);\n var en_short = [0, 0, 0, 0];\n var pf = ns_hpfsmpl[chn & 1];\n var pfPos = 0;\n var attackThreshold = (chn == 3) ? gfc.nsPsy.attackthre_s\n : gfc.nsPsy.attackthre;\n var ns_uselongblock = 1;\n\n if (chn == 2) {\n for (var i = 0, j = 576; j > 0; ++i, --j) {\n var l = ns_hpfsmpl[0][i];\n var r = ns_hpfsmpl[1][i];\n ns_hpfsmpl[0][i] = l + r;\n ns_hpfsmpl[1][i] = l - r;\n }\n }\n /***************************************************************\n * determine the block type (window type)\n ***************************************************************/\n /* calculate energies of each sub-shortblocks */\n for (var i = 0; i < 3; i++) {\n en_subshort[i] = gfc.nsPsy.last_en_subshort[chn][i + 6];\n assert(gfc.nsPsy.last_en_subshort[chn][i + 4] > 0);\n attack_intensity[i] = en_subshort[i]\n / gfc.nsPsy.last_en_subshort[chn][i + 4];\n en_short[0] += en_subshort[i];\n }\n\n for (var i = 0; i < 9; i++) {\n var pfe = pfPos + 576 / 9;\n var p = 1.;\n for (; pfPos < pfe; pfPos++)\n if (p < Math.abs(pf[pfPos]))\n p = Math.abs(pf[pfPos]);\n\n gfc.nsPsy.last_en_subshort[chn][i] = en_subshort[i + 3] = p;\n en_short[1 + i / 3] += p;\n if (p > en_subshort[i + 3 - 2]) {\n assert(en_subshort[i + 3 - 2] > 0);\n p = p / en_subshort[i + 3 - 2];\n } else if (en_subshort[i + 3 - 2] > p * 10.0) {\n assert(p > 0);\n p = en_subshort[i + 3 - 2] / (p * 10.0);\n } else {\n p = 0.0;\n }\n attack_intensity[i + 3] = p;\n }\n /* pulse like signal detection for fatboy.wav and so on */\n for (var i = 0; i < 3; ++i) {\n var enn = en_subshort[i * 3 + 3]\n + en_subshort[i * 3 + 4] + en_subshort[i * 3 + 5];\n var factor = 1.;\n if (en_subshort[i * 3 + 5] * 6 < enn) {\n factor *= 0.5;\n if (en_subshort[i * 3 + 4] * 6 < enn) {\n factor *= 0.5;\n }\n }\n sub_short_factor[chn][i] = factor;\n }\n\n if (gfp.analysis) {\n var x = attack_intensity[0];\n for (var i = 1; i < 12; i++) {\n if (x < attack_intensity[i]) {\n x = attack_intensity[i];\n }\n }\n gfc.pinfo.ers[gr_out][chn] = gfc.pinfo.ers_save[chn];\n gfc.pinfo.ers_save[chn] = x;\n }\n\n /* compare energies between sub-shortblocks */\n for (var i = 0; i < 12; i++) {\n if (0 == ns_attacks[chn][i / 3]\n && attack_intensity[i] > attackThreshold) {\n ns_attacks[chn][i / 3] = (i % 3) + 1;\n }\n }\n\n /*\n * should have energy change between short blocks, in order to avoid\n * periodic signals\n */\n /* Good samples to show the effect are Trumpet test songs */\n /*\n * GB: tuned (1) to avoid too many short blocks for test sample\n * TRUMPET\n */\n /*\n * RH: tuned (2) to let enough short blocks through for test sample\n * FSOL and SNAPS\n */\n for (var i = 1; i < 4; i++) {\n var u = en_short[i - 1];\n var v = en_short[i];\n var m = Math.max(u, v);\n if (m < 40000) { /* (2) */\n if (u < 1.7 * v && v < 1.7 * u) { /* (1) */\n if (i == 1 && ns_attacks[chn][0] <= ns_attacks[chn][i]) {\n ns_attacks[chn][0] = 0;\n }\n ns_attacks[chn][i] = 0;\n }\n }\n }\n\n if (ns_attacks[chn][0] <= gfc.nsPsy.lastAttacks[chn]) {\n ns_attacks[chn][0] = 0;\n }\n\n if (gfc.nsPsy.lastAttacks[chn] == 3\n || (ns_attacks[chn][0] + ns_attacks[chn][1]\n + ns_attacks[chn][2] + ns_attacks[chn][3]) != 0) {\n ns_uselongblock = 0;\n\n if (ns_attacks[chn][1] != 0 && ns_attacks[chn][0] != 0) {\n ns_attacks[chn][1] = 0;\n }\n if (ns_attacks[chn][2] != 0 && ns_attacks[chn][1] != 0) {\n ns_attacks[chn][2] = 0;\n }\n if (ns_attacks[chn][3] != 0 && ns_attacks[chn][2] != 0) {\n ns_attacks[chn][3] = 0;\n }\n }\n if (chn < 2) {\n uselongblock[chn] = ns_uselongblock;\n } else {\n if (ns_uselongblock == 0) {\n uselongblock[0] = uselongblock[1] = 0;\n }\n }\n\n /*\n * there is a one granule delay. Copy maskings computed last call\n * into masking_ratio to return to calling program.\n */\n energy[chn] = gfc.tot_ener[chn];\n }\n }\n\n function vbrpsy_skip_masking_s(gfc, chn, sblock) {\n if (sblock == 0) {\n for (var b = 0; b < gfc.npart_s; b++) {\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = 0;\n }\n }\n }\n\n function vbrpsy_skip_masking_l(gfc, chn) {\n for (var b = 0; b < gfc.npart_l; b++) {\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = 0;\n }\n }\n\n function psyvbr_calc_mask_index_s(gfc, max, avg, mask_idx) {\n var last_tab_entry = tab.length - 1;\n var b = 0;\n var a = avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n\n for (b = 1; b < gfc.npart_s - 1; b++) {\n a = avg[b - 1] + avg[b] + avg[b + 1];\n assert(b + 1 < gfc.npart_s);\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_s[b - 1] + gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1) > 0);\n a = 20.0\n * (m * 3.0 - a)\n / (a * (gfc.numlines_s[b - 1] + gfc.numlines_s[b]\n + gfc.numlines_s[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n }\n assert(b > 0);\n assert(b == gfc.npart_s - 1);\n\n a = avg[b - 1] + avg[b];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n assert((gfc.numlines_s[b - 1] + gfc.numlines_s[b] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_s[b - 1] + gfc.numlines_s[b] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n assert(b == (gfc.npart_s - 1));\n }\n\n function vbrpsy_compute_masking_s(gfp, fftenergy_s, eb, thr, chn, sblock) {\n var gfc = gfp.internal_flags;\n var max = new float[Encoder.CBANDS], avg = new_float(Encoder.CBANDS);\n var i, j, b;\n var mask_idx_s = new int[Encoder.CBANDS];\n\n for (b = j = 0; b < gfc.npart_s; ++b) {\n var ebb = 0, m = 0;\n var n = gfc.numlines_s[b];\n for (i = 0; i < n; ++i, ++j) {\n var el = fftenergy_s[sblock][j];\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n assert(ebb >= 0);\n max[b] = m;\n assert(n > 0);\n avg[b] = ebb / n;\n assert(avg[b] >= 0);\n }\n assert(b == gfc.npart_s);\n assert(j == 129);\n for (; b < Encoder.CBANDS; ++b) {\n max[b] = 0;\n avg[b] = 0;\n }\n psyvbr_calc_mask_index_s(gfc, max, avg, mask_idx_s);\n for (j = b = 0; b < gfc.npart_s; b++) {\n var kk = gfc.s3ind_s[b][0];\n var last = gfc.s3ind_s[b][1];\n var dd, dd_n;\n var x, ecb, avg_mask;\n dd = mask_idx_s[kk];\n dd_n = 1;\n ecb = gfc.s3_ss[j] * eb[kk] * tab[mask_idx_s[kk]];\n ++j;\n ++kk;\n while (kk <= last) {\n dd += mask_idx_s[kk];\n dd_n += 1;\n x = gfc.s3_ss[j] * eb[kk] * tab[mask_idx_s[kk]];\n ecb = vbrpsy_mask_add(ecb, x, kk - b);\n ++j;\n ++kk;\n }\n dd = (1 + 2 * dd) / (2 * dd_n);\n avg_mask = tab[dd] * 0.5;\n ecb *= avg_mask;\n thr[b] = ecb;\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = ecb;\n {\n /*\n * if THR exceeds EB, the quantization routines will take the\n * difference from other bands. in case of strong tonal samples\n * (tonaltest.wav) this leads to heavy distortions. that's why\n * we limit THR here.\n */\n x = max[b];\n x *= gfc.minval_s[b];\n x *= avg_mask;\n if (thr[b] > x) {\n thr[b] = x;\n }\n }\n if (gfc.masking_lower > 1) {\n thr[b] *= gfc.masking_lower;\n }\n if (thr[b] > eb[b]) {\n thr[b] = eb[b];\n }\n if (gfc.masking_lower < 1) {\n thr[b] *= gfc.masking_lower;\n }\n\n assert(thr[b] >= 0);\n }\n for (; b < Encoder.CBANDS; ++b) {\n eb[b] = 0;\n thr[b] = 0;\n }\n }\n\n function vbrpsy_compute_masking_l(gfc, fftenergy, eb_l, thr, chn) {\n var max = new_float(Encoder.CBANDS), avg = new_float(Encoder.CBANDS);\n var mask_idx_l = new_int(Encoder.CBANDS + 2);\n var b;\n\n /*********************************************************************\n * Calculate the energy and the tonality of each partition.\n *********************************************************************/\n calc_energy(gfc, fftenergy, eb_l, max, avg);\n calc_mask_index_l(gfc, max, avg, mask_idx_l);\n\n /*********************************************************************\n * convolve the partitioned energy and unpredictability with the\n * spreading function, s3_l[b][k]\n ********************************************************************/\n var k = 0;\n for (b = 0; b < gfc.npart_l; b++) {\n var x, ecb, avg_mask, t;\n /* convolve the partitioned energy with the spreading function */\n var kk = gfc.s3ind[b][0];\n var last = gfc.s3ind[b][1];\n var dd = 0, dd_n = 0;\n dd = mask_idx_l[kk];\n dd_n += 1;\n ecb = gfc.s3_ll[k] * eb_l[kk] * tab[mask_idx_l[kk]];\n ++k;\n ++kk;\n while (kk <= last) {\n dd += mask_idx_l[kk];\n dd_n += 1;\n x = gfc.s3_ll[k] * eb_l[kk] * tab[mask_idx_l[kk]];\n t = vbrpsy_mask_add(ecb, x, kk - b);\n ecb = t;\n ++k;\n ++kk;\n }\n dd = (1 + 2 * dd) / (2 * dd_n);\n avg_mask = tab[dd] * 0.5;\n ecb *= avg_mask;\n\n /**** long block pre-echo control ****/\n /**\n *
\n             * dont use long block pre-echo control if previous granule was\n             * a short block.  This is to avoid the situation:\n             * frame0:  quiet (very low masking)\n             * frame1:  surge  (triggers short blocks)\n             * frame2:  regular frame.  looks like pre-echo when compared to\n             *          frame0, but all pre-echo was in frame1.\n             * 
\n */\n /*\n * chn=0,1 L and R channels chn=2,3 S and M channels.\n */\n if (gfc.blocktype_old[chn & 0x01] == Encoder.SHORT_TYPE) {\n var ecb_limit = rpelev * gfc.nb_1[chn][b];\n if (ecb_limit > 0) {\n thr[b] = Math.min(ecb, ecb_limit);\n } else {\n /**\n *
\n                     * Robert 071209:\n                     * Because we don't calculate long block psy when we know a granule\n                     * should be of short blocks, we don't have any clue how the granule\n                     * before would have looked like as a long block. So we have to guess\n                     * a little bit for this END_TYPE block.\n                     * Most of the time we get away with this sloppyness. (fingers crossed :)\n                     * The speed increase is worth it.\n                     * 
\n */\n thr[b] = Math.min(ecb, eb_l[b] * NS_PREECHO_ATT2);\n }\n } else {\n var ecb_limit_2 = rpelev2 * gfc.nb_2[chn][b];\n var ecb_limit_1 = rpelev * gfc.nb_1[chn][b];\n var ecb_limit;\n if (ecb_limit_2 <= 0) {\n ecb_limit_2 = ecb;\n }\n if (ecb_limit_1 <= 0) {\n ecb_limit_1 = ecb;\n }\n if (gfc.blocktype_old[chn & 0x01] == Encoder.NORM_TYPE) {\n ecb_limit = Math.min(ecb_limit_1, ecb_limit_2);\n } else {\n ecb_limit = ecb_limit_1;\n }\n thr[b] = Math.min(ecb, ecb_limit);\n }\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = ecb;\n {\n /*\n * if THR exceeds EB, the quantization routines will take the\n * difference from other bands. in case of strong tonal samples\n * (tonaltest.wav) this leads to heavy distortions. that's why\n * we limit THR here.\n */\n x = max[b];\n x *= gfc.minval_l[b];\n x *= avg_mask;\n if (thr[b] > x) {\n thr[b] = x;\n }\n }\n if (gfc.masking_lower > 1) {\n thr[b] *= gfc.masking_lower;\n }\n if (thr[b] > eb_l[b]) {\n thr[b] = eb_l[b];\n }\n if (gfc.masking_lower < 1) {\n thr[b] *= gfc.masking_lower;\n }\n assert(thr[b] >= 0);\n }\n for (; b < Encoder.CBANDS; ++b) {\n eb_l[b] = 0;\n thr[b] = 0;\n }\n }\n\n function vbrpsy_compute_block_type(gfp, uselongblock) {\n var gfc = gfp.internal_flags;\n\n if (gfp.short_blocks == ShortBlock.short_block_coupled\n /* force both channels to use the same block type */\n /* this is necessary if the frame is to be encoded in ms_stereo. */\n /* But even without ms_stereo, FhG does this */\n && !(uselongblock[0] != 0 && uselongblock[1] != 0))\n uselongblock[0] = uselongblock[1] = 0;\n\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n /* disable short blocks */\n if (gfp.short_blocks == ShortBlock.short_block_dispensed) {\n uselongblock[chn] = 1;\n }\n if (gfp.short_blocks == ShortBlock.short_block_forced) {\n uselongblock[chn] = 0;\n }\n }\n }\n\n function vbrpsy_apply_block_type(gfp, uselongblock, blocktype_d) {\n var gfc = gfp.internal_flags;\n\n /*\n * update the blocktype of the previous granule, since it depends on\n * what happend in this granule\n */\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n var blocktype = Encoder.NORM_TYPE;\n /* disable short blocks */\n\n if (uselongblock[chn] != 0) {\n /* no attack : use long blocks */\n assert(gfc.blocktype_old[chn] != Encoder.START_TYPE);\n if (gfc.blocktype_old[chn] == Encoder.SHORT_TYPE)\n blocktype = Encoder.STOP_TYPE;\n } else {\n /* attack : use short blocks */\n blocktype = Encoder.SHORT_TYPE;\n if (gfc.blocktype_old[chn] == Encoder.NORM_TYPE) {\n gfc.blocktype_old[chn] = Encoder.START_TYPE;\n }\n if (gfc.blocktype_old[chn] == Encoder.STOP_TYPE)\n gfc.blocktype_old[chn] = Encoder.SHORT_TYPE;\n }\n\n blocktype_d[chn] = gfc.blocktype_old[chn];\n // value returned to calling program\n gfc.blocktype_old[chn] = blocktype;\n // save for next call to l3psy_anal\n }\n }\n\n /**\n * compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper\n */\n function vbrpsy_compute_MS_thresholds(eb, thr, cb_mld, ath_cb, athadjust, msfix, n) {\n var msfix2 = msfix * 2;\n var athlower = msfix > 0 ? Math.pow(10, athadjust) : 1;\n var rside, rmid;\n for (var b = 0; b < n; ++b) {\n var ebM = eb[2][b];\n var ebS = eb[3][b];\n var thmL = thr[0][b];\n var thmR = thr[1][b];\n var thmM = thr[2][b];\n var thmS = thr[3][b];\n\n /* use this fix if L & R masking differs by 2db or less */\n if (thmL <= 1.58 * thmR && thmR <= 1.58 * thmL) {\n var mld_m = cb_mld[b] * ebS;\n var mld_s = cb_mld[b] * ebM;\n rmid = Math.max(thmM, Math.min(thmS, mld_m));\n rside = Math.max(thmS, Math.min(thmM, mld_s));\n } else {\n rmid = thmM;\n rside = thmS;\n }\n if (msfix > 0) {\n /***************************************************************/\n /* Adjust M/S maskings if user set \"msfix\" */\n /***************************************************************/\n /* Naoki Shibata 2000 */\n var thmLR, thmMS;\n var ath = ath_cb[b] * athlower;\n thmLR = Math.min(Math.max(thmL, ath), Math.max(thmR, ath));\n thmM = Math.max(rmid, ath);\n thmS = Math.max(rside, ath);\n thmMS = thmM + thmS;\n if (thmMS > 0 && (thmLR * msfix2) < thmMS) {\n var f = thmLR * msfix2 / thmMS;\n thmM *= f;\n thmS *= f;\n assert(thmMS > 0);\n }\n rmid = Math.min(thmM, rmid);\n rside = Math.min(thmS, rside);\n }\n if (rmid > ebM) {\n rmid = ebM;\n }\n if (rside > ebS) {\n rside = ebS;\n }\n thr[2][b] = rmid;\n thr[3][b] = rside;\n }\n }\n\n this.L3psycho_anal_vbr = function (gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, percep_entropy, percep_MS_entropy, energy, blocktype_d) {\n var gfc = gfp.internal_flags;\n\n /* fft and energy calculation */\n var wsamp_l;\n var wsamp_s;\n var fftenergy = new_float(Encoder.HBLKSIZE);\n var fftenergy_s = new_float_n([3, Encoder.HBLKSIZE_s]);\n var wsamp_L = new_float_n([2, Encoder.BLKSIZE]);\n var wsamp_S = new_float_n([2, 3, Encoder.BLKSIZE_s]);\n var eb = new_float_n([4, Encoder.CBANDS]), thr = new_float_n([4, Encoder.CBANDS]);\n var sub_short_factor = new_float_n([4, 3]);\n var pcfact = 0.6;\n\n /* block type */\n var ns_attacks = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0],\n [0, 0, 0, 0]];\n var uselongblock = new_int(2);\n\n /* usual variables like loop indices, etc.. */\n\n /* chn=2 and 3 = Mid and Side channels */\n var n_chn_psy = (gfp.mode == MPEGMode.JOINT_STEREO) ? 4\n : gfc.channels_out;\n\n vbrpsy_attack_detection(gfp, buffer, bufPos, gr_out, masking_ratio,\n masking_MS_ratio, energy, sub_short_factor, ns_attacks,\n uselongblock);\n\n vbrpsy_compute_block_type(gfp, uselongblock);\n\n /* LONG BLOCK CASE */\n {\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n wsamp_l = wsamp_L;\n vbrpsy_compute_fft_l(gfp, buffer, bufPos, chn, gr_out,\n fftenergy, wsamp_l, ch01);\n\n vbrpsy_compute_loudness_approximation_l(gfp, gr_out, chn,\n fftenergy);\n\n if (uselongblock[ch01] != 0) {\n vbrpsy_compute_masking_l(gfc, fftenergy, eb[chn], thr[chn],\n chn);\n } else {\n vbrpsy_skip_masking_l(gfc, chn);\n }\n }\n if ((uselongblock[0] + uselongblock[1]) == 2) {\n /* M/S channel */\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n vbrpsy_compute_MS_thresholds(eb, thr, gfc.mld_cb_l,\n gfc.ATH.cb_l, gfp.ATHlower * gfc.ATH.adjust,\n gfp.msfix, gfc.npart_l);\n }\n }\n /* TODO: apply adaptive ATH masking here ?? */\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n if (uselongblock[ch01] != 0) {\n convert_partition2scalefac_l(gfc, eb[chn], thr[chn], chn);\n }\n }\n }\n\n /* SHORT BLOCKS CASE */\n {\n for (var sblock = 0; sblock < 3; sblock++) {\n for (var chn = 0; chn < n_chn_psy; ++chn) {\n var ch01 = chn & 0x01;\n\n if (uselongblock[ch01] != 0) {\n vbrpsy_skip_masking_s(gfc, chn, sblock);\n } else {\n /* compute masking thresholds for short blocks */\n wsamp_s = wsamp_S;\n vbrpsy_compute_fft_s(gfp, buffer, bufPos, chn, sblock,\n fftenergy_s, wsamp_s, ch01);\n vbrpsy_compute_masking_s(gfp, fftenergy_s, eb[chn],\n thr[chn], chn, sblock);\n }\n }\n if ((uselongblock[0] + uselongblock[1]) == 0) {\n /* M/S channel */\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n vbrpsy_compute_MS_thresholds(eb, thr, gfc.mld_cb_s,\n gfc.ATH.cb_s, gfp.ATHlower * gfc.ATH.adjust,\n gfp.msfix, gfc.npart_s);\n }\n /* L/R channel */\n }\n /* TODO: apply adaptive ATH masking here ?? */\n for (var chn = 0; chn < n_chn_psy; ++chn) {\n var ch01 = chn & 0x01;\n if (0 == uselongblock[ch01]) {\n convert_partition2scalefac_s(gfc, eb[chn], thr[chn],\n chn, sblock);\n }\n }\n }\n\n /**** short block pre-echo control ****/\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n\n if (uselongblock[ch01] != 0) {\n continue;\n }\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n var new_thmm = new_float(3);\n for (var sblock = 0; sblock < 3; sblock++) {\n var thmm = gfc.thm[chn].s[sb][sblock];\n thmm *= NS_PREECHO_ATT0;\n\n if (ns_attacks[chn][sblock] >= 2\n || ns_attacks[chn][sblock + 1] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT1 * pcfact);\n thmm = Math.min(thmm, p);\n } else if (ns_attacks[chn][sblock] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n } else if ((sblock != 0 && ns_attacks[chn][sblock - 1] == 3)\n || (sblock == 0 && gfc.nsPsy.lastAttacks[chn] == 3)) {\n var idx = (sblock != 2) ? sblock + 1 : 0;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n /* pulse like signal detection for fatboy.wav and so on */\n thmm *= sub_short_factor[chn][sblock];\n\n new_thmm[sblock] = thmm;\n }\n for (var sblock = 0; sblock < 3; sblock++) {\n gfc.thm[chn].s[sb][sblock] = new_thmm[sblock];\n }\n }\n }\n }\n for (var chn = 0; chn < n_chn_psy; chn++) {\n gfc.nsPsy.lastAttacks[chn] = ns_attacks[chn][2];\n }\n\n /***************************************************************\n * determine final block type\n ***************************************************************/\n vbrpsy_apply_block_type(gfp, uselongblock, blocktype_d);\n\n /*********************************************************************\n * compute the value of PE to return ... no delay and advance\n *********************************************************************/\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ppe;\n var ppePos;\n var type;\n var mr;\n\n if (chn > 1) {\n ppe = percep_MS_entropy;\n ppePos = -2;\n type = Encoder.NORM_TYPE;\n if (blocktype_d[0] == Encoder.SHORT_TYPE\n || blocktype_d[1] == Encoder.SHORT_TYPE)\n type = Encoder.SHORT_TYPE;\n mr = masking_MS_ratio[gr_out][chn - 2];\n } else {\n ppe = percep_entropy;\n ppePos = 0;\n type = blocktype_d[chn];\n mr = masking_ratio[gr_out][chn];\n }\n\n if (type == Encoder.SHORT_TYPE) {\n ppe[ppePos + chn] = pecalc_s(mr, gfc.masking_lower);\n } else {\n ppe[ppePos + chn] = pecalc_l(mr, gfc.masking_lower);\n }\n\n if (gfp.analysis) {\n gfc.pinfo.pe[gr_out][chn] = ppe[ppePos + chn];\n }\n }\n return 0;\n }\n\n function s3_func_x(bark, hf_slope) {\n var tempx = bark, tempy;\n\n if (tempx >= 0) {\n tempy = -tempx * 27;\n } else {\n tempy = tempx * hf_slope;\n }\n if (tempy <= -72.0) {\n return 0;\n }\n return Math.exp(tempy * LN_TO_LOG10);\n }\n\n function norm_s3_func_x(hf_slope) {\n var lim_a = 0, lim_b = 0;\n {\n var x = 0, l, h;\n for (x = 0; s3_func_x(x, hf_slope) > 1e-20; x -= 1)\n ;\n l = x;\n h = 0;\n while (Math.abs(h - l) > 1e-12) {\n x = (h + l) / 2;\n if (s3_func_x(x, hf_slope) > 0) {\n h = x;\n } else {\n l = x;\n }\n }\n lim_a = l;\n }\n {\n var x = 0, l, h;\n for (x = 0; s3_func_x(x, hf_slope) > 1e-20; x += 1)\n ;\n l = 0;\n h = x;\n while (Math.abs(h - l) > 1e-12) {\n x = (h + l) / 2;\n if (s3_func_x(x, hf_slope) > 0) {\n l = x;\n } else {\n h = x;\n }\n }\n lim_b = h;\n }\n {\n var sum = 0;\n var m = 1000;\n var i;\n for (i = 0; i <= m; ++i) {\n var x = lim_a + i * (lim_b - lim_a) / m;\n var y = s3_func_x(x, hf_slope);\n sum += y;\n }\n {\n var norm = (m + 1) / (sum * (lim_b - lim_a));\n /* printf( \"norm = %lf\\n\",norm); */\n return norm;\n }\n }\n }\n\n /**\n * The spreading function. Values returned in units of energy\n */\n function s3_func(bark) {\n var tempx, x, tempy, temp;\n tempx = bark;\n if (tempx >= 0)\n tempx *= 3;\n else\n tempx *= 1.5;\n\n if (tempx >= 0.5 && tempx <= 2.5) {\n temp = tempx - 0.5;\n x = 8.0 * (temp * temp - 2.0 * temp);\n } else\n x = 0.0;\n tempx += 0.474;\n tempy = 15.811389 + 7.5 * tempx - 17.5\n * Math.sqrt(1.0 + tempx * tempx);\n\n if (tempy <= -60.0)\n return 0.0;\n\n tempx = Math.exp((x + tempy) * LN_TO_LOG10);\n\n /**\n *
\n         * Normalization.  The spreading function should be normalized so that:\n         * +inf\n         * /\n         * |  s3 [ bark ]  d(bark)   =  1\n         * /\n         * -inf\n         * 
\n */\n tempx /= .6609193;\n return tempx;\n }\n\n /**\n * see for example \"Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7\n */\n function freq2bark(freq) {\n /* input: freq in hz output: barks */\n if (freq < 0)\n freq = 0;\n freq = freq * 0.001;\n return 13.0 * Math.atan(.76 * freq) + 3.5\n * Math.atan(freq * freq / (7.5 * 7.5));\n }\n\n function init_numline(numlines, bo, bm, bval, bval_width, mld, bo_w, sfreq, blksize, scalepos, deltafreq, sbmax) {\n var b_frq = new_float(Encoder.CBANDS + 1);\n var sample_freq_frac = sfreq / (sbmax > 15 ? 2 * 576 : 2 * 192);\n var partition = new_int(Encoder.HBLKSIZE);\n var i;\n sfreq /= blksize;\n var j = 0;\n var ni = 0;\n /* compute numlines, the number of spectral lines in each partition band */\n /* each partition band should be about DELBARK wide. */\n for (i = 0; i < Encoder.CBANDS; i++) {\n var bark1;\n var j2;\n bark1 = freq2bark(sfreq * j);\n\n b_frq[i] = sfreq * j;\n\n for (j2 = j; freq2bark(sfreq * j2) - bark1 < DELBARK\n && j2 <= blksize / 2; j2++)\n ;\n\n numlines[i] = j2 - j;\n ni = i + 1;\n\n while (j < j2) {\n assert(j < Encoder.HBLKSIZE);\n partition[j++] = i;\n }\n if (j > blksize / 2) {\n j = blksize / 2;\n ++i;\n break;\n }\n }\n assert(i < Encoder.CBANDS);\n b_frq[i] = sfreq * j;\n\n for (var sfb = 0; sfb < sbmax; sfb++) {\n var i1, i2, start, end;\n var arg;\n start = scalepos[sfb];\n end = scalepos[sfb + 1];\n\n i1 = 0 | Math.floor(.5 + deltafreq * (start - .5));\n if (i1 < 0)\n i1 = 0;\n i2 = 0 | Math.floor(.5 + deltafreq * (end - .5));\n\n if (i2 > blksize / 2)\n i2 = blksize / 2;\n\n bm[sfb] = (partition[i1] + partition[i2]) / 2;\n bo[sfb] = partition[i2];\n var f_tmp = sample_freq_frac * end;\n /*\n * calculate how much of this band belongs to current scalefactor\n * band\n */\n bo_w[sfb] = (f_tmp - b_frq[bo[sfb]])\n / (b_frq[bo[sfb] + 1] - b_frq[bo[sfb]]);\n if (bo_w[sfb] < 0) {\n bo_w[sfb] = 0;\n } else {\n if (bo_w[sfb] > 1) {\n bo_w[sfb] = 1;\n }\n }\n /* setup stereo demasking thresholds */\n /* formula reverse enginerred from plot in paper */\n arg = freq2bark(sfreq * scalepos[sfb] * deltafreq);\n arg = ( Math.min(arg, 15.5) / 15.5);\n\n mld[sfb] = Math.pow(10.0,\n 1.25 * (1 - Math.cos(Math.PI * arg)) - 2.5);\n }\n\n /* compute bark values of each critical band */\n j = 0;\n for (var k = 0; k < ni; k++) {\n var w = numlines[k];\n var bark1, bark2;\n\n bark1 = freq2bark(sfreq * (j));\n bark2 = freq2bark(sfreq * (j + w - 1));\n bval[k] = .5 * (bark1 + bark2);\n\n bark1 = freq2bark(sfreq * (j - .5));\n bark2 = freq2bark(sfreq * (j + w - .5));\n bval_width[k] = bark2 - bark1;\n j += w;\n }\n\n return ni;\n }\n\n function init_s3_values(s3ind, npart, bval, bval_width, norm, use_old_s3) {\n var s3 = new_float_n([Encoder.CBANDS, Encoder.CBANDS]);\n /*\n * The s3 array is not linear in the bark scale.\n *\n * bval[x] should be used to get the bark value.\n */\n var j;\n var numberOfNoneZero = 0;\n\n /**\n *
\n         * s[i][j], the value of the spreading function,\n         * centered at band j (masker), for band i (maskee)\n         *\n         * i.e.: sum over j to spread into signal barkval=i\n         * NOTE: i and j are used opposite as in the ISO docs\n         * 
\n */\n if (use_old_s3) {\n for (var i = 0; i < npart; i++) {\n for (j = 0; j < npart; j++) {\n var v = s3_func(bval[i] - bval[j]) * bval_width[j];\n s3[i][j] = v * norm[i];\n }\n }\n } else {\n for (j = 0; j < npart; j++) {\n var hf_slope = 15 + Math.min(21 / bval[j], 12);\n var s3_x_norm = norm_s3_func_x(hf_slope);\n for (var i = 0; i < npart; i++) {\n var v = s3_x_norm\n * s3_func_x(bval[i] - bval[j], hf_slope)\n * bval_width[j];\n s3[i][j] = v * norm[i];\n }\n }\n }\n for (var i = 0; i < npart; i++) {\n for (j = 0; j < npart; j++) {\n if (s3[i][j] > 0.0)\n break;\n }\n s3ind[i][0] = j;\n\n for (j = npart - 1; j > 0; j--) {\n if (s3[i][j] > 0.0)\n break;\n }\n s3ind[i][1] = j;\n numberOfNoneZero += (s3ind[i][1] - s3ind[i][0] + 1);\n }\n\n var p = new_float(numberOfNoneZero);\n var k = 0;\n for (var i = 0; i < npart; i++)\n for (j = s3ind[i][0]; j <= s3ind[i][1]; j++)\n p[k++] = s3[i][j];\n\n return p;\n }\n\n function stereo_demask(f) {\n /* setup stereo demasking thresholds */\n /* formula reverse enginerred from plot in paper */\n var arg = freq2bark(f);\n arg = (Math.min(arg, 15.5) / 15.5);\n\n return Math.pow(10.0,\n 1.25 * (1 - Math.cos(Math.PI * arg)) - 2.5);\n }\n\n /**\n * NOTE: the bitrate reduction from the inter-channel masking effect is low\n * compared to the chance of getting annyoing artefacts. L3psycho_anal_vbr\n * does not use this feature. (Robert 071216)\n */\n this.psymodel_init = function (gfp) {\n var gfc = gfp.internal_flags;\n var i;\n var useOldS3 = true;\n var bvl_a = 13, bvl_b = 24;\n var snr_l_a = 0, snr_l_b = 0;\n var snr_s_a = -8.25, snr_s_b = -4.5;\n var bval = new_float(Encoder.CBANDS);\n var bval_width = new_float(Encoder.CBANDS);\n var norm = new_float(Encoder.CBANDS);\n var sfreq = gfp.out_samplerate;\n\n switch (gfp.experimentalZ) {\n default:\n case 0:\n useOldS3 = true;\n break;\n case 1:\n useOldS3 = (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) ? false\n : true;\n break;\n case 2:\n useOldS3 = false;\n break;\n case 3:\n bvl_a = 8;\n snr_l_a = -1.75;\n snr_l_b = -0.0125;\n snr_s_a = -8.25;\n snr_s_b = -2.25;\n break;\n }\n gfc.ms_ener_ratio_old = .25;\n gfc.blocktype_old[0] = gfc.blocktype_old[1] = Encoder.NORM_TYPE;\n // the vbr header is long blocks\n\n for (i = 0; i < 4; ++i) {\n for (var j = 0; j < Encoder.CBANDS; ++j) {\n gfc.nb_1[i][j] = 1e20;\n gfc.nb_2[i][j] = 1e20;\n gfc.nb_s1[i][j] = gfc.nb_s2[i][j] = 1.0;\n }\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n gfc.en[i].l[sb] = 1e20;\n gfc.thm[i].l[sb] = 1e20;\n }\n for (var j = 0; j < 3; ++j) {\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n gfc.en[i].s[sb][j] = 1e20;\n gfc.thm[i].s[sb][j] = 1e20;\n }\n gfc.nsPsy.lastAttacks[i] = 0;\n }\n for (var j = 0; j < 9; j++)\n gfc.nsPsy.last_en_subshort[i][j] = 10.;\n }\n\n /* init. for loudness approx. -jd 2001 mar 27 */\n gfc.loudness_sq_save[0] = gfc.loudness_sq_save[1] = 0.0;\n\n /*************************************************************************\n * now compute the psychoacoustic model specific constants\n ************************************************************************/\n /* compute numlines, bo, bm, bval, bval_width, mld */\n\n gfc.npart_l = init_numline(gfc.numlines_l, gfc.bo_l, gfc.bm_l, bval,\n bval_width, gfc.mld_l, gfc.PSY.bo_l_weight, sfreq,\n Encoder.BLKSIZE, gfc.scalefac_band.l, Encoder.BLKSIZE\n / (2.0 * 576), Encoder.SBMAX_l);\n assert(gfc.npart_l < Encoder.CBANDS);\n /* compute the spreading function */\n for (i = 0; i < gfc.npart_l; i++) {\n var snr = snr_l_a;\n if (bval[i] >= bvl_a) {\n snr = snr_l_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) + snr_l_a\n * (bvl_b - bval[i]) / (bvl_b - bvl_a);\n }\n norm[i] = Math.pow(10.0, snr / 10.0);\n if (gfc.numlines_l[i] > 0) {\n gfc.rnumlines_l[i] = 1.0 / gfc.numlines_l[i];\n } else {\n gfc.rnumlines_l[i] = 0;\n }\n }\n gfc.s3_ll = init_s3_values(gfc.s3ind, gfc.npart_l, bval, bval_width,\n norm, useOldS3);\n\n /* compute long block specific values, ATH and MINVAL */\n var j = 0;\n for (i = 0; i < gfc.npart_l; i++) {\n var x;\n\n /* ATH */\n x = Float.MAX_VALUE;\n for (var k = 0; k < gfc.numlines_l[i]; k++, j++) {\n var freq = sfreq * j / (1000.0 * Encoder.BLKSIZE);\n var level;\n /*\n * ATH below 100 Hz constant, not further climbing\n */\n level = this.ATHformula(freq * 1000, gfp) - 20;\n // scale to FFT units; returned value is in dB\n level = Math.pow(10., 0.1 * level);\n // convert from dB . energy\n level *= gfc.numlines_l[i];\n if (x > level)\n x = level;\n }\n gfc.ATH.cb_l[i] = x;\n\n /*\n * MINVAL. For low freq, the strength of the masking is limited by\n * minval this is an ISO MPEG1 thing, dont know if it is really\n * needed\n */\n /*\n * FIXME: it does work to reduce low-freq problems in S53-Wind-Sax\n * and lead-voice samples, but introduces some 3 kbps bit bloat too.\n * TODO: Further refinement of the shape of this hack.\n */\n x = -20 + bval[i] * 20 / 10;\n if (x > 6) {\n x = 100;\n }\n if (x < -15) {\n x = -15;\n }\n x -= 8.;\n gfc.minval_l[i] = (Math.pow(10.0, x / 10.) * gfc.numlines_l[i]);\n }\n\n /************************************************************************\n * do the same things for short blocks\n ************************************************************************/\n gfc.npart_s = init_numline(gfc.numlines_s, gfc.bo_s, gfc.bm_s, bval,\n bval_width, gfc.mld_s, gfc.PSY.bo_s_weight, sfreq,\n Encoder.BLKSIZE_s, gfc.scalefac_band.s, Encoder.BLKSIZE_s\n / (2.0 * 192), Encoder.SBMAX_s);\n assert(gfc.npart_s < Encoder.CBANDS);\n\n /* SNR formula. short block is normalized by SNR. is it still right ? */\n j = 0;\n for (i = 0; i < gfc.npart_s; i++) {\n var x;\n var snr = snr_s_a;\n if (bval[i] >= bvl_a) {\n snr = snr_s_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) + snr_s_a\n * (bvl_b - bval[i]) / (bvl_b - bvl_a);\n }\n norm[i] = Math.pow(10.0, snr / 10.0);\n\n /* ATH */\n x = Float.MAX_VALUE;\n for (var k = 0; k < gfc.numlines_s[i]; k++, j++) {\n var freq = sfreq * j / (1000.0 * Encoder.BLKSIZE_s);\n var level;\n /* freq = Min(.1,freq); */\n /*\n * ATH below 100 Hz constant, not\n * further climbing\n */\n level = this.ATHformula(freq * 1000, gfp) - 20;\n // scale to FFT units; returned value is in dB\n level = Math.pow(10., 0.1 * level);\n // convert from dB . energy\n level *= gfc.numlines_s[i];\n if (x > level)\n x = level;\n }\n gfc.ATH.cb_s[i] = x;\n\n /*\n * MINVAL. For low freq, the strength of the masking is limited by\n * minval this is an ISO MPEG1 thing, dont know if it is really\n * needed\n */\n x = (-7.0 + bval[i] * 7.0 / 12.0);\n if (bval[i] > 12) {\n x *= 1 + Math.log(1 + x) * 3.1;\n }\n if (bval[i] < 12) {\n x *= 1 + Math.log(1 - x) * 2.3;\n }\n if (x < -15) {\n x = -15;\n }\n x -= 8;\n gfc.minval_s[i] = Math.pow(10.0, x / 10)\n * gfc.numlines_s[i];\n }\n\n gfc.s3_ss = init_s3_values(gfc.s3ind_s, gfc.npart_s, bval, bval_width,\n norm, useOldS3);\n\n init_mask_add_max_values();\n fft.init_fft(gfc);\n\n /* setup temporal masking */\n gfc.decay = Math.exp(-1.0 * LOG10\n / (temporalmask_sustain_sec * sfreq / 192.0));\n\n {\n var msfix;\n msfix = NS_MSFIX;\n if ((gfp.exp_nspsytune & 2) != 0)\n msfix = 1.0;\n if (Math.abs(gfp.msfix) > 0.0)\n msfix = gfp.msfix;\n gfp.msfix = msfix;\n\n /*\n * spread only from npart_l bands. Normally, we use the spreading\n * function to convolve from npart_l down to npart_l bands\n */\n for (var b = 0; b < gfc.npart_l; b++)\n if (gfc.s3ind[b][1] > gfc.npart_l - 1)\n gfc.s3ind[b][1] = gfc.npart_l - 1;\n }\n\n /*\n * prepare for ATH auto adjustment: we want to decrease the ATH by 12 dB\n * per second\n */\n var frame_duration = (576. * gfc.mode_gr / sfreq);\n gfc.ATH.decay = Math.pow(10., -12. / 10. * frame_duration);\n gfc.ATH.adjust = 0.01;\n /* minimum, for leading low loudness */\n gfc.ATH.adjustLimit = 1.0;\n /* on lead, allow adjust up to maximum */\n\n assert(gfc.bo_l[Encoder.SBMAX_l - 1] <= gfc.npart_l);\n assert(gfc.bo_s[Encoder.SBMAX_s - 1] <= gfc.npart_s);\n\n if (gfp.ATHtype != -1) {\n /* compute equal loudness weights (eql_w) */\n var freq;\n var freq_inc = gfp.out_samplerate\n / (Encoder.BLKSIZE);\n var eql_balance = 0.0;\n freq = 0.0;\n for (i = 0; i < Encoder.BLKSIZE / 2; ++i) {\n /* convert ATH dB to relative power (not dB) */\n /* to determine eql_w */\n freq += freq_inc;\n gfc.ATH.eql_w[i] = 1. / Math.pow(10, this.ATHformula(freq, gfp) / 10);\n eql_balance += gfc.ATH.eql_w[i];\n }\n eql_balance = 1.0 / eql_balance;\n for (i = Encoder.BLKSIZE / 2; --i >= 0;) { /* scale weights */\n gfc.ATH.eql_w[i] *= eql_balance;\n }\n }\n {\n for (var b = j = 0; b < gfc.npart_s; ++b) {\n for (i = 0; i < gfc.numlines_s[b]; ++i) {\n ++j;\n }\n }\n assert(j == 129);\n for (var b = j = 0; b < gfc.npart_l; ++b) {\n for (i = 0; i < gfc.numlines_l[b]; ++i) {\n ++j;\n }\n }\n assert(j == 513);\n }\n j = 0;\n for (i = 0; i < gfc.npart_l; i++) {\n var freq = sfreq * (j + gfc.numlines_l[i] / 2) / (1.0 * Encoder.BLKSIZE);\n gfc.mld_cb_l[i] = stereo_demask(freq);\n j += gfc.numlines_l[i];\n }\n for (; i < Encoder.CBANDS; ++i) {\n gfc.mld_cb_l[i] = 1;\n }\n j = 0;\n for (i = 0; i < gfc.npart_s; i++) {\n var freq = sfreq * (j + gfc.numlines_s[i] / 2) / (1.0 * Encoder.BLKSIZE_s);\n gfc.mld_cb_s[i] = stereo_demask(freq);\n j += gfc.numlines_s[i];\n }\n for (; i < Encoder.CBANDS; ++i) {\n gfc.mld_cb_s[i] = 1;\n }\n return 0;\n }\n\n /**\n * Those ATH formulas are returning their minimum value for input = -1\n */\n function ATHformula_GB(f, value) {\n /**\n *
\n         *  from Painter & Spanias\n         *           modified by Gabriel Bouvigne to better fit the reality\n         *           ath =    3.640 * pow(f,-0.8)\n         *           - 6.800 * exp(-0.6*pow(f-3.4,2.0))\n         *           + 6.000 * exp(-0.15*pow(f-8.7,2.0))\n         *           + 0.6* 0.001 * pow(f,4.0);\n         *\n         *\n         *           In the past LAME was using the Painter &Spanias formula.\n         *           But we had some recurrent problems with HF content.\n         *           We measured real ATH values, and found the older formula\n         *           to be inaccurate in the higher part. So we made this new\n         *           formula and this solved most of HF problematic test cases.\n         *           The tradeoff is that in VBR mode it increases a lot the\n         *           bitrate.\n         * 
\n */\n\n /*\n * This curve can be adjusted according to the VBR scale: it adjusts\n * from something close to Painter & Spanias on V9 up to Bouvigne's\n * formula for V0. This way the VBR bitrate is more balanced according\n * to the -V value.\n */\n\n // the following Hack allows to ask for the lowest value\n if (f < -.3)\n f = 3410;\n\n // convert to khz\n f /= 1000;\n f = Math.max(0.1, f);\n var ath = 3.640 * Math.pow(f, -0.8) - 6.800\n * Math.exp(-0.6 * Math.pow(f - 3.4, 2.0)) + 6.000\n * Math.exp(-0.15 * Math.pow(f - 8.7, 2.0))\n + (0.6 + 0.04 * value) * 0.001 * Math.pow(f, 4.0);\n return ath;\n }\n\n this.ATHformula = function (f, gfp) {\n var ath;\n switch (gfp.ATHtype) {\n case 0:\n ath = ATHformula_GB(f, 9);\n break;\n case 1:\n // over sensitive, should probably be removed\n ath = ATHformula_GB(f, -1);\n break;\n case 2:\n ath = ATHformula_GB(f, 0);\n break;\n case 3:\n // modification of GB formula by Roel\n ath = ATHformula_GB(f, 1) + 6;\n break;\n case 4:\n ath = ATHformula_GB(f, gfp.ATHcurve);\n break;\n default:\n ath = ATHformula_GB(f, 0);\n break;\n }\n return ath;\n }\n\n}\n\nmodule.exports = PsyModel;\n","//package mp3;\n\n/* MPEG modes */\nfunction MPEGMode(ordinal) {\n var _ordinal = ordinal;\n this.ordinal = function () {\n return _ordinal;\n }\n}\n\nMPEGMode.STEREO = new MPEGMode(0);\nMPEGMode.JOINT_STEREO = new MPEGMode(1);\nMPEGMode.DUAL_CHANNEL = new MPEGMode(2);\nMPEGMode.MONO = new MPEGMode(3);\nMPEGMode.NOT_SET = new MPEGMode(4);\n\nmodule.exports = MPEGMode;\n","var MPEGMode = require('./MPEGMode.js');\n\nfunction LameGlobalFlags() {\n\n this.class_id = 0;\n\n /* input description */\n\n /**\n * number of samples. default=-1\n */\n this.num_samples = 0;\n /**\n * input number of channels. default=2\n */\n this.num_channels = 0;\n /**\n * input_samp_rate in Hz. default=44.1 kHz\n */\n this.in_samplerate = 0;\n /**\n * output_samp_rate. default: LAME picks best value at least not used for\n * MP3 decoding: Remember 44.1 kHz MP3s and AC97\n */\n this.out_samplerate = 0;\n /**\n * scale input by this amount before encoding at least not used for MP3\n * decoding\n */\n this.scale = 0.;\n /**\n * scale input of channel 0 (left) by this amount before encoding\n */\n this.scale_left = 0.;\n /**\n * scale input of channel 1 (right) by this amount before encoding\n */\n this.scale_right = 0.;\n\n /* general control params */\n /**\n * collect data for a MP3 frame analyzer?\n */\n this.analysis = false;\n /**\n * add Xing VBR tag?\n */\n this.bWriteVbrTag = false;\n\n /**\n * use lame/mpglib to convert mp3 to wav\n */\n this.decode_only = false;\n /**\n * quality setting 0=best, 9=worst default=5\n */\n this.quality = 0;\n /**\n * see enum default = LAME picks best value\n */\n this.mode = MPEGMode.STEREO;\n /**\n * force M/S mode. requires mode=1\n */\n this.force_ms = false;\n /**\n * use free format? default=0\n */\n this.free_format = false;\n /**\n * find the RG value? default=0\n */\n this.findReplayGain = false;\n /**\n * decode on the fly? default=0\n */\n this.decode_on_the_fly = false;\n /**\n * 1 (default) writes ID3 tags, 0 not\n */\n this.write_id3tag_automatic = false;\n\n /*\n * set either brate>0 or compression_ratio>0, LAME will compute the value of\n * the variable not set. Default is compression_ratio = 11.025\n */\n /**\n * bitrate\n */\n this.brate = 0;\n /**\n * sizeof(wav file)/sizeof(mp3 file)\n */\n this.compression_ratio = 0.;\n\n /* frame params */\n /**\n * mark as copyright. default=0\n */\n this.copyright = 0;\n /**\n * mark as original. default=1\n */\n this.original = 0;\n /**\n * the MP3 'private extension' bit. Meaningless\n */\n this.extension = 0;\n /**\n * Input PCM is emphased PCM (for instance from one of the rarely emphased\n * CDs), it is STRONGLY not recommended to use this, because psycho does not\n * take it into account, and last but not least many decoders don't care\n * about these bits\n */\n this.emphasis = 0;\n /**\n * use 2 bytes per frame for a CRC checksum. default=0\n */\n this.error_protection = 0;\n /**\n * enforce ISO spec as much as possible\n */\n this.strict_ISO = false;\n\n /**\n * use bit reservoir?\n */\n this.disable_reservoir = false;\n\n /* quantization/noise shaping */\n this.quant_comp = 0;\n this.quant_comp_short = 0;\n this.experimentalY = false;\n this.experimentalZ = 0;\n this.exp_nspsytune = 0;\n\n this.preset = 0;\n\n /* VBR control */\n this.VBR = null;\n /**\n * Range [0,...,1[\n */\n this.VBR_q_frac = 0.;\n /**\n * Range [0,...,9]\n */\n this.VBR_q = 0;\n this.VBR_mean_bitrate_kbps = 0;\n this.VBR_min_bitrate_kbps = 0;\n this.VBR_max_bitrate_kbps = 0;\n /**\n * strictly enforce VBR_min_bitrate normaly, it will be violated for analog\n * silence\n */\n this.VBR_hard_min = 0;\n\n /* resampling and filtering */\n\n /**\n * freq in Hz. 0=lame choses. -1=no filter\n */\n this.lowpassfreq = 0;\n /**\n * freq in Hz. 0=lame choses. -1=no filter\n */\n this.highpassfreq = 0;\n /**\n * freq width of filter, in Hz (default=15%)\n */\n this.lowpasswidth = 0;\n /**\n * freq width of filter, in Hz (default=15%)\n */\n this.highpasswidth = 0;\n\n /*\n * psycho acoustics and other arguments which you should not change unless\n * you know what you are doing\n */\n\n this.maskingadjust = 0.;\n this.maskingadjust_short = 0.;\n /**\n * only use ATH\n */\n this.ATHonly = false;\n /**\n * only use ATH for short blocks\n */\n this.ATHshort = false;\n /**\n * disable ATH\n */\n this.noATH = false;\n /**\n * select ATH formula\n */\n this.ATHtype = 0;\n /**\n * change ATH formula 4 shape\n */\n this.ATHcurve = 0.;\n /**\n * lower ATH by this many db\n */\n this.ATHlower = 0.;\n /**\n * select ATH auto-adjust scheme\n */\n this.athaa_type = 0;\n /**\n * select ATH auto-adjust loudness calc\n */\n this.athaa_loudapprox = 0;\n /**\n * dB, tune active region of auto-level\n */\n this.athaa_sensitivity = 0.;\n this.short_blocks = null;\n /**\n * use temporal masking effect\n */\n this.useTemporal = false;\n this.interChRatio = 0.;\n /**\n * Naoki's adjustment of Mid/Side maskings\n */\n this.msfix = 0.;\n\n /**\n * 0 off, 1 on\n */\n this.tune = false;\n /**\n * used to pass values for debugging and stuff\n */\n this.tune_value_a = 0.;\n\n /************************************************************************/\n /* internal variables, do not set... */\n /* provided because they may be of use to calling application */\n /************************************************************************/\n\n /**\n * 0=MPEG-2/2.5 1=MPEG-1\n */\n this.version = 0;\n this.encoder_delay = 0;\n /**\n * number of samples of padding appended to input\n */\n this.encoder_padding = 0;\n this.framesize = 0;\n /**\n * number of frames encoded\n */\n this.frameNum = 0;\n /**\n * is this struct owned by calling program or lame?\n */\n this.lame_allocated_gfp = 0;\n /**************************************************************************/\n /* more internal variables are stored in this structure: */\n /**************************************************************************/\n this.internal_flags = null;\n}\n\nmodule.exports = LameGlobalFlags;\n","var Encoder = require('./Encoder.js');\n\nvar L3Side = {};\n\n\n\t/**\n\t * max scalefactor band, max(SBMAX_l, SBMAX_s*3, (SBMAX_s-3)*3+8)\n\t */\nL3Side.SFBMAX = (Encoder.SBMAX_s * 3);\n\nmodule.exports = L3Side;\n","//package mp3;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar L3Side = require('./L3Side.js');\n\nfunction GrInfo() {\n //float xr[] = new float[576];\n this.xr = new_float(576);\n //int l3_enc[] = new int[576];\n this.l3_enc = new_int(576);\n //int scalefac[] = new int[L3Side.SFBMAX];\n this.scalefac = new_int(L3Side.SFBMAX);\n this.xrpow_max = 0.;\n\n this.part2_3_length = 0;\n this.big_values = 0;\n this.count1 = 0;\n this.global_gain = 0;\n this.scalefac_compress = 0;\n this.block_type = 0;\n this.mixed_block_flag = 0;\n this.table_select = new_int(3);\n this.subblock_gain = new_int(3 + 1);\n this.region0_count = 0;\n this.region1_count = 0;\n this.preflag = 0;\n this.scalefac_scale = 0;\n this.count1table_select = 0;\n\n this.part2_length = 0;\n this.sfb_lmax = 0;\n this.sfb_smin = 0;\n this.psy_lmax = 0;\n this.sfbmax = 0;\n this.psymax = 0;\n this.sfbdivide = 0;\n this.width = new_int(L3Side.SFBMAX);\n this.window = new_int(L3Side.SFBMAX);\n this.count1bits = 0;\n /**\n * added for LSF\n */\n this.sfb_partition_table = null;\n this.slen = new_int(4);\n\n this.max_nonzero_coeff = 0;\n\n var self = this;\n function clone_int(array) {\n return new Int32Array(array);\n }\n function clone_float(array) {\n return new Float32Array(array);\n }\n this.assign = function (other) {\n self.xr = clone_float(other.xr); //.slice(0); //clone();\n self.l3_enc = clone_int(other.l3_enc); //.slice(0); //clone();\n self.scalefac = clone_int(other.scalefac);//.slice(0); //clone();\n self.xrpow_max = other.xrpow_max;\n\n self.part2_3_length = other.part2_3_length;\n self.big_values = other.big_values;\n self.count1 = other.count1;\n self.global_gain = other.global_gain;\n self.scalefac_compress = other.scalefac_compress;\n self.block_type = other.block_type;\n self.mixed_block_flag = other.mixed_block_flag;\n self.table_select = clone_int(other.table_select);//.slice(0); //clone();\n self.subblock_gain = clone_int(other.subblock_gain); //.slice(0); //.clone();\n self.region0_count = other.region0_count;\n self.region1_count = other.region1_count;\n self.preflag = other.preflag;\n self.scalefac_scale = other.scalefac_scale;\n self.count1table_select = other.count1table_select;\n\n self.part2_length = other.part2_length;\n self.sfb_lmax = other.sfb_lmax;\n self.sfb_smin = other.sfb_smin;\n self.psy_lmax = other.psy_lmax;\n self.sfbmax = other.sfbmax;\n self.psymax = other.psymax;\n self.sfbdivide = other.sfbdivide;\n self.width = clone_int(other.width); //.slice(0); //.clone();\n self.window = clone_int(other.window); //.slice(0); //.clone();\n self.count1bits = other.count1bits;\n\n self.sfb_partition_table = other.sfb_partition_table.slice(0); //.clone();\n self.slen = clone_int(other.slen); //.slice(0); //.clone();\n self.max_nonzero_coeff = other.max_nonzero_coeff;\n }\n}\n\nmodule.exports = GrInfo;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar GrInfo = require('./GrInfo.js');\n\nfunction IIISideInfo() {\n this.tt = [[null, null], [null, null]];\n this.main_data_begin = 0;\n this.private_bits = 0;\n this.resvDrain_pre = 0;\n this.resvDrain_post = 0;\n this.scfsi = [new_int(4), new_int(4)];\n\n for (var gr = 0; gr < 2; gr++) {\n for (var ch = 0; ch < 2; ch++) {\n this.tt[gr][ch] = new GrInfo();\n }\n }\n}\n\nmodule.exports = IIISideInfo;\n","//package mp3;\n\n/**\n * Layer III side information.\n *\n * @author Ken\n *\n */\n\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\nfunction ScaleFac(arrL, arrS, arr21, arr12) {\n\n this.l = new_int(1 + Encoder.SBMAX_l);\n this.s = new_int(1 + Encoder.SBMAX_s);\n this.psfb21 = new_int(1 + Encoder.PSFB21);\n this.psfb12 = new_int(1 + Encoder.PSFB12);\n var l = this.l;\n var s = this.s;\n\n if (arguments.length == 4) {\n //public ScaleFac(final int[] arrL, final int[] arrS, final int[] arr21,\n // final int[] arr12) {\n this.arrL = arguments[0];\n this.arrS = arguments[1];\n this.arr21 = arguments[2];\n this.arr12 = arguments[3];\n\n System.arraycopy(this.arrL, 0, l, 0, Math.min(this.arrL.length, this.l.length));\n System.arraycopy(this.arrS, 0, s, 0, Math.min(this.arrS.length, this.s.length));\n System.arraycopy(this.arr21, 0, this.psfb21, 0, Math.min(this.arr21.length, this.psfb21.length));\n System.arraycopy(this.arr12, 0, this.psfb12, 0, Math.min(this.arr12.length, this.psfb12.length));\n }\n}\n\nmodule.exports = ScaleFac;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n//package mp3;\n\n/**\n * Variables used for --nspsytune\n *\n * @author Ken\n *\n */\nfunction NsPsy() {\n this.last_en_subshort = new_float_n([4, 9]);\n this.lastAttacks = new_int(4);\n this.pefirbuf = new_float(19);\n this.longfact = new_float(Encoder.SBMAX_l);\n this.shortfact = new_float(Encoder.SBMAX_s);\n\n /**\n * short block tuning\n */\n this.attackthre = 0.;\n this.attackthre_s = 0.;\n}\n\nmodule.exports = NsPsy;\n","//package mp3;\n\nfunction VBRSeekInfo() {\n /**\n * What we have seen so far.\n */\n this.sum = 0;\n /**\n * How many frames we have seen in this chunk.\n */\n this.seen = 0;\n /**\n * How many frames we want to collect into one chunk.\n */\n this.want = 0;\n /**\n * Actual position in our bag.\n */\n this.pos = 0;\n /**\n * Size of our bag.\n */\n this.size = 0;\n /**\n * Pointer to our bag.\n */\n this.bag = null;\n this.nVbrNumFrames = 0;\n this.nBytesWritten = 0;\n /* VBR tag data */\n this.TotalFrameSize = 0;\n}\n\nmodule.exports = VBRSeekInfo;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar IIISideInfo = require('./IIISideInfo.js');\nvar ScaleFac = require('./ScaleFac.js');\nvar NsPsy = require('./NsPsy.js');\nvar VBRSeekInfo = require('./VBRSeekInfo.js');\nvar III_psy_xmin = require('./III_psy_xmin.js');\nvar Encoder = require('./Encoder.js');\nvar L3Side = require('./L3Side.js');\n\n\nLameInternalFlags.MFSIZE = (3 * 1152 + Encoder.ENCDELAY - Encoder.MDCTDELAY);\nLameInternalFlags.MAX_HEADER_BUF = 256;\nLameInternalFlags.MAX_BITS_PER_CHANNEL = 4095;\nLameInternalFlags.MAX_BITS_PER_GRANULE = 7680;\nLameInternalFlags.BPC = 320;\n\nfunction LameInternalFlags() {\n var MAX_HEADER_LEN = 40;\n\n\n /********************************************************************\n * internal variables NOT set by calling program, and should not be *\n * modified by the calling program *\n ********************************************************************/\n\n /**\n * Some remarks to the Class_ID field: The Class ID is an Identifier for a\n * pointer to this struct. It is very unlikely that a pointer to\n * lame_global_flags has the same 32 bits in it's structure (large and other\n * special properties, for instance prime).\n *\n * To test that the structure is right and initialized, use: if ( gfc .\n * Class_ID == LAME_ID ) ... Other remark: If you set a flag to 0 for uninit\n * data and 1 for init data, the right test should be \"if (flag == 1)\" and\n * NOT \"if (flag)\". Unintended modification of this element will be\n * otherwise misinterpreted as an init.\n */\n this.Class_ID = 0;\n\n this.lame_encode_frame_init = 0;\n this.iteration_init_init = 0;\n this.fill_buffer_resample_init = 0;\n\n //public float mfbuf[][] = new float[2][MFSIZE];\n this.mfbuf = new_float_n([2, LameInternalFlags.MFSIZE]);\n\n /**\n * granules per frame\n */\n this.mode_gr = 0;\n /**\n * number of channels in the input data stream (PCM or decoded PCM)\n */\n this.channels_in = 0;\n /**\n * number of channels in the output data stream (not used for decoding)\n */\n this.channels_out = 0;\n /**\n * input_samp_rate/output_samp_rate\n */\n //public double resample_ratio;\n this.resample_ratio = 0.;\n\n this.mf_samples_to_encode = 0;\n this.mf_size = 0;\n /**\n * min bitrate index\n */\n this.VBR_min_bitrate = 0;\n /**\n * max bitrate index\n */\n this.VBR_max_bitrate = 0;\n this.bitrate_index = 0;\n this.samplerate_index = 0;\n this.mode_ext = 0;\n\n /* lowpass and highpass filter control */\n /**\n * normalized frequency bounds of passband\n */\n this.lowpass1 = 0.;\n this.lowpass2 = 0.;\n /**\n * normalized frequency bounds of passband\n */\n this.highpass1 = 0.;\n this.highpass2 = 0.;\n\n /**\n * 0 = none 1 = ISO AAC model 2 = allow scalefac_select=1\n */\n this.noise_shaping = 0;\n\n /**\n * 0 = ISO model: amplify all distorted bands
\n * 1 = amplify within 50% of max (on db scale)
\n * 2 = amplify only most distorted band
\n * 3 = method 1 and refine with method 2
\n */\n this.noise_shaping_amp = 0;\n /**\n * 0 = no substep
\n * 1 = use substep shaping at last step(VBR only)
\n * (not implemented yet)
\n * 2 = use substep inside loop
\n * 3 = use substep inside loop and last step
\n */\n this.substep_shaping = 0;\n\n /**\n * 1 = gpsycho. 0 = none\n */\n this.psymodel = 0;\n /**\n * 0 = stop at over=0, all scalefacs amplified or
\n * a scalefac has reached max value
\n * 1 = stop when all scalefacs amplified or a scalefac has reached max value
\n * 2 = stop when all scalefacs amplified\n */\n this.noise_shaping_stop = 0;\n\n /**\n * 0 = no, 1 = yes\n */\n this.subblock_gain = 0;\n /**\n * 0 = no. 1=outside loop 2=inside loop(slow)\n */\n this.use_best_huffman = 0;\n\n /**\n * 0 = stop early after 0 distortion found. 1 = full search\n */\n this.full_outer_loop = 0;\n\n //public IIISideInfo l3_side = new IIISideInfo();\n this.l3_side = new IIISideInfo();\n this.ms_ratio = new_float(2);\n\n /* used for padding */\n /**\n * padding for the current frame?\n */\n this.padding = 0;\n this.frac_SpF = 0;\n this.slot_lag = 0;\n\n /**\n * optional ID3 tags\n */\n //public ID3TagSpec tag_spec;\n this.tag_spec = null;\n this.nMusicCRC = 0;\n\n /* variables used by Quantize */\n //public int OldValue[] = new int[2];\n this.OldValue = new_int(2);\n //public int CurrentStep[] = new int[2];\n this.CurrentStep = new_int(2);\n\n this.masking_lower = 0.;\n //public int bv_scf[] = new int[576];\n this.bv_scf = new_int(576);\n //public int pseudohalf[] = new int[L3Side.SFBMAX];\n this.pseudohalf = new_int(L3Side.SFBMAX);\n\n /**\n * will be set in lame_init_params\n */\n this.sfb21_extra = false;\n\n /* BPC = maximum number of filter convolution windows to precompute */\n //public float[][] inbuf_old = new float[2][];\n this.inbuf_old = new Array(2);\n //public float[][] blackfilt = new float[2 * BPC + 1][];\n this.blackfilt = new Array(2 * LameInternalFlags.BPC + 1);\n //public double itime[] = new double[2];\n this.itime = new_double(2);\n this.sideinfo_len = 0;\n\n /* variables for newmdct.c */\n //public float sb_sample[][][][] = new float[2][2][18][Encoder.SBLIMIT];\n this.sb_sample = new_float_n([2, 2, 18, Encoder.SBLIMIT]);\n this.amp_filter = new_float(32);\n\n /* variables for BitStream */\n\n /**\n *
\n     * mpeg1: buffer=511 bytes  smallest frame: 96-38(sideinfo)=58\n     * max number of frames in reservoir:  8\n     * mpeg2: buffer=255 bytes.  smallest frame: 24-23bytes=1\n     * with VBR, if you are encoding all silence, it is possible to\n     * have 8kbs/24khz frames with 1byte of data each, which means we need\n     * to buffer up to 255 headers!\n     * 
\n */\n /**\n * also, max_header_buf has to be a power of two\n */\n /**\n * max size of header is 38\n */\n\n function Header() {\n this.write_timing = 0;\n this.ptr = 0;\n //public byte buf[] = new byte[MAX_HEADER_LEN];\n this.buf = new_byte(MAX_HEADER_LEN);\n }\n\n this.header = new Array(LameInternalFlags.MAX_HEADER_BUF);\n\n this.h_ptr = 0;\n this.w_ptr = 0;\n this.ancillary_flag = 0;\n\n /* variables for Reservoir */\n /**\n * in bits\n */\n this.ResvSize = 0;\n /**\n * in bits\n */\n this.ResvMax = 0;\n\n //public ScaleFac scalefac_band = new ScaleFac();\n this.scalefac_band = new ScaleFac();\n\n /* daa from PsyModel */\n /* The static variables \"r\", \"phi_sav\", \"new\", \"old\" and \"oldest\" have */\n /* to be remembered for the unpredictability measure. For \"r\" and */\n /* \"phi_sav\", the first index from the left is the channel select and */\n /* the second index is the \"age\" of the data. */\n this.minval_l = new_float(Encoder.CBANDS);\n this.minval_s = new_float(Encoder.CBANDS);\n this.nb_1 = new_float_n([4, Encoder.CBANDS]);\n this.nb_2 = new_float_n([4, Encoder.CBANDS]);\n this.nb_s1 = new_float_n([4, Encoder.CBANDS]);\n this.nb_s2 = new_float_n([4, Encoder.CBANDS]);\n this.s3_ss = null;\n this.s3_ll = null;\n this.decay = 0.;\n\n //public III_psy_xmin[] thm = new III_psy_xmin[4];\n //public III_psy_xmin[] en = new III_psy_xmin[4];\n this.thm = new Array(4);\n this.en = new Array(4);\n\n /**\n * fft and energy calculation\n */\n this.tot_ener = new_float(4);\n\n /* loudness calculation (for adaptive threshold of hearing) */\n /**\n * loudness^2 approx. per granule and channel\n */\n this.loudness_sq = new_float_n([2, 2]);\n /**\n * account for granule delay of L3psycho_anal\n */\n this.loudness_sq_save = new_float(2);\n\n /**\n * Scale Factor Bands\n */\n this.mld_l = new_float(Encoder.SBMAX_l);\n this.mld_s = new_float(Encoder.SBMAX_s);\n this.bm_l = new_int(Encoder.SBMAX_l);\n this.bo_l = new_int(Encoder.SBMAX_l);\n this.bm_s = new_int(Encoder.SBMAX_s);\n this.bo_s = new_int(Encoder.SBMAX_s);\n this.npart_l = 0;\n this.npart_s = 0;\n\n this.s3ind = new_int_n([Encoder.CBANDS, 2]);\n this.s3ind_s = new_int_n([Encoder.CBANDS, 2]);\n\n this.numlines_s = new_int(Encoder.CBANDS);\n this.numlines_l = new_int(Encoder.CBANDS);\n this.rnumlines_l = new_float(Encoder.CBANDS);\n this.mld_cb_l = new_float(Encoder.CBANDS);\n this.mld_cb_s = new_float(Encoder.CBANDS);\n this.numlines_s_num1 = 0;\n this.numlines_l_num1 = 0;\n\n /* ratios */\n this.pe = new_float(4);\n this.ms_ratio_s_old = 0.;\n this.ms_ratio_l_old = 0.;\n this.ms_ener_ratio_old = 0.;\n\n /**\n * block type\n */\n this.blocktype_old = new_int(2);\n\n /**\n * variables used for --nspsytune\n */\n this.nsPsy = new NsPsy();\n\n /**\n * used for Xing VBR header\n */\n this.VBR_seek_table = new VBRSeekInfo();\n\n /**\n * all ATH related stuff\n */\n //public ATH ATH;\n this.ATH = null;\n\n this.PSY = null;\n\n this.nogap_total = 0;\n this.nogap_current = 0;\n\n /* ReplayGain */\n this.decode_on_the_fly = true;\n this.findReplayGain = true;\n this.findPeakSample = true;\n this.PeakSample = 0.;\n this.RadioGain = 0;\n this.AudiophileGain = 0;\n //public ReplayGain rgdata;\n this.rgdata = null;\n\n /**\n * gain change required for preventing clipping\n */\n this.noclipGainChange = 0;\n /**\n * user-specified scale factor required for preventing clipping\n */\n this.noclipScale = 0.;\n\n /* simple statistics */\n this.bitrate_stereoMode_Hist = new_int_n([16, 4 + 1]);\n /**\n * norm/start/short/stop/mixed(short)/sum\n */\n this.bitrate_blockType_Hist = new_int_n([16, 4 + 1 + 1]);\n\n //public PlottingData pinfo;\n //public MPGLib.mpstr_tag hip;\n this.pinfo = null;\n this.hip = null;\n\n this.in_buffer_nsamples = 0;\n //public float[] in_buffer_0;\n //public float[] in_buffer_1;\n this.in_buffer_0 = null;\n this.in_buffer_1 = null;\n\n //public IIterationLoop iteration_loop;\n this.iteration_loop = null;\n\n for (var i = 0; i < this.en.length; i++) {\n this.en[i] = new III_psy_xmin();\n }\n for (var i = 0; i < this.thm.length; i++) {\n this.thm[i] = new III_psy_xmin();\n }\n for (var i = 0; i < this.header.length; i++) {\n this.header[i] = new Header();\n }\n\n}\n\nmodule.exports = LameInternalFlags;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n/**\n * ATH related stuff, if something new ATH related has to be added, please plug\n * it here into the ATH.\n */\nfunction ATH() {\n /**\n * Method for the auto adjustment.\n */\n this.useAdjust = 0;\n /**\n * factor for tuning the (sample power) point below which adaptive threshold\n * of hearing adjustment occurs\n */\n this.aaSensitivityP = 0.;\n /**\n * Lowering based on peak volume, 1 = no lowering.\n */\n this.adjust = 0.;\n /**\n * Limit for dynamic ATH adjust.\n */\n this.adjustLimit = 0.;\n /**\n * Determined to lower x dB each second.\n */\n this.decay = 0.;\n /**\n * Lowest ATH value.\n */\n this.floor = 0.;\n /**\n * ATH for sfbs in long blocks.\n */\n this.l = new_float(Encoder.SBMAX_l);\n /**\n * ATH for sfbs in short blocks.\n */\n this.s = new_float(Encoder.SBMAX_s);\n /**\n * ATH for partitioned sfb21 in long blocks.\n */\n this.psfb21 = new_float(Encoder.PSFB21);\n /**\n * ATH for partitioned sfb12 in short blocks.\n */\n this.psfb12 = new_float(Encoder.PSFB12);\n /**\n * ATH for long block convolution bands.\n */\n this.cb_l = new_float(Encoder.CBANDS);\n /**\n * ATH for short block convolution bands.\n */\n this.cb_s = new_float(Encoder.CBANDS);\n /**\n * Equal loudness weights (based on ATH).\n */\n this.eql_w = new_float(Encoder.BLKSIZE / 2);\n}\n\nmodule.exports = ATH;\n","/*\n * ReplayGainAnalysis - analyzes input samples and give the recommended dB change\n * Copyright (C) 2001 David Robinson and Glen Sawyer\n * Improvements and optimizations added by Frank Klemm, and by Marcel Muller \n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * concept and filter values by David Robinson (David@Robinson.org)\n * -- blame him if you think the idea is flawed\n * original coding by Glen Sawyer (mp3gain@hotmail.com)\n * -- blame him if you think this runs too slowly, or the coding is otherwise flawed\n *\n * lots of code improvements by Frank Klemm ( http://www.uni-jena.de/~pfk/mpp/ )\n * -- credit him for all the _good_ programming ;)\n *\n *\n * For an explanation of the concepts and the basic algorithms involved, go to:\n * http://www.replaygain.org/\n */\n\n/*\n * Here's the deal. Call\n *\n * InitGainAnalysis ( long samplefreq );\n *\n * to initialize everything. Call\n *\n * AnalyzeSamples ( var Float_t* left_samples,\n * var Float_t* right_samples,\n * size_t num_samples,\n * int num_channels );\n *\n * as many times as you want, with as many or as few samples as you want.\n * If mono, pass the sample buffer in through left_samples, leave\n * right_samples NULL, and make sure num_channels = 1.\n *\n * GetTitleGain()\n *\n * will return the recommended dB level change for all samples analyzed\n * SINCE THE LAST TIME you called GetTitleGain() OR InitGainAnalysis().\n *\n * GetAlbumGain()\n *\n * will return the recommended dB level change for all samples analyzed\n * since InitGainAnalysis() was called and finalized with GetTitleGain().\n *\n * Pseudo-code to process an album:\n *\n * Float_t l_samples [4096];\n * Float_t r_samples [4096];\n * size_t num_samples;\n * unsigned int num_songs;\n * unsigned int i;\n *\n * InitGainAnalysis ( 44100 );\n * for ( i = 1; i <= num_songs; i++ ) {\n * while ( ( num_samples = getSongSamples ( song[i], left_samples, right_samples ) ) > 0 )\n * AnalyzeSamples ( left_samples, right_samples, num_samples, 2 );\n * fprintf (\"Recommended dB change for song %2d: %+6.2 dB\\n\", i, GetTitleGain() );\n * }\n * fprintf (\"Recommended dB change for whole album: %+6.2 dB\\n\", GetAlbumGain() );\n */\n\n/*\n * So here's the main source of potential code confusion:\n *\n * The filters applied to the incoming samples are IIR filters,\n * meaning they rely on up to number of previous samples\n * AND up to number of previous filtered samples.\n *\n * I set up the AnalyzeSamples routine to minimize memory usage and interface\n * complexity. The speed isn't compromised too much (I don't think), but the\n * internal complexity is higher than it should be for such a relatively\n * simple routine.\n *\n * Optimization/clarity suggestions are welcome.\n */\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * Table entries per dB\n */\nGainAnalysis.STEPS_per_dB = 100.;\n/**\n * Table entries for 0...MAX_dB (normal max. values are 70...80 dB)\n */\nGainAnalysis.MAX_dB = 120.;\nGainAnalysis.GAIN_NOT_ENOUGH_SAMPLES = -24601;\nGainAnalysis.GAIN_ANALYSIS_ERROR = 0;\nGainAnalysis.GAIN_ANALYSIS_OK = 1;\nGainAnalysis.INIT_GAIN_ANALYSIS_ERROR = 0;\nGainAnalysis.INIT_GAIN_ANALYSIS_OK = 1;\n\nGainAnalysis.YULE_ORDER = 10;\nGainAnalysis.MAX_ORDER = GainAnalysis.YULE_ORDER;\n\nGainAnalysis.MAX_SAMP_FREQ = 48000;\nGainAnalysis.RMS_WINDOW_TIME_NUMERATOR = 1;\nGainAnalysis.RMS_WINDOW_TIME_DENOMINATOR = 20;\nGainAnalysis.MAX_SAMPLES_PER_WINDOW = ((GainAnalysis.MAX_SAMP_FREQ * GainAnalysis.RMS_WINDOW_TIME_NUMERATOR) / GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR + 1);\n\nfunction GainAnalysis() {\n /**\n * calibration value for 89dB\n */\n var PINK_REF = 64.82;\n\n var YULE_ORDER = GainAnalysis.YULE_ORDER;\n /**\n * percentile which is louder than the proposed level\n */\n var RMS_PERCENTILE = 0.95;\n /**\n * maximum allowed sample frequency [Hz]\n */\n var MAX_SAMP_FREQ = GainAnalysis.MAX_SAMP_FREQ;\n var RMS_WINDOW_TIME_NUMERATOR = GainAnalysis.RMS_WINDOW_TIME_NUMERATOR;\n /**\n * numerator / denominator = time slice size [s]\n */\n var RMS_WINDOW_TIME_DENOMINATOR = GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR;\n /**\n * max. Samples per Time slice\n */\n var MAX_SAMPLES_PER_WINDOW = GainAnalysis.MAX_SAMPLES_PER_WINDOW;\n\n\n var ABYule = [\n [0.03857599435200, -3.84664617118067, -0.02160367184185,\n 7.81501653005538, -0.00123395316851, -11.34170355132042,\n -0.00009291677959, 13.05504219327545, -0.01655260341619,\n -12.28759895145294, 0.02161526843274, 9.48293806319790,\n -0.02074045215285, -5.87257861775999, 0.00594298065125,\n 2.75465861874613, 0.00306428023191, -0.86984376593551,\n 0.00012025322027, 0.13919314567432, 0.00288463683916],\n [0.05418656406430, -3.47845948550071, -0.02911007808948,\n 6.36317777566148, -0.00848709379851, -8.54751527471874,\n -0.00851165645469, 9.47693607801280, -0.00834990904936,\n -8.81498681370155, 0.02245293253339, 6.85401540936998,\n -0.02596338512915, -4.39470996079559, 0.01624864962975,\n 2.19611684890774, -0.00240879051584, -0.75104302451432,\n 0.00674613682247, 0.13149317958808, -0.00187763777362],\n [0.15457299681924, -2.37898834973084, -0.09331049056315,\n 2.84868151156327, -0.06247880153653, -2.64577170229825,\n 0.02163541888798, 2.23697657451713, -0.05588393329856,\n -1.67148153367602, 0.04781476674921, 1.00595954808547,\n 0.00222312597743, -0.45953458054983, 0.03174092540049,\n 0.16378164858596, -0.01390589421898, -0.05032077717131,\n 0.00651420667831, 0.02347897407020, -0.00881362733839],\n [0.30296907319327, -1.61273165137247, -0.22613988682123,\n 1.07977492259970, -0.08587323730772, -0.25656257754070,\n 0.03282930172664, -0.16276719120440, -0.00915702933434,\n -0.22638893773906, -0.02364141202522, 0.39120800788284,\n -0.00584456039913, -0.22138138954925, 0.06276101321749,\n 0.04500235387352, -0.00000828086748, 0.02005851806501,\n 0.00205861885564, 0.00302439095741, -0.02950134983287],\n [0.33642304856132, -1.49858979367799, -0.25572241425570,\n 0.87350271418188, -0.11828570177555, 0.12205022308084,\n 0.11921148675203, -0.80774944671438, -0.07834489609479,\n 0.47854794562326, -0.00469977914380, -0.12453458140019,\n -0.00589500224440, -0.04067510197014, 0.05724228140351,\n 0.08333755284107, 0.00832043980773, -0.04237348025746,\n -0.01635381384540, 0.02977207319925, -0.01760176568150],\n [0.44915256608450, -0.62820619233671, -0.14351757464547,\n 0.29661783706366, -0.22784394429749, -0.37256372942400,\n -0.01419140100551, 0.00213767857124, 0.04078262797139,\n -0.42029820170918, -0.12398163381748, 0.22199650564824,\n 0.04097565135648, 0.00613424350682, 0.10478503600251,\n 0.06747620744683, -0.01863887810927, 0.05784820375801,\n -0.03193428438915, 0.03222754072173, 0.00541907748707],\n [0.56619470757641, -1.04800335126349, -0.75464456939302,\n 0.29156311971249, 0.16242137742230, -0.26806001042947,\n 0.16744243493672, 0.00819999645858, -0.18901604199609,\n 0.45054734505008, 0.30931782841830, -0.33032403314006,\n -0.27562961986224, 0.06739368333110, 0.00647310677246,\n -0.04784254229033, 0.08647503780351, 0.01639907836189,\n -0.03788984554840, 0.01807364323573, -0.00588215443421],\n [0.58100494960553, -0.51035327095184, -0.53174909058578,\n -0.31863563325245, -0.14289799034253, -0.20256413484477,\n 0.17520704835522, 0.14728154134330, 0.02377945217615,\n 0.38952639978999, 0.15558449135573, -0.23313271880868,\n -0.25344790059353, -0.05246019024463, 0.01628462406333,\n -0.02505961724053, 0.06920467763959, 0.02442357316099,\n -0.03721611395801, 0.01818801111503, -0.00749618797172],\n [0.53648789255105, -0.25049871956020, -0.42163034350696,\n -0.43193942311114, -0.00275953611929, -0.03424681017675,\n 0.04267842219415, -0.04678328784242, -0.10214864179676,\n 0.26408300200955, 0.14590772289388, 0.15113130533216,\n -0.02459864859345, -0.17556493366449, -0.11202315195388,\n -0.18823009262115, -0.04060034127000, 0.05477720428674,\n 0.04788665548180, 0.04704409688120, -0.02217936801134]];\n\n var ABButter = [\n [0.98621192462708, -1.97223372919527, -1.97242384925416,\n 0.97261396931306, 0.98621192462708],\n [0.98500175787242, -1.96977855582618, -1.97000351574484,\n 0.97022847566350, 0.98500175787242],\n [0.97938932735214, -1.95835380975398, -1.95877865470428,\n 0.95920349965459, 0.97938932735214],\n [0.97531843204928, -1.95002759149878, -1.95063686409857,\n 0.95124613669835, 0.97531843204928],\n [0.97316523498161, -1.94561023566527, -1.94633046996323,\n 0.94705070426118, 0.97316523498161],\n [0.96454515552826, -1.92783286977036, -1.92909031105652,\n 0.93034775234268, 0.96454515552826],\n [0.96009142950541, -1.91858953033784, -1.92018285901082,\n 0.92177618768381, 0.96009142950541],\n [0.95856916599601, -1.91542108074780, -1.91713833199203,\n 0.91885558323625, 0.95856916599601],\n [0.94597685600279, -1.88903307939452, -1.89195371200558,\n 0.89487434461664, 0.94597685600279]];\n\n\n /**\n * When calling this procedure, make sure that ip[-order] and op[-order]\n * point to real data\n */\n //private void filterYule(final float[] input, int inputPos, float[] output,\n //int outputPos, int nSamples, final float[] kernel) {\n function filterYule(input, inputPos, output, outputPos, nSamples, kernel) {\n\n while ((nSamples--) != 0) {\n /* 1e-10 is a hack to avoid slowdown because of denormals */\n output[outputPos] = 1e-10 + input[inputPos + 0] * kernel[0]\n - output[outputPos - 1] * kernel[1] + input[inputPos - 1]\n * kernel[2] - output[outputPos - 2] * kernel[3]\n + input[inputPos - 2] * kernel[4] - output[outputPos - 3]\n * kernel[5] + input[inputPos - 3] * kernel[6]\n - output[outputPos - 4] * kernel[7] + input[inputPos - 4]\n * kernel[8] - output[outputPos - 5] * kernel[9]\n + input[inputPos - 5] * kernel[10] - output[outputPos - 6]\n * kernel[11] + input[inputPos - 6] * kernel[12]\n - output[outputPos - 7] * kernel[13] + input[inputPos - 7]\n * kernel[14] - output[outputPos - 8] * kernel[15]\n + input[inputPos - 8] * kernel[16] - output[outputPos - 9]\n * kernel[17] + input[inputPos - 9] * kernel[18]\n - output[outputPos - 10] * kernel[19]\n + input[inputPos - 10] * kernel[20];\n ++outputPos;\n ++inputPos;\n }\n }\n\n//private void filterButter(final float[] input, int inputPos,\n// float[] output, int outputPos, int nSamples, final float[] kernel) {\n function filterButter(input, inputPos, output, outputPos, nSamples, kernel) {\n\n while ((nSamples--) != 0) {\n output[outputPos] = input[inputPos + 0] * kernel[0]\n - output[outputPos - 1] * kernel[1] + input[inputPos - 1]\n * kernel[2] - output[outputPos - 2] * kernel[3]\n + input[inputPos - 2] * kernel[4];\n ++outputPos;\n ++inputPos;\n }\n }\n\n /**\n * @return INIT_GAIN_ANALYSIS_OK if successful, INIT_GAIN_ANALYSIS_ERROR if\n * not\n */\n function ResetSampleFrequency(rgData, samplefreq) {\n /* zero out initial values */\n for (var i = 0; i < MAX_ORDER; i++)\n rgData.linprebuf[i] = rgData.lstepbuf[i] = rgData.loutbuf[i] = rgData.rinprebuf[i] = rgData.rstepbuf[i] = rgData.routbuf[i] = 0.;\n\n switch (0 | (samplefreq)) {\n case 48000:\n rgData.reqindex = 0;\n break;\n case 44100:\n rgData.reqindex = 1;\n break;\n case 32000:\n rgData.reqindex = 2;\n break;\n case 24000:\n rgData.reqindex = 3;\n break;\n case 22050:\n rgData.reqindex = 4;\n break;\n case 16000:\n rgData.reqindex = 5;\n break;\n case 12000:\n rgData.reqindex = 6;\n break;\n case 11025:\n rgData.reqindex = 7;\n break;\n case 8000:\n rgData.reqindex = 8;\n break;\n default:\n return INIT_GAIN_ANALYSIS_ERROR;\n }\n\n rgData.sampleWindow = 0 | ((samplefreq * RMS_WINDOW_TIME_NUMERATOR\n + RMS_WINDOW_TIME_DENOMINATOR - 1) / RMS_WINDOW_TIME_DENOMINATOR);\n\n rgData.lsum = 0.;\n rgData.rsum = 0.;\n rgData.totsamp = 0;\n\n Arrays.ill(rgData.A, 0);\n\n return INIT_GAIN_ANALYSIS_OK;\n }\n\n this.InitGainAnalysis = function (rgData, samplefreq) {\n if (ResetSampleFrequency(rgData, samplefreq) != INIT_GAIN_ANALYSIS_OK) {\n return INIT_GAIN_ANALYSIS_ERROR;\n }\n\n rgData.linpre = MAX_ORDER;\n rgData.rinpre = MAX_ORDER;\n rgData.lstep = MAX_ORDER;\n rgData.rstep = MAX_ORDER;\n rgData.lout = MAX_ORDER;\n rgData.rout = MAX_ORDER;\n\n Arrays.fill(rgData.B, 0);\n\n return INIT_GAIN_ANALYSIS_OK;\n };\n\n /**\n * square\n */\n function fsqr(d) {\n return d * d;\n }\n\n this.AnalyzeSamples = function (rgData, left_samples, left_samplesPos, right_samples, right_samplesPos, num_samples,\n num_channels) {\n var curleft;\n var curleftBase;\n var curright;\n var currightBase;\n var batchsamples;\n var cursamples;\n var cursamplepos;\n\n if (num_samples == 0)\n return GAIN_ANALYSIS_OK;\n\n cursamplepos = 0;\n batchsamples = num_samples;\n\n switch (num_channels) {\n case 1:\n right_samples = left_samples;\n right_samplesPos = left_samplesPos;\n break;\n case 2:\n break;\n default:\n return GAIN_ANALYSIS_ERROR;\n }\n\n if (num_samples < MAX_ORDER) {\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER, num_samples);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER, num_samples);\n } else {\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER, MAX_ORDER);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER, MAX_ORDER);\n }\n\n while (batchsamples > 0) {\n cursamples = batchsamples > rgData.sampleWindow - rgData.totsamp ? rgData.sampleWindow\n - rgData.totsamp\n : batchsamples;\n if (cursamplepos < MAX_ORDER) {\n curleft = rgData.linpre + cursamplepos;\n curleftBase = rgData.linprebuf;\n curright = rgData.rinpre + cursamplepos;\n currightBase = rgData.rinprebuf;\n if (cursamples > MAX_ORDER - cursamplepos)\n cursamples = MAX_ORDER - cursamplepos;\n } else {\n curleft = left_samplesPos + cursamplepos;\n curleftBase = left_samples;\n curright = right_samplesPos + cursamplepos;\n currightBase = right_samples;\n }\n\n filterYule(curleftBase, curleft, rgData.lstepbuf, rgData.lstep\n + rgData.totsamp, cursamples, ABYule[rgData.reqindex]);\n filterYule(currightBase, curright, rgData.rstepbuf, rgData.rstep\n + rgData.totsamp, cursamples, ABYule[rgData.reqindex]);\n\n filterButter(rgData.lstepbuf, rgData.lstep + rgData.totsamp,\n rgData.loutbuf, rgData.lout + rgData.totsamp, cursamples,\n ABButter[rgData.reqindex]);\n filterButter(rgData.rstepbuf, rgData.rstep + rgData.totsamp,\n rgData.routbuf, rgData.rout + rgData.totsamp, cursamples,\n ABButter[rgData.reqindex]);\n\n curleft = rgData.lout + rgData.totsamp;\n /* Get the squared values */\n curleftBase = rgData.loutbuf;\n curright = rgData.rout + rgData.totsamp;\n currightBase = rgData.routbuf;\n\n var i = cursamples % 8;\n while ((i--) != 0) {\n rgData.lsum += fsqr(curleftBase[curleft++]);\n rgData.rsum += fsqr(currightBase[curright++]);\n }\n i = cursamples / 8;\n while ((i--) != 0) {\n rgData.lsum += fsqr(curleftBase[curleft + 0])\n + fsqr(curleftBase[curleft + 1])\n + fsqr(curleftBase[curleft + 2])\n + fsqr(curleftBase[curleft + 3])\n + fsqr(curleftBase[curleft + 4])\n + fsqr(curleftBase[curleft + 5])\n + fsqr(curleftBase[curleft + 6])\n + fsqr(curleftBase[curleft + 7]);\n curleft += 8;\n rgData.rsum += fsqr(currightBase[curright + 0])\n + fsqr(currightBase[curright + 1])\n + fsqr(currightBase[curright + 2])\n + fsqr(currightBase[curright + 3])\n + fsqr(currightBase[curright + 4])\n + fsqr(currightBase[curright + 5])\n + fsqr(currightBase[curright + 6])\n + fsqr(currightBase[curright + 7]);\n curright += 8;\n }\n\n batchsamples -= cursamples;\n cursamplepos += cursamples;\n rgData.totsamp += cursamples;\n if (rgData.totsamp == rgData.sampleWindow) {\n /* Get the Root Mean Square (RMS) for this set of samples */\n var val = GainAnalysis.STEPS_per_dB\n * 10.\n * Math.log10((rgData.lsum + rgData.rsum)\n / rgData.totsamp * 0.5 + 1.e-37);\n var ival = (val <= 0) ? 0 : 0 | val;\n if (ival >= rgData.A.length)\n ival = rgData.A.length - 1;\n rgData.A[ival]++;\n rgData.lsum = rgData.rsum = 0.;\n\n System.arraycopy(rgData.loutbuf, rgData.totsamp,\n rgData.loutbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.routbuf, rgData.totsamp,\n rgData.routbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.lstepbuf, rgData.totsamp,\n rgData.lstepbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.rstepbuf, rgData.totsamp,\n rgData.rstepbuf, 0, MAX_ORDER);\n rgData.totsamp = 0;\n }\n if (rgData.totsamp > rgData.sampleWindow) {\n /*\n * somehow I really screwed up: Error in programming! Contact\n * author about totsamp > sampleWindow\n */\n return GAIN_ANALYSIS_ERROR;\n }\n }\n if (num_samples < MAX_ORDER) {\n System.arraycopy(rgData.linprebuf, num_samples, rgData.linprebuf,\n 0, MAX_ORDER - num_samples);\n System.arraycopy(rgData.rinprebuf, num_samples, rgData.rinprebuf,\n 0, MAX_ORDER - num_samples);\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER - num_samples, num_samples);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER - num_samples, num_samples);\n } else {\n System.arraycopy(left_samples, left_samplesPos + num_samples\n - MAX_ORDER, rgData.linprebuf, 0, MAX_ORDER);\n System.arraycopy(right_samples, right_samplesPos + num_samples\n - MAX_ORDER, rgData.rinprebuf, 0, MAX_ORDER);\n }\n\n return GAIN_ANALYSIS_OK;\n };\n\n function analyzeResult(Array, len) {\n var i;\n\n var elems = 0;\n for (i = 0; i < len; i++)\n elems += Array[i];\n if (elems == 0)\n return GAIN_NOT_ENOUGH_SAMPLES;\n\n var upper = 0 | Math.ceil(elems * (1. - RMS_PERCENTILE));\n for (i = len; i-- > 0;) {\n if ((upper -= Array[i]) <= 0)\n break;\n }\n\n //return (float) ((float) PINK_REF - (float) i / (float) STEPS_per_dB);\n return (PINK_REF - i / GainAnalysis.STEPS_per_dB);\n }\n\n this.GetTitleGain = function (rgData) {\n var retval = analyzeResult(rgData.A, rgData.A.length);\n\n for (var i = 0; i < rgData.A.length; i++) {\n rgData.B[i] += rgData.A[i];\n rgData.A[i] = 0;\n }\n\n for (var i = 0; i < MAX_ORDER; i++)\n rgData.linprebuf[i] = rgData.lstepbuf[i] = rgData.loutbuf[i] = rgData.rinprebuf[i] = rgData.rstepbuf[i] = rgData.routbuf[i] = 0.;\n\n rgData.totsamp = 0;\n rgData.lsum = rgData.rsum = 0.;\n return retval;\n }\n\n}\n\nmodule.exports = GainAnalysis;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar GainAnalysis = require('./GainAnalysis.js');\n\nfunction ReplayGain() {\n this.linprebuf = new_float(GainAnalysis.MAX_ORDER * 2);\n /**\n * left input samples, with pre-buffer\n */\n this.linpre = 0;\n this.lstepbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n /**\n * left \"first step\" (i.e. post first filter) samples\n */\n this.lstep = 0;\n this.loutbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n /**\n * left \"out\" (i.e. post second filter) samples\n */\n this.lout = 0;\n this.rinprebuf = new_float(GainAnalysis.MAX_ORDER * 2);\n /**\n * right input samples ...\n */\n this.rinpre = 0;\n this.rstepbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n this.rstep = 0;\n this.routbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n this.rout = 0;\n /**\n * number of samples required to reach number of milliseconds required\n * for RMS window\n */\n this.sampleWindow = 0;\n this.totsamp = 0;\n this.lsum = 0.;\n this.rsum = 0.;\n this.freqindex = 0;\n this.first = 0;\n this.A = new_int(0 | (GainAnalysis.STEPS_per_dB * GainAnalysis.MAX_dB));\n this.B = new_int(0 | (GainAnalysis.STEPS_per_dB * GainAnalysis.MAX_dB));\n\n}\n\nmodule.exports = ReplayGain;\n","function MeanBits(meanBits) {\n this.bits = meanBits;\n}\n\nmodule.exports = MeanBits;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar MeanBits = require('./MeanBits.js');\nvar Encoder = require('./Encoder.js');\nvar L3Side = require('./L3Side.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nfunction CBRNewIterationLoop(_quantize) {\n var quantize = _quantize;\n this.quantize = quantize;\n\tthis.iteration_loop = function(gfp, pe, ms_ener_ratio, ratio) {\n\t\tvar gfc = gfp.internal_flags;\n var l3_xmin = new_float(L3Side.SFBMAX);\n\t\tvar xrpow = new_float(576);\n\t\tvar targ_bits = new_int(2);\n\t\tvar mean_bits = 0, max_bits;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tvar mb = new MeanBits(mean_bits);\n\t\tthis.quantize.rv.ResvFrameBegin(gfp, mb);\n\t\tmean_bits = mb.bits;\n\n\t\t/* quantize! */\n\t\tfor (var gr = 0; gr < gfc.mode_gr; gr++) {\n\n\t\t\t/*\n\t\t\t * calculate needed bits\n\t\t\t */\n\t\t\tmax_bits = this.quantize.qupvt.on_pe(gfp, pe, targ_bits, mean_bits,\n\t\t\t\t\tgr, gr);\n\n\t\t\tif (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n\t\t\t\tthis.quantize.ms_convert(gfc.l3_side, gr);\n\t\t\t\tthis.quantize.qupvt.reduce_side(targ_bits, ms_ener_ratio[gr],\n\t\t\t\t\t\tmean_bits, max_bits);\n\t\t\t}\n\n\t\t\tfor (var ch = 0; ch < gfc.channels_out; ch++) {\n\t\t\t\tvar adjust, masking_lower_db;\n\t\t\t\tvar cod_info = l3_side.tt[gr][ch];\n\n\t\t\t\tif (cod_info.block_type != Encoder.SHORT_TYPE) {\n\t\t\t\t\t// NORM, START or STOP type\n\t\t\t\t\tadjust = 0;\n\t\t\t\t\tmasking_lower_db = gfc.PSY.mask_adjust - adjust;\n\t\t\t\t} else {\n\t\t\t\t\tadjust = 0;\n\t\t\t\t\tmasking_lower_db = gfc.PSY.mask_adjust_short - adjust;\n\t\t\t\t}\n\t\t\t\tgfc.masking_lower = Math.pow(10.0,\n\t\t\t\t\t\tmasking_lower_db * 0.1);\n\n\t\t\t\t/*\n\t\t\t\t * init_outer_loop sets up cod_info, scalefac and xrpow\n\t\t\t\t */\n\t\t\t\tthis.quantize.init_outer_loop(gfc, cod_info);\n\t\t\t\tif (this.quantize.init_xrpow(gfc, cod_info, xrpow)) {\n\t\t\t\t\t/*\n\t\t\t\t\t * xr contains energy we will have to encode calculate the\n\t\t\t\t\t * masking abilities find some good quantization in\n\t\t\t\t\t * outer_loop\n\t\t\t\t\t */\n\t\t\t\t\tthis.quantize.qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n\t\t\t\t\t\t\tl3_xmin);\n\t\t\t\t\tthis.quantize.outer_loop(gfp, cod_info, l3_xmin, xrpow, ch,\n\t\t\t\t\t\t\ttarg_bits[ch]);\n\t\t\t\t}\n\n\t\t\t\tthis.quantize.iteration_finish_one(gfc, gr, ch);\n\t\t\t\tassert (cod_info.part2_3_length <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n\t\t\t\tassert (cod_info.part2_3_length <= targ_bits[ch]);\n\t\t\t} /* for ch */\n\t\t} /* for gr */\n\n\t\tthis.quantize.rv.ResvFrameEnd(gfc, mean_bits);\n\t}\n}\nmodule.exports = CBRNewIterationLoop;\n","function HuffCodeTab(len, max, tab, hl) {\n this.xlen = len;\n this.linmax = max;\n this.table = tab;\n this.hlen = hl;\n}\n\nvar Tables = {};\n\n\nTables.t1HB = [\n 1, 1,\n 1, 0\n];\n\nTables.t2HB = [\n 1, 2, 1,\n 3, 1, 1,\n 3, 2, 0\n];\n\nTables.t3HB = [\n 3, 2, 1,\n 1, 1, 1,\n 3, 2, 0\n];\n\nTables.t5HB = [\n 1, 2, 6, 5,\n 3, 1, 4, 4,\n 7, 5, 7, 1,\n 6, 1, 1, 0\n];\n\nTables.t6HB = [\n 7, 3, 5, 1,\n 6, 2, 3, 2,\n 5, 4, 4, 1,\n 3, 3, 2, 0\n];\n\nTables.t7HB = [\n 1, 2, 10, 19, 16, 10,\n 3, 3, 7, 10, 5, 3,\n 11, 4, 13, 17, 8, 4,\n 12, 11, 18, 15, 11, 2,\n 7, 6, 9, 14, 3, 1,\n 6, 4, 5, 3, 2, 0\n];\n\nTables.t8HB = [\n 3, 4, 6, 18, 12, 5,\n 5, 1, 2, 16, 9, 3,\n 7, 3, 5, 14, 7, 3,\n 19, 17, 15, 13, 10, 4,\n 13, 5, 8, 11, 5, 1,\n 12, 4, 4, 1, 1, 0\n];\n\nTables.t9HB = [\n 7, 5, 9, 14, 15, 7,\n 6, 4, 5, 5, 6, 7,\n 7, 6, 8, 8, 8, 5,\n 15, 6, 9, 10, 5, 1,\n 11, 7, 9, 6, 4, 1,\n 14, 4, 6, 2, 6, 0\n];\n\nTables.t10HB = [\n 1, 2, 10, 23, 35, 30, 12, 17,\n 3, 3, 8, 12, 18, 21, 12, 7,\n 11, 9, 15, 21, 32, 40, 19, 6,\n 14, 13, 22, 34, 46, 23, 18, 7,\n 20, 19, 33, 47, 27, 22, 9, 3,\n 31, 22, 41, 26, 21, 20, 5, 3,\n 14, 13, 10, 11, 16, 6, 5, 1,\n 9, 8, 7, 8, 4, 4, 2, 0\n];\n\nTables.t11HB = [\n 3, 4, 10, 24, 34, 33, 21, 15,\n 5, 3, 4, 10, 32, 17, 11, 10,\n 11, 7, 13, 18, 30, 31, 20, 5,\n 25, 11, 19, 59, 27, 18, 12, 5,\n 35, 33, 31, 58, 30, 16, 7, 5,\n 28, 26, 32, 19, 17, 15, 8, 14,\n 14, 12, 9, 13, 14, 9, 4, 1,\n 11, 4, 6, 6, 6, 3, 2, 0\n];\n\nTables.t12HB = [\n 9, 6, 16, 33, 41, 39, 38, 26,\n 7, 5, 6, 9, 23, 16, 26, 11,\n 17, 7, 11, 14, 21, 30, 10, 7,\n 17, 10, 15, 12, 18, 28, 14, 5,\n 32, 13, 22, 19, 18, 16, 9, 5,\n 40, 17, 31, 29, 17, 13, 4, 2,\n 27, 12, 11, 15, 10, 7, 4, 1,\n 27, 12, 8, 12, 6, 3, 1, 0\n];\n\nTables.t13HB = [\n 1, 5, 14, 21, 34, 51, 46, 71, 42, 52, 68, 52, 67, 44, 43, 19,\n 3, 4, 12, 19, 31, 26, 44, 33, 31, 24, 32, 24, 31, 35, 22, 14,\n 15, 13, 23, 36, 59, 49, 77, 65, 29, 40, 30, 40, 27, 33, 42, 16,\n 22, 20, 37, 61, 56, 79, 73, 64, 43, 76, 56, 37, 26, 31, 25, 14,\n 35, 16, 60, 57, 97, 75, 114, 91, 54, 73, 55, 41, 48, 53, 23, 24,\n 58, 27, 50, 96, 76, 70, 93, 84, 77, 58, 79, 29, 74, 49, 41, 17,\n 47, 45, 78, 74, 115, 94, 90, 79, 69, 83, 71, 50, 59, 38, 36, 15,\n 72, 34, 56, 95, 92, 85, 91, 90, 86, 73, 77, 65, 51, 44, 43, 42,\n 43, 20, 30, 44, 55, 78, 72, 87, 78, 61, 46, 54, 37, 30, 20, 16,\n 53, 25, 41, 37, 44, 59, 54, 81, 66, 76, 57, 54, 37, 18, 39, 11,\n 35, 33, 31, 57, 42, 82, 72, 80, 47, 58, 55, 21, 22, 26, 38, 22,\n 53, 25, 23, 38, 70, 60, 51, 36, 55, 26, 34, 23, 27, 14, 9, 7,\n 34, 32, 28, 39, 49, 75, 30, 52, 48, 40, 52, 28, 18, 17, 9, 5,\n 45, 21, 34, 64, 56, 50, 49, 45, 31, 19, 12, 15, 10, 7, 6, 3,\n 48, 23, 20, 39, 36, 35, 53, 21, 16, 23, 13, 10, 6, 1, 4, 2,\n 16, 15, 17, 27, 25, 20, 29, 11, 17, 12, 16, 8, 1, 1, 0, 1\n];\n\nTables.t15HB = [\n 7, 12, 18, 53, 47, 76, 124, 108, 89, 123, 108, 119, 107, 81, 122, 63,\n 13, 5, 16, 27, 46, 36, 61, 51, 42, 70, 52, 83, 65, 41, 59, 36,\n 19, 17, 15, 24, 41, 34, 59, 48, 40, 64, 50, 78, 62, 80, 56, 33,\n 29, 28, 25, 43, 39, 63, 55, 93, 76, 59, 93, 72, 54, 75, 50, 29,\n 52, 22, 42, 40, 67, 57, 95, 79, 72, 57, 89, 69, 49, 66, 46, 27,\n 77, 37, 35, 66, 58, 52, 91, 74, 62, 48, 79, 63, 90, 62, 40, 38,\n 125, 32, 60, 56, 50, 92, 78, 65, 55, 87, 71, 51, 73, 51, 70, 30,\n 109, 53, 49, 94, 88, 75, 66, 122, 91, 73, 56, 42, 64, 44, 21, 25,\n 90, 43, 41, 77, 73, 63, 56, 92, 77, 66, 47, 67, 48, 53, 36, 20,\n 71, 34, 67, 60, 58, 49, 88, 76, 67, 106, 71, 54, 38, 39, 23, 15,\n 109, 53, 51, 47, 90, 82, 58, 57, 48, 72, 57, 41, 23, 27, 62, 9,\n 86, 42, 40, 37, 70, 64, 52, 43, 70, 55, 42, 25, 29, 18, 11, 11,\n 118, 68, 30, 55, 50, 46, 74, 65, 49, 39, 24, 16, 22, 13, 14, 7,\n 91, 44, 39, 38, 34, 63, 52, 45, 31, 52, 28, 19, 14, 8, 9, 3,\n 123, 60, 58, 53, 47, 43, 32, 22, 37, 24, 17, 12, 15, 10, 2, 1,\n 71, 37, 34, 30, 28, 20, 17, 26, 21, 16, 10, 6, 8, 6, 2, 0\n];\n\nTables.t16HB = [\n 1, 5, 14, 44, 74, 63, 110, 93, 172, 149, 138, 242, 225, 195, 376, 17,\n 3, 4, 12, 20, 35, 62, 53, 47, 83, 75, 68, 119, 201, 107, 207, 9,\n 15, 13, 23, 38, 67, 58, 103, 90, 161, 72, 127, 117, 110, 209, 206, 16,\n 45, 21, 39, 69, 64, 114, 99, 87, 158, 140, 252, 212, 199, 387, 365, 26,\n 75, 36, 68, 65, 115, 101, 179, 164, 155, 264, 246, 226, 395, 382, 362, 9,\n 66, 30, 59, 56, 102, 185, 173, 265, 142, 253, 232, 400, 388, 378, 445, 16,\n 111, 54, 52, 100, 184, 178, 160, 133, 257, 244, 228, 217, 385, 366, 715, 10,\n 98, 48, 91, 88, 165, 157, 148, 261, 248, 407, 397, 372, 380, 889, 884, 8,\n 85, 84, 81, 159, 156, 143, 260, 249, 427, 401, 392, 383, 727, 713, 708, 7,\n 154, 76, 73, 141, 131, 256, 245, 426, 406, 394, 384, 735, 359, 710, 352, 11,\n 139, 129, 67, 125, 247, 233, 229, 219, 393, 743, 737, 720, 885, 882, 439, 4,\n 243, 120, 118, 115, 227, 223, 396, 746, 742, 736, 721, 712, 706, 223, 436, 6,\n 202, 224, 222, 218, 216, 389, 386, 381, 364, 888, 443, 707, 440, 437, 1728, 4,\n 747, 211, 210, 208, 370, 379, 734, 723, 714, 1735, 883, 877, 876, 3459, 865, 2,\n 377, 369, 102, 187, 726, 722, 358, 711, 709, 866, 1734, 871, 3458, 870, 434, 0,\n 12, 10, 7, 11, 10, 17, 11, 9, 13, 12, 10, 7, 5, 3, 1, 3\n];\n\nTables.t24HB = [\n 15, 13, 46, 80, 146, 262, 248, 434, 426, 669, 653, 649, 621, 517, 1032, 88,\n 14, 12, 21, 38, 71, 130, 122, 216, 209, 198, 327, 345, 319, 297, 279, 42,\n 47, 22, 41, 74, 68, 128, 120, 221, 207, 194, 182, 340, 315, 295, 541, 18,\n 81, 39, 75, 70, 134, 125, 116, 220, 204, 190, 178, 325, 311, 293, 271, 16,\n 147, 72, 69, 135, 127, 118, 112, 210, 200, 188, 352, 323, 306, 285, 540, 14,\n 263, 66, 129, 126, 119, 114, 214, 202, 192, 180, 341, 317, 301, 281, 262, 12,\n 249, 123, 121, 117, 113, 215, 206, 195, 185, 347, 330, 308, 291, 272, 520, 10,\n 435, 115, 111, 109, 211, 203, 196, 187, 353, 332, 313, 298, 283, 531, 381, 17,\n 427, 212, 208, 205, 201, 193, 186, 177, 169, 320, 303, 286, 268, 514, 377, 16,\n 335, 199, 197, 191, 189, 181, 174, 333, 321, 305, 289, 275, 521, 379, 371, 11,\n 668, 184, 183, 179, 175, 344, 331, 314, 304, 290, 277, 530, 383, 373, 366, 10,\n 652, 346, 171, 168, 164, 318, 309, 299, 287, 276, 263, 513, 375, 368, 362, 6,\n 648, 322, 316, 312, 307, 302, 292, 284, 269, 261, 512, 376, 370, 364, 359, 4,\n 620, 300, 296, 294, 288, 282, 273, 266, 515, 380, 374, 369, 365, 361, 357, 2,\n 1033, 280, 278, 274, 267, 264, 259, 382, 378, 372, 367, 363, 360, 358, 356, 0,\n 43, 20, 19, 17, 15, 13, 11, 9, 7, 6, 4, 7, 5, 3, 1, 3\n];\n\nTables.t32HB = [\n 1 << 0, 5 << 1, 4 << 1, 5 << 2, 6 << 1, 5 << 2, 4 << 2, 4 << 3,\n 7 << 1, 3 << 2, 6 << 2, 0 << 3, 7 << 2, 2 << 3, 3 << 3, 1 << 4\n];\n\nTables.t33HB = [\n 15 << 0, 14 << 1, 13 << 1, 12 << 2, 11 << 1, 10 << 2, 9 << 2, 8 << 3,\n 7 << 1, 6 << 2, 5 << 2, 4 << 3, 3 << 2, 2 << 3, 1 << 3, 0 << 4\n];\n\nTables.t1l = [\n 1, 4,\n 3, 5\n];\n\nTables.t2l = [\n 1, 4, 7,\n 4, 5, 7,\n 6, 7, 8\n];\n\nTables.t3l = [\n 2, 3, 7,\n 4, 4, 7,\n 6, 7, 8\n];\n\nTables.t5l = [\n 1, 4, 7, 8,\n 4, 5, 8, 9,\n 7, 8, 9, 10,\n 8, 8, 9, 10\n];\n\nTables.t6l = [\n 3, 4, 6, 8,\n 4, 4, 6, 7,\n 5, 6, 7, 8,\n 7, 7, 8, 9\n];\n\nTables.t7l = [\n 1, 4, 7, 9, 9, 10,\n 4, 6, 8, 9, 9, 10,\n 7, 7, 9, 10, 10, 11,\n 8, 9, 10, 11, 11, 11,\n 8, 9, 10, 11, 11, 12,\n 9, 10, 11, 12, 12, 12\n];\n\nTables.t8l = [\n 2, 4, 7, 9, 9, 10,\n 4, 4, 6, 10, 10, 10,\n 7, 6, 8, 10, 10, 11,\n 9, 10, 10, 11, 11, 12,\n 9, 9, 10, 11, 12, 12,\n 10, 10, 11, 11, 13, 13\n];\n\nTables.t9l = [\n 3, 4, 6, 7, 9, 10,\n 4, 5, 6, 7, 8, 10,\n 5, 6, 7, 8, 9, 10,\n 7, 7, 8, 9, 9, 10,\n 8, 8, 9, 9, 10, 11,\n 9, 9, 10, 10, 11, 11\n];\n\nTables.t10l = [\n 1, 4, 7, 9, 10, 10, 10, 11,\n 4, 6, 8, 9, 10, 11, 10, 10,\n 7, 8, 9, 10, 11, 12, 11, 11,\n 8, 9, 10, 11, 12, 12, 11, 12,\n 9, 10, 11, 12, 12, 12, 12, 12,\n 10, 11, 12, 12, 13, 13, 12, 13,\n 9, 10, 11, 12, 12, 12, 13, 13,\n 10, 10, 11, 12, 12, 13, 13, 13\n];\n\nTables.t11l = [\n 2, 4, 6, 8, 9, 10, 9, 10,\n 4, 5, 6, 8, 10, 10, 9, 10,\n 6, 7, 8, 9, 10, 11, 10, 10,\n 8, 8, 9, 11, 10, 12, 10, 11,\n 9, 10, 10, 11, 11, 12, 11, 12,\n 9, 10, 11, 12, 12, 13, 12, 13,\n 9, 9, 9, 10, 11, 12, 12, 12,\n 9, 9, 10, 11, 12, 12, 12, 12\n];\n\nTables.t12l = [\n 4, 4, 6, 8, 9, 10, 10, 10,\n 4, 5, 6, 7, 9, 9, 10, 10,\n 6, 6, 7, 8, 9, 10, 9, 10,\n 7, 7, 8, 8, 9, 10, 10, 10,\n 8, 8, 9, 9, 10, 10, 10, 11,\n 9, 9, 10, 10, 10, 11, 10, 11,\n 9, 9, 9, 10, 10, 11, 11, 12,\n 10, 10, 10, 11, 11, 11, 11, 12\n];\n\nTables.t13l = [\n 1, 5, 7, 8, 9, 10, 10, 11, 10, 11, 12, 12, 13, 13, 14, 14,\n 4, 6, 8, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 14, 14, 14,\n 7, 8, 9, 10, 11, 11, 12, 12, 11, 12, 12, 13, 13, 14, 15, 15,\n 8, 9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15,\n 9, 9, 11, 11, 12, 12, 13, 13, 12, 13, 13, 14, 14, 15, 15, 16,\n 10, 10, 11, 12, 12, 12, 13, 13, 13, 13, 14, 13, 15, 15, 16, 16,\n 10, 11, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16,\n 11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 18, 18,\n 10, 10, 11, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 17, 17,\n 11, 11, 12, 12, 13, 13, 13, 15, 14, 15, 15, 16, 16, 16, 18, 17,\n 11, 12, 12, 13, 13, 14, 14, 15, 14, 15, 16, 15, 16, 17, 18, 19,\n 12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18,\n 12, 13, 13, 14, 14, 15, 14, 15, 16, 16, 17, 17, 17, 18, 18, 18,\n 13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 17, 18, 18,\n 14, 14, 14, 15, 15, 15, 17, 16, 16, 19, 17, 17, 17, 19, 18, 18,\n 13, 14, 15, 16, 16, 16, 17, 16, 17, 17, 18, 18, 21, 20, 21, 18\n];\n\nTables.t15l = [\n 3, 5, 6, 8, 8, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 14,\n 5, 5, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13,\n 6, 7, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13,\n 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13,\n 8, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13,\n 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 14,\n 10, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14,\n 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14,\n 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14,\n 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14,\n 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 14,\n 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15,\n 12, 12, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15,\n 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15,\n 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 15,\n 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15\n];\n\nTables.t16_5l = [\n 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 11,\n 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 11,\n 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 12,\n 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 13,\n 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 12,\n 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 13,\n 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 13,\n 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 13,\n 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 13,\n 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 14,\n 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 13,\n 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 14,\n 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 14,\n 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 14,\n 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 14,\n 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 12\n];\n\nTables.t16l = [\n 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 10,\n 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 10,\n 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 11,\n 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 12,\n 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 11,\n 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 12,\n 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 12,\n 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 12,\n 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 12,\n 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 13,\n 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 12,\n 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 13,\n 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 13,\n 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 13,\n 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 13,\n 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10\n];\n\nTables.t24l = [\n 4, 5, 7, 8, 9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 10,\n 5, 6, 7, 8, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 10,\n 7, 7, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 9,\n 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 9,\n 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 9,\n 10, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 9,\n 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 9,\n 11, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 10,\n 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 10,\n 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 10,\n 12, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10,\n 12, 12, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10,\n 13, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 10,\n 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 6\n];\n\nTables.t32l = [\n 1 + 0, 4 + 1, 4 + 1, 5 + 2, 4 + 1, 6 + 2, 5 + 2, 6 + 3,\n 4 + 1, 5 + 2, 5 + 2, 6 + 3, 5 + 2, 6 + 3, 6 + 3, 6 + 4\n];\n\nTables.t33l = [\n 4 + 0, 4 + 1, 4 + 1, 4 + 2, 4 + 1, 4 + 2, 4 + 2, 4 + 3,\n 4 + 1, 4 + 2, 4 + 2, 4 + 3, 4 + 2, 4 + 3, 4 + 3, 4 + 4\n];\n\nTables.ht = [\n /* xlen, linmax, table, hlen */\n new HuffCodeTab(0, 0, null, null),\n new HuffCodeTab(2, 0, Tables.t1HB, Tables.t1l),\n new HuffCodeTab(3, 0, Tables.t2HB, Tables.t2l),\n new HuffCodeTab(3, 0, Tables.t3HB, Tables.t3l),\n new HuffCodeTab(0, 0, null, null), /* Apparently not used */\n new HuffCodeTab(4, 0, Tables.t5HB, Tables.t5l),\n new HuffCodeTab(4, 0, Tables.t6HB, Tables.t6l),\n new HuffCodeTab(6, 0, Tables.t7HB, Tables.t7l),\n new HuffCodeTab(6, 0, Tables.t8HB, Tables.t8l),\n new HuffCodeTab(6, 0, Tables.t9HB, Tables.t9l),\n new HuffCodeTab(8, 0, Tables.t10HB, Tables.t10l),\n new HuffCodeTab(8, 0, Tables.t11HB, Tables.t11l),\n new HuffCodeTab(8, 0, Tables.t12HB, Tables.t12l),\n new HuffCodeTab(16, 0, Tables.t13HB, Tables.t13l),\n new HuffCodeTab(0, 0, null, Tables.t16_5l), /* Apparently not used */\n new HuffCodeTab(16, 0, Tables.t15HB, Tables.t15l),\n\n new HuffCodeTab(1, 1, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(2, 3, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(3, 7, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(4, 15, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(6, 63, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(8, 255, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(10, 1023, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(13, 8191, Tables.t16HB, Tables.t16l),\n\n new HuffCodeTab(4, 15, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(5, 31, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(6, 63, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(7, 127, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(8, 255, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(9, 511, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(11, 2047, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(13, 8191, Tables.t24HB, Tables.t24l),\n\n new HuffCodeTab(0, 0, Tables.t32HB, Tables.t32l),\n new HuffCodeTab(0, 0, Tables.t33HB, Tables.t33l),\n];\n\n/**\n * \n * for (i = 0; i < 16*16; i++) [\n * largetbl[i] = ((ht[16].hlen[i]) << 16) + ht[24].hlen[i];\n * ]\n * \n *\n */\nTables.largetbl = [\n 0x010004, 0x050005, 0x070007, 0x090008, 0x0a0009, 0x0a000a, 0x0b000a, 0x0b000b,\n 0x0c000b, 0x0c000c, 0x0c000c, 0x0d000c, 0x0d000c, 0x0d000c, 0x0e000d, 0x0a000a,\n 0x040005, 0x060006, 0x080007, 0x090008, 0x0a0009, 0x0b000a, 0x0b000a, 0x0b000b,\n 0x0c000b, 0x0c000b, 0x0c000c, 0x0d000c, 0x0e000c, 0x0d000c, 0x0e000c, 0x0a000a,\n 0x070007, 0x080007, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000b,\n 0x0d000b, 0x0c000b, 0x0d000b, 0x0d000c, 0x0d000c, 0x0e000c, 0x0e000d, 0x0b0009,\n 0x090008, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0c000b,\n 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0c0009,\n 0x0a0009, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000a, 0x0d000b,\n 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000d, 0x0b0009,\n 0x0a000a, 0x0a0009, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0e000b,\n 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0c0009,\n 0x0b000a, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0d000b, 0x0d000b,\n 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000d, 0x0c0009,\n 0x0b000b, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b,\n 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x11000d, 0x11000d, 0x0c000a,\n 0x0b000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b,\n 0x0f000b, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000d, 0x10000d, 0x0c000a,\n 0x0c000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b, 0x0f000c,\n 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0f000d, 0x10000d, 0x0f000d, 0x0d000a,\n 0x0c000c, 0x0d000b, 0x0c000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c,\n 0x0f000c, 0x10000c, 0x10000c, 0x10000d, 0x11000d, 0x11000d, 0x10000d, 0x0c000a,\n 0x0d000c, 0x0d000c, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x10000c,\n 0x10000c, 0x10000c, 0x10000c, 0x10000d, 0x10000d, 0x0f000d, 0x10000d, 0x0d000a,\n 0x0d000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c,\n 0x0f000c, 0x11000c, 0x10000d, 0x10000d, 0x10000d, 0x10000d, 0x12000d, 0x0d000a,\n 0x0f000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000c,\n 0x10000d, 0x12000d, 0x11000d, 0x11000d, 0x11000d, 0x13000d, 0x11000d, 0x0d000a,\n 0x0e000d, 0x0f000c, 0x0d000c, 0x0e000c, 0x10000c, 0x10000c, 0x0f000c, 0x10000d,\n 0x10000d, 0x11000d, 0x12000d, 0x11000d, 0x13000d, 0x11000d, 0x10000d, 0x0d000a,\n 0x0a0009, 0x0a0009, 0x0a0009, 0x0b0009, 0x0b0009, 0x0c0009, 0x0c0009, 0x0c0009,\n 0x0d0009, 0x0d0009, 0x0d0009, 0x0d000a, 0x0d000a, 0x0d000a, 0x0d000a, 0x0a0006\n];\n/**\n * \n * for (i = 0; i < 3*3; i++) [\n * table23[i] = ((ht[2].hlen[i]) << 16) + ht[3].hlen[i];\n * ]\n * \n *\n */\nTables.table23 = [\n 0x010002, 0x040003, 0x070007,\n 0x040004, 0x050004, 0x070007,\n 0x060006, 0x070007, 0x080008\n];\n\n/**\n * \n * for (i = 0; i < 4*4; i++) [\n * table56[i] = ((ht[5].hlen[i]) << 16) + ht[6].hlen[i];\n * ]\n * \n *\n */\nTables.table56 = [\n 0x010003, 0x040004, 0x070006, 0x080008, 0x040004, 0x050004, 0x080006, 0x090007,\n 0x070005, 0x080006, 0x090007, 0x0a0008, 0x080007, 0x080007, 0x090008, 0x0a0009\n];\n\nTables.bitrate_table = [\n [0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1], /* MPEG 2 */\n [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1], /* MPEG 1 */\n [0, 8, 16, 24, 32, 40, 48, 56, 64, -1, -1, -1, -1, -1, -1, -1], /* MPEG 2.5 */\n];\n\n/**\n * MPEG 2, MPEG 1, MPEG 2.5.\n */\nTables.samplerate_table = [\n [22050, 24000, 16000, -1],\n [44100, 48000, 32000, -1],\n [11025, 12000, 8000, -1],\n];\n\n/**\n * This is the scfsi_band table from 2.4.2.7 of the IS.\n */\nTables.scfsi_band = [0, 6, 11, 16, 21];\n\nmodule.exports = Tables;\n","/*\n * quantize_pvt source file\n *\n * Copyright (c) 1999-2002 Takehiro Tominaga\n * Copyright (c) 2000-2002 Robert Hegemann\n * Copyright (c) 2001 Naoki Shibata\n * Copyright (c) 2002-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: QuantizePVT.java,v 1.24 2011/05/24 20:48:06 kenchis Exp $ */\nvar ScaleFac = require('./ScaleFac.js');\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\nvar MeanBits = require('./MeanBits.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nQuantizePVT.Q_MAX = (256 + 1);\nQuantizePVT.Q_MAX2 = 116;\nQuantizePVT.LARGE_BITS = 100000;\nQuantizePVT.IXMAX_VAL = 8206;\n\nfunction QuantizePVT() {\n\n var tak = null;\n var rv = null;\n var psy = null;\n\n this.setModules = function (_tk, _rv, _psy) {\n tak = _tk;\n rv = _rv;\n psy = _psy;\n };\n\n function POW20(x) {\n assert(0 <= (x + QuantizePVT.Q_MAX2) && x < QuantizePVT.Q_MAX);\n return pow20[x + QuantizePVT.Q_MAX2];\n }\n\n this.IPOW20 = function (x) {\n assert(0 <= x && x < QuantizePVT.Q_MAX);\n return ipow20[x];\n }\n\n /**\n * smallest such that 1.0+DBL_EPSILON != 1.0\n */\n var DBL_EPSILON = 2.2204460492503131e-016;\n\n /**\n * ix always <= 8191+15. see count_bits()\n */\n var IXMAX_VAL = QuantizePVT.IXMAX_VAL;\n\n var PRECALC_SIZE = (IXMAX_VAL + 2);\n\n var Q_MAX = QuantizePVT.Q_MAX;\n\n\n /**\n * \n * minimum possible number of\n * -cod_info.global_gain + ((scalefac[] + (cod_info.preflag ? pretab[sfb] : 0))\n * << (cod_info.scalefac_scale + 1)) + cod_info.subblock_gain[cod_info.window[sfb]] * 8;\n *\n * for long block, 0+((15+3)<<2) = 18*4 = 72\n * for short block, 0+(15<<2)+7*8 = 15*4+56 = 116\n * \n */\n var Q_MAX2 = QuantizePVT.Q_MAX2;\n\n var LARGE_BITS = QuantizePVT.LARGE_BITS;\n\n\n /**\n * Assuming dynamic range=96dB, this value should be 92\n */\n var NSATHSCALE = 100;\n\n /**\n * The following table is used to implement the scalefactor partitioning for\n * MPEG2 as described in section 2.4.3.2 of the IS. The indexing corresponds\n * to the way the tables are presented in the IS:\n *\n * [table_number][row_in_table][column of nr_of_sfb]\n */\n this.nr_of_sfb_block = [\n [[6, 5, 5, 5], [9, 9, 9, 9], [6, 9, 9, 9]],\n [[6, 5, 7, 3], [9, 9, 12, 6], [6, 9, 12, 6]],\n [[11, 10, 0, 0], [18, 18, 0, 0], [15, 18, 0, 0]],\n [[7, 7, 7, 0], [12, 12, 12, 0], [6, 15, 12, 0]],\n [[6, 6, 6, 3], [12, 9, 9, 6], [6, 12, 9, 6]],\n [[8, 8, 5, 0], [15, 12, 9, 0], [6, 18, 9, 0]]];\n\n /**\n * Table B.6: layer3 preemphasis\n */\n var pretab = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n 2, 2, 3, 3, 3, 2, 0];\n this.pretab = pretab;\n\n /**\n * Here are MPEG1 Table B.8 and MPEG2 Table B.1 -- Layer III scalefactor\n * bands.
\n * Index into this using a method such as:
\n * idx = fr_ps.header.sampling_frequency + (fr_ps.header.version * 3)\n */\n this.sfBandIndex = [\n // Table B.2.b: 22.05 kHz\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132, 174, 192]\n , [0, 0, 0, 0, 0, 0, 0] // sfb21 pseudo sub bands\n , [0, 0, 0, 0, 0, 0, 0] // sfb12 pseudo sub bands\n ),\n /* Table B.2.c: 24 kHz */ /* docs: 332. mpg123(broken): 330 */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232, 278, 332, 394, 464,\n 540, 576],\n [0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136, 180, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.2.a: 16 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.b: 44.1 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 52, 62, 74, 90, 110, 134, 162, 196, 238, 288, 342, 418,\n 576],\n [0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84, 106, 136, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.c: 48 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 60, 72, 88, 106, 128, 156, 190, 230, 276, 330, 384,\n 576],\n [0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80, 100, 126, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.a: 32 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 54, 66, 82, 102, 126, 156, 194, 240, 296, 364, 448, 550,\n 576],\n [0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138, 180, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 11.025 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3,\n 402 / 3, 522 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 12 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3,\n 402 / 3, 522 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 8 kHz */\n new ScaleFac([0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 160, 192, 232, 280, 336, 400, 476, 566, 568, 570,\n 572, 574, 576],\n [0 / 3, 24 / 3, 48 / 3, 72 / 3, 108 / 3, 156 / 3, 216 / 3, 288 / 3, 372 / 3, 480 / 3, 486 / 3,\n 492 / 3, 498 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n )\n ];\n\n var pow20 = new_float(Q_MAX + Q_MAX2 + 1);\n var ipow20 = new_float(Q_MAX);\n var pow43 = new_float(PRECALC_SIZE);\n\n var adj43 = new_float(PRECALC_SIZE);\n this.adj43 = adj43;\n\n /**\n *
\n     * compute the ATH for each scalefactor band cd range: 0..96db\n     *\n     * Input: 3.3kHz signal 32767 amplitude (3.3kHz is where ATH is smallest =\n     * -5db) longblocks: sfb=12 en0/bw=-11db max_en0 = 1.3db shortblocks: sfb=5\n     * -9db 0db\n     *\n     * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) longblocks: amp=1\n     * sfb=12 en0/bw=-103 db max_en0 = -92db amp=32767 sfb=12 -12 db -1.4db\n     *\n     * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) shortblocks: amp=1\n     * sfb=5 en0/bw= -99 -86 amp=32767 sfb=5 -9 db 4db\n     *\n     *\n     * MAX energy of largest wave at 3.3kHz = 1db AVE energy of largest wave at\n     * 3.3kHz = -11db Let's take AVE: -11db = maximum signal in sfb=12. Dynamic\n     * range of CD: 96db. Therefor energy of smallest audible wave in sfb=12 =\n     * -11 - 96 = -107db = ATH at 3.3kHz.\n     *\n     * ATH formula for this wave: -5db. To adjust to LAME scaling, we need ATH =\n     * ATH_formula - 103 (db) ATH = ATH * 2.5e-10 (ener)\n     * 
\n */\n function ATHmdct(gfp, f) {\n var ath = psy.ATHformula(f, gfp);\n\n ath -= NSATHSCALE;\n\n /* modify the MDCT scaling for the ATH and convert to energy */\n ath = Math.pow(10.0, ath / 10.0 + gfp.ATHlower);\n return ath;\n }\n\n function compute_ath(gfp) {\n var ATH_l = gfp.internal_flags.ATH.l;\n var ATH_psfb21 = gfp.internal_flags.ATH.psfb21;\n var ATH_s = gfp.internal_flags.ATH.s;\n var ATH_psfb12 = gfp.internal_flags.ATH.psfb12;\n var gfc = gfp.internal_flags;\n var samp_freq = gfp.out_samplerate;\n\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n var start = gfc.scalefac_band.l[sfb];\n var end = gfc.scalefac_band.l[sfb + 1];\n ATH_l[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 576);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_l[sfb] = Math.min(ATH_l[sfb], ATH_f);\n }\n }\n\n for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {\n var start = gfc.scalefac_band.psfb21[sfb];\n var end = gfc.scalefac_band.psfb21[sfb + 1];\n ATH_psfb21[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 576);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_psfb21[sfb] = Math.min(ATH_psfb21[sfb], ATH_f);\n }\n }\n\n for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n ATH_s[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 192);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_s[sfb] = Math.min(ATH_s[sfb], ATH_f);\n }\n ATH_s[sfb] *= (gfc.scalefac_band.s[sfb + 1] - gfc.scalefac_band.s[sfb]);\n }\n\n for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {\n var start = gfc.scalefac_band.psfb12[sfb];\n var end = gfc.scalefac_band.psfb12[sfb + 1];\n ATH_psfb12[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 192);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_psfb12[sfb] = Math.min(ATH_psfb12[sfb], ATH_f);\n }\n /* not sure about the following */\n ATH_psfb12[sfb] *= (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]);\n }\n\n /*\n * no-ATH mode: reduce ATH to -200 dB\n */\n if (gfp.noATH) {\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n ATH_l[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {\n ATH_psfb21[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {\n ATH_s[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {\n ATH_psfb12[sfb] = 1E-20;\n }\n }\n\n /*\n * work in progress, don't rely on it too much\n */\n gfc.ATH.floor = 10. * Math.log10(ATHmdct(gfp, -1.));\n }\n\n /**\n * initialization for iteration_loop\n */\n this.iteration_init = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n var i;\n\n if (gfc.iteration_init_init == 0) {\n gfc.iteration_init_init = 1;\n\n l3_side.main_data_begin = 0;\n compute_ath(gfp);\n\n pow43[0] = 0.0;\n for (i = 1; i < PRECALC_SIZE; i++)\n pow43[i] = Math.pow(i, 4.0 / 3.0);\n\n for (i = 0; i < PRECALC_SIZE - 1; i++)\n adj43[i] = ((i + 1) - Math.pow(\n 0.5 * (pow43[i] + pow43[i + 1]), 0.75));\n adj43[i] = 0.5;\n\n for (i = 0; i < Q_MAX; i++)\n ipow20[i] = Math.pow(2.0, (i - 210) * -0.1875);\n for (i = 0; i <= Q_MAX + Q_MAX2; i++)\n pow20[i] = Math.pow(2.0, (i - 210 - Q_MAX2) * 0.25);\n\n tak.huffman_init(gfc);\n\n {\n var bass, alto, treble, sfb21;\n\n i = (gfp.exp_nspsytune >> 2) & 63;\n if (i >= 32)\n i -= 64;\n bass = Math.pow(10, i / 4.0 / 10.0);\n\n i = (gfp.exp_nspsytune >> 8) & 63;\n if (i >= 32)\n i -= 64;\n alto = Math.pow(10, i / 4.0 / 10.0);\n\n i = (gfp.exp_nspsytune >> 14) & 63;\n if (i >= 32)\n i -= 64;\n treble = Math.pow(10, i / 4.0 / 10.0);\n\n /*\n * to be compatible with Naoki's original code, the next 6 bits\n * define only the amount of changing treble for sfb21\n */\n i = (gfp.exp_nspsytune >> 20) & 63;\n if (i >= 32)\n i -= 64;\n sfb21 = treble * Math.pow(10, i / 4.0 / 10.0);\n for (i = 0; i < Encoder.SBMAX_l; i++) {\n var f;\n if (i <= 6)\n f = bass;\n else if (i <= 13)\n f = alto;\n else if (i <= 20)\n f = treble;\n else\n f = sfb21;\n\n gfc.nsPsy.longfact[i] = f;\n }\n for (i = 0; i < Encoder.SBMAX_s; i++) {\n var f;\n if (i <= 5)\n f = bass;\n else if (i <= 10)\n f = alto;\n else if (i <= 11)\n f = treble;\n else\n f = sfb21;\n\n gfc.nsPsy.shortfact[i] = f;\n }\n }\n }\n }\n\n /**\n * allocate bits among 2 channels based on PE
\n * mt 6/99
\n * bugfixes rh 8/01: often allocated more than the allowed 4095 bits\n */\n this.on_pe = function (gfp, pe,\n targ_bits, mean_bits, gr, cbr) {\n var gfc = gfp.internal_flags;\n var tbits = 0, bits;\n var add_bits = new_int(2);\n var ch;\n\n /* allocate targ_bits for granule */\n var mb = new MeanBits(tbits);\n var extra_bits = rv.ResvMaxBits(gfp, mean_bits, mb, cbr);\n tbits = mb.bits;\n /* maximum allowed bits for this granule */\n var max_bits = tbits + extra_bits;\n if (max_bits > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n // hard limit per granule\n max_bits = LameInternalFlags.MAX_BITS_PER_GRANULE;\n }\n for (bits = 0, ch = 0; ch < gfc.channels_out; ++ch) {\n /******************************************************************\n * allocate bits for each channel\n ******************************************************************/\n targ_bits[ch] = Math.min(LameInternalFlags.MAX_BITS_PER_CHANNEL,\n tbits / gfc.channels_out);\n\n add_bits[ch] = 0 | (targ_bits[ch] * pe[gr][ch] / 700.0 - targ_bits[ch]);\n\n /* at most increase bits by 1.5*average */\n if (add_bits[ch] > mean_bits * 3 / 4)\n add_bits[ch] = mean_bits * 3 / 4;\n if (add_bits[ch] < 0)\n add_bits[ch] = 0;\n\n if (add_bits[ch] + targ_bits[ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL)\n add_bits[ch] = Math.max(0,\n LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[ch]);\n\n bits += add_bits[ch];\n }\n if (bits > extra_bits) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n add_bits[ch] = extra_bits * add_bits[ch] / bits;\n }\n }\n\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[ch] += add_bits[ch];\n extra_bits -= add_bits[ch];\n }\n\n for (bits = 0, ch = 0; ch < gfc.channels_out; ++ch) {\n bits += targ_bits[ch];\n }\n if (bits > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n var sum = 0;\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[ch] *= LameInternalFlags.MAX_BITS_PER_GRANULE;\n targ_bits[ch] /= bits;\n sum += targ_bits[ch];\n }\n assert(sum <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n }\n\n return max_bits;\n }\n\n this.reduce_side = function (targ_bits, ms_ener_ratio, mean_bits, max_bits) {\n assert(max_bits <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n assert(targ_bits[0] + targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n\n /*\n * ms_ener_ratio = 0: allocate 66/33 mid/side fac=.33 ms_ener_ratio =.5:\n * allocate 50/50 mid/side fac= 0\n */\n /* 75/25 split is fac=.5 */\n var fac = .33 * (.5 - ms_ener_ratio) / .5;\n if (fac < 0)\n fac = 0;\n if (fac > .5)\n fac = .5;\n\n /* number of bits to move from side channel to mid channel */\n /* move_bits = fac*targ_bits[1]; */\n var move_bits = 0 | (fac * .5 * (targ_bits[0] + targ_bits[1]));\n\n if (move_bits > LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[0]) {\n move_bits = LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[0];\n }\n if (move_bits < 0)\n move_bits = 0;\n\n if (targ_bits[1] >= 125) {\n /* dont reduce side channel below 125 bits */\n if (targ_bits[1] - move_bits > 125) {\n\n /* if mid channel already has 2x more than average, dont bother */\n /* mean_bits = bits per granule (for both channels) */\n if (targ_bits[0] < mean_bits)\n targ_bits[0] += move_bits;\n targ_bits[1] -= move_bits;\n } else {\n targ_bits[0] += targ_bits[1] - 125;\n targ_bits[1] = 125;\n }\n }\n\n move_bits = targ_bits[0] + targ_bits[1];\n if (move_bits > max_bits) {\n targ_bits[0] = (max_bits * targ_bits[0]) / move_bits;\n targ_bits[1] = (max_bits * targ_bits[1]) / move_bits;\n }\n assert(targ_bits[0] <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n assert(targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n assert(targ_bits[0] + targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n };\n\n /**\n * Robert Hegemann 2001-04-27:\n * this adjusts the ATH, keeping the original noise floor\n * affects the higher frequencies more than the lower ones\n */\n this.athAdjust = function (a, x, athFloor) {\n /*\n * work in progress\n */\n var o = 90.30873362;\n var p = 94.82444863;\n var u = Util.FAST_LOG10_X(x, 10.0);\n var v = a * a;\n var w = 0.0;\n u -= athFloor;\n /* undo scaling */\n if (v > 1E-20)\n w = 1. + Util.FAST_LOG10_X(v, 10.0 / o);\n if (w < 0)\n w = 0.;\n u *= w;\n u += athFloor + o - p;\n /* redo scaling */\n\n return Math.pow(10., 0.1 * u);\n };\n\n /**\n * Calculate the allowed distortion for each scalefactor band, as determined\n * by the psychoacoustic model. xmin(sb) = ratio(sb) * en(sb) / bw(sb)\n *\n * returns number of sfb's with energy > ATH\n */\n this.calc_xmin = function (gfp, ratio, cod_info, pxmin) {\n var pxminPos = 0;\n var gfc = gfp.internal_flags;\n var gsfb, j = 0, ath_over = 0;\n var ATH = gfc.ATH;\n var xr = cod_info.xr;\n var enable_athaa_fix = (gfp.VBR == VbrMode.vbr_mtrh) ? 1 : 0;\n var masking_lower = gfc.masking_lower;\n\n if (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) {\n /* was already done in PSY-Model */\n masking_lower = 1.0;\n }\n\n for (gsfb = 0; gsfb < cod_info.psy_lmax; gsfb++) {\n var en0, xmin;\n var rh1, rh2;\n var width, l;\n\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n xmin = athAdjust(ATH.adjust, ATH.l[gsfb], ATH.floor);\n else\n xmin = ATH.adjust * ATH.l[gsfb];\n\n width = cod_info.width[gsfb];\n rh1 = xmin / width;\n rh2 = DBL_EPSILON;\n l = width >> 1;\n en0 = 0.0;\n do {\n var xa, xb;\n xa = xr[j] * xr[j];\n en0 += xa;\n rh2 += (xa < rh1) ? xa : rh1;\n j++;\n xb = xr[j] * xr[j];\n en0 += xb;\n rh2 += (xb < rh1) ? xb : rh1;\n j++;\n } while (--l > 0);\n if (en0 > xmin)\n ath_over++;\n\n if (gsfb == Encoder.SBPSY_l) {\n var x = xmin * gfc.nsPsy.longfact[gsfb];\n if (rh2 < x) {\n rh2 = x;\n }\n }\n if (enable_athaa_fix != 0) {\n xmin = rh2;\n }\n if (!gfp.ATHonly) {\n var e = ratio.en.l[gsfb];\n if (e > 0.0) {\n var x;\n x = en0 * ratio.thm.l[gsfb] * masking_lower / e;\n if (enable_athaa_fix != 0)\n x *= gfc.nsPsy.longfact[gsfb];\n if (xmin < x)\n xmin = x;\n }\n }\n if (enable_athaa_fix != 0)\n pxmin[pxminPos++] = xmin;\n else\n pxmin[pxminPos++] = xmin * gfc.nsPsy.longfact[gsfb];\n }\n /* end of long block loop */\n\n /* use this function to determine the highest non-zero coeff */\n var max_nonzero = 575;\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type, but not SHORT\n var k = 576;\n while (k-- != 0 && BitStream.EQ(xr[k], 0)) {\n max_nonzero = k;\n }\n }\n cod_info.max_nonzero_coeff = max_nonzero;\n\n for (var sfb = cod_info.sfb_smin; gsfb < cod_info.psymax; sfb++, gsfb += 3) {\n var width, b;\n var tmpATH;\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n tmpATH = athAdjust(ATH.adjust, ATH.s[sfb], ATH.floor);\n else\n tmpATH = ATH.adjust * ATH.s[sfb];\n\n width = cod_info.width[gsfb];\n for (b = 0; b < 3; b++) {\n var en0 = 0.0, xmin;\n var rh1, rh2;\n var l = width >> 1;\n\n rh1 = tmpATH / width;\n rh2 = DBL_EPSILON;\n do {\n var xa, xb;\n xa = xr[j] * xr[j];\n en0 += xa;\n rh2 += (xa < rh1) ? xa : rh1;\n j++;\n xb = xr[j] * xr[j];\n en0 += xb;\n rh2 += (xb < rh1) ? xb : rh1;\n j++;\n } while (--l > 0);\n if (en0 > tmpATH)\n ath_over++;\n if (sfb == Encoder.SBPSY_s) {\n var x = tmpATH * gfc.nsPsy.shortfact[sfb];\n if (rh2 < x) {\n rh2 = x;\n }\n }\n if (enable_athaa_fix != 0)\n xmin = rh2;\n else\n xmin = tmpATH;\n\n if (!gfp.ATHonly && !gfp.ATHshort) {\n var e = ratio.en.s[sfb][b];\n if (e > 0.0) {\n var x;\n x = en0 * ratio.thm.s[sfb][b] * masking_lower / e;\n if (enable_athaa_fix != 0)\n x *= gfc.nsPsy.shortfact[sfb];\n if (xmin < x)\n xmin = x;\n }\n }\n if (enable_athaa_fix != 0)\n pxmin[pxminPos++] = xmin;\n else\n pxmin[pxminPos++] = xmin * gfc.nsPsy.shortfact[sfb];\n }\n /* b */\n if (gfp.useTemporal) {\n if (pxmin[pxminPos - 3] > pxmin[pxminPos - 3 + 1])\n pxmin[pxminPos - 3 + 1] += (pxmin[pxminPos - 3] - pxmin[pxminPos - 3 + 1])\n * gfc.decay;\n if (pxmin[pxminPos - 3 + 1] > pxmin[pxminPos - 3 + 2])\n pxmin[pxminPos - 3 + 2] += (pxmin[pxminPos - 3 + 1] - pxmin[pxminPos - 3 + 2])\n * gfc.decay;\n }\n }\n /* end of short block sfb loop */\n\n return ath_over;\n };\n\n function StartLine(j) {\n this.s = j;\n }\n\n this.calc_noise_core = function (cod_info, startline, l, step) {\n var noise = 0;\n var j = startline.s;\n var ix = cod_info.l3_enc;\n\n if (j > cod_info.count1) {\n while ((l--) != 0) {\n var temp;\n temp = cod_info.xr[j];\n j++;\n noise += temp * temp;\n temp = cod_info.xr[j];\n j++;\n noise += temp * temp;\n }\n } else if (j > cod_info.big_values) {\n var ix01 = new_float(2);\n ix01[0] = 0;\n ix01[1] = step;\n while ((l--) != 0) {\n var temp;\n temp = Math.abs(cod_info.xr[j]) - ix01[ix[j]];\n j++;\n noise += temp * temp;\n temp = Math.abs(cod_info.xr[j]) - ix01[ix[j]];\n j++;\n noise += temp * temp;\n }\n } else {\n while ((l--) != 0) {\n var temp;\n temp = Math.abs(cod_info.xr[j]) - pow43[ix[j]] * step;\n j++;\n noise += temp * temp;\n temp = Math.abs(cod_info.xr[j]) - pow43[ix[j]] * step;\n j++;\n noise += temp * temp;\n }\n }\n\n startline.s = j;\n return noise;\n }\n\n /**\n *
\n     * -oo dB  =>  -1.00\n     * - 6 dB  =>  -0.97\n     * - 3 dB  =>  -0.80\n     * - 2 dB  =>  -0.64\n     * - 1 dB  =>  -0.38\n     *   0 dB  =>   0.00\n     * + 1 dB  =>  +0.49\n     * + 2 dB  =>  +1.06\n     * + 3 dB  =>  +1.68\n     * + 6 dB  =>  +3.69\n     * +10 dB  =>  +6.45\n     * 
\n */\n this.calc_noise = function (cod_info, l3_xmin, distort, res, prev_noise) {\n var distortPos = 0;\n var l3_xminPos = 0;\n var sfb, l, over = 0;\n var over_noise_db = 0;\n /* 0 dB relative to masking */\n var tot_noise_db = 0;\n /* -200 dB relative to masking */\n var max_noise = -20.0;\n var j = 0;\n var scalefac = cod_info.scalefac;\n var scalefacPos = 0;\n\n res.over_SSD = 0;\n\n for (sfb = 0; sfb < cod_info.psymax; sfb++) {\n var s = cod_info.global_gain\n - (((scalefac[scalefacPos++]) + (cod_info.preflag != 0 ? pretab[sfb]\n : 0)) << (cod_info.scalefac_scale + 1))\n - cod_info.subblock_gain[cod_info.window[sfb]] * 8;\n var noise = 0.0;\n\n if (prev_noise != null && (prev_noise.step[sfb] == s)) {\n\n /* use previously computed values */\n noise = prev_noise.noise[sfb];\n j += cod_info.width[sfb];\n distort[distortPos++] = noise / l3_xmin[l3_xminPos++];\n\n noise = prev_noise.noise_log[sfb];\n\n } else {\n var step = POW20(s);\n l = cod_info.width[sfb] >> 1;\n\n if ((j + cod_info.width[sfb]) > cod_info.max_nonzero_coeff) {\n var usefullsize;\n usefullsize = cod_info.max_nonzero_coeff - j + 1;\n\n if (usefullsize > 0)\n l = usefullsize >> 1;\n else\n l = 0;\n }\n\n var sl = new StartLine(j);\n noise = this.calc_noise_core(cod_info, sl, l, step);\n j = sl.s;\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.step[sfb] = s;\n prev_noise.noise[sfb] = noise;\n }\n\n noise = distort[distortPos++] = noise / l3_xmin[l3_xminPos++];\n\n /* multiplying here is adding in dB, but can overflow */\n noise = Util.FAST_LOG10(Math.max(noise, 1E-20));\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.noise_log[sfb] = noise;\n }\n }\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.global_gain = cod_info.global_gain;\n }\n\n tot_noise_db += noise;\n\n if (noise > 0.0) {\n var tmp;\n\n tmp = Math.max(0 | (noise * 10 + .5), 1);\n res.over_SSD += tmp * tmp;\n\n over++;\n /* multiplying here is adding in dB -but can overflow */\n /* over_noise *= noise; */\n over_noise_db += noise;\n }\n max_noise = Math.max(max_noise, noise);\n\n }\n\n res.over_count = over;\n res.tot_noise = tot_noise_db;\n res.over_noise = over_noise_db;\n res.max_noise = max_noise;\n\n return over;\n }\n\n /**\n * updates plotting data\n *\n * Mark Taylor 2000-??-??\n *\n * Robert Hegemann: moved noise/distortion calc into it\n */\n this.set_pinfo = function (gfp, cod_info, ratio, gr, ch) {\n var gfc = gfp.internal_flags;\n var sfb, sfb2;\n var l;\n var en0, en1;\n var ifqstep = (cod_info.scalefac_scale == 0) ? .5 : 1.0;\n var scalefac = cod_info.scalefac;\n\n var l3_xmin = new_float(L3Side.SFBMAX);\n var xfsf = new_float(L3Side.SFBMAX);\n var noise = new CalcNoiseResult();\n\n calc_xmin(gfp, ratio, cod_info, l3_xmin);\n calc_noise(cod_info, l3_xmin, xfsf, noise, null);\n\n var j = 0;\n sfb2 = cod_info.sfb_lmax;\n if (cod_info.block_type != Encoder.SHORT_TYPE\n && 0 == cod_info.mixed_block_flag)\n sfb2 = 22;\n for (sfb = 0; sfb < sfb2; sfb++) {\n var start = gfc.scalefac_band.l[sfb];\n var end = gfc.scalefac_band.l[sfb + 1];\n var bw = end - start;\n for (en0 = 0.0; j < end; j++)\n en0 += cod_info.xr[j] * cod_info.xr[j];\n en0 /= bw;\n /* convert to MDCT units */\n /* scaling so it shows up on FFT plot */\n en1 = 1e15;\n gfc.pinfo.en[gr][ch][sfb] = en1 * en0;\n gfc.pinfo.xfsf[gr][ch][sfb] = en1 * l3_xmin[sfb] * xfsf[sfb] / bw;\n\n if (ratio.en.l[sfb] > 0 && !gfp.ATHonly)\n en0 = en0 / ratio.en.l[sfb];\n else\n en0 = 0.0;\n\n gfc.pinfo.thr[gr][ch][sfb] = en1\n * Math.max(en0 * ratio.thm.l[sfb], gfc.ATH.l[sfb]);\n\n /* there is no scalefactor bands >= SBPSY_l */\n gfc.pinfo.LAMEsfb[gr][ch][sfb] = 0;\n if (cod_info.preflag != 0 && sfb >= 11)\n gfc.pinfo.LAMEsfb[gr][ch][sfb] = -ifqstep * pretab[sfb];\n\n if (sfb < Encoder.SBPSY_l) {\n /* scfsi should be decoded by caller side */\n assert(scalefac[sfb] >= 0);\n gfc.pinfo.LAMEsfb[gr][ch][sfb] -= ifqstep * scalefac[sfb];\n }\n }\n /* for sfb */\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n sfb2 = sfb;\n for (sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n var bw = end - start;\n for (var i = 0; i < 3; i++) {\n for (en0 = 0.0, l = start; l < end; l++) {\n en0 += cod_info.xr[j] * cod_info.xr[j];\n j++;\n }\n en0 = Math.max(en0 / bw, 1e-20);\n /* convert to MDCT units */\n /* scaling so it shows up on FFT plot */\n en1 = 1e15;\n\n gfc.pinfo.en_s[gr][ch][3 * sfb + i] = en1 * en0;\n gfc.pinfo.xfsf_s[gr][ch][3 * sfb + i] = en1 * l3_xmin[sfb2]\n * xfsf[sfb2] / bw;\n if (ratio.en.s[sfb][i] > 0)\n en0 = en0 / ratio.en.s[sfb][i];\n else\n en0 = 0.0;\n if (gfp.ATHonly || gfp.ATHshort)\n en0 = 0;\n\n gfc.pinfo.thr_s[gr][ch][3 * sfb + i] = en1\n * Math.max(en0 * ratio.thm.s[sfb][i],\n gfc.ATH.s[sfb]);\n\n /* there is no scalefactor bands >= SBPSY_s */\n gfc.pinfo.LAMEsfb_s[gr][ch][3 * sfb + i] = -2.0\n * cod_info.subblock_gain[i];\n if (sfb < Encoder.SBPSY_s) {\n gfc.pinfo.LAMEsfb_s[gr][ch][3 * sfb + i] -= ifqstep\n * scalefac[sfb2];\n }\n sfb2++;\n }\n }\n }\n /* block type short */\n gfc.pinfo.LAMEqss[gr][ch] = cod_info.global_gain;\n gfc.pinfo.LAMEmainbits[gr][ch] = cod_info.part2_3_length\n + cod_info.part2_length;\n gfc.pinfo.LAMEsfbits[gr][ch] = cod_info.part2_length;\n\n gfc.pinfo.over[gr][ch] = noise.over_count;\n gfc.pinfo.max_noise[gr][ch] = noise.max_noise * 10.0;\n gfc.pinfo.over_noise[gr][ch] = noise.over_noise * 10.0;\n gfc.pinfo.tot_noise[gr][ch] = noise.tot_noise * 10.0;\n gfc.pinfo.over_SSD[gr][ch] = noise.over_SSD;\n }\n\n /**\n * updates plotting data for a whole frame\n *\n * Robert Hegemann 2000-10-21\n */\n function set_frame_pinfo(gfp, ratio) {\n var gfc = gfp.internal_flags;\n\n gfc.masking_lower = 1.0;\n\n /*\n * for every granule and channel patch l3_enc and set info\n */\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n var scalefac_sav = new_int(L3Side.SFBMAX);\n System.arraycopy(cod_info.scalefac, 0, scalefac_sav, 0,\n scalefac_sav.length);\n\n /*\n * reconstruct the scalefactors in case SCFSI was used\n */\n if (gr == 1) {\n var sfb;\n for (sfb = 0; sfb < cod_info.sfb_lmax; sfb++) {\n if (cod_info.scalefac[sfb] < 0) /* scfsi */\n cod_info.scalefac[sfb] = gfc.l3_side.tt[0][ch].scalefac[sfb];\n }\n }\n\n set_pinfo(gfp, cod_info, ratio[gr][ch], gr, ch);\n System.arraycopy(scalefac_sav, 0, cod_info.scalefac, 0,\n scalefac_sav.length);\n }\n /* for ch */\n }\n /* for gr */\n }\n\n}\n\nmodule.exports = QuantizePVT;\n","/*\n *\tMP3 huffman table selecting and bit counting\n *\n *\tCopyright (c) 1999-2005 Takehiro TOMINAGA\n *\tCopyright (c) 2002-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\t See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Takehiro.java,v 1.26 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\nvar Tables = require('./Tables.js');\nvar GrInfo = require('./GrInfo.js');\nvar QuantizePVT = require('./QuantizePVT.js');\n\n\nfunction Takehiro() {\n\n var qupvt = null;\n this.qupvt = null;\n\n this.setModules = function (_qupvt) {\n this.qupvt = _qupvt;\n qupvt = _qupvt;\n }\n\n function Bits(b) {\n this.bits = 0 | b;\n }\n\n var subdv_table = [[0, 0], /* 0 bands */\n [0, 0], /* 1 bands */\n [0, 0], /* 2 bands */\n [0, 0], /* 3 bands */\n [0, 0], /* 4 bands */\n [0, 1], /* 5 bands */\n [1, 1], /* 6 bands */\n [1, 1], /* 7 bands */\n [1, 2], /* 8 bands */\n [2, 2], /* 9 bands */\n [2, 3], /* 10 bands */\n [2, 3], /* 11 bands */\n [3, 4], /* 12 bands */\n [3, 4], /* 13 bands */\n [3, 4], /* 14 bands */\n [4, 5], /* 15 bands */\n [4, 5], /* 16 bands */\n [4, 6], /* 17 bands */\n [5, 6], /* 18 bands */\n [5, 6], /* 19 bands */\n [5, 7], /* 20 bands */\n [6, 7], /* 21 bands */\n [6, 7], /* 22 bands */\n ];\n\n /**\n * nonlinear quantization of xr More accurate formula than the ISO formula.\n * Takes into account the fact that we are quantizing xr . ix, but we want\n * ix^4/3 to be as close as possible to x^4/3. (taking the nearest int would\n * mean ix is as close as possible to xr, which is different.)\n *\n * From Segher Boessenkool 11/1999\n *\n * 09/2000: ASM code removed in favor of IEEE754 hack by Takehiro Tominaga.\n * If you need the ASM code, check CVS circa Aug 2000.\n *\n * 01/2004: Optimizations by Gabriel Bouvigne\n */\n function quantize_lines_xrpow_01(l, istep, xr, xrPos, ix, ixPos) {\n var compareval0 = (1.0 - 0.4054) / istep;\n\n assert(l > 0);\n l = l >> 1;\n while ((l--) != 0) {\n ix[ixPos++] = (compareval0 > xr[xrPos++]) ? 0 : 1;\n ix[ixPos++] = (compareval0 > xr[xrPos++]) ? 0 : 1;\n }\n }\n\n /**\n * XRPOW_FTOI is a macro to convert floats to ints.
\n * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
\n * ROUNDFAC= -0.0946
\n *\n * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]
\n * ROUNDFAC=0.4054
\n *\n * Note: using floor() or 0| is extremely slow. On machines where the\n * TAKEHIRO_IEEE754_HACK code above does not work, it is worthwile to write\n * some ASM for XRPOW_FTOI().\n */\n function quantize_lines_xrpow(l, istep, xr, xrPos, ix, ixPos) {\n assert(l > 0);\n\n l = l >> 1;\n var remaining = l % 2;\n l = l >> 1;\n while (l-- != 0) {\n var x0, x1, x2, x3;\n var rx0, rx1, rx2, rx3;\n\n x0 = xr[xrPos++] * istep;\n x1 = xr[xrPos++] * istep;\n rx0 = 0 | x0;\n x2 = xr[xrPos++] * istep;\n rx1 = 0 | x1;\n x3 = xr[xrPos++] * istep;\n rx2 = 0 | x2;\n x0 += qupvt.adj43[rx0];\n rx3 = 0 | x3;\n x1 += qupvt.adj43[rx1];\n ix[ixPos++] = 0 | x0;\n x2 += qupvt.adj43[rx2];\n ix[ixPos++] = 0 | x1;\n x3 += qupvt.adj43[rx3];\n ix[ixPos++] = 0 | x2;\n ix[ixPos++] = 0 | x3;\n }\n if (remaining != 0) {\n var x0, x1;\n var rx0, rx1;\n\n x0 = xr[xrPos++] * istep;\n x1 = xr[xrPos++] * istep;\n rx0 = 0 | x0;\n rx1 = 0 | x1;\n x0 += qupvt.adj43[rx0];\n x1 += qupvt.adj43[rx1];\n ix[ixPos++] = 0 | x0;\n ix[ixPos++] = 0 | x1;\n }\n }\n\n /**\n * Quantization function This function will select which lines to quantize\n * and call the proper quantization function\n */\n function quantize_xrpow(xp, pi, istep, codInfo, prevNoise) {\n /* quantize on xr^(3/4) instead of xr */\n var sfb;\n var sfbmax;\n var j = 0;\n var prev_data_use;\n var accumulate = 0;\n var accumulate01 = 0;\n var xpPos = 0;\n var iData = pi;\n var iDataPos = 0;\n var acc_iData = iData;\n var acc_iDataPos = 0;\n var acc_xp = xp;\n var acc_xpPos = 0;\n\n /*\n * Reusing previously computed data does not seems to work if global\n * gain is changed. Finding why it behaves this way would allow to use a\n * cache of previously computed values (let's 10 cached values per sfb)\n * that would probably provide a noticeable speedup\n */\n prev_data_use = (prevNoise != null && (codInfo.global_gain == prevNoise.global_gain));\n\n if (codInfo.block_type == Encoder.SHORT_TYPE)\n sfbmax = 38;\n else\n sfbmax = 21;\n\n for (sfb = 0; sfb <= sfbmax; sfb++) {\n var step = -1;\n\n if (prev_data_use || codInfo.block_type == Encoder.NORM_TYPE) {\n step = codInfo.global_gain\n - ((codInfo.scalefac[sfb] + (codInfo.preflag != 0 ? qupvt.pretab[sfb]\n : 0)) << (codInfo.scalefac_scale + 1))\n - codInfo.subblock_gain[codInfo.window[sfb]] * 8;\n }\n assert(codInfo.width[sfb] >= 0);\n if (prev_data_use && (prevNoise.step[sfb] == step)) {\n /*\n * do not recompute this part, but compute accumulated lines\n */\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n } else { /* should compute this part */\n var l = codInfo.width[sfb];\n\n if ((j + codInfo.width[sfb]) > codInfo.max_nonzero_coeff) {\n /* do not compute upper zero part */\n var usefullsize;\n usefullsize = codInfo.max_nonzero_coeff - j + 1;\n Arrays.fill(pi, codInfo.max_nonzero_coeff, 576, 0);\n l = usefullsize;\n\n if (l < 0) {\n l = 0;\n }\n\n /* no need to compute higher sfb values */\n sfb = sfbmax + 1;\n }\n\n /* accumulate lines to quantize */\n if (0 == accumulate && 0 == accumulate01) {\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n if (prevNoise != null && prevNoise.sfb_count1 > 0\n && sfb >= prevNoise.sfb_count1\n && prevNoise.step[sfb] > 0\n && step >= prevNoise.step[sfb]) {\n\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate = 0;\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n accumulate01 += l;\n } else {\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n accumulate += l;\n }\n\n if (l <= 0) {\n /*\n * rh: 20040215 may happen due to \"prev_data_use\"\n * optimization\n */\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n\n break;\n /* ends for-loop */\n }\n }\n if (sfb <= sfbmax) {\n iDataPos += codInfo.width[sfb];\n xpPos += codInfo.width[sfb];\n j += codInfo.width[sfb];\n }\n }\n if (accumulate != 0) { /* last data part */\n quantize_lines_xrpow(accumulate, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n if (accumulate01 != 0) { /* last data part */\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n\n }\n\n /**\n * ix_max\n */\n function ix_max(ix, ixPos, endPos) {\n var max1 = 0, max2 = 0;\n\n do {\n var x1 = ix[ixPos++];\n var x2 = ix[ixPos++];\n if (max1 < x1)\n max1 = x1;\n\n if (max2 < x2)\n max2 = x2;\n } while (ixPos < endPos);\n if (max1 < max2)\n max1 = max2;\n return max1;\n }\n\n function count_bit_ESC(ix, ixPos, end, t1, t2, s) {\n /* ESC-table is used */\n var linbits = Tables.ht[t1].xlen * 65536 + Tables.ht[t2].xlen;\n var sum = 0, sum2;\n\n do {\n var x = ix[ixPos++];\n var y = ix[ixPos++];\n\n if (x != 0) {\n if (x > 14) {\n x = 15;\n sum += linbits;\n }\n x *= 16;\n }\n\n if (y != 0) {\n if (y > 14) {\n y = 15;\n sum += linbits;\n }\n x += y;\n }\n\n sum += Tables.largetbl[x];\n } while (ixPos < end);\n\n sum2 = sum & 0xffff;\n sum >>= 16;\n\n if (sum > sum2) {\n sum = sum2;\n t1 = t2;\n }\n\n s.bits += sum;\n return t1;\n }\n\n function count_bit_noESC(ix, ixPos, end, s) {\n /* No ESC-words */\n var sum1 = 0;\n var hlen1 = Tables.ht[1].hlen;\n\n do {\n var x = ix[ixPos + 0] * 2 + ix[ixPos + 1];\n ixPos += 2;\n sum1 += hlen1[x];\n } while (ixPos < end);\n\n s.bits += sum1;\n return 1;\n }\n\n function count_bit_noESC_from2(ix, ixPos, end, t1, s) {\n /* No ESC-words */\n var sum = 0, sum2;\n var xlen = Tables.ht[t1].xlen;\n var hlen;\n if (t1 == 2)\n hlen = Tables.table23;\n else\n hlen = Tables.table56;\n\n do {\n var x = ix[ixPos + 0] * xlen + ix[ixPos + 1];\n ixPos += 2;\n sum += hlen[x];\n } while (ixPos < end);\n\n sum2 = sum & 0xffff;\n sum >>= 16;\n\n if (sum > sum2) {\n sum = sum2;\n t1++;\n }\n\n s.bits += sum;\n return t1;\n }\n\n function count_bit_noESC_from3(ix, ixPos, end, t1, s) {\n /* No ESC-words */\n var sum1 = 0;\n var sum2 = 0;\n var sum3 = 0;\n var xlen = Tables.ht[t1].xlen;\n var hlen1 = Tables.ht[t1].hlen;\n var hlen2 = Tables.ht[t1 + 1].hlen;\n var hlen3 = Tables.ht[t1 + 2].hlen;\n\n do {\n var x = ix[ixPos + 0] * xlen + ix[ixPos + 1];\n ixPos += 2;\n sum1 += hlen1[x];\n sum2 += hlen2[x];\n sum3 += hlen3[x];\n } while (ixPos < end);\n var t = t1;\n if (sum1 > sum2) {\n sum1 = sum2;\n t++;\n }\n if (sum1 > sum3) {\n sum1 = sum3;\n t = t1 + 2;\n }\n s.bits += sum1;\n\n return t;\n }\n\n /*************************************************************************/\n /* choose table */\n /*************************************************************************/\n\n var huf_tbl_noESC = [1, 2, 5, 7, 7, 10, 10, 13, 13,\n 13, 13, 13, 13, 13, 13];\n\n /**\n * Choose the Huffman table that will encode ix[begin..end] with the fewest\n * bits.\n *\n * Note: This code contains knowledge about the sizes and characteristics of\n * the Huffman tables as defined in the IS (Table B.7), and will not work\n * with any arbitrary tables.\n */\n function choose_table(ix, ixPos, endPos, s) {\n var max = ix_max(ix, ixPos, endPos);\n\n switch (max) {\n case 0:\n return max;\n\n case 1:\n return count_bit_noESC(ix, ixPos, endPos, s);\n\n case 2:\n case 3:\n return count_bit_noESC_from2(ix, ixPos, endPos,\n huf_tbl_noESC[max - 1], s);\n\n case 4:\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n return count_bit_noESC_from3(ix, ixPos, endPos,\n huf_tbl_noESC[max - 1], s);\n\n default:\n /* try tables with linbits */\n if (max > QuantizePVT.IXMAX_VAL) {\n s.bits = QuantizePVT.LARGE_BITS;\n return -1;\n }\n max -= 15;\n var choice2;\n for (choice2 = 24; choice2 < 32; choice2++) {\n if (Tables.ht[choice2].linmax >= max) {\n break;\n }\n }\n var choice;\n for (choice = choice2 - 8; choice < 24; choice++) {\n if (Tables.ht[choice].linmax >= max) {\n break;\n }\n }\n return count_bit_ESC(ix, ixPos, endPos, choice, choice2, s);\n }\n }\n\n /**\n * count_bit\n */\n this.noquant_count_bits = function (gfc, gi, prev_noise) {\n var ix = gi.l3_enc;\n var i = Math.min(576, ((gi.max_nonzero_coeff + 2) >> 1) << 1);\n\n if (prev_noise != null)\n prev_noise.sfb_count1 = 0;\n\n /* Determine count1 region */\n for (; i > 1; i -= 2)\n if ((ix[i - 1] | ix[i - 2]) != 0)\n break;\n gi.count1 = i;\n\n /* Determines the number of bits to encode the quadruples. */\n var a1 = 0;\n var a2 = 0;\n for (; i > 3; i -= 4) {\n var p;\n /* hack to check if all values <= 1 */\n //throw \"TODO: HACK if ((((long) ix[i - 1] | (long) ix[i - 2] | (long) ix[i - 3] | (long) ix[i - 4]) & 0xffffffffL) > 1L \"\n //if (true) {\n if (((ix[i - 1] | ix[i - 2] | ix[i - 3] | ix[i - 4]) & 0x7fffffff) > 1) {\n break;\n }\n p = ((ix[i - 4] * 2 + ix[i - 3]) * 2 + ix[i - 2]) * 2 + ix[i - 1];\n a1 += Tables.t32l[p];\n a2 += Tables.t33l[p];\n }\n var bits = a1;\n gi.count1table_select = 0;\n if (a1 > a2) {\n bits = a2;\n gi.count1table_select = 1;\n }\n\n gi.count1bits = bits;\n gi.big_values = i;\n if (i == 0)\n return bits;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n a1 = 3 * gfc.scalefac_band.s[3];\n if (a1 > gi.big_values)\n a1 = gi.big_values;\n a2 = gi.big_values;\n\n } else if (gi.block_type == Encoder.NORM_TYPE) {\n assert(i <= 576);\n /* bv_scf has 576 entries (0..575) */\n a1 = gi.region0_count = gfc.bv_scf[i - 2];\n a2 = gi.region1_count = gfc.bv_scf[i - 1];\n\n assert(a1 + a2 + 2 < Encoder.SBPSY_l);\n a2 = gfc.scalefac_band.l[a1 + a2 + 2];\n a1 = gfc.scalefac_band.l[a1 + 1];\n if (a2 < i) {\n var bi = new Bits(bits);\n gi.table_select[2] = choose_table(ix, a2, i, bi);\n bits = bi.bits;\n }\n } else {\n gi.region0_count = 7;\n /* gi.region1_count = SBPSY_l - 7 - 1; */\n gi.region1_count = Encoder.SBMAX_l - 1 - 7 - 1;\n a1 = gfc.scalefac_band.l[7 + 1];\n a2 = i;\n if (a1 > a2) {\n a1 = a2;\n }\n }\n\n /* have to allow for the case when bigvalues < region0 < region1 */\n /* (and region0, region1 are ignored) */\n a1 = Math.min(a1, i);\n a2 = Math.min(a2, i);\n\n assert(a1 >= 0);\n assert(a2 >= 0);\n\n /* Count the number of bits necessary to code the bigvalues region. */\n if (0 < a1) {\n var bi = new Bits(bits);\n gi.table_select[0] = choose_table(ix, 0, a1, bi);\n bits = bi.bits;\n }\n if (a1 < a2) {\n var bi = new Bits(bits);\n gi.table_select[1] = choose_table(ix, a1, a2, bi);\n bits = bi.bits;\n }\n if (gfc.use_best_huffman == 2) {\n gi.part2_3_length = bits;\n best_huffman_divide(gfc, gi);\n bits = gi.part2_3_length;\n }\n\n if (prev_noise != null) {\n if (gi.block_type == Encoder.NORM_TYPE) {\n var sfb = 0;\n while (gfc.scalefac_band.l[sfb] < gi.big_values) {\n sfb++;\n }\n prev_noise.sfb_count1 = sfb;\n }\n }\n\n return bits;\n }\n\n this.count_bits = function (gfc, xr, gi, prev_noise) {\n var ix = gi.l3_enc;\n\n /* since quantize_xrpow uses table lookup, we need to check this first: */\n var w = (QuantizePVT.IXMAX_VAL) / qupvt.IPOW20(gi.global_gain);\n\n if (gi.xrpow_max > w)\n return QuantizePVT.LARGE_BITS;\n\n quantize_xrpow(xr, ix, qupvt.IPOW20(gi.global_gain), gi, prev_noise);\n\n if ((gfc.substep_shaping & 2) != 0) {\n var j = 0;\n /* 0.634521682242439 = 0.5946*2**(.5*0.1875) */\n var gain = gi.global_gain + gi.scalefac_scale;\n var roundfac = 0.634521682242439 / qupvt.IPOW20(gain);\n for (var sfb = 0; sfb < gi.sfbmax; sfb++) {\n var width = gi.width[sfb];\n assert(width >= 0);\n if (0 == gfc.pseudohalf[sfb]) {\n j += width;\n } else {\n var k;\n for (k = j, j += width; k < j; ++k) {\n ix[k] = (xr[k] >= roundfac) ? ix[k] : 0;\n }\n }\n }\n }\n return this.noquant_count_bits(gfc, gi, prev_noise);\n }\n\n /**\n * re-calculate the best scalefac_compress using scfsi the saved bits are\n * kept in the bit reservoir.\n */\n function recalc_divide_init(gfc, cod_info, ix, r01_bits, r01_div, r0_tbl, r1_tbl) {\n var bigv = cod_info.big_values;\n\n for (var r0 = 0; r0 <= 7 + 15; r0++) {\n r01_bits[r0] = QuantizePVT.LARGE_BITS;\n }\n\n for (var r0 = 0; r0 < 16; r0++) {\n var a1 = gfc.scalefac_band.l[r0 + 1];\n if (a1 >= bigv)\n break;\n var r0bits = 0;\n var bi = new Bits(r0bits);\n var r0t = choose_table(ix, 0, a1, bi);\n r0bits = bi.bits;\n\n for (var r1 = 0; r1 < 8; r1++) {\n var a2 = gfc.scalefac_band.l[r0 + r1 + 2];\n if (a2 >= bigv)\n break;\n var bits = r0bits;\n bi = new Bits(bits);\n var r1t = choose_table(ix, a1, a2, bi);\n bits = bi.bits;\n if (r01_bits[r0 + r1] > bits) {\n r01_bits[r0 + r1] = bits;\n r01_div[r0 + r1] = r0;\n r0_tbl[r0 + r1] = r0t;\n r1_tbl[r0 + r1] = r1t;\n }\n }\n }\n }\n\n function recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div, r0_tbl, r1_tbl) {\n var bigv = cod_info2.big_values;\n\n for (var r2 = 2; r2 < Encoder.SBMAX_l + 1; r2++) {\n var a2 = gfc.scalefac_band.l[r2];\n if (a2 >= bigv)\n break;\n var bits = r01_bits[r2 - 2] + cod_info2.count1bits;\n if (gi.part2_3_length <= bits)\n break;\n\n var bi = new Bits(bits);\n var r2t = choose_table(ix, a2, bigv, bi);\n bits = bi.bits;\n if (gi.part2_3_length <= bits)\n continue;\n\n gi.assign(cod_info2);\n gi.part2_3_length = bits;\n gi.region0_count = r01_div[r2 - 2];\n gi.region1_count = r2 - 2 - r01_div[r2 - 2];\n gi.table_select[0] = r0_tbl[r2 - 2];\n gi.table_select[1] = r1_tbl[r2 - 2];\n gi.table_select[2] = r2t;\n }\n }\n\n this.best_huffman_divide = function (gfc, gi) {\n var cod_info2 = new GrInfo();\n var ix = gi.l3_enc;\n var r01_bits = new_int(7 + 15 + 1);\n var r01_div = new_int(7 + 15 + 1);\n var r0_tbl = new_int(7 + 15 + 1);\n var r1_tbl = new_int(7 + 15 + 1);\n\n /* SHORT BLOCK stuff fails for MPEG2 */\n if (gi.block_type == Encoder.SHORT_TYPE && gfc.mode_gr == 1)\n return;\n\n cod_info2.assign(gi);\n if (gi.block_type == Encoder.NORM_TYPE) {\n recalc_divide_init(gfc, gi, ix, r01_bits, r01_div, r0_tbl, r1_tbl);\n recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div,\n r0_tbl, r1_tbl);\n }\n var i = cod_info2.big_values;\n if (i == 0 || (ix[i - 2] | ix[i - 1]) > 1)\n return;\n\n i = gi.count1 + 2;\n if (i > 576)\n return;\n\n /* Determines the number of bits to encode the quadruples. */\n cod_info2.assign(gi);\n cod_info2.count1 = i;\n var a1 = 0;\n var a2 = 0;\n\n assert(i <= 576);\n\n for (; i > cod_info2.big_values; i -= 4) {\n var p = ((ix[i - 4] * 2 + ix[i - 3]) * 2 + ix[i - 2]) * 2\n + ix[i - 1];\n a1 += Tables.t32l[p];\n a2 += Tables.t33l[p];\n }\n cod_info2.big_values = i;\n\n cod_info2.count1table_select = 0;\n if (a1 > a2) {\n a1 = a2;\n cod_info2.count1table_select = 1;\n }\n\n cod_info2.count1bits = a1;\n\n if (cod_info2.block_type == Encoder.NORM_TYPE)\n recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div,\n r0_tbl, r1_tbl);\n else {\n /* Count the number of bits necessary to code the bigvalues region. */\n cod_info2.part2_3_length = a1;\n a1 = gfc.scalefac_band.l[7 + 1];\n if (a1 > i) {\n a1 = i;\n }\n if (a1 > 0) {\n var bi = new Bits(cod_info2.part2_3_length);\n cod_info2.table_select[0] = choose_table(ix, 0, a1, bi);\n cod_info2.part2_3_length = bi.bits;\n }\n if (i > a1) {\n var bi = new Bits(cod_info2.part2_3_length);\n cod_info2.table_select[1] = choose_table(ix, a1, i, bi);\n cod_info2.part2_3_length = bi.bits;\n }\n if (gi.part2_3_length > cod_info2.part2_3_length)\n gi.assign(cod_info2);\n }\n }\n\n var slen1_n = [1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16];\n var slen2_n = [1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8];\n var slen1_tab = [0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4];\n var slen2_tab = [0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3];\n Takehiro.slen1_tab = slen1_tab;\n Takehiro.slen2_tab = slen2_tab;\n\n function scfsi_calc(ch, l3_side) {\n var sfb;\n var gi = l3_side.tt[1][ch];\n var g0 = l3_side.tt[0][ch];\n\n for (var i = 0; i < Tables.scfsi_band.length - 1; i++) {\n for (sfb = Tables.scfsi_band[i]; sfb < Tables.scfsi_band[i + 1]; sfb++) {\n if (g0.scalefac[sfb] != gi.scalefac[sfb]\n && gi.scalefac[sfb] >= 0)\n break;\n }\n if (sfb == Tables.scfsi_band[i + 1]) {\n for (sfb = Tables.scfsi_band[i]; sfb < Tables.scfsi_band[i + 1]; sfb++) {\n gi.scalefac[sfb] = -1;\n }\n l3_side.scfsi[ch][i] = 1;\n }\n }\n var s1 = 0;\n var c1 = 0;\n for (sfb = 0; sfb < 11; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n c1++;\n if (s1 < gi.scalefac[sfb])\n s1 = gi.scalefac[sfb];\n }\n var s2 = 0;\n var c2 = 0;\n for (; sfb < Encoder.SBPSY_l; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n c2++;\n if (s2 < gi.scalefac[sfb])\n s2 = gi.scalefac[sfb];\n }\n\n for (var i = 0; i < 16; i++) {\n if (s1 < slen1_n[i] && s2 < slen2_n[i]) {\n var c = slen1_tab[i] * c1 + slen2_tab[i] * c2;\n if (gi.part2_length > c) {\n gi.part2_length = c;\n gi.scalefac_compress = i;\n }\n }\n }\n }\n\n /**\n * Find the optimal way to store the scalefactors. Only call this routine\n * after final scalefactors have been chosen and the channel/granule will\n * not be re-encoded.\n */\n this.best_scalefac_store = function (gfc, gr, ch, l3_side) {\n /* use scalefac_scale if we can */\n var gi = l3_side.tt[gr][ch];\n var sfb, i, j, l;\n var recalc = 0;\n\n /*\n * remove scalefacs from bands with ix=0. This idea comes from the AAC\n * ISO docs. added mt 3/00\n */\n /* check if l3_enc=0 */\n j = 0;\n for (sfb = 0; sfb < gi.sfbmax; sfb++) {\n var width = gi.width[sfb];\n assert(width >= 0);\n j += width;\n for (l = -width; l < 0; l++) {\n if (gi.l3_enc[l + j] != 0)\n break;\n }\n if (l == 0)\n gi.scalefac[sfb] = recalc = -2;\n /* anything goes. */\n /*\n * only best_scalefac_store and calc_scfsi know--and only they\n * should know--about the magic number -2.\n */\n }\n\n if (0 == gi.scalefac_scale && 0 == gi.preflag) {\n var s = 0;\n for (sfb = 0; sfb < gi.sfbmax; sfb++)\n if (gi.scalefac[sfb] > 0)\n s |= gi.scalefac[sfb];\n\n if (0 == (s & 1) && s != 0) {\n for (sfb = 0; sfb < gi.sfbmax; sfb++)\n if (gi.scalefac[sfb] > 0)\n gi.scalefac[sfb] >>= 1;\n\n gi.scalefac_scale = recalc = 1;\n }\n }\n\n if (0 == gi.preflag && gi.block_type != Encoder.SHORT_TYPE\n && gfc.mode_gr == 2) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (gi.scalefac[sfb] < qupvt.pretab[sfb]\n && gi.scalefac[sfb] != -2)\n break;\n if (sfb == Encoder.SBPSY_l) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (gi.scalefac[sfb] > 0)\n gi.scalefac[sfb] -= qupvt.pretab[sfb];\n\n gi.preflag = recalc = 1;\n }\n }\n\n for (i = 0; i < 4; i++)\n l3_side.scfsi[ch][i] = 0;\n\n if (gfc.mode_gr == 2 && gr == 1\n && l3_side.tt[0][ch].block_type != Encoder.SHORT_TYPE\n && l3_side.tt[1][ch].block_type != Encoder.SHORT_TYPE) {\n scfsi_calc(ch, l3_side);\n recalc = 0;\n }\n for (sfb = 0; sfb < gi.sfbmax; sfb++) {\n if (gi.scalefac[sfb] == -2) {\n gi.scalefac[sfb] = 0;\n /* if anything goes, then 0 is a good choice */\n }\n }\n if (recalc != 0) {\n if (gfc.mode_gr == 2) {\n this.scale_bitcount(gi);\n } else {\n this.scale_bitcount_lsf(gfc, gi);\n }\n }\n }\n\n function all_scalefactors_not_negative(scalefac, n) {\n for (var i = 0; i < n; ++i) {\n if (scalefac[i] < 0)\n return false;\n }\n return true;\n }\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 18*slen1_tab[i] + 18*slen2_tab[i]\n */\n var scale_short = [0, 18, 36, 54, 54, 36, 54, 72,\n 54, 72, 90, 72, 90, 108, 108, 126];\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 17*slen1_tab[i] + 18*slen2_tab[i]\n */\n var scale_mixed = [0, 18, 36, 54, 51, 35, 53, 71,\n 52, 70, 88, 69, 87, 105, 104, 122];\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 11*slen1_tab[i] + 10*slen2_tab[i]\n */\n var scale_long = [0, 10, 20, 30, 33, 21, 31, 41, 32, 42,\n 52, 43, 53, 63, 64, 74];\n\n /**\n * Also calculates the number of bits necessary to code the scalefactors.\n */\n this.scale_bitcount = function (cod_info) {\n var k, sfb, max_slen1 = 0, max_slen2 = 0;\n\n /* maximum values */\n var tab;\n var scalefac = cod_info.scalefac;\n\n assert(all_scalefactors_not_negative(scalefac, cod_info.sfbmax));\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n tab = scale_short;\n if (cod_info.mixed_block_flag != 0)\n tab = scale_mixed;\n } else { /* block_type == 1,2,or 3 */\n tab = scale_long;\n if (0 == cod_info.preflag) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (scalefac[sfb] < qupvt.pretab[sfb])\n break;\n\n if (sfb == Encoder.SBPSY_l) {\n cod_info.preflag = 1;\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n scalefac[sfb] -= qupvt.pretab[sfb];\n }\n }\n }\n\n for (sfb = 0; sfb < cod_info.sfbdivide; sfb++)\n if (max_slen1 < scalefac[sfb])\n max_slen1 = scalefac[sfb];\n\n for (; sfb < cod_info.sfbmax; sfb++)\n if (max_slen2 < scalefac[sfb])\n max_slen2 = scalefac[sfb];\n\n /*\n * from Takehiro TOMINAGA 10/99 loop over *all*\n * posible values of scalefac_compress to find the one which uses the\n * smallest number of bits. ISO would stop at first valid index\n */\n cod_info.part2_length = QuantizePVT.LARGE_BITS;\n for (k = 0; k < 16; k++) {\n if (max_slen1 < slen1_n[k] && max_slen2 < slen2_n[k]\n && cod_info.part2_length > tab[k]) {\n cod_info.part2_length = tab[k];\n cod_info.scalefac_compress = k;\n }\n }\n return cod_info.part2_length == QuantizePVT.LARGE_BITS;\n }\n\n /**\n * table of largest scalefactor values for MPEG2\n */\n var max_range_sfac_tab = [[15, 15, 7, 7],\n [15, 15, 7, 0], [7, 3, 0, 0], [15, 31, 31, 0],\n [7, 7, 7, 0], [3, 3, 0, 0]];\n\n /**\n * Also counts the number of bits to encode the scalefacs but for MPEG 2\n * Lower sampling frequencies (24, 22.05 and 16 kHz.)\n *\n * This is reverse-engineered from section 2.4.3.2 of the MPEG2 IS,\n * \"Audio Decoding Layer III\"\n */\n this.scale_bitcount_lsf = function (gfc, cod_info) {\n var table_number, row_in_table, partition, nr_sfb, window;\n var over;\n var i, sfb;\n var max_sfac = new_int(4);\n//var partition_table;\n var scalefac = cod_info.scalefac;\n\n /*\n * Set partition table. Note that should try to use table one, but do\n * not yet...\n */\n if (cod_info.preflag != 0)\n table_number = 2;\n else\n table_number = 0;\n\n for (i = 0; i < 4; i++)\n max_sfac[i] = 0;\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n row_in_table = 1;\n var partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (sfb = 0, partition = 0; partition < 4; partition++) {\n nr_sfb = partition_table[partition] / 3;\n for (i = 0; i < nr_sfb; i++, sfb++)\n for (window = 0; window < 3; window++)\n if (scalefac[sfb * 3 + window] > max_sfac[partition])\n max_sfac[partition] = scalefac[sfb * 3 + window];\n }\n } else {\n row_in_table = 0;\n var partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (sfb = 0, partition = 0; partition < 4; partition++) {\n nr_sfb = partition_table[partition];\n for (i = 0; i < nr_sfb; i++, sfb++)\n if (scalefac[sfb] > max_sfac[partition])\n max_sfac[partition] = scalefac[sfb];\n }\n }\n\n for (over = false, partition = 0; partition < 4; partition++) {\n if (max_sfac[partition] > max_range_sfac_tab[table_number][partition])\n over = true;\n }\n if (!over) {\n var slen1, slen2, slen3, slen4;\n\n cod_info.sfb_partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (partition = 0; partition < 4; partition++)\n cod_info.slen[partition] = log2tab[max_sfac[partition]];\n\n /* set scalefac_compress */\n slen1 = cod_info.slen[0];\n slen2 = cod_info.slen[1];\n slen3 = cod_info.slen[2];\n slen4 = cod_info.slen[3];\n\n switch (table_number) {\n case 0:\n cod_info.scalefac_compress = (((slen1 * 5) + slen2) << 4)\n + (slen3 << 2) + slen4;\n break;\n\n case 1:\n cod_info.scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2)\n + slen3;\n break;\n\n case 2:\n cod_info.scalefac_compress = 500 + (slen1 * 3) + slen2;\n break;\n\n default:\n System.err.printf(\"intensity stereo not implemented yet\\n\");\n break;\n }\n }\n if (!over) {\n assert(cod_info.sfb_partition_table != null);\n cod_info.part2_length = 0;\n for (partition = 0; partition < 4; partition++)\n cod_info.part2_length += cod_info.slen[partition]\n * cod_info.sfb_partition_table[partition];\n }\n return over;\n }\n\n /*\n * Since no bands have been over-amplified, we can set scalefac_compress and\n * slen[] for the formatter\n */\n var log2tab = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4,\n 4, 4, 4, 4];\n\n this.huffman_init = function (gfc) {\n for (var i = 2; i <= 576; i += 2) {\n var scfb_anz = 0, bv_index;\n while (gfc.scalefac_band.l[++scfb_anz] < i)\n ;\n\n bv_index = subdv_table[scfb_anz][0]; // .region0_count\n while (gfc.scalefac_band.l[bv_index + 1] > i)\n bv_index--;\n\n if (bv_index < 0) {\n /*\n * this is an indication that everything is going to be encoded\n * as region0: bigvalues < region0 < region1 so lets set\n * region0, region1 to some value larger than bigvalues\n */\n bv_index = subdv_table[scfb_anz][0]; // .region0_count\n }\n\n gfc.bv_scf[i - 2] = bv_index;\n\n bv_index = subdv_table[scfb_anz][1]; // .region1_count\n while (gfc.scalefac_band.l[bv_index + gfc.bv_scf[i - 2] + 2] > i)\n bv_index--;\n\n if (bv_index < 0) {\n bv_index = subdv_table[scfb_anz][1]; // .region1_count\n }\n\n gfc.bv_scf[i - 1] = bv_index;\n }\n }\n}\n\nmodule.exports = Takehiro;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Takehiro = require('./Takehiro.js');\nvar Tables = require('./Tables.js');\nvar Encoder = require('./Encoder.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nBitStream.EQ = function (a, b) {\n return (Math.abs(a) > Math.abs(b)) ? (Math.abs((a) - (b)) <= (Math\n .abs(a) * 1e-6))\n : (Math.abs((a) - (b)) <= (Math.abs(b) * 1e-6));\n};\n\nBitStream.NEQ = function (a, b) {\n return !BitStream.EQ(a, b);\n};\n\nfunction BitStream() {\n var self = this;\n var CRC16_POLYNOMIAL = 0x8005;\n\n /*\n * we work with ints, so when doing bit manipulation, we limit ourselves to\n * MAX_LENGTH-2 just to be on the safe side\n */\n var MAX_LENGTH = 32;\n\n //GainAnalysis ga;\n //MPGLib mpg;\n //Version ver;\n //VBRTag vbr;\n var ga = null;\n var mpg = null;\n var ver = null;\n var vbr = null;\n\n //public final void setModules(GainAnalysis ga, MPGLib mpg, Version ver,\n //\tVBRTag vbr) {\n\n this.setModules = function (_ga, _mpg, _ver, _vbr) {\n ga = _ga;\n mpg = _mpg;\n ver = _ver;\n vbr = _vbr;\n };\n\n /**\n * Bit stream buffer.\n */\n //private byte[] buf;\n var buf = null;\n /**\n * Bit counter of bit stream.\n */\n var totbit = 0;\n /**\n * Pointer to top byte in buffer.\n */\n var bufByteIdx = 0;\n /**\n * Pointer to top bit of top byte in buffer.\n */\n var bufBitIdx = 0;\n\n /**\n * compute bitsperframe and mean_bits for a layer III frame\n */\n this.getframebits = function (gfp) {\n var gfc = gfp.internal_flags;\n var bit_rate;\n\n /* get bitrate in kbps [?] */\n if (gfc.bitrate_index != 0)\n bit_rate = Tables.bitrate_table[gfp.version][gfc.bitrate_index];\n else\n bit_rate = gfp.brate;\n assert(8 <= bit_rate && bit_rate <= 640);\n\n /* main encoding routine toggles padding on and off */\n /* one Layer3 Slot consists of 8 bits */\n var bytes = 0 | (gfp.version + 1) * 72000 * bit_rate / gfp.out_samplerate + gfc.padding;\n return 8 * bytes;\n };\n\n function putheader_bits(gfc) {\n System.arraycopy(gfc.header[gfc.w_ptr].buf, 0, buf, bufByteIdx, gfc.sideinfo_len);\n bufByteIdx += gfc.sideinfo_len;\n totbit += gfc.sideinfo_len * 8;\n gfc.w_ptr = (gfc.w_ptr + 1) & (LameInternalFlags.MAX_HEADER_BUF - 1);\n }\n\n /**\n * write j bits into the bit stream\n */\n function putbits2(gfc, val, j) {\n assert(j < MAX_LENGTH - 2);\n\n while (j > 0) {\n var k;\n if (bufBitIdx == 0) {\n bufBitIdx = 8;\n bufByteIdx++;\n assert(bufByteIdx < Lame.LAME_MAXMP3BUFFER);\n assert(gfc.header[gfc.w_ptr].write_timing >= totbit);\n if (gfc.header[gfc.w_ptr].write_timing == totbit) {\n putheader_bits(gfc);\n }\n buf[bufByteIdx] = 0;\n }\n\n k = Math.min(j, bufBitIdx);\n j -= k;\n\n bufBitIdx -= k;\n\n assert(j < MAX_LENGTH);\n /* 32 too large on 32 bit machines */\n assert(bufBitIdx < MAX_LENGTH);\n\n buf[bufByteIdx] |= ((val >> j) << bufBitIdx);\n totbit += k;\n }\n }\n\n /**\n * write j bits into the bit stream, ignoring frame headers\n */\n function putbits_noheaders(gfc, val, j) {\n assert(j < MAX_LENGTH - 2);\n\n while (j > 0) {\n var k;\n if (bufBitIdx == 0) {\n bufBitIdx = 8;\n bufByteIdx++;\n assert(bufByteIdx < Lame.LAME_MAXMP3BUFFER);\n buf[bufByteIdx] = 0;\n }\n\n k = Math.min(j, bufBitIdx);\n j -= k;\n\n bufBitIdx -= k;\n\n assert(j < MAX_LENGTH);\n /* 32 too large on 32 bit machines */\n assert(bufBitIdx < MAX_LENGTH);\n\n buf[bufByteIdx] |= ((val >> j) << bufBitIdx);\n totbit += k;\n }\n }\n\n /**\n * Some combinations of bitrate, Fs, and stereo make it impossible to stuff\n * out a frame using just main_data, due to the limited number of bits to\n * indicate main_data_length. In these situations, we put stuffing bits into\n * the ancillary data...\n */\n function drain_into_ancillary(gfp, remainingBits) {\n var gfc = gfp.internal_flags;\n var i;\n assert(remainingBits >= 0);\n\n if (remainingBits >= 8) {\n putbits2(gfc, 0x4c, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x41, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x4d, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x45, 8);\n remainingBits -= 8;\n }\n\n if (remainingBits >= 32) {\n var version = ver.getLameShortVersion();\n if (remainingBits >= 32)\n for (i = 0; i < version.length && remainingBits >= 8; ++i) {\n remainingBits -= 8;\n putbits2(gfc, version.charAt(i), 8);\n }\n }\n\n for (; remainingBits >= 1; remainingBits -= 1) {\n putbits2(gfc, gfc.ancillary_flag, 1);\n gfc.ancillary_flag ^= (!gfp.disable_reservoir ? 1 : 0);\n }\n\n assert(remainingBits == 0);\n\n }\n\n /**\n * write N bits into the header\n */\n function writeheader(gfc, val, j) {\n var ptr = gfc.header[gfc.h_ptr].ptr;\n\n while (j > 0) {\n var k = Math.min(j, 8 - (ptr & 7));\n j -= k;\n assert(j < MAX_LENGTH);\n /* >> 32 too large for 32 bit machines */\n\n gfc.header[gfc.h_ptr].buf[ptr >> 3] |= ((val >> j)) << (8 - (ptr & 7) - k);\n ptr += k;\n }\n gfc.header[gfc.h_ptr].ptr = ptr;\n }\n\n function CRC_update(value, crc) {\n value <<= 8;\n for (var i = 0; i < 8; i++) {\n value <<= 1;\n crc <<= 1;\n\n if ((((crc ^ value) & 0x10000) != 0))\n crc ^= CRC16_POLYNOMIAL;\n }\n return crc;\n }\n\n this.CRC_writeheader = function (gfc, header) {\n var crc = 0xffff;\n /* (jo) init crc16 for error_protection */\n\n crc = CRC_update(header[2] & 0xff, crc);\n crc = CRC_update(header[3] & 0xff, crc);\n for (var i = 6; i < gfc.sideinfo_len; i++) {\n crc = CRC_update(header[i] & 0xff, crc);\n }\n\n header[4] = (byte)(crc >> 8);\n header[5] = (byte)(crc & 255);\n };\n\n function encodeSideInfo2(gfp, bitsPerFrame) {\n var gfc = gfp.internal_flags;\n var l3_side;\n var gr, ch;\n\n l3_side = gfc.l3_side;\n gfc.header[gfc.h_ptr].ptr = 0;\n Arrays.fill(gfc.header[gfc.h_ptr].buf, 0, gfc.sideinfo_len, 0);\n if (gfp.out_samplerate < 16000)\n writeheader(gfc, 0xffe, 12);\n else\n writeheader(gfc, 0xfff, 12);\n writeheader(gfc, (gfp.version), 1);\n writeheader(gfc, 4 - 3, 2);\n writeheader(gfc, (!gfp.error_protection ? 1 : 0), 1);\n writeheader(gfc, (gfc.bitrate_index), 4);\n writeheader(gfc, (gfc.samplerate_index), 2);\n writeheader(gfc, (gfc.padding), 1);\n writeheader(gfc, (gfp.extension), 1);\n writeheader(gfc, (gfp.mode.ordinal()), 2);\n writeheader(gfc, (gfc.mode_ext), 2);\n writeheader(gfc, (gfp.copyright), 1);\n writeheader(gfc, (gfp.original), 1);\n writeheader(gfc, (gfp.emphasis), 2);\n if (gfp.error_protection) {\n writeheader(gfc, 0, 16);\n /* dummy */\n }\n\n if (gfp.version == 1) {\n /* MPEG1 */\n assert(l3_side.main_data_begin >= 0);\n writeheader(gfc, (l3_side.main_data_begin), 9);\n\n if (gfc.channels_out == 2)\n writeheader(gfc, l3_side.private_bits, 3);\n else\n writeheader(gfc, l3_side.private_bits, 5);\n\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var band;\n for (band = 0; band < 4; band++) {\n writeheader(gfc, l3_side.scfsi[ch][band], 1);\n }\n }\n\n for (gr = 0; gr < 2; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n writeheader(gfc, gi.part2_3_length + gi.part2_length, 12);\n writeheader(gfc, gi.big_values / 2, 9);\n writeheader(gfc, gi.global_gain, 8);\n writeheader(gfc, gi.scalefac_compress, 4);\n\n if (gi.block_type != Encoder.NORM_TYPE) {\n writeheader(gfc, 1, 1);\n /* window_switching_flag */\n writeheader(gfc, gi.block_type, 2);\n writeheader(gfc, gi.mixed_block_flag, 1);\n\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n\n writeheader(gfc, gi.subblock_gain[0], 3);\n writeheader(gfc, gi.subblock_gain[1], 3);\n writeheader(gfc, gi.subblock_gain[2], 3);\n } else {\n writeheader(gfc, 0, 1);\n /* window_switching_flag */\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n if (gi.table_select[2] == 14)\n gi.table_select[2] = 16;\n writeheader(gfc, gi.table_select[2], 5);\n\n assert(0 <= gi.region0_count && gi.region0_count < 16);\n assert(0 <= gi.region1_count && gi.region1_count < 8);\n writeheader(gfc, gi.region0_count, 4);\n writeheader(gfc, gi.region1_count, 3);\n }\n writeheader(gfc, gi.preflag, 1);\n writeheader(gfc, gi.scalefac_scale, 1);\n writeheader(gfc, gi.count1table_select, 1);\n }\n }\n } else {\n /* MPEG2 */\n assert(l3_side.main_data_begin >= 0);\n writeheader(gfc, (l3_side.main_data_begin), 8);\n writeheader(gfc, l3_side.private_bits, gfc.channels_out);\n\n gr = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n writeheader(gfc, gi.part2_3_length + gi.part2_length, 12);\n writeheader(gfc, gi.big_values / 2, 9);\n writeheader(gfc, gi.global_gain, 8);\n writeheader(gfc, gi.scalefac_compress, 9);\n\n if (gi.block_type != Encoder.NORM_TYPE) {\n writeheader(gfc, 1, 1);\n /* window_switching_flag */\n writeheader(gfc, gi.block_type, 2);\n writeheader(gfc, gi.mixed_block_flag, 1);\n\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n\n writeheader(gfc, gi.subblock_gain[0], 3);\n writeheader(gfc, gi.subblock_gain[1], 3);\n writeheader(gfc, gi.subblock_gain[2], 3);\n } else {\n writeheader(gfc, 0, 1);\n /* window_switching_flag */\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n if (gi.table_select[2] == 14)\n gi.table_select[2] = 16;\n writeheader(gfc, gi.table_select[2], 5);\n\n assert(0 <= gi.region0_count && gi.region0_count < 16);\n assert(0 <= gi.region1_count && gi.region1_count < 8);\n writeheader(gfc, gi.region0_count, 4);\n writeheader(gfc, gi.region1_count, 3);\n }\n\n writeheader(gfc, gi.scalefac_scale, 1);\n writeheader(gfc, gi.count1table_select, 1);\n }\n }\n\n if (gfp.error_protection) {\n /* (jo) error_protection: add crc16 information to header */\n CRC_writeheader(gfc, gfc.header[gfc.h_ptr].buf);\n }\n\n {\n var old = gfc.h_ptr;\n assert(gfc.header[old].ptr == gfc.sideinfo_len * 8);\n\n gfc.h_ptr = (old + 1) & (LameInternalFlags.MAX_HEADER_BUF - 1);\n gfc.header[gfc.h_ptr].write_timing = gfc.header[old].write_timing\n + bitsPerFrame;\n\n if (gfc.h_ptr == gfc.w_ptr) {\n /* yikes! we are out of header buffer space */\n System.err\n .println(\"Error: MAX_HEADER_BUF too small in bitstream.c \\n\");\n }\n\n }\n }\n\n function huffman_coder_count1(gfc, gi) {\n /* Write count1 area */\n var h = Tables.ht[gi.count1table_select + 32];\n var i, bits = 0;\n\n var ix = gi.big_values;\n var xr = gi.big_values;\n assert(gi.count1table_select < 2);\n\n for (i = (gi.count1 - gi.big_values) / 4; i > 0; --i) {\n var huffbits = 0;\n var p = 0, v;\n\n v = gi.l3_enc[ix + 0];\n if (v != 0) {\n p += 8;\n if (gi.xr[xr + 0] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 1];\n if (v != 0) {\n p += 4;\n huffbits *= 2;\n if (gi.xr[xr + 1] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 2];\n if (v != 0) {\n p += 2;\n huffbits *= 2;\n if (gi.xr[xr + 2] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 3];\n if (v != 0) {\n p++;\n huffbits *= 2;\n if (gi.xr[xr + 3] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n ix += 4;\n xr += 4;\n putbits2(gfc, huffbits + h.table[p], h.hlen[p]);\n bits += h.hlen[p];\n }\n return bits;\n }\n\n /**\n * Implements the pseudocode of page 98 of the IS\n */\n function Huffmancode(gfc, tableindex, start, end, gi) {\n var h = Tables.ht[tableindex];\n var bits = 0;\n\n assert(tableindex < 32);\n if (0 == tableindex)\n return bits;\n\n for (var i = start; i < end; i += 2) {\n var cbits = 0;\n var xbits = 0;\n var linbits = h.xlen;\n var xlen = h.xlen;\n var ext = 0;\n var x1 = gi.l3_enc[i];\n var x2 = gi.l3_enc[i + 1];\n\n if (x1 != 0) {\n if (gi.xr[i] < 0)\n ext++;\n cbits--;\n }\n\n if (tableindex > 15) {\n /* use ESC-words */\n if (x1 > 14) {\n var linbits_x1 = x1 - 15;\n assert(linbits_x1 <= h.linmax);\n ext |= linbits_x1 << 1;\n xbits = linbits;\n x1 = 15;\n }\n\n if (x2 > 14) {\n var linbits_x2 = x2 - 15;\n assert(linbits_x2 <= h.linmax);\n ext <<= linbits;\n ext |= linbits_x2;\n xbits += linbits;\n x2 = 15;\n }\n xlen = 16;\n }\n\n if (x2 != 0) {\n ext <<= 1;\n if (gi.xr[i + 1] < 0)\n ext++;\n cbits--;\n }\n\n assert((x1 | x2) < 16);\n\n x1 = x1 * xlen + x2;\n xbits -= cbits;\n cbits += h.hlen[x1];\n\n assert(cbits <= MAX_LENGTH);\n assert(xbits <= MAX_LENGTH);\n\n putbits2(gfc, h.table[x1], cbits);\n putbits2(gfc, ext, xbits);\n bits += cbits + xbits;\n }\n return bits;\n }\n\n /**\n * Note the discussion of huffmancodebits() on pages 28 and 29 of the IS, as\n * well as the definitions of the side information on pages 26 and 27.\n */\n function ShortHuffmancodebits(gfc, gi) {\n var region1Start = 3 * gfc.scalefac_band.s[3];\n if (region1Start > gi.big_values)\n region1Start = gi.big_values;\n\n /* short blocks do not have a region2 */\n var bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);\n bits += Huffmancode(gfc, gi.table_select[1], region1Start,\n gi.big_values, gi);\n return bits;\n }\n\n function LongHuffmancodebits(gfc, gi) {\n var bigvalues, bits;\n var region1Start, region2Start;\n\n bigvalues = gi.big_values;\n assert(0 <= bigvalues && bigvalues <= 576);\n\n var i = gi.region0_count + 1;\n assert(0 <= i);\n assert(i < gfc.scalefac_band.l.length);\n region1Start = gfc.scalefac_band.l[i];\n i += gi.region1_count + 1;\n assert(0 <= i);\n assert(i < gfc.scalefac_band.l.length);\n region2Start = gfc.scalefac_band.l[i];\n\n if (region1Start > bigvalues)\n region1Start = bigvalues;\n\n if (region2Start > bigvalues)\n region2Start = bigvalues;\n\n bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);\n bits += Huffmancode(gfc, gi.table_select[1], region1Start,\n region2Start, gi);\n bits += Huffmancode(gfc, gi.table_select[2], region2Start, bigvalues,\n gi);\n return bits;\n }\n\n function writeMainData(gfp) {\n var gr, ch, sfb, data_bits, tot_bits = 0;\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n\n if (gfp.version == 1) {\n /* MPEG 1 */\n for (gr = 0; gr < 2; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n var slen1 = Takehiro.slen1_tab[gi.scalefac_compress];\n var slen2 = Takehiro.slen2_tab[gi.scalefac_compress];\n data_bits = 0;\n for (sfb = 0; sfb < gi.sfbdivide; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n /* scfsi is used */\n putbits2(gfc, gi.scalefac[sfb], slen1);\n data_bits += slen1;\n }\n for (; sfb < gi.sfbmax; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n /* scfsi is used */\n putbits2(gfc, gi.scalefac[sfb], slen2);\n data_bits += slen2;\n }\n assert(data_bits == gi.part2_length);\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n data_bits += ShortHuffmancodebits(gfc, gi);\n } else {\n data_bits += LongHuffmancodebits(gfc, gi);\n }\n data_bits += huffman_coder_count1(gfc, gi);\n /* does bitcount in quantize.c agree with actual bit count? */\n assert(data_bits == gi.part2_3_length + gi.part2_length);\n tot_bits += data_bits;\n }\n /* for ch */\n }\n /* for gr */\n } else {\n /* MPEG 2 */\n gr = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n var i, sfb_partition, scale_bits = 0;\n assert(gi.sfb_partition_table != null);\n data_bits = 0;\n sfb = 0;\n sfb_partition = 0;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n for (; sfb_partition < 4; sfb_partition++) {\n var sfbs = gi.sfb_partition_table[sfb_partition] / 3;\n var slen = gi.slen[sfb_partition];\n for (i = 0; i < sfbs; i++, sfb++) {\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 0], 0), slen);\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 1], 0), slen);\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 2], 0), slen);\n scale_bits += 3 * slen;\n }\n }\n data_bits += ShortHuffmancodebits(gfc, gi);\n } else {\n for (; sfb_partition < 4; sfb_partition++) {\n var sfbs = gi.sfb_partition_table[sfb_partition];\n var slen = gi.slen[sfb_partition];\n for (i = 0; i < sfbs; i++, sfb++) {\n putbits2(gfc, Math.max(gi.scalefac[sfb], 0), slen);\n scale_bits += slen;\n }\n }\n data_bits += LongHuffmancodebits(gfc, gi);\n }\n data_bits += huffman_coder_count1(gfc, gi);\n /* does bitcount in quantize.c agree with actual bit count? */\n assert(data_bits == gi.part2_3_length);\n assert(scale_bits == gi.part2_length);\n tot_bits += scale_bits + data_bits;\n }\n /* for ch */\n }\n /* for gf */\n return tot_bits;\n }\n\n /* main_data */\n\n function TotalBytes() {\n this.total = 0;\n }\n\n /*\n * compute the number of bits required to flush all mp3 frames currently in\n * the buffer. This should be the same as the reservoir size. Only call this\n * routine between frames - i.e. only after all headers and data have been\n * added to the buffer by format_bitstream().\n *\n * Also compute total_bits_output = size of mp3 buffer (including frame\n * headers which may not have yet been send to the mp3 buffer) + number of\n * bits needed to flush all mp3 frames.\n *\n * total_bytes_output is the size of the mp3 output buffer if\n * lame_encode_flush_nogap() was called right now.\n */\n function compute_flushbits(gfp, total_bytes_output) {\n var gfc = gfp.internal_flags;\n var flushbits, remaining_headers;\n var bitsPerFrame;\n var last_ptr, first_ptr;\n first_ptr = gfc.w_ptr;\n /* first header to add to bitstream */\n last_ptr = gfc.h_ptr - 1;\n /* last header to add to bitstream */\n if (last_ptr == -1)\n last_ptr = LameInternalFlags.MAX_HEADER_BUF - 1;\n\n /* add this many bits to bitstream so we can flush all headers */\n flushbits = gfc.header[last_ptr].write_timing - totbit;\n total_bytes_output.total = flushbits;\n\n if (flushbits >= 0) {\n /* if flushbits >= 0, some headers have not yet been written */\n /* reduce flushbits by the size of the headers */\n remaining_headers = 1 + last_ptr - first_ptr;\n if (last_ptr < first_ptr)\n remaining_headers = 1 + last_ptr - first_ptr\n + LameInternalFlags.MAX_HEADER_BUF;\n flushbits -= remaining_headers * 8 * gfc.sideinfo_len;\n }\n\n /*\n * finally, add some bits so that the last frame is complete these bits\n * are not necessary to decode the last frame, but some decoders will\n * ignore last frame if these bits are missing\n */\n bitsPerFrame = self.getframebits(gfp);\n flushbits += bitsPerFrame;\n total_bytes_output.total += bitsPerFrame;\n /* round up: */\n if ((total_bytes_output.total % 8) != 0)\n total_bytes_output.total = 1 + (total_bytes_output.total / 8);\n else\n total_bytes_output.total = (total_bytes_output.total / 8);\n total_bytes_output.total += bufByteIdx + 1;\n\n if (flushbits < 0) {\n System.err.println(\"strange error flushing buffer ... \\n\");\n }\n return flushbits;\n }\n\n this.flush_bitstream = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side;\n var flushbits;\n var last_ptr = gfc.h_ptr - 1;\n /* last header to add to bitstream */\n if (last_ptr == -1)\n last_ptr = LameInternalFlags.MAX_HEADER_BUF - 1;\n l3_side = gfc.l3_side;\n\n if ((flushbits = compute_flushbits(gfp, new TotalBytes())) < 0)\n return;\n drain_into_ancillary(gfp, flushbits);\n\n /* check that the 100% of the last frame has been written to bitstream */\n assert(gfc.header[last_ptr].write_timing + this.getframebits(gfp) == totbit);\n\n /*\n * we have padded out all frames with ancillary data, which is the same\n * as filling the bitreservoir with ancillary data, so :\n */\n gfc.ResvSize = 0;\n l3_side.main_data_begin = 0;\n\n /* save the ReplayGain value */\n if (gfc.findReplayGain) {\n var RadioGain = ga.GetTitleGain(gfc.rgdata);\n assert(NEQ(RadioGain, GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES));\n gfc.RadioGain = Math.floor(RadioGain * 10.0 + 0.5) | 0;\n /* round to nearest */\n }\n\n /* find the gain and scale change required for no clipping */\n if (gfc.findPeakSample) {\n gfc.noclipGainChange = Math.ceil(Math\n .log10(gfc.PeakSample / 32767.0) * 20.0 * 10.0) | 0;\n /* round up */\n\n if (gfc.noclipGainChange > 0) {\n /* clipping occurs */\n if (EQ(gfp.scale, 1.0) || EQ(gfp.scale, 0.0))\n gfc.noclipScale = (Math\n .floor((32767.0 / gfc.PeakSample) * 100.0) / 100.0);\n /* round down */\n else {\n /*\n * the user specified his own scaling factor. We could\n * suggest the scaling factor of\n * (32767.0/gfp.PeakSample)*(gfp.scale) but it's usually\n * very inaccurate. So we'd rather not advice him on the\n * scaling factor.\n */\n gfc.noclipScale = -1;\n }\n } else\n /* no clipping */\n gfc.noclipScale = -1;\n }\n };\n\n this.add_dummy_byte = function (gfp, val, n) {\n var gfc = gfp.internal_flags;\n var i;\n\n while (n-- > 0) {\n putbits_noheaders(gfc, val, 8);\n\n for (i = 0; i < LameInternalFlags.MAX_HEADER_BUF; ++i)\n gfc.header[i].write_timing += 8;\n }\n };\n\n /**\n * This is called after a frame of audio has been quantized and coded. It\n * will write the encoded audio to the bitstream. Note that from a layer3\n * encoder's perspective the bit stream is primarily a series of main_data()\n * blocks, with header and side information inserted at the proper locations\n * to maintain framing. (See Figure A.7 in the IS).\n */\n this.format_bitstream = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side;\n l3_side = gfc.l3_side;\n\n var bitsPerFrame = this.getframebits(gfp);\n drain_into_ancillary(gfp, l3_side.resvDrain_pre);\n\n encodeSideInfo2(gfp, bitsPerFrame);\n var bits = 8 * gfc.sideinfo_len;\n bits += writeMainData(gfp);\n drain_into_ancillary(gfp, l3_side.resvDrain_post);\n bits += l3_side.resvDrain_post;\n\n l3_side.main_data_begin += (bitsPerFrame - bits) / 8;\n\n /*\n * compare number of bits needed to clear all buffered mp3 frames with\n * what we think the resvsize is:\n */\n if (compute_flushbits(gfp, new TotalBytes()) != gfc.ResvSize) {\n System.err.println(\"Internal buffer inconsistency. flushbits <> ResvSize\");\n }\n\n /*\n * compare main_data_begin for the next frame with what we think the\n * resvsize is:\n */\n if ((l3_side.main_data_begin * 8) != gfc.ResvSize) {\n System.err.printf(\"bit reservoir error: \\n\"\n + \"l3_side.main_data_begin: %d \\n\"\n + \"Resvoir size: %d \\n\"\n + \"resv drain (post) %d \\n\"\n + \"resv drain (pre) %d \\n\"\n + \"header and sideinfo: %d \\n\"\n + \"data bits: %d \\n\"\n + \"total bits: %d (remainder: %d) \\n\"\n + \"bitsperframe: %d \\n\",\n 8 * l3_side.main_data_begin, gfc.ResvSize,\n l3_side.resvDrain_post, l3_side.resvDrain_pre,\n 8 * gfc.sideinfo_len, bits - l3_side.resvDrain_post - 8\n * gfc.sideinfo_len, bits, bits % 8, bitsPerFrame);\n\n System.err.println(\"This is a fatal error. It has several possible causes:\");\n System.err.println(\"90%% LAME compiled with buggy version of gcc using advanced optimizations\");\n System.err.println(\" 9%% Your system is overclocked\");\n System.err.println(\" 1%% bug in LAME encoding library\");\n\n gfc.ResvSize = l3_side.main_data_begin * 8;\n }\n //;\n assert(totbit % 8 == 0);\n\n if (totbit > 1000000000) {\n /*\n * to avoid totbit overflow, (at 8h encoding at 128kbs) lets reset\n * bit counter\n */\n var i;\n for (i = 0; i < LameInternalFlags.MAX_HEADER_BUF; ++i)\n gfc.header[i].write_timing -= totbit;\n totbit = 0;\n }\n\n return 0;\n };\n\n /**\n *
\n     * copy data out of the internal MP3 bit buffer into a user supplied\n     *       unsigned char buffer.\n     *\n     *       mp3data=0      indicates data in buffer is an id3tags and VBR tags\n     *       mp3data=1      data is real mp3 frame data.\n     * 
\n */\n this.copy_buffer = function (gfc, buffer, bufferPos, size, mp3data) {\n var minimum = bufByteIdx + 1;\n if (minimum <= 0)\n return 0;\n if (size != 0 && minimum > size) {\n /* buffer is too small */\n return -1;\n }\n System.arraycopy(buf, 0, buffer, bufferPos, minimum);\n bufByteIdx = -1;\n bufBitIdx = 0;\n\n if (mp3data != 0) {\n var crc = new_int(1);\n crc[0] = gfc.nMusicCRC;\n vbr.updateMusicCRC(crc, buffer, bufferPos, minimum);\n gfc.nMusicCRC = crc[0];\n\n /**\n * sum number of bytes belonging to the mp3 stream this info will be\n * written into the Xing/LAME header for seeking\n */\n if (minimum > 0) {\n gfc.VBR_seek_table.nBytesWritten += minimum;\n }\n\n if (gfc.decode_on_the_fly) { /* decode the frame */\n var pcm_buf = new_float_n([2, 1152]);\n var mp3_in = minimum;\n var samples_out = -1;\n var i;\n\n /* re-synthesis to pcm. Repeat until we get a samples_out=0 */\n while (samples_out != 0) {\n\n samples_out = mpg.hip_decode1_unclipped(gfc.hip, buffer,\n bufferPos, mp3_in, pcm_buf[0], pcm_buf[1]);\n /*\n * samples_out = 0: need more data to decode samples_out =\n * -1: error. Lets assume 0 pcm output samples_out = number\n * of samples output\n */\n\n /*\n * set the lenght of the mp3 input buffer to zero, so that\n * in the next iteration of the loop we will be querying\n * mpglib about buffered data\n */\n mp3_in = 0;\n\n if (samples_out == -1) {\n /*\n * error decoding. Not fatal, but might screw up the\n * ReplayGain tag. What should we do? Ignore for now\n */\n samples_out = 0;\n }\n if (samples_out > 0) {\n /* process the PCM data */\n\n /*\n * this should not be possible, and indicates we have\n * overflown the pcm_buf buffer\n */\n assert(samples_out <= 1152);\n\n if (gfc.findPeakSample) {\n for (i = 0; i < samples_out; i++) {\n if (pcm_buf[0][i] > gfc.PeakSample)\n gfc.PeakSample = pcm_buf[0][i];\n else if (-pcm_buf[0][i] > gfc.PeakSample)\n gfc.PeakSample = -pcm_buf[0][i];\n }\n if (gfc.channels_out > 1)\n for (i = 0; i < samples_out; i++) {\n if (pcm_buf[1][i] > gfc.PeakSample)\n gfc.PeakSample = pcm_buf[1][i];\n else if (-pcm_buf[1][i] > gfc.PeakSample)\n gfc.PeakSample = -pcm_buf[1][i];\n }\n }\n\n if (gfc.findReplayGain)\n if (ga.AnalyzeSamples(gfc.rgdata, pcm_buf[0], 0,\n pcm_buf[1], 0, samples_out,\n gfc.channels_out) == GainAnalysis.GAIN_ANALYSIS_ERROR)\n return -6;\n\n }\n /* if (samples_out>0) */\n }\n /* while (samples_out!=0) */\n }\n /* if (gfc.decode_on_the_fly) */\n\n }\n /* if (mp3data) */\n return minimum;\n };\n\n this.init_bit_stream_w = function (gfc) {\n buf = new_byte(Lame.LAME_MAXMP3BUFFER);\n\n gfc.h_ptr = gfc.w_ptr = 0;\n gfc.header[gfc.h_ptr].write_timing = 0;\n bufByteIdx = -1;\n bufBitIdx = 0;\n totbit = 0;\n };\n\n // From machine.h\n\n\n}\n\nmodule.exports = BitStream;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar new_short_n = common.new_short_n;\nvar assert = common.assert;\n\nvar PsyModel = require('./PsyModel.js');\nvar LameGlobalFlags = require('./LameGlobalFlags.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\nvar ATH = require('./ATH.js');\nvar ReplayGain = require('./ReplayGain.js');\nvar CBRNewIterationLoop = require('./CBRNewIterationLoop.js');\nvar BitStream = require('./BitStream.js');\nvar Tables = require('./Tables.js');\nvar Encoder = require('./Encoder.js');\n\nfunction Lame() {\n var self = this;\n var LAME_MAXALBUMART = (128 * 1024);\n\n Lame.V9 = 410;\n Lame.V8 = 420;\n Lame.V7 = 430;\n Lame.V6 = 440;\n Lame.V5 = 450;\n Lame.V4 = 460;\n Lame.V3 = 470;\n Lame.V2 = 480;\n Lame.V1 = 490;\n Lame.V0 = 500;\n\n /* still there for compatibility */\n\n Lame.R3MIX = 1000;\n Lame.STANDARD = 1001;\n Lame.EXTREME = 1002;\n Lame.INSANE = 1003;\n Lame.STANDARD_FAST = 1004;\n Lame.EXTREME_FAST = 1005;\n Lame.MEDIUM = 1006;\n Lame.MEDIUM_FAST = 1007;\n\n /**\n * maximum size of mp3buffer needed if you encode at most 1152 samples for\n * each call to lame_encode_buffer. see lame_encode_buffer() below\n * (LAME_MAXMP3BUFFER is now obsolete)\n */\n var LAME_MAXMP3BUFFER = (16384 + LAME_MAXALBUMART);\n Lame.LAME_MAXMP3BUFFER = LAME_MAXMP3BUFFER;\n\n var ga;\n var bs;\n var p;\n var qupvt;\n var qu;\n var psy = new PsyModel();\n var vbr;\n var ver;\n var id3;\n var mpglib;\n this.enc = new Encoder();\n\n this.setModules = function (_ga, _bs, _p, _qupvt, _qu, _vbr, _ver, _id3, _mpglib) {\n ga = _ga;\n bs = _bs;\n p = _p;\n qupvt = _qupvt;\n qu = _qu;\n vbr = _vbr;\n ver = _ver;\n id3 = _id3;\n mpglib = _mpglib;\n this.enc.setModules(bs, psy, qupvt, vbr);\n }\n\n /**\n * PSY Model related stuff\n */\n function PSY() {\n /**\n * The dbQ stuff.\n */\n this.mask_adjust = 0.;\n /**\n * The dbQ stuff.\n */\n this.mask_adjust_short = 0.;\n /* at transition from one scalefactor band to next */\n /**\n * Band weight long scalefactor bands.\n */\n this.bo_l_weight = new_float(Encoder.SBMAX_l);\n /**\n * Band weight short scalefactor bands.\n */\n this.bo_s_weight = new_float(Encoder.SBMAX_s);\n }\n\n function LowPassHighPass() {\n this.lowerlimit = 0.;\n }\n\n function BandPass(bitrate, lPass) {\n this.lowpass = lPass;\n }\n\n var LAME_ID = 0xFFF88E3B;\n\n function lame_init_old(gfp) {\n var gfc;\n\n gfp.class_id = LAME_ID;\n\n gfc = gfp.internal_flags = new LameInternalFlags();\n\n /* Global flags. set defaults here for non-zero values */\n /* see lame.h for description */\n /*\n * set integer values to -1 to mean that LAME will compute the best\n * value, UNLESS the calling program as set it (and the value is no\n * longer -1)\n */\n\n gfp.mode = MPEGMode.NOT_SET;\n gfp.original = 1;\n gfp.in_samplerate = 44100;\n gfp.num_channels = 2;\n gfp.num_samples = -1;\n\n gfp.bWriteVbrTag = true;\n gfp.quality = -1;\n gfp.short_blocks = null;\n gfc.subblock_gain = -1;\n\n gfp.lowpassfreq = 0;\n gfp.highpassfreq = 0;\n gfp.lowpasswidth = -1;\n gfp.highpasswidth = -1;\n\n gfp.VBR = VbrMode.vbr_off;\n gfp.VBR_q = 4;\n gfp.ATHcurve = -1;\n gfp.VBR_mean_bitrate_kbps = 128;\n gfp.VBR_min_bitrate_kbps = 0;\n gfp.VBR_max_bitrate_kbps = 0;\n gfp.VBR_hard_min = 0;\n gfc.VBR_min_bitrate = 1;\n /* not 0 ????? */\n gfc.VBR_max_bitrate = 13;\n /* not 14 ????? */\n\n gfp.quant_comp = -1;\n gfp.quant_comp_short = -1;\n\n gfp.msfix = -1;\n\n gfc.resample_ratio = 1;\n\n gfc.OldValue[0] = 180;\n gfc.OldValue[1] = 180;\n gfc.CurrentStep[0] = 4;\n gfc.CurrentStep[1] = 4;\n gfc.masking_lower = 1;\n gfc.nsPsy.attackthre = -1;\n gfc.nsPsy.attackthre_s = -1;\n\n gfp.scale = -1;\n\n gfp.athaa_type = -1;\n gfp.ATHtype = -1;\n /* default = -1 = set in lame_init_params */\n gfp.athaa_loudapprox = -1;\n /* 1 = flat loudness approx. (total energy) */\n /* 2 = equal loudness curve */\n gfp.athaa_sensitivity = 0.0;\n /* no offset */\n gfp.useTemporal = null;\n gfp.interChRatio = -1;\n\n /*\n * The reason for int mf_samples_to_encode = ENCDELAY + POSTDELAY;\n * ENCDELAY = internal encoder delay. And then we have to add\n * POSTDELAY=288 because of the 50% MDCT overlap. A 576 MDCT granule\n * decodes to 1152 samples. To synthesize the 576 samples centered under\n * this granule we need the previous granule for the first 288 samples\n * (no problem), and the next granule for the next 288 samples (not\n * possible if this is last granule). So we need to pad with 288 samples\n * to make sure we can encode the 576 samples we are interested in.\n */\n gfc.mf_samples_to_encode = Encoder.ENCDELAY + Encoder.POSTDELAY;\n gfp.encoder_padding = 0;\n gfc.mf_size = Encoder.ENCDELAY - Encoder.MDCTDELAY;\n /*\n * we pad input with this many 0's\n */\n\n gfp.findReplayGain = false;\n gfp.decode_on_the_fly = false;\n\n gfc.decode_on_the_fly = false;\n gfc.findReplayGain = false;\n gfc.findPeakSample = false;\n\n gfc.RadioGain = 0;\n gfc.AudiophileGain = 0;\n gfc.noclipGainChange = 0;\n gfc.noclipScale = -1.0;\n\n gfp.preset = 0;\n\n gfp.write_id3tag_automatic = true;\n return 0;\n }\n\n this.lame_init = function () {\n var gfp = new LameGlobalFlags();\n\n var ret = lame_init_old(gfp);\n if (ret != 0) {\n return null;\n }\n\n gfp.lame_allocated_gfp = 1;\n return gfp;\n }\n\n function filter_coef(x) {\n if (x > 1.0)\n return 0.0;\n if (x <= 0.0)\n return 1.0;\n\n return Math.cos(Math.PI / 2 * x);\n }\n\n this.nearestBitrateFullIndex = function (bitrate) {\n /* borrowed from DM abr presets */\n\n var full_bitrate_table = [8, 16, 24, 32, 40, 48, 56, 64, 80,\n 96, 112, 128, 160, 192, 224, 256, 320];\n\n var lower_range = 0, lower_range_kbps = 0, upper_range = 0, upper_range_kbps = 0;\n\n /* We assume specified bitrate will be 320kbps */\n upper_range_kbps = full_bitrate_table[16];\n upper_range = 16;\n lower_range_kbps = full_bitrate_table[16];\n lower_range = 16;\n\n /*\n * Determine which significant bitrates the value specified falls\n * between, if loop ends without breaking then we were correct above\n * that the value was 320\n */\n for (var b = 0; b < 16; b++) {\n if ((Math.max(bitrate, full_bitrate_table[b + 1])) != bitrate) {\n upper_range_kbps = full_bitrate_table[b + 1];\n upper_range = b + 1;\n lower_range_kbps = full_bitrate_table[b];\n lower_range = (b);\n break;\n /* We found upper range */\n }\n }\n\n /* Determine which range the value specified is closer to */\n if ((upper_range_kbps - bitrate) > (bitrate - lower_range_kbps)) {\n return lower_range;\n }\n return upper_range;\n }\n\n function optimum_samplefreq(lowpassfreq, input_samplefreq) {\n /*\n * Rules:\n *\n * - if possible, sfb21 should NOT be used\n */\n var suggested_samplefreq = 44100;\n\n if (input_samplefreq >= 48000)\n suggested_samplefreq = 48000;\n else if (input_samplefreq >= 44100)\n suggested_samplefreq = 44100;\n else if (input_samplefreq >= 32000)\n suggested_samplefreq = 32000;\n else if (input_samplefreq >= 24000)\n suggested_samplefreq = 24000;\n else if (input_samplefreq >= 22050)\n suggested_samplefreq = 22050;\n else if (input_samplefreq >= 16000)\n suggested_samplefreq = 16000;\n else if (input_samplefreq >= 12000)\n suggested_samplefreq = 12000;\n else if (input_samplefreq >= 11025)\n suggested_samplefreq = 11025;\n else if (input_samplefreq >= 8000)\n suggested_samplefreq = 8000;\n\n if (lowpassfreq == -1)\n return suggested_samplefreq;\n\n if (lowpassfreq <= 15960)\n suggested_samplefreq = 44100;\n if (lowpassfreq <= 15250)\n suggested_samplefreq = 32000;\n if (lowpassfreq <= 11220)\n suggested_samplefreq = 24000;\n if (lowpassfreq <= 9970)\n suggested_samplefreq = 22050;\n if (lowpassfreq <= 7230)\n suggested_samplefreq = 16000;\n if (lowpassfreq <= 5420)\n suggested_samplefreq = 12000;\n if (lowpassfreq <= 4510)\n suggested_samplefreq = 11025;\n if (lowpassfreq <= 3970)\n suggested_samplefreq = 8000;\n\n if (input_samplefreq < suggested_samplefreq) {\n /*\n * choose a valid MPEG sample frequency above the input sample\n * frequency to avoid SFB21/12 bitrate bloat rh 061115\n */\n if (input_samplefreq > 44100) {\n return 48000;\n }\n if (input_samplefreq > 32000) {\n return 44100;\n }\n if (input_samplefreq > 24000) {\n return 32000;\n }\n if (input_samplefreq > 22050) {\n return 24000;\n }\n if (input_samplefreq > 16000) {\n return 22050;\n }\n if (input_samplefreq > 12000) {\n return 16000;\n }\n if (input_samplefreq > 11025) {\n return 12000;\n }\n if (input_samplefreq > 8000) {\n return 11025;\n }\n return 8000;\n }\n return suggested_samplefreq;\n }\n\n /**\n * convert samp freq in Hz to index\n */\n function SmpFrqIndex(sample_freq, gpf) {\n switch (sample_freq) {\n case 44100:\n gpf.version = 1;\n return 0;\n case 48000:\n gpf.version = 1;\n return 1;\n case 32000:\n gpf.version = 1;\n return 2;\n case 22050:\n gpf.version = 0;\n return 0;\n case 24000:\n gpf.version = 0;\n return 1;\n case 16000:\n gpf.version = 0;\n return 2;\n case 11025:\n gpf.version = 0;\n return 0;\n case 12000:\n gpf.version = 0;\n return 1;\n case 8000:\n gpf.version = 0;\n return 2;\n default:\n gpf.version = 0;\n return -1;\n }\n }\n\n /**\n * @param bRate\n * legal rates from 8 to 320\n */\n function FindNearestBitrate(bRate, version, samplerate) {\n /* MPEG-1 or MPEG-2 LSF */\n if (samplerate < 16000)\n version = 2;\n\n var bitrate = Tables.bitrate_table[version][1];\n\n for (var i = 2; i <= 14; i++) {\n if (Tables.bitrate_table[version][i] > 0) {\n if (Math.abs(Tables.bitrate_table[version][i] - bRate) < Math\n .abs(bitrate - bRate))\n bitrate = Tables.bitrate_table[version][i];\n }\n }\n return bitrate;\n }\n\n /**\n * @param bRate\n * legal rates from 32 to 448 kbps\n * @param version\n * MPEG-1 or MPEG-2/2.5 LSF\n */\n function BitrateIndex(bRate, version, samplerate) {\n /* convert bitrate in kbps to index */\n if (samplerate < 16000)\n version = 2;\n for (var i = 0; i <= 14; i++) {\n if (Tables.bitrate_table[version][i] > 0) {\n if (Tables.bitrate_table[version][i] == bRate) {\n return i;\n }\n }\n }\n return -1;\n }\n\n function optimum_bandwidth(lh, bitrate) {\n /**\n *
\n         *  Input:\n         *      bitrate     total bitrate in kbps\n         *\n         *   Output:\n         *      lowerlimit: best lowpass frequency limit for input filter in Hz\n         *      upperlimit: best highpass frequency limit for input filter in Hz\n         * 
\n */\n var freq_map = [new BandPass(8, 2000),\n new BandPass(16, 3700), new BandPass(24, 3900),\n new BandPass(32, 5500), new BandPass(40, 7000),\n new BandPass(48, 7500), new BandPass(56, 10000),\n new BandPass(64, 11000), new BandPass(80, 13500),\n new BandPass(96, 15100), new BandPass(112, 15600),\n new BandPass(128, 17000), new BandPass(160, 17500),\n new BandPass(192, 18600), new BandPass(224, 19400),\n new BandPass(256, 19700), new BandPass(320, 20500)];\n\n var table_index = self.nearestBitrateFullIndex(bitrate);\n lh.lowerlimit = freq_map[table_index].lowpass;\n }\n\n function lame_init_params_ppflt(gfp) {\n var gfc = gfp.internal_flags;\n /***************************************************************/\n /* compute info needed for polyphase filter (filter type==0, default) */\n /***************************************************************/\n\n var lowpass_band = 32;\n var highpass_band = -1;\n\n if (gfc.lowpass1 > 0) {\n var minband = 999;\n for (var band = 0; band <= 31; band++) {\n var freq = (band / 31.0);\n /* this band and above will be zeroed: */\n if (freq >= gfc.lowpass2) {\n lowpass_band = Math.min(lowpass_band, band);\n }\n if (gfc.lowpass1 < freq && freq < gfc.lowpass2) {\n minband = Math.min(minband, band);\n }\n }\n\n /*\n * compute the *actual* transition band implemented by the polyphase\n * filter\n */\n if (minband == 999) {\n gfc.lowpass1 = (lowpass_band - .75) / 31.0;\n } else {\n gfc.lowpass1 = (minband - .75) / 31.0;\n }\n gfc.lowpass2 = lowpass_band / 31.0;\n }\n\n /*\n * make sure highpass filter is within 90% of what the effective\n * highpass frequency will be\n */\n if (gfc.highpass2 > 0) {\n if (gfc.highpass2 < .9 * (.75 / 31.0)) {\n gfc.highpass1 = 0;\n gfc.highpass2 = 0;\n System.err.println(\"Warning: highpass filter disabled. \"\n + \"highpass frequency too small\\n\");\n }\n }\n\n if (gfc.highpass2 > 0) {\n var maxband = -1;\n for (var band = 0; band <= 31; band++) {\n var freq = band / 31.0;\n /* this band and below will be zereod */\n if (freq <= gfc.highpass1) {\n highpass_band = Math.max(highpass_band, band);\n }\n if (gfc.highpass1 < freq && freq < gfc.highpass2) {\n maxband = Math.max(maxband, band);\n }\n }\n /*\n * compute the *actual* transition band implemented by the polyphase\n * filter\n */\n gfc.highpass1 = highpass_band / 31.0;\n if (maxband == -1) {\n gfc.highpass2 = (highpass_band + .75) / 31.0;\n } else {\n gfc.highpass2 = (maxband + .75) / 31.0;\n }\n }\n\n for (var band = 0; band < 32; band++) {\n var fc1, fc2;\n var freq = band / 31.0;\n if (gfc.highpass2 > gfc.highpass1) {\n fc1 = filter_coef((gfc.highpass2 - freq)\n / (gfc.highpass2 - gfc.highpass1 + 1e-20));\n } else {\n fc1 = 1.0;\n }\n if (gfc.lowpass2 > gfc.lowpass1) {\n fc2 = filter_coef((freq - gfc.lowpass1)\n / (gfc.lowpass2 - gfc.lowpass1 + 1e-20));\n } else {\n fc2 = 1.0;\n }\n gfc.amp_filter[band] = (fc1 * fc2);\n }\n }\n\n function lame_init_qval(gfp) {\n var gfc = gfp.internal_flags;\n\n switch (gfp.quality) {\n default:\n case 9: /* no psymodel, no noise shaping */\n gfc.psymodel = 0;\n gfc.noise_shaping = 0;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 8:\n gfp.quality = 7;\n //$FALL-THROUGH$\n case 7:\n /*\n * use psymodel (for short block and m/s switching), but no noise\n * shapping\n */\n gfc.psymodel = 1;\n gfc.noise_shaping = 0;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 6:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 5:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 4:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 3:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 1;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 2:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 1;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n /* inner loop */\n gfc.full_outer_loop = 0;\n break;\n\n case 1:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 2;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 0:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 2;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n /*\n * type 2 disabled because of it slowness, in favor of full outer\n * loop search\n */\n gfc.full_outer_loop = 0;\n /*\n * full outer loop search disabled because of audible distortions it\n * may generate rh 060629\n */\n break;\n }\n\n }\n\n function lame_init_bitstream(gfp) {\n var gfc = gfp.internal_flags;\n gfp.frameNum = 0;\n\n if (gfp.write_id3tag_automatic) {\n id3.id3tag_write_v2(gfp);\n }\n /* initialize histogram data optionally used by frontend */\n\n gfc.bitrate_stereoMode_Hist = new_int_n([16, 4 + 1]);\n gfc.bitrate_blockType_Hist = new_int_n([16, 4 + 1 + 1]);\n\n gfc.PeakSample = 0.0;\n\n /* Write initial VBR Header to bitstream and init VBR data */\n if (gfp.bWriteVbrTag)\n vbr.InitVbrTag(gfp);\n }\n\n /********************************************************************\n * initialize internal params based on data in gf (globalflags struct filled\n * in by calling program)\n *\n * OUTLINE:\n *\n * We first have some complex code to determine bitrate, output samplerate\n * and mode. It is complicated by the fact that we allow the user to set\n * some or all of these parameters, and need to determine best possible\n * values for the rest of them:\n *\n * 1. set some CPU related flags 2. check if we are mono.mono, stereo.mono\n * or stereo.stereo 3. compute bitrate and output samplerate: user may have\n * set compression ratio user may have set a bitrate user may have set a\n * output samplerate 4. set some options which depend on output samplerate\n * 5. compute the actual compression ratio 6. set mode based on compression\n * ratio\n *\n * The remaining code is much simpler - it just sets options based on the\n * mode & compression ratio:\n *\n * set allow_diff_short based on mode select lowpass filter based on\n * compression ratio & mode set the bitrate index, and min/max bitrates for\n * VBR modes disable VBR tag if it is not appropriate initialize the\n * bitstream initialize scalefac_band data set sideinfo_len (based on\n * channels, CRC, out_samplerate) write an id3v2 tag into the bitstream\n * write VBR tag into the bitstream set mpeg1/2 flag estimate the number of\n * frames (based on a lot of data)\n *\n * now we set more flags: nspsytune: see code VBR modes see code CBR/ABR see\n * code\n *\n * Finally, we set the algorithm flags based on the gfp.quality value\n * lame_init_qval(gfp);\n *\n ********************************************************************/\n this.lame_init_params = function (gfp) {\n var gfc = gfp.internal_flags;\n\n gfc.Class_ID = 0;\n if (gfc.ATH == null)\n gfc.ATH = new ATH();\n if (gfc.PSY == null)\n gfc.PSY = new PSY();\n if (gfc.rgdata == null)\n gfc.rgdata = new ReplayGain();\n\n gfc.channels_in = gfp.num_channels;\n if (gfc.channels_in == 1)\n gfp.mode = MPEGMode.MONO;\n gfc.channels_out = (gfp.mode == MPEGMode.MONO) ? 1 : 2;\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n if (gfp.mode == MPEGMode.MONO)\n gfp.force_ms = false;\n /*\n * don't allow forced mid/side stereo for mono output\n */\n\n if (gfp.VBR == VbrMode.vbr_off && gfp.VBR_mean_bitrate_kbps != 128\n && gfp.brate == 0)\n gfp.brate = gfp.VBR_mean_bitrate_kbps;\n\n if (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_mtrh\n || gfp.VBR == VbrMode.vbr_mt) {\n /* these modes can handle free format condition */\n } else {\n gfp.free_format = false;\n /* mode can't be mixed with free format */\n }\n\n if (gfp.VBR == VbrMode.vbr_off && gfp.brate == 0) {\n /* no bitrate or compression ratio specified, use 11.025 */\n if (BitStream.EQ(gfp.compression_ratio, 0))\n gfp.compression_ratio = 11.025;\n /*\n * rate to compress a CD down to exactly 128000 bps\n */\n }\n\n /* find bitrate if user specify a compression ratio */\n if (gfp.VBR == VbrMode.vbr_off && gfp.compression_ratio > 0) {\n\n if (gfp.out_samplerate == 0)\n gfp.out_samplerate = map2MP3Frequency((int)(0.97 * gfp.in_samplerate));\n /*\n * round up with a margin of 3 %\n */\n\n /*\n * choose a bitrate for the output samplerate which achieves\n * specified compression ratio\n */\n gfp.brate = 0 | (gfp.out_samplerate * 16 * gfc.channels_out / (1.e3 * gfp.compression_ratio));\n\n /* we need the version for the bitrate table look up */\n gfc.samplerate_index = SmpFrqIndex(gfp.out_samplerate, gfp);\n\n if (!gfp.free_format) /*\n * for non Free Format find the nearest allowed\n * bitrate\n */\n gfp.brate = FindNearestBitrate(gfp.brate, gfp.version,\n gfp.out_samplerate);\n }\n\n if (gfp.out_samplerate != 0) {\n if (gfp.out_samplerate < 16000) {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 8);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 64);\n } else if (gfp.out_samplerate < 32000) {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 8);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 160);\n } else {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 32);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 320);\n }\n }\n\n /****************************************************************/\n /* if a filter has not been enabled, see if we should add one: */\n /****************************************************************/\n if (gfp.lowpassfreq == 0) {\n var lowpass = 16000.;\n\n switch (gfp.VBR) {\n case VbrMode.vbr_off:\n {\n var lh = new LowPassHighPass();\n optimum_bandwidth(lh, gfp.brate);\n lowpass = lh.lowerlimit;\n break;\n }\n case VbrMode.vbr_abr:\n {\n var lh = new LowPassHighPass();\n optimum_bandwidth(lh, gfp.VBR_mean_bitrate_kbps);\n lowpass = lh.lowerlimit;\n break;\n }\n case VbrMode.vbr_rh:\n {\n var x = [19500, 19000, 18600, 18000, 17500, 16000,\n 15600, 14900, 12500, 10000, 3950];\n if (0 <= gfp.VBR_q && gfp.VBR_q <= 9) {\n var a = x[gfp.VBR_q], b = x[gfp.VBR_q + 1], m = gfp.VBR_q_frac;\n lowpass = linear_int(a, b, m);\n } else {\n lowpass = 19500;\n }\n break;\n }\n default:\n {\n var x = [19500, 19000, 18500, 18000, 17500, 16500,\n 15500, 14500, 12500, 9500, 3950];\n if (0 <= gfp.VBR_q && gfp.VBR_q <= 9) {\n var a = x[gfp.VBR_q], b = x[gfp.VBR_q + 1], m = gfp.VBR_q_frac;\n lowpass = linear_int(a, b, m);\n } else {\n lowpass = 19500;\n }\n }\n }\n if (gfp.mode == MPEGMode.MONO\n && (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_abr))\n lowpass *= 1.5;\n\n gfp.lowpassfreq = lowpass | 0;\n }\n\n if (gfp.out_samplerate == 0) {\n if (2 * gfp.lowpassfreq > gfp.in_samplerate) {\n gfp.lowpassfreq = gfp.in_samplerate / 2;\n }\n gfp.out_samplerate = optimum_samplefreq(gfp.lowpassfreq | 0,\n gfp.in_samplerate);\n }\n\n gfp.lowpassfreq = Math.min(20500, gfp.lowpassfreq);\n gfp.lowpassfreq = Math.min(gfp.out_samplerate / 2, gfp.lowpassfreq);\n\n if (gfp.VBR == VbrMode.vbr_off) {\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.brate);\n }\n if (gfp.VBR == VbrMode.vbr_abr) {\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.VBR_mean_bitrate_kbps);\n }\n\n /*\n * do not compute ReplayGain values and do not find the peak sample if\n * we can't store them\n */\n if (!gfp.bWriteVbrTag) {\n gfp.findReplayGain = false;\n gfp.decode_on_the_fly = false;\n gfc.findPeakSample = false;\n }\n gfc.findReplayGain = gfp.findReplayGain;\n gfc.decode_on_the_fly = gfp.decode_on_the_fly;\n\n if (gfc.decode_on_the_fly)\n gfc.findPeakSample = true;\n\n if (gfc.findReplayGain) {\n if (ga.InitGainAnalysis(gfc.rgdata, gfp.out_samplerate) == GainAnalysis.INIT_GAIN_ANALYSIS_ERROR) {\n gfp.internal_flags = null;\n return -6;\n }\n }\n\n if (gfc.decode_on_the_fly && !gfp.decode_only) {\n if (gfc.hip != null) {\n mpglib.hip_decode_exit(gfc.hip);\n }\n gfc.hip = mpglib.hip_decode_init();\n }\n\n gfc.mode_gr = gfp.out_samplerate <= 24000 ? 1 : 2;\n /*\n * Number of granules per frame\n */\n gfp.framesize = 576 * gfc.mode_gr;\n gfp.encoder_delay = Encoder.ENCDELAY;\n\n gfc.resample_ratio = gfp.in_samplerate / gfp.out_samplerate;\n\n /**\n *
\n         *  sample freq       bitrate     compression ratio\n         *     [kHz]      [kbps/channel]   for 16 bit input\n         *     44.1            56               12.6\n         *     44.1            64               11.025\n         *     44.1            80                8.82\n         *     22.05           24               14.7\n         *     22.05           32               11.025\n         *     22.05           40                8.82\n         *     16              16               16.0\n         *     16              24               10.667\n         * 
\n */\n /**\n *
\n         *  For VBR, take a guess at the compression_ratio.\n         *  For example:\n         *\n         *    VBR_q    compression     like\n         *     -        4.4         320 kbps/44 kHz\n         *   0...1      5.5         256 kbps/44 kHz\n         *     2        7.3         192 kbps/44 kHz\n         *     4        8.8         160 kbps/44 kHz\n         *     6       11           128 kbps/44 kHz\n         *     9       14.7          96 kbps\n         *\n         *  for lower bitrates, downsample with --resample\n         * 
\n */\n switch (gfp.VBR) {\n case VbrMode.vbr_mt:\n case VbrMode.vbr_rh:\n case VbrMode.vbr_mtrh:\n {\n /* numbers are a bit strange, but they determine the lowpass value */\n var cmp = [5.7, 6.5, 7.3, 8.2, 10, 11.9, 13, 14,\n 15, 16.5];\n gfp.compression_ratio = cmp[gfp.VBR_q];\n }\n break;\n case VbrMode.vbr_abr:\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.VBR_mean_bitrate_kbps);\n break;\n default:\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.brate);\n break;\n }\n\n /*\n * mode = -1 (not set by user) or mode = MONO (because of only 1 input\n * channel). If mode has not been set, then select J-STEREO\n */\n if (gfp.mode == MPEGMode.NOT_SET) {\n gfp.mode = MPEGMode.JOINT_STEREO;\n }\n\n /* apply user driven high pass filter */\n if (gfp.highpassfreq > 0) {\n gfc.highpass1 = 2. * gfp.highpassfreq;\n\n if (gfp.highpasswidth >= 0)\n gfc.highpass2 = 2. * (gfp.highpassfreq + gfp.highpasswidth);\n else\n /* 0% above on default */\n gfc.highpass2 = (1 + 0.00) * 2. * gfp.highpassfreq;\n\n gfc.highpass1 /= gfp.out_samplerate;\n gfc.highpass2 /= gfp.out_samplerate;\n } else {\n gfc.highpass1 = 0;\n gfc.highpass2 = 0;\n }\n /* apply user driven low pass filter */\n if (gfp.lowpassfreq > 0) {\n gfc.lowpass2 = 2. * gfp.lowpassfreq;\n if (gfp.lowpasswidth >= 0) {\n gfc.lowpass1 = 2. * (gfp.lowpassfreq - gfp.lowpasswidth);\n if (gfc.lowpass1 < 0) /* has to be >= 0 */\n gfc.lowpass1 = 0;\n } else { /* 0% below on default */\n gfc.lowpass1 = (1 - 0.00) * 2. * gfp.lowpassfreq;\n }\n gfc.lowpass1 /= gfp.out_samplerate;\n gfc.lowpass2 /= gfp.out_samplerate;\n } else {\n gfc.lowpass1 = 0;\n gfc.lowpass2 = 0;\n }\n\n /**********************************************************************/\n /* compute info needed for polyphase filter (filter type==0, default) */\n /**********************************************************************/\n lame_init_params_ppflt(gfp);\n /*******************************************************\n * samplerate and bitrate index\n *******************************************************/\n gfc.samplerate_index = SmpFrqIndex(gfp.out_samplerate, gfp);\n if (gfc.samplerate_index < 0) {\n gfp.internal_flags = null;\n return -1;\n }\n\n if (gfp.VBR == VbrMode.vbr_off) {\n if (gfp.free_format) {\n gfc.bitrate_index = 0;\n } else {\n gfp.brate = FindNearestBitrate(gfp.brate, gfp.version,\n gfp.out_samplerate);\n gfc.bitrate_index = BitrateIndex(gfp.brate, gfp.version,\n gfp.out_samplerate);\n if (gfc.bitrate_index <= 0) {\n gfp.internal_flags = null;\n return -1;\n }\n }\n } else {\n gfc.bitrate_index = 1;\n }\n\n /* for CBR, we will write an \"info\" tag. */\n\n if (gfp.analysis)\n gfp.bWriteVbrTag = false;\n\n /* some file options not allowed if output is: not specified or stdout */\n if (gfc.pinfo != null)\n gfp.bWriteVbrTag = false;\n /* disable Xing VBR tag */\n\n bs.init_bit_stream_w(gfc);\n\n var j = gfc.samplerate_index + (3 * gfp.version) + 6\n * (gfp.out_samplerate < 16000 ? 1 : 0);\n for (var i = 0; i < Encoder.SBMAX_l + 1; i++)\n gfc.scalefac_band.l[i] = qupvt.sfBandIndex[j].l[i];\n\n for (var i = 0; i < Encoder.PSFB21 + 1; i++) {\n var size = (gfc.scalefac_band.l[22] - gfc.scalefac_band.l[21])\n / Encoder.PSFB21;\n var start = gfc.scalefac_band.l[21] + i * size;\n gfc.scalefac_band.psfb21[i] = start;\n }\n gfc.scalefac_band.psfb21[Encoder.PSFB21] = 576;\n\n for (var i = 0; i < Encoder.SBMAX_s + 1; i++)\n gfc.scalefac_band.s[i] = qupvt.sfBandIndex[j].s[i];\n\n for (var i = 0; i < Encoder.PSFB12 + 1; i++) {\n var size = (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12])\n / Encoder.PSFB12;\n var start = gfc.scalefac_band.s[12] + i * size;\n gfc.scalefac_band.psfb12[i] = start;\n }\n gfc.scalefac_band.psfb12[Encoder.PSFB12] = 192;\n /* determine the mean bitrate for main data */\n if (gfp.version == 1) /* MPEG 1 */\n gfc.sideinfo_len = (gfc.channels_out == 1) ? 4 + 17 : 4 + 32;\n else\n /* MPEG 2 */\n gfc.sideinfo_len = (gfc.channels_out == 1) ? 4 + 9 : 4 + 17;\n\n if (gfp.error_protection)\n gfc.sideinfo_len += 2;\n\n lame_init_bitstream(gfp);\n\n gfc.Class_ID = LAME_ID;\n\n {\n var k;\n\n for (k = 0; k < 19; k++)\n gfc.nsPsy.pefirbuf[k] = 700 * gfc.mode_gr * gfc.channels_out;\n\n if (gfp.ATHtype == -1)\n gfp.ATHtype = 4;\n }\n assert(gfp.VBR_q <= 9);\n assert(gfp.VBR_q >= 0);\n\n switch (gfp.VBR) {\n\n case VbrMode.vbr_mt:\n gfp.VBR = VbrMode.vbr_mtrh;\n //$FALL-THROUGH$\n case VbrMode.vbr_mtrh:\n {\n if (gfp.useTemporal == null) {\n gfp.useTemporal = false;\n /* off by default for this VBR mode */\n }\n\n p.apply_preset(gfp, 500 - (gfp.VBR_q * 10), 0);\n /**\n *
\n                 *   The newer VBR code supports only a limited\n                 *     subset of quality levels:\n                 *     9-5=5 are the same, uses x^3/4 quantization\n                 *   4-0=0 are the same  5 plus best huffman divide code\n                 * 
\n */\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n if (gfp.quality < 5)\n gfp.quality = 0;\n if (gfp.quality > 5)\n gfp.quality = 5;\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n /*\n * sfb21 extra only with MPEG-1 at higher sampling rates\n */\n if (gfp.experimentalY)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = (gfp.out_samplerate > 44000);\n\n gfc.iteration_loop = new VBRNewIterationLoop(qu);\n break;\n\n }\n case VbrMode.vbr_rh:\n {\n\n p.apply_preset(gfp, 500 - (gfp.VBR_q * 10), 0);\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n /*\n * sfb21 extra only with MPEG-1 at higher sampling rates\n */\n if (gfp.experimentalY)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = (gfp.out_samplerate > 44000);\n\n /*\n * VBR needs at least the output of GPSYCHO, so we have to garantee\n * that by setting a minimum quality level, actually level 6 does\n * it. down to level 6\n */\n if (gfp.quality > 6)\n gfp.quality = 6;\n\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n\n gfc.iteration_loop = new VBROldIterationLoop(qu);\n break;\n }\n\n default: /* cbr/abr */\n {\n var vbrmode;\n\n /*\n * no sfb21 extra with CBR code\n */\n gfc.sfb21_extra = false;\n\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n\n vbrmode = gfp.VBR;\n if (vbrmode == VbrMode.vbr_off)\n gfp.VBR_mean_bitrate_kbps = gfp.brate;\n /* second, set parameters depending on bitrate */\n p.apply_preset(gfp, gfp.VBR_mean_bitrate_kbps, 0);\n gfp.VBR = vbrmode;\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n if (vbrmode == VbrMode.vbr_off) {\n gfc.iteration_loop = new CBRNewIterationLoop(qu);\n } else {\n gfc.iteration_loop = new ABRIterationLoop(qu);\n }\n break;\n }\n }\n assert(gfp.scale >= 0);\n /* initialize default values common for all modes */\n\n if (gfp.VBR != VbrMode.vbr_off) { /* choose a min/max bitrate for VBR */\n /* if the user didn't specify VBR_max_bitrate: */\n gfc.VBR_min_bitrate = 1;\n /*\n * default: allow 8 kbps (MPEG-2) or 32 kbps (MPEG-1)\n */\n gfc.VBR_max_bitrate = 14;\n /*\n * default: allow 160 kbps (MPEG-2) or 320 kbps (MPEG-1)\n */\n if (gfp.out_samplerate < 16000)\n gfc.VBR_max_bitrate = 8;\n /* default: allow 64 kbps (MPEG-2.5) */\n if (gfp.VBR_min_bitrate_kbps != 0) {\n gfp.VBR_min_bitrate_kbps = FindNearestBitrate(\n gfp.VBR_min_bitrate_kbps, gfp.version,\n gfp.out_samplerate);\n gfc.VBR_min_bitrate = BitrateIndex(gfp.VBR_min_bitrate_kbps,\n gfp.version, gfp.out_samplerate);\n if (gfc.VBR_min_bitrate < 0)\n return -1;\n }\n if (gfp.VBR_max_bitrate_kbps != 0) {\n gfp.VBR_max_bitrate_kbps = FindNearestBitrate(\n gfp.VBR_max_bitrate_kbps, gfp.version,\n gfp.out_samplerate);\n gfc.VBR_max_bitrate = BitrateIndex(gfp.VBR_max_bitrate_kbps,\n gfp.version, gfp.out_samplerate);\n if (gfc.VBR_max_bitrate < 0)\n return -1;\n }\n gfp.VBR_min_bitrate_kbps = Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate];\n gfp.VBR_max_bitrate_kbps = Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate];\n gfp.VBR_mean_bitrate_kbps = Math.min(\n Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate],\n gfp.VBR_mean_bitrate_kbps);\n gfp.VBR_mean_bitrate_kbps = Math.max(\n Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate],\n gfp.VBR_mean_bitrate_kbps);\n }\n\n /* just another daily changing developer switch */\n if (gfp.tune) {\n gfc.PSY.mask_adjust += gfp.tune_value_a;\n gfc.PSY.mask_adjust_short += gfp.tune_value_a;\n }\n\n /* initialize internal qval settings */\n lame_init_qval(gfp);\n assert(gfp.scale >= 0);\n /*\n * automatic ATH adjustment on\n */\n if (gfp.athaa_type < 0)\n gfc.ATH.useAdjust = 3;\n else\n gfc.ATH.useAdjust = gfp.athaa_type;\n\n /* initialize internal adaptive ATH settings -jd */\n gfc.ATH.aaSensitivityP = Math.pow(10.0, gfp.athaa_sensitivity\n / -10.0);\n\n if (gfp.short_blocks == null) {\n gfp.short_blocks = ShortBlock.short_block_allowed;\n }\n\n /*\n * Note Jan/2003: Many hardware decoders cannot handle short blocks in\n * regular stereo mode unless they are coupled (same type in both\n * channels) it is a rare event (1 frame per min. or so) that LAME would\n * use uncoupled short blocks, so lets turn them off until we decide how\n * to handle this. No other encoders allow uncoupled short blocks, even\n * though it is in the standard.\n */\n /*\n * rh 20040217: coupling makes no sense for mono and dual-mono streams\n */\n if (gfp.short_blocks == ShortBlock.short_block_allowed\n && (gfp.mode == MPEGMode.JOINT_STEREO || gfp.mode == MPEGMode.STEREO)) {\n gfp.short_blocks = ShortBlock.short_block_coupled;\n }\n\n if (gfp.quant_comp < 0)\n gfp.quant_comp = 1;\n if (gfp.quant_comp_short < 0)\n gfp.quant_comp_short = 0;\n\n if (gfp.msfix < 0)\n gfp.msfix = 0;\n\n /* select psychoacoustic model */\n gfp.exp_nspsytune = gfp.exp_nspsytune | 1;\n\n if (gfp.internal_flags.nsPsy.attackthre < 0)\n gfp.internal_flags.nsPsy.attackthre = PsyModel.NSATTACKTHRE;\n if (gfp.internal_flags.nsPsy.attackthre_s < 0)\n gfp.internal_flags.nsPsy.attackthre_s = PsyModel.NSATTACKTHRE_S;\n\n assert(gfp.scale >= 0);\n\n if (gfp.scale < 0)\n gfp.scale = 1;\n\n if (gfp.ATHtype < 0)\n gfp.ATHtype = 4;\n\n if (gfp.ATHcurve < 0)\n gfp.ATHcurve = 4;\n\n if (gfp.athaa_loudapprox < 0)\n gfp.athaa_loudapprox = 2;\n\n if (gfp.interChRatio < 0)\n gfp.interChRatio = 0;\n\n if (gfp.useTemporal == null)\n gfp.useTemporal = true;\n /* on by default */\n\n /*\n * padding method as described in\n * \"MPEG-Layer3 / Bitstream Syntax and Decoding\" by Martin Sieler, Ralph\n * Sperschneider\n *\n * note: there is no padding for the very first frame\n *\n * Robert Hegemann 2000-06-22\n */\n gfc.slot_lag = gfc.frac_SpF = 0;\n if (gfp.VBR == VbrMode.vbr_off)\n gfc.slot_lag = gfc.frac_SpF = (((gfp.version + 1) * 72000 * gfp.brate) % gfp.out_samplerate) | 0;\n\n qupvt.iteration_init(gfp);\n psy.psymodel_init(gfp);\n assert(gfp.scale >= 0);\n return 0;\n }\n\n function update_inbuffer_size(gfc, nsamples) {\n if (gfc.in_buffer_0 == null || gfc.in_buffer_nsamples < nsamples) {\n gfc.in_buffer_0 = new_float(nsamples);\n gfc.in_buffer_1 = new_float(nsamples);\n gfc.in_buffer_nsamples = nsamples;\n }\n }\n\n this.lame_encode_flush = function (gfp, mp3buffer, mp3bufferPos, mp3buffer_size) {\n var gfc = gfp.internal_flags;\n var buffer = new_short_n([2, 1152]);\n var imp3 = 0, mp3count, mp3buffer_size_remaining;\n\n /*\n * we always add POSTDELAY=288 padding to make sure granule with real\n * data can be complety decoded (because of 50% overlap with next\n * granule\n */\n var end_padding;\n var frames_left;\n var samples_to_encode = gfc.mf_samples_to_encode - Encoder.POSTDELAY;\n var mf_needed = calcNeeded(gfp);\n\n /* Was flush already called? */\n if (gfc.mf_samples_to_encode < 1) {\n return 0;\n }\n mp3count = 0;\n\n if (gfp.in_samplerate != gfp.out_samplerate) {\n /*\n * delay due to resampling; needs to be fixed, if resampling code\n * gets changed\n */\n samples_to_encode += 16. * gfp.out_samplerate / gfp.in_samplerate;\n }\n end_padding = gfp.framesize - (samples_to_encode % gfp.framesize);\n if (end_padding < 576)\n end_padding += gfp.framesize;\n gfp.encoder_padding = end_padding;\n\n frames_left = (samples_to_encode + end_padding) / gfp.framesize;\n\n /*\n * send in a frame of 0 padding until all internal sample buffers are\n * flushed\n */\n while (frames_left > 0 && imp3 >= 0) {\n var bunch = mf_needed - gfc.mf_size;\n var frame_num = gfp.frameNum;\n\n bunch *= gfp.in_samplerate;\n bunch /= gfp.out_samplerate;\n if (bunch > 1152)\n bunch = 1152;\n if (bunch < 1)\n bunch = 1;\n\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n imp3 = this.lame_encode_buffer(gfp, buffer[0], buffer[1], bunch,\n mp3buffer, mp3bufferPos, mp3buffer_size_remaining);\n\n mp3bufferPos += imp3;\n mp3count += imp3;\n frames_left -= (frame_num != gfp.frameNum) ? 1 : 0;\n }\n /*\n * Set gfc.mf_samples_to_encode to 0, so we may detect and break loops\n * calling it more than once in a row.\n */\n gfc.mf_samples_to_encode = 0;\n\n if (imp3 < 0) {\n /* some type of fatal error */\n return imp3;\n }\n\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n /* mp3 related stuff. bit buffer might still contain some mp3 data */\n bs.flush_bitstream(gfp);\n imp3 = bs.copy_buffer(gfc, mp3buffer, mp3bufferPos,\n mp3buffer_size_remaining, 1);\n if (imp3 < 0) {\n /* some type of fatal error */\n return imp3;\n }\n mp3bufferPos += imp3;\n mp3count += imp3;\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n if (gfp.write_id3tag_automatic) {\n /* write a id3 tag to the bitstream */\n id3.id3tag_write_v1(gfp);\n\n imp3 = bs.copy_buffer(gfc, mp3buffer, mp3bufferPos,\n mp3buffer_size_remaining, 0);\n\n if (imp3 < 0) {\n return imp3;\n }\n mp3count += imp3;\n }\n return mp3count;\n };\n\n this.lame_encode_buffer = function (gfp, buffer_l, buffer_r, nsamples, mp3buf, mp3bufPos, mp3buf_size) {\n var gfc = gfp.internal_flags;\n var in_buffer = [null, null];\n\n if (gfc.Class_ID != LAME_ID)\n return -3;\n\n if (nsamples == 0)\n return 0;\n\n update_inbuffer_size(gfc, nsamples);\n\n in_buffer[0] = gfc.in_buffer_0;\n in_buffer[1] = gfc.in_buffer_1;\n\n /* make a copy of input buffer, changing type to sample_t */\n for (var i = 0; i < nsamples; i++) {\n in_buffer[0][i] = buffer_l[i];\n if (gfc.channels_in > 1)\n in_buffer[1][i] = buffer_r[i];\n }\n\n return lame_encode_buffer_sample(gfp, in_buffer[0], in_buffer[1],\n nsamples, mp3buf, mp3bufPos, mp3buf_size);\n }\n\n function calcNeeded(gfp) {\n var mf_needed = Encoder.BLKSIZE + gfp.framesize - Encoder.FFTOFFSET;\n /*\n * amount needed for FFT\n */\n mf_needed = Math.max(mf_needed, 512 + gfp.framesize - 32);\n assert(LameInternalFlags.MFSIZE >= mf_needed);\n\n return mf_needed;\n }\n\n function lame_encode_buffer_sample(gfp, buffer_l, buffer_r, nsamples, mp3buf, mp3bufPos, mp3buf_size) {\n var gfc = gfp.internal_flags;\n var mp3size = 0, ret, i, ch, mf_needed;\n var mp3out;\n var mfbuf = [null, null];\n var in_buffer = [null, null];\n\n if (gfc.Class_ID != LAME_ID)\n return -3;\n\n if (nsamples == 0)\n return 0;\n\n /* copy out any tags that may have been written into bitstream */\n mp3out = bs.copy_buffer(gfc, mp3buf, mp3bufPos, mp3buf_size, 0);\n if (mp3out < 0)\n return mp3out;\n /* not enough buffer space */\n mp3bufPos += mp3out;\n mp3size += mp3out;\n\n in_buffer[0] = buffer_l;\n in_buffer[1] = buffer_r;\n\n /* Apply user defined re-scaling */\n\n /* user selected scaling of the samples */\n if (BitStream.NEQ(gfp.scale, 0) && BitStream.NEQ(gfp.scale, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] *= gfp.scale;\n if (gfc.channels_out == 2)\n in_buffer[1][i] *= gfp.scale;\n }\n }\n\n /* user selected scaling of the channel 0 (left) samples */\n if (BitStream.NEQ(gfp.scale_left, 0)\n && BitStream.NEQ(gfp.scale_left, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] *= gfp.scale_left;\n }\n }\n\n /* user selected scaling of the channel 1 (right) samples */\n if (BitStream.NEQ(gfp.scale_right, 0)\n && BitStream.NEQ(gfp.scale_right, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[1][i] *= gfp.scale_right;\n }\n }\n\n /* Downsample to Mono if 2 channels in and 1 channel out */\n if (gfp.num_channels == 2 && gfc.channels_out == 1) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] = 0.5 * ( in_buffer[0][i] + in_buffer[1][i]);\n in_buffer[1][i] = 0.0;\n }\n }\n\n mf_needed = calcNeeded(gfp);\n\n mfbuf[0] = gfc.mfbuf[0];\n mfbuf[1] = gfc.mfbuf[1];\n\n var in_bufferPos = 0;\n while (nsamples > 0) {\n var in_buffer_ptr = [null, null];\n var n_in = 0;\n /* number of input samples processed with fill_buffer */\n var n_out = 0;\n /* number of samples output with fill_buffer */\n /* n_in <> n_out if we are resampling */\n\n in_buffer_ptr[0] = in_buffer[0];\n in_buffer_ptr[1] = in_buffer[1];\n /* copy in new samples into mfbuf, with resampling */\n var inOut = new InOut();\n fill_buffer(gfp, mfbuf, in_buffer_ptr, in_bufferPos, nsamples,\n inOut);\n n_in = inOut.n_in;\n n_out = inOut.n_out;\n\n /* compute ReplayGain of resampled input if requested */\n if (gfc.findReplayGain && !gfc.decode_on_the_fly)\n if (ga.AnalyzeSamples(gfc.rgdata, mfbuf[0], gfc.mf_size,\n mfbuf[1], gfc.mf_size, n_out, gfc.channels_out) == GainAnalysis.GAIN_ANALYSIS_ERROR)\n return -6;\n\n /* update in_buffer counters */\n nsamples -= n_in;\n in_bufferPos += n_in;\n if (gfc.channels_out == 2)\n ;// in_bufferPos += n_in;\n\n /* update mfbuf[] counters */\n gfc.mf_size += n_out;\n assert(gfc.mf_size <= LameInternalFlags.MFSIZE);\n\n /*\n * lame_encode_flush may have set gfc.mf_sample_to_encode to 0 so we\n * have to reinitialize it here when that happened.\n */\n if (gfc.mf_samples_to_encode < 1) {\n gfc.mf_samples_to_encode = Encoder.ENCDELAY + Encoder.POSTDELAY;\n }\n gfc.mf_samples_to_encode += n_out;\n\n if (gfc.mf_size >= mf_needed) {\n /* encode the frame. */\n /* mp3buf = pointer to current location in buffer */\n /* mp3buf_size = size of original mp3 output buffer */\n /* = 0 if we should not worry about the */\n /* buffer size because calling program is */\n /* to lazy to compute it */\n /* mp3size = size of data written to buffer so far */\n /* mp3buf_size-mp3size = amount of space avalable */\n\n var buf_size = mp3buf_size - mp3size;\n if (mp3buf_size == 0)\n buf_size = 0;\n\n ret = lame_encode_frame(gfp, mfbuf[0], mfbuf[1], mp3buf,\n mp3bufPos, buf_size);\n\n if (ret < 0)\n return ret;\n mp3bufPos += ret;\n mp3size += ret;\n\n /* shift out old samples */\n gfc.mf_size -= gfp.framesize;\n gfc.mf_samples_to_encode -= gfp.framesize;\n for (ch = 0; ch < gfc.channels_out; ch++)\n for (i = 0; i < gfc.mf_size; i++)\n mfbuf[ch][i] = mfbuf[ch][i + gfp.framesize];\n }\n }\n assert(nsamples == 0);\n\n return mp3size;\n }\n\n function lame_encode_frame(gfp, inbuf_l, inbuf_r, mp3buf, mp3bufPos, mp3buf_size) {\n var ret = self.enc.lame_encode_mp3_frame(gfp, inbuf_l, inbuf_r, mp3buf,\n mp3bufPos, mp3buf_size);\n gfp.frameNum++;\n return ret;\n }\n\n function InOut() {\n this.n_in = 0;\n this.n_out = 0;\n }\n\n\n function NumUsed() {\n this.num_used = 0;\n }\n\n /**\n * Greatest common divisor.\n *

\n * Joint work of Euclid and M. Hendry\n */\n function gcd(i, j) {\n return j != 0 ? gcd(j, i % j) : i;\n }\n\n /**\n * Resampling via FIR filter, blackman window.\n */\n function blackman(x, fcn, l) {\n /*\n * This algorithm from: SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C\n * S.D. Stearns and R.A. David, Prentice-Hall, 1992\n */\n var wcn = (Math.PI * fcn);\n\n x /= l;\n if (x < 0)\n x = 0;\n if (x > 1)\n x = 1;\n var x2 = x - .5;\n\n var bkwn = 0.42 - 0.5 * Math.cos(2 * x * Math.PI) + 0.08 * Math.cos(4 * x * Math.PI);\n if (Math.abs(x2) < 1e-9)\n return (wcn / Math.PI);\n else\n return (bkwn * Math.sin(l * wcn * x2) / (Math.PI * l * x2));\n }\n\n function fill_buffer_resample(gfp, outbuf, outbufPos, desired_len, inbuf, in_bufferPos, len, num_used, ch) {\n var gfc = gfp.internal_flags;\n var i, j = 0, k;\n /* number of convolution functions to pre-compute */\n var bpc = gfp.out_samplerate\n / gcd(gfp.out_samplerate, gfp.in_samplerate);\n if (bpc > LameInternalFlags.BPC)\n bpc = LameInternalFlags.BPC;\n\n var intratio = (Math.abs(gfc.resample_ratio\n - Math.floor(.5 + gfc.resample_ratio)) < .0001) ? 1 : 0;\n var fcn = 1.00 / gfc.resample_ratio;\n if (fcn > 1.00)\n fcn = 1.00;\n var filter_l = 31;\n if (0 == filter_l % 2)\n --filter_l;\n /* must be odd */\n filter_l += intratio;\n /* unless resample_ratio=int, it must be even */\n\n var BLACKSIZE = filter_l + 1;\n /* size of data needed for FIR */\n\n if (gfc.fill_buffer_resample_init == 0) {\n gfc.inbuf_old[0] = new_float(BLACKSIZE);\n gfc.inbuf_old[1] = new_float(BLACKSIZE);\n for (i = 0; i <= 2 * bpc; ++i)\n gfc.blackfilt[i] = new_float(BLACKSIZE);\n\n gfc.itime[0] = 0;\n gfc.itime[1] = 0;\n\n /* precompute blackman filter coefficients */\n for (j = 0; j <= 2 * bpc; j++) {\n var sum = 0.;\n var offset = (j - bpc) / (2. * bpc);\n for (i = 0; i <= filter_l; i++)\n sum += gfc.blackfilt[j][i] = blackman(i - offset, fcn,\n filter_l);\n for (i = 0; i <= filter_l; i++)\n gfc.blackfilt[j][i] /= sum;\n }\n gfc.fill_buffer_resample_init = 1;\n }\n\n var inbuf_old = gfc.inbuf_old[ch];\n\n /* time of j'th element in inbuf = itime + j/ifreq; */\n /* time of k'th element in outbuf = j/ofreq */\n for (k = 0; k < desired_len; k++) {\n var time0;\n var joff;\n\n time0 = k * gfc.resample_ratio;\n /* time of k'th output sample */\n j = 0 | Math.floor(time0 - gfc.itime[ch]);\n\n /* check if we need more input data */\n if ((filter_l + j - filter_l / 2) >= len)\n break;\n\n /* blackman filter. by default, window centered at j+.5(filter_l%2) */\n /* but we want a window centered at time0. */\n var offset = (time0 - gfc.itime[ch] - (j + .5 * (filter_l % 2)));\n assert(Math.abs(offset) <= .501);\n\n /* find the closest precomputed window for this offset: */\n joff = 0 | Math.floor((offset * 2 * bpc) + bpc + .5);\n var xvalue = 0.;\n for (i = 0; i <= filter_l; ++i) {\n var j2 = i + j - filter_l / 2;\n var y;\n assert(j2 < len);\n assert(j2 + BLACKSIZE >= 0);\n y = (j2 < 0) ? inbuf_old[BLACKSIZE + j2] : inbuf[in_bufferPos\n + j2];\n xvalue += y * gfc.blackfilt[joff][i];\n }\n outbuf[outbufPos + k] = xvalue;\n }\n\n /* k = number of samples added to outbuf */\n /* last k sample used data from [j-filter_l/2,j+filter_l-filter_l/2] */\n\n /* how many samples of input data were used: */\n num_used.num_used = Math.min(len, filter_l + j - filter_l / 2);\n\n /*\n * adjust our input time counter. Incriment by the number of samples\n * used, then normalize so that next output sample is at time 0, next\n * input buffer is at time itime[ch]\n */\n gfc.itime[ch] += num_used.num_used - k * gfc.resample_ratio;\n\n /* save the last BLACKSIZE samples into the inbuf_old buffer */\n if (num_used.num_used >= BLACKSIZE) {\n for (i = 0; i < BLACKSIZE; i++)\n inbuf_old[i] = inbuf[in_bufferPos + num_used.num_used + i\n - BLACKSIZE];\n } else {\n /* shift in num_used.num_used samples into inbuf_old */\n var n_shift = BLACKSIZE - num_used.num_used;\n /*\n * number of samples to\n * shift\n */\n\n /*\n * shift n_shift samples by num_used.num_used, to make room for the\n * num_used new samples\n */\n for (i = 0; i < n_shift; ++i)\n inbuf_old[i] = inbuf_old[i + num_used.num_used];\n\n /* shift in the num_used.num_used samples */\n for (j = 0; i < BLACKSIZE; ++i, ++j)\n inbuf_old[i] = inbuf[in_bufferPos + j];\n\n assert(j == num_used.num_used);\n }\n return k;\n /* return the number samples created at the new samplerate */\n }\n\n function fill_buffer(gfp, mfbuf, in_buffer, in_bufferPos, nsamples, io) {\n var gfc = gfp.internal_flags;\n\n /* copy in new samples into mfbuf, with resampling if necessary */\n if ((gfc.resample_ratio < .9999) || (gfc.resample_ratio > 1.0001)) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var numUsed = new NumUsed();\n io.n_out = fill_buffer_resample(gfp, mfbuf[ch], gfc.mf_size,\n gfp.framesize, in_buffer[ch], in_bufferPos, nsamples,\n numUsed, ch);\n io.n_in = numUsed.num_used;\n }\n } else {\n io.n_out = Math.min(gfp.framesize, nsamples);\n io.n_in = io.n_out;\n for (var i = 0; i < io.n_out; ++i) {\n mfbuf[0][gfc.mf_size + i] = in_buffer[0][in_bufferPos + i];\n if (gfc.channels_out == 2)\n mfbuf[1][gfc.mf_size + i] = in_buffer[1][in_bufferPos + i];\n }\n }\n }\n\n}\n\nmodule.exports = Lame;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nfunction Presets() {\n function VBRPresets(qual, comp, compS,\n y, shThreshold, shThresholdS,\n adj, adjShort, lower,\n curve, sens, inter,\n joint, mod, fix) {\n this.vbr_q = qual;\n this.quant_comp = comp;\n this.quant_comp_s = compS;\n this.expY = y;\n this.st_lrm = shThreshold;\n this.st_s = shThresholdS;\n this.masking_adj = adj;\n this.masking_adj_short = adjShort;\n this.ath_lower = lower;\n this.ath_curve = curve;\n this.ath_sensitivity = sens;\n this.interch = inter;\n this.safejoint = joint;\n this.sfb21mod = mod;\n this.msfix = fix;\n }\n\n function ABRPresets(kbps, comp, compS,\n joint, fix, shThreshold,\n shThresholdS, bass, sc,\n mask, lower, curve,\n interCh, sfScale) {\n this.quant_comp = comp;\n this.quant_comp_s = compS;\n this.safejoint = joint;\n this.nsmsfix = fix;\n this.st_lrm = shThreshold;\n this.st_s = shThresholdS;\n this.nsbass = bass;\n this.scale = sc;\n this.masking_adj = mask;\n this.ath_lower = lower;\n this.ath_curve = curve;\n this.interch = interCh;\n this.sfscale = sfScale;\n }\n\n var lame;\n\n this.setModules = function (_lame) {\n lame = _lame;\n };\n\n /**\n *

\n     * Switch mappings for VBR mode VBR_RH\n     *             vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix\n     * 
\n */\n var vbr_old_switch_map = [\n new VBRPresets(0, 9, 9, 0, 5.20, 125.0, -4.2, -6.3, 4.8, 1, 0, 0, 2, 21, 0.97),\n new VBRPresets(1, 9, 9, 0, 5.30, 125.0, -3.6, -5.6, 4.5, 1.5, 0, 0, 2, 21, 1.35),\n new VBRPresets(2, 9, 9, 0, 5.60, 125.0, -2.2, -3.5, 2.8, 2, 0, 0, 2, 21, 1.49),\n new VBRPresets(3, 9, 9, 1, 5.80, 130.0, -1.8, -2.8, 2.6, 3, -4, 0, 2, 20, 1.64),\n new VBRPresets(4, 9, 9, 1, 6.00, 135.0, -0.7, -1.1, 1.1, 3.5, -8, 0, 2, 0, 1.79),\n new VBRPresets(5, 9, 9, 1, 6.40, 140.0, 0.5, 0.4, -7.5, 4, -12, 0.0002, 0, 0, 1.95),\n new VBRPresets(6, 9, 9, 1, 6.60, 145.0, 0.67, 0.65, -14.7, 6.5, -19, 0.0004, 0, 0, 2.30),\n new VBRPresets(7, 9, 9, 1, 6.60, 145.0, 0.8, 0.75, -19.7, 8, -22, 0.0006, 0, 0, 2.70),\n new VBRPresets(8, 9, 9, 1, 6.60, 145.0, 1.2, 1.15, -27.5, 10, -23, 0.0007, 0, 0, 0),\n new VBRPresets(9, 9, 9, 1, 6.60, 145.0, 1.6, 1.6, -36, 11, -25, 0.0008, 0, 0, 0),\n new VBRPresets(10, 9, 9, 1, 6.60, 145.0, 2.0, 2.0, -36, 12, -25, 0.0008, 0, 0, 0)\n ];\n\n /**\n *
\n     *                 vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix\n     * 
\n */\n var vbr_psy_switch_map = [\n new VBRPresets(0, 9, 9, 0, 4.20, 25.0, -7.0, -4.0, 7.5, 1, 0, 0, 2, 26, 0.97),\n new VBRPresets(1, 9, 9, 0, 4.20, 25.0, -5.6, -3.6, 4.5, 1.5, 0, 0, 2, 21, 1.35),\n new VBRPresets(2, 9, 9, 0, 4.20, 25.0, -4.4, -1.8, 2, 2, 0, 0, 2, 18, 1.49),\n new VBRPresets(3, 9, 9, 1, 4.20, 25.0, -3.4, -1.25, 1.1, 3, -4, 0, 2, 15, 1.64),\n new VBRPresets(4, 9, 9, 1, 4.20, 25.0, -2.2, 0.1, 0, 3.5, -8, 0, 2, 0, 1.79),\n new VBRPresets(5, 9, 9, 1, 4.20, 25.0, -1.0, 1.65, -7.7, 4, -12, 0.0002, 0, 0, 1.95),\n new VBRPresets(6, 9, 9, 1, 4.20, 25.0, -0.0, 2.47, -7.7, 6.5, -19, 0.0004, 0, 0, 2),\n new VBRPresets(7, 9, 9, 1, 4.20, 25.0, 0.5, 2.0, -14.5, 8, -22, 0.0006, 0, 0, 2),\n new VBRPresets(8, 9, 9, 1, 4.20, 25.0, 1.0, 2.4, -22.0, 10, -23, 0.0007, 0, 0, 2),\n new VBRPresets(9, 9, 9, 1, 4.20, 25.0, 1.5, 2.95, -30.0, 11, -25, 0.0008, 0, 0, 2),\n new VBRPresets(10, 9, 9, 1, 4.20, 25.0, 2.0, 2.95, -36.0, 12, -30, 0.0008, 0, 0, 2)\n ];\n\n function apply_vbr_preset(gfp, a, enforce) {\n var vbr_preset = gfp.VBR == VbrMode.vbr_rh ? vbr_old_switch_map\n : vbr_psy_switch_map;\n\n var x = gfp.VBR_q_frac;\n var p = vbr_preset[a];\n var q = vbr_preset[a + 1];\n var set = p;\n\n // NOOP(vbr_q);\n // NOOP(quant_comp);\n // NOOP(quant_comp_s);\n // NOOP(expY);\n p.st_lrm = p.st_lrm + x * (q.st_lrm - p.st_lrm);\n // LERP(st_lrm);\n p.st_s = p.st_s + x * (q.st_s - p.st_s);\n // LERP(st_s);\n p.masking_adj = p.masking_adj + x * (q.masking_adj - p.masking_adj);\n // LERP(masking_adj);\n p.masking_adj_short = p.masking_adj_short + x\n * (q.masking_adj_short - p.masking_adj_short);\n // LERP(masking_adj_short);\n p.ath_lower = p.ath_lower + x * (q.ath_lower - p.ath_lower);\n // LERP(ath_lower);\n p.ath_curve = p.ath_curve + x * (q.ath_curve - p.ath_curve);\n // LERP(ath_curve);\n p.ath_sensitivity = p.ath_sensitivity + x\n * (q.ath_sensitivity - p.ath_sensitivity);\n // LERP(ath_sensitivity);\n p.interch = p.interch + x * (q.interch - p.interch);\n // LERP(interch);\n // NOOP(safejoint);\n // NOOP(sfb21mod);\n p.msfix = p.msfix + x * (q.msfix - p.msfix);\n // LERP(msfix);\n\n lame_set_VBR_q(gfp, set.vbr_q);\n\n if (enforce != 0)\n gfp.quant_comp = set.quant_comp;\n else if (!(Math.abs(gfp.quant_comp - -1) > 0))\n gfp.quant_comp = set.quant_comp;\n // SET_OPTION(quant_comp, set.quant_comp, -1);\n if (enforce != 0)\n gfp.quant_comp_short = set.quant_comp_s;\n else if (!(Math.abs(gfp.quant_comp_short - -1) > 0))\n gfp.quant_comp_short = set.quant_comp_s;\n // SET_OPTION(quant_comp_short, set.quant_comp_s, -1);\n if (set.expY != 0) {\n gfp.experimentalY = set.expY != 0;\n }\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre = set.st_lrm;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre = set.st_lrm;\n // SET_OPTION(short_threshold_lrm, set.st_lrm, -1);\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre_s = set.st_s;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre_s = set.st_s;\n // SET_OPTION(short_threshold_s, set.st_s, -1);\n if (enforce != 0)\n gfp.maskingadjust = set.masking_adj;\n else if (!(Math.abs(gfp.maskingadjust - 0) > 0))\n gfp.maskingadjust = set.masking_adj;\n // SET_OPTION(maskingadjust, set.masking_adj, 0);\n if (enforce != 0)\n gfp.maskingadjust_short = set.masking_adj_short;\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = set.masking_adj_short;\n // SET_OPTION(maskingadjust_short, set.masking_adj_short, 0);\n if (enforce != 0)\n gfp.ATHlower = -set.ath_lower / 10.0;\n else if (!(Math.abs((-gfp.ATHlower * 10.0) - 0) > 0))\n gfp.ATHlower = -set.ath_lower / 10.0;\n // SET_OPTION(ATHlower, set.ath_lower, 0);\n if (enforce != 0)\n gfp.ATHcurve = set.ath_curve;\n else if (!(Math.abs(gfp.ATHcurve - -1) > 0))\n gfp.ATHcurve = set.ath_curve;\n // SET_OPTION(ATHcurve, set.ath_curve, -1);\n if (enforce != 0)\n gfp.athaa_sensitivity = set.ath_sensitivity;\n else if (!(Math.abs(gfp.athaa_sensitivity - -1) > 0))\n gfp.athaa_sensitivity = set.ath_sensitivity;\n // SET_OPTION(athaa_sensitivity, set.ath_sensitivity, 0);\n if (set.interch > 0) {\n if (enforce != 0)\n gfp.interChRatio = set.interch;\n else if (!(Math.abs(gfp.interChRatio - -1) > 0))\n gfp.interChRatio = set.interch;\n // SET_OPTION(interChRatio, set.interch, -1);\n }\n\n /* parameters for which there is no proper set/get interface */\n if (set.safejoint > 0) {\n gfp.exp_nspsytune = gfp.exp_nspsytune | set.safejoint;\n }\n if (set.sfb21mod > 0) {\n gfp.exp_nspsytune = gfp.exp_nspsytune | (set.sfb21mod << 20);\n }\n if (enforce != 0)\n gfp.msfix = set.msfix;\n else if (!(Math.abs(gfp.msfix - -1) > 0))\n gfp.msfix = set.msfix;\n // SET_OPTION(msfix, set.msfix, -1);\n\n if (enforce == 0) {\n gfp.VBR_q = a;\n gfp.VBR_q_frac = x;\n }\n }\n\n /**\n *
\n     *  Switch mappings for ABR mode\n     *\n     *              kbps  quant q_s safejoint nsmsfix st_lrm  st_s  ns-bass scale   msk ath_lwr ath_curve  interch , sfscale\n     * 
\n */\n var abr_switch_map = [\n new ABRPresets(8, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -30.0, 11, 0.0012, 1), /* 8, impossible to use in stereo */\n new ABRPresets(16, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -25.0, 11, 0.0010, 1), /* 16 */\n new ABRPresets(24, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -20.0, 11, 0.0010, 1), /* 24 */\n new ABRPresets(32, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -15.0, 11, 0.0010, 1), /* 32 */\n new ABRPresets(40, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -10.0, 11, 0.0009, 1), /* 40 */\n new ABRPresets(48, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -10.0, 11, 0.0009, 1), /* 48 */\n new ABRPresets(56, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -6.0, 11, 0.0008, 1), /* 56 */\n new ABRPresets(64, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -2.0, 11, 0.0008, 1), /* 64 */\n new ABRPresets(80, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, .0, 8, 0.0007, 1), /* 80 */\n new ABRPresets(96, 9, 9, 0, 2.50, 6.60, 145, 0, 0.95, 0, 1.0, 5.5, 0.0006, 1), /* 96 */\n new ABRPresets(112, 9, 9, 0, 2.25, 6.60, 145, 0, 0.95, 0, 2.0, 4.5, 0.0005, 1), /* 112 */\n new ABRPresets(128, 9, 9, 0, 1.95, 6.40, 140, 0, 0.95, 0, 3.0, 4, 0.0002, 1), /* 128 */\n new ABRPresets(160, 9, 9, 1, 1.79, 6.00, 135, 0, 0.95, -2, 5.0, 3.5, 0, 1), /* 160 */\n new ABRPresets(192, 9, 9, 1, 1.49, 5.60, 125, 0, 0.97, -4, 7.0, 3, 0, 0), /* 192 */\n new ABRPresets(224, 9, 9, 1, 1.25, 5.20, 125, 0, 0.98, -6, 9.0, 2, 0, 0), /* 224 */\n new ABRPresets(256, 9, 9, 1, 0.97, 5.20, 125, 0, 1.00, -8, 10.0, 1, 0, 0), /* 256 */\n new ABRPresets(320, 9, 9, 1, 0.90, 5.20, 125, 0, 1.00, -10, 12.0, 0, 0, 0) /* 320 */\n ];\n\n function apply_abr_preset(gfp, preset, enforce) {\n /* Variables for the ABR stuff */\n var actual_bitrate = preset;\n\n var r = lame.nearestBitrateFullIndex(preset);\n\n gfp.VBR = VbrMode.vbr_abr;\n gfp.VBR_mean_bitrate_kbps = actual_bitrate;\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps, 320);\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps, 8);\n gfp.brate = gfp.VBR_mean_bitrate_kbps;\n if (gfp.VBR_mean_bitrate_kbps > 320) {\n gfp.disable_reservoir = true;\n }\n\n /* parameters for which there is no proper set/get interface */\n if (abr_switch_map[r].safejoint > 0)\n gfp.exp_nspsytune = gfp.exp_nspsytune | 2;\n /* safejoint */\n\n if (abr_switch_map[r].sfscale > 0) {\n gfp.internal_flags.noise_shaping = 2;\n }\n /* ns-bass tweaks */\n if (Math.abs(abr_switch_map[r].nsbass) > 0) {\n var k = (int)(abr_switch_map[r].nsbass * 4);\n if (k < 0)\n k += 64;\n gfp.exp_nspsytune = gfp.exp_nspsytune | (k << 2);\n }\n\n if (enforce != 0)\n gfp.quant_comp = abr_switch_map[r].quant_comp;\n else if (!(Math.abs(gfp.quant_comp - -1) > 0))\n gfp.quant_comp = abr_switch_map[r].quant_comp;\n // SET_OPTION(quant_comp, abr_switch_map[r].quant_comp, -1);\n if (enforce != 0)\n gfp.quant_comp_short = abr_switch_map[r].quant_comp_s;\n else if (!(Math.abs(gfp.quant_comp_short - -1) > 0))\n gfp.quant_comp_short = abr_switch_map[r].quant_comp_s;\n // SET_OPTION(quant_comp_short, abr_switch_map[r].quant_comp_s, -1);\n\n if (enforce != 0)\n gfp.msfix = abr_switch_map[r].nsmsfix;\n else if (!(Math.abs(gfp.msfix - -1) > 0))\n gfp.msfix = abr_switch_map[r].nsmsfix;\n // SET_OPTION(msfix, abr_switch_map[r].nsmsfix, -1);\n\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre = abr_switch_map[r].st_lrm;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre = abr_switch_map[r].st_lrm;\n // SET_OPTION(short_threshold_lrm, abr_switch_map[r].st_lrm, -1);\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre_s = abr_switch_map[r].st_s;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre_s = abr_switch_map[r].st_s;\n // SET_OPTION(short_threshold_s, abr_switch_map[r].st_s, -1);\n\n /*\n * ABR seems to have big problems with clipping, especially at low\n * bitrates\n */\n /*\n * so we compensate for that here by using a scale value depending on\n * bitrate\n */\n if (enforce != 0)\n gfp.scale = abr_switch_map[r].scale;\n else if (!(Math.abs(gfp.scale - -1) > 0))\n gfp.scale = abr_switch_map[r].scale;\n // SET_OPTION(scale, abr_switch_map[r].scale, -1);\n\n if (enforce != 0)\n gfp.maskingadjust = abr_switch_map[r].masking_adj;\n else if (!(Math.abs(gfp.maskingadjust - 0) > 0))\n gfp.maskingadjust = abr_switch_map[r].masking_adj;\n // SET_OPTION(maskingadjust, abr_switch_map[r].masking_adj, 0);\n if (abr_switch_map[r].masking_adj > 0) {\n if (enforce != 0)\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * .9);\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * .9);\n // SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj *\n // .9, 0);\n } else {\n if (enforce != 0)\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * 1.1);\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * 1.1);\n // SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj *\n // 1.1, 0);\n }\n\n if (enforce != 0)\n gfp.ATHlower = -abr_switch_map[r].ath_lower / 10.;\n else if (!(Math.abs((-gfp.ATHlower * 10.) - 0) > 0))\n gfp.ATHlower = -abr_switch_map[r].ath_lower / 10.;\n // SET_OPTION(ATHlower, abr_switch_map[r].ath_lower, 0);\n if (enforce != 0)\n gfp.ATHcurve = abr_switch_map[r].ath_curve;\n else if (!(Math.abs(gfp.ATHcurve - -1) > 0))\n gfp.ATHcurve = abr_switch_map[r].ath_curve;\n // SET_OPTION(ATHcurve, abr_switch_map[r].ath_curve, -1);\n\n if (enforce != 0)\n gfp.interChRatio = abr_switch_map[r].interch;\n else if (!(Math.abs(gfp.interChRatio - -1) > 0))\n gfp.interChRatio = abr_switch_map[r].interch;\n // SET_OPTION(interChRatio, abr_switch_map[r].interch, -1);\n\n return preset;\n }\n\n this.apply_preset = function(gfp, preset, enforce) {\n /* translate legacy presets */\n switch (preset) {\n case Lame.R3MIX:\n {\n preset = Lame.V3;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.MEDIUM:\n {\n preset = Lame.V4;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.MEDIUM_FAST:\n {\n preset = Lame.V4;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.STANDARD:\n {\n preset = Lame.V2;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.STANDARD_FAST:\n {\n preset = Lame.V2;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.EXTREME:\n {\n preset = Lame.V0;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.EXTREME_FAST:\n {\n preset = Lame.V0;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.INSANE:\n {\n preset = 320;\n gfp.preset = preset;\n apply_abr_preset(gfp, preset, enforce);\n gfp.VBR = VbrMode.vbr_off;\n return preset;\n }\n }\n\n gfp.preset = preset;\n {\n switch (preset) {\n case Lame.V9:\n apply_vbr_preset(gfp, 9, enforce);\n return preset;\n case Lame.V8:\n apply_vbr_preset(gfp, 8, enforce);\n return preset;\n case Lame.V7:\n apply_vbr_preset(gfp, 7, enforce);\n return preset;\n case Lame.V6:\n apply_vbr_preset(gfp, 6, enforce);\n return preset;\n case Lame.V5:\n apply_vbr_preset(gfp, 5, enforce);\n return preset;\n case Lame.V4:\n apply_vbr_preset(gfp, 4, enforce);\n return preset;\n case Lame.V3:\n apply_vbr_preset(gfp, 3, enforce);\n return preset;\n case Lame.V2:\n apply_vbr_preset(gfp, 2, enforce);\n return preset;\n case Lame.V1:\n apply_vbr_preset(gfp, 1, enforce);\n return preset;\n case Lame.V0:\n apply_vbr_preset(gfp, 0, enforce);\n return preset;\n default:\n break;\n }\n }\n if (8 <= preset && preset <= 320) {\n return apply_abr_preset(gfp, preset, enforce);\n }\n\n /* no corresponding preset found */\n gfp.preset = 0;\n return preset;\n }\n\n // Rest from getset.c:\n\n /**\n * VBR quality level.
\n * 0 = highest
\n * 9 = lowest\n */\n function lame_set_VBR_q(gfp, VBR_q) {\n var ret = 0;\n\n if (0 > VBR_q) {\n /* Unknown VBR quality level! */\n ret = -1;\n VBR_q = 0;\n }\n if (9 < VBR_q) {\n ret = -1;\n VBR_q = 9;\n }\n\n gfp.VBR_q = VBR_q;\n gfp.VBR_q_frac = 0;\n return ret;\n }\n\n}\n\nmodule.exports = Presets;\n","function VBRQuantize() {\n var qupvt;\n var tak;\n\n this.setModules = function (_qupvt, _tk) {\n qupvt = _qupvt;\n tak = _tk;\n }\n //TODO\n\n}\n\nmodule.exports = VBRQuantize;\n","//package mp3;\n\nfunction CalcNoiseResult() {\n /**\n * sum of quantization noise > masking\n */\n this.over_noise = 0.;\n /**\n * sum of all quantization noise\n */\n this.tot_noise = 0.;\n /**\n * max quantization noise\n */\n this.max_noise = 0.;\n /**\n * number of quantization noise > masking\n */\n this.over_count = 0;\n /**\n * SSD-like cost of distorted bands\n */\n this.over_SSD = 0;\n this.bits = 0;\n}\n\nmodule.exports = CalcNoiseResult;\n","var common = require('./common.js');\nvar new_float = common.new_float;\nvar new_int = common.new_int;\nvar assert = common.assert;\n\nfunction CalcNoiseData() {\n this.global_gain = 0;\n this.sfb_count1 = 0;\n this.step = new_int(39);\n this.noise = new_float(39);\n this.noise_log = new_float(39);\n}\n\nmodule.exports = CalcNoiseData;\n","/*\n * MP3 quantization\n *\n * Copyright (c) 1999-2000 Mark Taylor\n * Copyright (c) 1999-2003 Takehiro Tominaga\n * Copyright (c) 2000-2007 Robert Hegemann\n * Copyright (c) 2001-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Quantize.java,v 1.24 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar VBRQuantize = require('./VBRQuantize.js');\nvar CalcNoiseResult = require('./CalcNoiseResult.js');\nvar CalcNoiseData = require('./CalcNoiseData.js');\nvar Encoder = require('./Encoder.js');\nvar GrInfo = require('./GrInfo.js');\nvar L3Side = require('./L3Side.js');\n\nfunction Quantize() {\n var bs;\n this.rv = null;\n var rv;\n this.qupvt = null;\n var qupvt;\n\n var vbr = new VBRQuantize();\n var tk;\n\n this.setModules = function (_bs, _rv, _qupvt, _tk) {\n bs = _bs;\n rv = _rv;\n this.rv = _rv;\n qupvt = _qupvt;\n this.qupvt = _qupvt;\n tk = _tk;\n vbr.setModules(qupvt, tk);\n }\n\n /**\n * convert from L/R <. Mid/Side\n */\n this.ms_convert = function (l3_side, gr) {\n for (var i = 0; i < 576; ++i) {\n var l = l3_side.tt[gr][0].xr[i];\n var r = l3_side.tt[gr][1].xr[i];\n l3_side.tt[gr][0].xr[i] = (l + r) * (Util.SQRT2 * 0.5);\n l3_side.tt[gr][1].xr[i] = (l - r) * (Util.SQRT2 * 0.5);\n }\n };\n\n /**\n * mt 6/99\n *\n * initializes cod_info, scalefac and xrpow\n *\n * returns 0 if all energies in xr are zero, else 1\n */\n function init_xrpow_core(cod_info, xrpow, upper, sum) {\n sum = 0;\n for (var i = 0; i <= upper; ++i) {\n var tmp = Math.abs(cod_info.xr[i]);\n sum += tmp;\n xrpow[i] = Math.sqrt(tmp * Math.sqrt(tmp));\n\n if (xrpow[i] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[i];\n }\n return sum;\n }\n\n this.init_xrpow = function (gfc, cod_info, xrpow) {\n var sum = 0;\n var upper = 0 | cod_info.max_nonzero_coeff;\n\n assert(xrpow != null);\n cod_info.xrpow_max = 0;\n\n /*\n * check if there is some energy we have to quantize and calculate xrpow\n * matching our fresh scalefactors\n */\n assert(0 <= upper && upper <= 575);\n\n Arrays.fill(xrpow, upper, 576, 0);\n\n sum = init_xrpow_core(cod_info, xrpow, upper, sum);\n\n /*\n * return 1 if we have something to quantize, else 0\n */\n if (sum > 1E-20) {\n var j = 0;\n if ((gfc.substep_shaping & 2) != 0)\n j = 1;\n\n for (var i = 0; i < cod_info.psymax; i++)\n gfc.pseudohalf[i] = j;\n\n return true;\n }\n\n Arrays.fill(cod_info.l3_enc, 0, 576, 0);\n return false;\n }\n\n /**\n * Gabriel Bouvigne feb/apr 2003
\n * Analog silence detection in partitionned sfb21 or sfb12 for short blocks\n *\n * From top to bottom of sfb, changes to 0 coeffs which are below ath. It\n * stops on the first coeff higher than ath.\n */\n function psfb21_analogsilence(gfc, cod_info) {\n var ath = gfc.ATH;\n var xr = cod_info.xr;\n\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n /* NORM, START or STOP type, but not SHORT blocks */\n var stop = false;\n for (var gsfb = Encoder.PSFB21 - 1; gsfb >= 0 && !stop; gsfb--) {\n var start = gfc.scalefac_band.psfb21[gsfb];\n var end = gfc.scalefac_band.psfb21[gsfb + 1];\n var ath21 = qupvt.athAdjust(ath.adjust, ath.psfb21[gsfb],\n ath.floor);\n\n if (gfc.nsPsy.longfact[21] > 1e-12)\n ath21 *= gfc.nsPsy.longfact[21];\n\n for (var j = end - 1; j >= start; j--) {\n if (Math.abs(xr[j]) < ath21)\n xr[j] = 0;\n else {\n stop = true;\n break;\n }\n }\n }\n } else {\n /* note: short blocks coeffs are reordered */\n for (var block = 0; block < 3; block++) {\n var stop = false;\n for (var gsfb = Encoder.PSFB12 - 1; gsfb >= 0 && !stop; gsfb--) {\n var start = gfc.scalefac_band.s[12]\n * 3\n + (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12])\n * block\n + (gfc.scalefac_band.psfb12[gsfb] - gfc.scalefac_band.psfb12[0]);\n var end = start\n + (gfc.scalefac_band.psfb12[gsfb + 1] - gfc.scalefac_band.psfb12[gsfb]);\n var ath12 = qupvt.athAdjust(ath.adjust, ath.psfb12[gsfb],\n ath.floor);\n\n if (gfc.nsPsy.shortfact[12] > 1e-12)\n ath12 *= gfc.nsPsy.shortfact[12];\n\n for (var j = end - 1; j >= start; j--) {\n if (Math.abs(xr[j]) < ath12)\n xr[j] = 0;\n else {\n stop = true;\n break;\n }\n }\n }\n }\n }\n\n }\n\n this.init_outer_loop = function (gfc, cod_info) {\n /*\n * initialize fresh cod_info\n */\n cod_info.part2_3_length = 0;\n cod_info.big_values = 0;\n cod_info.count1 = 0;\n cod_info.global_gain = 210;\n cod_info.scalefac_compress = 0;\n /* mixed_block_flag, block_type was set in psymodel.c */\n cod_info.table_select[0] = 0;\n cod_info.table_select[1] = 0;\n cod_info.table_select[2] = 0;\n cod_info.subblock_gain[0] = 0;\n cod_info.subblock_gain[1] = 0;\n cod_info.subblock_gain[2] = 0;\n cod_info.subblock_gain[3] = 0;\n /* this one is always 0 */\n cod_info.region0_count = 0;\n cod_info.region1_count = 0;\n cod_info.preflag = 0;\n cod_info.scalefac_scale = 0;\n cod_info.count1table_select = 0;\n cod_info.part2_length = 0;\n cod_info.sfb_lmax = Encoder.SBPSY_l;\n cod_info.sfb_smin = Encoder.SBPSY_s;\n cod_info.psy_lmax = gfc.sfb21_extra ? Encoder.SBMAX_l : Encoder.SBPSY_l;\n cod_info.psymax = cod_info.psy_lmax;\n cod_info.sfbmax = cod_info.sfb_lmax;\n cod_info.sfbdivide = 11;\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n cod_info.width[sfb] = gfc.scalefac_band.l[sfb + 1]\n - gfc.scalefac_band.l[sfb];\n /* which is always 0. */\n cod_info.window[sfb] = 3;\n }\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n var ixwork = new_float(576);\n\n cod_info.sfb_smin = 0;\n cod_info.sfb_lmax = 0;\n if (cod_info.mixed_block_flag != 0) {\n /*\n * MPEG-1: sfbs 0-7 long block, 3-12 short blocks MPEG-2(.5):\n * sfbs 0-5 long block, 3-12 short blocks\n */\n cod_info.sfb_smin = 3;\n cod_info.sfb_lmax = gfc.mode_gr * 2 + 4;\n }\n cod_info.psymax = cod_info.sfb_lmax\n + 3\n * ((gfc.sfb21_extra ? Encoder.SBMAX_s : Encoder.SBPSY_s) - cod_info.sfb_smin);\n cod_info.sfbmax = cod_info.sfb_lmax + 3\n * (Encoder.SBPSY_s - cod_info.sfb_smin);\n cod_info.sfbdivide = cod_info.sfbmax - 18;\n cod_info.psy_lmax = cod_info.sfb_lmax;\n /* re-order the short blocks, for more efficient encoding below */\n /* By Takehiro TOMINAGA */\n /*\n * Within each scalefactor band, data is given for successive time\n * windows, beginning with window 0 and ending with window 2. Within\n * each window, the quantized values are then arranged in order of\n * increasing frequency...\n */\n var ix = gfc.scalefac_band.l[cod_info.sfb_lmax];\n System.arraycopy(cod_info.xr, 0, ixwork, 0, 576);\n for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n for (var window = 0; window < 3; window++) {\n for (var l = start; l < end; l++) {\n cod_info.xr[ix++] = ixwork[3 * l + window];\n }\n }\n }\n\n var j = cod_info.sfb_lmax;\n for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n cod_info.width[j] = cod_info.width[j + 1] = cod_info.width[j + 2] = gfc.scalefac_band.s[sfb + 1]\n - gfc.scalefac_band.s[sfb];\n cod_info.window[j] = 0;\n cod_info.window[j + 1] = 1;\n cod_info.window[j + 2] = 2;\n j += 3;\n }\n }\n\n cod_info.count1bits = 0;\n cod_info.sfb_partition_table = qupvt.nr_of_sfb_block[0][0];\n cod_info.slen[0] = 0;\n cod_info.slen[1] = 0;\n cod_info.slen[2] = 0;\n cod_info.slen[3] = 0;\n\n cod_info.max_nonzero_coeff = 575;\n\n /*\n * fresh scalefactors are all zero\n */\n Arrays.fill(cod_info.scalefac, 0);\n\n psfb21_analogsilence(gfc, cod_info);\n };\n\n function BinSearchDirection(ordinal) {\n this.ordinal = ordinal;\n }\n\n BinSearchDirection.BINSEARCH_NONE = new BinSearchDirection(0);\n BinSearchDirection.BINSEARCH_UP = new BinSearchDirection(1);\n BinSearchDirection.BINSEARCH_DOWN = new BinSearchDirection(2);\n\n /**\n * author/date??\n *\n * binary step size search used by outer_loop to get a quantizer step size\n * to start with\n */\n function bin_search_StepSize(gfc, cod_info, desired_rate, ch, xrpow) {\n var nBits;\n var CurrentStep = gfc.CurrentStep[ch];\n var flagGoneOver = false;\n var start = gfc.OldValue[ch];\n var Direction = BinSearchDirection.BINSEARCH_NONE;\n cod_info.global_gain = start;\n desired_rate -= cod_info.part2_length;\n\n assert(CurrentStep != 0);\n for (; ;) {\n var step;\n nBits = tk.count_bits(gfc, xrpow, cod_info, null);\n\n if (CurrentStep == 1 || nBits == desired_rate)\n break;\n /* nothing to adjust anymore */\n\n if (nBits > desired_rate) {\n /* increase Quantize_StepSize */\n if (Direction == BinSearchDirection.BINSEARCH_DOWN)\n flagGoneOver = true;\n\n if (flagGoneOver)\n CurrentStep /= 2;\n Direction = BinSearchDirection.BINSEARCH_UP;\n step = CurrentStep;\n } else {\n /* decrease Quantize_StepSize */\n if (Direction == BinSearchDirection.BINSEARCH_UP)\n flagGoneOver = true;\n\n if (flagGoneOver)\n CurrentStep /= 2;\n Direction = BinSearchDirection.BINSEARCH_DOWN;\n step = -CurrentStep;\n }\n cod_info.global_gain += step;\n if (cod_info.global_gain < 0) {\n cod_info.global_gain = 0;\n flagGoneOver = true;\n }\n if (cod_info.global_gain > 255) {\n cod_info.global_gain = 255;\n flagGoneOver = true;\n }\n }\n\n assert(cod_info.global_gain >= 0);\n assert(cod_info.global_gain < 256);\n\n while (nBits > desired_rate && cod_info.global_gain < 255) {\n cod_info.global_gain++;\n nBits = tk.count_bits(gfc, xrpow, cod_info, null);\n }\n gfc.CurrentStep[ch] = (start - cod_info.global_gain >= 4) ? 4 : 2;\n gfc.OldValue[ch] = cod_info.global_gain;\n cod_info.part2_3_length = nBits;\n return nBits;\n }\n\n this.trancate_smallspectrums = function (gfc, gi, l3_xmin, work) {\n var distort = new_float(L3Side.SFBMAX);\n\n if ((0 == (gfc.substep_shaping & 4) && gi.block_type == Encoder.SHORT_TYPE)\n || (gfc.substep_shaping & 0x80) != 0)\n return;\n qupvt.calc_noise(gi, l3_xmin, distort, new CalcNoiseResult(), null);\n for (var j = 0; j < 576; j++) {\n var xr = 0.0;\n if (gi.l3_enc[j] != 0)\n xr = Math.abs(gi.xr[j]);\n work[j] = xr;\n }\n\n var j = 0;\n var sfb = 8;\n if (gi.block_type == Encoder.SHORT_TYPE)\n sfb = 6;\n do {\n var allowedNoise, trancateThreshold;\n var nsame, start;\n\n var width = gi.width[sfb];\n j += width;\n if (distort[sfb] >= 1.0)\n continue;\n\n Arrays.sort(work, j - width, width);\n if (BitStream.EQ(work[j - 1], 0.0))\n continue;\n /* all zero sfb */\n\n allowedNoise = (1.0 - distort[sfb]) * l3_xmin[sfb];\n trancateThreshold = 0.0;\n start = 0;\n do {\n var noise;\n for (nsame = 1; start + nsame < width; nsame++)\n if (BitStream.NEQ(work[start + j - width], work[start + j\n + nsame - width]))\n break;\n\n noise = work[start + j - width] * work[start + j - width]\n * nsame;\n if (allowedNoise < noise) {\n if (start != 0)\n trancateThreshold = work[start + j - width - 1];\n break;\n }\n allowedNoise -= noise;\n start += nsame;\n } while (start < width);\n if (BitStream.EQ(trancateThreshold, 0.0))\n continue;\n\n do {\n if (Math.abs(gi.xr[j - width]) <= trancateThreshold)\n gi.l3_enc[j - width] = 0;\n } while (--width > 0);\n } while (++sfb < gi.psymax);\n\n gi.part2_3_length = tk.noquant_count_bits(gfc, gi, null);\n };\n\n /**\n * author/date??\n *\n * Function: Returns zero if there is a scalefac which has not been\n * amplified. Otherwise it returns one.\n */\n function loop_break(cod_info) {\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++)\n if (cod_info.scalefac[sfb]\n + cod_info.subblock_gain[cod_info.window[sfb]] == 0)\n return false;\n\n return true;\n }\n\n /* mt 5/99: Function: Improved calc_noise for a single channel */\n\n function penalties(noise) {\n return Util.FAST_LOG10((0.368 + 0.632 * noise * noise * noise));\n }\n\n /**\n * author/date??\n *\n * several different codes to decide which quantization is better\n */\n function get_klemm_noise(distort, gi) {\n var klemm_noise = 1E-37;\n for (var sfb = 0; sfb < gi.psymax; sfb++)\n klemm_noise += penalties(distort[sfb]);\n\n return Math.max(1e-20, klemm_noise);\n }\n\n function quant_compare(quant_comp, best, calc, gi, distort) {\n /**\n * noise is given in decibels (dB) relative to masking thesholds.
\n *\n * over_noise: ??? (the previous comment is fully wrong)
\n * tot_noise: ??? (the previous comment is fully wrong)
\n * max_noise: max quantization noise\n */\n var better;\n\n switch (quant_comp) {\n default:\n case 9:\n {\n if (best.over_count > 0) {\n /* there are distorted sfb */\n better = calc.over_SSD <= best.over_SSD;\n if (calc.over_SSD == best.over_SSD)\n better = calc.bits < best.bits;\n } else {\n /* no distorted sfb */\n better = ((calc.max_noise < 0) && ((calc.max_noise * 10 + calc.bits) <= (best.max_noise * 10 + best.bits)));\n }\n break;\n }\n\n case 0:\n better = calc.over_count < best.over_count\n || (calc.over_count == best.over_count && calc.over_noise < best.over_noise)\n || (calc.over_count == best.over_count\n && BitStream.EQ(calc.over_noise, best.over_noise) && calc.tot_noise < best.tot_noise);\n break;\n\n case 8:\n calc.max_noise = get_klemm_noise(distort, gi);\n //$FALL-THROUGH$\n case 1:\n better = calc.max_noise < best.max_noise;\n break;\n case 2:\n better = calc.tot_noise < best.tot_noise;\n break;\n case 3:\n better = (calc.tot_noise < best.tot_noise)\n && (calc.max_noise < best.max_noise);\n break;\n case 4:\n better = (calc.max_noise <= 0.0 && best.max_noise > 0.2)\n || (calc.max_noise <= 0.0 && best.max_noise < 0.0\n && best.max_noise > calc.max_noise - 0.2 && calc.tot_noise < best.tot_noise)\n || (calc.max_noise <= 0.0 && best.max_noise > 0.0\n && best.max_noise > calc.max_noise - 0.2 && calc.tot_noise < best.tot_noise\n + best.over_noise)\n || (calc.max_noise > 0.0 && best.max_noise > -0.05\n && best.max_noise > calc.max_noise - 0.1 && calc.tot_noise\n + calc.over_noise < best.tot_noise\n + best.over_noise)\n || (calc.max_noise > 0.0 && best.max_noise > -0.1\n && best.max_noise > calc.max_noise - 0.15 && calc.tot_noise\n + calc.over_noise + calc.over_noise < best.tot_noise\n + best.over_noise + best.over_noise);\n break;\n case 5:\n better = calc.over_noise < best.over_noise\n || (BitStream.EQ(calc.over_noise, best.over_noise) && calc.tot_noise < best.tot_noise);\n break;\n case 6:\n better = calc.over_noise < best.over_noise\n || (BitStream.EQ(calc.over_noise, best.over_noise) && (calc.max_noise < best.max_noise || (BitStream\n .EQ(calc.max_noise, best.max_noise) && calc.tot_noise <= best.tot_noise)));\n break;\n case 7:\n better = calc.over_count < best.over_count\n || calc.over_noise < best.over_noise;\n break;\n }\n\n if (best.over_count == 0) {\n /*\n * If no distorted bands, only use this quantization if it is\n * better, and if it uses less bits. Unfortunately, part2_3_length\n * is sometimes a poor estimator of the final size at low bitrates.\n */\n better = better && calc.bits < best.bits;\n }\n\n return better;\n }\n\n /**\n * author/date??\n *\n *
\n     *  Amplify the scalefactor bands that violate the masking threshold.\n     *  See ISO 11172-3 Section C.1.5.4.3.5\n     *\n     *  distort[] = noise/masking\n     *  distort[] > 1   ==> noise is not masked\n     *  distort[] < 1   ==> noise is masked\n     *  max_dist = maximum value of distort[]\n     *\n     *  Three algorithms:\n     *  noise_shaping_amp\n     *        0             Amplify all bands with distort[]>1.\n     *\n     *        1             Amplify all bands with distort[] >= max_dist^(.5);\n     *                     ( 50% in the db scale)\n     *\n     *        2             Amplify first band with distort[] >= max_dist;\n     *\n     *\n     *  For algorithms 0 and 1, if max_dist < 1, then amplify all bands\n     *  with distort[] >= .95*max_dist.  This is to make sure we always\n     *  amplify at least one band.\n     * 
\n */\n function amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine) {\n var gfc = gfp.internal_flags;\n var ifqstep34;\n\n if (cod_info.scalefac_scale == 0) {\n ifqstep34 = 1.29683955465100964055;\n /* 2**(.75*.5) */\n } else {\n ifqstep34 = 1.68179283050742922612;\n /* 2**(.75*1) */\n }\n\n /* compute maximum value of distort[] */\n var trigger = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n if (trigger < distort[sfb])\n trigger = distort[sfb];\n }\n\n var noise_shaping_amp = gfc.noise_shaping_amp;\n if (noise_shaping_amp == 3) {\n if (bRefine)\n noise_shaping_amp = 2;\n else\n noise_shaping_amp = 1;\n }\n switch (noise_shaping_amp) {\n case 2:\n /* amplify exactly 1 band */\n break;\n\n case 1:\n /* amplify bands within 50% of max (on db scale) */\n if (trigger > 1.0)\n trigger = Math.pow(trigger, .5);\n else\n trigger *= .95;\n break;\n\n case 0:\n default:\n /* ISO algorithm. amplify all bands with distort>1 */\n if (trigger > 1.0)\n trigger = 1.0;\n else\n trigger *= .95;\n break;\n }\n\n var j = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n var width = cod_info.width[sfb];\n var l;\n j += width;\n if (distort[sfb] < trigger)\n continue;\n\n if ((gfc.substep_shaping & 2) != 0) {\n gfc.pseudohalf[sfb] = (0 == gfc.pseudohalf[sfb]) ? 1 : 0;\n if (0 == gfc.pseudohalf[sfb] && gfc.noise_shaping_amp == 2)\n return;\n }\n cod_info.scalefac[sfb]++;\n for (l = -width; l < 0; l++) {\n xrpow[j + l] *= ifqstep34;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n\n if (gfc.noise_shaping_amp == 2)\n return;\n }\n }\n\n /**\n * Takehiro Tominaga 2000-xx-xx\n *\n * turns on scalefac scale and adjusts scalefactors\n */\n function inc_scalefac_scale(cod_info, xrpow) {\n var ifqstep34 = 1.29683955465100964055;\n\n var j = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n var width = cod_info.width[sfb];\n var s = cod_info.scalefac[sfb];\n if (cod_info.preflag != 0)\n s += qupvt.pretab[sfb];\n j += width;\n if ((s & 1) != 0) {\n s++;\n for (var l = -width; l < 0; l++) {\n xrpow[j + l] *= ifqstep34;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n }\n cod_info.scalefac[sfb] = s >> 1;\n }\n cod_info.preflag = 0;\n cod_info.scalefac_scale = 1;\n }\n\n /**\n * Takehiro Tominaga 2000-xx-xx\n *\n * increases the subblock gain and adjusts scalefactors\n */\n function inc_subblock_gain(gfc, cod_info, xrpow) {\n var sfb;\n var scalefac = cod_info.scalefac;\n\n /* subbloc_gain can't do anything in the long block region */\n for (sfb = 0; sfb < cod_info.sfb_lmax; sfb++) {\n if (scalefac[sfb] >= 16)\n return true;\n }\n\n for (var window = 0; window < 3; window++) {\n var s1 = 0;\n var s2 = 0;\n\n for (sfb = cod_info.sfb_lmax + window; sfb < cod_info.sfbdivide; sfb += 3) {\n if (s1 < scalefac[sfb])\n s1 = scalefac[sfb];\n }\n for (; sfb < cod_info.sfbmax; sfb += 3) {\n if (s2 < scalefac[sfb])\n s2 = scalefac[sfb];\n }\n\n if (s1 < 16 && s2 < 8)\n continue;\n\n if (cod_info.subblock_gain[window] >= 7)\n return true;\n\n /*\n * even though there is no scalefactor for sfb12 subblock gain\n * affects upper frequencies too, that's why we have to go up to\n * SBMAX_s\n */\n cod_info.subblock_gain[window]++;\n var j = gfc.scalefac_band.l[cod_info.sfb_lmax];\n for (sfb = cod_info.sfb_lmax + window; sfb < cod_info.sfbmax; sfb += 3) {\n var amp;\n var width = cod_info.width[sfb];\n var s = scalefac[sfb];\n assert(s >= 0);\n s = s - (4 >> cod_info.scalefac_scale);\n if (s >= 0) {\n scalefac[sfb] = s;\n j += width * 3;\n continue;\n }\n\n scalefac[sfb] = 0;\n {\n var gain = 210 + (s << (cod_info.scalefac_scale + 1));\n amp = qupvt.IPOW20(gain);\n }\n j += width * (window + 1);\n for (var l = -width; l < 0; l++) {\n xrpow[j + l] *= amp;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n j += width * (3 - window - 1);\n }\n\n {\n var amp = qupvt.IPOW20(202);\n j += cod_info.width[sfb] * (window + 1);\n for (var l = -cod_info.width[sfb]; l < 0; l++) {\n xrpow[j + l] *= amp;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n }\n }\n return false;\n }\n\n /**\n *
\n     *  Takehiro Tominaga /date??\n     *  Robert Hegemann 2000-09-06: made a function of it\n     *\n     *  amplifies scalefactor bands,\n     *   - if all are already amplified returns 0\n     *   - if some bands are amplified too much:\n     *      * try to increase scalefac_scale\n     *      * if already scalefac_scale was set\n     *          try on short blocks to increase subblock gain\n     * 
\n */\n function balance_noise(gfp, cod_info, distort, xrpow, bRefine) {\n var gfc = gfp.internal_flags;\n\n amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine);\n\n /*\n * check to make sure we have not amplified too much loop_break returns\n * 0 if there is an unamplified scalefac scale_bitcount returns 0 if no\n * scalefactors are too large\n */\n\n var status = loop_break(cod_info);\n\n if (status)\n return false;\n /* all bands amplified */\n\n /*\n * not all scalefactors have been amplified. so these scalefacs are\n * possibly valid. encode them:\n */\n if (gfc.mode_gr == 2)\n status = tk.scale_bitcount(cod_info);\n else\n status = tk.scale_bitcount_lsf(gfc, cod_info);\n\n if (!status)\n return true;\n /* amplified some bands not exceeding limits */\n\n /*\n * some scalefactors are too large. lets try setting scalefac_scale=1\n */\n if (gfc.noise_shaping > 1) {\n Arrays.fill(gfc.pseudohalf, 0);\n if (0 == cod_info.scalefac_scale) {\n inc_scalefac_scale(cod_info, xrpow);\n status = false;\n } else {\n if (cod_info.block_type == Encoder.SHORT_TYPE\n && gfc.subblock_gain > 0) {\n status = (inc_subblock_gain(gfc, cod_info, xrpow) || loop_break(cod_info));\n }\n }\n }\n\n if (!status) {\n if (gfc.mode_gr == 2)\n status = tk.scale_bitcount(cod_info);\n else\n status = tk.scale_bitcount_lsf(gfc, cod_info);\n }\n return !status;\n }\n\n /**\n *
\n     *  Function: The outer iteration loop controls the masking conditions\n     *  of all scalefactorbands. It computes the best scalefac and\n     *  global gain. This module calls the inner iteration loop\n     *\n     *  mt 5/99 completely rewritten to allow for bit reservoir control,\n     *  mid/side channels with L/R or mid/side masking thresholds,\n     *  and chooses best quantization instead of last quantization when\n     *  no distortion free quantization can be found.\n     *\n     *  added VBR support mt 5/99\n     *\n     *  some code shuffle rh 9/00\n     * 
\n *\n * @param l3_xmin\n * allowed distortion\n * @param xrpow\n * coloured magnitudes of spectral\n * @param targ_bits\n * maximum allowed bits\n */\n this.outer_loop = function (gfp, cod_info, l3_xmin, xrpow, ch, targ_bits) {\n var gfc = gfp.internal_flags;\n var cod_info_w = new GrInfo();\n var save_xrpow = new_float(576);\n var distort = new_float(L3Side.SFBMAX);\n var best_noise_info = new CalcNoiseResult();\n var better;\n var prev_noise = new CalcNoiseData();\n var best_part2_3_length = 9999999;\n var bEndOfSearch = false;\n var bRefine = false;\n var best_ggain_pass1 = 0;\n\n bin_search_StepSize(gfc, cod_info, targ_bits, ch, xrpow);\n\n if (0 == gfc.noise_shaping)\n /* fast mode, no noise shaping, we are ready */\n return 100;\n /* default noise_info.over_count */\n\n /* compute the distortion in this quantization */\n /* coefficients and thresholds both l/r (or both mid/side) */\n qupvt.calc_noise(cod_info, l3_xmin, distort, best_noise_info,\n prev_noise);\n best_noise_info.bits = cod_info.part2_3_length;\n\n cod_info_w.assign(cod_info);\n var age = 0;\n System.arraycopy(xrpow, 0, save_xrpow, 0, 576);\n\n while (!bEndOfSearch) {\n /* BEGIN MAIN LOOP */\n do {\n var noise_info = new CalcNoiseResult();\n var search_limit;\n var maxggain = 255;\n\n /*\n * When quantization with no distorted bands is found, allow up\n * to X new unsuccesful tries in serial. This gives us more\n * possibilities for different quant_compare modes. Much more\n * than 3 makes not a big difference, it is only slower.\n */\n\n if ((gfc.substep_shaping & 2) != 0) {\n search_limit = 20;\n } else {\n search_limit = 3;\n }\n\n /*\n * Check if the last scalefactor band is distorted. in VBR mode\n * we can't get rid of the distortion, so quit now and VBR mode\n * will try again with more bits. (makes a 10% speed increase,\n * the files I tested were binary identical, 2000/05/20 Robert\n * Hegemann) distort[] > 1 means noise > allowed noise\n */\n if (gfc.sfb21_extra) {\n if (distort[cod_info_w.sfbmax] > 1.0)\n break;\n if (cod_info_w.block_type == Encoder.SHORT_TYPE\n && (distort[cod_info_w.sfbmax + 1] > 1.0 || distort[cod_info_w.sfbmax + 2] > 1.0))\n break;\n }\n\n /* try a new scalefactor conbination on cod_info_w */\n if (!balance_noise(gfp, cod_info_w, distort, xrpow, bRefine))\n break;\n if (cod_info_w.scalefac_scale != 0)\n maxggain = 254;\n\n /*\n * inner_loop starts with the initial quantization step computed\n * above and slowly increases until the bits < huff_bits. Thus\n * it is important not to start with too large of an inital\n * quantization step. Too small is ok, but inner_loop will take\n * longer\n */\n var huff_bits = targ_bits - cod_info_w.part2_length;\n if (huff_bits <= 0)\n break;\n\n /*\n * increase quantizer stepsize until needed bits are below\n * maximum\n */\n while ((cod_info_w.part2_3_length = tk.count_bits(gfc, xrpow,\n cod_info_w, prev_noise)) > huff_bits\n && cod_info_w.global_gain <= maxggain)\n cod_info_w.global_gain++;\n\n if (cod_info_w.global_gain > maxggain)\n break;\n\n if (best_noise_info.over_count == 0) {\n\n while ((cod_info_w.part2_3_length = tk.count_bits(gfc,\n xrpow, cod_info_w, prev_noise)) > best_part2_3_length\n && cod_info_w.global_gain <= maxggain)\n cod_info_w.global_gain++;\n\n if (cod_info_w.global_gain > maxggain)\n break;\n }\n\n /* compute the distortion in this quantization */\n qupvt.calc_noise(cod_info_w, l3_xmin, distort, noise_info,\n prev_noise);\n noise_info.bits = cod_info_w.part2_3_length;\n\n /*\n * check if this quantization is better than our saved\n * quantization\n */\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type\n better = gfp.quant_comp;\n } else\n better = gfp.quant_comp_short;\n\n better = quant_compare(better, best_noise_info, noise_info,\n cod_info_w, distort) ? 1 : 0;\n\n /* save data so we can restore this quantization later */\n if (better != 0) {\n best_part2_3_length = cod_info.part2_3_length;\n best_noise_info = noise_info;\n cod_info.assign(cod_info_w);\n age = 0;\n /* save data so we can restore this quantization later */\n /* store for later reuse */\n System.arraycopy(xrpow, 0, save_xrpow, 0, 576);\n } else {\n /* early stop? */\n if (gfc.full_outer_loop == 0) {\n if (++age > search_limit\n && best_noise_info.over_count == 0)\n break;\n if ((gfc.noise_shaping_amp == 3) && bRefine && age > 30)\n break;\n if ((gfc.noise_shaping_amp == 3)\n && bRefine\n && (cod_info_w.global_gain - best_ggain_pass1) > 15)\n break;\n }\n }\n } while ((cod_info_w.global_gain + cod_info_w.scalefac_scale) < 255);\n\n if (gfc.noise_shaping_amp == 3) {\n if (!bRefine) {\n /* refine search */\n cod_info_w.assign(cod_info);\n System.arraycopy(save_xrpow, 0, xrpow, 0, 576);\n age = 0;\n best_ggain_pass1 = cod_info_w.global_gain;\n\n bRefine = true;\n } else {\n /* search already refined, stop */\n bEndOfSearch = true;\n }\n\n } else {\n bEndOfSearch = true;\n }\n }\n\n assert((cod_info.global_gain + cod_info.scalefac_scale) <= 255);\n /*\n * finish up\n */\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n /* restore for reuse on next try */\n System.arraycopy(save_xrpow, 0, xrpow, 0, 576);\n /*\n * do the 'substep shaping'\n */\n else if ((gfc.substep_shaping & 1) != 0)\n trancate_smallspectrums(gfc, cod_info, l3_xmin, xrpow);\n\n return best_noise_info.over_count;\n }\n\n /**\n * Robert Hegemann 2000-09-06\n *\n * update reservoir status after FINAL quantization/bitrate\n */\n this.iteration_finish_one = function (gfc, gr, ch) {\n var l3_side = gfc.l3_side;\n var cod_info = l3_side.tt[gr][ch];\n\n /*\n * try some better scalefac storage\n */\n tk.best_scalefac_store(gfc, gr, ch, l3_side);\n\n /*\n * best huffman_divide may save some bits too\n */\n if (gfc.use_best_huffman == 1)\n tk.best_huffman_divide(gfc, cod_info);\n\n /*\n * update reservoir status after FINAL quantization/bitrate\n */\n rv.ResvAdjust(gfc, cod_info);\n };\n\n /**\n *\n * 2000-09-04 Robert Hegemann\n *\n * @param l3_xmin\n * allowed distortion of the scalefactor\n * @param xrpow\n * coloured magnitudes of spectral values\n */\n this.VBR_encode_granule = function (gfp, cod_info, l3_xmin, xrpow, ch, min_bits, max_bits) {\n var gfc = gfp.internal_flags;\n var bst_cod_info = new GrInfo();\n var bst_xrpow = new_float(576);\n var Max_bits = max_bits;\n var real_bits = max_bits + 1;\n var this_bits = (max_bits + min_bits) / 2;\n var dbits, over, found = 0;\n var sfb21_extra = gfc.sfb21_extra;\n\n assert(Max_bits <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n Arrays.fill(bst_cod_info.l3_enc, 0);\n\n /*\n * search within round about 40 bits of optimal\n */\n do {\n assert(this_bits >= min_bits);\n assert(this_bits <= max_bits);\n assert(min_bits <= max_bits);\n\n if (this_bits > Max_bits - 42)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = sfb21_extra;\n\n over = outer_loop(gfp, cod_info, l3_xmin, xrpow, ch, this_bits);\n\n /*\n * is quantization as good as we are looking for ? in this case: is\n * no scalefactor band distorted?\n */\n if (over <= 0) {\n found = 1;\n /*\n * now we know it can be done with \"real_bits\" and maybe we can\n * skip some iterations\n */\n real_bits = cod_info.part2_3_length;\n\n /*\n * store best quantization so far\n */\n bst_cod_info.assign(cod_info);\n System.arraycopy(xrpow, 0, bst_xrpow, 0, 576);\n\n /*\n * try with fewer bits\n */\n max_bits = real_bits - 32;\n dbits = max_bits - min_bits;\n this_bits = (max_bits + min_bits) / 2;\n } else {\n /*\n * try with more bits\n */\n min_bits = this_bits + 32;\n dbits = max_bits - min_bits;\n this_bits = (max_bits + min_bits) / 2;\n\n if (found != 0) {\n found = 2;\n /*\n * start again with best quantization so far\n */\n cod_info.assign(bst_cod_info);\n System.arraycopy(bst_xrpow, 0, xrpow, 0, 576);\n }\n }\n } while (dbits > 12);\n\n gfc.sfb21_extra = sfb21_extra;\n\n /*\n * found=0 => nothing found, use last one found=1 => we just found the\n * best and left the loop found=2 => we restored a good one and have now\n * l3_enc to restore too\n */\n if (found == 2) {\n System.arraycopy(bst_cod_info.l3_enc, 0, cod_info.l3_enc, 0, 576);\n }\n assert(cod_info.part2_3_length <= Max_bits);\n }\n\n /**\n * Robert Hegemann 2000-09-05\n *\n * calculates * how many bits are available for analog silent granules * how\n * many bits to use for the lowest allowed bitrate * how many bits each\n * bitrate would provide\n */\n this.get_framebits = function (gfp, frameBits) {\n var gfc = gfp.internal_flags;\n\n /*\n * always use at least this many bits per granule per channel unless we\n * detect analog silence, see below\n */\n gfc.bitrate_index = gfc.VBR_min_bitrate;\n var bitsPerFrame = bs.getframebits(gfp);\n\n /*\n * bits for analog silence\n */\n gfc.bitrate_index = 1;\n bitsPerFrame = bs.getframebits(gfp);\n\n for (var i = 1; i <= gfc.VBR_max_bitrate; i++) {\n gfc.bitrate_index = i;\n var mb = new MeanBits(bitsPerFrame);\n frameBits[i] = rv.ResvFrameBegin(gfp, mb);\n bitsPerFrame = mb.bits;\n }\n };\n\n /* RH: this one needs to be overhauled sometime */\n\n /**\n *
\n     *  2000-09-04 Robert Hegemann\n     *\n     *  * converts LR to MS coding when necessary\n     *  * calculates allowed/adjusted quantization noise amounts\n     *  * detects analog silent frames\n     *\n     *  some remarks:\n     *  - lower masking depending on Quality setting\n     *  - quality control together with adjusted ATH MDCT scaling\n     *    on lower quality setting allocate more noise from\n     *    ATH masking, and on higher quality setting allocate\n     *    less noise from ATH masking.\n     *  - experiments show that going more than 2dB over GPSYCHO's\n     *    limits ends up in very annoying artefacts\n     * 
\n */\n this.VBR_old_prepare = function (gfp, pe, ms_ener_ratio, ratio, l3_xmin, frameBits, min_bits,\n max_bits, bands) {\n var gfc = gfp.internal_flags;\n\n var masking_lower_db, adjust = 0.0;\n var analog_silence = 1;\n var bits = 0;\n\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n var avg = rv.ResvFrameBegin(gfp, new MeanBits(0)) / gfc.mode_gr;\n\n get_framebits(gfp, frameBits);\n\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n var mxb = qupvt.on_pe(gfp, pe, max_bits[gr], avg, gr, 0);\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n ms_convert(gfc.l3_side, gr);\n qupvt.reduce_side(max_bits[gr], ms_ener_ratio[gr], avg, mxb);\n }\n for (var ch = 0; ch < gfc.channels_out; ++ch) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type\n adjust = 1.28 / (1 + Math\n .exp(3.5 - pe[gr][ch] / 300.)) - 0.05;\n masking_lower_db = gfc.PSY.mask_adjust - adjust;\n } else {\n adjust = 2.56 / (1 + Math\n .exp(3.5 - pe[gr][ch] / 300.)) - 0.14;\n masking_lower_db = gfc.PSY.mask_adjust_short - adjust;\n }\n gfc.masking_lower = Math.pow(10.0,\n masking_lower_db * 0.1);\n\n init_outer_loop(gfc, cod_info);\n bands[gr][ch] = qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n l3_xmin[gr][ch]);\n if (bands[gr][ch] != 0)\n analog_silence = 0;\n\n min_bits[gr][ch] = 126;\n\n bits += max_bits[gr][ch];\n }\n }\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n if (bits > frameBits[gfc.VBR_max_bitrate]) {\n max_bits[gr][ch] *= frameBits[gfc.VBR_max_bitrate];\n max_bits[gr][ch] /= bits;\n }\n if (min_bits[gr][ch] > max_bits[gr][ch])\n min_bits[gr][ch] = max_bits[gr][ch];\n\n }\n /* for ch */\n }\n /* for gr */\n\n return analog_silence;\n };\n\n this.bitpressure_strategy = function (gfc, l3_xmin, min_bits, max_bits) {\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var gi = gfc.l3_side.tt[gr][ch];\n var pxmin = l3_xmin[gr][ch];\n var pxminPos = 0;\n for (var sfb = 0; sfb < gi.psy_lmax; sfb++)\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_l / Encoder.SBMAX_l;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n for (var sfb = gi.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n }\n }\n max_bits[gr][ch] = 0 | Math.max(min_bits[gr][ch],\n 0.9 * max_bits[gr][ch]);\n }\n }\n };\n\n this.VBR_new_prepare = function (gfp, pe, ratio, l3_xmin, frameBits, max_bits) {\n var gfc = gfp.internal_flags;\n\n var analog_silence = 1;\n var avg = 0, bits = 0;\n var maximum_framebits;\n\n if (!gfp.free_format) {\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n\n var mb = new MeanBits(avg);\n rv.ResvFrameBegin(gfp, mb);\n avg = mb.bits;\n\n get_framebits(gfp, frameBits);\n maximum_framebits = frameBits[gfc.VBR_max_bitrate];\n } else {\n gfc.bitrate_index = 0;\n var mb = new MeanBits(avg);\n maximum_framebits = rv.ResvFrameBegin(gfp, mb);\n avg = mb.bits;\n frameBits[0] = maximum_framebits;\n }\n\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n qupvt.on_pe(gfp, pe, max_bits[gr], avg, gr, 0);\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n ms_convert(gfc.l3_side, gr);\n }\n for (var ch = 0; ch < gfc.channels_out; ++ch) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n\n gfc.masking_lower = Math.pow(10.0,\n gfc.PSY.mask_adjust * 0.1);\n\n init_outer_loop(gfc, cod_info);\n if (0 != qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n l3_xmin[gr][ch]))\n analog_silence = 0;\n\n bits += max_bits[gr][ch];\n }\n }\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n if (bits > maximum_framebits) {\n max_bits[gr][ch] *= maximum_framebits;\n max_bits[gr][ch] /= bits;\n }\n\n }\n /* for ch */\n }\n /* for gr */\n\n return analog_silence;\n };\n\n /**\n * calculates target bits for ABR encoding\n *\n * mt 2000/05/31\n */\n this.calc_target_bits = function (gfp, pe, ms_ener_ratio, targ_bits, analog_silence_bits, max_frame_bits) {\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n var res_factor;\n var gr, ch, totbits, mean_bits = 0;\n\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n var mb = new MeanBits(mean_bits);\n max_frame_bits[0] = rv.ResvFrameBegin(gfp, mb);\n mean_bits = mb.bits;\n\n gfc.bitrate_index = 1;\n mean_bits = bs.getframebits(gfp) - gfc.sideinfo_len * 8;\n analog_silence_bits[0] = mean_bits / (gfc.mode_gr * gfc.channels_out);\n\n mean_bits = gfp.VBR_mean_bitrate_kbps * gfp.framesize * 1000;\n if ((gfc.substep_shaping & 1) != 0)\n mean_bits *= 1.09;\n mean_bits /= gfp.out_samplerate;\n mean_bits -= gfc.sideinfo_len * 8;\n mean_bits /= (gfc.mode_gr * gfc.channels_out);\n\n /**\n *
\n         *           res_factor is the percentage of the target bitrate that should\n         *           be used on average.  the remaining bits are added to the\n         *           bitreservoir and used for difficult to encode frames.\n         *\n         *           Since we are tracking the average bitrate, we should adjust\n         *           res_factor \"on the fly\", increasing it if the average bitrate\n         *           is greater than the requested bitrate, and decreasing it\n         *           otherwise.  Reasonable ranges are from .9 to 1.0\n         *\n         *           Until we get the above suggestion working, we use the following\n         *           tuning:\n         *           compression ratio    res_factor\n         *           5.5  (256kbps)         1.0      no need for bitreservoir\n         *           11   (128kbps)         .93      7% held for reservoir\n         *\n         *           with linear interpolation for other values.\n         * 
\n */\n res_factor = .93 + .07 * (11.0 - gfp.compression_ratio)\n / (11.0 - 5.5);\n if (res_factor < .90)\n res_factor = .90;\n if (res_factor > 1.00)\n res_factor = 1.00;\n\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n var sum = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n targ_bits[gr][ch] = (int)(res_factor * mean_bits);\n\n if (pe[gr][ch] > 700) {\n var add_bits = (int)((pe[gr][ch] - 700) / 1.4);\n\n var cod_info = l3_side.tt[gr][ch];\n targ_bits[gr][ch] = (int)(res_factor * mean_bits);\n\n /* short blocks use a little extra, no matter what the pe */\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n if (add_bits < mean_bits / 2)\n add_bits = mean_bits / 2;\n }\n /* at most increase bits by 1.5*average */\n if (add_bits > mean_bits * 3 / 2)\n add_bits = mean_bits * 3 / 2;\n else if (add_bits < 0)\n add_bits = 0;\n\n targ_bits[gr][ch] += add_bits;\n }\n if (targ_bits[gr][ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL) {\n targ_bits[gr][ch] = LameInternalFlags.MAX_BITS_PER_CHANNEL;\n }\n sum += targ_bits[gr][ch];\n }\n /* for ch */\n if (sum > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[gr][ch] *= LameInternalFlags.MAX_BITS_PER_GRANULE;\n targ_bits[gr][ch] /= sum;\n }\n }\n }\n /* for gr */\n\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR)\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n qupvt.reduce_side(targ_bits[gr], ms_ener_ratio[gr], mean_bits\n * gfc.channels_out,\n LameInternalFlags.MAX_BITS_PER_GRANULE);\n }\n\n /*\n * sum target bits\n */\n totbits = 0;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n if (targ_bits[gr][ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL)\n targ_bits[gr][ch] = LameInternalFlags.MAX_BITS_PER_CHANNEL;\n totbits += targ_bits[gr][ch];\n }\n }\n\n /*\n * repartion target bits if needed\n */\n if (totbits > max_frame_bits[0]) {\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n targ_bits[gr][ch] *= max_frame_bits[0];\n targ_bits[gr][ch] /= totbits;\n }\n }\n }\n }\n\n}\n\nmodule.exports = Quantize;\n","/*\n * bit reservoir source file\n *\n * Copyright (c) 1999-2000 Mark Taylor\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Reservoir.java,v 1.9 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n/**\n * ResvFrameBegin:
\n * Called (repeatedly) at the beginning of a frame. Updates the maximum size of\n * the reservoir, and checks to make sure main_data_begin was set properly by\n * the formatter
\n * Background information:\n * \n * This is the original text from the ISO standard. Because of sooo many bugs\n * and irritations correcting comments are added in brackets []. A '^W' means\n * you should remove the last word.\n * \n *
\n *  1. The following rule can be used to calculate the maximum\n *     number of bits used for one granule [^W frame]:
\n * At the highest possible bitrate of Layer III (320 kbps\n * per stereo signal [^W^W^W], 48 kHz) the frames must be of\n * [^W^W^W are designed to have] constant length, i.e.\n * one buffer [^W^W the frame] length is:
\n * \n * 320 kbps * 1152/48 kHz = 7680 bit = 960 byte\n * \n * This value is used as the maximum buffer per channel [^W^W] at\n * lower bitrates [than 320 kbps]. At 64 kbps mono or 128 kbps\n * stereo the main granule length is 64 kbps * 576/48 kHz = 768 bit\n * [per granule and channel] at 48 kHz sampling frequency.\n * This means that there is a maximum deviation (short time buffer\n * [= reservoir]) of 7680 - 2*2*768 = 4608 bits is allowed at 64 kbps.\n * The actual deviation is equal to the number of bytes [with the\n * meaning of octets] denoted by the main_data_end offset pointer.\n * The actual maximum deviation is (2^9-1)*8 bit = 4088 bits\n * [for MPEG-1 and (2^8-1)*8 bit for MPEG-2, both are hard limits].\n * ... The xchange of buffer bits between the left and right channel\n * is allowed without restrictions [exception: dual channel].\n * Because of the [constructed] constraint on the buffer size\n * main_data_end is always set to 0 in the case of bit_rate_index==14,\n * i.e. data rate 320 kbps per stereo signal [^W^W^W]. In this case\n * all data are allocated between adjacent header [^W sync] words\n * [, i.e. there is no buffering at all].\n *
\n */\n\nvar common = require('./common.js');\nvar assert = common.assert;\n\nfunction Reservoir() {\n\tvar bs;\n\n\tthis.setModules = function(_bs) {\n\t\tbs = _bs;\n\t}\n\n\tthis.ResvFrameBegin = function(gfp, mean_bits) {\n\t\tvar gfc = gfp.internal_flags;\n\t\tvar maxmp3buf;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tvar frameLength = bs.getframebits(gfp);\n\t\tmean_bits.bits = (frameLength - gfc.sideinfo_len * 8) / gfc.mode_gr;\n\n\t\t/**\n\t\t *
\n\t\t *  Meaning of the variables:\n\t\t *      resvLimit: (0, 8, ..., 8*255 (MPEG-2), 8*511 (MPEG-1))\n\t\t *          Number of bits can be stored in previous frame(s) due to\n\t\t *          counter size constaints\n\t\t *      maxmp3buf: ( ??? ... 8*1951 (MPEG-1 and 2), 8*2047 (MPEG-2.5))\n\t\t *          Number of bits allowed to encode one frame (you can take 8*511 bit\n\t\t *          from the bit reservoir and at most 8*1440 bit from the current\n\t\t *          frame (320 kbps, 32 kHz), so 8*1951 bit is the largest possible\n\t\t *          value for MPEG-1 and -2)\n\t\t * \n\t\t *          maximum allowed granule/channel size times 4 = 8*2047 bits.,\n\t\t *          so this is the absolute maximum supported by the format.\n\t\t * \n\t\t * \n\t\t *      fullFrameBits:  maximum number of bits available for encoding\n\t\t *                      the current frame.\n\t\t * \n\t\t *      mean_bits:      target number of bits per granule.\n\t\t * \n\t\t *      frameLength:\n\t\t * \n\t\t *      gfc.ResvMax:   maximum allowed reservoir\n\t\t * \n\t\t *      gfc.ResvSize:  current reservoir size\n\t\t * \n\t\t *      l3_side.resvDrain_pre:\n\t\t *         ancillary data to be added to previous frame:\n\t\t *         (only usefull in VBR modes if it is possible to have\n\t\t *         maxmp3buf < fullFrameBits)).  Currently disabled,\n\t\t *         see #define NEW_DRAIN\n\t\t *         2010-02-13: RH now enabled, it seems to be needed for CBR too,\n\t\t *                     as there exists one example, where the FhG decoder\n\t\t *                     can't decode a -b320 CBR file anymore.\n\t\t * \n\t\t *      l3_side.resvDrain_post:\n\t\t *         ancillary data to be added to this frame:\n\t\t * \n\t\t * 
\n\t\t */\n\n\t\t/* main_data_begin has 9 bits in MPEG-1, 8 bits MPEG-2 */\n\t\tvar resvLimit = (8 * 256) * gfc.mode_gr - 8;\n\n\t\t/*\n\t\t * maximum allowed frame size. dont use more than this number of bits,\n\t\t * even if the frame has the space for them:\n\t\t */\n\t\tif (gfp.brate > 320) {\n\t\t\t/* in freeformat the buffer is constant */\n\t\t\tmaxmp3buf = 8 * ((int) ((gfp.brate * 1000)\n\t\t\t\t\t/ (gfp.out_samplerate / 1152) / 8 + .5));\n\t\t} else {\n\t\t\t/*\n\t\t\t * all mp3 decoders should have enough buffer to handle this value:\n\t\t\t * size of a 320kbps 32kHz frame\n\t\t\t */\n\t\t\tmaxmp3buf = 8 * 1440;\n\n\t\t\t/*\n\t\t\t * Bouvigne suggests this more lax interpretation of the ISO doc\n\t\t\t * instead of using 8*960.\n\t\t\t */\n\n\t\t\tif (gfp.strict_ISO) {\n\t\t\t\tmaxmp3buf = 8 * ((int) (320000 / (gfp.out_samplerate / 1152) / 8 + .5));\n\t\t\t}\n\t\t}\n\n\t\tgfc.ResvMax = maxmp3buf - frameLength;\n\t\tif (gfc.ResvMax > resvLimit)\n\t\t\tgfc.ResvMax = resvLimit;\n\t\tif (gfc.ResvMax < 0 || gfp.disable_reservoir)\n\t\t\tgfc.ResvMax = 0;\n\n\t\tvar fullFrameBits = mean_bits.bits * gfc.mode_gr\n\t\t\t\t+ Math.min(gfc.ResvSize, gfc.ResvMax);\n\n\t\tif (fullFrameBits > maxmp3buf)\n\t\t\tfullFrameBits = maxmp3buf;\n\n\t\tassert (0 == gfc.ResvMax % 8);\n\t\tassert (gfc.ResvMax >= 0);\n\n\t\tl3_side.resvDrain_pre = 0;\n\n\t\t// frame analyzer code\n\t\tif (gfc.pinfo != null) {\n\t\t\t/*\n\t\t\t * expected bits per channel per granule [is this also right for\n\t\t\t * mono/stereo, MPEG-1/2 ?]\n\t\t\t */\n\t\t\tgfc.pinfo.mean_bits = mean_bits.bits / 2;\n\t\t\tgfc.pinfo.resvsize = gfc.ResvSize;\n\t\t}\n\n\t\treturn fullFrameBits;\n\t}\n\n\t/**\n\t * returns targ_bits: target number of bits to use for 1 granule
\n\t * extra_bits: amount extra available from reservoir
\n\t * Mark Taylor 4/99\n\t */\n\tthis.ResvMaxBits = function(gfp, mean_bits, targ_bits, cbr) {\n\t\tvar gfc = gfp.internal_flags;\n\t\tvar add_bits;\n var ResvSize = gfc.ResvSize, ResvMax = gfc.ResvMax;\n\n\t\t/* compensate the saved bits used in the 1st granule */\n\t\tif (cbr != 0)\n\t\t\tResvSize += mean_bits;\n\n\t\tif ((gfc.substep_shaping & 1) != 0)\n\t\t\tResvMax *= 0.9;\n\n\t\ttarg_bits.bits = mean_bits;\n\n\t\t/* extra bits if the reservoir is almost full */\n\t\tif (ResvSize * 10 > ResvMax * 9) {\n\t\t\tadd_bits = ResvSize - (ResvMax * 9) / 10;\n\t\t\ttarg_bits.bits += add_bits;\n\t\t\tgfc.substep_shaping |= 0x80;\n\t\t} else {\n\t\t\tadd_bits = 0;\n\t\t\tgfc.substep_shaping &= 0x7f;\n\t\t\t/*\n\t\t\t * build up reservoir. this builds the reservoir a little slower\n\t\t\t * than FhG. It could simple be mean_bits/15, but this was rigged to\n\t\t\t * always produce 100 (the old value) at 128kbs\n\t\t\t */\n\t\t\tif (!gfp.disable_reservoir && 0 == (gfc.substep_shaping & 1))\n\t\t\t\ttarg_bits.bits -= .1 * mean_bits;\n\t\t}\n\n\t\t/* amount from the reservoir we are allowed to use. ISO says 6/10 */\n\t\tvar extra_bits = (ResvSize < (gfc.ResvMax * 6) / 10 ? ResvSize\n\t\t\t\t: (gfc.ResvMax * 6) / 10);\n\t\textra_bits -= add_bits;\n\n\t\tif (extra_bits < 0)\n\t\t\textra_bits = 0;\n\t\treturn extra_bits;\n\t}\n\n\t/**\n\t * Called after a granule's bit allocation. Readjusts the size of the\n\t * reservoir to reflect the granule's usage.\n\t */\n\tthis.ResvAdjust = function(gfc, gi) {\n\t\tgfc.ResvSize -= gi.part2_3_length + gi.part2_length;\n\t}\n\n\t/**\n\t * Called after all granules in a frame have been allocated. Makes sure that\n\t * the reservoir size is within limits, possibly by adding stuffing bits.\n\t */\n\tthis.ResvFrameEnd = function(gfc, mean_bits) {\n\t\tvar over_bits;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tgfc.ResvSize += mean_bits * gfc.mode_gr;\n\t\tvar stuffingBits = 0;\n\t\tl3_side.resvDrain_post = 0;\n\t\tl3_side.resvDrain_pre = 0;\n\n\t\t/* we must be byte aligned */\n\t\tif ((over_bits = gfc.ResvSize % 8) != 0)\n\t\t\tstuffingBits += over_bits;\n\n\t\tover_bits = (gfc.ResvSize - stuffingBits) - gfc.ResvMax;\n\t\tif (over_bits > 0) {\n\t\t\tassert (0 == over_bits % 8);\n\t\t\tassert (over_bits >= 0);\n\t\t\tstuffingBits += over_bits;\n\t\t}\n\n\t\t/*\n\t\t * NOTE: enabling the NEW_DRAIN code fixes some problems with FhG\n\t\t * decoder shipped with MS Windows operating systems. Using this, it is\n\t\t * even possible to use Gabriel's lax buffer consideration again, which\n\t\t * assumes, any decoder should have a buffer large enough for a 320 kbps\n\t\t * frame at 32 kHz sample rate.\n\t\t * \n\t\t * old drain code: lame -b320 BlackBird.wav --. does not play with\n\t\t * GraphEdit.exe using FhG decoder V1.5 Build 50\n\t\t * \n\t\t * new drain code: lame -b320 BlackBird.wav --. plays fine with\n\t\t * GraphEdit.exe using FhG decoder V1.5 Build 50\n\t\t * \n\t\t * Robert Hegemann, 2010-02-13.\n\t\t */\n\t\t/*\n\t\t * drain as many bits as possible into previous frame ancillary data In\n\t\t * particular, in VBR mode ResvMax may have changed, and we have to make\n\t\t * sure main_data_begin does not create a reservoir bigger than ResvMax\n\t\t * mt 4/00\n\t\t */\n\t\t{\n\t\t\tvar mdb_bytes = Math.min(l3_side.main_data_begin * 8, stuffingBits) / 8;\n\t\t\tl3_side.resvDrain_pre += 8 * mdb_bytes;\n\t\t\tstuffingBits -= 8 * mdb_bytes;\n\t\t\tgfc.ResvSize -= 8 * mdb_bytes;\n\t\t\tl3_side.main_data_begin -= mdb_bytes;\n\t\t}\n\t\t/* drain the rest into this frames ancillary data */\n\t\tl3_side.resvDrain_post += stuffingBits;\n\t\tgfc.ResvSize -= stuffingBits;\n\t}\n}\n\nmodule.exports = Reservoir;\n","function Version() {\n\n /**\n * URL for the LAME website.\n */\n var LAME_URL = \"http://www.mp3dev.org/\";\n\n /**\n * Major version number.\n */\n var LAME_MAJOR_VERSION = 3;\n /**\n * Minor version number.\n */\n var LAME_MINOR_VERSION = 98;\n /**\n * Patch level.\n */\n var LAME_PATCH_VERSION = 4;\n\n /**\n * Major version number.\n */\n var PSY_MAJOR_VERSION = 0;\n /**\n * Minor version number.\n */\n var PSY_MINOR_VERSION = 93;\n\n /**\n * A string which describes the version of LAME.\n *\n * @return string which describes the version of LAME\n */\n this.getLameVersion = function () {\n // primary to write screen reports\n return (LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \".\" + LAME_PATCH_VERSION);\n }\n\n /**\n * The short version of the LAME version string.\n *\n * @return short version of the LAME version string\n */\n this.getLameShortVersion = function () {\n // Adding date and time to version string makes it harder for output\n // validation\n return (LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \".\" + LAME_PATCH_VERSION);\n }\n\n /**\n * The shortest version of the LAME version string.\n *\n * @return shortest version of the LAME version string\n */\n this.getLameVeryShortVersion = function () {\n // Adding date and time to version string makes it harder for output\n return (\"LAME\" + LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \"r\");\n }\n\n /**\n * String which describes the version of GPSYCHO\n *\n * @return string which describes the version of GPSYCHO\n */\n this.getPsyVersion = function () {\n return (PSY_MAJOR_VERSION + \".\" + PSY_MINOR_VERSION);\n }\n\n /**\n * String which is a URL for the LAME website.\n *\n * @return string which is a URL for the LAME website\n */\n this.getLameUrl = function () {\n return LAME_URL;\n }\n\n /**\n * Quite useless for a java version, however we are compatible ;-)\n *\n * @return \"32bits\"\n */\n this.getLameOsBitness = function () {\n return \"32bits\";\n }\n\n}\n\nmodule.exports = Version;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * A Vbr header may be present in the ancillary data field of the first frame of\n * an mp3 bitstream
\n * The Vbr header (optionally) contains\n *
    \n *
  • frames total number of audio frames in the bitstream\n *
  • bytes total number of bytes in the bitstream\n *
  • toc table of contents\n *
\n *\n * toc (table of contents) gives seek points for random access.
\n * The ith entry determines the seek point for i-percent duration.
\n * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes
\n * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes\n */\nVBRTag.NUMTOCENTRIES = 100;\nVBRTag.MAXFRAMESIZE = 2880;\n\nfunction VBRTag() {\n\n var lame;\n var bs;\n var v;\n\n this.setModules = function (_lame, _bs, _v) {\n lame = _lame;\n bs = _bs;\n v = _v;\n };\n\n var FRAMES_FLAG = 0x0001;\n var BYTES_FLAG = 0x0002;\n var TOC_FLAG = 0x0004;\n var VBR_SCALE_FLAG = 0x0008;\n\n var NUMTOCENTRIES = VBRTag.NUMTOCENTRIES;\n\n /**\n * (0xB40) the max freeformat 640 32kHz framesize.\n */\n var MAXFRAMESIZE = VBRTag.MAXFRAMESIZE;\n\n /**\n *
\n     *    4 bytes for Header Tag\n     *    4 bytes for Header Flags\n     *  100 bytes for entry (toc)\n     *    4 bytes for frame size\n     *    4 bytes for stream size\n     *    4 bytes for VBR scale. a VBR quality indicator: 0=best 100=worst\n     *   20 bytes for LAME tag.  for example, \"LAME3.12 (beta 6)\"\n     * ___________\n     *  140 bytes\n     * 
\n */\n var VBRHEADERSIZE = (NUMTOCENTRIES + 4 + 4 + 4 + 4 + 4);\n\n var LAMEHEADERSIZE = (VBRHEADERSIZE + 9 + 1 + 1 + 8\n + 1 + 1 + 3 + 1 + 1 + 2 + 4 + 2 + 2);\n\n /**\n * The size of the Xing header MPEG-1, bit rate in kbps.\n */\n var XING_BITRATE1 = 128;\n /**\n * The size of the Xing header MPEG-2, bit rate in kbps.\n */\n var XING_BITRATE2 = 64;\n /**\n * The size of the Xing header MPEG-2.5, bit rate in kbps.\n */\n var XING_BITRATE25 = 32;\n\n /**\n * ISO-8859-1 charset for byte to string operations.\n */\n var ISO_8859_1 = null; //Charset.forName(\"ISO-8859-1\");\n\n /**\n * VBR header magic string.\n */\n var VBRTag0 = \"Xing\";\n /**\n * VBR header magic string (VBR == VBRMode.vbr_off).\n */\n var VBRTag1 = \"Info\";\n\n /**\n * Lookup table for fast CRC-16 computation. Uses the polynomial\n * x^16+x^15+x^2+1\n */\n var crc16Lookup = [0x0000, 0xC0C1, 0xC181, 0x0140,\n 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741,\n 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41,\n 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, 0xCB81, 0x0B40,\n 0xC901, 0x09C0, 0x0880, 0xC841, 0xD801, 0x18C0, 0x1980, 0xD941,\n 0x1B00, 0xDBC1, 0xDA81, 0x1A40, 0x1E00, 0xDEC1, 0xDF81, 0x1F40,\n 0xDD01, 0x1DC0, 0x1C80, 0xDC41, 0x1400, 0xD4C1, 0xD581, 0x1540,\n 0xD701, 0x17C0, 0x1680, 0xD641, 0xD201, 0x12C0, 0x1380, 0xD341,\n 0x1100, 0xD1C1, 0xD081, 0x1040, 0xF001, 0x30C0, 0x3180, 0xF141,\n 0x3300, 0xF3C1, 0xF281, 0x3240, 0x3600, 0xF6C1, 0xF781, 0x3740,\n 0xF501, 0x35C0, 0x3480, 0xF441, 0x3C00, 0xFCC1, 0xFD81, 0x3D40,\n 0xFF01, 0x3FC0, 0x3E80, 0xFE41, 0xFA01, 0x3AC0, 0x3B80, 0xFB41,\n 0x3900, 0xF9C1, 0xF881, 0x3840, 0x2800, 0xE8C1, 0xE981, 0x2940,\n 0xEB01, 0x2BC0, 0x2A80, 0xEA41, 0xEE01, 0x2EC0, 0x2F80, 0xEF41,\n 0x2D00, 0xEDC1, 0xEC81, 0x2C40, 0xE401, 0x24C0, 0x2580, 0xE541,\n 0x2700, 0xE7C1, 0xE681, 0x2640, 0x2200, 0xE2C1, 0xE381, 0x2340,\n 0xE101, 0x21C0, 0x2080, 0xE041, 0xA001, 0x60C0, 0x6180, 0xA141,\n 0x6300, 0xA3C1, 0xA281, 0x6240, 0x6600, 0xA6C1, 0xA781, 0x6740,\n 0xA501, 0x65C0, 0x6480, 0xA441, 0x6C00, 0xACC1, 0xAD81, 0x6D40,\n 0xAF01, 0x6FC0, 0x6E80, 0xAE41, 0xAA01, 0x6AC0, 0x6B80, 0xAB41,\n 0x6900, 0xA9C1, 0xA881, 0x6840, 0x7800, 0xB8C1, 0xB981, 0x7940,\n 0xBB01, 0x7BC0, 0x7A80, 0xBA41, 0xBE01, 0x7EC0, 0x7F80, 0xBF41,\n 0x7D00, 0xBDC1, 0xBC81, 0x7C40, 0xB401, 0x74C0, 0x7580, 0xB541,\n 0x7700, 0xB7C1, 0xB681, 0x7640, 0x7200, 0xB2C1, 0xB381, 0x7340,\n 0xB101, 0x71C0, 0x7080, 0xB041, 0x5000, 0x90C1, 0x9181, 0x5140,\n 0x9301, 0x53C0, 0x5280, 0x9241, 0x9601, 0x56C0, 0x5780, 0x9741,\n 0x5500, 0x95C1, 0x9481, 0x5440, 0x9C01, 0x5CC0, 0x5D80, 0x9D41,\n 0x5F00, 0x9FC1, 0x9E81, 0x5E40, 0x5A00, 0x9AC1, 0x9B81, 0x5B40,\n 0x9901, 0x59C0, 0x5880, 0x9841, 0x8801, 0x48C0, 0x4980, 0x8941,\n 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 0x4E00, 0x8EC1, 0x8F81, 0x4F40,\n 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 0x4400, 0x84C1, 0x8581, 0x4540,\n 0x8701, 0x47C0, 0x4680, 0x8641, 0x8201, 0x42C0, 0x4380, 0x8341,\n 0x4100, 0x81C1, 0x8081, 0x4040];\n\n /***********************************************************************\n * Robert Hegemann 2001-01-17\n ***********************************************************************/\n\n function addVbr(v, bitrate) {\n v.nVbrNumFrames++;\n v.sum += bitrate;\n v.seen++;\n\n if (v.seen < v.want) {\n return;\n }\n\n if (v.pos < v.size) {\n v.bag[v.pos] = v.sum;\n v.pos++;\n v.seen = 0;\n }\n if (v.pos == v.size) {\n for (var i = 1; i < v.size; i += 2) {\n v.bag[i / 2] = v.bag[i];\n }\n v.want *= 2;\n v.pos /= 2;\n }\n }\n\n function xingSeekTable(v, t) {\n if (v.pos <= 0)\n return;\n\n for (var i = 1; i < NUMTOCENTRIES; ++i) {\n var j = i / NUMTOCENTRIES, act, sum;\n var indx = 0 | (Math.floor(j * v.pos));\n if (indx > v.pos - 1)\n indx = v.pos - 1;\n act = v.bag[indx];\n sum = v.sum;\n var seek_point = 0 | (256. * act / sum);\n if (seek_point > 255)\n seek_point = 255;\n t[i] = 0xff & seek_point;\n }\n }\n\n /**\n * Add VBR entry, used to fill the VBR TOC entries.\n *\n * @param gfp\n * global flags\n */\n this.addVbrFrame = function (gfp) {\n var gfc = gfp.internal_flags;\n var kbps = Tables.bitrate_table[gfp.version][gfc.bitrate_index];\n assert(gfc.VBR_seek_table.bag != null);\n addVbr(gfc.VBR_seek_table, kbps);\n }\n\n /**\n * Read big endian integer (4-bytes) from header.\n *\n * @param buf\n * header containing the integer\n * @param bufPos\n * offset into the header\n * @return extracted integer\n */\n function extractInteger(buf, bufPos) {\n var x = buf[bufPos + 0] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 1] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 2] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 3] & 0xff;\n return x;\n }\n\n /**\n * Write big endian integer (4-bytes) in the header.\n *\n * @param buf\n * header to write the integer into\n * @param bufPos\n * offset into the header\n * @param value\n * integer value to write\n */\n function createInteger(buf, bufPos, value) {\n buf[bufPos + 0] = 0xff & ((value >> 24) & 0xff);\n buf[bufPos + 1] = 0xff & ((value >> 16) & 0xff);\n buf[bufPos + 2] = 0xff & ((value >> 8) & 0xff);\n buf[bufPos + 3] = 0xff & (value & 0xff);\n }\n\n /**\n * Write big endian short (2-bytes) in the header.\n *\n * @param buf\n * header to write the integer into\n * @param bufPos\n * offset into the header\n * @param value\n * integer value to write\n */\n function createShort(buf, bufPos, value) {\n buf[bufPos + 0] = 0xff & ((value >> 8) & 0xff);\n buf[bufPos + 1] = 0xff & (value & 0xff);\n }\n\n /**\n * Check for magic strings (Xing/Info).\n *\n * @param buf\n * header to check\n * @param bufPos\n * header offset to check\n * @return magic string found\n */\n function isVbrTag(buf, bufPos) {\n return new String(buf, bufPos, VBRTag0.length(), ISO_8859_1)\n .equals(VBRTag0)\n || new String(buf, bufPos, VBRTag1.length(), ISO_8859_1)\n .equals(VBRTag1);\n }\n\n function shiftInBitsValue(x, n, v) {\n return 0xff & ((x << n) | (v & ~(-1 << n)));\n }\n\n /**\n * Construct the MP3 header using the settings of the global flags.\n *\n * \n *\n * @param gfp\n * global flags\n * @param buffer\n * header\n */\n function setLameTagFrameHeader(gfp, buffer) {\n var gfc = gfp.internal_flags;\n\n // MP3 Sync Word\n buffer[0] = shiftInBitsValue(buffer[0], 8, 0xff);\n\n buffer[1] = shiftInBitsValue(buffer[1], 3, 7);\n buffer[1] = shiftInBitsValue(buffer[1], 1,\n (gfp.out_samplerate < 16000) ? 0 : 1);\n // Version\n buffer[1] = shiftInBitsValue(buffer[1], 1, gfp.version);\n // 01 == Layer 3\n buffer[1] = shiftInBitsValue(buffer[1], 2, 4 - 3);\n // Error protection\n buffer[1] = shiftInBitsValue(buffer[1], 1, (!gfp.error_protection) ? 1\n : 0);\n\n // Bit rate\n buffer[2] = shiftInBitsValue(buffer[2], 4, gfc.bitrate_index);\n // Frequency\n buffer[2] = shiftInBitsValue(buffer[2], 2, gfc.samplerate_index);\n // Pad. Bit\n buffer[2] = shiftInBitsValue(buffer[2], 1, 0);\n // Priv. Bit\n buffer[2] = shiftInBitsValue(buffer[2], 1, gfp.extension);\n\n // Mode\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfp.mode.ordinal());\n // Mode extension (Used with Joint Stereo)\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfc.mode_ext);\n // Copy\n buffer[3] = shiftInBitsValue(buffer[3], 1, gfp.copyright);\n // Original\n buffer[3] = shiftInBitsValue(buffer[3], 1, gfp.original);\n // Emphasis\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfp.emphasis);\n\n /* the default VBR header. 48 kbps layer III, no padding, no crc */\n /* but sampling freq, mode and copyright/copy protection taken */\n /* from first valid frame */\n buffer[0] = 0xff;\n var abyte = 0xff & (buffer[1] & 0xf1);\n var bitrate;\n if (1 == gfp.version) {\n bitrate = XING_BITRATE1;\n } else {\n if (gfp.out_samplerate < 16000)\n bitrate = XING_BITRATE25;\n else\n bitrate = XING_BITRATE2;\n }\n\n if (gfp.VBR == VbrMode.vbr_off)\n bitrate = gfp.brate;\n\n var bbyte;\n if (gfp.free_format)\n bbyte = 0x00;\n else\n bbyte = 0xff & (16 * lame.BitrateIndex(bitrate, gfp.version,\n gfp.out_samplerate));\n\n /*\n * Use as much of the info from the real frames in the Xing header:\n * samplerate, channels, crc, etc...\n */\n if (gfp.version == 1) {\n /* MPEG1 */\n buffer[1] = 0xff & (abyte | 0x0a);\n /* was 0x0b; */\n abyte = 0xff & (buffer[2] & 0x0d);\n /* AF keep also private bit */\n buffer[2] = 0xff & (bbyte | abyte);\n /* 64kbs MPEG1 frame */\n } else {\n /* MPEG2 */\n buffer[1] = 0xff & (abyte | 0x02);\n /* was 0x03; */\n abyte = 0xff & (buffer[2] & 0x0d);\n /* AF keep also private bit */\n buffer[2] = 0xff & (bbyte | abyte);\n /* 64kbs MPEG2 frame */\n }\n }\n\n /**\n * Get VBR tag information\n *\n * @param buf\n * header to analyze\n * @param bufPos\n * offset into the header\n * @return VBR tag data\n */\n this.getVbrTag = function (buf) {\n var pTagData = new VBRTagData();\n var bufPos = 0;\n\n /* get Vbr header data */\n pTagData.flags = 0;\n\n /* get selected MPEG header data */\n var hId = (buf[bufPos + 1] >> 3) & 1;\n var hSrIndex = (buf[bufPos + 2] >> 2) & 3;\n var hMode = (buf[bufPos + 3] >> 6) & 3;\n var hBitrate = ((buf[bufPos + 2] >> 4) & 0xf);\n hBitrate = Tables.bitrate_table[hId][hBitrate];\n\n /* check for FFE syncword */\n if ((buf[bufPos + 1] >> 4) == 0xE)\n pTagData.samprate = Tables.samplerate_table[2][hSrIndex];\n else\n pTagData.samprate = Tables.samplerate_table[hId][hSrIndex];\n\n /* determine offset of header */\n if (hId != 0) {\n /* mpeg1 */\n if (hMode != 3)\n bufPos += (32 + 4);\n else\n bufPos += (17 + 4);\n } else {\n /* mpeg2 */\n if (hMode != 3)\n bufPos += (17 + 4);\n else\n bufPos += (9 + 4);\n }\n\n if (!isVbrTag(buf, bufPos))\n return null;\n\n bufPos += 4;\n\n pTagData.hId = hId;\n\n /* get flags */\n var head_flags = pTagData.flags = extractInteger(buf, bufPos);\n bufPos += 4;\n\n if ((head_flags & FRAMES_FLAG) != 0) {\n pTagData.frames = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n if ((head_flags & BYTES_FLAG) != 0) {\n pTagData.bytes = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n if ((head_flags & TOC_FLAG) != 0) {\n if (pTagData.toc != null) {\n for (var i = 0; i < NUMTOCENTRIES; i++)\n pTagData.toc[i] = buf[bufPos + i];\n }\n bufPos += NUMTOCENTRIES;\n }\n\n pTagData.vbrScale = -1;\n\n if ((head_flags & VBR_SCALE_FLAG) != 0) {\n pTagData.vbrScale = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n pTagData.headersize = ((hId + 1) * 72000 * hBitrate)\n / pTagData.samprate;\n\n bufPos += 21;\n var encDelay = buf[bufPos + 0] << 4;\n encDelay += buf[bufPos + 1] >> 4;\n var encPadding = (buf[bufPos + 1] & 0x0F) << 8;\n encPadding += buf[bufPos + 2] & 0xff;\n /* check for reasonable values (this may be an old Xing header, */\n /* not a INFO tag) */\n if (encDelay < 0 || encDelay > 3000)\n encDelay = -1;\n if (encPadding < 0 || encPadding > 3000)\n encPadding = -1;\n\n pTagData.encDelay = encDelay;\n pTagData.encPadding = encPadding;\n\n /* success */\n return pTagData;\n }\n\n /**\n * Initializes the header\n *\n * @param gfp\n * global flags\n */\n this.InitVbrTag = function (gfp) {\n var gfc = gfp.internal_flags;\n\n /**\n *
\n         * Xing VBR pretends to be a 48kbs layer III frame.  (at 44.1kHz).\n         * (at 48kHz they use 56kbs since 48kbs frame not big enough for\n         * table of contents)\n         * let's always embed Xing header inside a 64kbs layer III frame.\n         * this gives us enough room for a LAME version string too.\n         * size determined by sampling frequency (MPEG1)\n         * 32kHz:    216 bytes@48kbs    288bytes@ 64kbs\n         * 44.1kHz:  156 bytes          208bytes@64kbs     (+1 if padding = 1)\n         * 48kHz:    144 bytes          192\n         *\n         * MPEG 2 values are the same since the framesize and samplerate\n         * are each reduced by a factor of 2.\n         * 
\n */\n var kbps_header;\n if (1 == gfp.version) {\n kbps_header = XING_BITRATE1;\n } else {\n if (gfp.out_samplerate < 16000)\n kbps_header = XING_BITRATE25;\n else\n kbps_header = XING_BITRATE2;\n }\n\n if (gfp.VBR == VbrMode.vbr_off)\n kbps_header = gfp.brate;\n\n // make sure LAME Header fits into Frame\n var totalFrameSize = ((gfp.version + 1) * 72000 * kbps_header)\n / gfp.out_samplerate;\n var headerSize = (gfc.sideinfo_len + LAMEHEADERSIZE);\n gfc.VBR_seek_table.TotalFrameSize = totalFrameSize;\n if (totalFrameSize < headerSize || totalFrameSize > MAXFRAMESIZE) {\n /* disable tag, it wont fit */\n gfp.bWriteVbrTag = false;\n return;\n }\n\n gfc.VBR_seek_table.nVbrNumFrames = 0;\n gfc.VBR_seek_table.nBytesWritten = 0;\n gfc.VBR_seek_table.sum = 0;\n\n gfc.VBR_seek_table.seen = 0;\n gfc.VBR_seek_table.want = 1;\n gfc.VBR_seek_table.pos = 0;\n\n if (gfc.VBR_seek_table.bag == null) {\n gfc.VBR_seek_table.bag = new int[400];\n gfc.VBR_seek_table.size = 400;\n }\n\n // write dummy VBR tag of all 0's into bitstream\n var buffer = new_byte(MAXFRAMESIZE);\n\n setLameTagFrameHeader(gfp, buffer);\n var n = gfc.VBR_seek_table.TotalFrameSize;\n for (var i = 0; i < n; ++i) {\n bs.add_dummy_byte(gfp, buffer[i] & 0xff, 1);\n }\n }\n\n /**\n * Fast CRC-16 computation (uses table crc16Lookup).\n *\n * @param value\n * @param crc\n * @return\n */\n function crcUpdateLookup(value, crc) {\n var tmp = crc ^ value;\n crc = (crc >> 8) ^ crc16Lookup[tmp & 0xff];\n return crc;\n }\n\n this.updateMusicCRC = function (crc, buffer, bufferPos, size) {\n for (var i = 0; i < size; ++i)\n crc[0] = crcUpdateLookup(buffer[bufferPos + i], crc[0]);\n }\n\n /**\n * Write LAME info: mini version + info on various switches used (Jonathan\n * Dee 2001/08/31).\n *\n * @param gfp\n * global flags\n * @param musicLength\n * music length\n * @param streamBuffer\n * pointer to output buffer\n * @param streamBufferPos\n * offset into the output buffer\n * @param crc\n * computation of CRC-16 of Lame Tag so far (starting at frame\n * sync)\n * @return number of bytes written to the stream\n */\n function putLameVBR(gfp, musicLength, streamBuffer, streamBufferPos, crc) {\n var gfc = gfp.internal_flags;\n var bytesWritten = 0;\n\n /* encoder delay */\n var encDelay = gfp.encoder_delay;\n /* encoder padding */\n var encPadding = gfp.encoder_padding;\n\n /* recall: gfp.VBR_q is for example set by the switch -V */\n /* gfp.quality by -q, -h, -f, etc */\n var quality = (100 - 10 * gfp.VBR_q - gfp.quality);\n\n var version = v.getLameVeryShortVersion();\n var vbr;\n var revision = 0x00;\n var revMethod;\n // numbering different in vbr_mode vs. Lame tag\n var vbrTypeTranslator = [1, 5, 3, 2, 4, 0, 3];\n var lowpass = 0 | (((gfp.lowpassfreq / 100.0) + .5) > 255 ? 255\n : (gfp.lowpassfreq / 100.0) + .5);\n var peakSignalAmplitude = 0;\n var radioReplayGain = 0;\n var audiophileReplayGain = 0;\n var noiseShaping = gfp.internal_flags.noise_shaping;\n var stereoMode = 0;\n var nonOptimal = 0;\n var sourceFreq = 0;\n var misc = 0;\n var musicCRC = 0;\n\n // psy model type: Gpsycho or NsPsytune\n var expNPsyTune = (gfp.exp_nspsytune & 1) != 0;\n var safeJoint = (gfp.exp_nspsytune & 2) != 0;\n var noGapMore = false;\n var noGapPrevious = false;\n var noGapCount = gfp.internal_flags.nogap_total;\n var noGapCurr = gfp.internal_flags.nogap_current;\n\n // 4 bits\n var athType = gfp.ATHtype;\n var flags = 0;\n\n // vbr modes\n var abrBitrate;\n switch (gfp.VBR) {\n case vbr_abr:\n abrBitrate = gfp.VBR_mean_bitrate_kbps;\n break;\n case vbr_off:\n abrBitrate = gfp.brate;\n break;\n default:\n abrBitrate = gfp.VBR_min_bitrate_kbps;\n }\n\n // revision and vbr method\n if (gfp.VBR.ordinal() < vbrTypeTranslator.length)\n vbr = vbrTypeTranslator[gfp.VBR.ordinal()];\n else\n vbr = 0x00; // unknown\n\n revMethod = 0x10 * revision + vbr;\n\n // ReplayGain\n if (gfc.findReplayGain) {\n if (gfc.RadioGain > 0x1FE)\n gfc.RadioGain = 0x1FE;\n if (gfc.RadioGain < -0x1FE)\n gfc.RadioGain = -0x1FE;\n\n // set name code\n radioReplayGain = 0x2000;\n // set originator code to `determined automatically'\n radioReplayGain |= 0xC00;\n\n if (gfc.RadioGain >= 0) {\n // set gain adjustment\n radioReplayGain |= gfc.RadioGain;\n } else {\n // set the sign bit\n radioReplayGain |= 0x200;\n // set gain adjustment\n radioReplayGain |= -gfc.RadioGain;\n }\n }\n\n // peak sample\n if (gfc.findPeakSample)\n peakSignalAmplitude = Math\n .abs(0 | ((( gfc.PeakSample) / 32767.0) * Math.pow(2, 23) + .5));\n\n // nogap\n if (noGapCount != -1) {\n if (noGapCurr > 0)\n noGapPrevious = true;\n\n if (noGapCurr < noGapCount - 1)\n noGapMore = true;\n }\n\n // flags\n flags = athType + ((expNPsyTune ? 1 : 0) << 4)\n + ((safeJoint ? 1 : 0) << 5) + ((noGapMore ? 1 : 0) << 6)\n + ((noGapPrevious ? 1 : 0) << 7);\n\n if (quality < 0)\n quality = 0;\n\n // stereo mode field (Intensity stereo is not implemented)\n switch (gfp.mode) {\n case MONO:\n stereoMode = 0;\n break;\n case STEREO:\n stereoMode = 1;\n break;\n case DUAL_CHANNEL:\n stereoMode = 2;\n break;\n case JOINT_STEREO:\n if (gfp.force_ms)\n stereoMode = 4;\n else\n stereoMode = 3;\n break;\n case NOT_SET:\n //$FALL-THROUGH$\n default:\n stereoMode = 7;\n break;\n }\n\n if (gfp.in_samplerate <= 32000)\n sourceFreq = 0x00;\n else if (gfp.in_samplerate == 48000)\n sourceFreq = 0x02;\n else if (gfp.in_samplerate > 48000)\n sourceFreq = 0x03;\n else {\n // default is 44100Hz\n sourceFreq = 0x01;\n }\n\n // Check if the user overrided the default LAME behavior with some\n // nasty options\n if (gfp.short_blocks == ShortBlock.short_block_forced\n || gfp.short_blocks == ShortBlock.short_block_dispensed\n || ((gfp.lowpassfreq == -1) && (gfp.highpassfreq == -1)) || /* \"-k\" */\n (gfp.scale_left < gfp.scale_right)\n || (gfp.scale_left > gfp.scale_right)\n || (gfp.disable_reservoir && gfp.brate < 320) || gfp.noATH\n || gfp.ATHonly || (athType == 0) || gfp.in_samplerate <= 32000)\n nonOptimal = 1;\n\n misc = noiseShaping + (stereoMode << 2) + (nonOptimal << 5)\n + (sourceFreq << 6);\n\n musicCRC = gfc.nMusicCRC;\n\n // Write all this information into the stream\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten, quality);\n bytesWritten += 4;\n\n for (var j = 0; j < 9; j++) {\n streamBuffer[streamBufferPos + bytesWritten + j] = 0xff & version .charAt(j);\n }\n bytesWritten += 9;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & revMethod;\n bytesWritten++;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & lowpass;\n bytesWritten++;\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten,\n peakSignalAmplitude);\n bytesWritten += 4;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten,\n radioReplayGain);\n bytesWritten += 2;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten,\n audiophileReplayGain);\n bytesWritten += 2;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & flags;\n bytesWritten++;\n\n if (abrBitrate >= 255)\n streamBuffer[streamBufferPos + bytesWritten] = 0xFF;\n else\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & abrBitrate;\n bytesWritten++;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & (encDelay >> 4);\n streamBuffer[streamBufferPos + bytesWritten + 1] = 0xff & ((encDelay << 4) + (encPadding >> 8));\n streamBuffer[streamBufferPos + bytesWritten + 2] = 0xff & encPadding;\n\n bytesWritten += 3;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & misc;\n bytesWritten++;\n\n // unused in rev0\n streamBuffer[streamBufferPos + bytesWritten++] = 0;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, gfp.preset);\n bytesWritten += 2;\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten, musicLength);\n bytesWritten += 4;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, musicCRC);\n bytesWritten += 2;\n\n // Calculate tag CRC.... must be done here, since it includes previous\n // information\n\n for (var i = 0; i < bytesWritten; i++)\n crc = crcUpdateLookup(streamBuffer[streamBufferPos + i], crc);\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, crc);\n bytesWritten += 2;\n\n return bytesWritten;\n }\n\n function skipId3v2(fpStream) {\n // seek to the beginning of the stream\n fpStream.seek(0);\n // read 10 bytes in case there's an ID3 version 2 header here\n var id3v2Header = new_byte(10);\n fpStream.readFully(id3v2Header);\n /* does the stream begin with the ID3 version 2 file identifier? */\n var id3v2TagSize;\n if (!new String(id3v2Header, \"ISO-8859-1\").startsWith(\"ID3\")) {\n /*\n * the tag size (minus the 10-byte header) is encoded into four\n * bytes where the most significant bit is clear in each byte\n */\n id3v2TagSize = (((id3v2Header[6] & 0x7f) << 21)\n | ((id3v2Header[7] & 0x7f) << 14)\n | ((id3v2Header[8] & 0x7f) << 7) | (id3v2Header[9] & 0x7f))\n + id3v2Header.length;\n } else {\n /* no ID3 version 2 tag in this stream */\n id3v2TagSize = 0;\n }\n return id3v2TagSize;\n }\n\n this.getLameTagFrame = function (gfp, buffer) {\n var gfc = gfp.internal_flags;\n\n if (!gfp.bWriteVbrTag) {\n return 0;\n }\n if (gfc.Class_ID != Lame.LAME_ID) {\n return 0;\n }\n if (gfc.VBR_seek_table.pos <= 0) {\n return 0;\n }\n if (buffer.length < gfc.VBR_seek_table.TotalFrameSize) {\n return gfc.VBR_seek_table.TotalFrameSize;\n }\n\n Arrays.fill(buffer, 0, gfc.VBR_seek_table.TotalFrameSize, 0);\n\n // 4 bytes frame header\n setLameTagFrameHeader(gfp, buffer);\n\n // Create TOC entries\n var toc = new_byte(NUMTOCENTRIES);\n\n if (gfp.free_format) {\n for (var i = 1; i < NUMTOCENTRIES; ++i)\n toc[i] = 0xff & (255 * i / 100);\n } else {\n xingSeekTable(gfc.VBR_seek_table, toc);\n }\n\n // Start writing the tag after the zero frame\n var streamIndex = gfc.sideinfo_len;\n /**\n * Note: Xing header specifies that Xing data goes in the ancillary data\n * with NO ERROR PROTECTION. If error protecton in enabled, the Xing\n * data still starts at the same offset, and now it is in sideinfo data\n * block, and thus will not decode correctly by non-Xing tag aware\n * players\n */\n if (gfp.error_protection)\n streamIndex -= 2;\n\n // Put Vbr tag\n if (gfp.VBR == VbrMode.vbr_off) {\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(0);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(1);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(2);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(3);\n\n } else {\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(0);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(1);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(2);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(3);\n }\n\n // Put header flags\n createInteger(buffer, streamIndex, FRAMES_FLAG + BYTES_FLAG + TOC_FLAG\n + VBR_SCALE_FLAG);\n streamIndex += 4;\n\n // Put Total Number of frames\n createInteger(buffer, streamIndex, gfc.VBR_seek_table.nVbrNumFrames);\n streamIndex += 4;\n\n // Put total audio stream size, including Xing/LAME Header\n var streamSize = (gfc.VBR_seek_table.nBytesWritten + gfc.VBR_seek_table.TotalFrameSize);\n createInteger(buffer, streamIndex, 0 | streamSize);\n streamIndex += 4;\n\n /* Put TOC */\n System.arraycopy(toc, 0, buffer, streamIndex, toc.length);\n streamIndex += toc.length;\n\n if (gfp.error_protection) {\n // (jo) error_protection: add crc16 information to header\n bs.CRC_writeheader(gfc, buffer);\n }\n\n // work out CRC so far: initially crc = 0\n var crc = 0x00;\n for (var i = 0; i < streamIndex; i++)\n crc = crcUpdateLookup(buffer[i], crc);\n // Put LAME VBR info\n streamIndex += putLameVBR(gfp, streamSize, buffer, streamIndex, crc);\n\n return gfc.VBR_seek_table.TotalFrameSize;\n }\n\n /**\n * Write final VBR tag to the file.\n *\n * @param gfp\n * global flags\n * @param stream\n * stream to add the VBR tag to\n * @return 0 (OK), -1 else\n * @throws IOException\n * I/O error\n */\n this.putVbrTag = function (gfp, stream) {\n var gfc = gfp.internal_flags;\n\n if (gfc.VBR_seek_table.pos <= 0)\n return -1;\n\n // Seek to end of file\n stream.seek(stream.length());\n\n // Get file size, abort if file has zero length.\n if (stream.length() == 0)\n return -1;\n\n // The VBR tag may NOT be located at the beginning of the stream. If an\n // ID3 version 2 tag was added, then it must be skipped to write the VBR\n // tag data.\n var id3v2TagSize = skipId3v2(stream);\n\n // Seek to the beginning of the stream\n stream.seek(id3v2TagSize);\n\n var buffer = new_byte(MAXFRAMESIZE);\n var bytes = getLameTagFrame(gfp, buffer);\n if (bytes > buffer.length) {\n return -1;\n }\n\n if (bytes < 1) {\n return 0;\n }\n\n // Put it all to disk again\n stream.write(buffer, 0, bytes);\n // success\n return 0;\n }\n\n}\n\nmodule.exports = VBRTag;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nLame = require('./Lame.js');\nPresets = require('./Presets.js');\nGainAnalysis = require('./GainAnalysis.js');\nQuantizePVT = require('./QuantizePVT.js');\nQuantize = require('./Quantize.js');\nTakehiro = require('./Takehiro.js');\nReservoir = require('./Reservoir.js');\nMPEGMode = require('./MPEGMode.js');\nBitStream = require('./BitStream.js');\nvar Encoder = require('./Encoder.js');\nvar Version = require('./Version.js');\nvar VBRTag = require('./VBRTag.js');\n\nfunction GetAudio() {\n var parse;\n var mpg;\n\n this.setModules = function (parse2, mpg2) {\n parse = parse2;\n mpg = mpg2;\n }\n}\n\n\nfunction Parse() {\n var ver;\n var id3;\n var pre;\n\n this.setModules = function (ver2, id32, pre2) {\n ver = ver2;\n id3 = id32;\n pre = pre2;\n }\n}\n\nfunction MPGLib() {\n}\n\nfunction ID3Tag() {\n var bits;\n var ver;\n\n this.setModules = function (_bits, _ver) {\n bits = _bits;\n ver = _ver;\n }\n}\n\nfunction Mp3Encoder(channels, samplerate, kbps) {\n if (arguments.length != 3) {\n console.error('WARN: Mp3Encoder(channels, samplerate, kbps) not specified');\n channels = 1;\n samplerate = 44100;\n kbps = 128;\n }\n var lame = new Lame();\n var gaud = new GetAudio();\n var ga = new GainAnalysis();\n var bs = new BitStream();\n var p = new Presets();\n var qupvt = new QuantizePVT();\n var qu = new Quantize();\n var vbr = new VBRTag();\n var ver = new Version();\n var id3 = new ID3Tag();\n var rv = new Reservoir();\n var tak = new Takehiro();\n var parse = new Parse();\n var mpg = new MPGLib();\n\n lame.setModules(ga, bs, p, qupvt, qu, vbr, ver, id3, mpg);\n bs.setModules(ga, mpg, ver, vbr);\n id3.setModules(bs, ver);\n p.setModules(lame);\n qu.setModules(bs, rv, qupvt, tak);\n qupvt.setModules(tak, rv, lame.enc.psy);\n rv.setModules(bs);\n tak.setModules(qupvt);\n vbr.setModules(lame, bs, ver);\n gaud.setModules(parse, mpg);\n parse.setModules(ver, id3, p);\n\n var gfp = lame.lame_init();\n\n gfp.num_channels = channels;\n gfp.in_samplerate = samplerate;\n gfp.brate = kbps;\n gfp.mode = MPEGMode.STEREO;\n gfp.quality = 3;\n gfp.bWriteVbrTag = false;\n gfp.disable_reservoir = true;\n gfp.write_id3tag_automatic = false;\n\n var retcode = lame.lame_init_params(gfp);\n assert(0 == retcode);\n var maxSamples = 1152;\n var mp3buf_size = 0 | (1.25 * maxSamples + 7200);\n var mp3buf = new_byte(mp3buf_size);\n\n this.encodeBuffer = function (left, right) {\n if (channels == 1) {\n right = left;\n }\n assert(left.length == right.length);\n if (left.length > maxSamples) {\n maxSamples = left.length;\n mp3buf_size = 0 | (1.25 * maxSamples + 7200);\n mp3buf = new_byte(mp3buf_size);\n }\n\n var _sz = lame.lame_encode_buffer(gfp, left, right, left.length, mp3buf, 0, mp3buf_size);\n return new Int8Array(mp3buf.subarray(0, _sz));\n };\n\n this.flush = function () {\n var _sz = lame.lame_encode_flush(gfp, mp3buf, 0, mp3buf_size);\n return new Int8Array(mp3buf.subarray(0, _sz));\n };\n}\n\nfunction WavHeader() {\n this.dataOffset = 0;\n this.dataLen = 0;\n this.channels = 0;\n this.sampleRate = 0;\n}\n\nfunction fourccToInt(fourcc) {\n return fourcc.charCodeAt(0) << 24 | fourcc.charCodeAt(1) << 16 | fourcc.charCodeAt(2) << 8 | fourcc.charCodeAt(3);\n}\n\nWavHeader.RIFF = fourccToInt(\"RIFF\");\nWavHeader.WAVE = fourccToInt(\"WAVE\");\nWavHeader.fmt_ = fourccToInt(\"fmt \");\nWavHeader.data = fourccToInt(\"data\");\n\nWavHeader.readHeader = function (dataView) {\n var w = new WavHeader();\n\n var header = dataView.getUint32(0, false);\n if (WavHeader.RIFF != header) {\n return;\n }\n var fileLen = dataView.getUint32(4, true);\n if (WavHeader.WAVE != dataView.getUint32(8, false)) {\n return;\n }\n if (WavHeader.fmt_ != dataView.getUint32(12, false)) {\n return;\n }\n var fmtLen = dataView.getUint32(16, true);\n var pos = 16 + 4;\n switch (fmtLen) {\n case 16:\n case 18:\n w.channels = dataView.getUint16(pos + 2, true);\n w.sampleRate = dataView.getUint32(pos + 4, true);\n break;\n default:\n throw 'extended fmt chunk not implemented';\n }\n pos += fmtLen;\n var data = WavHeader.data;\n var len = 0;\n while (data != header) {\n header = dataView.getUint32(pos, false);\n len = dataView.getUint32(pos + 4, true);\n if (data == header) {\n break;\n }\n pos += (len + 8);\n }\n w.dataLen = len;\n w.dataOffset = pos + 8;\n return w;\n};\n\nmodule.exports.Mp3Encoder = Mp3Encoder;\nmodule.exports.WavHeader = WavHeader;\n","import { Mp3Encoder } from 'lamejs';\n\nclass Encoder {\n constructor(config) {\n this.config = {\n sampleRate: 44100,\n bitRate: 128\n };\n\n Object.assign(this.config, config);\n\n this.mp3Encoder = new Mp3Encoder(\n 1,\n this.config.sampleRate,\n this.config.bitRate\n );\n\n // Audio is processed by frames of 1152 samples per audio channel\n // http://lame.sourceforge.net/tech-FAQ.txt\n this.maxSamples = 1152;\n\n this.samplesMono = null;\n this.clearBuffer();\n }\n\n /**\n * Clear active buffer\n */\n clearBuffer() {\n this.dataBuffer = [];\n }\n\n /**\n * Append new audio buffer to current active buffer\n * @param {Buffer} buffer\n */\n appendToBuffer(buffer) {\n this.dataBuffer.push(new Int8Array(buffer));\n }\n\n /**\n * Float current data to 16 bits PCM\n * @param {Float32Array} input\n * @param {Int16Array} output\n */\n floatTo16BitPCM(input, output) {\n for (let i = 0; i < input.length; i++) {\n const s = Math.max(-1, Math.min(1, input[i]));\n output[i] = (s < 0 ? s * 0x8000 : s * 0x7FFF);\n }\n }\n\n /**\n * Convert buffer to proper format\n * @param {Array} arrayBuffer\n */\n convertBuffer(arrayBuffer) {\n const data = new Float32Array(arrayBuffer);\n const out = new Int16Array(arrayBuffer.length);\n this.floatTo16BitPCM(data, out);\n\n return out;\n }\n\n /**\n * Encode and append current buffer to dataBuffer\n * @param {Array} arrayBuffer\n */\n encode(arrayBuffer) {\n this.samplesMono = this.convertBuffer(arrayBuffer);\n let remaining = this.samplesMono.length;\n\n for (let i = 0; remaining >= 0; i += this.maxSamples) {\n const left = this.samplesMono.subarray(i, i + this.maxSamples);\n const mp3buffer = this.mp3Encoder.encodeBuffer(left);\n this.appendToBuffer(mp3buffer);\n remaining -= this.maxSamples;\n }\n }\n\n /**\n * Return full dataBuffer\n */\n finish() {\n this.appendToBuffer(this.mp3Encoder.flush());\n\n return this.dataBuffer;\n }\n};\n\nexport default Encoder;\n","import Encoder from './encoder';\n\nclass MicRecorder {\n constructor(config) {\n this.config = {\n // 128 or 160 kbit/s – mid-range bitrate quality\n bitRate: 128,\n\n // There is a known issue with some macOS machines, where the recording\n // will sometimes have a loud 'pop' or 'pop-click' sound. This flag\n // prevents getting audio from the microphone a few milliseconds after\n // the begining of the recording. It also helps to remove the mouse\n // \"click\" sound from the output mp3 file.\n startRecordingAt: 300,\n deviceId: null,\n };\n\n this.activeStream = null;\n this.context = null;\n this.microphone = null;\n this.processor = null;\n this.startTime = 0;\n\n Object.assign(this.config, config);\n }\n\n /**\n * Starts to listen for the microphone sound\n * @param {MediaStream} stream\n */\n addMicrophoneListener(stream) {\n this.activeStream = stream;\n\n // This prevents the weird noise once you start listening to the microphone\n this.timerToStart = setTimeout(() => {\n delete this.timerToStart;\n }, this.config.startRecordingAt);\n\n // Set up Web Audio API to process data from the media stream (microphone).\n this.microphone = this.context.createMediaStreamSource(stream);\n\n // Settings a bufferSize of 0 instructs the browser to choose the best bufferSize\n this.processor = this.context.createScriptProcessor(0, 1, 1);\n\n // Add all buffers from LAME into an array.\n this.processor.onaudioprocess = (event) => {\n if (this.timerToStart) {\n return;\n }\n\n // Send microphone data to LAME for MP3 encoding while recording.\n this.lameEncoder.encode(event.inputBuffer.getChannelData(0));\n };\n\n this.connectMicrophone();\n };\n\n /**\n * Requests access to the microphone and starts recording\n * @return Promise\n */\n initialize() {\n const AudioContext = window.AudioContext || window.webkitAudioContext;\n this.context = new AudioContext();\n this.config.sampleRate = this.context.sampleRate;\n this.lameEncoder = new Encoder(this.config);\n\n const audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true;\n\n return new Promise((resolve, reject) => {\n navigator.mediaDevices.getUserMedia({ audio })\n .then(stream => {\n this.addMicrophoneListener(stream);\n resolve(stream);\n }).catch(function(err) {\n reject(err);\n });\n })\n };\n\n /**\n * Initializes or resumes recording\n * @return Promise\n */\n start() {\n if (!this.processor || !this.microphone) {\n return this.initialize();\n } else {\n this.connectMicrophone();\n return Promise.resolve();\n }\n }\n\n /**\n * Pause recording\n * @return Promise\n */\n pause() {\n this.disconnectMicrophone();\n return Promise.resolve();\n };\n\n /**\n * Start retrieving microphone data\n */\n connectMicrophone() {\n if (this.processor && this.microphone) {\n this.microphone.connect(this.processor);\n this.processor.connect(this.context.destination);\n }\n }\n\n /**\n * Stop retrieving microphone data\n */\n disconnectMicrophone() {\n if (this.processor && this.microphone) {\n this.microphone.disconnect();\n this.processor.disconnect();\n }\n }\n\n /**\n * Disconnect microphone, processor and remove activeStream\n * @return MicRecorder\n */\n stop() {\n if (this.processor && this.microphone) {\n // Clean up the Web Audio API resources.\n this.disconnectMicrophone();\n\n // If all references using this.context are destroyed, context is closed\n // automatically. DOMException is fired when trying to close again\n if (this.context && this.context.state !== 'closed') {\n this.context.close();\n }\n\n this.processor.onaudioprocess = null;\n\n // Stop all audio tracks. Also, removes recording icon from chrome tab\n this.activeStream.getAudioTracks().forEach(track => track.stop());\n this.processor = null;\n this.microphone = null;\n }\n\n return this;\n };\n\n /**\n * Return Mp3 Buffer and Blob with type mp3\n * @return Promise\n */\n getMp3() {\n const finalBuffer = this.lameEncoder.finish();\n\n return new Promise((resolve, reject) => {\n if (finalBuffer.length === 0) {\n reject(new Error('No buffer to send'));\n } else {\n resolve([finalBuffer, new Blob(finalBuffer, { type: 'audio/mp3' })]);\n this.lameEncoder.clearBuffer();\n }\n });\n };\n}\n\nexport default MicRecorder;\n"],"names":["new_byte","new_int","new_float","new_double","new_float_n","new_int_n","new_array_n","Arrays","System","Util","ShortBlock","Float","VbrMode","assert","Encoder","III_psy_xmin","require$$0","require$$1","FFT","MPEGMode","L3Side","GrInfo","LameInternalFlags","IIISideInfo","ScaleFac","NsPsy","VBRSeekInfo","GainAnalysis","MeanBits","Tables","QuantizePVT","Takehiro","BitStream","new_short_n","Lame","PsyModel","LameGlobalFlags","ATH","ReplayGain","CBRNewIterationLoop","Presets","CalcNoiseResult","Quantize","VBRQuantize","CalcNoiseData","Reservoir","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","VBRTag","Version","config","assign","mp3Encoder","Mp3Encoder","sampleRate","bitRate","maxSamples","samplesMono","clearBuffer","dataBuffer","buffer","push","Int8Array","input","output","i","length","s","Math","max","min","arrayBuffer","data","Float32Array","out","Int16Array","floatTo16BitPCM","convertBuffer","remaining","left","subarray","mp3buffer","encodeBuffer","appendToBuffer","flush","MicRecorder","activeStream","context","microphone","processor","startTime","stream","timerToStart","setTimeout","startRecordingAt","createMediaStreamSource","createScriptProcessor","onaudioprocess","event","lameEncoder","encode","inputBuffer","getChannelData","connectMicrophone","AudioContext","window","webkitAudioContext","audio","deviceId","exact","Promise","resolve","reject","mediaDevices","getUserMedia","then","addMicrophoneListener","catch","err","initialize","disconnectMicrophone","connect","destination","disconnect","state","close","getAudioTracks","forEach","track","stop","finalBuffer","finish","Error","Blob","type"],"mappings":";;;;;;AAAA,SAASA,UAAQ,CAAC,KAAK,EAAE;IACrB,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;CAC/B;;AAED,SAAS,SAAS,CAAC,KAAK,EAAE;IACtB,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;;AAED,SAASC,SAAO,CAAC,KAAK,EAAE;IACpB,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;;AAED,SAASC,WAAS,CAAC,KAAK,EAAE;IACtB,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;CAClC;;AAED,SAASC,YAAU,CAAC,KAAK,EAAE;IACvB,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;CAClC;;AAED,SAASC,aAAW,CAAC,IAAI,EAAE;IACvB,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE;QAClB,OAAOF,WAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;KAC7B;IACD,IAAI,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,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amC,WAApC;;;;;;;;;;2CAOmB;UACjB,KAAKjC,SAAL,IAAkB,KAAKD,UAA3B,EAAuC;aAChCA,UAAL,CAAgBmC,UAAhB;aACKlC,SAAL,CAAekC,UAAf;;;;;;;;;;;2BAQG;UACD,KAAKlC,SAAL,IAAkB,KAAKD,UAA3B,EAAuC;;aAEhCgC,oBAAL;;;;YAII,KAAKjC,OAAL,IAAgB,KAAKA,OAAL,CAAaqC,KAAb,KAAuB,QAA3C,EAAqD;eAC9CrC,OAAL,CAAasC,KAAb;;;aAGGpC,SAAL,CAAeQ,cAAf,GAAgC,IAAhC;;;aAGKX,YAAL,CAAkBwC,cAAlB,GAAmCC,OAAnC,CAA2C;iBAASC,MAAMC,IAAN,EAAT;SAA3C;aACKxC,SAAL,GAAiB,IAAjB;aACKD,UAAL,GAAkB,IAAlB;;;aAGK,IAAP;;;;;;;;;;6BAOO;;;UACD0C,cAAc,KAAK/B,WAAL,CAAiBgC,MAAjB,EAApB;;aAEO,IAAIrB,OAAJ,CAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;YAClCkB,YAAYhE,MAAZ,KAAuB,CAA3B,EAA8B;iBACrB,IAAIkE,KAAJ,CAAU,mBAAV,CAAP;SADF,MAEO;kBACG,CAACF,WAAD,EAAc,IAAIG,IAAJ,CAASH,WAAT,EAAsB,EAAEI,MAAM,WAAR,EAAtB,CAAd,CAAR;iBACKnC,WAAL,CAAiBzC,WAAjB;;OALG,CAAP;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../node_modules/lamejs/src/js/common.js","../node_modules/lamejs/src/js/NewMDCT.js","../node_modules/lamejs/src/js/III_psy_xmin.js","../node_modules/lamejs/src/js/III_psy_ratio.js","../node_modules/lamejs/src/js/Encoder.js","../node_modules/lamejs/src/js/FFT.js","../node_modules/lamejs/src/js/PsyModel.js","../node_modules/lamejs/src/js/MPEGMode.js","../node_modules/lamejs/src/js/LameGlobalFlags.js","../node_modules/lamejs/src/js/L3Side.js","../node_modules/lamejs/src/js/GrInfo.js","../node_modules/lamejs/src/js/IIISideInfo.js","../node_modules/lamejs/src/js/ScaleFac.js","../node_modules/lamejs/src/js/NsPsy.js","../node_modules/lamejs/src/js/VBRSeekInfo.js","../node_modules/lamejs/src/js/LameInternalFlags.js","../node_modules/lamejs/src/js/ATH.js","../node_modules/lamejs/src/js/GainAnalysis.js","../node_modules/lamejs/src/js/ReplayGain.js","../node_modules/lamejs/src/js/MeanBits.js","../node_modules/lamejs/src/js/CBRNewIterationLoop.js","../node_modules/lamejs/src/js/Tables.js","../node_modules/lamejs/src/js/QuantizePVT.js","../node_modules/lamejs/src/js/Takehiro.js","../node_modules/lamejs/src/js/BitStream.js","../node_modules/lamejs/src/js/Lame.js","../node_modules/lamejs/src/js/Presets.js","../node_modules/lamejs/src/js/VBRQuantize.js","../node_modules/lamejs/src/js/CalcNoiseResult.js","../node_modules/lamejs/src/js/CalcNoiseData.js","../node_modules/lamejs/src/js/Quantize.js","../node_modules/lamejs/src/js/Reservoir.js","../node_modules/lamejs/src/js/Version.js","../node_modules/lamejs/src/js/VBRTag.js","../node_modules/lamejs/src/js/index.js","../src/encoder.js","../src/mic-recorder.js"],"sourcesContent":["function new_byte(count) {\n return new Int8Array(count);\n}\n\nfunction new_short(count) {\n return new Int16Array(count);\n}\n\nfunction new_int(count) {\n return new Int32Array(count);\n}\n\nfunction new_float(count) {\n return new Float32Array(count);\n}\n\nfunction new_double(count) {\n return new Float64Array(count);\n}\n\nfunction new_float_n(args) {\n if (args.length == 1) {\n return new_float(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_float_n(args));\n }\n return A;\n}\nfunction new_int_n(args) {\n if (args.length == 1) {\n return new_int(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_int_n(args));\n }\n return A;\n}\n\nfunction new_short_n(args) {\n if (args.length == 1) {\n return new_short(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_short_n(args));\n }\n return A;\n}\n\nfunction new_array_n(args) {\n if (args.length == 1) {\n return new Array(args[0]);\n }\n var sz = args[0];\n args = args.slice(1);\n var A = [];\n for (var i = 0; i < sz; i++) {\n A.push(new_array_n(args));\n }\n return A;\n}\n\n\nvar Arrays = {};\n\nArrays.fill = function (a, fromIndex, toIndex, val) {\n if (arguments.length == 2) {\n for (var i = 0; i < a.length; i++) {\n a[i] = arguments[1];\n }\n } else {\n for (var i = fromIndex; i < toIndex; i++) {\n a[i] = val;\n }\n }\n};\n\nvar System = {};\n\nSystem.arraycopy = function (src, srcPos, dest, destPos, length) {\n var srcEnd = srcPos + length;\n while (srcPos < srcEnd)\n dest[destPos++] = src[srcPos++];\n};\n\n\nvar Util = {};\nUtil.SQRT2 = 1.41421356237309504880;\nUtil.FAST_LOG10 = function (x) {\n return Math.log10(x);\n};\n\nUtil.FAST_LOG10_X = function (x, y) {\n return Math.log10(x) * y;\n};\n\nfunction ShortBlock(ordinal) {\n this.ordinal = ordinal;\n}\n/**\n * LAME may use them, even different block types for L/R.\n */\nShortBlock.short_block_allowed = new ShortBlock(0);\n/**\n * LAME may use them, but always same block types in L/R.\n */\nShortBlock.short_block_coupled = new ShortBlock(1);\n/**\n * LAME will not use short blocks, long blocks only.\n */\nShortBlock.short_block_dispensed = new ShortBlock(2);\n/**\n * LAME will not use long blocks, short blocks only.\n */\nShortBlock.short_block_forced = new ShortBlock(3);\n\nvar Float = {};\nFloat.MAX_VALUE = 3.4028235e+38;\n\nfunction VbrMode(ordinal) {\n this.ordinal = ordinal;\n}\nVbrMode.vbr_off = new VbrMode(0);\nVbrMode.vbr_mt = new VbrMode(1);\nVbrMode.vbr_rh = new VbrMode(2);\nVbrMode.vbr_abr = new VbrMode(3);\nVbrMode.vbr_mtrh = new VbrMode(4);\nVbrMode.vbr_default = VbrMode.vbr_mtrh;\n\nvar assert = function (x) {\n //console.assert(x);\n};\n\nmodule.exports = {\n \"System\": System,\n \"VbrMode\": VbrMode,\n \"Float\": Float,\n \"ShortBlock\": ShortBlock,\n \"Util\": Util,\n \"Arrays\": Arrays,\n \"new_array_n\": new_array_n,\n \"new_byte\": new_byte,\n \"new_double\": new_double,\n \"new_float\": new_float,\n \"new_float_n\": new_float_n,\n \"new_int\": new_int,\n \"new_int_n\": new_int_n,\n \"new_short\": new_short,\n \"new_short_n\": new_short_n,\n \"assert\": assert\n};\n","/*\n * MP3 window subband -> subband filtering -> mdct routine\n *\n * Copyright (c) 1999-2000 Takehiro Tominaga\n *\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Library General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n/*\n * Special Thanks to Patrick De Smet for your advices.\n */\n\n/* $Id: NewMDCT.java,v 1.11 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n\nfunction NewMDCT() {\n\n\tvar enwindow = [\n\t\t\t-4.77e-07 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.03951e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.53674e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t2.841473e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t3.5758972e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t3.401756e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.83715e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.9182e-05 * 0.740951125354959 / 2.384e-06, /* 15 */\n\t\t\t1.2398e-05 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.91212e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t2.283096e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t1.6994476e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t-1.8756866e-02 * 0.740951125354959 / 2.384e-06,\n\t\t\t-2.630711e-03 * 0.740951125354959 / 2.384e-06,\n\t\t\t-2.47478e-04 * 0.740951125354959 / 2.384e-06,\n\t\t\t-1.4782e-05 * 0.740951125354959 / 2.384e-06,\n\t\t\t9.063471690191471e-01, 1.960342806591213e-01,\n\n\t\t\t-4.77e-07 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.05858e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.30786e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t2.521515e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t3.5694122e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t3.643036e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.91821e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t9.6321e-05 * 0.773010453362737 / 2.384e-06, /* 14 */\n\t\t\t1.1444e-05 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.65462e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t2.110004e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t1.6112804e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t-1.9634247e-02 * 0.773010453362737 / 2.384e-06,\n\t\t\t-2.803326e-03 * 0.773010453362737 / 2.384e-06,\n\t\t\t-2.77042e-04 * 0.773010453362737 / 2.384e-06,\n\t\t\t-1.6689e-05 * 0.773010453362737 / 2.384e-06,\n\t\t\t8.206787908286602e-01, 3.901806440322567e-01,\n\n\t\t\t-4.77e-07 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.07288e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.02653e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t2.174854e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t3.5586357e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t3.858566e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.95159e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t9.3460e-05 * 0.803207531480645 / 2.384e-06, /* 13 */\n\t\t\t1.0014e-05 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.40190e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.937389e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t1.5233517e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t-2.0506859e-02 * 0.803207531480645 / 2.384e-06,\n\t\t\t-2.974033e-03 * 0.803207531480645 / 2.384e-06,\n\t\t\t-3.07560e-04 * 0.803207531480645 / 2.384e-06,\n\t\t\t-1.8120e-05 * 0.803207531480645 / 2.384e-06,\n\t\t\t7.416505462720353e-01, 5.805693545089249e-01,\n\n\t\t\t-4.77e-07 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.08242e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t8.68797e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.800537e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t3.5435200e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t4.049301e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t9.94205e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t9.0599e-05 * 0.831469612302545 / 2.384e-06, /* 12 */\n\t\t\t9.060e-06 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.16348e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.766682e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t1.4358521e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t-2.1372318e-02 * 0.831469612302545 / 2.384e-06,\n\t\t\t-3.14188e-03 * 0.831469612302545 / 2.384e-06,\n\t\t\t-3.39031e-04 * 0.831469612302545 / 2.384e-06,\n\t\t\t-1.9550e-05 * 0.831469612302545 / 2.384e-06,\n\t\t\t6.681786379192989e-01, 7.653668647301797e-01,\n\n\t\t\t-4.77e-07 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.08719e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t8.29220e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.399517e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t3.5242081e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t4.215240e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t9.89437e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t8.7261e-05 * 0.857728610000272 / 2.384e-06, /* 11 */\n\t\t\t8.106e-06 * 0.857728610000272 / 2.384e-06,\n\t\t\t9.3937e-05 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.597881e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t1.3489246e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t-2.2228718e-02 * 0.857728610000272 / 2.384e-06,\n\t\t\t-3.306866e-03 * 0.857728610000272 / 2.384e-06,\n\t\t\t-3.71456e-04 * 0.857728610000272 / 2.384e-06,\n\t\t\t-2.1458e-05 * 0.857728610000272 / 2.384e-06,\n\t\t\t5.993769336819237e-01, 9.427934736519954e-01,\n\n\t\t\t-4.77e-07 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.08719e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t7.8392e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t9.71317e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t3.5007000e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t4.357815e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t9.80854e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t8.3923e-05 * 0.881921264348355 / 2.384e-06, /* 10 */\n\t\t\t7.629e-06 * 0.881921264348355 / 2.384e-06,\n\t\t\t7.2956e-05 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.432419e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t1.2627602e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t-2.3074150e-02 * 0.881921264348355 / 2.384e-06,\n\t\t\t-3.467083e-03 * 0.881921264348355 / 2.384e-06,\n\t\t\t-4.04358e-04 * 0.881921264348355 / 2.384e-06,\n\t\t\t-2.3365e-05 * 0.881921264348355 / 2.384e-06,\n\t\t\t5.345111359507916e-01, 1.111140466039205e+00,\n\n\t\t\t-9.54e-07 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.08242e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t7.31945e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t5.15938e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t3.4730434e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t4.477024e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t9.68933e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t8.0585e-05 * 0.903989293123443 / 2.384e-06, /* 9 */\n\t\t\t6.676e-06 * 0.903989293123443 / 2.384e-06,\n\t\t\t5.2929e-05 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.269817e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t1.1775017e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t-2.3907185e-02 * 0.903989293123443 / 2.384e-06,\n\t\t\t-3.622532e-03 * 0.903989293123443 / 2.384e-06,\n\t\t\t-4.38213e-04 * 0.903989293123443 / 2.384e-06,\n\t\t\t-2.5272e-05 * 0.903989293123443 / 2.384e-06,\n\t\t\t4.729647758913199e-01, 1.268786568327291e+00,\n\n\t\t\t-9.54e-07 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.06812e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t6.74248e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.3379e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.4412861e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t4.573822e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t9.54151e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t7.6771e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t6.199e-06 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t3.4332e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.111031e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t1.0933399e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-2.4725437e-02 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-3.771782e-03 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-4.72546e-04 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t-2.7657e-05 * 0.92387953251128675613 / 2.384e-06,\n\t\t\t4.1421356237309504879e-01, /* tan(PI/8) */\n\t\t\t1.414213562373095e+00,\n\n\t\t\t-9.54e-07 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.05381e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t6.10352e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t-4.75883e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t3.4055710e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t4.649162e-03 * 0.941544065183021 / 2.384e-06,\n\t\t\t9.35555e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t7.3433e-05 * 0.941544065183021 / 2.384e-06, /* 7 */\n\t\t\t5.245e-06 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.7166e-05 * 0.941544065183021 / 2.384e-06,\n\t\t\t9.56535e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t1.0103703e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t-2.5527000e-02 * 0.941544065183021 / 2.384e-06,\n\t\t\t-3.914356e-03 * 0.941544065183021 / 2.384e-06,\n\t\t\t-5.07355e-04 * 0.941544065183021 / 2.384e-06,\n\t\t\t-3.0041e-05 * 0.941544065183021 / 2.384e-06,\n\t\t\t3.578057213145241e-01, 1.546020906725474e+00,\n\n\t\t\t-9.54e-07 * 0.956940335732209 / 2.384e-06,\n\t\t\t1.02520e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t5.39303e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t-1.011848e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t3.3659935e-02 * 0.956940335732209 / 2.384e-06,\n\t\t\t4.703045e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.15051e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t7.0095e-05 * 0.956940335732209 / 2.384e-06, /* 6 */\n\t\t\t4.768e-06 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.54e-07 * 0.956940335732209 / 2.384e-06,\n\t\t\t8.06808e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t9.287834e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t-2.6310921e-02 * 0.956940335732209 / 2.384e-06,\n\t\t\t-4.048824e-03 * 0.956940335732209 / 2.384e-06,\n\t\t\t-5.42164e-04 * 0.956940335732209 / 2.384e-06,\n\t\t\t-3.2425e-05 * 0.956940335732209 / 2.384e-06,\n\t\t\t3.033466836073424e-01, 1.662939224605090e+00,\n\n\t\t\t-1.431e-06 * 0.970031253194544 / 2.384e-06,\n\t\t\t9.9182e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t4.62532e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t-1.573563e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t3.3225536e-02 * 0.970031253194544 / 2.384e-06,\n\t\t\t4.737377e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t8.91685e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t6.6280e-05 * 0.970031253194544 / 2.384e-06, /* 5 */\n\t\t\t4.292e-06 * 0.970031253194544 / 2.384e-06,\n\t\t\t-1.3828e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t6.61850e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t8.487225e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t-2.7073860e-02 * 0.970031253194544 / 2.384e-06,\n\t\t\t-4.174709e-03 * 0.970031253194544 / 2.384e-06,\n\t\t\t-5.76973e-04 * 0.970031253194544 / 2.384e-06,\n\t\t\t-3.4809e-05 * 0.970031253194544 / 2.384e-06,\n\t\t\t2.504869601913055e-01, 1.763842528696710e+00,\n\n\t\t\t-1.431e-06 * 0.98078528040323 / 2.384e-06,\n\t\t\t9.5367e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t3.78609e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.161503e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t3.2754898e-02 * 0.98078528040323 / 2.384e-06,\n\t\t\t4.752159e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t8.66413e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t6.2943e-05 * 0.98078528040323 / 2.384e-06, /* 4 */\n\t\t\t3.815e-06 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.718e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t5.22137e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t7.703304e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t-2.7815342e-02 * 0.98078528040323 / 2.384e-06,\n\t\t\t-4.290581e-03 * 0.98078528040323 / 2.384e-06,\n\t\t\t-6.11782e-04 * 0.98078528040323 / 2.384e-06,\n\t\t\t-3.7670e-05 * 0.98078528040323 / 2.384e-06,\n\t\t\t1.989123673796580e-01, 1.847759065022573e+00,\n\n\t\t\t-1.907e-06 * 0.989176509964781 / 2.384e-06,\n\t\t\t9.0122e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t2.88486e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t-2.774239e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t3.2248020e-02 * 0.989176509964781 / 2.384e-06,\n\t\t\t4.748821e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t8.38757e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t5.9605e-05 * 0.989176509964781 / 2.384e-06, /* 3 */\n\t\t\t3.338e-06 * 0.989176509964781 / 2.384e-06,\n\t\t\t-3.9577e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t3.88145e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t6.937027e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t-2.8532982e-02 * 0.989176509964781 / 2.384e-06,\n\t\t\t-4.395962e-03 * 0.989176509964781 / 2.384e-06,\n\t\t\t-6.46591e-04 * 0.989176509964781 / 2.384e-06,\n\t\t\t-4.0531e-05 * 0.989176509964781 / 2.384e-06,\n\t\t\t1.483359875383474e-01, 1.913880671464418e+00,\n\n\t\t\t-1.907e-06 * 0.995184726672197 / 2.384e-06,\n\t\t\t8.4400e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t1.91689e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t-3.411293e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t3.1706810e-02 * 0.995184726672197 / 2.384e-06,\n\t\t\t4.728317e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t8.09669e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t5.579e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t3.338e-06 * 0.995184726672197 / 2.384e-06,\n\t\t\t-5.0545e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t2.59876e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t6.189346e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t-2.9224873e-02 * 0.995184726672197 / 2.384e-06,\n\t\t\t-4.489899e-03 * 0.995184726672197 / 2.384e-06,\n\t\t\t-6.80923e-04 * 0.995184726672197 / 2.384e-06,\n\t\t\t-4.3392e-05 * 0.995184726672197 / 2.384e-06,\n\t\t\t9.849140335716425e-02, 1.961570560806461e+00,\n\n\t\t\t-2.384e-06 * 0.998795456205172 / 2.384e-06,\n\t\t\t7.7724e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t8.8215e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.072189e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t3.1132698e-02 * 0.998795456205172 / 2.384e-06,\n\t\t\t4.691124e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t7.79152e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t5.2929e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t2.861e-06 * 0.998795456205172 / 2.384e-06,\n\t\t\t-6.0558e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t1.37329e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t5.462170e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t-2.9890060e-02 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.570484e-03 * 0.998795456205172 / 2.384e-06,\n\t\t\t-7.14302e-04 * 0.998795456205172 / 2.384e-06,\n\t\t\t-4.6253e-05 * 0.998795456205172 / 2.384e-06,\n\t\t\t4.912684976946725e-02, 1.990369453344394e+00,\n\n\t\t\t3.5780907e-02 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.7876148e-02 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t3.134727e-03 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t2.457142e-03 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t9.71317e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t2.18868e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.01566e-04 * Util.SQRT2 * 0.5 / 2.384e-06,\n\t\t\t1.3828e-05 * Util.SQRT2 * 0.5 / 2.384e-06,\n\n\t\t\t3.0526638e-02 / 2.384e-06, 4.638195e-03 / 2.384e-06,\n\t\t\t7.47204e-04 / 2.384e-06, 4.9591e-05 / 2.384e-06,\n\t\t\t4.756451e-03 / 2.384e-06, 2.1458e-05 / 2.384e-06,\n\t\t\t-6.9618e-05 / 2.384e-06, /* 2.384e-06/2.384e-06 */\n\t];\n\n\tvar NS = 12;\n\tvar NL = 36;\n\n\tvar win = [\n\t [\n\t 2.382191739347913e-13,\n\t 6.423305872147834e-13,\n\t 9.400849094049688e-13,\n\t 1.122435026096556e-12,\n\t 1.183840321267481e-12,\n\t 1.122435026096556e-12,\n\t 9.400849094049690e-13,\n\t 6.423305872147839e-13,\n\t 2.382191739347918e-13,\n\n\t 5.456116108943412e-12,\n\t 4.878985199565852e-12,\n\t 4.240448995017367e-12,\n\t 3.559909094758252e-12,\n\t 2.858043359288075e-12,\n\t 2.156177623817898e-12,\n\t 1.475637723558783e-12,\n\t 8.371015190102974e-13,\n\t 2.599706096327376e-13,\n\n\t -5.456116108943412e-12,\n\t -4.878985199565852e-12,\n\t -4.240448995017367e-12,\n\t -3.559909094758252e-12,\n\t -2.858043359288076e-12,\n\t -2.156177623817898e-12,\n\t -1.475637723558783e-12,\n\t -8.371015190102975e-13,\n\t -2.599706096327376e-13,\n\n\t -2.382191739347923e-13,\n\t -6.423305872147843e-13,\n\t -9.400849094049696e-13,\n\t -1.122435026096556e-12,\n\t -1.183840321267481e-12,\n\t -1.122435026096556e-12,\n\t -9.400849094049694e-13,\n\t -6.423305872147840e-13,\n\t -2.382191739347918e-13,\n\t ],\n\t [\n\t 2.382191739347913e-13,\n\t 6.423305872147834e-13,\n\t 9.400849094049688e-13,\n\t 1.122435026096556e-12,\n\t 1.183840321267481e-12,\n\t 1.122435026096556e-12,\n\t 9.400849094049688e-13,\n\t 6.423305872147841e-13,\n\t 2.382191739347918e-13,\n\n\t 5.456116108943413e-12,\n\t 4.878985199565852e-12,\n\t 4.240448995017367e-12,\n\t 3.559909094758253e-12,\n\t 2.858043359288075e-12,\n\t 2.156177623817898e-12,\n\t 1.475637723558782e-12,\n\t 8.371015190102975e-13,\n\t 2.599706096327376e-13,\n\n\t -5.461314069809755e-12,\n\t -4.921085770524055e-12,\n\t -4.343405037091838e-12,\n\t -3.732668368707687e-12,\n\t -3.093523840190885e-12,\n\t -2.430835727329465e-12,\n\t -1.734679010007751e-12,\n\t -9.748253656609281e-13,\n\t -2.797435120168326e-13,\n\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t -2.283748241799531e-13,\n\t -4.037858874020686e-13,\n\t -2.146547464825323e-13,\n\t ],\n\t [\n\t 1.316524975873958e-01, /* win[SHORT_TYPE] */\n\t 4.142135623730950e-01,\n\t 7.673269879789602e-01,\n\n\t 1.091308501069271e+00, /* tantab_l */\n\t 1.303225372841206e+00,\n\t 1.569685577117490e+00,\n\t 1.920982126971166e+00,\n\t 2.414213562373094e+00,\n\t 3.171594802363212e+00,\n\t 4.510708503662055e+00,\n\t 7.595754112725146e+00,\n\t 2.290376554843115e+01,\n\n\t 0.98480775301220802032, /* cx */\n\t 0.64278760968653936292,\n\t 0.34202014332566882393,\n\t 0.93969262078590842791,\n\t -0.17364817766693030343,\n\t -0.76604444311897790243,\n\t 0.86602540378443870761,\n\t 0.500000000000000e+00,\n\n\t -5.144957554275265e-01, /* ca */\n\t -4.717319685649723e-01,\n\t -3.133774542039019e-01,\n\t -1.819131996109812e-01,\n\t -9.457419252642064e-02,\n\t -4.096558288530405e-02,\n\t -1.419856857247115e-02,\n\t -3.699974673760037e-03,\n\n\t 8.574929257125442e-01, /* cs */\n\t 8.817419973177052e-01,\n\t 9.496286491027329e-01,\n\t 9.833145924917901e-01,\n\t 9.955178160675857e-01,\n\t 9.991605581781475e-01,\n\t 9.998991952444470e-01,\n\t 9.999931550702802e-01,\n\t ],\n\t [\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 0.000000000000000e+00,\n\t 2.283748241799531e-13,\n\t 4.037858874020686e-13,\n\t 2.146547464825323e-13,\n\n\t 5.461314069809755e-12,\n\t 4.921085770524055e-12,\n\t 4.343405037091838e-12,\n\t 3.732668368707687e-12,\n\t 3.093523840190885e-12,\n\t 2.430835727329466e-12,\n\t 1.734679010007751e-12,\n\t 9.748253656609281e-13,\n\t 2.797435120168326e-13,\n\n\t -5.456116108943413e-12,\n\t -4.878985199565852e-12,\n\t -4.240448995017367e-12,\n\t -3.559909094758253e-12,\n\t -2.858043359288075e-12,\n\t -2.156177623817898e-12,\n\t -1.475637723558782e-12,\n\t -8.371015190102975e-13,\n\t -2.599706096327376e-13,\n\n\t -2.382191739347913e-13,\n\t -6.423305872147834e-13,\n\t -9.400849094049688e-13,\n\t -1.122435026096556e-12,\n\t -1.183840321267481e-12,\n\t -1.122435026096556e-12,\n\t -9.400849094049688e-13,\n\t -6.423305872147841e-13,\n\t -2.382191739347918e-13,\n\t ]\n\t];\n\n\tvar tantab_l = win[Encoder.SHORT_TYPE];\n\tvar cx = win[Encoder.SHORT_TYPE];\n\tvar ca = win[Encoder.SHORT_TYPE];\n\tvar cs = win[Encoder.SHORT_TYPE];\n\n\t/**\n\t * new IDCT routine written by Takehiro TOMINAGA\n\t *\n\t * PURPOSE: Overlapping window on PCM samples
\n\t *\n\t * SEMANTICS:
\n\t * 32 16-bit pcm samples are scaled to fractional 2's complement and\n\t * concatenated to the end of the window buffer #x#. The updated window\n\t * buffer #x# is then windowed by the analysis window #c# to produce the\n\t * windowed sample #z#\n\t */\n\tvar order = [\n\t 0, 1, 16, 17, 8, 9, 24, 25, 4, 5, 20, 21, 12, 13, 28, 29,\n\t 2, 3, 18, 19, 10, 11, 26, 27, 6, 7, 22, 23, 14, 15, 30, 31\n\t];\n\n\t/**\n\t * returns sum_j=0^31 a[j]*cos(PI*j*(k+1/2)/32), 0<=k<32\n\t */\n\tfunction window_subband(x1, x1Pos, a) {\n\t\tvar wp = 10;\n\n\t\tvar x2 = x1Pos + 238 - 14 - 286;\n\n\t\tfor (var i = -15; i < 0; i++) {\n\t\t\tvar w, s, t;\n\n\t\t\tw = enwindow[wp + -10];\n\t\t\ts = x1[x2 + -224] * w;\n\t\t\tt = x1[x1Pos + 224] * w;\n\t\t\tw = enwindow[wp + -9];\n\t\t\ts += x1[x2 + -160] * w;\n\t\t\tt += x1[x1Pos + 160] * w;\n\t\t\tw = enwindow[wp + -8];\n\t\t\ts += x1[x2 + -96] * w;\n\t\t\tt += x1[x1Pos + 96] * w;\n\t\t\tw = enwindow[wp + -7];\n\t\t\ts += x1[x2 + -32] * w;\n\t\t\tt += x1[x1Pos + 32] * w;\n\t\t\tw = enwindow[wp + -6];\n\t\t\ts += x1[x2 + 32] * w;\n\t\t\tt += x1[x1Pos + -32] * w;\n\t\t\tw = enwindow[wp + -5];\n\t\t\ts += x1[x2 + 96] * w;\n\t\t\tt += x1[x1Pos + -96] * w;\n\t\t\tw = enwindow[wp + -4];\n\t\t\ts += x1[x2 + 160] * w;\n\t\t\tt += x1[x1Pos + -160] * w;\n\t\t\tw = enwindow[wp + -3];\n\t\t\ts += x1[x2 + 224] * w;\n\t\t\tt += x1[x1Pos + -224] * w;\n\n\t\t\tw = enwindow[wp + -2];\n\t\t\ts += x1[x1Pos + -256] * w;\n\t\t\tt -= x1[x2 + 256] * w;\n\t\t\tw = enwindow[wp + -1];\n\t\t\ts += x1[x1Pos + -192] * w;\n\t\t\tt -= x1[x2 + 192] * w;\n\t\t\tw = enwindow[wp + 0];\n\t\t\ts += x1[x1Pos + -128] * w;\n\t\t\tt -= x1[x2 + 128] * w;\n\t\t\tw = enwindow[wp + 1];\n\t\t\ts += x1[x1Pos + -64] * w;\n\t\t\tt -= x1[x2 + 64] * w;\n\t\t\tw = enwindow[wp + 2];\n\t\t\ts += x1[x1Pos + 0] * w;\n\t\t\tt -= x1[x2 + 0] * w;\n\t\t\tw = enwindow[wp + 3];\n\t\t\ts += x1[x1Pos + 64] * w;\n\t\t\tt -= x1[x2 + -64] * w;\n\t\t\tw = enwindow[wp + 4];\n\t\t\ts += x1[x1Pos + 128] * w;\n\t\t\tt -= x1[x2 + -128] * w;\n\t\t\tw = enwindow[wp + 5];\n\t\t\ts += x1[x1Pos + 192] * w;\n\t\t\tt -= x1[x2 + -192] * w;\n\n\t\t\t/*\n\t\t\t * this multiplyer could be removed, but it needs more 256 FLOAT\n\t\t\t * data. thinking about the data cache performance, I think we\n\t\t\t * should not use such a huge table. tt 2000/Oct/25\n\t\t\t */\n\t\t\ts *= enwindow[wp + 6];\n\t\t\tw = t - s;\n\t\t\ta[30 + i * 2] = t + s;\n\t\t\ta[31 + i * 2] = enwindow[wp + 7] * w;\n\t\t\twp += 18;\n\t\t\tx1Pos--;\n\t\t\tx2++;\n\t\t}\n\t\t{\n\t\t\tvar s, t, u, v;\n\t\t\tt = x1[x1Pos + -16] * enwindow[wp + -10];\n\t\t\ts = x1[x1Pos + -32] * enwindow[wp + -2];\n\t\t\tt += (x1[x1Pos + -48] - x1[x1Pos + 16]) * enwindow[wp + -9];\n\t\t\ts += x1[x1Pos + -96] * enwindow[wp + -1];\n\t\t\tt += (x1[x1Pos + -80] + x1[x1Pos + 48]) * enwindow[wp + -8];\n\t\t\ts += x1[x1Pos + -160] * enwindow[wp + 0];\n\t\t\tt += (x1[x1Pos + -112] - x1[x1Pos + 80]) * enwindow[wp + -7];\n\t\t\ts += x1[x1Pos + -224] * enwindow[wp + 1];\n\t\t\tt += (x1[x1Pos + -144] + x1[x1Pos + 112]) * enwindow[wp + -6];\n\t\t\ts -= x1[x1Pos + 32] * enwindow[wp + 2];\n\t\t\tt += (x1[x1Pos + -176] - x1[x1Pos + 144]) * enwindow[wp + -5];\n\t\t\ts -= x1[x1Pos + 96] * enwindow[wp + 3];\n\t\t\tt += (x1[x1Pos + -208] + x1[x1Pos + 176]) * enwindow[wp + -4];\n\t\t\ts -= x1[x1Pos + 160] * enwindow[wp + 4];\n\t\t\tt += (x1[x1Pos + -240] - x1[x1Pos + 208]) * enwindow[wp + -3];\n\t\t\ts -= x1[x1Pos + 224];\n\n\t\t\tu = s - t;\n\t\t\tv = s + t;\n\n\t\t\tt = a[14];\n\t\t\ts = a[15] - t;\n\n\t\t\ta[31] = v + t; /* A0 */\n\t\t\ta[30] = u + s; /* A1 */\n\t\t\ta[15] = u - s; /* A2 */\n\t\t\ta[14] = v - t; /* A3 */\n\t\t}\n\t\t{\n\t\t\tvar xr;\n\t\t\txr = a[28] - a[0];\n\t\t\ta[0] += a[28];\n\t\t\ta[28] = xr * enwindow[wp + -2 * 18 + 7];\n\t\t\txr = a[29] - a[1];\n\t\t\ta[1] += a[29];\n\t\t\ta[29] = xr * enwindow[wp + -2 * 18 + 7];\n\n\t\t\txr = a[26] - a[2];\n\t\t\ta[2] += a[26];\n\t\t\ta[26] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[27] - a[3];\n\t\t\ta[3] += a[27];\n\t\t\ta[27] = xr * enwindow[wp + -4 * 18 + 7];\n\n\t\t\txr = a[24] - a[4];\n\t\t\ta[4] += a[24];\n\t\t\ta[24] = xr * enwindow[wp + -6 * 18 + 7];\n\t\t\txr = a[25] - a[5];\n\t\t\ta[5] += a[25];\n\t\t\ta[25] = xr * enwindow[wp + -6 * 18 + 7];\n\n\t\t\txr = a[22] - a[6];\n\t\t\ta[6] += a[22];\n\t\t\ta[22] = xr * Util.SQRT2;\n\t\t\txr = a[23] - a[7];\n\t\t\ta[7] += a[23];\n\t\t\ta[23] = xr * Util.SQRT2 - a[7];\n\t\t\ta[7] -= a[6];\n\t\t\ta[22] -= a[7];\n\t\t\ta[23] -= a[22];\n\n\t\t\txr = a[6];\n\t\t\ta[6] = a[31] - xr;\n\t\t\ta[31] = a[31] + xr;\n\t\t\txr = a[7];\n\t\t\ta[7] = a[30] - xr;\n\t\t\ta[30] = a[30] + xr;\n\t\t\txr = a[22];\n\t\t\ta[22] = a[15] - xr;\n\t\t\ta[15] = a[15] + xr;\n\t\t\txr = a[23];\n\t\t\ta[23] = a[14] - xr;\n\t\t\ta[14] = a[14] + xr;\n\n\t\t\txr = a[20] - a[8];\n\t\t\ta[8] += a[20];\n\t\t\ta[20] = xr * enwindow[wp + -10 * 18 + 7];\n\t\t\txr = a[21] - a[9];\n\t\t\ta[9] += a[21];\n\t\t\ta[21] = xr * enwindow[wp + -10 * 18 + 7];\n\n\t\t\txr = a[18] - a[10];\n\t\t\ta[10] += a[18];\n\t\t\ta[18] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = a[19] - a[11];\n\t\t\ta[11] += a[19];\n\t\t\ta[19] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[16] - a[12];\n\t\t\ta[12] += a[16];\n\t\t\ta[16] = xr * enwindow[wp + -14 * 18 + 7];\n\t\t\txr = a[17] - a[13];\n\t\t\ta[13] += a[17];\n\t\t\ta[17] = xr * enwindow[wp + -14 * 18 + 7];\n\n\t\t\txr = -a[20] + a[24];\n\t\t\ta[20] += a[24];\n\t\t\ta[24] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = -a[21] + a[25];\n\t\t\ta[21] += a[25];\n\t\t\ta[25] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[4] - a[8];\n\t\t\ta[4] += a[8];\n\t\t\ta[8] = xr * enwindow[wp + -12 * 18 + 7];\n\t\t\txr = a[5] - a[9];\n\t\t\ta[5] += a[9];\n\t\t\ta[9] = xr * enwindow[wp + -12 * 18 + 7];\n\n\t\t\txr = a[0] - a[12];\n\t\t\ta[0] += a[12];\n\t\t\ta[12] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[1] - a[13];\n\t\t\ta[1] += a[13];\n\t\t\ta[13] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = a[16] - a[28];\n\t\t\ta[16] += a[28];\n\t\t\ta[28] = xr * enwindow[wp + -4 * 18 + 7];\n\t\t\txr = -a[17] + a[29];\n\t\t\ta[17] += a[29];\n\t\t\ta[29] = xr * enwindow[wp + -4 * 18 + 7];\n\n\t\t\txr = Util.SQRT2 * (a[2] - a[10]);\n\t\t\ta[2] += a[10];\n\t\t\ta[10] = xr;\n\t\t\txr = Util.SQRT2 * (a[3] - a[11]);\n\t\t\ta[3] += a[11];\n\t\t\ta[11] = xr;\n\t\t\txr = Util.SQRT2 * (-a[18] + a[26]);\n\t\t\ta[18] += a[26];\n\t\t\ta[26] = xr - a[18];\n\t\t\txr = Util.SQRT2 * (-a[19] + a[27]);\n\t\t\ta[19] += a[27];\n\t\t\ta[27] = xr - a[19];\n\n\t\t\txr = a[2];\n\t\t\ta[19] -= a[3];\n\t\t\ta[3] -= xr;\n\t\t\ta[2] = a[31] - xr;\n\t\t\ta[31] += xr;\n\t\t\txr = a[3];\n\t\t\ta[11] -= a[19];\n\t\t\ta[18] -= xr;\n\t\t\ta[3] = a[30] - xr;\n\t\t\ta[30] += xr;\n\t\t\txr = a[18];\n\t\t\ta[27] -= a[11];\n\t\t\ta[19] -= xr;\n\t\t\ta[18] = a[15] - xr;\n\t\t\ta[15] += xr;\n\n\t\t\txr = a[19];\n\t\t\ta[10] -= xr;\n\t\t\ta[19] = a[14] - xr;\n\t\t\ta[14] += xr;\n\t\t\txr = a[10];\n\t\t\ta[11] -= xr;\n\t\t\ta[10] = a[23] - xr;\n\t\t\ta[23] += xr;\n\t\t\txr = a[11];\n\t\t\ta[26] -= xr;\n\t\t\ta[11] = a[22] - xr;\n\t\t\ta[22] += xr;\n\t\t\txr = a[26];\n\t\t\ta[27] -= xr;\n\t\t\ta[26] = a[7] - xr;\n\t\t\ta[7] += xr;\n\n\t\t\txr = a[27];\n\t\t\ta[27] = a[6] - xr;\n\t\t\ta[6] += xr;\n\n\t\t\txr = Util.SQRT2 * (a[0] - a[4]);\n\t\t\ta[0] += a[4];\n\t\t\ta[4] = xr;\n\t\t\txr = Util.SQRT2 * (a[1] - a[5]);\n\t\t\ta[1] += a[5];\n\t\t\ta[5] = xr;\n\t\t\txr = Util.SQRT2 * (a[16] - a[20]);\n\t\t\ta[16] += a[20];\n\t\t\ta[20] = xr;\n\t\t\txr = Util.SQRT2 * (a[17] - a[21]);\n\t\t\ta[17] += a[21];\n\t\t\ta[21] = xr;\n\n\t\t\txr = -Util.SQRT2 * (a[8] - a[12]);\n\t\t\ta[8] += a[12];\n\t\t\ta[12] = xr - a[8];\n\t\t\txr = -Util.SQRT2 * (a[9] - a[13]);\n\t\t\ta[9] += a[13];\n\t\t\ta[13] = xr - a[9];\n\t\t\txr = -Util.SQRT2 * (a[25] - a[29]);\n\t\t\ta[25] += a[29];\n\t\t\ta[29] = xr - a[25];\n\t\t\txr = -Util.SQRT2 * (a[24] + a[28]);\n\t\t\ta[24] -= a[28];\n\t\t\ta[28] = xr - a[24];\n\n\t\t\txr = a[24] - a[16];\n\t\t\ta[24] = xr;\n\t\t\txr = a[20] - xr;\n\t\t\ta[20] = xr;\n\t\t\txr = a[28] - xr;\n\t\t\ta[28] = xr;\n\n\t\t\txr = a[25] - a[17];\n\t\t\ta[25] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[17] - a[1];\n\t\t\ta[17] = xr;\n\t\t\txr = a[9] - xr;\n\t\t\ta[9] = xr;\n\t\t\txr = a[25] - xr;\n\t\t\ta[25] = xr;\n\t\t\txr = a[5] - xr;\n\t\t\ta[5] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[13] - xr;\n\t\t\ta[13] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[1] - a[0];\n\t\t\ta[1] = xr;\n\t\t\txr = a[16] - xr;\n\t\t\ta[16] = xr;\n\t\t\txr = a[17] - xr;\n\t\t\ta[17] = xr;\n\t\t\txr = a[8] - xr;\n\t\t\ta[8] = xr;\n\t\t\txr = a[9] - xr;\n\t\t\ta[9] = xr;\n\t\t\txr = a[24] - xr;\n\t\t\ta[24] = xr;\n\t\t\txr = a[25] - xr;\n\t\t\ta[25] = xr;\n\t\t\txr = a[4] - xr;\n\t\t\ta[4] = xr;\n\t\t\txr = a[5] - xr;\n\t\t\ta[5] = xr;\n\t\t\txr = a[20] - xr;\n\t\t\ta[20] = xr;\n\t\t\txr = a[21] - xr;\n\t\t\ta[21] = xr;\n\t\t\txr = a[12] - xr;\n\t\t\ta[12] = xr;\n\t\t\txr = a[13] - xr;\n\t\t\ta[13] = xr;\n\t\t\txr = a[28] - xr;\n\t\t\ta[28] = xr;\n\t\t\txr = a[29] - xr;\n\t\t\ta[29] = xr;\n\n\t\t\txr = a[0];\n\t\t\ta[0] += a[31];\n\t\t\ta[31] -= xr;\n\t\t\txr = a[1];\n\t\t\ta[1] += a[30];\n\t\t\ta[30] -= xr;\n\t\t\txr = a[16];\n\t\t\ta[16] += a[15];\n\t\t\ta[15] -= xr;\n\t\t\txr = a[17];\n\t\t\ta[17] += a[14];\n\t\t\ta[14] -= xr;\n\t\t\txr = a[8];\n\t\t\ta[8] += a[23];\n\t\t\ta[23] -= xr;\n\t\t\txr = a[9];\n\t\t\ta[9] += a[22];\n\t\t\ta[22] -= xr;\n\t\t\txr = a[24];\n\t\t\ta[24] += a[7];\n\t\t\ta[7] -= xr;\n\t\t\txr = a[25];\n\t\t\ta[25] += a[6];\n\t\t\ta[6] -= xr;\n\t\t\txr = a[4];\n\t\t\ta[4] += a[27];\n\t\t\ta[27] -= xr;\n\t\t\txr = a[5];\n\t\t\ta[5] += a[26];\n\t\t\ta[26] -= xr;\n\t\t\txr = a[20];\n\t\t\ta[20] += a[11];\n\t\t\ta[11] -= xr;\n\t\t\txr = a[21];\n\t\t\ta[21] += a[10];\n\t\t\ta[10] -= xr;\n\t\t\txr = a[12];\n\t\t\ta[12] += a[19];\n\t\t\ta[19] -= xr;\n\t\t\txr = a[13];\n\t\t\ta[13] += a[18];\n\t\t\ta[18] -= xr;\n\t\t\txr = a[28];\n\t\t\ta[28] += a[3];\n\t\t\ta[3] -= xr;\n\t\t\txr = a[29];\n\t\t\ta[29] += a[2];\n\t\t\ta[2] -= xr;\n\t\t}\n\t}\n\n\t/**\n\t * Function: Calculation of the MDCT In the case of long blocks (type 0,1,3)\n\t * there are 36 coefficents in the time domain and 18 in the frequency\n\t * domain.
\n\t * In the case of short blocks (type 2) there are 3 transformations with\n\t * short length. This leads to 12 coefficents in the time and 6 in the\n\t * frequency domain. In this case the results are stored side by side in the\n\t * vector out[].\n\t *\n\t * New layer3\n\t */\n\tfunction mdct_short(inout, inoutPos) {\n\t\tfor (var l = 0; l < 3; l++) {\n\t\t\tvar tc0, tc1, tc2, ts0, ts1, ts2;\n\n\t\t\tts0 = inout[inoutPos + 2 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t- inout[inoutPos + 5 * 3];\n\t\t\ttc0 = inout[inoutPos + 0 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t- inout[inoutPos + 3 * 3];\n\t\t\ttc1 = ts0 + tc0;\n\t\t\ttc2 = ts0 - tc0;\n\n\t\t\tts0 = inout[inoutPos + 5 * 3] * win[Encoder.SHORT_TYPE][0]\n\t\t\t\t\t+ inout[inoutPos + 2 * 3];\n\t\t\ttc0 = inout[inoutPos + 3 * 3] * win[Encoder.SHORT_TYPE][2]\n\t\t\t\t\t+ inout[inoutPos + 0 * 3];\n\t\t\tts1 = ts0 + tc0;\n\t\t\tts2 = -ts0 + tc0;\n\n\t\t\ttc0 = (inout[inoutPos + 1 * 3] * win[Encoder.SHORT_TYPE][1] - inout[inoutPos + 4 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tts0 = (inout[inoutPos + 4 * 3] * win[Encoder.SHORT_TYPE][1] + inout[inoutPos + 1 * 3]) * 2.069978111953089e-11;\n\t\t\t/*\n\t\t\t * tritab_s [ 1 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 0] = tc1 * 1.907525191737280e-11 + tc0;\n\t\t\t/*\n\t\t\t * tritab_s[ 2 ]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 5] = -ts1 * 1.907525191737280e-11 + ts0;\n\t\t\t/*\n\t\t\t * tritab_s[0 ]\n\t\t\t */\n\t\t\ttc2 = tc2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 2]\n\t\t\t */\n\t\t\tts1 = ts1 * 0.5 * 1.907525191737281e-11 + ts0;\n\t\t\tinout[inoutPos + 3 * 1] = tc2 - ts1;\n\t\t\tinout[inoutPos + 3 * 2] = tc2 + ts1;\n\n\t\t\ttc1 = tc1 * 0.5 * 1.907525191737281e-11 - tc0;\n\t\t\tts2 = ts2 * 0.86602540378443870761 * 1.907525191737281e-11;\n\t\t\t/*\n\t\t\t * tritab_s[ 0]\n\t\t\t */\n\t\t\tinout[inoutPos + 3 * 3] = tc1 + ts2;\n\t\t\tinout[inoutPos + 3 * 4] = tc1 - ts2;\n\n\t\t\tinoutPos++;\n\t\t}\n\t}\n\n\tfunction mdct_long(out, outPos, _in) {\n\t\tvar ct, st;\n\t\t{\n\t\t\tvar tc1, tc2, tc3, tc4, ts5, ts6, ts7, ts8;\n\t\t\t/* 1,2, 5,6, 9,10, 13,14, 17 */\n\t\t\ttc1 = _in[17] - _in[9];\n\t\t\ttc3 = _in[15] - _in[11];\n\t\t\ttc4 = _in[14] - _in[12];\n\t\t\tts5 = _in[0] + _in[8];\n\t\t\tts6 = _in[1] + _in[7];\n\t\t\tts7 = _in[2] + _in[6];\n\t\t\tts8 = _in[3] + _in[5];\n\n\t\t\tout[outPos + 17] = (ts5 + ts7 - ts8) - (ts6 - _in[4]);\n\t\t\tst = (ts5 + ts7 - ts8) * cx[12 + 7] + (ts6 - _in[4]);\n\t\t\tct = (tc1 - tc3 - tc4) * cx[12 + 6];\n\t\t\tout[outPos + 5] = ct + st;\n\t\t\tout[outPos + 6] = ct - st;\n\n\t\t\ttc2 = (_in[16] - _in[10]) * cx[12 + 6];\n\t\t\tts6 = ts6 * cx[12 + 7] + _in[4];\n\t\t\tct = tc1 * cx[12 + 0] + tc2 + tc3 * cx[12 + 1] + tc4 * cx[12 + 2];\n\t\t\tst = -ts5 * cx[12 + 4] + ts6 - ts7 * cx[12 + 5] + ts8 * cx[12 + 3];\n\t\t\tout[outPos + 1] = ct + st;\n\t\t\tout[outPos + 2] = ct - st;\n\n\t\t\tct = tc1 * cx[12 + 1] - tc2 - tc3 * cx[12 + 2] + tc4 * cx[12 + 0];\n\t\t\tst = -ts5 * cx[12 + 5] + ts6 - ts7 * cx[12 + 3] + ts8 * cx[12 + 4];\n\t\t\tout[outPos + 9] = ct + st;\n\t\t\tout[outPos + 10] = ct - st;\n\n\t\t\tct = tc1 * cx[12 + 2] - tc2 + tc3 * cx[12 + 0] - tc4 * cx[12 + 1];\n\t\t\tst = ts5 * cx[12 + 3] - ts6 + ts7 * cx[12 + 4] - ts8 * cx[12 + 5];\n\t\t\tout[outPos + 13] = ct + st;\n\t\t\tout[outPos + 14] = ct - st;\n\t\t}\n\t\t{\n\t\t\tvar ts1, ts2, ts3, ts4, tc5, tc6, tc7, tc8;\n\n\t\t\tts1 = _in[8] - _in[0];\n\t\t\tts3 = _in[6] - _in[2];\n\t\t\tts4 = _in[5] - _in[3];\n\t\t\ttc5 = _in[17] + _in[9];\n\t\t\ttc6 = _in[16] + _in[10];\n\t\t\ttc7 = _in[15] + _in[11];\n\t\t\ttc8 = _in[14] + _in[12];\n\n\t\t\tout[outPos + 0] = (tc5 + tc7 + tc8) + (tc6 + _in[13]);\n\t\t\tct = (tc5 + tc7 + tc8) * cx[12 + 7] - (tc6 + _in[13]);\n\t\t\tst = (ts1 - ts3 + ts4) * cx[12 + 6];\n\t\t\tout[outPos + 11] = ct + st;\n\t\t\tout[outPos + 12] = ct - st;\n\n\t\t\tts2 = (_in[7] - _in[1]) * cx[12 + 6];\n\t\t\ttc6 = _in[13] - tc6 * cx[12 + 7];\n\t\t\tct = tc5 * cx[12 + 3] - tc6 + tc7 * cx[12 + 4] + tc8 * cx[12 + 5];\n\t\t\tst = ts1 * cx[12 + 2] + ts2 + ts3 * cx[12 + 0] + ts4 * cx[12 + 1];\n\t\t\tout[outPos + 3] = ct + st;\n\t\t\tout[outPos + 4] = ct - st;\n\n\t\t\tct = -tc5 * cx[12 + 5] + tc6 - tc7 * cx[12 + 3] - tc8 * cx[12 + 4];\n\t\t\tst = ts1 * cx[12 + 1] + ts2 - ts3 * cx[12 + 2] - ts4 * cx[12 + 0];\n\t\t\tout[outPos + 7] = ct + st;\n\t\t\tout[outPos + 8] = ct - st;\n\n\t\t\tct = -tc5 * cx[12 + 4] + tc6 - tc7 * cx[12 + 5] - tc8 * cx[12 + 3];\n\t\t\tst = ts1 * cx[12 + 0] - ts2 + ts3 * cx[12 + 1] - ts4 * cx[12 + 2];\n\t\t\tout[outPos + 15] = ct + st;\n\t\t\tout[outPos + 16] = ct - st;\n\t\t}\n\t}\n\n\tthis.mdct_sub48 = function(gfc, w0, w1) {\n\t\tvar wk = w0;\n\t\tvar wkPos = 286;\n\t\t/* thinking cache performance, ch->gr loop is better than gr->ch loop */\n\t\tfor (var ch = 0; ch < gfc.channels_out; ch++) {\n\t\t\tfor (var gr = 0; gr < gfc.mode_gr; gr++) {\n\t\t\t\tvar band;\n\t\t\t\tvar gi = (gfc.l3_side.tt[gr][ch]);\n\t\t\t\tvar mdct_enc = gi.xr;\n\t\t\t\tvar mdct_encPos = 0;\n\t\t\t\tvar samp = gfc.sb_sample[ch][1 - gr];\n\t\t\t\tvar sampPos = 0;\n\n\t\t\t\tfor (var k = 0; k < 18 / 2; k++) {\n\t\t\t\t\twindow_subband(wk, wkPos, samp[sampPos]);\n\t\t\t\t\twindow_subband(wk, wkPos + 32, samp[sampPos + 1]);\n\t\t\t\t\tsampPos += 2;\n\t\t\t\t\twkPos += 64;\n\t\t\t\t\t/*\n\t\t\t\t\t * Compensate for inversion in the analysis filter\n\t\t\t\t\t */\n\t\t\t\t\tfor (band = 1; band < 32; band += 2) {\n\t\t\t\t\t\tsamp[sampPos - 1][band] *= -1;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t * Perform imdct of 18 previous subband samples + 18 current\n\t\t\t\t * subband samples\n\t\t\t\t */\n\t\t\t\tfor (band = 0; band < 32; band++, mdct_encPos += 18) {\n\t\t\t\t\tvar type = gi.block_type;\n\t\t\t\t\tvar band0 = gfc.sb_sample[ch][gr];\n\t\t\t\t\tvar band1 = gfc.sb_sample[ch][1 - gr];\n\t\t\t\t\tif (gi.mixed_block_flag != 0 && band < 2)\n\t\t\t\t\t\ttype = 0;\n\t\t\t\t\tif (gfc.amp_filter[band] < 1e-12) {\n\t\t\t\t\t\tArrays.fill(mdct_enc, mdct_encPos + 0,\n\t\t\t\t\t\t\t\tmdct_encPos + 18, 0);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (gfc.amp_filter[band] < 1.0) {\n\t\t\t\t\t\t\tfor (var k = 0; k < 18; k++)\n\t\t\t\t\t\t\t\tband1[k][order[band]] *= gfc.amp_filter[band];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (type == Encoder.SHORT_TYPE) {\n\t\t\t\t\t\t\tfor (var k = -NS / 4; k < 0; k++) {\n\t\t\t\t\t\t\t\tvar w = win[Encoder.SHORT_TYPE][k + 3];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 9] = band0[9 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band0[8 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 18] = band0[14 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band0[15 + k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 10] = band0[15 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band0[14 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 19] = band1[2 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band1[3 + k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 11] = band1[3 + k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w - band1[2 - k][order[band]];\n\t\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k * 3 + 20] = band1[8 - k][order[band]]\n\t\t\t\t\t\t\t\t\t\t* w + band1[9 + k][order[band]];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmdct_short(mdct_enc, mdct_encPos);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tvar work = new_float(18);\n\t\t\t\t\t\t\tfor (var k = -NL / 4; k < 0; k++) {\n\t\t\t\t\t\t\t\tvar a, b;\n\t\t\t\t\t\t\t\ta = win[type][k + 27]\n\t\t\t\t\t\t\t\t\t\t* band1[k + 9][order[band]]\n\t\t\t\t\t\t\t\t\t\t+ win[type][k + 36]\n\t\t\t\t\t\t\t\t\t\t* band1[8 - k][order[band]];\n\t\t\t\t\t\t\t\tb = win[type][k + 9]\n\t\t\t\t\t\t\t\t\t\t* band0[k + 9][order[band]]\n\t\t\t\t\t\t\t\t\t\t- win[type][k + 18]\n\t\t\t\t\t\t\t\t\t\t* band0[8 - k][order[band]];\n\t\t\t\t\t\t\t\twork[k + 9] = a - b * tantab_l[3 + k + 9];\n\t\t\t\t\t\t\t\twork[k + 18] = a * tantab_l[3 + k + 9] + b;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tmdct_long(mdct_enc, mdct_encPos, work);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\t * Perform aliasing reduction butterfly\n\t\t\t\t\t */\n\t\t\t\t\tif (type != Encoder.SHORT_TYPE && band != 0) {\n\t\t\t\t\t\tfor (var k = 7; k >= 0; --k) {\n\t\t\t\t\t\t\tvar bu, bd;\n\t\t\t\t\t\t\tbu = mdct_enc[mdct_encPos + k] * ca[20 + k]\n\t\t\t\t\t\t\t\t\t+ mdct_enc[mdct_encPos + -1 - k]\n\t\t\t\t\t\t\t\t\t* cs[28 + k];\n\t\t\t\t\t\t\tbd = mdct_enc[mdct_encPos + k] * cs[28 + k]\n\t\t\t\t\t\t\t\t\t- mdct_enc[mdct_encPos + -1 - k]\n\t\t\t\t\t\t\t\t\t* ca[20 + k];\n\n\t\t\t\t\t\t\tmdct_enc[mdct_encPos + -1 - k] = bu;\n\t\t\t\t\t\t\tmdct_enc[mdct_encPos + k] = bd;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\twk = w1;\n\t\t\twkPos = 286;\n\t\t\tif (gfc.mode_gr == 1) {\n\t\t\t\tfor (var i = 0; i < 18; i++) {\n\t\t\t\t\tSystem.arraycopy(gfc.sb_sample[ch][1][i], 0,\n\t\t\t\t\t\t\tgfc.sb_sample[ch][0][i], 0, 32);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nmodule.exports = NewMDCT;\n","var Encoder = require('./Encoder.js');\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nfunction III_psy_xmin() {\n this.l = new_float(Encoder.SBMAX_l);\n this.s = new_float_n([Encoder.SBMAX_s, 3]);\n\n var self = this;\n this.assign = function (iii_psy_xmin) {\n System.arraycopy(iii_psy_xmin.l, 0, self.l, 0, Encoder.SBMAX_l);\n for (var i = 0; i < Encoder.SBMAX_s; i++) {\n for (var j = 0; j < 3; j++) {\n self.s[i][j] = iii_psy_xmin.s[i][j];\n }\n }\n }\n}\n\nmodule.exports = III_psy_xmin;\n","//package mp3;\n\nvar III_psy_xmin = require('./III_psy_xmin.js');\n\nfunction III_psy_ratio() {\n\tthis.thm = new III_psy_xmin();\n\tthis.en = new III_psy_xmin();\n}\n\nmodule.exports = III_psy_ratio;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * ENCDELAY The encoder delay.\n *\n * Minimum allowed is MDCTDELAY (see below)\n *\n * The first 96 samples will be attenuated, so using a value less than 96\n * will result in corrupt data for the first 96-ENCDELAY samples.\n *\n * suggested: 576 set to 1160 to sync with FhG.\n */\nEncoder.ENCDELAY = 576;\n/**\n * make sure there is at least one complete frame after the last frame\n * containing real data\n *\n * Using a value of 288 would be sufficient for a a very sophisticated\n * decoder that can decode granule-by-granule instead of frame by frame. But\n * lets not assume this, and assume the decoder will not decode frame N\n * unless it also has data for frame N+1\n */\nEncoder.POSTDELAY = 1152;\n\n/**\n * delay of the MDCT used in mdct.c original ISO routines had a delay of\n * 528! Takehiro's routines:\n */\nEncoder.MDCTDELAY = 48;\nEncoder.FFTOFFSET = (224 + Encoder.MDCTDELAY);\n\n/**\n * Most decoders, including the one we use, have a delay of 528 samples.\n */\nEncoder.DECDELAY = 528;\n\n/**\n * number of subbands\n */\nEncoder.SBLIMIT = 32;\n\n/**\n * parition bands bands\n */\nEncoder.CBANDS = 64;\n\n/**\n * number of critical bands/scale factor bands where masking is computed\n */\nEncoder.SBPSY_l = 21;\nEncoder.SBPSY_s = 12;\n\n/**\n * total number of scalefactor bands encoded\n */\nEncoder.SBMAX_l = 22;\nEncoder.SBMAX_s = 13;\nEncoder.PSFB21 = 6;\nEncoder.PSFB12 = 6;\n\n/**\n * FFT sizes\n */\nEncoder.BLKSIZE = 1024;\nEncoder.HBLKSIZE = (Encoder.BLKSIZE / 2 + 1);\nEncoder.BLKSIZE_s = 256;\nEncoder.HBLKSIZE_s = (Encoder.BLKSIZE_s / 2 + 1);\n\nEncoder.NORM_TYPE = 0;\nEncoder.START_TYPE = 1;\nEncoder.SHORT_TYPE = 2;\nEncoder.STOP_TYPE = 3;\n\n/**\n *
\n * Mode Extention:\n * When we are in stereo mode, there are 4 possible methods to store these\n * two channels. The stereo modes -m? are using a subset of them.\n *\n *  -ms: MPG_MD_LR_LR\n *  -mj: MPG_MD_LR_LR and MPG_MD_MS_LR\n *  -mf: MPG_MD_MS_LR\n *  -mi: all\n * 
\n */\nEncoder.MPG_MD_LR_LR = 0;\nEncoder.MPG_MD_LR_I = 1;\nEncoder.MPG_MD_MS_LR = 2;\nEncoder.MPG_MD_MS_I = 3;\n\nEncoder.fircoef = [-0.0207887 * 5, -0.0378413 * 5,\n -0.0432472 * 5, -0.031183 * 5, 7.79609e-18 * 5, 0.0467745 * 5,\n 0.10091 * 5, 0.151365 * 5, 0.187098 * 5];\n\nfunction Encoder() {\n var NewMDCT = require('./NewMDCT.js');\n var III_psy_ratio = require('./III_psy_ratio.js');\n\n var FFTOFFSET = Encoder.FFTOFFSET;\n var MPG_MD_MS_LR = Encoder.MPG_MD_MS_LR;\n //BitStream bs;\n //PsyModel psy;\n //VBRTag vbr;\n //QuantizePVT qupvt;\n var bs = null;\n this.psy = null;\n var psy = null;\n var vbr = null;\n var qupvt = null;\n\n //public final void setModules(BitStream bs, PsyModel psy, QuantizePVT qupvt,\n // VBRTag vbr) {\n this.setModules = function (_bs, _psy, _qupvt, _vbr) {\n bs = _bs;\n this.psy = _psy;\n psy = _psy;\n vbr = _vbr;\n qupvt = _qupvt;\n };\n\n var newMDCT = new NewMDCT();\n\n /***********************************************************************\n *\n * encoder and decoder delays\n *\n ***********************************************************************/\n\n /**\n *
\n     * layer III enc->dec delay:  1056 (1057?)   (observed)\n     * layer  II enc->dec delay:   480  (481?)   (observed)\n     *\n     * polyphase 256-16             (dec or enc)        = 240\n     * mdct      256+32  (9*32)     (dec or enc)        = 288\n     * total:    512+16\n     *\n     * My guess is that delay of polyphase filterbank is actualy 240.5\n     * (there are technical reasons for this, see postings in mp3encoder).\n     * So total Encode+Decode delay = ENCDELAY + 528 + 1\n     * 
\n */\n\n\n /**\n * auto-adjust of ATH, useful for low volume Gabriel Bouvigne 3 feb 2001\n *\n * modifies some values in gfp.internal_flags.ATH (gfc.ATH)\n */\n//private void adjust_ATH(final LameInternalFlags gfc) {\n function adjust_ATH(gfc) {\n var gr2_max, max_pow;\n\n if (gfc.ATH.useAdjust == 0) {\n gfc.ATH.adjust = 1.0;\n /* no adjustment */\n return;\n }\n\n /* jd - 2001 mar 12, 27, jun 30 */\n /* loudness based on equal loudness curve; */\n /* use granule with maximum combined loudness */\n max_pow = gfc.loudness_sq[0][0];\n gr2_max = gfc.loudness_sq[1][0];\n if (gfc.channels_out == 2) {\n max_pow += gfc.loudness_sq[0][1];\n gr2_max += gfc.loudness_sq[1][1];\n } else {\n max_pow += max_pow;\n gr2_max += gr2_max;\n }\n if (gfc.mode_gr == 2) {\n max_pow = Math.max(max_pow, gr2_max);\n }\n max_pow *= 0.5;\n /* max_pow approaches 1.0 for full band noise */\n\n /* jd - 2001 mar 31, jun 30 */\n /* user tuning of ATH adjustment region */\n max_pow *= gfc.ATH.aaSensitivityP;\n\n /*\n * adjust ATH depending on range of maximum value\n */\n\n /* jd - 2001 feb27, mar12,20, jun30, jul22 */\n /* continuous curves based on approximation */\n /* to GB's original values. */\n /* For an increase in approximate loudness, */\n /* set ATH adjust to adjust_limit immediately */\n /* after a delay of one frame. */\n /* For a loudness decrease, reduce ATH adjust */\n /* towards adjust_limit gradually. */\n /* max_pow is a loudness squared or a power. */\n if (max_pow > 0.03125) { /* ((1 - 0.000625)/ 31.98) from curve below */\n if (gfc.ATH.adjust >= 1.0) {\n gfc.ATH.adjust = 1.0;\n } else {\n /* preceding frame has lower ATH adjust; */\n /* ascend only to the preceding adjust_limit */\n /* in case there is leading low volume */\n if (gfc.ATH.adjust < gfc.ATH.adjustLimit) {\n gfc.ATH.adjust = gfc.ATH.adjustLimit;\n }\n }\n gfc.ATH.adjustLimit = 1.0;\n } else { /* adjustment curve */\n /* about 32 dB maximum adjust (0.000625) */\n var adj_lim_new = 31.98 * max_pow + 0.000625;\n if (gfc.ATH.adjust >= adj_lim_new) { /* descend gradually */\n gfc.ATH.adjust *= adj_lim_new * 0.075 + 0.925;\n if (gfc.ATH.adjust < adj_lim_new) { /* stop descent */\n gfc.ATH.adjust = adj_lim_new;\n }\n } else { /* ascend */\n if (gfc.ATH.adjustLimit >= adj_lim_new) {\n gfc.ATH.adjust = adj_lim_new;\n } else {\n /* preceding frame has lower ATH adjust; */\n /* ascend only to the preceding adjust_limit */\n if (gfc.ATH.adjust < gfc.ATH.adjustLimit) {\n gfc.ATH.adjust = gfc.ATH.adjustLimit;\n }\n }\n }\n gfc.ATH.adjustLimit = adj_lim_new;\n }\n }\n\n /**\n *
\n     *  some simple statistics\n     *\n     *  bitrate index 0: free bitrate . not allowed in VBR mode\n     *  : bitrates, kbps depending on MPEG version\n     *  bitrate index 15: forbidden\n     *\n     *  mode_ext:\n     *  0:  LR\n     *  1:  LR-i\n     *  2:  MS\n     *  3:  MS-i\n     * 
\n */\n function updateStats(gfc) {\n var gr, ch;\n assert(0 <= gfc.bitrate_index && gfc.bitrate_index < 16);\n assert(0 <= gfc.mode_ext && gfc.mode_ext < 4);\n\n /* count bitrate indices */\n gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][4]++;\n gfc.bitrate_stereoMode_Hist[15][4]++;\n\n /* count 'em for every mode extension in case of 2 channel encoding */\n if (gfc.channels_out == 2) {\n gfc.bitrate_stereoMode_Hist[gfc.bitrate_index][gfc.mode_ext]++;\n gfc.bitrate_stereoMode_Hist[15][gfc.mode_ext]++;\n }\n for (gr = 0; gr < gfc.mode_gr; ++gr) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n var bt = gfc.l3_side.tt[gr][ch].block_type | 0;\n if (gfc.l3_side.tt[gr][ch].mixed_block_flag != 0)\n bt = 4;\n gfc.bitrate_blockType_Hist[gfc.bitrate_index][bt]++;\n gfc.bitrate_blockType_Hist[gfc.bitrate_index][5]++;\n gfc.bitrate_blockType_Hist[15][bt]++;\n gfc.bitrate_blockType_Hist[15][5]++;\n }\n }\n }\n\n function lame_encode_frame_init(gfp, inbuf) {\n var gfc = gfp.internal_flags;\n\n var ch, gr;\n\n if (gfc.lame_encode_frame_init == 0) {\n /* prime the MDCT/polyphase filterbank with a short block */\n var i, j;\n var primebuff0 = new_float(286 + 1152 + 576);\n var primebuff1 = new_float(286 + 1152 + 576);\n gfc.lame_encode_frame_init = 1;\n for (i = 0, j = 0; i < 286 + 576 * (1 + gfc.mode_gr); ++i) {\n if (i < 576 * gfc.mode_gr) {\n primebuff0[i] = 0;\n if (gfc.channels_out == 2)\n primebuff1[i] = 0;\n } else {\n primebuff0[i] = inbuf[0][j];\n if (gfc.channels_out == 2)\n primebuff1[i] = inbuf[1][j];\n ++j;\n }\n }\n /* polyphase filtering / mdct */\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.l3_side.tt[gr][ch].block_type = Encoder.SHORT_TYPE;\n }\n }\n newMDCT.mdct_sub48(gfc, primebuff0, primebuff1);\n\n /* check FFT will not use a negative starting offset */\n assert(576 >= Encoder.FFTOFFSET);\n /* check if we have enough data for FFT */\n assert(gfc.mf_size >= (Encoder.BLKSIZE + gfp.framesize - Encoder.FFTOFFSET));\n /* check if we have enough data for polyphase filterbank */\n assert(gfc.mf_size >= (512 + gfp.framesize - 32));\n }\n\n }\n\n /**\n *
\n     * encodeframe()           Layer 3\n     *\n     * encode a single frame\n     *\n     *\n     *    lame_encode_frame()\n     *\n     *\n     *                           gr 0            gr 1\n     *    inbuf:           |--------------|--------------|--------------|\n     *\n     *\n     *    Polyphase (18 windows, each shifted 32)\n     *    gr 0:\n     *    window1          <----512---.\n     *    window18                 <----512---.\n     *\n     *    gr 1:\n     *    window1                         <----512---.\n     *    window18                                <----512---.\n     *\n     *\n     *\n     *    MDCT output:  |--------------|--------------|--------------|\n     *\n     *    FFT's                    <---------1024---------.\n     *                                             <---------1024-------.\n     *\n     *\n     *\n     *        inbuf = buffer of PCM data size=MP3 framesize\n     *        encoder acts on inbuf[ch][0], but output is delayed by MDCTDELAY\n     *        so the MDCT coefficints are from inbuf[ch][-MDCTDELAY]\n     *\n     *        psy-model FFT has a 1 granule delay, so we feed it data for the\n     *        next granule.\n     *        FFT is centered over granule:  224+576+224\n     *        So FFT starts at:   576-224-MDCTDELAY\n     *\n     *        MPEG2:  FFT ends at:  BLKSIZE+576-224-MDCTDELAY      (1328)\n     *        MPEG1:  FFT ends at:  BLKSIZE+2*576-224-MDCTDELAY    (1904)\n     *\n     *        MPEG2:  polyphase first window:  [0..511]\n     *                          18th window:   [544..1055]          (1056)\n     *        MPEG1:            36th window:   [1120..1631]         (1632)\n     *                data needed:  512+framesize-32\n     *\n     *        A close look newmdct.c shows that the polyphase filterbank\n     *        only uses data from [0..510] for each window.  Perhaps because the window\n     *        used by the filterbank is zero for the last point, so Takehiro's\n     *        code doesn't bother to compute with it.\n     *\n     *        FFT starts at 576-224-MDCTDELAY (304)  = 576-FFTOFFSET\n     *\n     * 
\n */\n\n\n this.lame_encode_mp3_frame = function (gfp, inbuf_l, inbuf_r, mp3buf, mp3bufPos, mp3buf_size) {\n var mp3count;\n var masking_LR = new_array_n([2, 2]);\n /*\n * LR masking &\n * energy\n */\n masking_LR[0][0] = new III_psy_ratio();\n masking_LR[0][1] = new III_psy_ratio();\n masking_LR[1][0] = new III_psy_ratio();\n masking_LR[1][1] = new III_psy_ratio();\n var masking_MS = new_array_n([2, 2]);\n /* MS masking & energy */\n masking_MS[0][0] = new III_psy_ratio();\n masking_MS[0][1] = new III_psy_ratio();\n masking_MS[1][0] = new III_psy_ratio();\n masking_MS[1][1] = new III_psy_ratio();\n //III_psy_ratio masking[][];\n var masking;\n /* pointer to selected maskings */\n var inbuf = [null, null];\n var gfc = gfp.internal_flags;\n\n var tot_ener = new_float_n([2, 4]);\n var ms_ener_ratio = [.5, .5];\n var pe = [[0., 0.], [0., 0.]];\n var pe_MS = [[0., 0.], [0., 0.]];\n\n//float[][] pe_use;\n var pe_use;\n\n var ch, gr;\n\n inbuf[0] = inbuf_l;\n inbuf[1] = inbuf_r;\n\n if (gfc.lame_encode_frame_init == 0) {\n /* first run? */\n lame_encode_frame_init(gfp, inbuf);\n\n }\n\n /********************** padding *****************************/\n /**\n *
\n         * padding method as described in\n         * \"MPEG-Layer3 / Bitstream Syntax and Decoding\"\n         * by Martin Sieler, Ralph Sperschneider\n         *\n         * note: there is no padding for the very first frame\n         *\n         * Robert Hegemann 2000-06-22\n         * 
\n */\n gfc.padding = 0;\n if ((gfc.slot_lag -= gfc.frac_SpF) < 0) {\n gfc.slot_lag += gfp.out_samplerate;\n gfc.padding = 1;\n }\n\n /****************************************\n * Stage 1: psychoacoustic model *\n ****************************************/\n\n if (gfc.psymodel != 0) {\n /*\n * psychoacoustic model psy model has a 1 granule (576) delay that\n * we must compensate for (mt 6/99).\n */\n var ret;\n var bufp = [null, null];\n /* address of beginning of left & right granule */\n var bufpPos = 0;\n /* address of beginning of left & right granule */\n var blocktype = new_int(2);\n\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n\n for (ch = 0; ch < gfc.channels_out; ch++) {\n bufp[ch] = inbuf[ch];\n bufpPos = 576 + gr * 576 - Encoder.FFTOFFSET;\n }\n if (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) {\n ret = psy.L3psycho_anal_vbr(gfp, bufp, bufpPos, gr,\n masking_LR, masking_MS, pe[gr], pe_MS[gr],\n tot_ener[gr], blocktype);\n } else {\n ret = psy.L3psycho_anal_ns(gfp, bufp, bufpPos, gr,\n masking_LR, masking_MS, pe[gr], pe_MS[gr],\n tot_ener[gr], blocktype);\n }\n if (ret != 0)\n return -4;\n\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n ms_ener_ratio[gr] = tot_ener[gr][2] + tot_ener[gr][3];\n if (ms_ener_ratio[gr] > 0)\n ms_ener_ratio[gr] = tot_ener[gr][3] / ms_ener_ratio[gr];\n }\n\n /* block type flags */\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n cod_info.block_type = blocktype[ch];\n cod_info.mixed_block_flag = 0;\n }\n }\n } else {\n /* no psy model */\n for (gr = 0; gr < gfc.mode_gr; gr++)\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.l3_side.tt[gr][ch].block_type = Encoder.NORM_TYPE;\n gfc.l3_side.tt[gr][ch].mixed_block_flag = 0;\n pe_MS[gr][ch] = pe[gr][ch] = 700;\n }\n }\n\n /* auto-adjust of ATH, useful for low volume */\n adjust_ATH(gfc);\n\n /****************************************\n * Stage 2: MDCT *\n ****************************************/\n\n /* polyphase filtering / mdct */\n newMDCT.mdct_sub48(gfc, inbuf[0], inbuf[1]);\n\n /****************************************\n * Stage 3: MS/LR decision *\n ****************************************/\n\n /* Here will be selected MS or LR coding of the 2 stereo channels */\n gfc.mode_ext = Encoder.MPG_MD_LR_LR;\n\n if (gfp.force_ms) {\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n } else if (gfp.mode == MPEGMode.JOINT_STEREO) {\n /*\n * ms_ratio = is scaled, for historical reasons, to look like a\n * ratio of side_channel / total. 0 = signal is 100% mono .5 = L & R\n * uncorrelated\n */\n\n /**\n *
\n             * [0] and [1] are the results for the two granules in MPEG-1,\n             * in MPEG-2 it's only a faked averaging of the same value\n             * _prev is the value of the last granule of the previous frame\n             * _next is the value of the first granule of the next frame\n             * 
\n */\n\n var sum_pe_MS = 0.;\n var sum_pe_LR = 0.;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n sum_pe_MS += pe_MS[gr][ch];\n sum_pe_LR += pe[gr][ch];\n }\n }\n\n /* based on PE: M/S coding would not use much more bits than L/R */\n if (sum_pe_MS <= 1.00 * sum_pe_LR) {\n\n var gi0 = gfc.l3_side.tt[0];\n var gi1 = gfc.l3_side.tt[gfc.mode_gr - 1];\n\n if (gi0[0].block_type == gi0[1].block_type\n && gi1[0].block_type == gi1[1].block_type) {\n\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n }\n }\n }\n\n /* bit and noise allocation */\n if (gfc.mode_ext == MPG_MD_MS_LR) {\n masking = masking_MS;\n /* use MS masking */\n pe_use = pe_MS;\n } else {\n masking = masking_LR;\n /* use LR masking */\n pe_use = pe;\n }\n\n /* copy data for MP3 frame analyzer */\n if (gfp.analysis && gfc.pinfo != null) {\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n gfc.pinfo.ms_ratio[gr] = gfc.ms_ratio[gr];\n gfc.pinfo.ms_ener_ratio[gr] = ms_ener_ratio[gr];\n gfc.pinfo.blocktype[gr][ch] = gfc.l3_side.tt[gr][ch].block_type;\n gfc.pinfo.pe[gr][ch] = pe_use[gr][ch];\n System.arraycopy(gfc.l3_side.tt[gr][ch].xr, 0,\n gfc.pinfo.xr[gr][ch], 0, 576);\n /*\n * in psymodel, LR and MS data was stored in pinfo. switch\n * to MS data:\n */\n if (gfc.mode_ext == MPG_MD_MS_LR) {\n gfc.pinfo.ers[gr][ch] = gfc.pinfo.ers[gr][ch + 2];\n System.arraycopy(gfc.pinfo.energy[gr][ch + 2], 0,\n gfc.pinfo.energy[gr][ch], 0,\n gfc.pinfo.energy[gr][ch].length);\n }\n }\n }\n }\n\n /****************************************\n * Stage 4: quantization loop *\n ****************************************/\n\n if (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_abr) {\n\n var i;\n var f;\n\n for (i = 0; i < 18; i++)\n gfc.nsPsy.pefirbuf[i] = gfc.nsPsy.pefirbuf[i + 1];\n\n f = 0.0;\n for (gr = 0; gr < gfc.mode_gr; gr++)\n for (ch = 0; ch < gfc.channels_out; ch++)\n f += pe_use[gr][ch];\n gfc.nsPsy.pefirbuf[18] = f;\n\n f = gfc.nsPsy.pefirbuf[9];\n for (i = 0; i < 9; i++)\n f += (gfc.nsPsy.pefirbuf[i] + gfc.nsPsy.pefirbuf[18 - i])\n * Encoder.fircoef[i];\n\n f = (670 * 5 * gfc.mode_gr * gfc.channels_out) / f;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n pe_use[gr][ch] *= f;\n }\n }\n }\n gfc.iteration_loop.iteration_loop(gfp, pe_use, ms_ener_ratio, masking);\n\n /****************************************\n * Stage 5: bitstream formatting *\n ****************************************/\n\n /* write the frame to the bitstream */\n bs.format_bitstream(gfp);\n\n /* copy mp3 bit buffer into array */\n mp3count = bs.copy_buffer(gfc, mp3buf, mp3bufPos, mp3buf_size, 1);\n\n if (gfp.bWriteVbrTag)\n vbr.addVbrFrame(gfp);\n\n if (gfp.analysis && gfc.pinfo != null) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var j;\n for (j = 0; j < FFTOFFSET; j++)\n gfc.pinfo.pcmdata[ch][j] = gfc.pinfo.pcmdata[ch][j\n + gfp.framesize];\n for (j = FFTOFFSET; j < 1600; j++) {\n gfc.pinfo.pcmdata[ch][j] = inbuf[ch][j - FFTOFFSET];\n }\n }\n qupvt.set_frame_pinfo(gfp, masking);\n }\n\n updateStats(gfc);\n\n return mp3count;\n }\n}\n\n\nmodule.exports = Encoder;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\nfunction FFT() {\n\n var window = new_float(Encoder.BLKSIZE);\n var window_s = new_float(Encoder.BLKSIZE_s / 2);\n\n var costab = [\n 9.238795325112867e-01, 3.826834323650898e-01,\n 9.951847266721969e-01, 9.801714032956060e-02,\n 9.996988186962042e-01, 2.454122852291229e-02,\n 9.999811752826011e-01, 6.135884649154475e-03\n ];\n\n function fht(fz, fzPos, n) {\n var tri = 0;\n var k4;\n var fi;\n var gi;\n\n n <<= 1;\n /* to get BLKSIZE, because of 3DNow! ASM routine */\n var fn = fzPos + n;\n k4 = 4;\n do {\n var s1, c1;\n var i, k1, k2, k3, kx;\n kx = k4 >> 1;\n k1 = k4;\n k2 = k4 << 1;\n k3 = k2 + k1;\n k4 = k2 << 1;\n fi = fzPos;\n gi = fi + kx;\n do {\n var f0, f1, f2, f3;\n f1 = fz[fi + 0] - fz[fi + k1];\n f0 = fz[fi + 0] + fz[fi + k1];\n f3 = fz[fi + k2] - fz[fi + k3];\n f2 = fz[fi + k2] + fz[fi + k3];\n fz[fi + k2] = f0 - f2;\n fz[fi + 0] = f0 + f2;\n fz[fi + k3] = f1 - f3;\n fz[fi + k1] = f1 + f3;\n f1 = fz[gi + 0] - fz[gi + k1];\n f0 = fz[gi + 0] + fz[gi + k1];\n f3 = (Util.SQRT2 * fz[gi + k3]);\n f2 = (Util.SQRT2 * fz[gi + k2]);\n fz[gi + k2] = f0 - f2;\n fz[gi + 0] = f0 + f2;\n fz[gi + k3] = f1 - f3;\n fz[gi + k1] = f1 + f3;\n gi += k4;\n fi += k4;\n } while (fi < fn);\n c1 = costab[tri + 0];\n s1 = costab[tri + 1];\n for (i = 1; i < kx; i++) {\n var c2, s2;\n c2 = 1 - (2 * s1) * s1;\n s2 = (2 * s1) * c1;\n fi = fzPos + i;\n gi = fzPos + k1 - i;\n do {\n var a, b, g0, f0, f1, g1, f2, g2, f3, g3;\n b = s2 * fz[fi + k1] - c2 * fz[gi + k1];\n a = c2 * fz[fi + k1] + s2 * fz[gi + k1];\n f1 = fz[fi + 0] - a;\n f0 = fz[fi + 0] + a;\n g1 = fz[gi + 0] - b;\n g0 = fz[gi + 0] + b;\n b = s2 * fz[fi + k3] - c2 * fz[gi + k3];\n a = c2 * fz[fi + k3] + s2 * fz[gi + k3];\n f3 = fz[fi + k2] - a;\n f2 = fz[fi + k2] + a;\n g3 = fz[gi + k2] - b;\n g2 = fz[gi + k2] + b;\n b = s1 * f2 - c1 * g3;\n a = c1 * f2 + s1 * g3;\n fz[fi + k2] = f0 - a;\n fz[fi + 0] = f0 + a;\n fz[gi + k3] = g1 - b;\n fz[gi + k1] = g1 + b;\n b = c1 * g2 - s1 * f3;\n a = s1 * g2 + c1 * f3;\n fz[gi + k2] = g0 - a;\n fz[gi + 0] = g0 + a;\n fz[fi + k3] = f1 - b;\n fz[fi + k1] = f1 + b;\n gi += k4;\n fi += k4;\n } while (fi < fn);\n c2 = c1;\n c1 = c2 * costab[tri + 0] - s1 * costab[tri + 1];\n s1 = c2 * costab[tri + 1] + s1 * costab[tri + 0];\n }\n tri += 2;\n } while (k4 < n);\n }\n\n var rv_tbl = [0x00, 0x80, 0x40,\n 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10,\n 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70,\n 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28,\n 0xa8, 0x68, 0xe8, 0x18, 0x98, 0x58,\n 0xd8, 0x38, 0xb8, 0x78, 0xf8, 0x04,\n 0x84, 0x44, 0xc4, 0x24, 0xa4, 0x64,\n 0xe4, 0x14, 0x94, 0x54, 0xd4, 0x34,\n 0xb4, 0x74, 0xf4, 0x0c, 0x8c, 0x4c,\n 0xcc, 0x2c, 0xac, 0x6c, 0xec, 0x1c,\n 0x9c, 0x5c, 0xdc, 0x3c, 0xbc, 0x7c,\n 0xfc, 0x02, 0x82, 0x42, 0xc2, 0x22,\n 0xa2, 0x62, 0xe2, 0x12, 0x92, 0x52,\n 0xd2, 0x32, 0xb2, 0x72, 0xf2, 0x0a,\n 0x8a, 0x4a, 0xca, 0x2a, 0xaa, 0x6a,\n 0xea, 0x1a, 0x9a, 0x5a, 0xda, 0x3a,\n 0xba, 0x7a, 0xfa, 0x06, 0x86, 0x46,\n 0xc6, 0x26, 0xa6, 0x66, 0xe6, 0x16,\n 0x96, 0x56, 0xd6, 0x36, 0xb6, 0x76,\n 0xf6, 0x0e, 0x8e, 0x4e, 0xce, 0x2e,\n 0xae, 0x6e, 0xee, 0x1e, 0x9e, 0x5e,\n 0xde, 0x3e, 0xbe, 0x7e, 0xfe];\n\n this.fft_short = function (gfc, x_real, chn, buffer, bufPos) {\n for (var b = 0; b < 3; b++) {\n var x = Encoder.BLKSIZE_s / 2;\n var k = 0xffff & ((576 / 3) * (b + 1));\n var j = Encoder.BLKSIZE_s / 8 - 1;\n do {\n var f0, f1, f2, f3, w;\n var i = rv_tbl[j << 2] & 0xff;\n\n f0 = window_s[i] * buffer[chn][bufPos + i + k];\n w = window_s[0x7f - i] * buffer[chn][bufPos + i + k + 0x80];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window_s[i + 0x40] * buffer[chn][bufPos + i + k + 0x40];\n w = window_s[0x3f - i] * buffer[chn][bufPos + i + k + 0xc0];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x -= 4;\n x_real[b][x + 0] = f0 + f2;\n x_real[b][x + 2] = f0 - f2;\n x_real[b][x + 1] = f1 + f3;\n x_real[b][x + 3] = f1 - f3;\n\n f0 = window_s[i + 0x01] * buffer[chn][bufPos + i + k + 0x01];\n w = window_s[0x7e - i] * buffer[chn][bufPos + i + k + 0x81];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window_s[i + 0x41] * buffer[chn][bufPos + i + k + 0x41];\n w = window_s[0x3e - i] * buffer[chn][bufPos + i + k + 0xc1];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 0] = f0 + f2;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 2] = f0 - f2;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 1] = f1 + f3;\n x_real[b][x + Encoder.BLKSIZE_s / 2 + 3] = f1 - f3;\n } while (--j >= 0);\n\n fht(x_real[b], x, Encoder.BLKSIZE_s / 2);\n /* BLKSIZE_s/2 because of 3DNow! ASM routine */\n /* BLKSIZE/2 because of 3DNow! ASM routine */\n }\n }\n\n this.fft_long = function (gfc, y, chn, buffer, bufPos) {\n var jj = Encoder.BLKSIZE / 8 - 1;\n var x = Encoder.BLKSIZE / 2;\n\n do {\n var f0, f1, f2, f3, w;\n var i = rv_tbl[jj] & 0xff;\n f0 = window[i] * buffer[chn][bufPos + i];\n w = window[i + 0x200] * buffer[chn][bufPos + i + 0x200];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window[i + 0x100] * buffer[chn][bufPos + i + 0x100];\n w = window[i + 0x300] * buffer[chn][bufPos + i + 0x300];\n f3 = f2 - w;\n f2 = f2 + w;\n\n x -= 4;\n y[x + 0] = f0 + f2;\n y[x + 2] = f0 - f2;\n y[x + 1] = f1 + f3;\n y[x + 3] = f1 - f3;\n\n f0 = window[i + 0x001] * buffer[chn][bufPos + i + 0x001];\n w = window[i + 0x201] * buffer[chn][bufPos + i + 0x201];\n f1 = f0 - w;\n f0 = f0 + w;\n f2 = window[i + 0x101] * buffer[chn][bufPos + i + 0x101];\n w = window[i + 0x301] * buffer[chn][bufPos + i + 0x301];\n f3 = f2 - w;\n f2 = f2 + w;\n\n y[x + Encoder.BLKSIZE / 2 + 0] = f0 + f2;\n y[x + Encoder.BLKSIZE / 2 + 2] = f0 - f2;\n y[x + Encoder.BLKSIZE / 2 + 1] = f1 + f3;\n y[x + Encoder.BLKSIZE / 2 + 3] = f1 - f3;\n } while (--jj >= 0);\n\n fht(y, x, Encoder.BLKSIZE / 2);\n /* BLKSIZE/2 because of 3DNow! ASM routine */\n }\n\n this.init_fft = function (gfc) {\n /* The type of window used here will make no real difference, but */\n /*\n * in the interest of merging nspsytune stuff - switch to blackman\n * window\n */\n for (var i = 0; i < Encoder.BLKSIZE; i++)\n /* blackman window */\n window[i] = (0.42 - 0.5 * Math.cos(2 * Math.PI * (i + .5)\n / Encoder.BLKSIZE) + 0.08 * Math.cos(4 * Math.PI * (i + .5)\n / Encoder.BLKSIZE));\n\n for (var i = 0; i < Encoder.BLKSIZE_s / 2; i++)\n window_s[i] = (0.5 * (1.0 - Math.cos(2.0 * Math.PI\n * (i + 0.5) / Encoder.BLKSIZE_s)));\n\n }\n\n}\n\nmodule.exports = FFT;\n","/*\n * psymodel.c\n *\n * Copyright (c) 1999-2000 Mark Taylor\n * Copyright (c) 2001-2002 Naoki Shibata\n * Copyright (c) 2000-2003 Takehiro Tominaga\n * Copyright (c) 2000-2008 Robert Hegemann\n * Copyright (c) 2000-2005 Gabriel Bouvigne\n * Copyright (c) 2000-2005 Alexander Leidinger\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: PsyModel.java,v 1.27 2011/05/24 20:48:06 kenchis Exp $ */\n\n\n/*\n PSYCHO ACOUSTICS\n\n\n This routine computes the psycho acoustics, delayed by one granule.\n\n Input: buffer of PCM data (1024 samples).\n\n This window should be centered over the 576 sample granule window.\n The routine will compute the psycho acoustics for\n this granule, but return the psycho acoustics computed\n for the *previous* granule. This is because the block\n type of the previous granule can only be determined\n after we have computed the psycho acoustics for the following\n granule.\n\n Output: maskings and energies for each scalefactor band.\n block type, PE, and some correlation measures.\n The PE is used by CBR modes to determine if extra bits\n from the bit reservoir should be used. The correlation\n measures are used to determine mid/side or regular stereo.\n */\n/*\n Notation:\n\n barks: a non-linear frequency scale. Mapping from frequency to\n barks is given by freq2bark()\n\n scalefactor bands: The spectrum (frequencies) are broken into\n SBMAX \"scalefactor bands\". Thes bands\n are determined by the MPEG ISO spec. In\n the noise shaping/quantization code, we allocate\n bits among the partition bands to achieve the\n best possible quality\n\n partition bands: The spectrum is also broken into about\n 64 \"partition bands\". Each partition\n band is about .34 barks wide. There are about 2-5\n partition bands for each scalefactor band.\n\n LAME computes all psycho acoustic information for each partition\n band. Then at the end of the computations, this information\n is mapped to scalefactor bands. The energy in each scalefactor\n band is taken as the sum of the energy in all partition bands\n which overlap the scalefactor band. The maskings can be computed\n in the same way (and thus represent the average masking in that band)\n or by taking the minmum value multiplied by the number of\n partition bands used (which represents a minimum masking in that band).\n */\n/*\n The general outline is as follows:\n\n 1. compute the energy in each partition band\n 2. compute the tonality in each partition band\n 3. compute the strength of each partion band \"masker\"\n 4. compute the masking (via the spreading function applied to each masker)\n 5. Modifications for mid/side masking.\n\n Each partition band is considiered a \"masker\". The strength\n of the i'th masker in band j is given by:\n\n s3(bark(i)-bark(j))*strength(i)\n\n The strength of the masker is a function of the energy and tonality.\n The more tonal, the less masking. LAME uses a simple linear formula\n (controlled by NMT and TMN) which says the strength is given by the\n energy divided by a linear function of the tonality.\n */\n/*\n s3() is the \"spreading function\". It is given by a formula\n determined via listening tests.\n\n The total masking in the j'th partition band is the sum over\n all maskings i. It is thus given by the convolution of\n the strength with s3(), the \"spreading function.\"\n\n masking(j) = sum_over_i s3(i-j)*strength(i) = s3 o strength\n\n where \"o\" = convolution operator. s3 is given by a formula determined\n via listening tests. It is normalized so that s3 o 1 = 1.\n\n Note: instead of a simple convolution, LAME also has the\n option of using \"additive masking\"\n\n The most critical part is step 2, computing the tonality of each\n partition band. LAME has two tonality estimators. The first\n is based on the ISO spec, and measures how predictiable the\n signal is over time. The more predictable, the more tonal.\n The second measure is based on looking at the spectrum of\n a single granule. The more peaky the spectrum, the more\n tonal. By most indications, the latter approach is better.\n\n Finally, in step 5, the maskings for the mid and side\n channel are possibly increased. Under certain circumstances,\n noise in the mid & side channels is assumed to also\n be masked by strong maskers in the L or R channels.\n\n\n Other data computed by the psy-model:\n\n ms_ratio side-channel / mid-channel masking ratio (for previous granule)\n ms_ratio_next side-channel / mid-channel masking ratio for this granule\n\n percep_entropy[2] L and R values (prev granule) of PE - A measure of how\n much pre-echo is in the previous granule\n percep_entropy_MS[2] mid and side channel values (prev granule) of percep_entropy\n energy[4] L,R,M,S energy in each channel, prev granule\n blocktype_d[2] block type to use for previous granule\n */\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar FFT = require(\"./FFT.js\");\nvar Encoder = require(\"./Encoder.js\");\n\nfunction PsyModel() {\n\n var fft = new FFT();\n\n var LOG10 = 2.30258509299404568402;\n\n var rpelev = 2;\n var rpelev2 = 16;\n var rpelev_s = 2;\n var rpelev2_s = 16;\n\n /* size of each partition band, in barks: */\n var DELBARK = .34;\n\n /* tuned for output level (sensitive to energy scale) */\n var VO_SCALE = (1. / (14752 * 14752) / (Encoder.BLKSIZE / 2));\n\n var temporalmask_sustain_sec = 0.01;\n\n var NS_PREECHO_ATT0 = 0.8;\n var NS_PREECHO_ATT1 = 0.6;\n var NS_PREECHO_ATT2 = 0.3;\n\n var NS_MSFIX = 3.5;\n\n var NSATTACKTHRE = 4.4;\n var NSATTACKTHRE_S = 25;\n\n var NSFIRLEN = 21;\n\n /* size of each partition band, in barks: */\n var LN_TO_LOG10 = 0.2302585093;\n\n function NON_LINEAR_SCALE_ENERGY(x) {\n return x;\n }\n\n /**\n *
\n     *       L3psycho_anal.  Compute psycho acoustics.\n     *\n     *       Data returned to the calling program must be delayed by one\n     *       granule.\n     *\n     *       This is done in two places.\n     *       If we do not need to know the blocktype, the copying\n     *       can be done here at the top of the program: we copy the data for\n     *       the last granule (computed during the last call) before it is\n     *       overwritten with the new data.  It looks like this:\n     *\n     *       0. static psymodel_data\n     *       1. calling_program_data = psymodel_data\n     *       2. compute psymodel_data\n     *\n     *       For data which needs to know the blocktype, the copying must be\n     *       done at the end of this loop, and the old values must be saved:\n     *\n     *       0. static psymodel_data_old\n     *       1. compute psymodel_data\n     *       2. compute possible block type of this granule\n     *       3. compute final block type of previous granule based on #2.\n     *       4. calling_program_data = psymodel_data_old\n     *       5. psymodel_data_old = psymodel_data\n     *     psycho_loudness_approx\n     *       jd - 2001 mar 12\n     *    in:  energy   - BLKSIZE/2 elements of frequency magnitudes ^ 2\n     *         gfp      - uses out_samplerate, ATHtype (also needed for ATHformula)\n     *    returns: loudness^2 approximation, a positive value roughly tuned for a value\n     *             of 1.0 for signals near clipping.\n     *    notes:   When calibrated, feeding this function binary white noise at sample\n     *             values +32767 or -32768 should return values that approach 3.\n     *             ATHformula is used to approximate an equal loudness curve.\n     *    future:  Data indicates that the shape of the equal loudness curve varies\n     *             with intensity.  This function might be improved by using an equal\n     *             loudness curve shaped for typical playback levels (instead of the\n     *             ATH, that is shaped for the threshold).  A flexible realization might\n     *             simply bend the existing ATH curve to achieve the desired shape.\n     *             However, the potential gain may not be enough to justify an effort.\n     * 
\n */\n function psycho_loudness_approx(energy, gfc) {\n var loudness_power = 0.0;\n /* apply weights to power in freq. bands */\n for (var i = 0; i < Encoder.BLKSIZE / 2; ++i)\n loudness_power += energy[i] * gfc.ATH.eql_w[i];\n loudness_power *= VO_SCALE;\n\n return loudness_power;\n }\n\n function compute_ffts(gfp, fftenergy, fftenergy_s, wsamp_l, wsamp_lPos, wsamp_s, wsamp_sPos, gr_out, chn, buffer, bufPos) {\n var gfc = gfp.internal_flags;\n if (chn < 2) {\n fft.fft_long(gfc, wsamp_l[wsamp_lPos], chn, buffer, bufPos);\n fft.fft_short(gfc, wsamp_s[wsamp_sPos], chn, buffer, bufPos);\n }\n /* FFT data for mid and side channel is derived from L & R */\n else if (chn == 2) {\n for (var j = Encoder.BLKSIZE - 1; j >= 0; --j) {\n var l = wsamp_l[wsamp_lPos + 0][j];\n var r = wsamp_l[wsamp_lPos + 1][j];\n wsamp_l[wsamp_lPos + 0][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_l[wsamp_lPos + 1][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n for (var b = 2; b >= 0; --b) {\n for (var j = Encoder.BLKSIZE_s - 1; j >= 0; --j) {\n var l = wsamp_s[wsamp_sPos + 0][b][j];\n var r = wsamp_s[wsamp_sPos + 1][b][j];\n wsamp_s[wsamp_sPos + 0][b][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_s[wsamp_sPos + 1][b][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy[0] = NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos + 0][0]);\n fftenergy[0] *= fftenergy[0];\n\n for (var j = Encoder.BLKSIZE / 2 - 1; j >= 0; --j) {\n var re = (wsamp_l[wsamp_lPos + 0])[Encoder.BLKSIZE / 2 - j];\n var im = (wsamp_l[wsamp_lPos + 0])[Encoder.BLKSIZE / 2 + j];\n fftenergy[Encoder.BLKSIZE / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n for (var b = 2; b >= 0; --b) {\n fftenergy_s[b][0] = (wsamp_s[wsamp_sPos + 0])[b][0];\n fftenergy_s[b][0] *= fftenergy_s[b][0];\n for (var j = Encoder.BLKSIZE_s / 2 - 1; j >= 0; --j) {\n var re = (wsamp_s[wsamp_sPos + 0])[b][Encoder.BLKSIZE_s\n / 2 - j];\n var im = (wsamp_s[wsamp_sPos + 0])[b][Encoder.BLKSIZE_s\n / 2 + j];\n fftenergy_s[b][Encoder.BLKSIZE_s / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n }\n /* total energy */\n {\n var totalenergy = 0.0;\n for (var j = 11; j < Encoder.HBLKSIZE; j++)\n totalenergy += fftenergy[j];\n\n gfc.tot_ener[chn] = totalenergy;\n }\n\n if (gfp.analysis) {\n for (var j = 0; j < Encoder.HBLKSIZE; j++) {\n gfc.pinfo.energy[gr_out][chn][j] = gfc.pinfo.energy_save[chn][j];\n gfc.pinfo.energy_save[chn][j] = fftenergy[j];\n }\n gfc.pinfo.pe[gr_out][chn] = gfc.pe[chn];\n }\n\n /*********************************************************************\n * compute loudness approximation (used for ATH auto-level adjustment)\n *********************************************************************/\n if (gfp.athaa_loudapprox == 2 && chn < 2) {\n // no loudness for mid/side ch\n gfc.loudness_sq[gr_out][chn] = gfc.loudness_sq_save[chn];\n gfc.loudness_sq_save[chn] = psycho_loudness_approx(fftenergy, gfc);\n }\n }\n\n /* mask_add optimization */\n /* init the limit values used to avoid computing log in mask_add when it is not necessary */\n\n /**\n *
\n     *  For example, with i = 10*log10(m2/m1)/10*16         (= log10(m2/m1)*16)\n     *\n     * abs(i)>8 is equivalent (as i is an integer) to\n     * abs(i)>=9\n     * i>=9 || i<=-9\n     * equivalent to (as i is the biggest integer smaller than log10(m2/m1)*16\n     * or the smallest integer bigger than log10(m2/m1)*16 depending on the sign of log10(m2/m1)*16)\n     * log10(m2/m1)>=9/16 || log10(m2/m1)<=-9/16\n     * exp10 is strictly increasing thus this is equivalent to\n     * m2/m1 >= 10^(9/16) || m2/m1<=10^(-9/16) which are comparisons to constants\n     * 
\n */\n\n /**\n * as in if(i>8)\n */\n var I1LIMIT = 8;\n /**\n * as in if(i>24) . changed 23\n */\n var I2LIMIT = 23;\n /**\n * as in if(m<15)\n */\n var MLIMIT = 15;\n\n var ma_max_i1;\n var ma_max_i2;\n var ma_max_m;\n\n /**\n * This is the masking table:
\n * According to tonality, values are going from 0dB (TMN) to 9.3dB (NMT).
\n * After additive masking computation, 8dB are added, so final values are\n * going from 8dB to 17.3dB\n *\n * pow(10, -0.0..-0.6)\n */\n var tab = [1.0, 0.79433, 0.63096, 0.63096,\n 0.63096, 0.63096, 0.63096, 0.25119, 0.11749];\n\n function init_mask_add_max_values() {\n ma_max_i1 = Math.pow(10, (I1LIMIT + 1) / 16.0);\n ma_max_i2 = Math.pow(10, (I2LIMIT + 1) / 16.0);\n ma_max_m = Math.pow(10, (MLIMIT) / 10.0);\n }\n\n var table1 = [3.3246 * 3.3246,\n 3.23837 * 3.23837, 3.15437 * 3.15437, 3.00412 * 3.00412,\n 2.86103 * 2.86103, 2.65407 * 2.65407, 2.46209 * 2.46209,\n 2.284 * 2.284, 2.11879 * 2.11879, 1.96552 * 1.96552,\n 1.82335 * 1.82335, 1.69146 * 1.69146, 1.56911 * 1.56911,\n 1.46658 * 1.46658, 1.37074 * 1.37074, 1.31036 * 1.31036,\n 1.25264 * 1.25264, 1.20648 * 1.20648, 1.16203 * 1.16203,\n 1.12765 * 1.12765, 1.09428 * 1.09428, 1.0659 * 1.0659,\n 1.03826 * 1.03826, 1.01895 * 1.01895, 1];\n\n var table2 = [1.33352 * 1.33352,\n 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497,\n 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382,\n 1.22321 * 1.22321, 1.14758 * 1.14758, 1];\n\n var table3 = [2.35364 * 2.35364,\n 2.29259 * 2.29259, 2.23313 * 2.23313, 2.12675 * 2.12675,\n 2.02545 * 2.02545, 1.87894 * 1.87894, 1.74303 * 1.74303,\n 1.61695 * 1.61695, 1.49999 * 1.49999, 1.39148 * 1.39148,\n 1.29083 * 1.29083, 1.19746 * 1.19746, 1.11084 * 1.11084,\n 1.03826 * 1.03826];\n\n /**\n * addition of simultaneous masking Naoki Shibata 2000/7\n */\n function mask_add(m1, m2, kk, b, gfc, shortblock) {\n var ratio;\n\n if (m2 > m1) {\n if (m2 < (m1 * ma_max_i2))\n ratio = m2 / m1;\n else\n return (m1 + m2);\n } else {\n if (m1 >= (m2 * ma_max_i2))\n return (m1 + m2);\n ratio = m1 / m2;\n }\n\n /* Should always be true, just checking */\n assert(m1 >= 0);\n assert(m2 >= 0);\n\n m1 += m2;\n //if (((long)(b + 3) & 0xffffffff) <= 3 + 3) {\n if ((b + 3) <= 3 + 3) {\n /* approximately, 1 bark = 3 partitions */\n /* 65% of the cases */\n /* originally 'if(i > 8)' */\n if (ratio >= ma_max_i1) {\n /* 43% of the total */\n return m1;\n }\n\n /* 22% of the total */\n var i = 0 | (Util.FAST_LOG10_X(ratio, 16.0));\n return m1 * table2[i];\n }\n\n /**\n *
\n         * m<15 equ log10((m1+m2)/gfc.ATH.cb[k])<1.5\n         * equ (m1+m2)/gfc.ATH.cb[k]<10^1.5\n         * equ (m1+m2)<10^1.5 * gfc.ATH.cb[k]\n         * 
\n */\n var i = 0 | Util.FAST_LOG10_X(ratio, 16.0);\n if (shortblock != 0) {\n m2 = gfc.ATH.cb_s[kk] * gfc.ATH.adjust;\n } else {\n m2 = gfc.ATH.cb_l[kk] * gfc.ATH.adjust;\n }\n assert(m2 >= 0);\n if (m1 < ma_max_m * m2) {\n /* 3% of the total */\n /* Originally if (m > 0) { */\n if (m1 > m2) {\n var f, r;\n\n f = 1.0;\n if (i <= 13)\n f = table3[i];\n\n r = Util.FAST_LOG10_X(m1 / m2, 10.0 / 15.0);\n return m1 * ((table1[i] - f) * r + f);\n }\n\n if (i > 13)\n return m1;\n\n return m1 * table3[i];\n }\n\n /* 10% of total */\n return m1 * table1[i];\n }\n\n var table2_ = [1.33352 * 1.33352,\n 1.35879 * 1.35879, 1.38454 * 1.38454, 1.39497 * 1.39497,\n 1.40548 * 1.40548, 1.3537 * 1.3537, 1.30382 * 1.30382,\n 1.22321 * 1.22321, 1.14758 * 1.14758, 1];\n\n /**\n * addition of simultaneous masking Naoki Shibata 2000/7\n */\n function vbrpsy_mask_add(m1, m2, b) {\n var ratio;\n\n if (m1 < 0) {\n m1 = 0;\n }\n if (m2 < 0) {\n m2 = 0;\n }\n if (m1 <= 0) {\n return m2;\n }\n if (m2 <= 0) {\n return m1;\n }\n if (m2 > m1) {\n ratio = m2 / m1;\n } else {\n ratio = m1 / m2;\n }\n if (-2 <= b && b <= 2) {\n /* approximately, 1 bark = 3 partitions */\n /* originally 'if(i > 8)' */\n if (ratio >= ma_max_i1) {\n return m1 + m2;\n } else {\n var i = 0 | (Util.FAST_LOG10_X(ratio, 16.0));\n return (m1 + m2) * table2_[i];\n }\n }\n if (ratio < ma_max_i2) {\n return m1 + m2;\n }\n if (m1 < m2) {\n m1 = m2;\n }\n return m1;\n }\n\n /**\n * compute interchannel masking effects\n */\n function calc_interchannel_masking(gfp, ratio) {\n var gfc = gfp.internal_flags;\n if (gfc.channels_out > 1) {\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n var l = gfc.thm[0].l[sb];\n var r = gfc.thm[1].l[sb];\n gfc.thm[0].l[sb] += r * ratio;\n gfc.thm[1].l[sb] += l * ratio;\n }\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var l = gfc.thm[0].s[sb][sblock];\n var r = gfc.thm[1].s[sb][sblock];\n gfc.thm[0].s[sb][sblock] += r * ratio;\n gfc.thm[1].s[sb][sblock] += l * ratio;\n }\n }\n }\n }\n\n /**\n * compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper\n */\n function msfix1(gfc) {\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n /* use this fix if L & R masking differs by 2db or less */\n /* if db = 10*log10(x2/x1) < 2 */\n /* if (x2 < 1.58*x1) { */\n if (gfc.thm[0].l[sb] > 1.58 * gfc.thm[1].l[sb]\n || gfc.thm[1].l[sb] > 1.58 * gfc.thm[0].l[sb])\n continue;\n var mld = gfc.mld_l[sb] * gfc.en[3].l[sb];\n var rmid = Math.max(gfc.thm[2].l[sb],\n Math.min(gfc.thm[3].l[sb], mld));\n\n mld = gfc.mld_l[sb] * gfc.en[2].l[sb];\n var rside = Math.max(gfc.thm[3].l[sb],\n Math.min(gfc.thm[2].l[sb], mld));\n gfc.thm[2].l[sb] = rmid;\n gfc.thm[3].l[sb] = rside;\n }\n\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n if (gfc.thm[0].s[sb][sblock] > 1.58 * gfc.thm[1].s[sb][sblock]\n || gfc.thm[1].s[sb][sblock] > 1.58 * gfc.thm[0].s[sb][sblock])\n continue;\n var mld = gfc.mld_s[sb] * gfc.en[3].s[sb][sblock];\n var rmid = Math.max(gfc.thm[2].s[sb][sblock],\n Math.min(gfc.thm[3].s[sb][sblock], mld));\n\n mld = gfc.mld_s[sb] * gfc.en[2].s[sb][sblock];\n var rside = Math.max(gfc.thm[3].s[sb][sblock],\n Math.min(gfc.thm[2].s[sb][sblock], mld));\n\n gfc.thm[2].s[sb][sblock] = rmid;\n gfc.thm[3].s[sb][sblock] = rside;\n }\n }\n }\n\n /**\n * Adjust M/S maskings if user set \"msfix\"\n *\n * Naoki Shibata 2000\n */\n function ns_msfix(gfc, msfix, athadjust) {\n var msfix2 = msfix;\n var athlower = Math.pow(10, athadjust);\n\n msfix *= 2.0;\n msfix2 *= 2.0;\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n var thmLR, thmM, thmS, ath;\n ath = (gfc.ATH.cb_l[gfc.bm_l[sb]]) * athlower;\n thmLR = Math.min(Math.max(gfc.thm[0].l[sb], ath),\n Math.max(gfc.thm[1].l[sb], ath));\n thmM = Math.max(gfc.thm[2].l[sb], ath);\n thmS = Math.max(gfc.thm[3].l[sb], ath);\n if (thmLR * msfix < thmM + thmS) {\n var f = thmLR * msfix2 / (thmM + thmS);\n thmM *= f;\n thmS *= f;\n assert(thmM + thmS > 0);\n }\n gfc.thm[2].l[sb] = Math.min(thmM, gfc.thm[2].l[sb]);\n gfc.thm[3].l[sb] = Math.min(thmS, gfc.thm[3].l[sb]);\n }\n\n athlower *= ( Encoder.BLKSIZE_s / Encoder.BLKSIZE);\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var thmLR, thmM, thmS, ath;\n ath = (gfc.ATH.cb_s[gfc.bm_s[sb]]) * athlower;\n thmLR = Math.min(Math.max(gfc.thm[0].s[sb][sblock], ath),\n Math.max(gfc.thm[1].s[sb][sblock], ath));\n thmM = Math.max(gfc.thm[2].s[sb][sblock], ath);\n thmS = Math.max(gfc.thm[3].s[sb][sblock], ath);\n\n if (thmLR * msfix < thmM + thmS) {\n var f = thmLR * msfix / (thmM + thmS);\n thmM *= f;\n thmS *= f;\n assert(thmM + thmS > 0);\n }\n gfc.thm[2].s[sb][sblock] = Math.min(gfc.thm[2].s[sb][sblock],\n thmM);\n gfc.thm[3].s[sb][sblock] = Math.min(gfc.thm[3].s[sb][sblock],\n thmS);\n }\n }\n }\n\n /**\n * short block threshold calculation (part 2)\n *\n * partition band bo_s[sfb] is at the transition from scalefactor band sfb\n * to the next one sfb+1; enn and thmm have to be split between them\n */\n function convert_partition2scalefac_s(gfc, eb, thr, chn, sblock) {\n var sb, b;\n var enn = 0.0;\n var thmm = 0.0;\n for (sb = b = 0; sb < Encoder.SBMAX_s; ++b, ++sb) {\n var bo_s_sb = gfc.bo_s[sb];\n var npart_s = gfc.npart_s;\n var b_lim = bo_s_sb < npart_s ? bo_s_sb : npart_s;\n while (b < b_lim) {\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n enn += eb[b];\n thmm += thr[b];\n b++;\n }\n gfc.en[chn].s[sb][sblock] = enn;\n gfc.thm[chn].s[sb][sblock] = thmm;\n\n if (b >= npart_s) {\n ++sb;\n break;\n }\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n {\n /* at transition sfb . sfb+1 */\n var w_curr = gfc.PSY.bo_s_weight[sb];\n var w_next = 1.0 - w_curr;\n enn = w_curr * eb[b];\n thmm = w_curr * thr[b];\n gfc.en[chn].s[sb][sblock] += enn;\n gfc.thm[chn].s[sb][sblock] += thmm;\n enn = w_next * eb[b];\n thmm = w_next * thr[b];\n }\n }\n /* zero initialize the rest */\n for (; sb < Encoder.SBMAX_s; ++sb) {\n gfc.en[chn].s[sb][sblock] = 0;\n gfc.thm[chn].s[sb][sblock] = 0;\n }\n }\n\n /**\n * longblock threshold calculation (part 2)\n */\n function convert_partition2scalefac_l(gfc, eb, thr, chn) {\n var sb, b;\n var enn = 0.0;\n var thmm = 0.0;\n for (sb = b = 0; sb < Encoder.SBMAX_l; ++b, ++sb) {\n var bo_l_sb = gfc.bo_l[sb];\n var npart_l = gfc.npart_l;\n var b_lim = bo_l_sb < npart_l ? bo_l_sb : npart_l;\n while (b < b_lim) {\n assert(eb[b] >= 0);\n // iff failed, it may indicate some index error elsewhere\n assert(thr[b] >= 0);\n enn += eb[b];\n thmm += thr[b];\n b++;\n }\n gfc.en[chn].l[sb] = enn;\n gfc.thm[chn].l[sb] = thmm;\n\n if (b >= npart_l) {\n ++sb;\n break;\n }\n assert(eb[b] >= 0);\n assert(thr[b] >= 0);\n {\n /* at transition sfb . sfb+1 */\n var w_curr = gfc.PSY.bo_l_weight[sb];\n var w_next = 1.0 - w_curr;\n enn = w_curr * eb[b];\n thmm = w_curr * thr[b];\n gfc.en[chn].l[sb] += enn;\n gfc.thm[chn].l[sb] += thmm;\n enn = w_next * eb[b];\n thmm = w_next * thr[b];\n }\n }\n /* zero initialize the rest */\n for (; sb < Encoder.SBMAX_l; ++sb) {\n gfc.en[chn].l[sb] = 0;\n gfc.thm[chn].l[sb] = 0;\n }\n }\n\n function compute_masking_s(gfp, fftenergy_s, eb, thr, chn, sblock) {\n var gfc = gfp.internal_flags;\n var j, b;\n\n for (b = j = 0; b < gfc.npart_s; ++b) {\n var ebb = 0, m = 0;\n var n = gfc.numlines_s[b];\n for (var i = 0; i < n; ++i, ++j) {\n var el = fftenergy_s[sblock][j];\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n }\n assert(b == gfc.npart_s);\n assert(j == 129);\n for (j = b = 0; b < gfc.npart_s; b++) {\n var kk = gfc.s3ind_s[b][0];\n var ecb = gfc.s3_ss[j++] * eb[kk];\n ++kk;\n while (kk <= gfc.s3ind_s[b][1]) {\n ecb += gfc.s3_ss[j] * eb[kk];\n ++j;\n ++kk;\n }\n\n { /* limit calculated threshold by previous granule */\n var x = rpelev_s * gfc.nb_s1[chn][b];\n thr[b] = Math.min(ecb, x);\n }\n if (gfc.blocktype_old[chn & 1] == Encoder.SHORT_TYPE) {\n /* limit calculated threshold by even older granule */\n var x = rpelev2_s * gfc.nb_s2[chn][b];\n var y = thr[b];\n thr[b] = Math.min(x, y);\n }\n\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = ecb;\n assert(thr[b] >= 0);\n }\n for (; b <= Encoder.CBANDS; ++b) {\n eb[b] = 0;\n thr[b] = 0;\n }\n }\n\n function block_type_set(gfp, uselongblock, blocktype_d, blocktype) {\n var gfc = gfp.internal_flags;\n\n if (gfp.short_blocks == ShortBlock.short_block_coupled\n /* force both channels to use the same block type */\n /* this is necessary if the frame is to be encoded in ms_stereo. */\n /* But even without ms_stereo, FhG does this */\n && !(uselongblock[0] != 0 && uselongblock[1] != 0))\n uselongblock[0] = uselongblock[1] = 0;\n\n /*\n * update the blocktype of the previous granule, since it depends on\n * what happend in this granule\n */\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n blocktype[chn] = Encoder.NORM_TYPE;\n /* disable short blocks */\n if (gfp.short_blocks == ShortBlock.short_block_dispensed)\n uselongblock[chn] = 1;\n if (gfp.short_blocks == ShortBlock.short_block_forced)\n uselongblock[chn] = 0;\n\n if (uselongblock[chn] != 0) {\n /* no attack : use long blocks */\n assert(gfc.blocktype_old[chn] != Encoder.START_TYPE);\n if (gfc.blocktype_old[chn] == Encoder.SHORT_TYPE)\n blocktype[chn] = Encoder.STOP_TYPE;\n } else {\n /* attack : use short blocks */\n blocktype[chn] = Encoder.SHORT_TYPE;\n if (gfc.blocktype_old[chn] == Encoder.NORM_TYPE) {\n gfc.blocktype_old[chn] = Encoder.START_TYPE;\n }\n if (gfc.blocktype_old[chn] == Encoder.STOP_TYPE)\n gfc.blocktype_old[chn] = Encoder.SHORT_TYPE;\n }\n\n blocktype_d[chn] = gfc.blocktype_old[chn];\n // value returned to calling program\n gfc.blocktype_old[chn] = blocktype[chn];\n // save for next call to l3psy_anal\n }\n }\n\n function NS_INTERP(x, y, r) {\n /* was pow((x),(r))*pow((y),1-(r)) */\n if (r >= 1.0) {\n /* 99.7% of the time */\n return x;\n }\n if (r <= 0.0)\n return y;\n if (y > 0.0) {\n /* rest of the time */\n return (Math.pow(x / y, r) * y);\n }\n /* never happens */\n return 0.0;\n }\n\n /**\n * these values are tuned only for 44.1kHz...\n */\n var regcoef_s = [11.8, 13.6, 17.2, 32, 46.5,\n 51.3, 57.5, 67.1, 71.5, 84.6, 97.6, 130,\n /* 255.8 */\n ];\n\n function pecalc_s(mr, masking_lower) {\n var pe_s = 1236.28 / 4;\n for (var sb = 0; sb < Encoder.SBMAX_s - 1; sb++) {\n for (var sblock = 0; sblock < 3; sblock++) {\n var thm = mr.thm.s[sb][sblock];\n assert(sb < regcoef_s.length);\n if (thm > 0.0) {\n var x = thm * masking_lower;\n var en = mr.en.s[sb][sblock];\n if (en > x) {\n if (en > x * 1e10) {\n pe_s += regcoef_s[sb] * (10.0 * LOG10);\n } else {\n assert(x > 0);\n pe_s += regcoef_s[sb] * Util.FAST_LOG10(en / x);\n }\n }\n }\n }\n }\n\n return pe_s;\n }\n\n /**\n * these values are tuned only for 44.1kHz...\n */\n var regcoef_l = [6.8, 5.8, 5.8, 6.4, 6.5, 9.9,\n 12.1, 14.4, 15, 18.9, 21.6, 26.9, 34.2, 40.2, 46.8, 56.5,\n 60.7, 73.9, 85.7, 93.4, 126.1,\n /* 241.3 */\n ];\n\n function pecalc_l(mr, masking_lower) {\n var pe_l = 1124.23 / 4;\n for (var sb = 0; sb < Encoder.SBMAX_l - 1; sb++) {\n var thm = mr.thm.l[sb];\n assert(sb < regcoef_l.length);\n if (thm > 0.0) {\n var x = thm * masking_lower;\n var en = mr.en.l[sb];\n if (en > x) {\n if (en > x * 1e10) {\n pe_l += regcoef_l[sb] * (10.0 * LOG10);\n } else {\n assert(x > 0);\n pe_l += regcoef_l[sb] * Util.FAST_LOG10(en / x);\n }\n }\n }\n }\n return pe_l;\n }\n\n function calc_energy(gfc, fftenergy, eb, max, avg) {\n var b, j;\n\n for (b = j = 0; b < gfc.npart_l; ++b) {\n var ebb = 0, m = 0;\n var i;\n for (i = 0; i < gfc.numlines_l[b]; ++i, ++j) {\n var el = fftenergy[j];\n assert(el >= 0);\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n max[b] = m;\n avg[b] = ebb * gfc.rnumlines_l[b];\n assert(gfc.rnumlines_l[b] >= 0);\n assert(ebb >= 0);\n assert(eb[b] >= 0);\n assert(max[b] >= 0);\n assert(avg[b] >= 0);\n }\n }\n\n function calc_mask_index_l(gfc, max, avg, mask_idx) {\n var last_tab_entry = tab.length - 1;\n var b = 0;\n var a = avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n\n for (b = 1; b < gfc.npart_l - 1; b++) {\n a = avg[b - 1] + avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_l[b - 1] + gfc.numlines_l[b] + gfc.numlines_l[b + 1] - 1) > 0);\n a = 20.0\n * (m * 3.0 - a)\n / (a * (gfc.numlines_l[b - 1] + gfc.numlines_l[b]\n + gfc.numlines_l[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n }\n assert(b > 0);\n assert(b == gfc.npart_l - 1);\n\n a = avg[b - 1] + avg[b];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n assert((gfc.numlines_l[b - 1] + gfc.numlines_l[b] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_l[b - 1] + gfc.numlines_l[b] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n assert(b == (gfc.npart_l - 1));\n }\n\n var fircoef = [\n -8.65163e-18 * 2, -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2,\n -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2, 0.0931738 * 2,\n -5.52212e-17 * 2, -0.313819 * 2\n ];\n\n this.L3psycho_anal_ns = function (gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, percep_entropy, percep_MS_entropy, energy, blocktype_d) {\n /*\n * to get a good cache performance, one has to think about the sequence,\n * in which the variables are used.\n */\n var gfc = gfp.internal_flags;\n\n /* fft and energy calculation */\n var wsamp_L = new_float_n([2, Encoder.BLKSIZE]);\n var wsamp_S = new_float_n([2, 3, Encoder.BLKSIZE_s]);\n\n /* convolution */\n var eb_l = new_float(Encoder.CBANDS + 1);\n var eb_s = new_float(Encoder.CBANDS + 1);\n var thr = new_float(Encoder.CBANDS + 2);\n\n /* block type */\n var blocktype = new_int(2), uselongblock = new_int(2);\n\n /* usual variables like loop indices, etc.. */\n var numchn, chn;\n var b, i, j, k;\n var sb, sblock;\n\n /* variables used for --nspsytune */\n var ns_hpfsmpl = new_float_n([2, 576]);\n var pcfact;\n var mask_idx_l = new_int(Encoder.CBANDS + 2), mask_idx_s = new_int(Encoder.CBANDS + 2);\n\n Arrays.fill(mask_idx_s, 0);\n\n numchn = gfc.channels_out;\n /* chn=2 and 3 = Mid and Side channels */\n if (gfp.mode == MPEGMode.JOINT_STEREO)\n numchn = 4;\n\n if (gfp.VBR == VbrMode.vbr_off)\n pcfact = gfc.ResvMax == 0 ? 0 : ( gfc.ResvSize)\n / gfc.ResvMax * 0.5;\n else if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh\n || gfp.VBR == VbrMode.vbr_mt) {\n pcfact = 0.6;\n } else\n pcfact = 1.0;\n\n /**********************************************************************\n * Apply HPF of fs/4 to the input signal. This is used for attack\n * detection / handling.\n **********************************************************************/\n /* Don't copy the input buffer into a temporary buffer */\n /* unroll the loop 2 times */\n for (chn = 0; chn < gfc.channels_out; chn++) {\n /* apply high pass filter of fs/4 */\n var firbuf = buffer[chn];\n var firbufPos = bufPos + 576 - 350 - NSFIRLEN + 192;\n assert(fircoef.length == ((NSFIRLEN - 1) / 2));\n for (i = 0; i < 576; i++) {\n var sum1, sum2;\n sum1 = firbuf[firbufPos + i + 10];\n sum2 = 0.0;\n for (j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) {\n sum1 += fircoef[j]\n * (firbuf[firbufPos + i + j] + firbuf[firbufPos + i\n + NSFIRLEN - j]);\n sum2 += fircoef[j + 1]\n * (firbuf[firbufPos + i + j + 1] + firbuf[firbufPos\n + i + NSFIRLEN - j - 1]);\n }\n ns_hpfsmpl[chn][i] = sum1 + sum2;\n }\n masking_ratio[gr_out][chn].en.assign(gfc.en[chn]);\n masking_ratio[gr_out][chn].thm.assign(gfc.thm[chn]);\n if (numchn > 2) {\n /* MS maskings */\n /* percep_MS_entropy [chn-2] = gfc . pe [chn]; */\n masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn + 2]);\n masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn + 2]);\n }\n }\n\n for (chn = 0; chn < numchn; chn++) {\n var wsamp_l;\n var wsamp_s;\n var en_subshort = new_float(12);\n var en_short = [0, 0, 0, 0];\n var attack_intensity = new_float(12);\n var ns_uselongblock = 1;\n var attackThreshold;\n var max = new_float(Encoder.CBANDS), avg = new_float(Encoder.CBANDS);\n var ns_attacks = [0, 0, 0, 0];\n var fftenergy = new_float(Encoder.HBLKSIZE);\n var fftenergy_s = new_float_n([3, Encoder.HBLKSIZE_s]);\n\n /*\n * rh 20040301: the following loops do access one off the limits so\n * I increase the array dimensions by one and initialize the\n * accessed values to zero\n */\n assert(gfc.npart_s <= Encoder.CBANDS);\n assert(gfc.npart_l <= Encoder.CBANDS);\n\n /***************************************************************\n * determine the block type (window type)\n ***************************************************************/\n /* calculate energies of each sub-shortblocks */\n for (i = 0; i < 3; i++) {\n en_subshort[i] = gfc.nsPsy.last_en_subshort[chn][i + 6];\n assert(gfc.nsPsy.last_en_subshort[chn][i + 4] > 0);\n attack_intensity[i] = en_subshort[i]\n / gfc.nsPsy.last_en_subshort[chn][i + 4];\n en_short[0] += en_subshort[i];\n }\n\n if (chn == 2) {\n for (i = 0; i < 576; i++) {\n var l, r;\n l = ns_hpfsmpl[0][i];\n r = ns_hpfsmpl[1][i];\n ns_hpfsmpl[0][i] = l + r;\n ns_hpfsmpl[1][i] = l - r;\n }\n }\n {\n var pf = ns_hpfsmpl[chn & 1];\n var pfPos = 0;\n for (i = 0; i < 9; i++) {\n var pfe = pfPos + 576 / 9;\n var p = 1.;\n for (; pfPos < pfe; pfPos++)\n if (p < Math.abs(pf[pfPos]))\n p = Math.abs(pf[pfPos]);\n\n gfc.nsPsy.last_en_subshort[chn][i] = en_subshort[i + 3] = p;\n en_short[1 + i / 3] += p;\n if (p > en_subshort[i + 3 - 2]) {\n assert(en_subshort[i + 3 - 2] > 0);\n p = p / en_subshort[i + 3 - 2];\n } else if (en_subshort[i + 3 - 2] > p * 10.0) {\n assert(p > 0);\n p = en_subshort[i + 3 - 2] / (p * 10.0);\n } else\n p = 0.0;\n attack_intensity[i + 3] = p;\n }\n }\n\n if (gfp.analysis) {\n var x = attack_intensity[0];\n for (i = 1; i < 12; i++)\n if (x < attack_intensity[i])\n x = attack_intensity[i];\n gfc.pinfo.ers[gr_out][chn] = gfc.pinfo.ers_save[chn];\n gfc.pinfo.ers_save[chn] = x;\n }\n\n /* compare energies between sub-shortblocks */\n attackThreshold = (chn == 3) ? gfc.nsPsy.attackthre_s\n : gfc.nsPsy.attackthre;\n for (i = 0; i < 12; i++)\n if (0 == ns_attacks[i / 3]\n && attack_intensity[i] > attackThreshold)\n ns_attacks[i / 3] = (i % 3) + 1;\n\n /*\n * should have energy change between short blocks, in order to avoid\n * periodic signals\n */\n for (i = 1; i < 4; i++) {\n var ratio;\n if (en_short[i - 1] > en_short[i]) {\n assert(en_short[i] > 0);\n ratio = en_short[i - 1] / en_short[i];\n } else {\n assert(en_short[i - 1] > 0);\n ratio = en_short[i] / en_short[i - 1];\n }\n if (ratio < 1.7) {\n ns_attacks[i] = 0;\n if (i == 1)\n ns_attacks[0] = 0;\n }\n }\n\n if (ns_attacks[0] != 0 && gfc.nsPsy.lastAttacks[chn] != 0)\n ns_attacks[0] = 0;\n\n if (gfc.nsPsy.lastAttacks[chn] == 3\n || (ns_attacks[0] + ns_attacks[1] + ns_attacks[2] + ns_attacks[3]) != 0) {\n ns_uselongblock = 0;\n\n if (ns_attacks[1] != 0 && ns_attacks[0] != 0)\n ns_attacks[1] = 0;\n if (ns_attacks[2] != 0 && ns_attacks[1] != 0)\n ns_attacks[2] = 0;\n if (ns_attacks[3] != 0 && ns_attacks[2] != 0)\n ns_attacks[3] = 0;\n }\n\n if (chn < 2) {\n uselongblock[chn] = ns_uselongblock;\n } else {\n if (ns_uselongblock == 0) {\n uselongblock[0] = uselongblock[1] = 0;\n }\n }\n\n /*\n * there is a one granule delay. Copy maskings computed last call\n * into masking_ratio to return to calling program.\n */\n energy[chn] = gfc.tot_ener[chn];\n\n /*********************************************************************\n * compute FFTs\n *********************************************************************/\n wsamp_s = wsamp_S;\n wsamp_l = wsamp_L;\n compute_ffts(gfp, fftenergy, fftenergy_s, wsamp_l, (chn & 1),\n wsamp_s, (chn & 1), gr_out, chn, buffer, bufPos);\n\n /*********************************************************************\n * Calculate the energy and the tonality of each partition.\n *********************************************************************/\n calc_energy(gfc, fftenergy, eb_l, max, avg);\n calc_mask_index_l(gfc, max, avg, mask_idx_l);\n /* compute masking thresholds for short blocks */\n for (sblock = 0; sblock < 3; sblock++) {\n var enn, thmm;\n compute_masking_s(gfp, fftenergy_s, eb_s, thr, chn, sblock);\n convert_partition2scalefac_s(gfc, eb_s, thr, chn, sblock);\n /**** short block pre-echo control ****/\n for (sb = 0; sb < Encoder.SBMAX_s; sb++) {\n thmm = gfc.thm[chn].s[sb][sblock];\n\n thmm *= NS_PREECHO_ATT0;\n if (ns_attacks[sblock] >= 2 || ns_attacks[sblock + 1] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT1 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n if (ns_attacks[sblock] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n } else if ((sblock != 0 && ns_attacks[sblock - 1] == 3)\n || (sblock == 0 && gfc.nsPsy.lastAttacks[chn] == 3)) {\n var idx = (sblock != 2) ? sblock + 1 : 0;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n /* pulse like signal detection for fatboy.wav and so on */\n enn = en_subshort[sblock * 3 + 3]\n + en_subshort[sblock * 3 + 4]\n + en_subshort[sblock * 3 + 5];\n if (en_subshort[sblock * 3 + 5] * 6 < enn) {\n thmm *= 0.5;\n if (en_subshort[sblock * 3 + 4] * 6 < enn)\n thmm *= 0.5;\n }\n\n gfc.thm[chn].s[sb][sblock] = thmm;\n }\n }\n gfc.nsPsy.lastAttacks[chn] = ns_attacks[2];\n\n /*********************************************************************\n * convolve the partitioned energy and unpredictability with the\n * spreading function, s3_l[b][k]\n ********************************************************************/\n k = 0;\n {\n for (b = 0; b < gfc.npart_l; b++) {\n /*\n * convolve the partitioned energy with the spreading\n * function\n */\n var kk = gfc.s3ind[b][0];\n var eb2 = eb_l[kk] * tab[mask_idx_l[kk]];\n var ecb = gfc.s3_ll[k++] * eb2;\n while (++kk <= gfc.s3ind[b][1]) {\n eb2 = eb_l[kk] * tab[mask_idx_l[kk]];\n ecb = mask_add(ecb, gfc.s3_ll[k++] * eb2, kk, kk - b,\n gfc, 0);\n }\n ecb *= 0.158489319246111;\n /* pow(10,-0.8) */\n\n /**** long block pre-echo control ****/\n /**\n *
\n                     * dont use long block pre-echo control if previous granule was\n                     * a short block.  This is to avoid the situation:\n                     * frame0:  quiet (very low masking)\n                     * frame1:  surge  (triggers short blocks)\n                     * frame2:  regular frame.  looks like pre-echo when compared to\n                     *          frame0, but all pre-echo was in frame1.\n                     * 
\n */\n /*\n * chn=0,1 L and R channels\n *\n * chn=2,3 S and M channels.\n */\n\n if (gfc.blocktype_old[chn & 1] == Encoder.SHORT_TYPE)\n thr[b] = ecb;\n else\n thr[b] = NS_INTERP(\n Math.min(ecb, Math.min(rpelev\n * gfc.nb_1[chn][b], rpelev2\n * gfc.nb_2[chn][b])), ecb, pcfact);\n\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = ecb;\n }\n }\n for (; b <= Encoder.CBANDS; ++b) {\n eb_l[b] = 0;\n thr[b] = 0;\n }\n /* compute masking thresholds for long blocks */\n convert_partition2scalefac_l(gfc, eb_l, thr, chn);\n }\n /* end loop over chn */\n\n if (gfp.mode == MPEGMode.STEREO || gfp.mode == MPEGMode.JOINT_STEREO) {\n if (gfp.interChRatio > 0.0) {\n calc_interchannel_masking(gfp, gfp.interChRatio);\n }\n }\n\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n var msfix;\n msfix1(gfc);\n msfix = gfp.msfix;\n if (Math.abs(msfix) > 0.0)\n ns_msfix(gfc, msfix, gfp.ATHlower * gfc.ATH.adjust);\n }\n\n /***************************************************************\n * determine final block type\n ***************************************************************/\n block_type_set(gfp, uselongblock, blocktype_d, blocktype);\n\n /*********************************************************************\n * compute the value of PE to return ... no delay and advance\n *********************************************************************/\n for (chn = 0; chn < numchn; chn++) {\n var ppe;\n var ppePos = 0;\n var type;\n var mr;\n\n if (chn > 1) {\n ppe = percep_MS_entropy;\n ppePos = -2;\n type = Encoder.NORM_TYPE;\n if (blocktype_d[0] == Encoder.SHORT_TYPE\n || blocktype_d[1] == Encoder.SHORT_TYPE)\n type = Encoder.SHORT_TYPE;\n mr = masking_MS_ratio[gr_out][chn - 2];\n } else {\n ppe = percep_entropy;\n ppePos = 0;\n type = blocktype_d[chn];\n mr = masking_ratio[gr_out][chn];\n }\n\n if (type == Encoder.SHORT_TYPE)\n ppe[ppePos + chn] = pecalc_s(mr, gfc.masking_lower);\n else\n ppe[ppePos + chn] = pecalc_l(mr, gfc.masking_lower);\n\n if (gfp.analysis)\n gfc.pinfo.pe[gr_out][chn] = ppe[ppePos + chn];\n\n }\n return 0;\n }\n\n function vbrpsy_compute_fft_l(gfp, buffer, bufPos, chn, gr_out, fftenergy, wsamp_l, wsamp_lPos) {\n var gfc = gfp.internal_flags;\n if (chn < 2) {\n fft.fft_long(gfc, wsamp_l[wsamp_lPos], chn, buffer, bufPos);\n } else if (chn == 2) {\n /* FFT data for mid and side channel is derived from L & R */\n for (var j = Encoder.BLKSIZE - 1; j >= 0; --j) {\n var l = wsamp_l[wsamp_lPos + 0][j];\n var r = wsamp_l[wsamp_lPos + 1][j];\n wsamp_l[wsamp_lPos + 0][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_l[wsamp_lPos + 1][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy[0] = NON_LINEAR_SCALE_ENERGY(wsamp_l[wsamp_lPos + 0][0]);\n fftenergy[0] *= fftenergy[0];\n\n for (var j = Encoder.BLKSIZE / 2 - 1; j >= 0; --j) {\n var re = wsamp_l[wsamp_lPos + 0][Encoder.BLKSIZE / 2 - j];\n var im = wsamp_l[wsamp_lPos + 0][Encoder.BLKSIZE / 2 + j];\n fftenergy[Encoder.BLKSIZE / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n /* total energy */\n {\n var totalenergy = 0.0;\n for (var j = 11; j < Encoder.HBLKSIZE; j++)\n totalenergy += fftenergy[j];\n\n gfc.tot_ener[chn] = totalenergy;\n }\n\n if (gfp.analysis) {\n for (var j = 0; j < Encoder.HBLKSIZE; j++) {\n gfc.pinfo.energy[gr_out][chn][j] = gfc.pinfo.energy_save[chn][j];\n gfc.pinfo.energy_save[chn][j] = fftenergy[j];\n }\n gfc.pinfo.pe[gr_out][chn] = gfc.pe[chn];\n }\n }\n\n function vbrpsy_compute_fft_s(gfp, buffer, bufPos, chn, sblock, fftenergy_s, wsamp_s, wsamp_sPos) {\n var gfc = gfp.internal_flags;\n\n if (sblock == 0 && chn < 2) {\n fft.fft_short(gfc, wsamp_s[wsamp_sPos], chn, buffer, bufPos);\n }\n if (chn == 2) {\n /* FFT data for mid and side channel is derived from L & R */\n for (var j = Encoder.BLKSIZE_s - 1; j >= 0; --j) {\n var l = wsamp_s[wsamp_sPos + 0][sblock][j];\n var r = wsamp_s[wsamp_sPos + 1][sblock][j];\n wsamp_s[wsamp_sPos + 0][sblock][j] = (l + r) * Util.SQRT2 * 0.5;\n wsamp_s[wsamp_sPos + 1][sblock][j] = (l - r) * Util.SQRT2 * 0.5;\n }\n }\n\n /*********************************************************************\n * compute energies\n *********************************************************************/\n fftenergy_s[sblock][0] = wsamp_s[wsamp_sPos + 0][sblock][0];\n fftenergy_s[sblock][0] *= fftenergy_s[sblock][0];\n for (var j = Encoder.BLKSIZE_s / 2 - 1; j >= 0; --j) {\n var re = wsamp_s[wsamp_sPos + 0][sblock][Encoder.BLKSIZE_s / 2 - j];\n var im = wsamp_s[wsamp_sPos + 0][sblock][Encoder.BLKSIZE_s / 2 + j];\n fftenergy_s[sblock][Encoder.BLKSIZE_s / 2 - j] = NON_LINEAR_SCALE_ENERGY((re\n * re + im * im) * 0.5);\n }\n }\n\n /**\n * compute loudness approximation (used for ATH auto-level adjustment)\n */\n function vbrpsy_compute_loudness_approximation_l(gfp, gr_out, chn, fftenergy) {\n var gfc = gfp.internal_flags;\n if (gfp.athaa_loudapprox == 2 && chn < 2) {\n // no loudness for mid/side ch\n gfc.loudness_sq[gr_out][chn] = gfc.loudness_sq_save[chn];\n gfc.loudness_sq_save[chn] = psycho_loudness_approx(fftenergy, gfc);\n }\n }\n\n var fircoef_ = [-8.65163e-18 * 2,\n -0.00851586 * 2, -6.74764e-18 * 2, 0.0209036 * 2,\n -3.36639e-17 * 2, -0.0438162 * 2, -1.54175e-17 * 2,\n 0.0931738 * 2, -5.52212e-17 * 2, -0.313819 * 2];\n\n /**\n * Apply HPF of fs/4 to the input signal. This is used for attack detection\n * / handling.\n */\n function vbrpsy_attack_detection(gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, energy, sub_short_factor, ns_attacks, uselongblock) {\n var ns_hpfsmpl = new_float_n([2, 576]);\n var gfc = gfp.internal_flags;\n var n_chn_out = gfc.channels_out;\n /* chn=2 and 3 = Mid and Side channels */\n var n_chn_psy = (gfp.mode == MPEGMode.JOINT_STEREO) ? 4 : n_chn_out;\n /* Don't copy the input buffer into a temporary buffer */\n /* unroll the loop 2 times */\n for (var chn = 0; chn < n_chn_out; chn++) {\n /* apply high pass filter of fs/4 */\n firbuf = buffer[chn];\n var firbufPos = bufPos + 576 - 350 - NSFIRLEN + 192;\n assert(fircoef_.length == ((NSFIRLEN - 1) / 2));\n for (var i = 0; i < 576; i++) {\n var sum1, sum2;\n sum1 = firbuf[firbufPos + i + 10];\n sum2 = 0.0;\n for (var j = 0; j < ((NSFIRLEN - 1) / 2) - 1; j += 2) {\n sum1 += fircoef_[j]\n * (firbuf[firbufPos + i + j] + firbuf[firbufPos + i\n + NSFIRLEN - j]);\n sum2 += fircoef_[j + 1]\n * (firbuf[firbufPos + i + j + 1] + firbuf[firbufPos\n + i + NSFIRLEN - j - 1]);\n }\n ns_hpfsmpl[chn][i] = sum1 + sum2;\n }\n masking_ratio[gr_out][chn].en.assign(gfc.en[chn]);\n masking_ratio[gr_out][chn].thm.assign(gfc.thm[chn]);\n if (n_chn_psy > 2) {\n /* MS maskings */\n /* percep_MS_entropy [chn-2] = gfc . pe [chn]; */\n masking_MS_ratio[gr_out][chn].en.assign(gfc.en[chn + 2]);\n masking_MS_ratio[gr_out][chn].thm.assign(gfc.thm[chn + 2]);\n }\n }\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var attack_intensity = new_float(12);\n var en_subshort = new_float(12);\n var en_short = [0, 0, 0, 0];\n var pf = ns_hpfsmpl[chn & 1];\n var pfPos = 0;\n var attackThreshold = (chn == 3) ? gfc.nsPsy.attackthre_s\n : gfc.nsPsy.attackthre;\n var ns_uselongblock = 1;\n\n if (chn == 2) {\n for (var i = 0, j = 576; j > 0; ++i, --j) {\n var l = ns_hpfsmpl[0][i];\n var r = ns_hpfsmpl[1][i];\n ns_hpfsmpl[0][i] = l + r;\n ns_hpfsmpl[1][i] = l - r;\n }\n }\n /***************************************************************\n * determine the block type (window type)\n ***************************************************************/\n /* calculate energies of each sub-shortblocks */\n for (var i = 0; i < 3; i++) {\n en_subshort[i] = gfc.nsPsy.last_en_subshort[chn][i + 6];\n assert(gfc.nsPsy.last_en_subshort[chn][i + 4] > 0);\n attack_intensity[i] = en_subshort[i]\n / gfc.nsPsy.last_en_subshort[chn][i + 4];\n en_short[0] += en_subshort[i];\n }\n\n for (var i = 0; i < 9; i++) {\n var pfe = pfPos + 576 / 9;\n var p = 1.;\n for (; pfPos < pfe; pfPos++)\n if (p < Math.abs(pf[pfPos]))\n p = Math.abs(pf[pfPos]);\n\n gfc.nsPsy.last_en_subshort[chn][i] = en_subshort[i + 3] = p;\n en_short[1 + i / 3] += p;\n if (p > en_subshort[i + 3 - 2]) {\n assert(en_subshort[i + 3 - 2] > 0);\n p = p / en_subshort[i + 3 - 2];\n } else if (en_subshort[i + 3 - 2] > p * 10.0) {\n assert(p > 0);\n p = en_subshort[i + 3 - 2] / (p * 10.0);\n } else {\n p = 0.0;\n }\n attack_intensity[i + 3] = p;\n }\n /* pulse like signal detection for fatboy.wav and so on */\n for (var i = 0; i < 3; ++i) {\n var enn = en_subshort[i * 3 + 3]\n + en_subshort[i * 3 + 4] + en_subshort[i * 3 + 5];\n var factor = 1.;\n if (en_subshort[i * 3 + 5] * 6 < enn) {\n factor *= 0.5;\n if (en_subshort[i * 3 + 4] * 6 < enn) {\n factor *= 0.5;\n }\n }\n sub_short_factor[chn][i] = factor;\n }\n\n if (gfp.analysis) {\n var x = attack_intensity[0];\n for (var i = 1; i < 12; i++) {\n if (x < attack_intensity[i]) {\n x = attack_intensity[i];\n }\n }\n gfc.pinfo.ers[gr_out][chn] = gfc.pinfo.ers_save[chn];\n gfc.pinfo.ers_save[chn] = x;\n }\n\n /* compare energies between sub-shortblocks */\n for (var i = 0; i < 12; i++) {\n if (0 == ns_attacks[chn][i / 3]\n && attack_intensity[i] > attackThreshold) {\n ns_attacks[chn][i / 3] = (i % 3) + 1;\n }\n }\n\n /*\n * should have energy change between short blocks, in order to avoid\n * periodic signals\n */\n /* Good samples to show the effect are Trumpet test songs */\n /*\n * GB: tuned (1) to avoid too many short blocks for test sample\n * TRUMPET\n */\n /*\n * RH: tuned (2) to let enough short blocks through for test sample\n * FSOL and SNAPS\n */\n for (var i = 1; i < 4; i++) {\n var u = en_short[i - 1];\n var v = en_short[i];\n var m = Math.max(u, v);\n if (m < 40000) { /* (2) */\n if (u < 1.7 * v && v < 1.7 * u) { /* (1) */\n if (i == 1 && ns_attacks[chn][0] <= ns_attacks[chn][i]) {\n ns_attacks[chn][0] = 0;\n }\n ns_attacks[chn][i] = 0;\n }\n }\n }\n\n if (ns_attacks[chn][0] <= gfc.nsPsy.lastAttacks[chn]) {\n ns_attacks[chn][0] = 0;\n }\n\n if (gfc.nsPsy.lastAttacks[chn] == 3\n || (ns_attacks[chn][0] + ns_attacks[chn][1]\n + ns_attacks[chn][2] + ns_attacks[chn][3]) != 0) {\n ns_uselongblock = 0;\n\n if (ns_attacks[chn][1] != 0 && ns_attacks[chn][0] != 0) {\n ns_attacks[chn][1] = 0;\n }\n if (ns_attacks[chn][2] != 0 && ns_attacks[chn][1] != 0) {\n ns_attacks[chn][2] = 0;\n }\n if (ns_attacks[chn][3] != 0 && ns_attacks[chn][2] != 0) {\n ns_attacks[chn][3] = 0;\n }\n }\n if (chn < 2) {\n uselongblock[chn] = ns_uselongblock;\n } else {\n if (ns_uselongblock == 0) {\n uselongblock[0] = uselongblock[1] = 0;\n }\n }\n\n /*\n * there is a one granule delay. Copy maskings computed last call\n * into masking_ratio to return to calling program.\n */\n energy[chn] = gfc.tot_ener[chn];\n }\n }\n\n function vbrpsy_skip_masking_s(gfc, chn, sblock) {\n if (sblock == 0) {\n for (var b = 0; b < gfc.npart_s; b++) {\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = 0;\n }\n }\n }\n\n function vbrpsy_skip_masking_l(gfc, chn) {\n for (var b = 0; b < gfc.npart_l; b++) {\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = 0;\n }\n }\n\n function psyvbr_calc_mask_index_s(gfc, max, avg, mask_idx) {\n var last_tab_entry = tab.length - 1;\n var b = 0;\n var a = avg[b] + avg[b + 1];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n\n for (b = 1; b < gfc.npart_s - 1; b++) {\n a = avg[b - 1] + avg[b] + avg[b + 1];\n assert(b + 1 < gfc.npart_s);\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n if (m < max[b + 1])\n m = max[b + 1];\n assert((gfc.numlines_s[b - 1] + gfc.numlines_s[b] + gfc.numlines_s[b + 1] - 1) > 0);\n a = 20.0\n * (m * 3.0 - a)\n / (a * (gfc.numlines_s[b - 1] + gfc.numlines_s[b]\n + gfc.numlines_s[b + 1] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n }\n assert(b > 0);\n assert(b == gfc.npart_s - 1);\n\n a = avg[b - 1] + avg[b];\n assert(a >= 0);\n if (a > 0.0) {\n var m = max[b - 1];\n if (m < max[b])\n m = max[b];\n assert((gfc.numlines_s[b - 1] + gfc.numlines_s[b] - 1) > 0);\n a = 20.0 * (m * 2.0 - a)\n / (a * (gfc.numlines_s[b - 1] + gfc.numlines_s[b] - 1));\n var k = 0 | a;\n if (k > last_tab_entry)\n k = last_tab_entry;\n mask_idx[b] = k;\n } else {\n mask_idx[b] = 0;\n }\n assert(b == (gfc.npart_s - 1));\n }\n\n function vbrpsy_compute_masking_s(gfp, fftenergy_s, eb, thr, chn, sblock) {\n var gfc = gfp.internal_flags;\n var max = new float[Encoder.CBANDS], avg = new_float(Encoder.CBANDS);\n var i, j, b;\n var mask_idx_s = new int[Encoder.CBANDS];\n\n for (b = j = 0; b < gfc.npart_s; ++b) {\n var ebb = 0, m = 0;\n var n = gfc.numlines_s[b];\n for (i = 0; i < n; ++i, ++j) {\n var el = fftenergy_s[sblock][j];\n ebb += el;\n if (m < el)\n m = el;\n }\n eb[b] = ebb;\n assert(ebb >= 0);\n max[b] = m;\n assert(n > 0);\n avg[b] = ebb / n;\n assert(avg[b] >= 0);\n }\n assert(b == gfc.npart_s);\n assert(j == 129);\n for (; b < Encoder.CBANDS; ++b) {\n max[b] = 0;\n avg[b] = 0;\n }\n psyvbr_calc_mask_index_s(gfc, max, avg, mask_idx_s);\n for (j = b = 0; b < gfc.npart_s; b++) {\n var kk = gfc.s3ind_s[b][0];\n var last = gfc.s3ind_s[b][1];\n var dd, dd_n;\n var x, ecb, avg_mask;\n dd = mask_idx_s[kk];\n dd_n = 1;\n ecb = gfc.s3_ss[j] * eb[kk] * tab[mask_idx_s[kk]];\n ++j;\n ++kk;\n while (kk <= last) {\n dd += mask_idx_s[kk];\n dd_n += 1;\n x = gfc.s3_ss[j] * eb[kk] * tab[mask_idx_s[kk]];\n ecb = vbrpsy_mask_add(ecb, x, kk - b);\n ++j;\n ++kk;\n }\n dd = (1 + 2 * dd) / (2 * dd_n);\n avg_mask = tab[dd] * 0.5;\n ecb *= avg_mask;\n thr[b] = ecb;\n gfc.nb_s2[chn][b] = gfc.nb_s1[chn][b];\n gfc.nb_s1[chn][b] = ecb;\n {\n /*\n * if THR exceeds EB, the quantization routines will take the\n * difference from other bands. in case of strong tonal samples\n * (tonaltest.wav) this leads to heavy distortions. that's why\n * we limit THR here.\n */\n x = max[b];\n x *= gfc.minval_s[b];\n x *= avg_mask;\n if (thr[b] > x) {\n thr[b] = x;\n }\n }\n if (gfc.masking_lower > 1) {\n thr[b] *= gfc.masking_lower;\n }\n if (thr[b] > eb[b]) {\n thr[b] = eb[b];\n }\n if (gfc.masking_lower < 1) {\n thr[b] *= gfc.masking_lower;\n }\n\n assert(thr[b] >= 0);\n }\n for (; b < Encoder.CBANDS; ++b) {\n eb[b] = 0;\n thr[b] = 0;\n }\n }\n\n function vbrpsy_compute_masking_l(gfc, fftenergy, eb_l, thr, chn) {\n var max = new_float(Encoder.CBANDS), avg = new_float(Encoder.CBANDS);\n var mask_idx_l = new_int(Encoder.CBANDS + 2);\n var b;\n\n /*********************************************************************\n * Calculate the energy and the tonality of each partition.\n *********************************************************************/\n calc_energy(gfc, fftenergy, eb_l, max, avg);\n calc_mask_index_l(gfc, max, avg, mask_idx_l);\n\n /*********************************************************************\n * convolve the partitioned energy and unpredictability with the\n * spreading function, s3_l[b][k]\n ********************************************************************/\n var k = 0;\n for (b = 0; b < gfc.npart_l; b++) {\n var x, ecb, avg_mask, t;\n /* convolve the partitioned energy with the spreading function */\n var kk = gfc.s3ind[b][0];\n var last = gfc.s3ind[b][1];\n var dd = 0, dd_n = 0;\n dd = mask_idx_l[kk];\n dd_n += 1;\n ecb = gfc.s3_ll[k] * eb_l[kk] * tab[mask_idx_l[kk]];\n ++k;\n ++kk;\n while (kk <= last) {\n dd += mask_idx_l[kk];\n dd_n += 1;\n x = gfc.s3_ll[k] * eb_l[kk] * tab[mask_idx_l[kk]];\n t = vbrpsy_mask_add(ecb, x, kk - b);\n ecb = t;\n ++k;\n ++kk;\n }\n dd = (1 + 2 * dd) / (2 * dd_n);\n avg_mask = tab[dd] * 0.5;\n ecb *= avg_mask;\n\n /**** long block pre-echo control ****/\n /**\n *
\n             * dont use long block pre-echo control if previous granule was\n             * a short block.  This is to avoid the situation:\n             * frame0:  quiet (very low masking)\n             * frame1:  surge  (triggers short blocks)\n             * frame2:  regular frame.  looks like pre-echo when compared to\n             *          frame0, but all pre-echo was in frame1.\n             * 
\n */\n /*\n * chn=0,1 L and R channels chn=2,3 S and M channels.\n */\n if (gfc.blocktype_old[chn & 0x01] == Encoder.SHORT_TYPE) {\n var ecb_limit = rpelev * gfc.nb_1[chn][b];\n if (ecb_limit > 0) {\n thr[b] = Math.min(ecb, ecb_limit);\n } else {\n /**\n *
\n                     * Robert 071209:\n                     * Because we don't calculate long block psy when we know a granule\n                     * should be of short blocks, we don't have any clue how the granule\n                     * before would have looked like as a long block. So we have to guess\n                     * a little bit for this END_TYPE block.\n                     * Most of the time we get away with this sloppyness. (fingers crossed :)\n                     * The speed increase is worth it.\n                     * 
\n */\n thr[b] = Math.min(ecb, eb_l[b] * NS_PREECHO_ATT2);\n }\n } else {\n var ecb_limit_2 = rpelev2 * gfc.nb_2[chn][b];\n var ecb_limit_1 = rpelev * gfc.nb_1[chn][b];\n var ecb_limit;\n if (ecb_limit_2 <= 0) {\n ecb_limit_2 = ecb;\n }\n if (ecb_limit_1 <= 0) {\n ecb_limit_1 = ecb;\n }\n if (gfc.blocktype_old[chn & 0x01] == Encoder.NORM_TYPE) {\n ecb_limit = Math.min(ecb_limit_1, ecb_limit_2);\n } else {\n ecb_limit = ecb_limit_1;\n }\n thr[b] = Math.min(ecb, ecb_limit);\n }\n gfc.nb_2[chn][b] = gfc.nb_1[chn][b];\n gfc.nb_1[chn][b] = ecb;\n {\n /*\n * if THR exceeds EB, the quantization routines will take the\n * difference from other bands. in case of strong tonal samples\n * (tonaltest.wav) this leads to heavy distortions. that's why\n * we limit THR here.\n */\n x = max[b];\n x *= gfc.minval_l[b];\n x *= avg_mask;\n if (thr[b] > x) {\n thr[b] = x;\n }\n }\n if (gfc.masking_lower > 1) {\n thr[b] *= gfc.masking_lower;\n }\n if (thr[b] > eb_l[b]) {\n thr[b] = eb_l[b];\n }\n if (gfc.masking_lower < 1) {\n thr[b] *= gfc.masking_lower;\n }\n assert(thr[b] >= 0);\n }\n for (; b < Encoder.CBANDS; ++b) {\n eb_l[b] = 0;\n thr[b] = 0;\n }\n }\n\n function vbrpsy_compute_block_type(gfp, uselongblock) {\n var gfc = gfp.internal_flags;\n\n if (gfp.short_blocks == ShortBlock.short_block_coupled\n /* force both channels to use the same block type */\n /* this is necessary if the frame is to be encoded in ms_stereo. */\n /* But even without ms_stereo, FhG does this */\n && !(uselongblock[0] != 0 && uselongblock[1] != 0))\n uselongblock[0] = uselongblock[1] = 0;\n\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n /* disable short blocks */\n if (gfp.short_blocks == ShortBlock.short_block_dispensed) {\n uselongblock[chn] = 1;\n }\n if (gfp.short_blocks == ShortBlock.short_block_forced) {\n uselongblock[chn] = 0;\n }\n }\n }\n\n function vbrpsy_apply_block_type(gfp, uselongblock, blocktype_d) {\n var gfc = gfp.internal_flags;\n\n /*\n * update the blocktype of the previous granule, since it depends on\n * what happend in this granule\n */\n for (var chn = 0; chn < gfc.channels_out; chn++) {\n var blocktype = Encoder.NORM_TYPE;\n /* disable short blocks */\n\n if (uselongblock[chn] != 0) {\n /* no attack : use long blocks */\n assert(gfc.blocktype_old[chn] != Encoder.START_TYPE);\n if (gfc.blocktype_old[chn] == Encoder.SHORT_TYPE)\n blocktype = Encoder.STOP_TYPE;\n } else {\n /* attack : use short blocks */\n blocktype = Encoder.SHORT_TYPE;\n if (gfc.blocktype_old[chn] == Encoder.NORM_TYPE) {\n gfc.blocktype_old[chn] = Encoder.START_TYPE;\n }\n if (gfc.blocktype_old[chn] == Encoder.STOP_TYPE)\n gfc.blocktype_old[chn] = Encoder.SHORT_TYPE;\n }\n\n blocktype_d[chn] = gfc.blocktype_old[chn];\n // value returned to calling program\n gfc.blocktype_old[chn] = blocktype;\n // save for next call to l3psy_anal\n }\n }\n\n /**\n * compute M/S thresholds from Johnston & Ferreira 1992 ICASSP paper\n */\n function vbrpsy_compute_MS_thresholds(eb, thr, cb_mld, ath_cb, athadjust, msfix, n) {\n var msfix2 = msfix * 2;\n var athlower = msfix > 0 ? Math.pow(10, athadjust) : 1;\n var rside, rmid;\n for (var b = 0; b < n; ++b) {\n var ebM = eb[2][b];\n var ebS = eb[3][b];\n var thmL = thr[0][b];\n var thmR = thr[1][b];\n var thmM = thr[2][b];\n var thmS = thr[3][b];\n\n /* use this fix if L & R masking differs by 2db or less */\n if (thmL <= 1.58 * thmR && thmR <= 1.58 * thmL) {\n var mld_m = cb_mld[b] * ebS;\n var mld_s = cb_mld[b] * ebM;\n rmid = Math.max(thmM, Math.min(thmS, mld_m));\n rside = Math.max(thmS, Math.min(thmM, mld_s));\n } else {\n rmid = thmM;\n rside = thmS;\n }\n if (msfix > 0) {\n /***************************************************************/\n /* Adjust M/S maskings if user set \"msfix\" */\n /***************************************************************/\n /* Naoki Shibata 2000 */\n var thmLR, thmMS;\n var ath = ath_cb[b] * athlower;\n thmLR = Math.min(Math.max(thmL, ath), Math.max(thmR, ath));\n thmM = Math.max(rmid, ath);\n thmS = Math.max(rside, ath);\n thmMS = thmM + thmS;\n if (thmMS > 0 && (thmLR * msfix2) < thmMS) {\n var f = thmLR * msfix2 / thmMS;\n thmM *= f;\n thmS *= f;\n assert(thmMS > 0);\n }\n rmid = Math.min(thmM, rmid);\n rside = Math.min(thmS, rside);\n }\n if (rmid > ebM) {\n rmid = ebM;\n }\n if (rside > ebS) {\n rside = ebS;\n }\n thr[2][b] = rmid;\n thr[3][b] = rside;\n }\n }\n\n this.L3psycho_anal_vbr = function (gfp, buffer, bufPos, gr_out, masking_ratio, masking_MS_ratio, percep_entropy, percep_MS_entropy, energy, blocktype_d) {\n var gfc = gfp.internal_flags;\n\n /* fft and energy calculation */\n var wsamp_l;\n var wsamp_s;\n var fftenergy = new_float(Encoder.HBLKSIZE);\n var fftenergy_s = new_float_n([3, Encoder.HBLKSIZE_s]);\n var wsamp_L = new_float_n([2, Encoder.BLKSIZE]);\n var wsamp_S = new_float_n([2, 3, Encoder.BLKSIZE_s]);\n var eb = new_float_n([4, Encoder.CBANDS]), thr = new_float_n([4, Encoder.CBANDS]);\n var sub_short_factor = new_float_n([4, 3]);\n var pcfact = 0.6;\n\n /* block type */\n var ns_attacks = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0],\n [0, 0, 0, 0]];\n var uselongblock = new_int(2);\n\n /* usual variables like loop indices, etc.. */\n\n /* chn=2 and 3 = Mid and Side channels */\n var n_chn_psy = (gfp.mode == MPEGMode.JOINT_STEREO) ? 4\n : gfc.channels_out;\n\n vbrpsy_attack_detection(gfp, buffer, bufPos, gr_out, masking_ratio,\n masking_MS_ratio, energy, sub_short_factor, ns_attacks,\n uselongblock);\n\n vbrpsy_compute_block_type(gfp, uselongblock);\n\n /* LONG BLOCK CASE */\n {\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n wsamp_l = wsamp_L;\n vbrpsy_compute_fft_l(gfp, buffer, bufPos, chn, gr_out,\n fftenergy, wsamp_l, ch01);\n\n vbrpsy_compute_loudness_approximation_l(gfp, gr_out, chn,\n fftenergy);\n\n if (uselongblock[ch01] != 0) {\n vbrpsy_compute_masking_l(gfc, fftenergy, eb[chn], thr[chn],\n chn);\n } else {\n vbrpsy_skip_masking_l(gfc, chn);\n }\n }\n if ((uselongblock[0] + uselongblock[1]) == 2) {\n /* M/S channel */\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n vbrpsy_compute_MS_thresholds(eb, thr, gfc.mld_cb_l,\n gfc.ATH.cb_l, gfp.ATHlower * gfc.ATH.adjust,\n gfp.msfix, gfc.npart_l);\n }\n }\n /* TODO: apply adaptive ATH masking here ?? */\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n if (uselongblock[ch01] != 0) {\n convert_partition2scalefac_l(gfc, eb[chn], thr[chn], chn);\n }\n }\n }\n\n /* SHORT BLOCKS CASE */\n {\n for (var sblock = 0; sblock < 3; sblock++) {\n for (var chn = 0; chn < n_chn_psy; ++chn) {\n var ch01 = chn & 0x01;\n\n if (uselongblock[ch01] != 0) {\n vbrpsy_skip_masking_s(gfc, chn, sblock);\n } else {\n /* compute masking thresholds for short blocks */\n wsamp_s = wsamp_S;\n vbrpsy_compute_fft_s(gfp, buffer, bufPos, chn, sblock,\n fftenergy_s, wsamp_s, ch01);\n vbrpsy_compute_masking_s(gfp, fftenergy_s, eb[chn],\n thr[chn], chn, sblock);\n }\n }\n if ((uselongblock[0] + uselongblock[1]) == 0) {\n /* M/S channel */\n if (gfp.mode == MPEGMode.JOINT_STEREO) {\n vbrpsy_compute_MS_thresholds(eb, thr, gfc.mld_cb_s,\n gfc.ATH.cb_s, gfp.ATHlower * gfc.ATH.adjust,\n gfp.msfix, gfc.npart_s);\n }\n /* L/R channel */\n }\n /* TODO: apply adaptive ATH masking here ?? */\n for (var chn = 0; chn < n_chn_psy; ++chn) {\n var ch01 = chn & 0x01;\n if (0 == uselongblock[ch01]) {\n convert_partition2scalefac_s(gfc, eb[chn], thr[chn],\n chn, sblock);\n }\n }\n }\n\n /**** short block pre-echo control ****/\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ch01 = chn & 0x01;\n\n if (uselongblock[ch01] != 0) {\n continue;\n }\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n var new_thmm = new_float(3);\n for (var sblock = 0; sblock < 3; sblock++) {\n var thmm = gfc.thm[chn].s[sb][sblock];\n thmm *= NS_PREECHO_ATT0;\n\n if (ns_attacks[chn][sblock] >= 2\n || ns_attacks[chn][sblock + 1] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT1 * pcfact);\n thmm = Math.min(thmm, p);\n } else if (ns_attacks[chn][sblock] == 1) {\n var idx = (sblock != 0) ? sblock - 1 : 2;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n } else if ((sblock != 0 && ns_attacks[chn][sblock - 1] == 3)\n || (sblock == 0 && gfc.nsPsy.lastAttacks[chn] == 3)) {\n var idx = (sblock != 2) ? sblock + 1 : 0;\n var p = NS_INTERP(gfc.thm[chn].s[sb][idx], thmm,\n NS_PREECHO_ATT2 * pcfact);\n thmm = Math.min(thmm, p);\n }\n\n /* pulse like signal detection for fatboy.wav and so on */\n thmm *= sub_short_factor[chn][sblock];\n\n new_thmm[sblock] = thmm;\n }\n for (var sblock = 0; sblock < 3; sblock++) {\n gfc.thm[chn].s[sb][sblock] = new_thmm[sblock];\n }\n }\n }\n }\n for (var chn = 0; chn < n_chn_psy; chn++) {\n gfc.nsPsy.lastAttacks[chn] = ns_attacks[chn][2];\n }\n\n /***************************************************************\n * determine final block type\n ***************************************************************/\n vbrpsy_apply_block_type(gfp, uselongblock, blocktype_d);\n\n /*********************************************************************\n * compute the value of PE to return ... no delay and advance\n *********************************************************************/\n for (var chn = 0; chn < n_chn_psy; chn++) {\n var ppe;\n var ppePos;\n var type;\n var mr;\n\n if (chn > 1) {\n ppe = percep_MS_entropy;\n ppePos = -2;\n type = Encoder.NORM_TYPE;\n if (blocktype_d[0] == Encoder.SHORT_TYPE\n || blocktype_d[1] == Encoder.SHORT_TYPE)\n type = Encoder.SHORT_TYPE;\n mr = masking_MS_ratio[gr_out][chn - 2];\n } else {\n ppe = percep_entropy;\n ppePos = 0;\n type = blocktype_d[chn];\n mr = masking_ratio[gr_out][chn];\n }\n\n if (type == Encoder.SHORT_TYPE) {\n ppe[ppePos + chn] = pecalc_s(mr, gfc.masking_lower);\n } else {\n ppe[ppePos + chn] = pecalc_l(mr, gfc.masking_lower);\n }\n\n if (gfp.analysis) {\n gfc.pinfo.pe[gr_out][chn] = ppe[ppePos + chn];\n }\n }\n return 0;\n }\n\n function s3_func_x(bark, hf_slope) {\n var tempx = bark, tempy;\n\n if (tempx >= 0) {\n tempy = -tempx * 27;\n } else {\n tempy = tempx * hf_slope;\n }\n if (tempy <= -72.0) {\n return 0;\n }\n return Math.exp(tempy * LN_TO_LOG10);\n }\n\n function norm_s3_func_x(hf_slope) {\n var lim_a = 0, lim_b = 0;\n {\n var x = 0, l, h;\n for (x = 0; s3_func_x(x, hf_slope) > 1e-20; x -= 1)\n ;\n l = x;\n h = 0;\n while (Math.abs(h - l) > 1e-12) {\n x = (h + l) / 2;\n if (s3_func_x(x, hf_slope) > 0) {\n h = x;\n } else {\n l = x;\n }\n }\n lim_a = l;\n }\n {\n var x = 0, l, h;\n for (x = 0; s3_func_x(x, hf_slope) > 1e-20; x += 1)\n ;\n l = 0;\n h = x;\n while (Math.abs(h - l) > 1e-12) {\n x = (h + l) / 2;\n if (s3_func_x(x, hf_slope) > 0) {\n l = x;\n } else {\n h = x;\n }\n }\n lim_b = h;\n }\n {\n var sum = 0;\n var m = 1000;\n var i;\n for (i = 0; i <= m; ++i) {\n var x = lim_a + i * (lim_b - lim_a) / m;\n var y = s3_func_x(x, hf_slope);\n sum += y;\n }\n {\n var norm = (m + 1) / (sum * (lim_b - lim_a));\n /* printf( \"norm = %lf\\n\",norm); */\n return norm;\n }\n }\n }\n\n /**\n * The spreading function. Values returned in units of energy\n */\n function s3_func(bark) {\n var tempx, x, tempy, temp;\n tempx = bark;\n if (tempx >= 0)\n tempx *= 3;\n else\n tempx *= 1.5;\n\n if (tempx >= 0.5 && tempx <= 2.5) {\n temp = tempx - 0.5;\n x = 8.0 * (temp * temp - 2.0 * temp);\n } else\n x = 0.0;\n tempx += 0.474;\n tempy = 15.811389 + 7.5 * tempx - 17.5\n * Math.sqrt(1.0 + tempx * tempx);\n\n if (tempy <= -60.0)\n return 0.0;\n\n tempx = Math.exp((x + tempy) * LN_TO_LOG10);\n\n /**\n *
\n         * Normalization.  The spreading function should be normalized so that:\n         * +inf\n         * /\n         * |  s3 [ bark ]  d(bark)   =  1\n         * /\n         * -inf\n         * 
\n */\n tempx /= .6609193;\n return tempx;\n }\n\n /**\n * see for example \"Zwicker: Psychoakustik, 1982; ISBN 3-540-11401-7\n */\n function freq2bark(freq) {\n /* input: freq in hz output: barks */\n if (freq < 0)\n freq = 0;\n freq = freq * 0.001;\n return 13.0 * Math.atan(.76 * freq) + 3.5\n * Math.atan(freq * freq / (7.5 * 7.5));\n }\n\n function init_numline(numlines, bo, bm, bval, bval_width, mld, bo_w, sfreq, blksize, scalepos, deltafreq, sbmax) {\n var b_frq = new_float(Encoder.CBANDS + 1);\n var sample_freq_frac = sfreq / (sbmax > 15 ? 2 * 576 : 2 * 192);\n var partition = new_int(Encoder.HBLKSIZE);\n var i;\n sfreq /= blksize;\n var j = 0;\n var ni = 0;\n /* compute numlines, the number of spectral lines in each partition band */\n /* each partition band should be about DELBARK wide. */\n for (i = 0; i < Encoder.CBANDS; i++) {\n var bark1;\n var j2;\n bark1 = freq2bark(sfreq * j);\n\n b_frq[i] = sfreq * j;\n\n for (j2 = j; freq2bark(sfreq * j2) - bark1 < DELBARK\n && j2 <= blksize / 2; j2++)\n ;\n\n numlines[i] = j2 - j;\n ni = i + 1;\n\n while (j < j2) {\n assert(j < Encoder.HBLKSIZE);\n partition[j++] = i;\n }\n if (j > blksize / 2) {\n j = blksize / 2;\n ++i;\n break;\n }\n }\n assert(i < Encoder.CBANDS);\n b_frq[i] = sfreq * j;\n\n for (var sfb = 0; sfb < sbmax; sfb++) {\n var i1, i2, start, end;\n var arg;\n start = scalepos[sfb];\n end = scalepos[sfb + 1];\n\n i1 = 0 | Math.floor(.5 + deltafreq * (start - .5));\n if (i1 < 0)\n i1 = 0;\n i2 = 0 | Math.floor(.5 + deltafreq * (end - .5));\n\n if (i2 > blksize / 2)\n i2 = blksize / 2;\n\n bm[sfb] = (partition[i1] + partition[i2]) / 2;\n bo[sfb] = partition[i2];\n var f_tmp = sample_freq_frac * end;\n /*\n * calculate how much of this band belongs to current scalefactor\n * band\n */\n bo_w[sfb] = (f_tmp - b_frq[bo[sfb]])\n / (b_frq[bo[sfb] + 1] - b_frq[bo[sfb]]);\n if (bo_w[sfb] < 0) {\n bo_w[sfb] = 0;\n } else {\n if (bo_w[sfb] > 1) {\n bo_w[sfb] = 1;\n }\n }\n /* setup stereo demasking thresholds */\n /* formula reverse enginerred from plot in paper */\n arg = freq2bark(sfreq * scalepos[sfb] * deltafreq);\n arg = ( Math.min(arg, 15.5) / 15.5);\n\n mld[sfb] = Math.pow(10.0,\n 1.25 * (1 - Math.cos(Math.PI * arg)) - 2.5);\n }\n\n /* compute bark values of each critical band */\n j = 0;\n for (var k = 0; k < ni; k++) {\n var w = numlines[k];\n var bark1, bark2;\n\n bark1 = freq2bark(sfreq * (j));\n bark2 = freq2bark(sfreq * (j + w - 1));\n bval[k] = .5 * (bark1 + bark2);\n\n bark1 = freq2bark(sfreq * (j - .5));\n bark2 = freq2bark(sfreq * (j + w - .5));\n bval_width[k] = bark2 - bark1;\n j += w;\n }\n\n return ni;\n }\n\n function init_s3_values(s3ind, npart, bval, bval_width, norm, use_old_s3) {\n var s3 = new_float_n([Encoder.CBANDS, Encoder.CBANDS]);\n /*\n * The s3 array is not linear in the bark scale.\n *\n * bval[x] should be used to get the bark value.\n */\n var j;\n var numberOfNoneZero = 0;\n\n /**\n *
\n         * s[i][j], the value of the spreading function,\n         * centered at band j (masker), for band i (maskee)\n         *\n         * i.e.: sum over j to spread into signal barkval=i\n         * NOTE: i and j are used opposite as in the ISO docs\n         * 
\n */\n if (use_old_s3) {\n for (var i = 0; i < npart; i++) {\n for (j = 0; j < npart; j++) {\n var v = s3_func(bval[i] - bval[j]) * bval_width[j];\n s3[i][j] = v * norm[i];\n }\n }\n } else {\n for (j = 0; j < npart; j++) {\n var hf_slope = 15 + Math.min(21 / bval[j], 12);\n var s3_x_norm = norm_s3_func_x(hf_slope);\n for (var i = 0; i < npart; i++) {\n var v = s3_x_norm\n * s3_func_x(bval[i] - bval[j], hf_slope)\n * bval_width[j];\n s3[i][j] = v * norm[i];\n }\n }\n }\n for (var i = 0; i < npart; i++) {\n for (j = 0; j < npart; j++) {\n if (s3[i][j] > 0.0)\n break;\n }\n s3ind[i][0] = j;\n\n for (j = npart - 1; j > 0; j--) {\n if (s3[i][j] > 0.0)\n break;\n }\n s3ind[i][1] = j;\n numberOfNoneZero += (s3ind[i][1] - s3ind[i][0] + 1);\n }\n\n var p = new_float(numberOfNoneZero);\n var k = 0;\n for (var i = 0; i < npart; i++)\n for (j = s3ind[i][0]; j <= s3ind[i][1]; j++)\n p[k++] = s3[i][j];\n\n return p;\n }\n\n function stereo_demask(f) {\n /* setup stereo demasking thresholds */\n /* formula reverse enginerred from plot in paper */\n var arg = freq2bark(f);\n arg = (Math.min(arg, 15.5) / 15.5);\n\n return Math.pow(10.0,\n 1.25 * (1 - Math.cos(Math.PI * arg)) - 2.5);\n }\n\n /**\n * NOTE: the bitrate reduction from the inter-channel masking effect is low\n * compared to the chance of getting annyoing artefacts. L3psycho_anal_vbr\n * does not use this feature. (Robert 071216)\n */\n this.psymodel_init = function (gfp) {\n var gfc = gfp.internal_flags;\n var i;\n var useOldS3 = true;\n var bvl_a = 13, bvl_b = 24;\n var snr_l_a = 0, snr_l_b = 0;\n var snr_s_a = -8.25, snr_s_b = -4.5;\n var bval = new_float(Encoder.CBANDS);\n var bval_width = new_float(Encoder.CBANDS);\n var norm = new_float(Encoder.CBANDS);\n var sfreq = gfp.out_samplerate;\n\n switch (gfp.experimentalZ) {\n default:\n case 0:\n useOldS3 = true;\n break;\n case 1:\n useOldS3 = (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) ? false\n : true;\n break;\n case 2:\n useOldS3 = false;\n break;\n case 3:\n bvl_a = 8;\n snr_l_a = -1.75;\n snr_l_b = -0.0125;\n snr_s_a = -8.25;\n snr_s_b = -2.25;\n break;\n }\n gfc.ms_ener_ratio_old = .25;\n gfc.blocktype_old[0] = gfc.blocktype_old[1] = Encoder.NORM_TYPE;\n // the vbr header is long blocks\n\n for (i = 0; i < 4; ++i) {\n for (var j = 0; j < Encoder.CBANDS; ++j) {\n gfc.nb_1[i][j] = 1e20;\n gfc.nb_2[i][j] = 1e20;\n gfc.nb_s1[i][j] = gfc.nb_s2[i][j] = 1.0;\n }\n for (var sb = 0; sb < Encoder.SBMAX_l; sb++) {\n gfc.en[i].l[sb] = 1e20;\n gfc.thm[i].l[sb] = 1e20;\n }\n for (var j = 0; j < 3; ++j) {\n for (var sb = 0; sb < Encoder.SBMAX_s; sb++) {\n gfc.en[i].s[sb][j] = 1e20;\n gfc.thm[i].s[sb][j] = 1e20;\n }\n gfc.nsPsy.lastAttacks[i] = 0;\n }\n for (var j = 0; j < 9; j++)\n gfc.nsPsy.last_en_subshort[i][j] = 10.;\n }\n\n /* init. for loudness approx. -jd 2001 mar 27 */\n gfc.loudness_sq_save[0] = gfc.loudness_sq_save[1] = 0.0;\n\n /*************************************************************************\n * now compute the psychoacoustic model specific constants\n ************************************************************************/\n /* compute numlines, bo, bm, bval, bval_width, mld */\n\n gfc.npart_l = init_numline(gfc.numlines_l, gfc.bo_l, gfc.bm_l, bval,\n bval_width, gfc.mld_l, gfc.PSY.bo_l_weight, sfreq,\n Encoder.BLKSIZE, gfc.scalefac_band.l, Encoder.BLKSIZE\n / (2.0 * 576), Encoder.SBMAX_l);\n assert(gfc.npart_l < Encoder.CBANDS);\n /* compute the spreading function */\n for (i = 0; i < gfc.npart_l; i++) {\n var snr = snr_l_a;\n if (bval[i] >= bvl_a) {\n snr = snr_l_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) + snr_l_a\n * (bvl_b - bval[i]) / (bvl_b - bvl_a);\n }\n norm[i] = Math.pow(10.0, snr / 10.0);\n if (gfc.numlines_l[i] > 0) {\n gfc.rnumlines_l[i] = 1.0 / gfc.numlines_l[i];\n } else {\n gfc.rnumlines_l[i] = 0;\n }\n }\n gfc.s3_ll = init_s3_values(gfc.s3ind, gfc.npart_l, bval, bval_width,\n norm, useOldS3);\n\n /* compute long block specific values, ATH and MINVAL */\n var j = 0;\n for (i = 0; i < gfc.npart_l; i++) {\n var x;\n\n /* ATH */\n x = Float.MAX_VALUE;\n for (var k = 0; k < gfc.numlines_l[i]; k++, j++) {\n var freq = sfreq * j / (1000.0 * Encoder.BLKSIZE);\n var level;\n /*\n * ATH below 100 Hz constant, not further climbing\n */\n level = this.ATHformula(freq * 1000, gfp) - 20;\n // scale to FFT units; returned value is in dB\n level = Math.pow(10., 0.1 * level);\n // convert from dB . energy\n level *= gfc.numlines_l[i];\n if (x > level)\n x = level;\n }\n gfc.ATH.cb_l[i] = x;\n\n /*\n * MINVAL. For low freq, the strength of the masking is limited by\n * minval this is an ISO MPEG1 thing, dont know if it is really\n * needed\n */\n /*\n * FIXME: it does work to reduce low-freq problems in S53-Wind-Sax\n * and lead-voice samples, but introduces some 3 kbps bit bloat too.\n * TODO: Further refinement of the shape of this hack.\n */\n x = -20 + bval[i] * 20 / 10;\n if (x > 6) {\n x = 100;\n }\n if (x < -15) {\n x = -15;\n }\n x -= 8.;\n gfc.minval_l[i] = (Math.pow(10.0, x / 10.) * gfc.numlines_l[i]);\n }\n\n /************************************************************************\n * do the same things for short blocks\n ************************************************************************/\n gfc.npart_s = init_numline(gfc.numlines_s, gfc.bo_s, gfc.bm_s, bval,\n bval_width, gfc.mld_s, gfc.PSY.bo_s_weight, sfreq,\n Encoder.BLKSIZE_s, gfc.scalefac_band.s, Encoder.BLKSIZE_s\n / (2.0 * 192), Encoder.SBMAX_s);\n assert(gfc.npart_s < Encoder.CBANDS);\n\n /* SNR formula. short block is normalized by SNR. is it still right ? */\n j = 0;\n for (i = 0; i < gfc.npart_s; i++) {\n var x;\n var snr = snr_s_a;\n if (bval[i] >= bvl_a) {\n snr = snr_s_b * (bval[i] - bvl_a) / (bvl_b - bvl_a) + snr_s_a\n * (bvl_b - bval[i]) / (bvl_b - bvl_a);\n }\n norm[i] = Math.pow(10.0, snr / 10.0);\n\n /* ATH */\n x = Float.MAX_VALUE;\n for (var k = 0; k < gfc.numlines_s[i]; k++, j++) {\n var freq = sfreq * j / (1000.0 * Encoder.BLKSIZE_s);\n var level;\n /* freq = Min(.1,freq); */\n /*\n * ATH below 100 Hz constant, not\n * further climbing\n */\n level = this.ATHformula(freq * 1000, gfp) - 20;\n // scale to FFT units; returned value is in dB\n level = Math.pow(10., 0.1 * level);\n // convert from dB . energy\n level *= gfc.numlines_s[i];\n if (x > level)\n x = level;\n }\n gfc.ATH.cb_s[i] = x;\n\n /*\n * MINVAL. For low freq, the strength of the masking is limited by\n * minval this is an ISO MPEG1 thing, dont know if it is really\n * needed\n */\n x = (-7.0 + bval[i] * 7.0 / 12.0);\n if (bval[i] > 12) {\n x *= 1 + Math.log(1 + x) * 3.1;\n }\n if (bval[i] < 12) {\n x *= 1 + Math.log(1 - x) * 2.3;\n }\n if (x < -15) {\n x = -15;\n }\n x -= 8;\n gfc.minval_s[i] = Math.pow(10.0, x / 10)\n * gfc.numlines_s[i];\n }\n\n gfc.s3_ss = init_s3_values(gfc.s3ind_s, gfc.npart_s, bval, bval_width,\n norm, useOldS3);\n\n init_mask_add_max_values();\n fft.init_fft(gfc);\n\n /* setup temporal masking */\n gfc.decay = Math.exp(-1.0 * LOG10\n / (temporalmask_sustain_sec * sfreq / 192.0));\n\n {\n var msfix;\n msfix = NS_MSFIX;\n if ((gfp.exp_nspsytune & 2) != 0)\n msfix = 1.0;\n if (Math.abs(gfp.msfix) > 0.0)\n msfix = gfp.msfix;\n gfp.msfix = msfix;\n\n /*\n * spread only from npart_l bands. Normally, we use the spreading\n * function to convolve from npart_l down to npart_l bands\n */\n for (var b = 0; b < gfc.npart_l; b++)\n if (gfc.s3ind[b][1] > gfc.npart_l - 1)\n gfc.s3ind[b][1] = gfc.npart_l - 1;\n }\n\n /*\n * prepare for ATH auto adjustment: we want to decrease the ATH by 12 dB\n * per second\n */\n var frame_duration = (576. * gfc.mode_gr / sfreq);\n gfc.ATH.decay = Math.pow(10., -12. / 10. * frame_duration);\n gfc.ATH.adjust = 0.01;\n /* minimum, for leading low loudness */\n gfc.ATH.adjustLimit = 1.0;\n /* on lead, allow adjust up to maximum */\n\n assert(gfc.bo_l[Encoder.SBMAX_l - 1] <= gfc.npart_l);\n assert(gfc.bo_s[Encoder.SBMAX_s - 1] <= gfc.npart_s);\n\n if (gfp.ATHtype != -1) {\n /* compute equal loudness weights (eql_w) */\n var freq;\n var freq_inc = gfp.out_samplerate\n / (Encoder.BLKSIZE);\n var eql_balance = 0.0;\n freq = 0.0;\n for (i = 0; i < Encoder.BLKSIZE / 2; ++i) {\n /* convert ATH dB to relative power (not dB) */\n /* to determine eql_w */\n freq += freq_inc;\n gfc.ATH.eql_w[i] = 1. / Math.pow(10, this.ATHformula(freq, gfp) / 10);\n eql_balance += gfc.ATH.eql_w[i];\n }\n eql_balance = 1.0 / eql_balance;\n for (i = Encoder.BLKSIZE / 2; --i >= 0;) { /* scale weights */\n gfc.ATH.eql_w[i] *= eql_balance;\n }\n }\n {\n for (var b = j = 0; b < gfc.npart_s; ++b) {\n for (i = 0; i < gfc.numlines_s[b]; ++i) {\n ++j;\n }\n }\n assert(j == 129);\n for (var b = j = 0; b < gfc.npart_l; ++b) {\n for (i = 0; i < gfc.numlines_l[b]; ++i) {\n ++j;\n }\n }\n assert(j == 513);\n }\n j = 0;\n for (i = 0; i < gfc.npart_l; i++) {\n var freq = sfreq * (j + gfc.numlines_l[i] / 2) / (1.0 * Encoder.BLKSIZE);\n gfc.mld_cb_l[i] = stereo_demask(freq);\n j += gfc.numlines_l[i];\n }\n for (; i < Encoder.CBANDS; ++i) {\n gfc.mld_cb_l[i] = 1;\n }\n j = 0;\n for (i = 0; i < gfc.npart_s; i++) {\n var freq = sfreq * (j + gfc.numlines_s[i] / 2) / (1.0 * Encoder.BLKSIZE_s);\n gfc.mld_cb_s[i] = stereo_demask(freq);\n j += gfc.numlines_s[i];\n }\n for (; i < Encoder.CBANDS; ++i) {\n gfc.mld_cb_s[i] = 1;\n }\n return 0;\n }\n\n /**\n * Those ATH formulas are returning their minimum value for input = -1\n */\n function ATHformula_GB(f, value) {\n /**\n *
\n         *  from Painter & Spanias\n         *           modified by Gabriel Bouvigne to better fit the reality\n         *           ath =    3.640 * pow(f,-0.8)\n         *           - 6.800 * exp(-0.6*pow(f-3.4,2.0))\n         *           + 6.000 * exp(-0.15*pow(f-8.7,2.0))\n         *           + 0.6* 0.001 * pow(f,4.0);\n         *\n         *\n         *           In the past LAME was using the Painter &Spanias formula.\n         *           But we had some recurrent problems with HF content.\n         *           We measured real ATH values, and found the older formula\n         *           to be inaccurate in the higher part. So we made this new\n         *           formula and this solved most of HF problematic test cases.\n         *           The tradeoff is that in VBR mode it increases a lot the\n         *           bitrate.\n         * 
\n */\n\n /*\n * This curve can be adjusted according to the VBR scale: it adjusts\n * from something close to Painter & Spanias on V9 up to Bouvigne's\n * formula for V0. This way the VBR bitrate is more balanced according\n * to the -V value.\n */\n\n // the following Hack allows to ask for the lowest value\n if (f < -.3)\n f = 3410;\n\n // convert to khz\n f /= 1000;\n f = Math.max(0.1, f);\n var ath = 3.640 * Math.pow(f, -0.8) - 6.800\n * Math.exp(-0.6 * Math.pow(f - 3.4, 2.0)) + 6.000\n * Math.exp(-0.15 * Math.pow(f - 8.7, 2.0))\n + (0.6 + 0.04 * value) * 0.001 * Math.pow(f, 4.0);\n return ath;\n }\n\n this.ATHformula = function (f, gfp) {\n var ath;\n switch (gfp.ATHtype) {\n case 0:\n ath = ATHformula_GB(f, 9);\n break;\n case 1:\n // over sensitive, should probably be removed\n ath = ATHformula_GB(f, -1);\n break;\n case 2:\n ath = ATHformula_GB(f, 0);\n break;\n case 3:\n // modification of GB formula by Roel\n ath = ATHformula_GB(f, 1) + 6;\n break;\n case 4:\n ath = ATHformula_GB(f, gfp.ATHcurve);\n break;\n default:\n ath = ATHformula_GB(f, 0);\n break;\n }\n return ath;\n }\n\n}\n\nmodule.exports = PsyModel;\n","//package mp3;\n\n/* MPEG modes */\nfunction MPEGMode(ordinal) {\n var _ordinal = ordinal;\n this.ordinal = function () {\n return _ordinal;\n }\n}\n\nMPEGMode.STEREO = new MPEGMode(0);\nMPEGMode.JOINT_STEREO = new MPEGMode(1);\nMPEGMode.DUAL_CHANNEL = new MPEGMode(2);\nMPEGMode.MONO = new MPEGMode(3);\nMPEGMode.NOT_SET = new MPEGMode(4);\n\nmodule.exports = MPEGMode;\n","var MPEGMode = require('./MPEGMode.js');\n\nfunction LameGlobalFlags() {\n\n this.class_id = 0;\n\n /* input description */\n\n /**\n * number of samples. default=-1\n */\n this.num_samples = 0;\n /**\n * input number of channels. default=2\n */\n this.num_channels = 0;\n /**\n * input_samp_rate in Hz. default=44.1 kHz\n */\n this.in_samplerate = 0;\n /**\n * output_samp_rate. default: LAME picks best value at least not used for\n * MP3 decoding: Remember 44.1 kHz MP3s and AC97\n */\n this.out_samplerate = 0;\n /**\n * scale input by this amount before encoding at least not used for MP3\n * decoding\n */\n this.scale = 0.;\n /**\n * scale input of channel 0 (left) by this amount before encoding\n */\n this.scale_left = 0.;\n /**\n * scale input of channel 1 (right) by this amount before encoding\n */\n this.scale_right = 0.;\n\n /* general control params */\n /**\n * collect data for a MP3 frame analyzer?\n */\n this.analysis = false;\n /**\n * add Xing VBR tag?\n */\n this.bWriteVbrTag = false;\n\n /**\n * use lame/mpglib to convert mp3 to wav\n */\n this.decode_only = false;\n /**\n * quality setting 0=best, 9=worst default=5\n */\n this.quality = 0;\n /**\n * see enum default = LAME picks best value\n */\n this.mode = MPEGMode.STEREO;\n /**\n * force M/S mode. requires mode=1\n */\n this.force_ms = false;\n /**\n * use free format? default=0\n */\n this.free_format = false;\n /**\n * find the RG value? default=0\n */\n this.findReplayGain = false;\n /**\n * decode on the fly? default=0\n */\n this.decode_on_the_fly = false;\n /**\n * 1 (default) writes ID3 tags, 0 not\n */\n this.write_id3tag_automatic = false;\n\n /*\n * set either brate>0 or compression_ratio>0, LAME will compute the value of\n * the variable not set. Default is compression_ratio = 11.025\n */\n /**\n * bitrate\n */\n this.brate = 0;\n /**\n * sizeof(wav file)/sizeof(mp3 file)\n */\n this.compression_ratio = 0.;\n\n /* frame params */\n /**\n * mark as copyright. default=0\n */\n this.copyright = 0;\n /**\n * mark as original. default=1\n */\n this.original = 0;\n /**\n * the MP3 'private extension' bit. Meaningless\n */\n this.extension = 0;\n /**\n * Input PCM is emphased PCM (for instance from one of the rarely emphased\n * CDs), it is STRONGLY not recommended to use this, because psycho does not\n * take it into account, and last but not least many decoders don't care\n * about these bits\n */\n this.emphasis = 0;\n /**\n * use 2 bytes per frame for a CRC checksum. default=0\n */\n this.error_protection = 0;\n /**\n * enforce ISO spec as much as possible\n */\n this.strict_ISO = false;\n\n /**\n * use bit reservoir?\n */\n this.disable_reservoir = false;\n\n /* quantization/noise shaping */\n this.quant_comp = 0;\n this.quant_comp_short = 0;\n this.experimentalY = false;\n this.experimentalZ = 0;\n this.exp_nspsytune = 0;\n\n this.preset = 0;\n\n /* VBR control */\n this.VBR = null;\n /**\n * Range [0,...,1[\n */\n this.VBR_q_frac = 0.;\n /**\n * Range [0,...,9]\n */\n this.VBR_q = 0;\n this.VBR_mean_bitrate_kbps = 0;\n this.VBR_min_bitrate_kbps = 0;\n this.VBR_max_bitrate_kbps = 0;\n /**\n * strictly enforce VBR_min_bitrate normaly, it will be violated for analog\n * silence\n */\n this.VBR_hard_min = 0;\n\n /* resampling and filtering */\n\n /**\n * freq in Hz. 0=lame choses. -1=no filter\n */\n this.lowpassfreq = 0;\n /**\n * freq in Hz. 0=lame choses. -1=no filter\n */\n this.highpassfreq = 0;\n /**\n * freq width of filter, in Hz (default=15%)\n */\n this.lowpasswidth = 0;\n /**\n * freq width of filter, in Hz (default=15%)\n */\n this.highpasswidth = 0;\n\n /*\n * psycho acoustics and other arguments which you should not change unless\n * you know what you are doing\n */\n\n this.maskingadjust = 0.;\n this.maskingadjust_short = 0.;\n /**\n * only use ATH\n */\n this.ATHonly = false;\n /**\n * only use ATH for short blocks\n */\n this.ATHshort = false;\n /**\n * disable ATH\n */\n this.noATH = false;\n /**\n * select ATH formula\n */\n this.ATHtype = 0;\n /**\n * change ATH formula 4 shape\n */\n this.ATHcurve = 0.;\n /**\n * lower ATH by this many db\n */\n this.ATHlower = 0.;\n /**\n * select ATH auto-adjust scheme\n */\n this.athaa_type = 0;\n /**\n * select ATH auto-adjust loudness calc\n */\n this.athaa_loudapprox = 0;\n /**\n * dB, tune active region of auto-level\n */\n this.athaa_sensitivity = 0.;\n this.short_blocks = null;\n /**\n * use temporal masking effect\n */\n this.useTemporal = false;\n this.interChRatio = 0.;\n /**\n * Naoki's adjustment of Mid/Side maskings\n */\n this.msfix = 0.;\n\n /**\n * 0 off, 1 on\n */\n this.tune = false;\n /**\n * used to pass values for debugging and stuff\n */\n this.tune_value_a = 0.;\n\n /************************************************************************/\n /* internal variables, do not set... */\n /* provided because they may be of use to calling application */\n /************************************************************************/\n\n /**\n * 0=MPEG-2/2.5 1=MPEG-1\n */\n this.version = 0;\n this.encoder_delay = 0;\n /**\n * number of samples of padding appended to input\n */\n this.encoder_padding = 0;\n this.framesize = 0;\n /**\n * number of frames encoded\n */\n this.frameNum = 0;\n /**\n * is this struct owned by calling program or lame?\n */\n this.lame_allocated_gfp = 0;\n /**************************************************************************/\n /* more internal variables are stored in this structure: */\n /**************************************************************************/\n this.internal_flags = null;\n}\n\nmodule.exports = LameGlobalFlags;\n","var Encoder = require('./Encoder.js');\n\nvar L3Side = {};\n\n\n\t/**\n\t * max scalefactor band, max(SBMAX_l, SBMAX_s*3, (SBMAX_s-3)*3+8)\n\t */\nL3Side.SFBMAX = (Encoder.SBMAX_s * 3);\n\nmodule.exports = L3Side;\n","//package mp3;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar L3Side = require('./L3Side.js');\n\nfunction GrInfo() {\n //float xr[] = new float[576];\n this.xr = new_float(576);\n //int l3_enc[] = new int[576];\n this.l3_enc = new_int(576);\n //int scalefac[] = new int[L3Side.SFBMAX];\n this.scalefac = new_int(L3Side.SFBMAX);\n this.xrpow_max = 0.;\n\n this.part2_3_length = 0;\n this.big_values = 0;\n this.count1 = 0;\n this.global_gain = 0;\n this.scalefac_compress = 0;\n this.block_type = 0;\n this.mixed_block_flag = 0;\n this.table_select = new_int(3);\n this.subblock_gain = new_int(3 + 1);\n this.region0_count = 0;\n this.region1_count = 0;\n this.preflag = 0;\n this.scalefac_scale = 0;\n this.count1table_select = 0;\n\n this.part2_length = 0;\n this.sfb_lmax = 0;\n this.sfb_smin = 0;\n this.psy_lmax = 0;\n this.sfbmax = 0;\n this.psymax = 0;\n this.sfbdivide = 0;\n this.width = new_int(L3Side.SFBMAX);\n this.window = new_int(L3Side.SFBMAX);\n this.count1bits = 0;\n /**\n * added for LSF\n */\n this.sfb_partition_table = null;\n this.slen = new_int(4);\n\n this.max_nonzero_coeff = 0;\n\n var self = this;\n function clone_int(array) {\n return new Int32Array(array);\n }\n function clone_float(array) {\n return new Float32Array(array);\n }\n this.assign = function (other) {\n self.xr = clone_float(other.xr); //.slice(0); //clone();\n self.l3_enc = clone_int(other.l3_enc); //.slice(0); //clone();\n self.scalefac = clone_int(other.scalefac);//.slice(0); //clone();\n self.xrpow_max = other.xrpow_max;\n\n self.part2_3_length = other.part2_3_length;\n self.big_values = other.big_values;\n self.count1 = other.count1;\n self.global_gain = other.global_gain;\n self.scalefac_compress = other.scalefac_compress;\n self.block_type = other.block_type;\n self.mixed_block_flag = other.mixed_block_flag;\n self.table_select = clone_int(other.table_select);//.slice(0); //clone();\n self.subblock_gain = clone_int(other.subblock_gain); //.slice(0); //.clone();\n self.region0_count = other.region0_count;\n self.region1_count = other.region1_count;\n self.preflag = other.preflag;\n self.scalefac_scale = other.scalefac_scale;\n self.count1table_select = other.count1table_select;\n\n self.part2_length = other.part2_length;\n self.sfb_lmax = other.sfb_lmax;\n self.sfb_smin = other.sfb_smin;\n self.psy_lmax = other.psy_lmax;\n self.sfbmax = other.sfbmax;\n self.psymax = other.psymax;\n self.sfbdivide = other.sfbdivide;\n self.width = clone_int(other.width); //.slice(0); //.clone();\n self.window = clone_int(other.window); //.slice(0); //.clone();\n self.count1bits = other.count1bits;\n\n self.sfb_partition_table = other.sfb_partition_table.slice(0); //.clone();\n self.slen = clone_int(other.slen); //.slice(0); //.clone();\n self.max_nonzero_coeff = other.max_nonzero_coeff;\n }\n}\n\nmodule.exports = GrInfo;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar GrInfo = require('./GrInfo.js');\n\nfunction IIISideInfo() {\n this.tt = [[null, null], [null, null]];\n this.main_data_begin = 0;\n this.private_bits = 0;\n this.resvDrain_pre = 0;\n this.resvDrain_post = 0;\n this.scfsi = [new_int(4), new_int(4)];\n\n for (var gr = 0; gr < 2; gr++) {\n for (var ch = 0; ch < 2; ch++) {\n this.tt[gr][ch] = new GrInfo();\n }\n }\n}\n\nmodule.exports = IIISideInfo;\n","//package mp3;\n\n/**\n * Layer III side information.\n *\n * @author Ken\n *\n */\n\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\nfunction ScaleFac(arrL, arrS, arr21, arr12) {\n\n this.l = new_int(1 + Encoder.SBMAX_l);\n this.s = new_int(1 + Encoder.SBMAX_s);\n this.psfb21 = new_int(1 + Encoder.PSFB21);\n this.psfb12 = new_int(1 + Encoder.PSFB12);\n var l = this.l;\n var s = this.s;\n\n if (arguments.length == 4) {\n //public ScaleFac(final int[] arrL, final int[] arrS, final int[] arr21,\n // final int[] arr12) {\n this.arrL = arguments[0];\n this.arrS = arguments[1];\n this.arr21 = arguments[2];\n this.arr12 = arguments[3];\n\n System.arraycopy(this.arrL, 0, l, 0, Math.min(this.arrL.length, this.l.length));\n System.arraycopy(this.arrS, 0, s, 0, Math.min(this.arrS.length, this.s.length));\n System.arraycopy(this.arr21, 0, this.psfb21, 0, Math.min(this.arr21.length, this.psfb21.length));\n System.arraycopy(this.arr12, 0, this.psfb12, 0, Math.min(this.arr12.length, this.psfb12.length));\n }\n}\n\nmodule.exports = ScaleFac;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n//package mp3;\n\n/**\n * Variables used for --nspsytune\n *\n * @author Ken\n *\n */\nfunction NsPsy() {\n this.last_en_subshort = new_float_n([4, 9]);\n this.lastAttacks = new_int(4);\n this.pefirbuf = new_float(19);\n this.longfact = new_float(Encoder.SBMAX_l);\n this.shortfact = new_float(Encoder.SBMAX_s);\n\n /**\n * short block tuning\n */\n this.attackthre = 0.;\n this.attackthre_s = 0.;\n}\n\nmodule.exports = NsPsy;\n","//package mp3;\n\nfunction VBRSeekInfo() {\n /**\n * What we have seen so far.\n */\n this.sum = 0;\n /**\n * How many frames we have seen in this chunk.\n */\n this.seen = 0;\n /**\n * How many frames we want to collect into one chunk.\n */\n this.want = 0;\n /**\n * Actual position in our bag.\n */\n this.pos = 0;\n /**\n * Size of our bag.\n */\n this.size = 0;\n /**\n * Pointer to our bag.\n */\n this.bag = null;\n this.nVbrNumFrames = 0;\n this.nBytesWritten = 0;\n /* VBR tag data */\n this.TotalFrameSize = 0;\n}\n\nmodule.exports = VBRSeekInfo;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar IIISideInfo = require('./IIISideInfo.js');\nvar ScaleFac = require('./ScaleFac.js');\nvar NsPsy = require('./NsPsy.js');\nvar VBRSeekInfo = require('./VBRSeekInfo.js');\nvar III_psy_xmin = require('./III_psy_xmin.js');\nvar Encoder = require('./Encoder.js');\nvar L3Side = require('./L3Side.js');\n\n\nLameInternalFlags.MFSIZE = (3 * 1152 + Encoder.ENCDELAY - Encoder.MDCTDELAY);\nLameInternalFlags.MAX_HEADER_BUF = 256;\nLameInternalFlags.MAX_BITS_PER_CHANNEL = 4095;\nLameInternalFlags.MAX_BITS_PER_GRANULE = 7680;\nLameInternalFlags.BPC = 320;\n\nfunction LameInternalFlags() {\n var MAX_HEADER_LEN = 40;\n\n\n /********************************************************************\n * internal variables NOT set by calling program, and should not be *\n * modified by the calling program *\n ********************************************************************/\n\n /**\n * Some remarks to the Class_ID field: The Class ID is an Identifier for a\n * pointer to this struct. It is very unlikely that a pointer to\n * lame_global_flags has the same 32 bits in it's structure (large and other\n * special properties, for instance prime).\n *\n * To test that the structure is right and initialized, use: if ( gfc .\n * Class_ID == LAME_ID ) ... Other remark: If you set a flag to 0 for uninit\n * data and 1 for init data, the right test should be \"if (flag == 1)\" and\n * NOT \"if (flag)\". Unintended modification of this element will be\n * otherwise misinterpreted as an init.\n */\n this.Class_ID = 0;\n\n this.lame_encode_frame_init = 0;\n this.iteration_init_init = 0;\n this.fill_buffer_resample_init = 0;\n\n //public float mfbuf[][] = new float[2][MFSIZE];\n this.mfbuf = new_float_n([2, LameInternalFlags.MFSIZE]);\n\n /**\n * granules per frame\n */\n this.mode_gr = 0;\n /**\n * number of channels in the input data stream (PCM or decoded PCM)\n */\n this.channels_in = 0;\n /**\n * number of channels in the output data stream (not used for decoding)\n */\n this.channels_out = 0;\n /**\n * input_samp_rate/output_samp_rate\n */\n //public double resample_ratio;\n this.resample_ratio = 0.;\n\n this.mf_samples_to_encode = 0;\n this.mf_size = 0;\n /**\n * min bitrate index\n */\n this.VBR_min_bitrate = 0;\n /**\n * max bitrate index\n */\n this.VBR_max_bitrate = 0;\n this.bitrate_index = 0;\n this.samplerate_index = 0;\n this.mode_ext = 0;\n\n /* lowpass and highpass filter control */\n /**\n * normalized frequency bounds of passband\n */\n this.lowpass1 = 0.;\n this.lowpass2 = 0.;\n /**\n * normalized frequency bounds of passband\n */\n this.highpass1 = 0.;\n this.highpass2 = 0.;\n\n /**\n * 0 = none 1 = ISO AAC model 2 = allow scalefac_select=1\n */\n this.noise_shaping = 0;\n\n /**\n * 0 = ISO model: amplify all distorted bands
\n * 1 = amplify within 50% of max (on db scale)
\n * 2 = amplify only most distorted band
\n * 3 = method 1 and refine with method 2
\n */\n this.noise_shaping_amp = 0;\n /**\n * 0 = no substep
\n * 1 = use substep shaping at last step(VBR only)
\n * (not implemented yet)
\n * 2 = use substep inside loop
\n * 3 = use substep inside loop and last step
\n */\n this.substep_shaping = 0;\n\n /**\n * 1 = gpsycho. 0 = none\n */\n this.psymodel = 0;\n /**\n * 0 = stop at over=0, all scalefacs amplified or
\n * a scalefac has reached max value
\n * 1 = stop when all scalefacs amplified or a scalefac has reached max value
\n * 2 = stop when all scalefacs amplified\n */\n this.noise_shaping_stop = 0;\n\n /**\n * 0 = no, 1 = yes\n */\n this.subblock_gain = 0;\n /**\n * 0 = no. 1=outside loop 2=inside loop(slow)\n */\n this.use_best_huffman = 0;\n\n /**\n * 0 = stop early after 0 distortion found. 1 = full search\n */\n this.full_outer_loop = 0;\n\n //public IIISideInfo l3_side = new IIISideInfo();\n this.l3_side = new IIISideInfo();\n this.ms_ratio = new_float(2);\n\n /* used for padding */\n /**\n * padding for the current frame?\n */\n this.padding = 0;\n this.frac_SpF = 0;\n this.slot_lag = 0;\n\n /**\n * optional ID3 tags\n */\n //public ID3TagSpec tag_spec;\n this.tag_spec = null;\n this.nMusicCRC = 0;\n\n /* variables used by Quantize */\n //public int OldValue[] = new int[2];\n this.OldValue = new_int(2);\n //public int CurrentStep[] = new int[2];\n this.CurrentStep = new_int(2);\n\n this.masking_lower = 0.;\n //public int bv_scf[] = new int[576];\n this.bv_scf = new_int(576);\n //public int pseudohalf[] = new int[L3Side.SFBMAX];\n this.pseudohalf = new_int(L3Side.SFBMAX);\n\n /**\n * will be set in lame_init_params\n */\n this.sfb21_extra = false;\n\n /* BPC = maximum number of filter convolution windows to precompute */\n //public float[][] inbuf_old = new float[2][];\n this.inbuf_old = new Array(2);\n //public float[][] blackfilt = new float[2 * BPC + 1][];\n this.blackfilt = new Array(2 * LameInternalFlags.BPC + 1);\n //public double itime[] = new double[2];\n this.itime = new_double(2);\n this.sideinfo_len = 0;\n\n /* variables for newmdct.c */\n //public float sb_sample[][][][] = new float[2][2][18][Encoder.SBLIMIT];\n this.sb_sample = new_float_n([2, 2, 18, Encoder.SBLIMIT]);\n this.amp_filter = new_float(32);\n\n /* variables for BitStream */\n\n /**\n *
\n     * mpeg1: buffer=511 bytes  smallest frame: 96-38(sideinfo)=58\n     * max number of frames in reservoir:  8\n     * mpeg2: buffer=255 bytes.  smallest frame: 24-23bytes=1\n     * with VBR, if you are encoding all silence, it is possible to\n     * have 8kbs/24khz frames with 1byte of data each, which means we need\n     * to buffer up to 255 headers!\n     * 
\n */\n /**\n * also, max_header_buf has to be a power of two\n */\n /**\n * max size of header is 38\n */\n\n function Header() {\n this.write_timing = 0;\n this.ptr = 0;\n //public byte buf[] = new byte[MAX_HEADER_LEN];\n this.buf = new_byte(MAX_HEADER_LEN);\n }\n\n this.header = new Array(LameInternalFlags.MAX_HEADER_BUF);\n\n this.h_ptr = 0;\n this.w_ptr = 0;\n this.ancillary_flag = 0;\n\n /* variables for Reservoir */\n /**\n * in bits\n */\n this.ResvSize = 0;\n /**\n * in bits\n */\n this.ResvMax = 0;\n\n //public ScaleFac scalefac_band = new ScaleFac();\n this.scalefac_band = new ScaleFac();\n\n /* daa from PsyModel */\n /* The static variables \"r\", \"phi_sav\", \"new\", \"old\" and \"oldest\" have */\n /* to be remembered for the unpredictability measure. For \"r\" and */\n /* \"phi_sav\", the first index from the left is the channel select and */\n /* the second index is the \"age\" of the data. */\n this.minval_l = new_float(Encoder.CBANDS);\n this.minval_s = new_float(Encoder.CBANDS);\n this.nb_1 = new_float_n([4, Encoder.CBANDS]);\n this.nb_2 = new_float_n([4, Encoder.CBANDS]);\n this.nb_s1 = new_float_n([4, Encoder.CBANDS]);\n this.nb_s2 = new_float_n([4, Encoder.CBANDS]);\n this.s3_ss = null;\n this.s3_ll = null;\n this.decay = 0.;\n\n //public III_psy_xmin[] thm = new III_psy_xmin[4];\n //public III_psy_xmin[] en = new III_psy_xmin[4];\n this.thm = new Array(4);\n this.en = new Array(4);\n\n /**\n * fft and energy calculation\n */\n this.tot_ener = new_float(4);\n\n /* loudness calculation (for adaptive threshold of hearing) */\n /**\n * loudness^2 approx. per granule and channel\n */\n this.loudness_sq = new_float_n([2, 2]);\n /**\n * account for granule delay of L3psycho_anal\n */\n this.loudness_sq_save = new_float(2);\n\n /**\n * Scale Factor Bands\n */\n this.mld_l = new_float(Encoder.SBMAX_l);\n this.mld_s = new_float(Encoder.SBMAX_s);\n this.bm_l = new_int(Encoder.SBMAX_l);\n this.bo_l = new_int(Encoder.SBMAX_l);\n this.bm_s = new_int(Encoder.SBMAX_s);\n this.bo_s = new_int(Encoder.SBMAX_s);\n this.npart_l = 0;\n this.npart_s = 0;\n\n this.s3ind = new_int_n([Encoder.CBANDS, 2]);\n this.s3ind_s = new_int_n([Encoder.CBANDS, 2]);\n\n this.numlines_s = new_int(Encoder.CBANDS);\n this.numlines_l = new_int(Encoder.CBANDS);\n this.rnumlines_l = new_float(Encoder.CBANDS);\n this.mld_cb_l = new_float(Encoder.CBANDS);\n this.mld_cb_s = new_float(Encoder.CBANDS);\n this.numlines_s_num1 = 0;\n this.numlines_l_num1 = 0;\n\n /* ratios */\n this.pe = new_float(4);\n this.ms_ratio_s_old = 0.;\n this.ms_ratio_l_old = 0.;\n this.ms_ener_ratio_old = 0.;\n\n /**\n * block type\n */\n this.blocktype_old = new_int(2);\n\n /**\n * variables used for --nspsytune\n */\n this.nsPsy = new NsPsy();\n\n /**\n * used for Xing VBR header\n */\n this.VBR_seek_table = new VBRSeekInfo();\n\n /**\n * all ATH related stuff\n */\n //public ATH ATH;\n this.ATH = null;\n\n this.PSY = null;\n\n this.nogap_total = 0;\n this.nogap_current = 0;\n\n /* ReplayGain */\n this.decode_on_the_fly = true;\n this.findReplayGain = true;\n this.findPeakSample = true;\n this.PeakSample = 0.;\n this.RadioGain = 0;\n this.AudiophileGain = 0;\n //public ReplayGain rgdata;\n this.rgdata = null;\n\n /**\n * gain change required for preventing clipping\n */\n this.noclipGainChange = 0;\n /**\n * user-specified scale factor required for preventing clipping\n */\n this.noclipScale = 0.;\n\n /* simple statistics */\n this.bitrate_stereoMode_Hist = new_int_n([16, 4 + 1]);\n /**\n * norm/start/short/stop/mixed(short)/sum\n */\n this.bitrate_blockType_Hist = new_int_n([16, 4 + 1 + 1]);\n\n //public PlottingData pinfo;\n //public MPGLib.mpstr_tag hip;\n this.pinfo = null;\n this.hip = null;\n\n this.in_buffer_nsamples = 0;\n //public float[] in_buffer_0;\n //public float[] in_buffer_1;\n this.in_buffer_0 = null;\n this.in_buffer_1 = null;\n\n //public IIterationLoop iteration_loop;\n this.iteration_loop = null;\n\n for (var i = 0; i < this.en.length; i++) {\n this.en[i] = new III_psy_xmin();\n }\n for (var i = 0; i < this.thm.length; i++) {\n this.thm[i] = new III_psy_xmin();\n }\n for (var i = 0; i < this.header.length; i++) {\n this.header[i] = new Header();\n }\n\n}\n\nmodule.exports = LameInternalFlags;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\n\n/**\n * ATH related stuff, if something new ATH related has to be added, please plug\n * it here into the ATH.\n */\nfunction ATH() {\n /**\n * Method for the auto adjustment.\n */\n this.useAdjust = 0;\n /**\n * factor for tuning the (sample power) point below which adaptive threshold\n * of hearing adjustment occurs\n */\n this.aaSensitivityP = 0.;\n /**\n * Lowering based on peak volume, 1 = no lowering.\n */\n this.adjust = 0.;\n /**\n * Limit for dynamic ATH adjust.\n */\n this.adjustLimit = 0.;\n /**\n * Determined to lower x dB each second.\n */\n this.decay = 0.;\n /**\n * Lowest ATH value.\n */\n this.floor = 0.;\n /**\n * ATH for sfbs in long blocks.\n */\n this.l = new_float(Encoder.SBMAX_l);\n /**\n * ATH for sfbs in short blocks.\n */\n this.s = new_float(Encoder.SBMAX_s);\n /**\n * ATH for partitioned sfb21 in long blocks.\n */\n this.psfb21 = new_float(Encoder.PSFB21);\n /**\n * ATH for partitioned sfb12 in short blocks.\n */\n this.psfb12 = new_float(Encoder.PSFB12);\n /**\n * ATH for long block convolution bands.\n */\n this.cb_l = new_float(Encoder.CBANDS);\n /**\n * ATH for short block convolution bands.\n */\n this.cb_s = new_float(Encoder.CBANDS);\n /**\n * Equal loudness weights (based on ATH).\n */\n this.eql_w = new_float(Encoder.BLKSIZE / 2);\n}\n\nmodule.exports = ATH;\n","/*\n * ReplayGainAnalysis - analyzes input samples and give the recommended dB change\n * Copyright (C) 2001 David Robinson and Glen Sawyer\n * Improvements and optimizations added by Frank Klemm, and by Marcel Muller \n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n *\n * concept and filter values by David Robinson (David@Robinson.org)\n * -- blame him if you think the idea is flawed\n * original coding by Glen Sawyer (mp3gain@hotmail.com)\n * -- blame him if you think this runs too slowly, or the coding is otherwise flawed\n *\n * lots of code improvements by Frank Klemm ( http://www.uni-jena.de/~pfk/mpp/ )\n * -- credit him for all the _good_ programming ;)\n *\n *\n * For an explanation of the concepts and the basic algorithms involved, go to:\n * http://www.replaygain.org/\n */\n\n/*\n * Here's the deal. Call\n *\n * InitGainAnalysis ( long samplefreq );\n *\n * to initialize everything. Call\n *\n * AnalyzeSamples ( var Float_t* left_samples,\n * var Float_t* right_samples,\n * size_t num_samples,\n * int num_channels );\n *\n * as many times as you want, with as many or as few samples as you want.\n * If mono, pass the sample buffer in through left_samples, leave\n * right_samples NULL, and make sure num_channels = 1.\n *\n * GetTitleGain()\n *\n * will return the recommended dB level change for all samples analyzed\n * SINCE THE LAST TIME you called GetTitleGain() OR InitGainAnalysis().\n *\n * GetAlbumGain()\n *\n * will return the recommended dB level change for all samples analyzed\n * since InitGainAnalysis() was called and finalized with GetTitleGain().\n *\n * Pseudo-code to process an album:\n *\n * Float_t l_samples [4096];\n * Float_t r_samples [4096];\n * size_t num_samples;\n * unsigned int num_songs;\n * unsigned int i;\n *\n * InitGainAnalysis ( 44100 );\n * for ( i = 1; i <= num_songs; i++ ) {\n * while ( ( num_samples = getSongSamples ( song[i], left_samples, right_samples ) ) > 0 )\n * AnalyzeSamples ( left_samples, right_samples, num_samples, 2 );\n * fprintf (\"Recommended dB change for song %2d: %+6.2 dB\\n\", i, GetTitleGain() );\n * }\n * fprintf (\"Recommended dB change for whole album: %+6.2 dB\\n\", GetAlbumGain() );\n */\n\n/*\n * So here's the main source of potential code confusion:\n *\n * The filters applied to the incoming samples are IIR filters,\n * meaning they rely on up to number of previous samples\n * AND up to number of previous filtered samples.\n *\n * I set up the AnalyzeSamples routine to minimize memory usage and interface\n * complexity. The speed isn't compromised too much (I don't think), but the\n * internal complexity is higher than it should be for such a relatively\n * simple routine.\n *\n * Optimization/clarity suggestions are welcome.\n */\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * Table entries per dB\n */\nGainAnalysis.STEPS_per_dB = 100.;\n/**\n * Table entries for 0...MAX_dB (normal max. values are 70...80 dB)\n */\nGainAnalysis.MAX_dB = 120.;\nGainAnalysis.GAIN_NOT_ENOUGH_SAMPLES = -24601;\nGainAnalysis.GAIN_ANALYSIS_ERROR = 0;\nGainAnalysis.GAIN_ANALYSIS_OK = 1;\nGainAnalysis.INIT_GAIN_ANALYSIS_ERROR = 0;\nGainAnalysis.INIT_GAIN_ANALYSIS_OK = 1;\n\nGainAnalysis.YULE_ORDER = 10;\nGainAnalysis.MAX_ORDER = GainAnalysis.YULE_ORDER;\n\nGainAnalysis.MAX_SAMP_FREQ = 48000;\nGainAnalysis.RMS_WINDOW_TIME_NUMERATOR = 1;\nGainAnalysis.RMS_WINDOW_TIME_DENOMINATOR = 20;\nGainAnalysis.MAX_SAMPLES_PER_WINDOW = ((GainAnalysis.MAX_SAMP_FREQ * GainAnalysis.RMS_WINDOW_TIME_NUMERATOR) / GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR + 1);\n\nfunction GainAnalysis() {\n /**\n * calibration value for 89dB\n */\n var PINK_REF = 64.82;\n\n var YULE_ORDER = GainAnalysis.YULE_ORDER;\n /**\n * percentile which is louder than the proposed level\n */\n var RMS_PERCENTILE = 0.95;\n /**\n * maximum allowed sample frequency [Hz]\n */\n var MAX_SAMP_FREQ = GainAnalysis.MAX_SAMP_FREQ;\n var RMS_WINDOW_TIME_NUMERATOR = GainAnalysis.RMS_WINDOW_TIME_NUMERATOR;\n /**\n * numerator / denominator = time slice size [s]\n */\n var RMS_WINDOW_TIME_DENOMINATOR = GainAnalysis.RMS_WINDOW_TIME_DENOMINATOR;\n /**\n * max. Samples per Time slice\n */\n var MAX_SAMPLES_PER_WINDOW = GainAnalysis.MAX_SAMPLES_PER_WINDOW;\n\n\n var ABYule = [\n [0.03857599435200, -3.84664617118067, -0.02160367184185,\n 7.81501653005538, -0.00123395316851, -11.34170355132042,\n -0.00009291677959, 13.05504219327545, -0.01655260341619,\n -12.28759895145294, 0.02161526843274, 9.48293806319790,\n -0.02074045215285, -5.87257861775999, 0.00594298065125,\n 2.75465861874613, 0.00306428023191, -0.86984376593551,\n 0.00012025322027, 0.13919314567432, 0.00288463683916],\n [0.05418656406430, -3.47845948550071, -0.02911007808948,\n 6.36317777566148, -0.00848709379851, -8.54751527471874,\n -0.00851165645469, 9.47693607801280, -0.00834990904936,\n -8.81498681370155, 0.02245293253339, 6.85401540936998,\n -0.02596338512915, -4.39470996079559, 0.01624864962975,\n 2.19611684890774, -0.00240879051584, -0.75104302451432,\n 0.00674613682247, 0.13149317958808, -0.00187763777362],\n [0.15457299681924, -2.37898834973084, -0.09331049056315,\n 2.84868151156327, -0.06247880153653, -2.64577170229825,\n 0.02163541888798, 2.23697657451713, -0.05588393329856,\n -1.67148153367602, 0.04781476674921, 1.00595954808547,\n 0.00222312597743, -0.45953458054983, 0.03174092540049,\n 0.16378164858596, -0.01390589421898, -0.05032077717131,\n 0.00651420667831, 0.02347897407020, -0.00881362733839],\n [0.30296907319327, -1.61273165137247, -0.22613988682123,\n 1.07977492259970, -0.08587323730772, -0.25656257754070,\n 0.03282930172664, -0.16276719120440, -0.00915702933434,\n -0.22638893773906, -0.02364141202522, 0.39120800788284,\n -0.00584456039913, -0.22138138954925, 0.06276101321749,\n 0.04500235387352, -0.00000828086748, 0.02005851806501,\n 0.00205861885564, 0.00302439095741, -0.02950134983287],\n [0.33642304856132, -1.49858979367799, -0.25572241425570,\n 0.87350271418188, -0.11828570177555, 0.12205022308084,\n 0.11921148675203, -0.80774944671438, -0.07834489609479,\n 0.47854794562326, -0.00469977914380, -0.12453458140019,\n -0.00589500224440, -0.04067510197014, 0.05724228140351,\n 0.08333755284107, 0.00832043980773, -0.04237348025746,\n -0.01635381384540, 0.02977207319925, -0.01760176568150],\n [0.44915256608450, -0.62820619233671, -0.14351757464547,\n 0.29661783706366, -0.22784394429749, -0.37256372942400,\n -0.01419140100551, 0.00213767857124, 0.04078262797139,\n -0.42029820170918, -0.12398163381748, 0.22199650564824,\n 0.04097565135648, 0.00613424350682, 0.10478503600251,\n 0.06747620744683, -0.01863887810927, 0.05784820375801,\n -0.03193428438915, 0.03222754072173, 0.00541907748707],\n [0.56619470757641, -1.04800335126349, -0.75464456939302,\n 0.29156311971249, 0.16242137742230, -0.26806001042947,\n 0.16744243493672, 0.00819999645858, -0.18901604199609,\n 0.45054734505008, 0.30931782841830, -0.33032403314006,\n -0.27562961986224, 0.06739368333110, 0.00647310677246,\n -0.04784254229033, 0.08647503780351, 0.01639907836189,\n -0.03788984554840, 0.01807364323573, -0.00588215443421],\n [0.58100494960553, -0.51035327095184, -0.53174909058578,\n -0.31863563325245, -0.14289799034253, -0.20256413484477,\n 0.17520704835522, 0.14728154134330, 0.02377945217615,\n 0.38952639978999, 0.15558449135573, -0.23313271880868,\n -0.25344790059353, -0.05246019024463, 0.01628462406333,\n -0.02505961724053, 0.06920467763959, 0.02442357316099,\n -0.03721611395801, 0.01818801111503, -0.00749618797172],\n [0.53648789255105, -0.25049871956020, -0.42163034350696,\n -0.43193942311114, -0.00275953611929, -0.03424681017675,\n 0.04267842219415, -0.04678328784242, -0.10214864179676,\n 0.26408300200955, 0.14590772289388, 0.15113130533216,\n -0.02459864859345, -0.17556493366449, -0.11202315195388,\n -0.18823009262115, -0.04060034127000, 0.05477720428674,\n 0.04788665548180, 0.04704409688120, -0.02217936801134]];\n\n var ABButter = [\n [0.98621192462708, -1.97223372919527, -1.97242384925416,\n 0.97261396931306, 0.98621192462708],\n [0.98500175787242, -1.96977855582618, -1.97000351574484,\n 0.97022847566350, 0.98500175787242],\n [0.97938932735214, -1.95835380975398, -1.95877865470428,\n 0.95920349965459, 0.97938932735214],\n [0.97531843204928, -1.95002759149878, -1.95063686409857,\n 0.95124613669835, 0.97531843204928],\n [0.97316523498161, -1.94561023566527, -1.94633046996323,\n 0.94705070426118, 0.97316523498161],\n [0.96454515552826, -1.92783286977036, -1.92909031105652,\n 0.93034775234268, 0.96454515552826],\n [0.96009142950541, -1.91858953033784, -1.92018285901082,\n 0.92177618768381, 0.96009142950541],\n [0.95856916599601, -1.91542108074780, -1.91713833199203,\n 0.91885558323625, 0.95856916599601],\n [0.94597685600279, -1.88903307939452, -1.89195371200558,\n 0.89487434461664, 0.94597685600279]];\n\n\n /**\n * When calling this procedure, make sure that ip[-order] and op[-order]\n * point to real data\n */\n //private void filterYule(final float[] input, int inputPos, float[] output,\n //int outputPos, int nSamples, final float[] kernel) {\n function filterYule(input, inputPos, output, outputPos, nSamples, kernel) {\n\n while ((nSamples--) != 0) {\n /* 1e-10 is a hack to avoid slowdown because of denormals */\n output[outputPos] = 1e-10 + input[inputPos + 0] * kernel[0]\n - output[outputPos - 1] * kernel[1] + input[inputPos - 1]\n * kernel[2] - output[outputPos - 2] * kernel[3]\n + input[inputPos - 2] * kernel[4] - output[outputPos - 3]\n * kernel[5] + input[inputPos - 3] * kernel[6]\n - output[outputPos - 4] * kernel[7] + input[inputPos - 4]\n * kernel[8] - output[outputPos - 5] * kernel[9]\n + input[inputPos - 5] * kernel[10] - output[outputPos - 6]\n * kernel[11] + input[inputPos - 6] * kernel[12]\n - output[outputPos - 7] * kernel[13] + input[inputPos - 7]\n * kernel[14] - output[outputPos - 8] * kernel[15]\n + input[inputPos - 8] * kernel[16] - output[outputPos - 9]\n * kernel[17] + input[inputPos - 9] * kernel[18]\n - output[outputPos - 10] * kernel[19]\n + input[inputPos - 10] * kernel[20];\n ++outputPos;\n ++inputPos;\n }\n }\n\n//private void filterButter(final float[] input, int inputPos,\n// float[] output, int outputPos, int nSamples, final float[] kernel) {\n function filterButter(input, inputPos, output, outputPos, nSamples, kernel) {\n\n while ((nSamples--) != 0) {\n output[outputPos] = input[inputPos + 0] * kernel[0]\n - output[outputPos - 1] * kernel[1] + input[inputPos - 1]\n * kernel[2] - output[outputPos - 2] * kernel[3]\n + input[inputPos - 2] * kernel[4];\n ++outputPos;\n ++inputPos;\n }\n }\n\n /**\n * @return INIT_GAIN_ANALYSIS_OK if successful, INIT_GAIN_ANALYSIS_ERROR if\n * not\n */\n function ResetSampleFrequency(rgData, samplefreq) {\n /* zero out initial values */\n for (var i = 0; i < MAX_ORDER; i++)\n rgData.linprebuf[i] = rgData.lstepbuf[i] = rgData.loutbuf[i] = rgData.rinprebuf[i] = rgData.rstepbuf[i] = rgData.routbuf[i] = 0.;\n\n switch (0 | (samplefreq)) {\n case 48000:\n rgData.reqindex = 0;\n break;\n case 44100:\n rgData.reqindex = 1;\n break;\n case 32000:\n rgData.reqindex = 2;\n break;\n case 24000:\n rgData.reqindex = 3;\n break;\n case 22050:\n rgData.reqindex = 4;\n break;\n case 16000:\n rgData.reqindex = 5;\n break;\n case 12000:\n rgData.reqindex = 6;\n break;\n case 11025:\n rgData.reqindex = 7;\n break;\n case 8000:\n rgData.reqindex = 8;\n break;\n default:\n return INIT_GAIN_ANALYSIS_ERROR;\n }\n\n rgData.sampleWindow = 0 | ((samplefreq * RMS_WINDOW_TIME_NUMERATOR\n + RMS_WINDOW_TIME_DENOMINATOR - 1) / RMS_WINDOW_TIME_DENOMINATOR);\n\n rgData.lsum = 0.;\n rgData.rsum = 0.;\n rgData.totsamp = 0;\n\n Arrays.ill(rgData.A, 0);\n\n return INIT_GAIN_ANALYSIS_OK;\n }\n\n this.InitGainAnalysis = function (rgData, samplefreq) {\n if (ResetSampleFrequency(rgData, samplefreq) != INIT_GAIN_ANALYSIS_OK) {\n return INIT_GAIN_ANALYSIS_ERROR;\n }\n\n rgData.linpre = MAX_ORDER;\n rgData.rinpre = MAX_ORDER;\n rgData.lstep = MAX_ORDER;\n rgData.rstep = MAX_ORDER;\n rgData.lout = MAX_ORDER;\n rgData.rout = MAX_ORDER;\n\n Arrays.fill(rgData.B, 0);\n\n return INIT_GAIN_ANALYSIS_OK;\n };\n\n /**\n * square\n */\n function fsqr(d) {\n return d * d;\n }\n\n this.AnalyzeSamples = function (rgData, left_samples, left_samplesPos, right_samples, right_samplesPos, num_samples,\n num_channels) {\n var curleft;\n var curleftBase;\n var curright;\n var currightBase;\n var batchsamples;\n var cursamples;\n var cursamplepos;\n\n if (num_samples == 0)\n return GAIN_ANALYSIS_OK;\n\n cursamplepos = 0;\n batchsamples = num_samples;\n\n switch (num_channels) {\n case 1:\n right_samples = left_samples;\n right_samplesPos = left_samplesPos;\n break;\n case 2:\n break;\n default:\n return GAIN_ANALYSIS_ERROR;\n }\n\n if (num_samples < MAX_ORDER) {\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER, num_samples);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER, num_samples);\n } else {\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER, MAX_ORDER);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER, MAX_ORDER);\n }\n\n while (batchsamples > 0) {\n cursamples = batchsamples > rgData.sampleWindow - rgData.totsamp ? rgData.sampleWindow\n - rgData.totsamp\n : batchsamples;\n if (cursamplepos < MAX_ORDER) {\n curleft = rgData.linpre + cursamplepos;\n curleftBase = rgData.linprebuf;\n curright = rgData.rinpre + cursamplepos;\n currightBase = rgData.rinprebuf;\n if (cursamples > MAX_ORDER - cursamplepos)\n cursamples = MAX_ORDER - cursamplepos;\n } else {\n curleft = left_samplesPos + cursamplepos;\n curleftBase = left_samples;\n curright = right_samplesPos + cursamplepos;\n currightBase = right_samples;\n }\n\n filterYule(curleftBase, curleft, rgData.lstepbuf, rgData.lstep\n + rgData.totsamp, cursamples, ABYule[rgData.reqindex]);\n filterYule(currightBase, curright, rgData.rstepbuf, rgData.rstep\n + rgData.totsamp, cursamples, ABYule[rgData.reqindex]);\n\n filterButter(rgData.lstepbuf, rgData.lstep + rgData.totsamp,\n rgData.loutbuf, rgData.lout + rgData.totsamp, cursamples,\n ABButter[rgData.reqindex]);\n filterButter(rgData.rstepbuf, rgData.rstep + rgData.totsamp,\n rgData.routbuf, rgData.rout + rgData.totsamp, cursamples,\n ABButter[rgData.reqindex]);\n\n curleft = rgData.lout + rgData.totsamp;\n /* Get the squared values */\n curleftBase = rgData.loutbuf;\n curright = rgData.rout + rgData.totsamp;\n currightBase = rgData.routbuf;\n\n var i = cursamples % 8;\n while ((i--) != 0) {\n rgData.lsum += fsqr(curleftBase[curleft++]);\n rgData.rsum += fsqr(currightBase[curright++]);\n }\n i = cursamples / 8;\n while ((i--) != 0) {\n rgData.lsum += fsqr(curleftBase[curleft + 0])\n + fsqr(curleftBase[curleft + 1])\n + fsqr(curleftBase[curleft + 2])\n + fsqr(curleftBase[curleft + 3])\n + fsqr(curleftBase[curleft + 4])\n + fsqr(curleftBase[curleft + 5])\n + fsqr(curleftBase[curleft + 6])\n + fsqr(curleftBase[curleft + 7]);\n curleft += 8;\n rgData.rsum += fsqr(currightBase[curright + 0])\n + fsqr(currightBase[curright + 1])\n + fsqr(currightBase[curright + 2])\n + fsqr(currightBase[curright + 3])\n + fsqr(currightBase[curright + 4])\n + fsqr(currightBase[curright + 5])\n + fsqr(currightBase[curright + 6])\n + fsqr(currightBase[curright + 7]);\n curright += 8;\n }\n\n batchsamples -= cursamples;\n cursamplepos += cursamples;\n rgData.totsamp += cursamples;\n if (rgData.totsamp == rgData.sampleWindow) {\n /* Get the Root Mean Square (RMS) for this set of samples */\n var val = GainAnalysis.STEPS_per_dB\n * 10.\n * Math.log10((rgData.lsum + rgData.rsum)\n / rgData.totsamp * 0.5 + 1.e-37);\n var ival = (val <= 0) ? 0 : 0 | val;\n if (ival >= rgData.A.length)\n ival = rgData.A.length - 1;\n rgData.A[ival]++;\n rgData.lsum = rgData.rsum = 0.;\n\n System.arraycopy(rgData.loutbuf, rgData.totsamp,\n rgData.loutbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.routbuf, rgData.totsamp,\n rgData.routbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.lstepbuf, rgData.totsamp,\n rgData.lstepbuf, 0, MAX_ORDER);\n System.arraycopy(rgData.rstepbuf, rgData.totsamp,\n rgData.rstepbuf, 0, MAX_ORDER);\n rgData.totsamp = 0;\n }\n if (rgData.totsamp > rgData.sampleWindow) {\n /*\n * somehow I really screwed up: Error in programming! Contact\n * author about totsamp > sampleWindow\n */\n return GAIN_ANALYSIS_ERROR;\n }\n }\n if (num_samples < MAX_ORDER) {\n System.arraycopy(rgData.linprebuf, num_samples, rgData.linprebuf,\n 0, MAX_ORDER - num_samples);\n System.arraycopy(rgData.rinprebuf, num_samples, rgData.rinprebuf,\n 0, MAX_ORDER - num_samples);\n System.arraycopy(left_samples, left_samplesPos, rgData.linprebuf,\n MAX_ORDER - num_samples, num_samples);\n System.arraycopy(right_samples, right_samplesPos, rgData.rinprebuf,\n MAX_ORDER - num_samples, num_samples);\n } else {\n System.arraycopy(left_samples, left_samplesPos + num_samples\n - MAX_ORDER, rgData.linprebuf, 0, MAX_ORDER);\n System.arraycopy(right_samples, right_samplesPos + num_samples\n - MAX_ORDER, rgData.rinprebuf, 0, MAX_ORDER);\n }\n\n return GAIN_ANALYSIS_OK;\n };\n\n function analyzeResult(Array, len) {\n var i;\n\n var elems = 0;\n for (i = 0; i < len; i++)\n elems += Array[i];\n if (elems == 0)\n return GAIN_NOT_ENOUGH_SAMPLES;\n\n var upper = 0 | Math.ceil(elems * (1. - RMS_PERCENTILE));\n for (i = len; i-- > 0;) {\n if ((upper -= Array[i]) <= 0)\n break;\n }\n\n //return (float) ((float) PINK_REF - (float) i / (float) STEPS_per_dB);\n return (PINK_REF - i / GainAnalysis.STEPS_per_dB);\n }\n\n this.GetTitleGain = function (rgData) {\n var retval = analyzeResult(rgData.A, rgData.A.length);\n\n for (var i = 0; i < rgData.A.length; i++) {\n rgData.B[i] += rgData.A[i];\n rgData.A[i] = 0;\n }\n\n for (var i = 0; i < MAX_ORDER; i++)\n rgData.linprebuf[i] = rgData.lstepbuf[i] = rgData.loutbuf[i] = rgData.rinprebuf[i] = rgData.rstepbuf[i] = rgData.routbuf[i] = 0.;\n\n rgData.totsamp = 0;\n rgData.lsum = rgData.rsum = 0.;\n return retval;\n }\n\n}\n\nmodule.exports = GainAnalysis;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar GainAnalysis = require('./GainAnalysis.js');\n\nfunction ReplayGain() {\n this.linprebuf = new_float(GainAnalysis.MAX_ORDER * 2);\n /**\n * left input samples, with pre-buffer\n */\n this.linpre = 0;\n this.lstepbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n /**\n * left \"first step\" (i.e. post first filter) samples\n */\n this.lstep = 0;\n this.loutbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n /**\n * left \"out\" (i.e. post second filter) samples\n */\n this.lout = 0;\n this.rinprebuf = new_float(GainAnalysis.MAX_ORDER * 2);\n /**\n * right input samples ...\n */\n this.rinpre = 0;\n this.rstepbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n this.rstep = 0;\n this.routbuf = new_float(GainAnalysis.MAX_SAMPLES_PER_WINDOW + GainAnalysis.MAX_ORDER);\n this.rout = 0;\n /**\n * number of samples required to reach number of milliseconds required\n * for RMS window\n */\n this.sampleWindow = 0;\n this.totsamp = 0;\n this.lsum = 0.;\n this.rsum = 0.;\n this.freqindex = 0;\n this.first = 0;\n this.A = new_int(0 | (GainAnalysis.STEPS_per_dB * GainAnalysis.MAX_dB));\n this.B = new_int(0 | (GainAnalysis.STEPS_per_dB * GainAnalysis.MAX_dB));\n\n}\n\nmodule.exports = ReplayGain;\n","function MeanBits(meanBits) {\n this.bits = meanBits;\n}\n\nmodule.exports = MeanBits;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar MeanBits = require('./MeanBits.js');\nvar Encoder = require('./Encoder.js');\nvar L3Side = require('./L3Side.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nfunction CBRNewIterationLoop(_quantize) {\n var quantize = _quantize;\n this.quantize = quantize;\n\tthis.iteration_loop = function(gfp, pe, ms_ener_ratio, ratio) {\n\t\tvar gfc = gfp.internal_flags;\n var l3_xmin = new_float(L3Side.SFBMAX);\n\t\tvar xrpow = new_float(576);\n\t\tvar targ_bits = new_int(2);\n\t\tvar mean_bits = 0, max_bits;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tvar mb = new MeanBits(mean_bits);\n\t\tthis.quantize.rv.ResvFrameBegin(gfp, mb);\n\t\tmean_bits = mb.bits;\n\n\t\t/* quantize! */\n\t\tfor (var gr = 0; gr < gfc.mode_gr; gr++) {\n\n\t\t\t/*\n\t\t\t * calculate needed bits\n\t\t\t */\n\t\t\tmax_bits = this.quantize.qupvt.on_pe(gfp, pe, targ_bits, mean_bits,\n\t\t\t\t\tgr, gr);\n\n\t\t\tif (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n\t\t\t\tthis.quantize.ms_convert(gfc.l3_side, gr);\n\t\t\t\tthis.quantize.qupvt.reduce_side(targ_bits, ms_ener_ratio[gr],\n\t\t\t\t\t\tmean_bits, max_bits);\n\t\t\t}\n\n\t\t\tfor (var ch = 0; ch < gfc.channels_out; ch++) {\n\t\t\t\tvar adjust, masking_lower_db;\n\t\t\t\tvar cod_info = l3_side.tt[gr][ch];\n\n\t\t\t\tif (cod_info.block_type != Encoder.SHORT_TYPE) {\n\t\t\t\t\t// NORM, START or STOP type\n\t\t\t\t\tadjust = 0;\n\t\t\t\t\tmasking_lower_db = gfc.PSY.mask_adjust - adjust;\n\t\t\t\t} else {\n\t\t\t\t\tadjust = 0;\n\t\t\t\t\tmasking_lower_db = gfc.PSY.mask_adjust_short - adjust;\n\t\t\t\t}\n\t\t\t\tgfc.masking_lower = Math.pow(10.0,\n\t\t\t\t\t\tmasking_lower_db * 0.1);\n\n\t\t\t\t/*\n\t\t\t\t * init_outer_loop sets up cod_info, scalefac and xrpow\n\t\t\t\t */\n\t\t\t\tthis.quantize.init_outer_loop(gfc, cod_info);\n\t\t\t\tif (this.quantize.init_xrpow(gfc, cod_info, xrpow)) {\n\t\t\t\t\t/*\n\t\t\t\t\t * xr contains energy we will have to encode calculate the\n\t\t\t\t\t * masking abilities find some good quantization in\n\t\t\t\t\t * outer_loop\n\t\t\t\t\t */\n\t\t\t\t\tthis.quantize.qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n\t\t\t\t\t\t\tl3_xmin);\n\t\t\t\t\tthis.quantize.outer_loop(gfp, cod_info, l3_xmin, xrpow, ch,\n\t\t\t\t\t\t\ttarg_bits[ch]);\n\t\t\t\t}\n\n\t\t\t\tthis.quantize.iteration_finish_one(gfc, gr, ch);\n\t\t\t\tassert (cod_info.part2_3_length <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n\t\t\t\tassert (cod_info.part2_3_length <= targ_bits[ch]);\n\t\t\t} /* for ch */\n\t\t} /* for gr */\n\n\t\tthis.quantize.rv.ResvFrameEnd(gfc, mean_bits);\n\t}\n}\nmodule.exports = CBRNewIterationLoop;\n","function HuffCodeTab(len, max, tab, hl) {\n this.xlen = len;\n this.linmax = max;\n this.table = tab;\n this.hlen = hl;\n}\n\nvar Tables = {};\n\n\nTables.t1HB = [\n 1, 1,\n 1, 0\n];\n\nTables.t2HB = [\n 1, 2, 1,\n 3, 1, 1,\n 3, 2, 0\n];\n\nTables.t3HB = [\n 3, 2, 1,\n 1, 1, 1,\n 3, 2, 0\n];\n\nTables.t5HB = [\n 1, 2, 6, 5,\n 3, 1, 4, 4,\n 7, 5, 7, 1,\n 6, 1, 1, 0\n];\n\nTables.t6HB = [\n 7, 3, 5, 1,\n 6, 2, 3, 2,\n 5, 4, 4, 1,\n 3, 3, 2, 0\n];\n\nTables.t7HB = [\n 1, 2, 10, 19, 16, 10,\n 3, 3, 7, 10, 5, 3,\n 11, 4, 13, 17, 8, 4,\n 12, 11, 18, 15, 11, 2,\n 7, 6, 9, 14, 3, 1,\n 6, 4, 5, 3, 2, 0\n];\n\nTables.t8HB = [\n 3, 4, 6, 18, 12, 5,\n 5, 1, 2, 16, 9, 3,\n 7, 3, 5, 14, 7, 3,\n 19, 17, 15, 13, 10, 4,\n 13, 5, 8, 11, 5, 1,\n 12, 4, 4, 1, 1, 0\n];\n\nTables.t9HB = [\n 7, 5, 9, 14, 15, 7,\n 6, 4, 5, 5, 6, 7,\n 7, 6, 8, 8, 8, 5,\n 15, 6, 9, 10, 5, 1,\n 11, 7, 9, 6, 4, 1,\n 14, 4, 6, 2, 6, 0\n];\n\nTables.t10HB = [\n 1, 2, 10, 23, 35, 30, 12, 17,\n 3, 3, 8, 12, 18, 21, 12, 7,\n 11, 9, 15, 21, 32, 40, 19, 6,\n 14, 13, 22, 34, 46, 23, 18, 7,\n 20, 19, 33, 47, 27, 22, 9, 3,\n 31, 22, 41, 26, 21, 20, 5, 3,\n 14, 13, 10, 11, 16, 6, 5, 1,\n 9, 8, 7, 8, 4, 4, 2, 0\n];\n\nTables.t11HB = [\n 3, 4, 10, 24, 34, 33, 21, 15,\n 5, 3, 4, 10, 32, 17, 11, 10,\n 11, 7, 13, 18, 30, 31, 20, 5,\n 25, 11, 19, 59, 27, 18, 12, 5,\n 35, 33, 31, 58, 30, 16, 7, 5,\n 28, 26, 32, 19, 17, 15, 8, 14,\n 14, 12, 9, 13, 14, 9, 4, 1,\n 11, 4, 6, 6, 6, 3, 2, 0\n];\n\nTables.t12HB = [\n 9, 6, 16, 33, 41, 39, 38, 26,\n 7, 5, 6, 9, 23, 16, 26, 11,\n 17, 7, 11, 14, 21, 30, 10, 7,\n 17, 10, 15, 12, 18, 28, 14, 5,\n 32, 13, 22, 19, 18, 16, 9, 5,\n 40, 17, 31, 29, 17, 13, 4, 2,\n 27, 12, 11, 15, 10, 7, 4, 1,\n 27, 12, 8, 12, 6, 3, 1, 0\n];\n\nTables.t13HB = [\n 1, 5, 14, 21, 34, 51, 46, 71, 42, 52, 68, 52, 67, 44, 43, 19,\n 3, 4, 12, 19, 31, 26, 44, 33, 31, 24, 32, 24, 31, 35, 22, 14,\n 15, 13, 23, 36, 59, 49, 77, 65, 29, 40, 30, 40, 27, 33, 42, 16,\n 22, 20, 37, 61, 56, 79, 73, 64, 43, 76, 56, 37, 26, 31, 25, 14,\n 35, 16, 60, 57, 97, 75, 114, 91, 54, 73, 55, 41, 48, 53, 23, 24,\n 58, 27, 50, 96, 76, 70, 93, 84, 77, 58, 79, 29, 74, 49, 41, 17,\n 47, 45, 78, 74, 115, 94, 90, 79, 69, 83, 71, 50, 59, 38, 36, 15,\n 72, 34, 56, 95, 92, 85, 91, 90, 86, 73, 77, 65, 51, 44, 43, 42,\n 43, 20, 30, 44, 55, 78, 72, 87, 78, 61, 46, 54, 37, 30, 20, 16,\n 53, 25, 41, 37, 44, 59, 54, 81, 66, 76, 57, 54, 37, 18, 39, 11,\n 35, 33, 31, 57, 42, 82, 72, 80, 47, 58, 55, 21, 22, 26, 38, 22,\n 53, 25, 23, 38, 70, 60, 51, 36, 55, 26, 34, 23, 27, 14, 9, 7,\n 34, 32, 28, 39, 49, 75, 30, 52, 48, 40, 52, 28, 18, 17, 9, 5,\n 45, 21, 34, 64, 56, 50, 49, 45, 31, 19, 12, 15, 10, 7, 6, 3,\n 48, 23, 20, 39, 36, 35, 53, 21, 16, 23, 13, 10, 6, 1, 4, 2,\n 16, 15, 17, 27, 25, 20, 29, 11, 17, 12, 16, 8, 1, 1, 0, 1\n];\n\nTables.t15HB = [\n 7, 12, 18, 53, 47, 76, 124, 108, 89, 123, 108, 119, 107, 81, 122, 63,\n 13, 5, 16, 27, 46, 36, 61, 51, 42, 70, 52, 83, 65, 41, 59, 36,\n 19, 17, 15, 24, 41, 34, 59, 48, 40, 64, 50, 78, 62, 80, 56, 33,\n 29, 28, 25, 43, 39, 63, 55, 93, 76, 59, 93, 72, 54, 75, 50, 29,\n 52, 22, 42, 40, 67, 57, 95, 79, 72, 57, 89, 69, 49, 66, 46, 27,\n 77, 37, 35, 66, 58, 52, 91, 74, 62, 48, 79, 63, 90, 62, 40, 38,\n 125, 32, 60, 56, 50, 92, 78, 65, 55, 87, 71, 51, 73, 51, 70, 30,\n 109, 53, 49, 94, 88, 75, 66, 122, 91, 73, 56, 42, 64, 44, 21, 25,\n 90, 43, 41, 77, 73, 63, 56, 92, 77, 66, 47, 67, 48, 53, 36, 20,\n 71, 34, 67, 60, 58, 49, 88, 76, 67, 106, 71, 54, 38, 39, 23, 15,\n 109, 53, 51, 47, 90, 82, 58, 57, 48, 72, 57, 41, 23, 27, 62, 9,\n 86, 42, 40, 37, 70, 64, 52, 43, 70, 55, 42, 25, 29, 18, 11, 11,\n 118, 68, 30, 55, 50, 46, 74, 65, 49, 39, 24, 16, 22, 13, 14, 7,\n 91, 44, 39, 38, 34, 63, 52, 45, 31, 52, 28, 19, 14, 8, 9, 3,\n 123, 60, 58, 53, 47, 43, 32, 22, 37, 24, 17, 12, 15, 10, 2, 1,\n 71, 37, 34, 30, 28, 20, 17, 26, 21, 16, 10, 6, 8, 6, 2, 0\n];\n\nTables.t16HB = [\n 1, 5, 14, 44, 74, 63, 110, 93, 172, 149, 138, 242, 225, 195, 376, 17,\n 3, 4, 12, 20, 35, 62, 53, 47, 83, 75, 68, 119, 201, 107, 207, 9,\n 15, 13, 23, 38, 67, 58, 103, 90, 161, 72, 127, 117, 110, 209, 206, 16,\n 45, 21, 39, 69, 64, 114, 99, 87, 158, 140, 252, 212, 199, 387, 365, 26,\n 75, 36, 68, 65, 115, 101, 179, 164, 155, 264, 246, 226, 395, 382, 362, 9,\n 66, 30, 59, 56, 102, 185, 173, 265, 142, 253, 232, 400, 388, 378, 445, 16,\n 111, 54, 52, 100, 184, 178, 160, 133, 257, 244, 228, 217, 385, 366, 715, 10,\n 98, 48, 91, 88, 165, 157, 148, 261, 248, 407, 397, 372, 380, 889, 884, 8,\n 85, 84, 81, 159, 156, 143, 260, 249, 427, 401, 392, 383, 727, 713, 708, 7,\n 154, 76, 73, 141, 131, 256, 245, 426, 406, 394, 384, 735, 359, 710, 352, 11,\n 139, 129, 67, 125, 247, 233, 229, 219, 393, 743, 737, 720, 885, 882, 439, 4,\n 243, 120, 118, 115, 227, 223, 396, 746, 742, 736, 721, 712, 706, 223, 436, 6,\n 202, 224, 222, 218, 216, 389, 386, 381, 364, 888, 443, 707, 440, 437, 1728, 4,\n 747, 211, 210, 208, 370, 379, 734, 723, 714, 1735, 883, 877, 876, 3459, 865, 2,\n 377, 369, 102, 187, 726, 722, 358, 711, 709, 866, 1734, 871, 3458, 870, 434, 0,\n 12, 10, 7, 11, 10, 17, 11, 9, 13, 12, 10, 7, 5, 3, 1, 3\n];\n\nTables.t24HB = [\n 15, 13, 46, 80, 146, 262, 248, 434, 426, 669, 653, 649, 621, 517, 1032, 88,\n 14, 12, 21, 38, 71, 130, 122, 216, 209, 198, 327, 345, 319, 297, 279, 42,\n 47, 22, 41, 74, 68, 128, 120, 221, 207, 194, 182, 340, 315, 295, 541, 18,\n 81, 39, 75, 70, 134, 125, 116, 220, 204, 190, 178, 325, 311, 293, 271, 16,\n 147, 72, 69, 135, 127, 118, 112, 210, 200, 188, 352, 323, 306, 285, 540, 14,\n 263, 66, 129, 126, 119, 114, 214, 202, 192, 180, 341, 317, 301, 281, 262, 12,\n 249, 123, 121, 117, 113, 215, 206, 195, 185, 347, 330, 308, 291, 272, 520, 10,\n 435, 115, 111, 109, 211, 203, 196, 187, 353, 332, 313, 298, 283, 531, 381, 17,\n 427, 212, 208, 205, 201, 193, 186, 177, 169, 320, 303, 286, 268, 514, 377, 16,\n 335, 199, 197, 191, 189, 181, 174, 333, 321, 305, 289, 275, 521, 379, 371, 11,\n 668, 184, 183, 179, 175, 344, 331, 314, 304, 290, 277, 530, 383, 373, 366, 10,\n 652, 346, 171, 168, 164, 318, 309, 299, 287, 276, 263, 513, 375, 368, 362, 6,\n 648, 322, 316, 312, 307, 302, 292, 284, 269, 261, 512, 376, 370, 364, 359, 4,\n 620, 300, 296, 294, 288, 282, 273, 266, 515, 380, 374, 369, 365, 361, 357, 2,\n 1033, 280, 278, 274, 267, 264, 259, 382, 378, 372, 367, 363, 360, 358, 356, 0,\n 43, 20, 19, 17, 15, 13, 11, 9, 7, 6, 4, 7, 5, 3, 1, 3\n];\n\nTables.t32HB = [\n 1 << 0, 5 << 1, 4 << 1, 5 << 2, 6 << 1, 5 << 2, 4 << 2, 4 << 3,\n 7 << 1, 3 << 2, 6 << 2, 0 << 3, 7 << 2, 2 << 3, 3 << 3, 1 << 4\n];\n\nTables.t33HB = [\n 15 << 0, 14 << 1, 13 << 1, 12 << 2, 11 << 1, 10 << 2, 9 << 2, 8 << 3,\n 7 << 1, 6 << 2, 5 << 2, 4 << 3, 3 << 2, 2 << 3, 1 << 3, 0 << 4\n];\n\nTables.t1l = [\n 1, 4,\n 3, 5\n];\n\nTables.t2l = [\n 1, 4, 7,\n 4, 5, 7,\n 6, 7, 8\n];\n\nTables.t3l = [\n 2, 3, 7,\n 4, 4, 7,\n 6, 7, 8\n];\n\nTables.t5l = [\n 1, 4, 7, 8,\n 4, 5, 8, 9,\n 7, 8, 9, 10,\n 8, 8, 9, 10\n];\n\nTables.t6l = [\n 3, 4, 6, 8,\n 4, 4, 6, 7,\n 5, 6, 7, 8,\n 7, 7, 8, 9\n];\n\nTables.t7l = [\n 1, 4, 7, 9, 9, 10,\n 4, 6, 8, 9, 9, 10,\n 7, 7, 9, 10, 10, 11,\n 8, 9, 10, 11, 11, 11,\n 8, 9, 10, 11, 11, 12,\n 9, 10, 11, 12, 12, 12\n];\n\nTables.t8l = [\n 2, 4, 7, 9, 9, 10,\n 4, 4, 6, 10, 10, 10,\n 7, 6, 8, 10, 10, 11,\n 9, 10, 10, 11, 11, 12,\n 9, 9, 10, 11, 12, 12,\n 10, 10, 11, 11, 13, 13\n];\n\nTables.t9l = [\n 3, 4, 6, 7, 9, 10,\n 4, 5, 6, 7, 8, 10,\n 5, 6, 7, 8, 9, 10,\n 7, 7, 8, 9, 9, 10,\n 8, 8, 9, 9, 10, 11,\n 9, 9, 10, 10, 11, 11\n];\n\nTables.t10l = [\n 1, 4, 7, 9, 10, 10, 10, 11,\n 4, 6, 8, 9, 10, 11, 10, 10,\n 7, 8, 9, 10, 11, 12, 11, 11,\n 8, 9, 10, 11, 12, 12, 11, 12,\n 9, 10, 11, 12, 12, 12, 12, 12,\n 10, 11, 12, 12, 13, 13, 12, 13,\n 9, 10, 11, 12, 12, 12, 13, 13,\n 10, 10, 11, 12, 12, 13, 13, 13\n];\n\nTables.t11l = [\n 2, 4, 6, 8, 9, 10, 9, 10,\n 4, 5, 6, 8, 10, 10, 9, 10,\n 6, 7, 8, 9, 10, 11, 10, 10,\n 8, 8, 9, 11, 10, 12, 10, 11,\n 9, 10, 10, 11, 11, 12, 11, 12,\n 9, 10, 11, 12, 12, 13, 12, 13,\n 9, 9, 9, 10, 11, 12, 12, 12,\n 9, 9, 10, 11, 12, 12, 12, 12\n];\n\nTables.t12l = [\n 4, 4, 6, 8, 9, 10, 10, 10,\n 4, 5, 6, 7, 9, 9, 10, 10,\n 6, 6, 7, 8, 9, 10, 9, 10,\n 7, 7, 8, 8, 9, 10, 10, 10,\n 8, 8, 9, 9, 10, 10, 10, 11,\n 9, 9, 10, 10, 10, 11, 10, 11,\n 9, 9, 9, 10, 10, 11, 11, 12,\n 10, 10, 10, 11, 11, 11, 11, 12\n];\n\nTables.t13l = [\n 1, 5, 7, 8, 9, 10, 10, 11, 10, 11, 12, 12, 13, 13, 14, 14,\n 4, 6, 8, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 14, 14, 14,\n 7, 8, 9, 10, 11, 11, 12, 12, 11, 12, 12, 13, 13, 14, 15, 15,\n 8, 9, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 15,\n 9, 9, 11, 11, 12, 12, 13, 13, 12, 13, 13, 14, 14, 15, 15, 16,\n 10, 10, 11, 12, 12, 12, 13, 13, 13, 13, 14, 13, 15, 15, 16, 16,\n 10, 11, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 16, 16,\n 11, 11, 12, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 16, 18, 18,\n 10, 10, 11, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 16, 17, 17,\n 11, 11, 12, 12, 13, 13, 13, 15, 14, 15, 15, 16, 16, 16, 18, 17,\n 11, 12, 12, 13, 13, 14, 14, 15, 14, 15, 16, 15, 16, 17, 18, 19,\n 12, 12, 12, 13, 14, 14, 14, 14, 15, 15, 15, 16, 17, 17, 17, 18,\n 12, 13, 13, 14, 14, 15, 14, 15, 16, 16, 17, 17, 17, 18, 18, 18,\n 13, 13, 14, 15, 15, 15, 16, 16, 16, 16, 16, 17, 18, 17, 18, 18,\n 14, 14, 14, 15, 15, 15, 17, 16, 16, 19, 17, 17, 17, 19, 18, 18,\n 13, 14, 15, 16, 16, 16, 17, 16, 17, 17, 18, 18, 21, 20, 21, 18\n];\n\nTables.t15l = [\n 3, 5, 6, 8, 8, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 14,\n 5, 5, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 12, 13, 13,\n 6, 7, 7, 8, 9, 9, 10, 10, 10, 11, 11, 12, 12, 13, 13, 13,\n 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13,\n 8, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13,\n 9, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 14,\n 10, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 14, 14,\n 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 14,\n 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 14,\n 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14,\n 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 15, 14,\n 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15,\n 12, 12, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15,\n 12, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15,\n 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 14, 15,\n 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 15, 15, 15, 15\n];\n\nTables.t16_5l = [\n 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 11,\n 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 11,\n 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 12,\n 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 13,\n 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 12,\n 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 13,\n 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 13,\n 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 13,\n 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 13,\n 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 14,\n 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 13,\n 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 14,\n 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 14,\n 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 14,\n 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 14,\n 11, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 12\n];\n\nTables.t16l = [\n 1, 5, 7, 9, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 14, 10,\n 4, 6, 8, 9, 10, 11, 11, 11, 12, 12, 12, 13, 14, 13, 14, 10,\n 7, 8, 9, 10, 11, 11, 12, 12, 13, 12, 13, 13, 13, 14, 14, 11,\n 9, 9, 10, 11, 11, 12, 12, 12, 13, 13, 14, 14, 14, 15, 15, 12,\n 10, 10, 11, 11, 12, 12, 13, 13, 13, 14, 14, 14, 15, 15, 15, 11,\n 10, 10, 11, 11, 12, 13, 13, 14, 13, 14, 14, 15, 15, 15, 16, 12,\n 11, 11, 11, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 16, 12,\n 11, 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 17, 17, 12,\n 11, 12, 12, 13, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 12,\n 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 15, 16, 15, 13,\n 12, 13, 12, 13, 14, 14, 14, 14, 15, 16, 16, 16, 17, 17, 16, 12,\n 13, 13, 13, 13, 14, 14, 15, 16, 16, 16, 16, 16, 16, 15, 16, 13,\n 13, 14, 14, 14, 14, 15, 15, 15, 15, 17, 16, 16, 16, 16, 18, 13,\n 15, 14, 14, 14, 15, 15, 16, 16, 16, 18, 17, 17, 17, 19, 17, 13,\n 14, 15, 13, 14, 16, 16, 15, 16, 16, 17, 18, 17, 19, 17, 16, 13,\n 10, 10, 10, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10\n];\n\nTables.t24l = [\n 4, 5, 7, 8, 9, 10, 10, 11, 11, 12, 12, 12, 12, 12, 13, 10,\n 5, 6, 7, 8, 9, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 10,\n 7, 7, 8, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 12, 13, 9,\n 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 9,\n 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 9,\n 10, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 9,\n 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 9,\n 11, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 10,\n 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 10,\n 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 13, 13, 13, 10,\n 12, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10,\n 12, 12, 11, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 10,\n 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 10,\n 13, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 10,\n 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 6\n];\n\nTables.t32l = [\n 1 + 0, 4 + 1, 4 + 1, 5 + 2, 4 + 1, 6 + 2, 5 + 2, 6 + 3,\n 4 + 1, 5 + 2, 5 + 2, 6 + 3, 5 + 2, 6 + 3, 6 + 3, 6 + 4\n];\n\nTables.t33l = [\n 4 + 0, 4 + 1, 4 + 1, 4 + 2, 4 + 1, 4 + 2, 4 + 2, 4 + 3,\n 4 + 1, 4 + 2, 4 + 2, 4 + 3, 4 + 2, 4 + 3, 4 + 3, 4 + 4\n];\n\nTables.ht = [\n /* xlen, linmax, table, hlen */\n new HuffCodeTab(0, 0, null, null),\n new HuffCodeTab(2, 0, Tables.t1HB, Tables.t1l),\n new HuffCodeTab(3, 0, Tables.t2HB, Tables.t2l),\n new HuffCodeTab(3, 0, Tables.t3HB, Tables.t3l),\n new HuffCodeTab(0, 0, null, null), /* Apparently not used */\n new HuffCodeTab(4, 0, Tables.t5HB, Tables.t5l),\n new HuffCodeTab(4, 0, Tables.t6HB, Tables.t6l),\n new HuffCodeTab(6, 0, Tables.t7HB, Tables.t7l),\n new HuffCodeTab(6, 0, Tables.t8HB, Tables.t8l),\n new HuffCodeTab(6, 0, Tables.t9HB, Tables.t9l),\n new HuffCodeTab(8, 0, Tables.t10HB, Tables.t10l),\n new HuffCodeTab(8, 0, Tables.t11HB, Tables.t11l),\n new HuffCodeTab(8, 0, Tables.t12HB, Tables.t12l),\n new HuffCodeTab(16, 0, Tables.t13HB, Tables.t13l),\n new HuffCodeTab(0, 0, null, Tables.t16_5l), /* Apparently not used */\n new HuffCodeTab(16, 0, Tables.t15HB, Tables.t15l),\n\n new HuffCodeTab(1, 1, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(2, 3, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(3, 7, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(4, 15, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(6, 63, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(8, 255, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(10, 1023, Tables.t16HB, Tables.t16l),\n new HuffCodeTab(13, 8191, Tables.t16HB, Tables.t16l),\n\n new HuffCodeTab(4, 15, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(5, 31, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(6, 63, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(7, 127, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(8, 255, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(9, 511, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(11, 2047, Tables.t24HB, Tables.t24l),\n new HuffCodeTab(13, 8191, Tables.t24HB, Tables.t24l),\n\n new HuffCodeTab(0, 0, Tables.t32HB, Tables.t32l),\n new HuffCodeTab(0, 0, Tables.t33HB, Tables.t33l),\n];\n\n/**\n * \n * for (i = 0; i < 16*16; i++) [\n * largetbl[i] = ((ht[16].hlen[i]) << 16) + ht[24].hlen[i];\n * ]\n * \n *\n */\nTables.largetbl = [\n 0x010004, 0x050005, 0x070007, 0x090008, 0x0a0009, 0x0a000a, 0x0b000a, 0x0b000b,\n 0x0c000b, 0x0c000c, 0x0c000c, 0x0d000c, 0x0d000c, 0x0d000c, 0x0e000d, 0x0a000a,\n 0x040005, 0x060006, 0x080007, 0x090008, 0x0a0009, 0x0b000a, 0x0b000a, 0x0b000b,\n 0x0c000b, 0x0c000b, 0x0c000c, 0x0d000c, 0x0e000c, 0x0d000c, 0x0e000c, 0x0a000a,\n 0x070007, 0x080007, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000b,\n 0x0d000b, 0x0c000b, 0x0d000b, 0x0d000c, 0x0d000c, 0x0e000c, 0x0e000d, 0x0b0009,\n 0x090008, 0x090008, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0c000b,\n 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0c0009,\n 0x0a0009, 0x0a0009, 0x0b0009, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000a, 0x0d000b,\n 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000d, 0x0b0009,\n 0x0a000a, 0x0a0009, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0e000b,\n 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0c0009,\n 0x0b000a, 0x0b000a, 0x0b000a, 0x0c000a, 0x0d000a, 0x0d000b, 0x0d000b, 0x0d000b,\n 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000d, 0x0c0009,\n 0x0b000b, 0x0b000a, 0x0c000a, 0x0c000a, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b,\n 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x0f000c, 0x11000d, 0x11000d, 0x0c000a,\n 0x0b000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b,\n 0x0f000b, 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000d, 0x10000d, 0x0c000a,\n 0x0c000b, 0x0c000b, 0x0c000b, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000b, 0x0f000c,\n 0x0f000c, 0x0f000c, 0x0f000c, 0x10000c, 0x0f000d, 0x10000d, 0x0f000d, 0x0d000a,\n 0x0c000c, 0x0d000b, 0x0c000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0e000c, 0x0e000c,\n 0x0f000c, 0x10000c, 0x10000c, 0x10000d, 0x11000d, 0x11000d, 0x10000d, 0x0c000a,\n 0x0d000c, 0x0d000c, 0x0d000b, 0x0d000b, 0x0e000b, 0x0e000c, 0x0f000c, 0x10000c,\n 0x10000c, 0x10000c, 0x10000c, 0x10000d, 0x10000d, 0x0f000d, 0x10000d, 0x0d000a,\n 0x0d000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x0f000c,\n 0x0f000c, 0x11000c, 0x10000d, 0x10000d, 0x10000d, 0x10000d, 0x12000d, 0x0d000a,\n 0x0f000c, 0x0e000c, 0x0e000c, 0x0e000c, 0x0f000c, 0x0f000c, 0x10000c, 0x10000c,\n 0x10000d, 0x12000d, 0x11000d, 0x11000d, 0x11000d, 0x13000d, 0x11000d, 0x0d000a,\n 0x0e000d, 0x0f000c, 0x0d000c, 0x0e000c, 0x10000c, 0x10000c, 0x0f000c, 0x10000d,\n 0x10000d, 0x11000d, 0x12000d, 0x11000d, 0x13000d, 0x11000d, 0x10000d, 0x0d000a,\n 0x0a0009, 0x0a0009, 0x0a0009, 0x0b0009, 0x0b0009, 0x0c0009, 0x0c0009, 0x0c0009,\n 0x0d0009, 0x0d0009, 0x0d0009, 0x0d000a, 0x0d000a, 0x0d000a, 0x0d000a, 0x0a0006\n];\n/**\n * \n * for (i = 0; i < 3*3; i++) [\n * table23[i] = ((ht[2].hlen[i]) << 16) + ht[3].hlen[i];\n * ]\n * \n *\n */\nTables.table23 = [\n 0x010002, 0x040003, 0x070007,\n 0x040004, 0x050004, 0x070007,\n 0x060006, 0x070007, 0x080008\n];\n\n/**\n * \n * for (i = 0; i < 4*4; i++) [\n * table56[i] = ((ht[5].hlen[i]) << 16) + ht[6].hlen[i];\n * ]\n * \n *\n */\nTables.table56 = [\n 0x010003, 0x040004, 0x070006, 0x080008, 0x040004, 0x050004, 0x080006, 0x090007,\n 0x070005, 0x080006, 0x090007, 0x0a0008, 0x080007, 0x080007, 0x090008, 0x0a0009\n];\n\nTables.bitrate_table = [\n [0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, -1], /* MPEG 2 */\n [0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, -1], /* MPEG 1 */\n [0, 8, 16, 24, 32, 40, 48, 56, 64, -1, -1, -1, -1, -1, -1, -1], /* MPEG 2.5 */\n];\n\n/**\n * MPEG 2, MPEG 1, MPEG 2.5.\n */\nTables.samplerate_table = [\n [22050, 24000, 16000, -1],\n [44100, 48000, 32000, -1],\n [11025, 12000, 8000, -1],\n];\n\n/**\n * This is the scfsi_band table from 2.4.2.7 of the IS.\n */\nTables.scfsi_band = [0, 6, 11, 16, 21];\n\nmodule.exports = Tables;\n","/*\n * quantize_pvt source file\n *\n * Copyright (c) 1999-2002 Takehiro Tominaga\n * Copyright (c) 2000-2002 Robert Hegemann\n * Copyright (c) 2001 Naoki Shibata\n * Copyright (c) 2002-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: QuantizePVT.java,v 1.24 2011/05/24 20:48:06 kenchis Exp $ */\nvar ScaleFac = require('./ScaleFac.js');\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\nvar MeanBits = require('./MeanBits.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nQuantizePVT.Q_MAX = (256 + 1);\nQuantizePVT.Q_MAX2 = 116;\nQuantizePVT.LARGE_BITS = 100000;\nQuantizePVT.IXMAX_VAL = 8206;\n\nfunction QuantizePVT() {\n\n var tak = null;\n var rv = null;\n var psy = null;\n\n this.setModules = function (_tk, _rv, _psy) {\n tak = _tk;\n rv = _rv;\n psy = _psy;\n };\n\n function POW20(x) {\n assert(0 <= (x + QuantizePVT.Q_MAX2) && x < QuantizePVT.Q_MAX);\n return pow20[x + QuantizePVT.Q_MAX2];\n }\n\n this.IPOW20 = function (x) {\n assert(0 <= x && x < QuantizePVT.Q_MAX);\n return ipow20[x];\n }\n\n /**\n * smallest such that 1.0+DBL_EPSILON != 1.0\n */\n var DBL_EPSILON = 2.2204460492503131e-016;\n\n /**\n * ix always <= 8191+15. see count_bits()\n */\n var IXMAX_VAL = QuantizePVT.IXMAX_VAL;\n\n var PRECALC_SIZE = (IXMAX_VAL + 2);\n\n var Q_MAX = QuantizePVT.Q_MAX;\n\n\n /**\n * \n * minimum possible number of\n * -cod_info.global_gain + ((scalefac[] + (cod_info.preflag ? pretab[sfb] : 0))\n * << (cod_info.scalefac_scale + 1)) + cod_info.subblock_gain[cod_info.window[sfb]] * 8;\n *\n * for long block, 0+((15+3)<<2) = 18*4 = 72\n * for short block, 0+(15<<2)+7*8 = 15*4+56 = 116\n * \n */\n var Q_MAX2 = QuantizePVT.Q_MAX2;\n\n var LARGE_BITS = QuantizePVT.LARGE_BITS;\n\n\n /**\n * Assuming dynamic range=96dB, this value should be 92\n */\n var NSATHSCALE = 100;\n\n /**\n * The following table is used to implement the scalefactor partitioning for\n * MPEG2 as described in section 2.4.3.2 of the IS. The indexing corresponds\n * to the way the tables are presented in the IS:\n *\n * [table_number][row_in_table][column of nr_of_sfb]\n */\n this.nr_of_sfb_block = [\n [[6, 5, 5, 5], [9, 9, 9, 9], [6, 9, 9, 9]],\n [[6, 5, 7, 3], [9, 9, 12, 6], [6, 9, 12, 6]],\n [[11, 10, 0, 0], [18, 18, 0, 0], [15, 18, 0, 0]],\n [[7, 7, 7, 0], [12, 12, 12, 0], [6, 15, 12, 0]],\n [[6, 6, 6, 3], [12, 9, 9, 6], [6, 12, 9, 6]],\n [[8, 8, 5, 0], [15, 12, 9, 0], [6, 18, 9, 0]]];\n\n /**\n * Table B.6: layer3 preemphasis\n */\n var pretab = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n 2, 2, 3, 3, 3, 2, 0];\n this.pretab = pretab;\n\n /**\n * Here are MPEG1 Table B.8 and MPEG2 Table B.1 -- Layer III scalefactor\n * bands.
\n * Index into this using a method such as:
\n * idx = fr_ps.header.sampling_frequency + (fr_ps.header.version * 3)\n */\n this.sfBandIndex = [\n // Table B.2.b: 22.05 kHz\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0, 4, 8, 12, 18, 24, 32, 42, 56, 74, 100, 132, 174, 192]\n , [0, 0, 0, 0, 0, 0, 0] // sfb21 pseudo sub bands\n , [0, 0, 0, 0, 0, 0, 0] // sfb12 pseudo sub bands\n ),\n /* Table B.2.c: 24 kHz */ /* docs: 332. mpg123(broken): 330 */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 114, 136, 162, 194, 232, 278, 332, 394, 464,\n 540, 576],\n [0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 136, 180, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.2.a: 16 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0, 4, 8, 12, 18, 26, 36, 48, 62, 80, 104, 134, 174, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.b: 44.1 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 52, 62, 74, 90, 110, 134, 162, 196, 238, 288, 342, 418,\n 576],\n [0, 4, 8, 12, 16, 22, 30, 40, 52, 66, 84, 106, 136, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.c: 48 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 42, 50, 60, 72, 88, 106, 128, 156, 190, 230, 276, 330, 384,\n 576],\n [0, 4, 8, 12, 16, 22, 28, 38, 50, 64, 80, 100, 126, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* Table B.8.a: 32 kHz */\n new ScaleFac([0, 4, 8, 12, 16, 20, 24, 30, 36, 44, 54, 66, 82, 102, 126, 156, 194, 240, 296, 364, 448, 550,\n 576],\n [0, 4, 8, 12, 16, 22, 30, 42, 58, 78, 104, 138, 180, 192]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 11.025 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3,\n 402 / 3, 522 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 12 kHz */\n new ScaleFac([0, 6, 12, 18, 24, 30, 36, 44, 54, 66, 80, 96, 116, 140, 168, 200, 238, 284, 336, 396, 464,\n 522, 576],\n [0 / 3, 12 / 3, 24 / 3, 36 / 3, 54 / 3, 78 / 3, 108 / 3, 144 / 3, 186 / 3, 240 / 3, 312 / 3,\n 402 / 3, 522 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n ),\n /* MPEG-2.5 8 kHz */\n new ScaleFac([0, 12, 24, 36, 48, 60, 72, 88, 108, 132, 160, 192, 232, 280, 336, 400, 476, 566, 568, 570,\n 572, 574, 576],\n [0 / 3, 24 / 3, 48 / 3, 72 / 3, 108 / 3, 156 / 3, 216 / 3, 288 / 3, 372 / 3, 480 / 3, 486 / 3,\n 492 / 3, 498 / 3, 576 / 3]\n , [0, 0, 0, 0, 0, 0, 0] /* sfb21 pseudo sub bands */\n , [0, 0, 0, 0, 0, 0, 0] /* sfb12 pseudo sub bands */\n )\n ];\n\n var pow20 = new_float(Q_MAX + Q_MAX2 + 1);\n var ipow20 = new_float(Q_MAX);\n var pow43 = new_float(PRECALC_SIZE);\n\n var adj43 = new_float(PRECALC_SIZE);\n this.adj43 = adj43;\n\n /**\n *
\n     * compute the ATH for each scalefactor band cd range: 0..96db\n     *\n     * Input: 3.3kHz signal 32767 amplitude (3.3kHz is where ATH is smallest =\n     * -5db) longblocks: sfb=12 en0/bw=-11db max_en0 = 1.3db shortblocks: sfb=5\n     * -9db 0db\n     *\n     * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) longblocks: amp=1\n     * sfb=12 en0/bw=-103 db max_en0 = -92db amp=32767 sfb=12 -12 db -1.4db\n     *\n     * Input: 1 1 1 1 1 1 1 -1 -1 -1 -1 -1 -1 -1 (repeated) shortblocks: amp=1\n     * sfb=5 en0/bw= -99 -86 amp=32767 sfb=5 -9 db 4db\n     *\n     *\n     * MAX energy of largest wave at 3.3kHz = 1db AVE energy of largest wave at\n     * 3.3kHz = -11db Let's take AVE: -11db = maximum signal in sfb=12. Dynamic\n     * range of CD: 96db. Therefor energy of smallest audible wave in sfb=12 =\n     * -11 - 96 = -107db = ATH at 3.3kHz.\n     *\n     * ATH formula for this wave: -5db. To adjust to LAME scaling, we need ATH =\n     * ATH_formula - 103 (db) ATH = ATH * 2.5e-10 (ener)\n     * 
\n */\n function ATHmdct(gfp, f) {\n var ath = psy.ATHformula(f, gfp);\n\n ath -= NSATHSCALE;\n\n /* modify the MDCT scaling for the ATH and convert to energy */\n ath = Math.pow(10.0, ath / 10.0 + gfp.ATHlower);\n return ath;\n }\n\n function compute_ath(gfp) {\n var ATH_l = gfp.internal_flags.ATH.l;\n var ATH_psfb21 = gfp.internal_flags.ATH.psfb21;\n var ATH_s = gfp.internal_flags.ATH.s;\n var ATH_psfb12 = gfp.internal_flags.ATH.psfb12;\n var gfc = gfp.internal_flags;\n var samp_freq = gfp.out_samplerate;\n\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n var start = gfc.scalefac_band.l[sfb];\n var end = gfc.scalefac_band.l[sfb + 1];\n ATH_l[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 576);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_l[sfb] = Math.min(ATH_l[sfb], ATH_f);\n }\n }\n\n for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {\n var start = gfc.scalefac_band.psfb21[sfb];\n var end = gfc.scalefac_band.psfb21[sfb + 1];\n ATH_psfb21[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 576);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_psfb21[sfb] = Math.min(ATH_psfb21[sfb], ATH_f);\n }\n }\n\n for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n ATH_s[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 192);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_s[sfb] = Math.min(ATH_s[sfb], ATH_f);\n }\n ATH_s[sfb] *= (gfc.scalefac_band.s[sfb + 1] - gfc.scalefac_band.s[sfb]);\n }\n\n for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {\n var start = gfc.scalefac_band.psfb12[sfb];\n var end = gfc.scalefac_band.psfb12[sfb + 1];\n ATH_psfb12[sfb] = Float.MAX_VALUE;\n for (var i = start; i < end; i++) {\n var freq = i * samp_freq / (2 * 192);\n var ATH_f = ATHmdct(gfp, freq);\n /* freq in kHz */\n ATH_psfb12[sfb] = Math.min(ATH_psfb12[sfb], ATH_f);\n }\n /* not sure about the following */\n ATH_psfb12[sfb] *= (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12]);\n }\n\n /*\n * no-ATH mode: reduce ATH to -200 dB\n */\n if (gfp.noATH) {\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n ATH_l[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.PSFB21; sfb++) {\n ATH_psfb21[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.SBMAX_s; sfb++) {\n ATH_s[sfb] = 1E-20;\n }\n for (var sfb = 0; sfb < Encoder.PSFB12; sfb++) {\n ATH_psfb12[sfb] = 1E-20;\n }\n }\n\n /*\n * work in progress, don't rely on it too much\n */\n gfc.ATH.floor = 10. * Math.log10(ATHmdct(gfp, -1.));\n }\n\n /**\n * initialization for iteration_loop\n */\n this.iteration_init = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n var i;\n\n if (gfc.iteration_init_init == 0) {\n gfc.iteration_init_init = 1;\n\n l3_side.main_data_begin = 0;\n compute_ath(gfp);\n\n pow43[0] = 0.0;\n for (i = 1; i < PRECALC_SIZE; i++)\n pow43[i] = Math.pow(i, 4.0 / 3.0);\n\n for (i = 0; i < PRECALC_SIZE - 1; i++)\n adj43[i] = ((i + 1) - Math.pow(\n 0.5 * (pow43[i] + pow43[i + 1]), 0.75));\n adj43[i] = 0.5;\n\n for (i = 0; i < Q_MAX; i++)\n ipow20[i] = Math.pow(2.0, (i - 210) * -0.1875);\n for (i = 0; i <= Q_MAX + Q_MAX2; i++)\n pow20[i] = Math.pow(2.0, (i - 210 - Q_MAX2) * 0.25);\n\n tak.huffman_init(gfc);\n\n {\n var bass, alto, treble, sfb21;\n\n i = (gfp.exp_nspsytune >> 2) & 63;\n if (i >= 32)\n i -= 64;\n bass = Math.pow(10, i / 4.0 / 10.0);\n\n i = (gfp.exp_nspsytune >> 8) & 63;\n if (i >= 32)\n i -= 64;\n alto = Math.pow(10, i / 4.0 / 10.0);\n\n i = (gfp.exp_nspsytune >> 14) & 63;\n if (i >= 32)\n i -= 64;\n treble = Math.pow(10, i / 4.0 / 10.0);\n\n /*\n * to be compatible with Naoki's original code, the next 6 bits\n * define only the amount of changing treble for sfb21\n */\n i = (gfp.exp_nspsytune >> 20) & 63;\n if (i >= 32)\n i -= 64;\n sfb21 = treble * Math.pow(10, i / 4.0 / 10.0);\n for (i = 0; i < Encoder.SBMAX_l; i++) {\n var f;\n if (i <= 6)\n f = bass;\n else if (i <= 13)\n f = alto;\n else if (i <= 20)\n f = treble;\n else\n f = sfb21;\n\n gfc.nsPsy.longfact[i] = f;\n }\n for (i = 0; i < Encoder.SBMAX_s; i++) {\n var f;\n if (i <= 5)\n f = bass;\n else if (i <= 10)\n f = alto;\n else if (i <= 11)\n f = treble;\n else\n f = sfb21;\n\n gfc.nsPsy.shortfact[i] = f;\n }\n }\n }\n }\n\n /**\n * allocate bits among 2 channels based on PE
\n * mt 6/99
\n * bugfixes rh 8/01: often allocated more than the allowed 4095 bits\n */\n this.on_pe = function (gfp, pe,\n targ_bits, mean_bits, gr, cbr) {\n var gfc = gfp.internal_flags;\n var tbits = 0, bits;\n var add_bits = new_int(2);\n var ch;\n\n /* allocate targ_bits for granule */\n var mb = new MeanBits(tbits);\n var extra_bits = rv.ResvMaxBits(gfp, mean_bits, mb, cbr);\n tbits = mb.bits;\n /* maximum allowed bits for this granule */\n var max_bits = tbits + extra_bits;\n if (max_bits > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n // hard limit per granule\n max_bits = LameInternalFlags.MAX_BITS_PER_GRANULE;\n }\n for (bits = 0, ch = 0; ch < gfc.channels_out; ++ch) {\n /******************************************************************\n * allocate bits for each channel\n ******************************************************************/\n targ_bits[ch] = Math.min(LameInternalFlags.MAX_BITS_PER_CHANNEL,\n tbits / gfc.channels_out);\n\n add_bits[ch] = 0 | (targ_bits[ch] * pe[gr][ch] / 700.0 - targ_bits[ch]);\n\n /* at most increase bits by 1.5*average */\n if (add_bits[ch] > mean_bits * 3 / 4)\n add_bits[ch] = mean_bits * 3 / 4;\n if (add_bits[ch] < 0)\n add_bits[ch] = 0;\n\n if (add_bits[ch] + targ_bits[ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL)\n add_bits[ch] = Math.max(0,\n LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[ch]);\n\n bits += add_bits[ch];\n }\n if (bits > extra_bits) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n add_bits[ch] = extra_bits * add_bits[ch] / bits;\n }\n }\n\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[ch] += add_bits[ch];\n extra_bits -= add_bits[ch];\n }\n\n for (bits = 0, ch = 0; ch < gfc.channels_out; ++ch) {\n bits += targ_bits[ch];\n }\n if (bits > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n var sum = 0;\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[ch] *= LameInternalFlags.MAX_BITS_PER_GRANULE;\n targ_bits[ch] /= bits;\n sum += targ_bits[ch];\n }\n assert(sum <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n }\n\n return max_bits;\n }\n\n this.reduce_side = function (targ_bits, ms_ener_ratio, mean_bits, max_bits) {\n assert(max_bits <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n assert(targ_bits[0] + targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n\n /*\n * ms_ener_ratio = 0: allocate 66/33 mid/side fac=.33 ms_ener_ratio =.5:\n * allocate 50/50 mid/side fac= 0\n */\n /* 75/25 split is fac=.5 */\n var fac = .33 * (.5 - ms_ener_ratio) / .5;\n if (fac < 0)\n fac = 0;\n if (fac > .5)\n fac = .5;\n\n /* number of bits to move from side channel to mid channel */\n /* move_bits = fac*targ_bits[1]; */\n var move_bits = 0 | (fac * .5 * (targ_bits[0] + targ_bits[1]));\n\n if (move_bits > LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[0]) {\n move_bits = LameInternalFlags.MAX_BITS_PER_CHANNEL - targ_bits[0];\n }\n if (move_bits < 0)\n move_bits = 0;\n\n if (targ_bits[1] >= 125) {\n /* dont reduce side channel below 125 bits */\n if (targ_bits[1] - move_bits > 125) {\n\n /* if mid channel already has 2x more than average, dont bother */\n /* mean_bits = bits per granule (for both channels) */\n if (targ_bits[0] < mean_bits)\n targ_bits[0] += move_bits;\n targ_bits[1] -= move_bits;\n } else {\n targ_bits[0] += targ_bits[1] - 125;\n targ_bits[1] = 125;\n }\n }\n\n move_bits = targ_bits[0] + targ_bits[1];\n if (move_bits > max_bits) {\n targ_bits[0] = (max_bits * targ_bits[0]) / move_bits;\n targ_bits[1] = (max_bits * targ_bits[1]) / move_bits;\n }\n assert(targ_bits[0] <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n assert(targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n assert(targ_bits[0] + targ_bits[1] <= LameInternalFlags.MAX_BITS_PER_GRANULE);\n };\n\n /**\n * Robert Hegemann 2001-04-27:\n * this adjusts the ATH, keeping the original noise floor\n * affects the higher frequencies more than the lower ones\n */\n this.athAdjust = function (a, x, athFloor) {\n /*\n * work in progress\n */\n var o = 90.30873362;\n var p = 94.82444863;\n var u = Util.FAST_LOG10_X(x, 10.0);\n var v = a * a;\n var w = 0.0;\n u -= athFloor;\n /* undo scaling */\n if (v > 1E-20)\n w = 1. + Util.FAST_LOG10_X(v, 10.0 / o);\n if (w < 0)\n w = 0.;\n u *= w;\n u += athFloor + o - p;\n /* redo scaling */\n\n return Math.pow(10., 0.1 * u);\n };\n\n /**\n * Calculate the allowed distortion for each scalefactor band, as determined\n * by the psychoacoustic model. xmin(sb) = ratio(sb) * en(sb) / bw(sb)\n *\n * returns number of sfb's with energy > ATH\n */\n this.calc_xmin = function (gfp, ratio, cod_info, pxmin) {\n var pxminPos = 0;\n var gfc = gfp.internal_flags;\n var gsfb, j = 0, ath_over = 0;\n var ATH = gfc.ATH;\n var xr = cod_info.xr;\n var enable_athaa_fix = (gfp.VBR == VbrMode.vbr_mtrh) ? 1 : 0;\n var masking_lower = gfc.masking_lower;\n\n if (gfp.VBR == VbrMode.vbr_mtrh || gfp.VBR == VbrMode.vbr_mt) {\n /* was already done in PSY-Model */\n masking_lower = 1.0;\n }\n\n for (gsfb = 0; gsfb < cod_info.psy_lmax; gsfb++) {\n var en0, xmin;\n var rh1, rh2;\n var width, l;\n\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n xmin = athAdjust(ATH.adjust, ATH.l[gsfb], ATH.floor);\n else\n xmin = ATH.adjust * ATH.l[gsfb];\n\n width = cod_info.width[gsfb];\n rh1 = xmin / width;\n rh2 = DBL_EPSILON;\n l = width >> 1;\n en0 = 0.0;\n do {\n var xa, xb;\n xa = xr[j] * xr[j];\n en0 += xa;\n rh2 += (xa < rh1) ? xa : rh1;\n j++;\n xb = xr[j] * xr[j];\n en0 += xb;\n rh2 += (xb < rh1) ? xb : rh1;\n j++;\n } while (--l > 0);\n if (en0 > xmin)\n ath_over++;\n\n if (gsfb == Encoder.SBPSY_l) {\n var x = xmin * gfc.nsPsy.longfact[gsfb];\n if (rh2 < x) {\n rh2 = x;\n }\n }\n if (enable_athaa_fix != 0) {\n xmin = rh2;\n }\n if (!gfp.ATHonly) {\n var e = ratio.en.l[gsfb];\n if (e > 0.0) {\n var x;\n x = en0 * ratio.thm.l[gsfb] * masking_lower / e;\n if (enable_athaa_fix != 0)\n x *= gfc.nsPsy.longfact[gsfb];\n if (xmin < x)\n xmin = x;\n }\n }\n if (enable_athaa_fix != 0)\n pxmin[pxminPos++] = xmin;\n else\n pxmin[pxminPos++] = xmin * gfc.nsPsy.longfact[gsfb];\n }\n /* end of long block loop */\n\n /* use this function to determine the highest non-zero coeff */\n var max_nonzero = 575;\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type, but not SHORT\n var k = 576;\n while (k-- != 0 && BitStream.EQ(xr[k], 0)) {\n max_nonzero = k;\n }\n }\n cod_info.max_nonzero_coeff = max_nonzero;\n\n for (var sfb = cod_info.sfb_smin; gsfb < cod_info.psymax; sfb++, gsfb += 3) {\n var width, b;\n var tmpATH;\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n tmpATH = athAdjust(ATH.adjust, ATH.s[sfb], ATH.floor);\n else\n tmpATH = ATH.adjust * ATH.s[sfb];\n\n width = cod_info.width[gsfb];\n for (b = 0; b < 3; b++) {\n var en0 = 0.0, xmin;\n var rh1, rh2;\n var l = width >> 1;\n\n rh1 = tmpATH / width;\n rh2 = DBL_EPSILON;\n do {\n var xa, xb;\n xa = xr[j] * xr[j];\n en0 += xa;\n rh2 += (xa < rh1) ? xa : rh1;\n j++;\n xb = xr[j] * xr[j];\n en0 += xb;\n rh2 += (xb < rh1) ? xb : rh1;\n j++;\n } while (--l > 0);\n if (en0 > tmpATH)\n ath_over++;\n if (sfb == Encoder.SBPSY_s) {\n var x = tmpATH * gfc.nsPsy.shortfact[sfb];\n if (rh2 < x) {\n rh2 = x;\n }\n }\n if (enable_athaa_fix != 0)\n xmin = rh2;\n else\n xmin = tmpATH;\n\n if (!gfp.ATHonly && !gfp.ATHshort) {\n var e = ratio.en.s[sfb][b];\n if (e > 0.0) {\n var x;\n x = en0 * ratio.thm.s[sfb][b] * masking_lower / e;\n if (enable_athaa_fix != 0)\n x *= gfc.nsPsy.shortfact[sfb];\n if (xmin < x)\n xmin = x;\n }\n }\n if (enable_athaa_fix != 0)\n pxmin[pxminPos++] = xmin;\n else\n pxmin[pxminPos++] = xmin * gfc.nsPsy.shortfact[sfb];\n }\n /* b */\n if (gfp.useTemporal) {\n if (pxmin[pxminPos - 3] > pxmin[pxminPos - 3 + 1])\n pxmin[pxminPos - 3 + 1] += (pxmin[pxminPos - 3] - pxmin[pxminPos - 3 + 1])\n * gfc.decay;\n if (pxmin[pxminPos - 3 + 1] > pxmin[pxminPos - 3 + 2])\n pxmin[pxminPos - 3 + 2] += (pxmin[pxminPos - 3 + 1] - pxmin[pxminPos - 3 + 2])\n * gfc.decay;\n }\n }\n /* end of short block sfb loop */\n\n return ath_over;\n };\n\n function StartLine(j) {\n this.s = j;\n }\n\n this.calc_noise_core = function (cod_info, startline, l, step) {\n var noise = 0;\n var j = startline.s;\n var ix = cod_info.l3_enc;\n\n if (j > cod_info.count1) {\n while ((l--) != 0) {\n var temp;\n temp = cod_info.xr[j];\n j++;\n noise += temp * temp;\n temp = cod_info.xr[j];\n j++;\n noise += temp * temp;\n }\n } else if (j > cod_info.big_values) {\n var ix01 = new_float(2);\n ix01[0] = 0;\n ix01[1] = step;\n while ((l--) != 0) {\n var temp;\n temp = Math.abs(cod_info.xr[j]) - ix01[ix[j]];\n j++;\n noise += temp * temp;\n temp = Math.abs(cod_info.xr[j]) - ix01[ix[j]];\n j++;\n noise += temp * temp;\n }\n } else {\n while ((l--) != 0) {\n var temp;\n temp = Math.abs(cod_info.xr[j]) - pow43[ix[j]] * step;\n j++;\n noise += temp * temp;\n temp = Math.abs(cod_info.xr[j]) - pow43[ix[j]] * step;\n j++;\n noise += temp * temp;\n }\n }\n\n startline.s = j;\n return noise;\n }\n\n /**\n *
\n     * -oo dB  =>  -1.00\n     * - 6 dB  =>  -0.97\n     * - 3 dB  =>  -0.80\n     * - 2 dB  =>  -0.64\n     * - 1 dB  =>  -0.38\n     *   0 dB  =>   0.00\n     * + 1 dB  =>  +0.49\n     * + 2 dB  =>  +1.06\n     * + 3 dB  =>  +1.68\n     * + 6 dB  =>  +3.69\n     * +10 dB  =>  +6.45\n     * 
\n */\n this.calc_noise = function (cod_info, l3_xmin, distort, res, prev_noise) {\n var distortPos = 0;\n var l3_xminPos = 0;\n var sfb, l, over = 0;\n var over_noise_db = 0;\n /* 0 dB relative to masking */\n var tot_noise_db = 0;\n /* -200 dB relative to masking */\n var max_noise = -20.0;\n var j = 0;\n var scalefac = cod_info.scalefac;\n var scalefacPos = 0;\n\n res.over_SSD = 0;\n\n for (sfb = 0; sfb < cod_info.psymax; sfb++) {\n var s = cod_info.global_gain\n - (((scalefac[scalefacPos++]) + (cod_info.preflag != 0 ? pretab[sfb]\n : 0)) << (cod_info.scalefac_scale + 1))\n - cod_info.subblock_gain[cod_info.window[sfb]] * 8;\n var noise = 0.0;\n\n if (prev_noise != null && (prev_noise.step[sfb] == s)) {\n\n /* use previously computed values */\n noise = prev_noise.noise[sfb];\n j += cod_info.width[sfb];\n distort[distortPos++] = noise / l3_xmin[l3_xminPos++];\n\n noise = prev_noise.noise_log[sfb];\n\n } else {\n var step = POW20(s);\n l = cod_info.width[sfb] >> 1;\n\n if ((j + cod_info.width[sfb]) > cod_info.max_nonzero_coeff) {\n var usefullsize;\n usefullsize = cod_info.max_nonzero_coeff - j + 1;\n\n if (usefullsize > 0)\n l = usefullsize >> 1;\n else\n l = 0;\n }\n\n var sl = new StartLine(j);\n noise = this.calc_noise_core(cod_info, sl, l, step);\n j = sl.s;\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.step[sfb] = s;\n prev_noise.noise[sfb] = noise;\n }\n\n noise = distort[distortPos++] = noise / l3_xmin[l3_xminPos++];\n\n /* multiplying here is adding in dB, but can overflow */\n noise = Util.FAST_LOG10(Math.max(noise, 1E-20));\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.noise_log[sfb] = noise;\n }\n }\n\n if (prev_noise != null) {\n /* save noise values */\n prev_noise.global_gain = cod_info.global_gain;\n }\n\n tot_noise_db += noise;\n\n if (noise > 0.0) {\n var tmp;\n\n tmp = Math.max(0 | (noise * 10 + .5), 1);\n res.over_SSD += tmp * tmp;\n\n over++;\n /* multiplying here is adding in dB -but can overflow */\n /* over_noise *= noise; */\n over_noise_db += noise;\n }\n max_noise = Math.max(max_noise, noise);\n\n }\n\n res.over_count = over;\n res.tot_noise = tot_noise_db;\n res.over_noise = over_noise_db;\n res.max_noise = max_noise;\n\n return over;\n }\n\n /**\n * updates plotting data\n *\n * Mark Taylor 2000-??-??\n *\n * Robert Hegemann: moved noise/distortion calc into it\n */\n this.set_pinfo = function (gfp, cod_info, ratio, gr, ch) {\n var gfc = gfp.internal_flags;\n var sfb, sfb2;\n var l;\n var en0, en1;\n var ifqstep = (cod_info.scalefac_scale == 0) ? .5 : 1.0;\n var scalefac = cod_info.scalefac;\n\n var l3_xmin = new_float(L3Side.SFBMAX);\n var xfsf = new_float(L3Side.SFBMAX);\n var noise = new CalcNoiseResult();\n\n calc_xmin(gfp, ratio, cod_info, l3_xmin);\n calc_noise(cod_info, l3_xmin, xfsf, noise, null);\n\n var j = 0;\n sfb2 = cod_info.sfb_lmax;\n if (cod_info.block_type != Encoder.SHORT_TYPE\n && 0 == cod_info.mixed_block_flag)\n sfb2 = 22;\n for (sfb = 0; sfb < sfb2; sfb++) {\n var start = gfc.scalefac_band.l[sfb];\n var end = gfc.scalefac_band.l[sfb + 1];\n var bw = end - start;\n for (en0 = 0.0; j < end; j++)\n en0 += cod_info.xr[j] * cod_info.xr[j];\n en0 /= bw;\n /* convert to MDCT units */\n /* scaling so it shows up on FFT plot */\n en1 = 1e15;\n gfc.pinfo.en[gr][ch][sfb] = en1 * en0;\n gfc.pinfo.xfsf[gr][ch][sfb] = en1 * l3_xmin[sfb] * xfsf[sfb] / bw;\n\n if (ratio.en.l[sfb] > 0 && !gfp.ATHonly)\n en0 = en0 / ratio.en.l[sfb];\n else\n en0 = 0.0;\n\n gfc.pinfo.thr[gr][ch][sfb] = en1\n * Math.max(en0 * ratio.thm.l[sfb], gfc.ATH.l[sfb]);\n\n /* there is no scalefactor bands >= SBPSY_l */\n gfc.pinfo.LAMEsfb[gr][ch][sfb] = 0;\n if (cod_info.preflag != 0 && sfb >= 11)\n gfc.pinfo.LAMEsfb[gr][ch][sfb] = -ifqstep * pretab[sfb];\n\n if (sfb < Encoder.SBPSY_l) {\n /* scfsi should be decoded by caller side */\n assert(scalefac[sfb] >= 0);\n gfc.pinfo.LAMEsfb[gr][ch][sfb] -= ifqstep * scalefac[sfb];\n }\n }\n /* for sfb */\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n sfb2 = sfb;\n for (sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n var bw = end - start;\n for (var i = 0; i < 3; i++) {\n for (en0 = 0.0, l = start; l < end; l++) {\n en0 += cod_info.xr[j] * cod_info.xr[j];\n j++;\n }\n en0 = Math.max(en0 / bw, 1e-20);\n /* convert to MDCT units */\n /* scaling so it shows up on FFT plot */\n en1 = 1e15;\n\n gfc.pinfo.en_s[gr][ch][3 * sfb + i] = en1 * en0;\n gfc.pinfo.xfsf_s[gr][ch][3 * sfb + i] = en1 * l3_xmin[sfb2]\n * xfsf[sfb2] / bw;\n if (ratio.en.s[sfb][i] > 0)\n en0 = en0 / ratio.en.s[sfb][i];\n else\n en0 = 0.0;\n if (gfp.ATHonly || gfp.ATHshort)\n en0 = 0;\n\n gfc.pinfo.thr_s[gr][ch][3 * sfb + i] = en1\n * Math.max(en0 * ratio.thm.s[sfb][i],\n gfc.ATH.s[sfb]);\n\n /* there is no scalefactor bands >= SBPSY_s */\n gfc.pinfo.LAMEsfb_s[gr][ch][3 * sfb + i] = -2.0\n * cod_info.subblock_gain[i];\n if (sfb < Encoder.SBPSY_s) {\n gfc.pinfo.LAMEsfb_s[gr][ch][3 * sfb + i] -= ifqstep\n * scalefac[sfb2];\n }\n sfb2++;\n }\n }\n }\n /* block type short */\n gfc.pinfo.LAMEqss[gr][ch] = cod_info.global_gain;\n gfc.pinfo.LAMEmainbits[gr][ch] = cod_info.part2_3_length\n + cod_info.part2_length;\n gfc.pinfo.LAMEsfbits[gr][ch] = cod_info.part2_length;\n\n gfc.pinfo.over[gr][ch] = noise.over_count;\n gfc.pinfo.max_noise[gr][ch] = noise.max_noise * 10.0;\n gfc.pinfo.over_noise[gr][ch] = noise.over_noise * 10.0;\n gfc.pinfo.tot_noise[gr][ch] = noise.tot_noise * 10.0;\n gfc.pinfo.over_SSD[gr][ch] = noise.over_SSD;\n }\n\n /**\n * updates plotting data for a whole frame\n *\n * Robert Hegemann 2000-10-21\n */\n function set_frame_pinfo(gfp, ratio) {\n var gfc = gfp.internal_flags;\n\n gfc.masking_lower = 1.0;\n\n /*\n * for every granule and channel patch l3_enc and set info\n */\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n var scalefac_sav = new_int(L3Side.SFBMAX);\n System.arraycopy(cod_info.scalefac, 0, scalefac_sav, 0,\n scalefac_sav.length);\n\n /*\n * reconstruct the scalefactors in case SCFSI was used\n */\n if (gr == 1) {\n var sfb;\n for (sfb = 0; sfb < cod_info.sfb_lmax; sfb++) {\n if (cod_info.scalefac[sfb] < 0) /* scfsi */\n cod_info.scalefac[sfb] = gfc.l3_side.tt[0][ch].scalefac[sfb];\n }\n }\n\n set_pinfo(gfp, cod_info, ratio[gr][ch], gr, ch);\n System.arraycopy(scalefac_sav, 0, cod_info.scalefac, 0,\n scalefac_sav.length);\n }\n /* for ch */\n }\n /* for gr */\n }\n\n}\n\nmodule.exports = QuantizePVT;\n","/*\n *\tMP3 huffman table selecting and bit counting\n *\n *\tCopyright (c) 1999-2005 Takehiro TOMINAGA\n *\tCopyright (c) 2002-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\t See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Takehiro.java,v 1.26 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Encoder = require('./Encoder.js');\nvar Tables = require('./Tables.js');\nvar GrInfo = require('./GrInfo.js');\nvar QuantizePVT = require('./QuantizePVT.js');\n\n\nfunction Takehiro() {\n\n var qupvt = null;\n this.qupvt = null;\n\n this.setModules = function (_qupvt) {\n this.qupvt = _qupvt;\n qupvt = _qupvt;\n }\n\n function Bits(b) {\n this.bits = 0 | b;\n }\n\n var subdv_table = [[0, 0], /* 0 bands */\n [0, 0], /* 1 bands */\n [0, 0], /* 2 bands */\n [0, 0], /* 3 bands */\n [0, 0], /* 4 bands */\n [0, 1], /* 5 bands */\n [1, 1], /* 6 bands */\n [1, 1], /* 7 bands */\n [1, 2], /* 8 bands */\n [2, 2], /* 9 bands */\n [2, 3], /* 10 bands */\n [2, 3], /* 11 bands */\n [3, 4], /* 12 bands */\n [3, 4], /* 13 bands */\n [3, 4], /* 14 bands */\n [4, 5], /* 15 bands */\n [4, 5], /* 16 bands */\n [4, 6], /* 17 bands */\n [5, 6], /* 18 bands */\n [5, 6], /* 19 bands */\n [5, 7], /* 20 bands */\n [6, 7], /* 21 bands */\n [6, 7], /* 22 bands */\n ];\n\n /**\n * nonlinear quantization of xr More accurate formula than the ISO formula.\n * Takes into account the fact that we are quantizing xr . ix, but we want\n * ix^4/3 to be as close as possible to x^4/3. (taking the nearest int would\n * mean ix is as close as possible to xr, which is different.)\n *\n * From Segher Boessenkool 11/1999\n *\n * 09/2000: ASM code removed in favor of IEEE754 hack by Takehiro Tominaga.\n * If you need the ASM code, check CVS circa Aug 2000.\n *\n * 01/2004: Optimizations by Gabriel Bouvigne\n */\n function quantize_lines_xrpow_01(l, istep, xr, xrPos, ix, ixPos) {\n var compareval0 = (1.0 - 0.4054) / istep;\n\n assert(l > 0);\n l = l >> 1;\n while ((l--) != 0) {\n ix[ixPos++] = (compareval0 > xr[xrPos++]) ? 0 : 1;\n ix[ixPos++] = (compareval0 > xr[xrPos++]) ? 0 : 1;\n }\n }\n\n /**\n * XRPOW_FTOI is a macro to convert floats to ints.
\n * if XRPOW_FTOI(x) = nearest_int(x), then QUANTFAC(x)=adj43asm[x]
\n * ROUNDFAC= -0.0946
\n *\n * if XRPOW_FTOI(x) = floor(x), then QUANTFAC(x)=asj43[x]
\n * ROUNDFAC=0.4054
\n *\n * Note: using floor() or 0| is extremely slow. On machines where the\n * TAKEHIRO_IEEE754_HACK code above does not work, it is worthwile to write\n * some ASM for XRPOW_FTOI().\n */\n function quantize_lines_xrpow(l, istep, xr, xrPos, ix, ixPos) {\n assert(l > 0);\n\n l = l >> 1;\n var remaining = l % 2;\n l = l >> 1;\n while (l-- != 0) {\n var x0, x1, x2, x3;\n var rx0, rx1, rx2, rx3;\n\n x0 = xr[xrPos++] * istep;\n x1 = xr[xrPos++] * istep;\n rx0 = 0 | x0;\n x2 = xr[xrPos++] * istep;\n rx1 = 0 | x1;\n x3 = xr[xrPos++] * istep;\n rx2 = 0 | x2;\n x0 += qupvt.adj43[rx0];\n rx3 = 0 | x3;\n x1 += qupvt.adj43[rx1];\n ix[ixPos++] = 0 | x0;\n x2 += qupvt.adj43[rx2];\n ix[ixPos++] = 0 | x1;\n x3 += qupvt.adj43[rx3];\n ix[ixPos++] = 0 | x2;\n ix[ixPos++] = 0 | x3;\n }\n if (remaining != 0) {\n var x0, x1;\n var rx0, rx1;\n\n x0 = xr[xrPos++] * istep;\n x1 = xr[xrPos++] * istep;\n rx0 = 0 | x0;\n rx1 = 0 | x1;\n x0 += qupvt.adj43[rx0];\n x1 += qupvt.adj43[rx1];\n ix[ixPos++] = 0 | x0;\n ix[ixPos++] = 0 | x1;\n }\n }\n\n /**\n * Quantization function This function will select which lines to quantize\n * and call the proper quantization function\n */\n function quantize_xrpow(xp, pi, istep, codInfo, prevNoise) {\n /* quantize on xr^(3/4) instead of xr */\n var sfb;\n var sfbmax;\n var j = 0;\n var prev_data_use;\n var accumulate = 0;\n var accumulate01 = 0;\n var xpPos = 0;\n var iData = pi;\n var iDataPos = 0;\n var acc_iData = iData;\n var acc_iDataPos = 0;\n var acc_xp = xp;\n var acc_xpPos = 0;\n\n /*\n * Reusing previously computed data does not seems to work if global\n * gain is changed. Finding why it behaves this way would allow to use a\n * cache of previously computed values (let's 10 cached values per sfb)\n * that would probably provide a noticeable speedup\n */\n prev_data_use = (prevNoise != null && (codInfo.global_gain == prevNoise.global_gain));\n\n if (codInfo.block_type == Encoder.SHORT_TYPE)\n sfbmax = 38;\n else\n sfbmax = 21;\n\n for (sfb = 0; sfb <= sfbmax; sfb++) {\n var step = -1;\n\n if (prev_data_use || codInfo.block_type == Encoder.NORM_TYPE) {\n step = codInfo.global_gain\n - ((codInfo.scalefac[sfb] + (codInfo.preflag != 0 ? qupvt.pretab[sfb]\n : 0)) << (codInfo.scalefac_scale + 1))\n - codInfo.subblock_gain[codInfo.window[sfb]] * 8;\n }\n assert(codInfo.width[sfb] >= 0);\n if (prev_data_use && (prevNoise.step[sfb] == step)) {\n /*\n * do not recompute this part, but compute accumulated lines\n */\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n } else { /* should compute this part */\n var l = codInfo.width[sfb];\n\n if ((j + codInfo.width[sfb]) > codInfo.max_nonzero_coeff) {\n /* do not compute upper zero part */\n var usefullsize;\n usefullsize = codInfo.max_nonzero_coeff - j + 1;\n Arrays.fill(pi, codInfo.max_nonzero_coeff, 576, 0);\n l = usefullsize;\n\n if (l < 0) {\n l = 0;\n }\n\n /* no need to compute higher sfb values */\n sfb = sfbmax + 1;\n }\n\n /* accumulate lines to quantize */\n if (0 == accumulate && 0 == accumulate01) {\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n if (prevNoise != null && prevNoise.sfb_count1 > 0\n && sfb >= prevNoise.sfb_count1\n && prevNoise.step[sfb] > 0\n && step >= prevNoise.step[sfb]) {\n\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate = 0;\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n accumulate01 += l;\n } else {\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n acc_iData = iData;\n acc_iDataPos = iDataPos;\n acc_xp = xp;\n acc_xpPos = xpPos;\n }\n accumulate += l;\n }\n\n if (l <= 0) {\n /*\n * rh: 20040215 may happen due to \"prev_data_use\"\n * optimization\n */\n if (accumulate01 != 0) {\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n if (accumulate != 0) {\n quantize_lines_xrpow(accumulate, istep, acc_xp,\n acc_xpPos, acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n\n break;\n /* ends for-loop */\n }\n }\n if (sfb <= sfbmax) {\n iDataPos += codInfo.width[sfb];\n xpPos += codInfo.width[sfb];\n j += codInfo.width[sfb];\n }\n }\n if (accumulate != 0) { /* last data part */\n quantize_lines_xrpow(accumulate, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate = 0;\n }\n if (accumulate01 != 0) { /* last data part */\n quantize_lines_xrpow_01(accumulate01, istep, acc_xp, acc_xpPos,\n acc_iData, acc_iDataPos);\n accumulate01 = 0;\n }\n\n }\n\n /**\n * ix_max\n */\n function ix_max(ix, ixPos, endPos) {\n var max1 = 0, max2 = 0;\n\n do {\n var x1 = ix[ixPos++];\n var x2 = ix[ixPos++];\n if (max1 < x1)\n max1 = x1;\n\n if (max2 < x2)\n max2 = x2;\n } while (ixPos < endPos);\n if (max1 < max2)\n max1 = max2;\n return max1;\n }\n\n function count_bit_ESC(ix, ixPos, end, t1, t2, s) {\n /* ESC-table is used */\n var linbits = Tables.ht[t1].xlen * 65536 + Tables.ht[t2].xlen;\n var sum = 0, sum2;\n\n do {\n var x = ix[ixPos++];\n var y = ix[ixPos++];\n\n if (x != 0) {\n if (x > 14) {\n x = 15;\n sum += linbits;\n }\n x *= 16;\n }\n\n if (y != 0) {\n if (y > 14) {\n y = 15;\n sum += linbits;\n }\n x += y;\n }\n\n sum += Tables.largetbl[x];\n } while (ixPos < end);\n\n sum2 = sum & 0xffff;\n sum >>= 16;\n\n if (sum > sum2) {\n sum = sum2;\n t1 = t2;\n }\n\n s.bits += sum;\n return t1;\n }\n\n function count_bit_noESC(ix, ixPos, end, s) {\n /* No ESC-words */\n var sum1 = 0;\n var hlen1 = Tables.ht[1].hlen;\n\n do {\n var x = ix[ixPos + 0] * 2 + ix[ixPos + 1];\n ixPos += 2;\n sum1 += hlen1[x];\n } while (ixPos < end);\n\n s.bits += sum1;\n return 1;\n }\n\n function count_bit_noESC_from2(ix, ixPos, end, t1, s) {\n /* No ESC-words */\n var sum = 0, sum2;\n var xlen = Tables.ht[t1].xlen;\n var hlen;\n if (t1 == 2)\n hlen = Tables.table23;\n else\n hlen = Tables.table56;\n\n do {\n var x = ix[ixPos + 0] * xlen + ix[ixPos + 1];\n ixPos += 2;\n sum += hlen[x];\n } while (ixPos < end);\n\n sum2 = sum & 0xffff;\n sum >>= 16;\n\n if (sum > sum2) {\n sum = sum2;\n t1++;\n }\n\n s.bits += sum;\n return t1;\n }\n\n function count_bit_noESC_from3(ix, ixPos, end, t1, s) {\n /* No ESC-words */\n var sum1 = 0;\n var sum2 = 0;\n var sum3 = 0;\n var xlen = Tables.ht[t1].xlen;\n var hlen1 = Tables.ht[t1].hlen;\n var hlen2 = Tables.ht[t1 + 1].hlen;\n var hlen3 = Tables.ht[t1 + 2].hlen;\n\n do {\n var x = ix[ixPos + 0] * xlen + ix[ixPos + 1];\n ixPos += 2;\n sum1 += hlen1[x];\n sum2 += hlen2[x];\n sum3 += hlen3[x];\n } while (ixPos < end);\n var t = t1;\n if (sum1 > sum2) {\n sum1 = sum2;\n t++;\n }\n if (sum1 > sum3) {\n sum1 = sum3;\n t = t1 + 2;\n }\n s.bits += sum1;\n\n return t;\n }\n\n /*************************************************************************/\n /* choose table */\n /*************************************************************************/\n\n var huf_tbl_noESC = [1, 2, 5, 7, 7, 10, 10, 13, 13,\n 13, 13, 13, 13, 13, 13];\n\n /**\n * Choose the Huffman table that will encode ix[begin..end] with the fewest\n * bits.\n *\n * Note: This code contains knowledge about the sizes and characteristics of\n * the Huffman tables as defined in the IS (Table B.7), and will not work\n * with any arbitrary tables.\n */\n function choose_table(ix, ixPos, endPos, s) {\n var max = ix_max(ix, ixPos, endPos);\n\n switch (max) {\n case 0:\n return max;\n\n case 1:\n return count_bit_noESC(ix, ixPos, endPos, s);\n\n case 2:\n case 3:\n return count_bit_noESC_from2(ix, ixPos, endPos,\n huf_tbl_noESC[max - 1], s);\n\n case 4:\n case 5:\n case 6:\n case 7:\n case 8:\n case 9:\n case 10:\n case 11:\n case 12:\n case 13:\n case 14:\n case 15:\n return count_bit_noESC_from3(ix, ixPos, endPos,\n huf_tbl_noESC[max - 1], s);\n\n default:\n /* try tables with linbits */\n if (max > QuantizePVT.IXMAX_VAL) {\n s.bits = QuantizePVT.LARGE_BITS;\n return -1;\n }\n max -= 15;\n var choice2;\n for (choice2 = 24; choice2 < 32; choice2++) {\n if (Tables.ht[choice2].linmax >= max) {\n break;\n }\n }\n var choice;\n for (choice = choice2 - 8; choice < 24; choice++) {\n if (Tables.ht[choice].linmax >= max) {\n break;\n }\n }\n return count_bit_ESC(ix, ixPos, endPos, choice, choice2, s);\n }\n }\n\n /**\n * count_bit\n */\n this.noquant_count_bits = function (gfc, gi, prev_noise) {\n var ix = gi.l3_enc;\n var i = Math.min(576, ((gi.max_nonzero_coeff + 2) >> 1) << 1);\n\n if (prev_noise != null)\n prev_noise.sfb_count1 = 0;\n\n /* Determine count1 region */\n for (; i > 1; i -= 2)\n if ((ix[i - 1] | ix[i - 2]) != 0)\n break;\n gi.count1 = i;\n\n /* Determines the number of bits to encode the quadruples. */\n var a1 = 0;\n var a2 = 0;\n for (; i > 3; i -= 4) {\n var p;\n /* hack to check if all values <= 1 */\n //throw \"TODO: HACK if ((((long) ix[i - 1] | (long) ix[i - 2] | (long) ix[i - 3] | (long) ix[i - 4]) & 0xffffffffL) > 1L \"\n //if (true) {\n if (((ix[i - 1] | ix[i - 2] | ix[i - 3] | ix[i - 4]) & 0x7fffffff) > 1) {\n break;\n }\n p = ((ix[i - 4] * 2 + ix[i - 3]) * 2 + ix[i - 2]) * 2 + ix[i - 1];\n a1 += Tables.t32l[p];\n a2 += Tables.t33l[p];\n }\n var bits = a1;\n gi.count1table_select = 0;\n if (a1 > a2) {\n bits = a2;\n gi.count1table_select = 1;\n }\n\n gi.count1bits = bits;\n gi.big_values = i;\n if (i == 0)\n return bits;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n a1 = 3 * gfc.scalefac_band.s[3];\n if (a1 > gi.big_values)\n a1 = gi.big_values;\n a2 = gi.big_values;\n\n } else if (gi.block_type == Encoder.NORM_TYPE) {\n assert(i <= 576);\n /* bv_scf has 576 entries (0..575) */\n a1 = gi.region0_count = gfc.bv_scf[i - 2];\n a2 = gi.region1_count = gfc.bv_scf[i - 1];\n\n assert(a1 + a2 + 2 < Encoder.SBPSY_l);\n a2 = gfc.scalefac_band.l[a1 + a2 + 2];\n a1 = gfc.scalefac_band.l[a1 + 1];\n if (a2 < i) {\n var bi = new Bits(bits);\n gi.table_select[2] = choose_table(ix, a2, i, bi);\n bits = bi.bits;\n }\n } else {\n gi.region0_count = 7;\n /* gi.region1_count = SBPSY_l - 7 - 1; */\n gi.region1_count = Encoder.SBMAX_l - 1 - 7 - 1;\n a1 = gfc.scalefac_band.l[7 + 1];\n a2 = i;\n if (a1 > a2) {\n a1 = a2;\n }\n }\n\n /* have to allow for the case when bigvalues < region0 < region1 */\n /* (and region0, region1 are ignored) */\n a1 = Math.min(a1, i);\n a2 = Math.min(a2, i);\n\n assert(a1 >= 0);\n assert(a2 >= 0);\n\n /* Count the number of bits necessary to code the bigvalues region. */\n if (0 < a1) {\n var bi = new Bits(bits);\n gi.table_select[0] = choose_table(ix, 0, a1, bi);\n bits = bi.bits;\n }\n if (a1 < a2) {\n var bi = new Bits(bits);\n gi.table_select[1] = choose_table(ix, a1, a2, bi);\n bits = bi.bits;\n }\n if (gfc.use_best_huffman == 2) {\n gi.part2_3_length = bits;\n best_huffman_divide(gfc, gi);\n bits = gi.part2_3_length;\n }\n\n if (prev_noise != null) {\n if (gi.block_type == Encoder.NORM_TYPE) {\n var sfb = 0;\n while (gfc.scalefac_band.l[sfb] < gi.big_values) {\n sfb++;\n }\n prev_noise.sfb_count1 = sfb;\n }\n }\n\n return bits;\n }\n\n this.count_bits = function (gfc, xr, gi, prev_noise) {\n var ix = gi.l3_enc;\n\n /* since quantize_xrpow uses table lookup, we need to check this first: */\n var w = (QuantizePVT.IXMAX_VAL) / qupvt.IPOW20(gi.global_gain);\n\n if (gi.xrpow_max > w)\n return QuantizePVT.LARGE_BITS;\n\n quantize_xrpow(xr, ix, qupvt.IPOW20(gi.global_gain), gi, prev_noise);\n\n if ((gfc.substep_shaping & 2) != 0) {\n var j = 0;\n /* 0.634521682242439 = 0.5946*2**(.5*0.1875) */\n var gain = gi.global_gain + gi.scalefac_scale;\n var roundfac = 0.634521682242439 / qupvt.IPOW20(gain);\n for (var sfb = 0; sfb < gi.sfbmax; sfb++) {\n var width = gi.width[sfb];\n assert(width >= 0);\n if (0 == gfc.pseudohalf[sfb]) {\n j += width;\n } else {\n var k;\n for (k = j, j += width; k < j; ++k) {\n ix[k] = (xr[k] >= roundfac) ? ix[k] : 0;\n }\n }\n }\n }\n return this.noquant_count_bits(gfc, gi, prev_noise);\n }\n\n /**\n * re-calculate the best scalefac_compress using scfsi the saved bits are\n * kept in the bit reservoir.\n */\n function recalc_divide_init(gfc, cod_info, ix, r01_bits, r01_div, r0_tbl, r1_tbl) {\n var bigv = cod_info.big_values;\n\n for (var r0 = 0; r0 <= 7 + 15; r0++) {\n r01_bits[r0] = QuantizePVT.LARGE_BITS;\n }\n\n for (var r0 = 0; r0 < 16; r0++) {\n var a1 = gfc.scalefac_band.l[r0 + 1];\n if (a1 >= bigv)\n break;\n var r0bits = 0;\n var bi = new Bits(r0bits);\n var r0t = choose_table(ix, 0, a1, bi);\n r0bits = bi.bits;\n\n for (var r1 = 0; r1 < 8; r1++) {\n var a2 = gfc.scalefac_band.l[r0 + r1 + 2];\n if (a2 >= bigv)\n break;\n var bits = r0bits;\n bi = new Bits(bits);\n var r1t = choose_table(ix, a1, a2, bi);\n bits = bi.bits;\n if (r01_bits[r0 + r1] > bits) {\n r01_bits[r0 + r1] = bits;\n r01_div[r0 + r1] = r0;\n r0_tbl[r0 + r1] = r0t;\n r1_tbl[r0 + r1] = r1t;\n }\n }\n }\n }\n\n function recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div, r0_tbl, r1_tbl) {\n var bigv = cod_info2.big_values;\n\n for (var r2 = 2; r2 < Encoder.SBMAX_l + 1; r2++) {\n var a2 = gfc.scalefac_band.l[r2];\n if (a2 >= bigv)\n break;\n var bits = r01_bits[r2 - 2] + cod_info2.count1bits;\n if (gi.part2_3_length <= bits)\n break;\n\n var bi = new Bits(bits);\n var r2t = choose_table(ix, a2, bigv, bi);\n bits = bi.bits;\n if (gi.part2_3_length <= bits)\n continue;\n\n gi.assign(cod_info2);\n gi.part2_3_length = bits;\n gi.region0_count = r01_div[r2 - 2];\n gi.region1_count = r2 - 2 - r01_div[r2 - 2];\n gi.table_select[0] = r0_tbl[r2 - 2];\n gi.table_select[1] = r1_tbl[r2 - 2];\n gi.table_select[2] = r2t;\n }\n }\n\n this.best_huffman_divide = function (gfc, gi) {\n var cod_info2 = new GrInfo();\n var ix = gi.l3_enc;\n var r01_bits = new_int(7 + 15 + 1);\n var r01_div = new_int(7 + 15 + 1);\n var r0_tbl = new_int(7 + 15 + 1);\n var r1_tbl = new_int(7 + 15 + 1);\n\n /* SHORT BLOCK stuff fails for MPEG2 */\n if (gi.block_type == Encoder.SHORT_TYPE && gfc.mode_gr == 1)\n return;\n\n cod_info2.assign(gi);\n if (gi.block_type == Encoder.NORM_TYPE) {\n recalc_divide_init(gfc, gi, ix, r01_bits, r01_div, r0_tbl, r1_tbl);\n recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div,\n r0_tbl, r1_tbl);\n }\n var i = cod_info2.big_values;\n if (i == 0 || (ix[i - 2] | ix[i - 1]) > 1)\n return;\n\n i = gi.count1 + 2;\n if (i > 576)\n return;\n\n /* Determines the number of bits to encode the quadruples. */\n cod_info2.assign(gi);\n cod_info2.count1 = i;\n var a1 = 0;\n var a2 = 0;\n\n assert(i <= 576);\n\n for (; i > cod_info2.big_values; i -= 4) {\n var p = ((ix[i - 4] * 2 + ix[i - 3]) * 2 + ix[i - 2]) * 2\n + ix[i - 1];\n a1 += Tables.t32l[p];\n a2 += Tables.t33l[p];\n }\n cod_info2.big_values = i;\n\n cod_info2.count1table_select = 0;\n if (a1 > a2) {\n a1 = a2;\n cod_info2.count1table_select = 1;\n }\n\n cod_info2.count1bits = a1;\n\n if (cod_info2.block_type == Encoder.NORM_TYPE)\n recalc_divide_sub(gfc, cod_info2, gi, ix, r01_bits, r01_div,\n r0_tbl, r1_tbl);\n else {\n /* Count the number of bits necessary to code the bigvalues region. */\n cod_info2.part2_3_length = a1;\n a1 = gfc.scalefac_band.l[7 + 1];\n if (a1 > i) {\n a1 = i;\n }\n if (a1 > 0) {\n var bi = new Bits(cod_info2.part2_3_length);\n cod_info2.table_select[0] = choose_table(ix, 0, a1, bi);\n cod_info2.part2_3_length = bi.bits;\n }\n if (i > a1) {\n var bi = new Bits(cod_info2.part2_3_length);\n cod_info2.table_select[1] = choose_table(ix, a1, i, bi);\n cod_info2.part2_3_length = bi.bits;\n }\n if (gi.part2_3_length > cod_info2.part2_3_length)\n gi.assign(cod_info2);\n }\n }\n\n var slen1_n = [1, 1, 1, 1, 8, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16];\n var slen2_n = [1, 2, 4, 8, 1, 2, 4, 8, 2, 4, 8, 2, 4, 8, 4, 8];\n var slen1_tab = [0, 0, 0, 0, 3, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4];\n var slen2_tab = [0, 1, 2, 3, 0, 1, 2, 3, 1, 2, 3, 1, 2, 3, 2, 3];\n Takehiro.slen1_tab = slen1_tab;\n Takehiro.slen2_tab = slen2_tab;\n\n function scfsi_calc(ch, l3_side) {\n var sfb;\n var gi = l3_side.tt[1][ch];\n var g0 = l3_side.tt[0][ch];\n\n for (var i = 0; i < Tables.scfsi_band.length - 1; i++) {\n for (sfb = Tables.scfsi_band[i]; sfb < Tables.scfsi_band[i + 1]; sfb++) {\n if (g0.scalefac[sfb] != gi.scalefac[sfb]\n && gi.scalefac[sfb] >= 0)\n break;\n }\n if (sfb == Tables.scfsi_band[i + 1]) {\n for (sfb = Tables.scfsi_band[i]; sfb < Tables.scfsi_band[i + 1]; sfb++) {\n gi.scalefac[sfb] = -1;\n }\n l3_side.scfsi[ch][i] = 1;\n }\n }\n var s1 = 0;\n var c1 = 0;\n for (sfb = 0; sfb < 11; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n c1++;\n if (s1 < gi.scalefac[sfb])\n s1 = gi.scalefac[sfb];\n }\n var s2 = 0;\n var c2 = 0;\n for (; sfb < Encoder.SBPSY_l; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n c2++;\n if (s2 < gi.scalefac[sfb])\n s2 = gi.scalefac[sfb];\n }\n\n for (var i = 0; i < 16; i++) {\n if (s1 < slen1_n[i] && s2 < slen2_n[i]) {\n var c = slen1_tab[i] * c1 + slen2_tab[i] * c2;\n if (gi.part2_length > c) {\n gi.part2_length = c;\n gi.scalefac_compress = i;\n }\n }\n }\n }\n\n /**\n * Find the optimal way to store the scalefactors. Only call this routine\n * after final scalefactors have been chosen and the channel/granule will\n * not be re-encoded.\n */\n this.best_scalefac_store = function (gfc, gr, ch, l3_side) {\n /* use scalefac_scale if we can */\n var gi = l3_side.tt[gr][ch];\n var sfb, i, j, l;\n var recalc = 0;\n\n /*\n * remove scalefacs from bands with ix=0. This idea comes from the AAC\n * ISO docs. added mt 3/00\n */\n /* check if l3_enc=0 */\n j = 0;\n for (sfb = 0; sfb < gi.sfbmax; sfb++) {\n var width = gi.width[sfb];\n assert(width >= 0);\n j += width;\n for (l = -width; l < 0; l++) {\n if (gi.l3_enc[l + j] != 0)\n break;\n }\n if (l == 0)\n gi.scalefac[sfb] = recalc = -2;\n /* anything goes. */\n /*\n * only best_scalefac_store and calc_scfsi know--and only they\n * should know--about the magic number -2.\n */\n }\n\n if (0 == gi.scalefac_scale && 0 == gi.preflag) {\n var s = 0;\n for (sfb = 0; sfb < gi.sfbmax; sfb++)\n if (gi.scalefac[sfb] > 0)\n s |= gi.scalefac[sfb];\n\n if (0 == (s & 1) && s != 0) {\n for (sfb = 0; sfb < gi.sfbmax; sfb++)\n if (gi.scalefac[sfb] > 0)\n gi.scalefac[sfb] >>= 1;\n\n gi.scalefac_scale = recalc = 1;\n }\n }\n\n if (0 == gi.preflag && gi.block_type != Encoder.SHORT_TYPE\n && gfc.mode_gr == 2) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (gi.scalefac[sfb] < qupvt.pretab[sfb]\n && gi.scalefac[sfb] != -2)\n break;\n if (sfb == Encoder.SBPSY_l) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (gi.scalefac[sfb] > 0)\n gi.scalefac[sfb] -= qupvt.pretab[sfb];\n\n gi.preflag = recalc = 1;\n }\n }\n\n for (i = 0; i < 4; i++)\n l3_side.scfsi[ch][i] = 0;\n\n if (gfc.mode_gr == 2 && gr == 1\n && l3_side.tt[0][ch].block_type != Encoder.SHORT_TYPE\n && l3_side.tt[1][ch].block_type != Encoder.SHORT_TYPE) {\n scfsi_calc(ch, l3_side);\n recalc = 0;\n }\n for (sfb = 0; sfb < gi.sfbmax; sfb++) {\n if (gi.scalefac[sfb] == -2) {\n gi.scalefac[sfb] = 0;\n /* if anything goes, then 0 is a good choice */\n }\n }\n if (recalc != 0) {\n if (gfc.mode_gr == 2) {\n this.scale_bitcount(gi);\n } else {\n this.scale_bitcount_lsf(gfc, gi);\n }\n }\n }\n\n function all_scalefactors_not_negative(scalefac, n) {\n for (var i = 0; i < n; ++i) {\n if (scalefac[i] < 0)\n return false;\n }\n return true;\n }\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 18*slen1_tab[i] + 18*slen2_tab[i]\n */\n var scale_short = [0, 18, 36, 54, 54, 36, 54, 72,\n 54, 72, 90, 72, 90, 108, 108, 126];\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 17*slen1_tab[i] + 18*slen2_tab[i]\n */\n var scale_mixed = [0, 18, 36, 54, 51, 35, 53, 71,\n 52, 70, 88, 69, 87, 105, 104, 122];\n\n /**\n * number of bits used to encode scalefacs.\n *\n * 11*slen1_tab[i] + 10*slen2_tab[i]\n */\n var scale_long = [0, 10, 20, 30, 33, 21, 31, 41, 32, 42,\n 52, 43, 53, 63, 64, 74];\n\n /**\n * Also calculates the number of bits necessary to code the scalefactors.\n */\n this.scale_bitcount = function (cod_info) {\n var k, sfb, max_slen1 = 0, max_slen2 = 0;\n\n /* maximum values */\n var tab;\n var scalefac = cod_info.scalefac;\n\n assert(all_scalefactors_not_negative(scalefac, cod_info.sfbmax));\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n tab = scale_short;\n if (cod_info.mixed_block_flag != 0)\n tab = scale_mixed;\n } else { /* block_type == 1,2,or 3 */\n tab = scale_long;\n if (0 == cod_info.preflag) {\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n if (scalefac[sfb] < qupvt.pretab[sfb])\n break;\n\n if (sfb == Encoder.SBPSY_l) {\n cod_info.preflag = 1;\n for (sfb = 11; sfb < Encoder.SBPSY_l; sfb++)\n scalefac[sfb] -= qupvt.pretab[sfb];\n }\n }\n }\n\n for (sfb = 0; sfb < cod_info.sfbdivide; sfb++)\n if (max_slen1 < scalefac[sfb])\n max_slen1 = scalefac[sfb];\n\n for (; sfb < cod_info.sfbmax; sfb++)\n if (max_slen2 < scalefac[sfb])\n max_slen2 = scalefac[sfb];\n\n /*\n * from Takehiro TOMINAGA 10/99 loop over *all*\n * posible values of scalefac_compress to find the one which uses the\n * smallest number of bits. ISO would stop at first valid index\n */\n cod_info.part2_length = QuantizePVT.LARGE_BITS;\n for (k = 0; k < 16; k++) {\n if (max_slen1 < slen1_n[k] && max_slen2 < slen2_n[k]\n && cod_info.part2_length > tab[k]) {\n cod_info.part2_length = tab[k];\n cod_info.scalefac_compress = k;\n }\n }\n return cod_info.part2_length == QuantizePVT.LARGE_BITS;\n }\n\n /**\n * table of largest scalefactor values for MPEG2\n */\n var max_range_sfac_tab = [[15, 15, 7, 7],\n [15, 15, 7, 0], [7, 3, 0, 0], [15, 31, 31, 0],\n [7, 7, 7, 0], [3, 3, 0, 0]];\n\n /**\n * Also counts the number of bits to encode the scalefacs but for MPEG 2\n * Lower sampling frequencies (24, 22.05 and 16 kHz.)\n *\n * This is reverse-engineered from section 2.4.3.2 of the MPEG2 IS,\n * \"Audio Decoding Layer III\"\n */\n this.scale_bitcount_lsf = function (gfc, cod_info) {\n var table_number, row_in_table, partition, nr_sfb, window;\n var over;\n var i, sfb;\n var max_sfac = new_int(4);\n//var partition_table;\n var scalefac = cod_info.scalefac;\n\n /*\n * Set partition table. Note that should try to use table one, but do\n * not yet...\n */\n if (cod_info.preflag != 0)\n table_number = 2;\n else\n table_number = 0;\n\n for (i = 0; i < 4; i++)\n max_sfac[i] = 0;\n\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n row_in_table = 1;\n var partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (sfb = 0, partition = 0; partition < 4; partition++) {\n nr_sfb = partition_table[partition] / 3;\n for (i = 0; i < nr_sfb; i++, sfb++)\n for (window = 0; window < 3; window++)\n if (scalefac[sfb * 3 + window] > max_sfac[partition])\n max_sfac[partition] = scalefac[sfb * 3 + window];\n }\n } else {\n row_in_table = 0;\n var partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (sfb = 0, partition = 0; partition < 4; partition++) {\n nr_sfb = partition_table[partition];\n for (i = 0; i < nr_sfb; i++, sfb++)\n if (scalefac[sfb] > max_sfac[partition])\n max_sfac[partition] = scalefac[sfb];\n }\n }\n\n for (over = false, partition = 0; partition < 4; partition++) {\n if (max_sfac[partition] > max_range_sfac_tab[table_number][partition])\n over = true;\n }\n if (!over) {\n var slen1, slen2, slen3, slen4;\n\n cod_info.sfb_partition_table = qupvt.nr_of_sfb_block[table_number][row_in_table];\n for (partition = 0; partition < 4; partition++)\n cod_info.slen[partition] = log2tab[max_sfac[partition]];\n\n /* set scalefac_compress */\n slen1 = cod_info.slen[0];\n slen2 = cod_info.slen[1];\n slen3 = cod_info.slen[2];\n slen4 = cod_info.slen[3];\n\n switch (table_number) {\n case 0:\n cod_info.scalefac_compress = (((slen1 * 5) + slen2) << 4)\n + (slen3 << 2) + slen4;\n break;\n\n case 1:\n cod_info.scalefac_compress = 400 + (((slen1 * 5) + slen2) << 2)\n + slen3;\n break;\n\n case 2:\n cod_info.scalefac_compress = 500 + (slen1 * 3) + slen2;\n break;\n\n default:\n System.err.printf(\"intensity stereo not implemented yet\\n\");\n break;\n }\n }\n if (!over) {\n assert(cod_info.sfb_partition_table != null);\n cod_info.part2_length = 0;\n for (partition = 0; partition < 4; partition++)\n cod_info.part2_length += cod_info.slen[partition]\n * cod_info.sfb_partition_table[partition];\n }\n return over;\n }\n\n /*\n * Since no bands have been over-amplified, we can set scalefac_compress and\n * slen[] for the formatter\n */\n var log2tab = [0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4,\n 4, 4, 4, 4];\n\n this.huffman_init = function (gfc) {\n for (var i = 2; i <= 576; i += 2) {\n var scfb_anz = 0, bv_index;\n while (gfc.scalefac_band.l[++scfb_anz] < i)\n ;\n\n bv_index = subdv_table[scfb_anz][0]; // .region0_count\n while (gfc.scalefac_band.l[bv_index + 1] > i)\n bv_index--;\n\n if (bv_index < 0) {\n /*\n * this is an indication that everything is going to be encoded\n * as region0: bigvalues < region0 < region1 so lets set\n * region0, region1 to some value larger than bigvalues\n */\n bv_index = subdv_table[scfb_anz][0]; // .region0_count\n }\n\n gfc.bv_scf[i - 2] = bv_index;\n\n bv_index = subdv_table[scfb_anz][1]; // .region1_count\n while (gfc.scalefac_band.l[bv_index + gfc.bv_scf[i - 2] + 2] > i)\n bv_index--;\n\n if (bv_index < 0) {\n bv_index = subdv_table[scfb_anz][1]; // .region1_count\n }\n\n gfc.bv_scf[i - 1] = bv_index;\n }\n }\n}\n\nmodule.exports = Takehiro;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar Takehiro = require('./Takehiro.js');\nvar Tables = require('./Tables.js');\nvar Encoder = require('./Encoder.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\n\nBitStream.EQ = function (a, b) {\n return (Math.abs(a) > Math.abs(b)) ? (Math.abs((a) - (b)) <= (Math\n .abs(a) * 1e-6))\n : (Math.abs((a) - (b)) <= (Math.abs(b) * 1e-6));\n};\n\nBitStream.NEQ = function (a, b) {\n return !BitStream.EQ(a, b);\n};\n\nfunction BitStream() {\n var self = this;\n var CRC16_POLYNOMIAL = 0x8005;\n\n /*\n * we work with ints, so when doing bit manipulation, we limit ourselves to\n * MAX_LENGTH-2 just to be on the safe side\n */\n var MAX_LENGTH = 32;\n\n //GainAnalysis ga;\n //MPGLib mpg;\n //Version ver;\n //VBRTag vbr;\n var ga = null;\n var mpg = null;\n var ver = null;\n var vbr = null;\n\n //public final void setModules(GainAnalysis ga, MPGLib mpg, Version ver,\n //\tVBRTag vbr) {\n\n this.setModules = function (_ga, _mpg, _ver, _vbr) {\n ga = _ga;\n mpg = _mpg;\n ver = _ver;\n vbr = _vbr;\n };\n\n /**\n * Bit stream buffer.\n */\n //private byte[] buf;\n var buf = null;\n /**\n * Bit counter of bit stream.\n */\n var totbit = 0;\n /**\n * Pointer to top byte in buffer.\n */\n var bufByteIdx = 0;\n /**\n * Pointer to top bit of top byte in buffer.\n */\n var bufBitIdx = 0;\n\n /**\n * compute bitsperframe and mean_bits for a layer III frame\n */\n this.getframebits = function (gfp) {\n var gfc = gfp.internal_flags;\n var bit_rate;\n\n /* get bitrate in kbps [?] */\n if (gfc.bitrate_index != 0)\n bit_rate = Tables.bitrate_table[gfp.version][gfc.bitrate_index];\n else\n bit_rate = gfp.brate;\n assert(8 <= bit_rate && bit_rate <= 640);\n\n /* main encoding routine toggles padding on and off */\n /* one Layer3 Slot consists of 8 bits */\n var bytes = 0 | (gfp.version + 1) * 72000 * bit_rate / gfp.out_samplerate + gfc.padding;\n return 8 * bytes;\n };\n\n function putheader_bits(gfc) {\n System.arraycopy(gfc.header[gfc.w_ptr].buf, 0, buf, bufByteIdx, gfc.sideinfo_len);\n bufByteIdx += gfc.sideinfo_len;\n totbit += gfc.sideinfo_len * 8;\n gfc.w_ptr = (gfc.w_ptr + 1) & (LameInternalFlags.MAX_HEADER_BUF - 1);\n }\n\n /**\n * write j bits into the bit stream\n */\n function putbits2(gfc, val, j) {\n assert(j < MAX_LENGTH - 2);\n\n while (j > 0) {\n var k;\n if (bufBitIdx == 0) {\n bufBitIdx = 8;\n bufByteIdx++;\n assert(bufByteIdx < Lame.LAME_MAXMP3BUFFER);\n assert(gfc.header[gfc.w_ptr].write_timing >= totbit);\n if (gfc.header[gfc.w_ptr].write_timing == totbit) {\n putheader_bits(gfc);\n }\n buf[bufByteIdx] = 0;\n }\n\n k = Math.min(j, bufBitIdx);\n j -= k;\n\n bufBitIdx -= k;\n\n assert(j < MAX_LENGTH);\n /* 32 too large on 32 bit machines */\n assert(bufBitIdx < MAX_LENGTH);\n\n buf[bufByteIdx] |= ((val >> j) << bufBitIdx);\n totbit += k;\n }\n }\n\n /**\n * write j bits into the bit stream, ignoring frame headers\n */\n function putbits_noheaders(gfc, val, j) {\n assert(j < MAX_LENGTH - 2);\n\n while (j > 0) {\n var k;\n if (bufBitIdx == 0) {\n bufBitIdx = 8;\n bufByteIdx++;\n assert(bufByteIdx < Lame.LAME_MAXMP3BUFFER);\n buf[bufByteIdx] = 0;\n }\n\n k = Math.min(j, bufBitIdx);\n j -= k;\n\n bufBitIdx -= k;\n\n assert(j < MAX_LENGTH);\n /* 32 too large on 32 bit machines */\n assert(bufBitIdx < MAX_LENGTH);\n\n buf[bufByteIdx] |= ((val >> j) << bufBitIdx);\n totbit += k;\n }\n }\n\n /**\n * Some combinations of bitrate, Fs, and stereo make it impossible to stuff\n * out a frame using just main_data, due to the limited number of bits to\n * indicate main_data_length. In these situations, we put stuffing bits into\n * the ancillary data...\n */\n function drain_into_ancillary(gfp, remainingBits) {\n var gfc = gfp.internal_flags;\n var i;\n assert(remainingBits >= 0);\n\n if (remainingBits >= 8) {\n putbits2(gfc, 0x4c, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x41, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x4d, 8);\n remainingBits -= 8;\n }\n if (remainingBits >= 8) {\n putbits2(gfc, 0x45, 8);\n remainingBits -= 8;\n }\n\n if (remainingBits >= 32) {\n var version = ver.getLameShortVersion();\n if (remainingBits >= 32)\n for (i = 0; i < version.length && remainingBits >= 8; ++i) {\n remainingBits -= 8;\n putbits2(gfc, version.charAt(i), 8);\n }\n }\n\n for (; remainingBits >= 1; remainingBits -= 1) {\n putbits2(gfc, gfc.ancillary_flag, 1);\n gfc.ancillary_flag ^= (!gfp.disable_reservoir ? 1 : 0);\n }\n\n assert(remainingBits == 0);\n\n }\n\n /**\n * write N bits into the header\n */\n function writeheader(gfc, val, j) {\n var ptr = gfc.header[gfc.h_ptr].ptr;\n\n while (j > 0) {\n var k = Math.min(j, 8 - (ptr & 7));\n j -= k;\n assert(j < MAX_LENGTH);\n /* >> 32 too large for 32 bit machines */\n\n gfc.header[gfc.h_ptr].buf[ptr >> 3] |= ((val >> j)) << (8 - (ptr & 7) - k);\n ptr += k;\n }\n gfc.header[gfc.h_ptr].ptr = ptr;\n }\n\n function CRC_update(value, crc) {\n value <<= 8;\n for (var i = 0; i < 8; i++) {\n value <<= 1;\n crc <<= 1;\n\n if ((((crc ^ value) & 0x10000) != 0))\n crc ^= CRC16_POLYNOMIAL;\n }\n return crc;\n }\n\n this.CRC_writeheader = function (gfc, header) {\n var crc = 0xffff;\n /* (jo) init crc16 for error_protection */\n\n crc = CRC_update(header[2] & 0xff, crc);\n crc = CRC_update(header[3] & 0xff, crc);\n for (var i = 6; i < gfc.sideinfo_len; i++) {\n crc = CRC_update(header[i] & 0xff, crc);\n }\n\n header[4] = (byte)(crc >> 8);\n header[5] = (byte)(crc & 255);\n };\n\n function encodeSideInfo2(gfp, bitsPerFrame) {\n var gfc = gfp.internal_flags;\n var l3_side;\n var gr, ch;\n\n l3_side = gfc.l3_side;\n gfc.header[gfc.h_ptr].ptr = 0;\n Arrays.fill(gfc.header[gfc.h_ptr].buf, 0, gfc.sideinfo_len, 0);\n if (gfp.out_samplerate < 16000)\n writeheader(gfc, 0xffe, 12);\n else\n writeheader(gfc, 0xfff, 12);\n writeheader(gfc, (gfp.version), 1);\n writeheader(gfc, 4 - 3, 2);\n writeheader(gfc, (!gfp.error_protection ? 1 : 0), 1);\n writeheader(gfc, (gfc.bitrate_index), 4);\n writeheader(gfc, (gfc.samplerate_index), 2);\n writeheader(gfc, (gfc.padding), 1);\n writeheader(gfc, (gfp.extension), 1);\n writeheader(gfc, (gfp.mode.ordinal()), 2);\n writeheader(gfc, (gfc.mode_ext), 2);\n writeheader(gfc, (gfp.copyright), 1);\n writeheader(gfc, (gfp.original), 1);\n writeheader(gfc, (gfp.emphasis), 2);\n if (gfp.error_protection) {\n writeheader(gfc, 0, 16);\n /* dummy */\n }\n\n if (gfp.version == 1) {\n /* MPEG1 */\n assert(l3_side.main_data_begin >= 0);\n writeheader(gfc, (l3_side.main_data_begin), 9);\n\n if (gfc.channels_out == 2)\n writeheader(gfc, l3_side.private_bits, 3);\n else\n writeheader(gfc, l3_side.private_bits, 5);\n\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var band;\n for (band = 0; band < 4; band++) {\n writeheader(gfc, l3_side.scfsi[ch][band], 1);\n }\n }\n\n for (gr = 0; gr < 2; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n writeheader(gfc, gi.part2_3_length + gi.part2_length, 12);\n writeheader(gfc, gi.big_values / 2, 9);\n writeheader(gfc, gi.global_gain, 8);\n writeheader(gfc, gi.scalefac_compress, 4);\n\n if (gi.block_type != Encoder.NORM_TYPE) {\n writeheader(gfc, 1, 1);\n /* window_switching_flag */\n writeheader(gfc, gi.block_type, 2);\n writeheader(gfc, gi.mixed_block_flag, 1);\n\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n\n writeheader(gfc, gi.subblock_gain[0], 3);\n writeheader(gfc, gi.subblock_gain[1], 3);\n writeheader(gfc, gi.subblock_gain[2], 3);\n } else {\n writeheader(gfc, 0, 1);\n /* window_switching_flag */\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n if (gi.table_select[2] == 14)\n gi.table_select[2] = 16;\n writeheader(gfc, gi.table_select[2], 5);\n\n assert(0 <= gi.region0_count && gi.region0_count < 16);\n assert(0 <= gi.region1_count && gi.region1_count < 8);\n writeheader(gfc, gi.region0_count, 4);\n writeheader(gfc, gi.region1_count, 3);\n }\n writeheader(gfc, gi.preflag, 1);\n writeheader(gfc, gi.scalefac_scale, 1);\n writeheader(gfc, gi.count1table_select, 1);\n }\n }\n } else {\n /* MPEG2 */\n assert(l3_side.main_data_begin >= 0);\n writeheader(gfc, (l3_side.main_data_begin), 8);\n writeheader(gfc, l3_side.private_bits, gfc.channels_out);\n\n gr = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n writeheader(gfc, gi.part2_3_length + gi.part2_length, 12);\n writeheader(gfc, gi.big_values / 2, 9);\n writeheader(gfc, gi.global_gain, 8);\n writeheader(gfc, gi.scalefac_compress, 9);\n\n if (gi.block_type != Encoder.NORM_TYPE) {\n writeheader(gfc, 1, 1);\n /* window_switching_flag */\n writeheader(gfc, gi.block_type, 2);\n writeheader(gfc, gi.mixed_block_flag, 1);\n\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n\n writeheader(gfc, gi.subblock_gain[0], 3);\n writeheader(gfc, gi.subblock_gain[1], 3);\n writeheader(gfc, gi.subblock_gain[2], 3);\n } else {\n writeheader(gfc, 0, 1);\n /* window_switching_flag */\n if (gi.table_select[0] == 14)\n gi.table_select[0] = 16;\n writeheader(gfc, gi.table_select[0], 5);\n if (gi.table_select[1] == 14)\n gi.table_select[1] = 16;\n writeheader(gfc, gi.table_select[1], 5);\n if (gi.table_select[2] == 14)\n gi.table_select[2] = 16;\n writeheader(gfc, gi.table_select[2], 5);\n\n assert(0 <= gi.region0_count && gi.region0_count < 16);\n assert(0 <= gi.region1_count && gi.region1_count < 8);\n writeheader(gfc, gi.region0_count, 4);\n writeheader(gfc, gi.region1_count, 3);\n }\n\n writeheader(gfc, gi.scalefac_scale, 1);\n writeheader(gfc, gi.count1table_select, 1);\n }\n }\n\n if (gfp.error_protection) {\n /* (jo) error_protection: add crc16 information to header */\n CRC_writeheader(gfc, gfc.header[gfc.h_ptr].buf);\n }\n\n {\n var old = gfc.h_ptr;\n assert(gfc.header[old].ptr == gfc.sideinfo_len * 8);\n\n gfc.h_ptr = (old + 1) & (LameInternalFlags.MAX_HEADER_BUF - 1);\n gfc.header[gfc.h_ptr].write_timing = gfc.header[old].write_timing\n + bitsPerFrame;\n\n if (gfc.h_ptr == gfc.w_ptr) {\n /* yikes! we are out of header buffer space */\n System.err\n .println(\"Error: MAX_HEADER_BUF too small in bitstream.c \\n\");\n }\n\n }\n }\n\n function huffman_coder_count1(gfc, gi) {\n /* Write count1 area */\n var h = Tables.ht[gi.count1table_select + 32];\n var i, bits = 0;\n\n var ix = gi.big_values;\n var xr = gi.big_values;\n assert(gi.count1table_select < 2);\n\n for (i = (gi.count1 - gi.big_values) / 4; i > 0; --i) {\n var huffbits = 0;\n var p = 0, v;\n\n v = gi.l3_enc[ix + 0];\n if (v != 0) {\n p += 8;\n if (gi.xr[xr + 0] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 1];\n if (v != 0) {\n p += 4;\n huffbits *= 2;\n if (gi.xr[xr + 1] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 2];\n if (v != 0) {\n p += 2;\n huffbits *= 2;\n if (gi.xr[xr + 2] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n v = gi.l3_enc[ix + 3];\n if (v != 0) {\n p++;\n huffbits *= 2;\n if (gi.xr[xr + 3] < 0)\n huffbits++;\n assert(v <= 1);\n }\n\n ix += 4;\n xr += 4;\n putbits2(gfc, huffbits + h.table[p], h.hlen[p]);\n bits += h.hlen[p];\n }\n return bits;\n }\n\n /**\n * Implements the pseudocode of page 98 of the IS\n */\n function Huffmancode(gfc, tableindex, start, end, gi) {\n var h = Tables.ht[tableindex];\n var bits = 0;\n\n assert(tableindex < 32);\n if (0 == tableindex)\n return bits;\n\n for (var i = start; i < end; i += 2) {\n var cbits = 0;\n var xbits = 0;\n var linbits = h.xlen;\n var xlen = h.xlen;\n var ext = 0;\n var x1 = gi.l3_enc[i];\n var x2 = gi.l3_enc[i + 1];\n\n if (x1 != 0) {\n if (gi.xr[i] < 0)\n ext++;\n cbits--;\n }\n\n if (tableindex > 15) {\n /* use ESC-words */\n if (x1 > 14) {\n var linbits_x1 = x1 - 15;\n assert(linbits_x1 <= h.linmax);\n ext |= linbits_x1 << 1;\n xbits = linbits;\n x1 = 15;\n }\n\n if (x2 > 14) {\n var linbits_x2 = x2 - 15;\n assert(linbits_x2 <= h.linmax);\n ext <<= linbits;\n ext |= linbits_x2;\n xbits += linbits;\n x2 = 15;\n }\n xlen = 16;\n }\n\n if (x2 != 0) {\n ext <<= 1;\n if (gi.xr[i + 1] < 0)\n ext++;\n cbits--;\n }\n\n assert((x1 | x2) < 16);\n\n x1 = x1 * xlen + x2;\n xbits -= cbits;\n cbits += h.hlen[x1];\n\n assert(cbits <= MAX_LENGTH);\n assert(xbits <= MAX_LENGTH);\n\n putbits2(gfc, h.table[x1], cbits);\n putbits2(gfc, ext, xbits);\n bits += cbits + xbits;\n }\n return bits;\n }\n\n /**\n * Note the discussion of huffmancodebits() on pages 28 and 29 of the IS, as\n * well as the definitions of the side information on pages 26 and 27.\n */\n function ShortHuffmancodebits(gfc, gi) {\n var region1Start = 3 * gfc.scalefac_band.s[3];\n if (region1Start > gi.big_values)\n region1Start = gi.big_values;\n\n /* short blocks do not have a region2 */\n var bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);\n bits += Huffmancode(gfc, gi.table_select[1], region1Start,\n gi.big_values, gi);\n return bits;\n }\n\n function LongHuffmancodebits(gfc, gi) {\n var bigvalues, bits;\n var region1Start, region2Start;\n\n bigvalues = gi.big_values;\n assert(0 <= bigvalues && bigvalues <= 576);\n\n var i = gi.region0_count + 1;\n assert(0 <= i);\n assert(i < gfc.scalefac_band.l.length);\n region1Start = gfc.scalefac_band.l[i];\n i += gi.region1_count + 1;\n assert(0 <= i);\n assert(i < gfc.scalefac_band.l.length);\n region2Start = gfc.scalefac_band.l[i];\n\n if (region1Start > bigvalues)\n region1Start = bigvalues;\n\n if (region2Start > bigvalues)\n region2Start = bigvalues;\n\n bits = Huffmancode(gfc, gi.table_select[0], 0, region1Start, gi);\n bits += Huffmancode(gfc, gi.table_select[1], region1Start,\n region2Start, gi);\n bits += Huffmancode(gfc, gi.table_select[2], region2Start, bigvalues,\n gi);\n return bits;\n }\n\n function writeMainData(gfp) {\n var gr, ch, sfb, data_bits, tot_bits = 0;\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n\n if (gfp.version == 1) {\n /* MPEG 1 */\n for (gr = 0; gr < 2; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n var slen1 = Takehiro.slen1_tab[gi.scalefac_compress];\n var slen2 = Takehiro.slen2_tab[gi.scalefac_compress];\n data_bits = 0;\n for (sfb = 0; sfb < gi.sfbdivide; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n /* scfsi is used */\n putbits2(gfc, gi.scalefac[sfb], slen1);\n data_bits += slen1;\n }\n for (; sfb < gi.sfbmax; sfb++) {\n if (gi.scalefac[sfb] == -1)\n continue;\n /* scfsi is used */\n putbits2(gfc, gi.scalefac[sfb], slen2);\n data_bits += slen2;\n }\n assert(data_bits == gi.part2_length);\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n data_bits += ShortHuffmancodebits(gfc, gi);\n } else {\n data_bits += LongHuffmancodebits(gfc, gi);\n }\n data_bits += huffman_coder_count1(gfc, gi);\n /* does bitcount in quantize.c agree with actual bit count? */\n assert(data_bits == gi.part2_3_length + gi.part2_length);\n tot_bits += data_bits;\n }\n /* for ch */\n }\n /* for gr */\n } else {\n /* MPEG 2 */\n gr = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n var gi = l3_side.tt[gr][ch];\n var i, sfb_partition, scale_bits = 0;\n assert(gi.sfb_partition_table != null);\n data_bits = 0;\n sfb = 0;\n sfb_partition = 0;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n for (; sfb_partition < 4; sfb_partition++) {\n var sfbs = gi.sfb_partition_table[sfb_partition] / 3;\n var slen = gi.slen[sfb_partition];\n for (i = 0; i < sfbs; i++, sfb++) {\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 0], 0), slen);\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 1], 0), slen);\n putbits2(gfc,\n Math.max(gi.scalefac[sfb * 3 + 2], 0), slen);\n scale_bits += 3 * slen;\n }\n }\n data_bits += ShortHuffmancodebits(gfc, gi);\n } else {\n for (; sfb_partition < 4; sfb_partition++) {\n var sfbs = gi.sfb_partition_table[sfb_partition];\n var slen = gi.slen[sfb_partition];\n for (i = 0; i < sfbs; i++, sfb++) {\n putbits2(gfc, Math.max(gi.scalefac[sfb], 0), slen);\n scale_bits += slen;\n }\n }\n data_bits += LongHuffmancodebits(gfc, gi);\n }\n data_bits += huffman_coder_count1(gfc, gi);\n /* does bitcount in quantize.c agree with actual bit count? */\n assert(data_bits == gi.part2_3_length);\n assert(scale_bits == gi.part2_length);\n tot_bits += scale_bits + data_bits;\n }\n /* for ch */\n }\n /* for gf */\n return tot_bits;\n }\n\n /* main_data */\n\n function TotalBytes() {\n this.total = 0;\n }\n\n /*\n * compute the number of bits required to flush all mp3 frames currently in\n * the buffer. This should be the same as the reservoir size. Only call this\n * routine between frames - i.e. only after all headers and data have been\n * added to the buffer by format_bitstream().\n *\n * Also compute total_bits_output = size of mp3 buffer (including frame\n * headers which may not have yet been send to the mp3 buffer) + number of\n * bits needed to flush all mp3 frames.\n *\n * total_bytes_output is the size of the mp3 output buffer if\n * lame_encode_flush_nogap() was called right now.\n */\n function compute_flushbits(gfp, total_bytes_output) {\n var gfc = gfp.internal_flags;\n var flushbits, remaining_headers;\n var bitsPerFrame;\n var last_ptr, first_ptr;\n first_ptr = gfc.w_ptr;\n /* first header to add to bitstream */\n last_ptr = gfc.h_ptr - 1;\n /* last header to add to bitstream */\n if (last_ptr == -1)\n last_ptr = LameInternalFlags.MAX_HEADER_BUF - 1;\n\n /* add this many bits to bitstream so we can flush all headers */\n flushbits = gfc.header[last_ptr].write_timing - totbit;\n total_bytes_output.total = flushbits;\n\n if (flushbits >= 0) {\n /* if flushbits >= 0, some headers have not yet been written */\n /* reduce flushbits by the size of the headers */\n remaining_headers = 1 + last_ptr - first_ptr;\n if (last_ptr < first_ptr)\n remaining_headers = 1 + last_ptr - first_ptr\n + LameInternalFlags.MAX_HEADER_BUF;\n flushbits -= remaining_headers * 8 * gfc.sideinfo_len;\n }\n\n /*\n * finally, add some bits so that the last frame is complete these bits\n * are not necessary to decode the last frame, but some decoders will\n * ignore last frame if these bits are missing\n */\n bitsPerFrame = self.getframebits(gfp);\n flushbits += bitsPerFrame;\n total_bytes_output.total += bitsPerFrame;\n /* round up: */\n if ((total_bytes_output.total % 8) != 0)\n total_bytes_output.total = 1 + (total_bytes_output.total / 8);\n else\n total_bytes_output.total = (total_bytes_output.total / 8);\n total_bytes_output.total += bufByteIdx + 1;\n\n if (flushbits < 0) {\n System.err.println(\"strange error flushing buffer ... \\n\");\n }\n return flushbits;\n }\n\n this.flush_bitstream = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side;\n var flushbits;\n var last_ptr = gfc.h_ptr - 1;\n /* last header to add to bitstream */\n if (last_ptr == -1)\n last_ptr = LameInternalFlags.MAX_HEADER_BUF - 1;\n l3_side = gfc.l3_side;\n\n if ((flushbits = compute_flushbits(gfp, new TotalBytes())) < 0)\n return;\n drain_into_ancillary(gfp, flushbits);\n\n /* check that the 100% of the last frame has been written to bitstream */\n assert(gfc.header[last_ptr].write_timing + this.getframebits(gfp) == totbit);\n\n /*\n * we have padded out all frames with ancillary data, which is the same\n * as filling the bitreservoir with ancillary data, so :\n */\n gfc.ResvSize = 0;\n l3_side.main_data_begin = 0;\n\n /* save the ReplayGain value */\n if (gfc.findReplayGain) {\n var RadioGain = ga.GetTitleGain(gfc.rgdata);\n assert(NEQ(RadioGain, GainAnalysis.GAIN_NOT_ENOUGH_SAMPLES));\n gfc.RadioGain = Math.floor(RadioGain * 10.0 + 0.5) | 0;\n /* round to nearest */\n }\n\n /* find the gain and scale change required for no clipping */\n if (gfc.findPeakSample) {\n gfc.noclipGainChange = Math.ceil(Math\n .log10(gfc.PeakSample / 32767.0) * 20.0 * 10.0) | 0;\n /* round up */\n\n if (gfc.noclipGainChange > 0) {\n /* clipping occurs */\n if (EQ(gfp.scale, 1.0) || EQ(gfp.scale, 0.0))\n gfc.noclipScale = (Math\n .floor((32767.0 / gfc.PeakSample) * 100.0) / 100.0);\n /* round down */\n else {\n /*\n * the user specified his own scaling factor. We could\n * suggest the scaling factor of\n * (32767.0/gfp.PeakSample)*(gfp.scale) but it's usually\n * very inaccurate. So we'd rather not advice him on the\n * scaling factor.\n */\n gfc.noclipScale = -1;\n }\n } else\n /* no clipping */\n gfc.noclipScale = -1;\n }\n };\n\n this.add_dummy_byte = function (gfp, val, n) {\n var gfc = gfp.internal_flags;\n var i;\n\n while (n-- > 0) {\n putbits_noheaders(gfc, val, 8);\n\n for (i = 0; i < LameInternalFlags.MAX_HEADER_BUF; ++i)\n gfc.header[i].write_timing += 8;\n }\n };\n\n /**\n * This is called after a frame of audio has been quantized and coded. It\n * will write the encoded audio to the bitstream. Note that from a layer3\n * encoder's perspective the bit stream is primarily a series of main_data()\n * blocks, with header and side information inserted at the proper locations\n * to maintain framing. (See Figure A.7 in the IS).\n */\n this.format_bitstream = function (gfp) {\n var gfc = gfp.internal_flags;\n var l3_side;\n l3_side = gfc.l3_side;\n\n var bitsPerFrame = this.getframebits(gfp);\n drain_into_ancillary(gfp, l3_side.resvDrain_pre);\n\n encodeSideInfo2(gfp, bitsPerFrame);\n var bits = 8 * gfc.sideinfo_len;\n bits += writeMainData(gfp);\n drain_into_ancillary(gfp, l3_side.resvDrain_post);\n bits += l3_side.resvDrain_post;\n\n l3_side.main_data_begin += (bitsPerFrame - bits) / 8;\n\n /*\n * compare number of bits needed to clear all buffered mp3 frames with\n * what we think the resvsize is:\n */\n if (compute_flushbits(gfp, new TotalBytes()) != gfc.ResvSize) {\n System.err.println(\"Internal buffer inconsistency. flushbits <> ResvSize\");\n }\n\n /*\n * compare main_data_begin for the next frame with what we think the\n * resvsize is:\n */\n if ((l3_side.main_data_begin * 8) != gfc.ResvSize) {\n System.err.printf(\"bit reservoir error: \\n\"\n + \"l3_side.main_data_begin: %d \\n\"\n + \"Resvoir size: %d \\n\"\n + \"resv drain (post) %d \\n\"\n + \"resv drain (pre) %d \\n\"\n + \"header and sideinfo: %d \\n\"\n + \"data bits: %d \\n\"\n + \"total bits: %d (remainder: %d) \\n\"\n + \"bitsperframe: %d \\n\",\n 8 * l3_side.main_data_begin, gfc.ResvSize,\n l3_side.resvDrain_post, l3_side.resvDrain_pre,\n 8 * gfc.sideinfo_len, bits - l3_side.resvDrain_post - 8\n * gfc.sideinfo_len, bits, bits % 8, bitsPerFrame);\n\n System.err.println(\"This is a fatal error. It has several possible causes:\");\n System.err.println(\"90%% LAME compiled with buggy version of gcc using advanced optimizations\");\n System.err.println(\" 9%% Your system is overclocked\");\n System.err.println(\" 1%% bug in LAME encoding library\");\n\n gfc.ResvSize = l3_side.main_data_begin * 8;\n }\n //;\n assert(totbit % 8 == 0);\n\n if (totbit > 1000000000) {\n /*\n * to avoid totbit overflow, (at 8h encoding at 128kbs) lets reset\n * bit counter\n */\n var i;\n for (i = 0; i < LameInternalFlags.MAX_HEADER_BUF; ++i)\n gfc.header[i].write_timing -= totbit;\n totbit = 0;\n }\n\n return 0;\n };\n\n /**\n *
\n     * copy data out of the internal MP3 bit buffer into a user supplied\n     *       unsigned char buffer.\n     *\n     *       mp3data=0      indicates data in buffer is an id3tags and VBR tags\n     *       mp3data=1      data is real mp3 frame data.\n     * 
\n */\n this.copy_buffer = function (gfc, buffer, bufferPos, size, mp3data) {\n var minimum = bufByteIdx + 1;\n if (minimum <= 0)\n return 0;\n if (size != 0 && minimum > size) {\n /* buffer is too small */\n return -1;\n }\n System.arraycopy(buf, 0, buffer, bufferPos, minimum);\n bufByteIdx = -1;\n bufBitIdx = 0;\n\n if (mp3data != 0) {\n var crc = new_int(1);\n crc[0] = gfc.nMusicCRC;\n vbr.updateMusicCRC(crc, buffer, bufferPos, minimum);\n gfc.nMusicCRC = crc[0];\n\n /**\n * sum number of bytes belonging to the mp3 stream this info will be\n * written into the Xing/LAME header for seeking\n */\n if (minimum > 0) {\n gfc.VBR_seek_table.nBytesWritten += minimum;\n }\n\n if (gfc.decode_on_the_fly) { /* decode the frame */\n var pcm_buf = new_float_n([2, 1152]);\n var mp3_in = minimum;\n var samples_out = -1;\n var i;\n\n /* re-synthesis to pcm. Repeat until we get a samples_out=0 */\n while (samples_out != 0) {\n\n samples_out = mpg.hip_decode1_unclipped(gfc.hip, buffer,\n bufferPos, mp3_in, pcm_buf[0], pcm_buf[1]);\n /*\n * samples_out = 0: need more data to decode samples_out =\n * -1: error. Lets assume 0 pcm output samples_out = number\n * of samples output\n */\n\n /*\n * set the lenght of the mp3 input buffer to zero, so that\n * in the next iteration of the loop we will be querying\n * mpglib about buffered data\n */\n mp3_in = 0;\n\n if (samples_out == -1) {\n /*\n * error decoding. Not fatal, but might screw up the\n * ReplayGain tag. What should we do? Ignore for now\n */\n samples_out = 0;\n }\n if (samples_out > 0) {\n /* process the PCM data */\n\n /*\n * this should not be possible, and indicates we have\n * overflown the pcm_buf buffer\n */\n assert(samples_out <= 1152);\n\n if (gfc.findPeakSample) {\n for (i = 0; i < samples_out; i++) {\n if (pcm_buf[0][i] > gfc.PeakSample)\n gfc.PeakSample = pcm_buf[0][i];\n else if (-pcm_buf[0][i] > gfc.PeakSample)\n gfc.PeakSample = -pcm_buf[0][i];\n }\n if (gfc.channels_out > 1)\n for (i = 0; i < samples_out; i++) {\n if (pcm_buf[1][i] > gfc.PeakSample)\n gfc.PeakSample = pcm_buf[1][i];\n else if (-pcm_buf[1][i] > gfc.PeakSample)\n gfc.PeakSample = -pcm_buf[1][i];\n }\n }\n\n if (gfc.findReplayGain)\n if (ga.AnalyzeSamples(gfc.rgdata, pcm_buf[0], 0,\n pcm_buf[1], 0, samples_out,\n gfc.channels_out) == GainAnalysis.GAIN_ANALYSIS_ERROR)\n return -6;\n\n }\n /* if (samples_out>0) */\n }\n /* while (samples_out!=0) */\n }\n /* if (gfc.decode_on_the_fly) */\n\n }\n /* if (mp3data) */\n return minimum;\n };\n\n this.init_bit_stream_w = function (gfc) {\n buf = new_byte(Lame.LAME_MAXMP3BUFFER);\n\n gfc.h_ptr = gfc.w_ptr = 0;\n gfc.header[gfc.h_ptr].write_timing = 0;\n bufByteIdx = -1;\n bufBitIdx = 0;\n totbit = 0;\n };\n\n // From machine.h\n\n\n}\n\nmodule.exports = BitStream;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar new_short_n = common.new_short_n;\nvar assert = common.assert;\n\nvar PsyModel = require('./PsyModel.js');\nvar LameGlobalFlags = require('./LameGlobalFlags.js');\nvar LameInternalFlags = require('./LameInternalFlags.js');\nvar ATH = require('./ATH.js');\nvar ReplayGain = require('./ReplayGain.js');\nvar CBRNewIterationLoop = require('./CBRNewIterationLoop.js');\nvar BitStream = require('./BitStream.js');\nvar Tables = require('./Tables.js');\nvar Encoder = require('./Encoder.js');\n\nfunction Lame() {\n var self = this;\n var LAME_MAXALBUMART = (128 * 1024);\n\n Lame.V9 = 410;\n Lame.V8 = 420;\n Lame.V7 = 430;\n Lame.V6 = 440;\n Lame.V5 = 450;\n Lame.V4 = 460;\n Lame.V3 = 470;\n Lame.V2 = 480;\n Lame.V1 = 490;\n Lame.V0 = 500;\n\n /* still there for compatibility */\n\n Lame.R3MIX = 1000;\n Lame.STANDARD = 1001;\n Lame.EXTREME = 1002;\n Lame.INSANE = 1003;\n Lame.STANDARD_FAST = 1004;\n Lame.EXTREME_FAST = 1005;\n Lame.MEDIUM = 1006;\n Lame.MEDIUM_FAST = 1007;\n\n /**\n * maximum size of mp3buffer needed if you encode at most 1152 samples for\n * each call to lame_encode_buffer. see lame_encode_buffer() below\n * (LAME_MAXMP3BUFFER is now obsolete)\n */\n var LAME_MAXMP3BUFFER = (16384 + LAME_MAXALBUMART);\n Lame.LAME_MAXMP3BUFFER = LAME_MAXMP3BUFFER;\n\n var ga;\n var bs;\n var p;\n var qupvt;\n var qu;\n var psy = new PsyModel();\n var vbr;\n var ver;\n var id3;\n var mpglib;\n this.enc = new Encoder();\n\n this.setModules = function (_ga, _bs, _p, _qupvt, _qu, _vbr, _ver, _id3, _mpglib) {\n ga = _ga;\n bs = _bs;\n p = _p;\n qupvt = _qupvt;\n qu = _qu;\n vbr = _vbr;\n ver = _ver;\n id3 = _id3;\n mpglib = _mpglib;\n this.enc.setModules(bs, psy, qupvt, vbr);\n }\n\n /**\n * PSY Model related stuff\n */\n function PSY() {\n /**\n * The dbQ stuff.\n */\n this.mask_adjust = 0.;\n /**\n * The dbQ stuff.\n */\n this.mask_adjust_short = 0.;\n /* at transition from one scalefactor band to next */\n /**\n * Band weight long scalefactor bands.\n */\n this.bo_l_weight = new_float(Encoder.SBMAX_l);\n /**\n * Band weight short scalefactor bands.\n */\n this.bo_s_weight = new_float(Encoder.SBMAX_s);\n }\n\n function LowPassHighPass() {\n this.lowerlimit = 0.;\n }\n\n function BandPass(bitrate, lPass) {\n this.lowpass = lPass;\n }\n\n var LAME_ID = 0xFFF88E3B;\n\n function lame_init_old(gfp) {\n var gfc;\n\n gfp.class_id = LAME_ID;\n\n gfc = gfp.internal_flags = new LameInternalFlags();\n\n /* Global flags. set defaults here for non-zero values */\n /* see lame.h for description */\n /*\n * set integer values to -1 to mean that LAME will compute the best\n * value, UNLESS the calling program as set it (and the value is no\n * longer -1)\n */\n\n gfp.mode = MPEGMode.NOT_SET;\n gfp.original = 1;\n gfp.in_samplerate = 44100;\n gfp.num_channels = 2;\n gfp.num_samples = -1;\n\n gfp.bWriteVbrTag = true;\n gfp.quality = -1;\n gfp.short_blocks = null;\n gfc.subblock_gain = -1;\n\n gfp.lowpassfreq = 0;\n gfp.highpassfreq = 0;\n gfp.lowpasswidth = -1;\n gfp.highpasswidth = -1;\n\n gfp.VBR = VbrMode.vbr_off;\n gfp.VBR_q = 4;\n gfp.ATHcurve = -1;\n gfp.VBR_mean_bitrate_kbps = 128;\n gfp.VBR_min_bitrate_kbps = 0;\n gfp.VBR_max_bitrate_kbps = 0;\n gfp.VBR_hard_min = 0;\n gfc.VBR_min_bitrate = 1;\n /* not 0 ????? */\n gfc.VBR_max_bitrate = 13;\n /* not 14 ????? */\n\n gfp.quant_comp = -1;\n gfp.quant_comp_short = -1;\n\n gfp.msfix = -1;\n\n gfc.resample_ratio = 1;\n\n gfc.OldValue[0] = 180;\n gfc.OldValue[1] = 180;\n gfc.CurrentStep[0] = 4;\n gfc.CurrentStep[1] = 4;\n gfc.masking_lower = 1;\n gfc.nsPsy.attackthre = -1;\n gfc.nsPsy.attackthre_s = -1;\n\n gfp.scale = -1;\n\n gfp.athaa_type = -1;\n gfp.ATHtype = -1;\n /* default = -1 = set in lame_init_params */\n gfp.athaa_loudapprox = -1;\n /* 1 = flat loudness approx. (total energy) */\n /* 2 = equal loudness curve */\n gfp.athaa_sensitivity = 0.0;\n /* no offset */\n gfp.useTemporal = null;\n gfp.interChRatio = -1;\n\n /*\n * The reason for int mf_samples_to_encode = ENCDELAY + POSTDELAY;\n * ENCDELAY = internal encoder delay. And then we have to add\n * POSTDELAY=288 because of the 50% MDCT overlap. A 576 MDCT granule\n * decodes to 1152 samples. To synthesize the 576 samples centered under\n * this granule we need the previous granule for the first 288 samples\n * (no problem), and the next granule for the next 288 samples (not\n * possible if this is last granule). So we need to pad with 288 samples\n * to make sure we can encode the 576 samples we are interested in.\n */\n gfc.mf_samples_to_encode = Encoder.ENCDELAY + Encoder.POSTDELAY;\n gfp.encoder_padding = 0;\n gfc.mf_size = Encoder.ENCDELAY - Encoder.MDCTDELAY;\n /*\n * we pad input with this many 0's\n */\n\n gfp.findReplayGain = false;\n gfp.decode_on_the_fly = false;\n\n gfc.decode_on_the_fly = false;\n gfc.findReplayGain = false;\n gfc.findPeakSample = false;\n\n gfc.RadioGain = 0;\n gfc.AudiophileGain = 0;\n gfc.noclipGainChange = 0;\n gfc.noclipScale = -1.0;\n\n gfp.preset = 0;\n\n gfp.write_id3tag_automatic = true;\n return 0;\n }\n\n this.lame_init = function () {\n var gfp = new LameGlobalFlags();\n\n var ret = lame_init_old(gfp);\n if (ret != 0) {\n return null;\n }\n\n gfp.lame_allocated_gfp = 1;\n return gfp;\n }\n\n function filter_coef(x) {\n if (x > 1.0)\n return 0.0;\n if (x <= 0.0)\n return 1.0;\n\n return Math.cos(Math.PI / 2 * x);\n }\n\n this.nearestBitrateFullIndex = function (bitrate) {\n /* borrowed from DM abr presets */\n\n var full_bitrate_table = [8, 16, 24, 32, 40, 48, 56, 64, 80,\n 96, 112, 128, 160, 192, 224, 256, 320];\n\n var lower_range = 0, lower_range_kbps = 0, upper_range = 0, upper_range_kbps = 0;\n\n /* We assume specified bitrate will be 320kbps */\n upper_range_kbps = full_bitrate_table[16];\n upper_range = 16;\n lower_range_kbps = full_bitrate_table[16];\n lower_range = 16;\n\n /*\n * Determine which significant bitrates the value specified falls\n * between, if loop ends without breaking then we were correct above\n * that the value was 320\n */\n for (var b = 0; b < 16; b++) {\n if ((Math.max(bitrate, full_bitrate_table[b + 1])) != bitrate) {\n upper_range_kbps = full_bitrate_table[b + 1];\n upper_range = b + 1;\n lower_range_kbps = full_bitrate_table[b];\n lower_range = (b);\n break;\n /* We found upper range */\n }\n }\n\n /* Determine which range the value specified is closer to */\n if ((upper_range_kbps - bitrate) > (bitrate - lower_range_kbps)) {\n return lower_range;\n }\n return upper_range;\n }\n\n function optimum_samplefreq(lowpassfreq, input_samplefreq) {\n /*\n * Rules:\n *\n * - if possible, sfb21 should NOT be used\n */\n var suggested_samplefreq = 44100;\n\n if (input_samplefreq >= 48000)\n suggested_samplefreq = 48000;\n else if (input_samplefreq >= 44100)\n suggested_samplefreq = 44100;\n else if (input_samplefreq >= 32000)\n suggested_samplefreq = 32000;\n else if (input_samplefreq >= 24000)\n suggested_samplefreq = 24000;\n else if (input_samplefreq >= 22050)\n suggested_samplefreq = 22050;\n else if (input_samplefreq >= 16000)\n suggested_samplefreq = 16000;\n else if (input_samplefreq >= 12000)\n suggested_samplefreq = 12000;\n else if (input_samplefreq >= 11025)\n suggested_samplefreq = 11025;\n else if (input_samplefreq >= 8000)\n suggested_samplefreq = 8000;\n\n if (lowpassfreq == -1)\n return suggested_samplefreq;\n\n if (lowpassfreq <= 15960)\n suggested_samplefreq = 44100;\n if (lowpassfreq <= 15250)\n suggested_samplefreq = 32000;\n if (lowpassfreq <= 11220)\n suggested_samplefreq = 24000;\n if (lowpassfreq <= 9970)\n suggested_samplefreq = 22050;\n if (lowpassfreq <= 7230)\n suggested_samplefreq = 16000;\n if (lowpassfreq <= 5420)\n suggested_samplefreq = 12000;\n if (lowpassfreq <= 4510)\n suggested_samplefreq = 11025;\n if (lowpassfreq <= 3970)\n suggested_samplefreq = 8000;\n\n if (input_samplefreq < suggested_samplefreq) {\n /*\n * choose a valid MPEG sample frequency above the input sample\n * frequency to avoid SFB21/12 bitrate bloat rh 061115\n */\n if (input_samplefreq > 44100) {\n return 48000;\n }\n if (input_samplefreq > 32000) {\n return 44100;\n }\n if (input_samplefreq > 24000) {\n return 32000;\n }\n if (input_samplefreq > 22050) {\n return 24000;\n }\n if (input_samplefreq > 16000) {\n return 22050;\n }\n if (input_samplefreq > 12000) {\n return 16000;\n }\n if (input_samplefreq > 11025) {\n return 12000;\n }\n if (input_samplefreq > 8000) {\n return 11025;\n }\n return 8000;\n }\n return suggested_samplefreq;\n }\n\n /**\n * convert samp freq in Hz to index\n */\n function SmpFrqIndex(sample_freq, gpf) {\n switch (sample_freq) {\n case 44100:\n gpf.version = 1;\n return 0;\n case 48000:\n gpf.version = 1;\n return 1;\n case 32000:\n gpf.version = 1;\n return 2;\n case 22050:\n gpf.version = 0;\n return 0;\n case 24000:\n gpf.version = 0;\n return 1;\n case 16000:\n gpf.version = 0;\n return 2;\n case 11025:\n gpf.version = 0;\n return 0;\n case 12000:\n gpf.version = 0;\n return 1;\n case 8000:\n gpf.version = 0;\n return 2;\n default:\n gpf.version = 0;\n return -1;\n }\n }\n\n /**\n * @param bRate\n * legal rates from 8 to 320\n */\n function FindNearestBitrate(bRate, version, samplerate) {\n /* MPEG-1 or MPEG-2 LSF */\n if (samplerate < 16000)\n version = 2;\n\n var bitrate = Tables.bitrate_table[version][1];\n\n for (var i = 2; i <= 14; i++) {\n if (Tables.bitrate_table[version][i] > 0) {\n if (Math.abs(Tables.bitrate_table[version][i] - bRate) < Math\n .abs(bitrate - bRate))\n bitrate = Tables.bitrate_table[version][i];\n }\n }\n return bitrate;\n }\n\n /**\n * @param bRate\n * legal rates from 32 to 448 kbps\n * @param version\n * MPEG-1 or MPEG-2/2.5 LSF\n */\n function BitrateIndex(bRate, version, samplerate) {\n /* convert bitrate in kbps to index */\n if (samplerate < 16000)\n version = 2;\n for (var i = 0; i <= 14; i++) {\n if (Tables.bitrate_table[version][i] > 0) {\n if (Tables.bitrate_table[version][i] == bRate) {\n return i;\n }\n }\n }\n return -1;\n }\n\n function optimum_bandwidth(lh, bitrate) {\n /**\n *
\n         *  Input:\n         *      bitrate     total bitrate in kbps\n         *\n         *   Output:\n         *      lowerlimit: best lowpass frequency limit for input filter in Hz\n         *      upperlimit: best highpass frequency limit for input filter in Hz\n         * 
\n */\n var freq_map = [new BandPass(8, 2000),\n new BandPass(16, 3700), new BandPass(24, 3900),\n new BandPass(32, 5500), new BandPass(40, 7000),\n new BandPass(48, 7500), new BandPass(56, 10000),\n new BandPass(64, 11000), new BandPass(80, 13500),\n new BandPass(96, 15100), new BandPass(112, 15600),\n new BandPass(128, 17000), new BandPass(160, 17500),\n new BandPass(192, 18600), new BandPass(224, 19400),\n new BandPass(256, 19700), new BandPass(320, 20500)];\n\n var table_index = self.nearestBitrateFullIndex(bitrate);\n lh.lowerlimit = freq_map[table_index].lowpass;\n }\n\n function lame_init_params_ppflt(gfp) {\n var gfc = gfp.internal_flags;\n /***************************************************************/\n /* compute info needed for polyphase filter (filter type==0, default) */\n /***************************************************************/\n\n var lowpass_band = 32;\n var highpass_band = -1;\n\n if (gfc.lowpass1 > 0) {\n var minband = 999;\n for (var band = 0; band <= 31; band++) {\n var freq = (band / 31.0);\n /* this band and above will be zeroed: */\n if (freq >= gfc.lowpass2) {\n lowpass_band = Math.min(lowpass_band, band);\n }\n if (gfc.lowpass1 < freq && freq < gfc.lowpass2) {\n minband = Math.min(minband, band);\n }\n }\n\n /*\n * compute the *actual* transition band implemented by the polyphase\n * filter\n */\n if (minband == 999) {\n gfc.lowpass1 = (lowpass_band - .75) / 31.0;\n } else {\n gfc.lowpass1 = (minband - .75) / 31.0;\n }\n gfc.lowpass2 = lowpass_band / 31.0;\n }\n\n /*\n * make sure highpass filter is within 90% of what the effective\n * highpass frequency will be\n */\n if (gfc.highpass2 > 0) {\n if (gfc.highpass2 < .9 * (.75 / 31.0)) {\n gfc.highpass1 = 0;\n gfc.highpass2 = 0;\n System.err.println(\"Warning: highpass filter disabled. \"\n + \"highpass frequency too small\\n\");\n }\n }\n\n if (gfc.highpass2 > 0) {\n var maxband = -1;\n for (var band = 0; band <= 31; band++) {\n var freq = band / 31.0;\n /* this band and below will be zereod */\n if (freq <= gfc.highpass1) {\n highpass_band = Math.max(highpass_band, band);\n }\n if (gfc.highpass1 < freq && freq < gfc.highpass2) {\n maxband = Math.max(maxband, band);\n }\n }\n /*\n * compute the *actual* transition band implemented by the polyphase\n * filter\n */\n gfc.highpass1 = highpass_band / 31.0;\n if (maxband == -1) {\n gfc.highpass2 = (highpass_band + .75) / 31.0;\n } else {\n gfc.highpass2 = (maxband + .75) / 31.0;\n }\n }\n\n for (var band = 0; band < 32; band++) {\n var fc1, fc2;\n var freq = band / 31.0;\n if (gfc.highpass2 > gfc.highpass1) {\n fc1 = filter_coef((gfc.highpass2 - freq)\n / (gfc.highpass2 - gfc.highpass1 + 1e-20));\n } else {\n fc1 = 1.0;\n }\n if (gfc.lowpass2 > gfc.lowpass1) {\n fc2 = filter_coef((freq - gfc.lowpass1)\n / (gfc.lowpass2 - gfc.lowpass1 + 1e-20));\n } else {\n fc2 = 1.0;\n }\n gfc.amp_filter[band] = (fc1 * fc2);\n }\n }\n\n function lame_init_qval(gfp) {\n var gfc = gfp.internal_flags;\n\n switch (gfp.quality) {\n default:\n case 9: /* no psymodel, no noise shaping */\n gfc.psymodel = 0;\n gfc.noise_shaping = 0;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 8:\n gfp.quality = 7;\n //$FALL-THROUGH$\n case 7:\n /*\n * use psymodel (for short block and m/s switching), but no noise\n * shapping\n */\n gfc.psymodel = 1;\n gfc.noise_shaping = 0;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 6:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 5:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 0;\n gfc.full_outer_loop = 0;\n break;\n\n case 4:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 0;\n gfc.noise_shaping_stop = 0;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 3:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n gfc.noise_shaping_amp = 1;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 2:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 1;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n /* inner loop */\n gfc.full_outer_loop = 0;\n break;\n\n case 1:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 2;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n gfc.full_outer_loop = 0;\n break;\n\n case 0:\n gfc.psymodel = 1;\n if (gfc.noise_shaping == 0)\n gfc.noise_shaping = 1;\n if (gfc.substep_shaping == 0)\n gfc.substep_shaping = 2;\n gfc.noise_shaping_amp = 2;\n gfc.noise_shaping_stop = 1;\n if (gfc.subblock_gain == -1)\n gfc.subblock_gain = 1;\n gfc.use_best_huffman = 1;\n /*\n * type 2 disabled because of it slowness, in favor of full outer\n * loop search\n */\n gfc.full_outer_loop = 0;\n /*\n * full outer loop search disabled because of audible distortions it\n * may generate rh 060629\n */\n break;\n }\n\n }\n\n function lame_init_bitstream(gfp) {\n var gfc = gfp.internal_flags;\n gfp.frameNum = 0;\n\n if (gfp.write_id3tag_automatic) {\n id3.id3tag_write_v2(gfp);\n }\n /* initialize histogram data optionally used by frontend */\n\n gfc.bitrate_stereoMode_Hist = new_int_n([16, 4 + 1]);\n gfc.bitrate_blockType_Hist = new_int_n([16, 4 + 1 + 1]);\n\n gfc.PeakSample = 0.0;\n\n /* Write initial VBR Header to bitstream and init VBR data */\n if (gfp.bWriteVbrTag)\n vbr.InitVbrTag(gfp);\n }\n\n /********************************************************************\n * initialize internal params based on data in gf (globalflags struct filled\n * in by calling program)\n *\n * OUTLINE:\n *\n * We first have some complex code to determine bitrate, output samplerate\n * and mode. It is complicated by the fact that we allow the user to set\n * some or all of these parameters, and need to determine best possible\n * values for the rest of them:\n *\n * 1. set some CPU related flags 2. check if we are mono.mono, stereo.mono\n * or stereo.stereo 3. compute bitrate and output samplerate: user may have\n * set compression ratio user may have set a bitrate user may have set a\n * output samplerate 4. set some options which depend on output samplerate\n * 5. compute the actual compression ratio 6. set mode based on compression\n * ratio\n *\n * The remaining code is much simpler - it just sets options based on the\n * mode & compression ratio:\n *\n * set allow_diff_short based on mode select lowpass filter based on\n * compression ratio & mode set the bitrate index, and min/max bitrates for\n * VBR modes disable VBR tag if it is not appropriate initialize the\n * bitstream initialize scalefac_band data set sideinfo_len (based on\n * channels, CRC, out_samplerate) write an id3v2 tag into the bitstream\n * write VBR tag into the bitstream set mpeg1/2 flag estimate the number of\n * frames (based on a lot of data)\n *\n * now we set more flags: nspsytune: see code VBR modes see code CBR/ABR see\n * code\n *\n * Finally, we set the algorithm flags based on the gfp.quality value\n * lame_init_qval(gfp);\n *\n ********************************************************************/\n this.lame_init_params = function (gfp) {\n var gfc = gfp.internal_flags;\n\n gfc.Class_ID = 0;\n if (gfc.ATH == null)\n gfc.ATH = new ATH();\n if (gfc.PSY == null)\n gfc.PSY = new PSY();\n if (gfc.rgdata == null)\n gfc.rgdata = new ReplayGain();\n\n gfc.channels_in = gfp.num_channels;\n if (gfc.channels_in == 1)\n gfp.mode = MPEGMode.MONO;\n gfc.channels_out = (gfp.mode == MPEGMode.MONO) ? 1 : 2;\n gfc.mode_ext = Encoder.MPG_MD_MS_LR;\n if (gfp.mode == MPEGMode.MONO)\n gfp.force_ms = false;\n /*\n * don't allow forced mid/side stereo for mono output\n */\n\n if (gfp.VBR == VbrMode.vbr_off && gfp.VBR_mean_bitrate_kbps != 128\n && gfp.brate == 0)\n gfp.brate = gfp.VBR_mean_bitrate_kbps;\n\n if (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_mtrh\n || gfp.VBR == VbrMode.vbr_mt) {\n /* these modes can handle free format condition */\n } else {\n gfp.free_format = false;\n /* mode can't be mixed with free format */\n }\n\n if (gfp.VBR == VbrMode.vbr_off && gfp.brate == 0) {\n /* no bitrate or compression ratio specified, use 11.025 */\n if (BitStream.EQ(gfp.compression_ratio, 0))\n gfp.compression_ratio = 11.025;\n /*\n * rate to compress a CD down to exactly 128000 bps\n */\n }\n\n /* find bitrate if user specify a compression ratio */\n if (gfp.VBR == VbrMode.vbr_off && gfp.compression_ratio > 0) {\n\n if (gfp.out_samplerate == 0)\n gfp.out_samplerate = map2MP3Frequency((int)(0.97 * gfp.in_samplerate));\n /*\n * round up with a margin of 3 %\n */\n\n /*\n * choose a bitrate for the output samplerate which achieves\n * specified compression ratio\n */\n gfp.brate = 0 | (gfp.out_samplerate * 16 * gfc.channels_out / (1.e3 * gfp.compression_ratio));\n\n /* we need the version for the bitrate table look up */\n gfc.samplerate_index = SmpFrqIndex(gfp.out_samplerate, gfp);\n\n if (!gfp.free_format) /*\n * for non Free Format find the nearest allowed\n * bitrate\n */\n gfp.brate = FindNearestBitrate(gfp.brate, gfp.version,\n gfp.out_samplerate);\n }\n\n if (gfp.out_samplerate != 0) {\n if (gfp.out_samplerate < 16000) {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 8);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 64);\n } else if (gfp.out_samplerate < 32000) {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 8);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 160);\n } else {\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps,\n 32);\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps,\n 320);\n }\n }\n\n /****************************************************************/\n /* if a filter has not been enabled, see if we should add one: */\n /****************************************************************/\n if (gfp.lowpassfreq == 0) {\n var lowpass = 16000.;\n\n switch (gfp.VBR) {\n case VbrMode.vbr_off:\n {\n var lh = new LowPassHighPass();\n optimum_bandwidth(lh, gfp.brate);\n lowpass = lh.lowerlimit;\n break;\n }\n case VbrMode.vbr_abr:\n {\n var lh = new LowPassHighPass();\n optimum_bandwidth(lh, gfp.VBR_mean_bitrate_kbps);\n lowpass = lh.lowerlimit;\n break;\n }\n case VbrMode.vbr_rh:\n {\n var x = [19500, 19000, 18600, 18000, 17500, 16000,\n 15600, 14900, 12500, 10000, 3950];\n if (0 <= gfp.VBR_q && gfp.VBR_q <= 9) {\n var a = x[gfp.VBR_q], b = x[gfp.VBR_q + 1], m = gfp.VBR_q_frac;\n lowpass = linear_int(a, b, m);\n } else {\n lowpass = 19500;\n }\n break;\n }\n default:\n {\n var x = [19500, 19000, 18500, 18000, 17500, 16500,\n 15500, 14500, 12500, 9500, 3950];\n if (0 <= gfp.VBR_q && gfp.VBR_q <= 9) {\n var a = x[gfp.VBR_q], b = x[gfp.VBR_q + 1], m = gfp.VBR_q_frac;\n lowpass = linear_int(a, b, m);\n } else {\n lowpass = 19500;\n }\n }\n }\n if (gfp.mode == MPEGMode.MONO\n && (gfp.VBR == VbrMode.vbr_off || gfp.VBR == VbrMode.vbr_abr))\n lowpass *= 1.5;\n\n gfp.lowpassfreq = lowpass | 0;\n }\n\n if (gfp.out_samplerate == 0) {\n if (2 * gfp.lowpassfreq > gfp.in_samplerate) {\n gfp.lowpassfreq = gfp.in_samplerate / 2;\n }\n gfp.out_samplerate = optimum_samplefreq(gfp.lowpassfreq | 0,\n gfp.in_samplerate);\n }\n\n gfp.lowpassfreq = Math.min(20500, gfp.lowpassfreq);\n gfp.lowpassfreq = Math.min(gfp.out_samplerate / 2, gfp.lowpassfreq);\n\n if (gfp.VBR == VbrMode.vbr_off) {\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.brate);\n }\n if (gfp.VBR == VbrMode.vbr_abr) {\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.VBR_mean_bitrate_kbps);\n }\n\n /*\n * do not compute ReplayGain values and do not find the peak sample if\n * we can't store them\n */\n if (!gfp.bWriteVbrTag) {\n gfp.findReplayGain = false;\n gfp.decode_on_the_fly = false;\n gfc.findPeakSample = false;\n }\n gfc.findReplayGain = gfp.findReplayGain;\n gfc.decode_on_the_fly = gfp.decode_on_the_fly;\n\n if (gfc.decode_on_the_fly)\n gfc.findPeakSample = true;\n\n if (gfc.findReplayGain) {\n if (ga.InitGainAnalysis(gfc.rgdata, gfp.out_samplerate) == GainAnalysis.INIT_GAIN_ANALYSIS_ERROR) {\n gfp.internal_flags = null;\n return -6;\n }\n }\n\n if (gfc.decode_on_the_fly && !gfp.decode_only) {\n if (gfc.hip != null) {\n mpglib.hip_decode_exit(gfc.hip);\n }\n gfc.hip = mpglib.hip_decode_init();\n }\n\n gfc.mode_gr = gfp.out_samplerate <= 24000 ? 1 : 2;\n /*\n * Number of granules per frame\n */\n gfp.framesize = 576 * gfc.mode_gr;\n gfp.encoder_delay = Encoder.ENCDELAY;\n\n gfc.resample_ratio = gfp.in_samplerate / gfp.out_samplerate;\n\n /**\n *
\n         *  sample freq       bitrate     compression ratio\n         *     [kHz]      [kbps/channel]   for 16 bit input\n         *     44.1            56               12.6\n         *     44.1            64               11.025\n         *     44.1            80                8.82\n         *     22.05           24               14.7\n         *     22.05           32               11.025\n         *     22.05           40                8.82\n         *     16              16               16.0\n         *     16              24               10.667\n         * 
\n */\n /**\n *
\n         *  For VBR, take a guess at the compression_ratio.\n         *  For example:\n         *\n         *    VBR_q    compression     like\n         *     -        4.4         320 kbps/44 kHz\n         *   0...1      5.5         256 kbps/44 kHz\n         *     2        7.3         192 kbps/44 kHz\n         *     4        8.8         160 kbps/44 kHz\n         *     6       11           128 kbps/44 kHz\n         *     9       14.7          96 kbps\n         *\n         *  for lower bitrates, downsample with --resample\n         * 
\n */\n switch (gfp.VBR) {\n case VbrMode.vbr_mt:\n case VbrMode.vbr_rh:\n case VbrMode.vbr_mtrh:\n {\n /* numbers are a bit strange, but they determine the lowpass value */\n var cmp = [5.7, 6.5, 7.3, 8.2, 10, 11.9, 13, 14,\n 15, 16.5];\n gfp.compression_ratio = cmp[gfp.VBR_q];\n }\n break;\n case VbrMode.vbr_abr:\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.VBR_mean_bitrate_kbps);\n break;\n default:\n gfp.compression_ratio = gfp.out_samplerate * 16 * gfc.channels_out\n / (1.e3 * gfp.brate);\n break;\n }\n\n /*\n * mode = -1 (not set by user) or mode = MONO (because of only 1 input\n * channel). If mode has not been set, then select J-STEREO\n */\n if (gfp.mode == MPEGMode.NOT_SET) {\n gfp.mode = MPEGMode.JOINT_STEREO;\n }\n\n /* apply user driven high pass filter */\n if (gfp.highpassfreq > 0) {\n gfc.highpass1 = 2. * gfp.highpassfreq;\n\n if (gfp.highpasswidth >= 0)\n gfc.highpass2 = 2. * (gfp.highpassfreq + gfp.highpasswidth);\n else\n /* 0% above on default */\n gfc.highpass2 = (1 + 0.00) * 2. * gfp.highpassfreq;\n\n gfc.highpass1 /= gfp.out_samplerate;\n gfc.highpass2 /= gfp.out_samplerate;\n } else {\n gfc.highpass1 = 0;\n gfc.highpass2 = 0;\n }\n /* apply user driven low pass filter */\n if (gfp.lowpassfreq > 0) {\n gfc.lowpass2 = 2. * gfp.lowpassfreq;\n if (gfp.lowpasswidth >= 0) {\n gfc.lowpass1 = 2. * (gfp.lowpassfreq - gfp.lowpasswidth);\n if (gfc.lowpass1 < 0) /* has to be >= 0 */\n gfc.lowpass1 = 0;\n } else { /* 0% below on default */\n gfc.lowpass1 = (1 - 0.00) * 2. * gfp.lowpassfreq;\n }\n gfc.lowpass1 /= gfp.out_samplerate;\n gfc.lowpass2 /= gfp.out_samplerate;\n } else {\n gfc.lowpass1 = 0;\n gfc.lowpass2 = 0;\n }\n\n /**********************************************************************/\n /* compute info needed for polyphase filter (filter type==0, default) */\n /**********************************************************************/\n lame_init_params_ppflt(gfp);\n /*******************************************************\n * samplerate and bitrate index\n *******************************************************/\n gfc.samplerate_index = SmpFrqIndex(gfp.out_samplerate, gfp);\n if (gfc.samplerate_index < 0) {\n gfp.internal_flags = null;\n return -1;\n }\n\n if (gfp.VBR == VbrMode.vbr_off) {\n if (gfp.free_format) {\n gfc.bitrate_index = 0;\n } else {\n gfp.brate = FindNearestBitrate(gfp.brate, gfp.version,\n gfp.out_samplerate);\n gfc.bitrate_index = BitrateIndex(gfp.brate, gfp.version,\n gfp.out_samplerate);\n if (gfc.bitrate_index <= 0) {\n gfp.internal_flags = null;\n return -1;\n }\n }\n } else {\n gfc.bitrate_index = 1;\n }\n\n /* for CBR, we will write an \"info\" tag. */\n\n if (gfp.analysis)\n gfp.bWriteVbrTag = false;\n\n /* some file options not allowed if output is: not specified or stdout */\n if (gfc.pinfo != null)\n gfp.bWriteVbrTag = false;\n /* disable Xing VBR tag */\n\n bs.init_bit_stream_w(gfc);\n\n var j = gfc.samplerate_index + (3 * gfp.version) + 6\n * (gfp.out_samplerate < 16000 ? 1 : 0);\n for (var i = 0; i < Encoder.SBMAX_l + 1; i++)\n gfc.scalefac_band.l[i] = qupvt.sfBandIndex[j].l[i];\n\n for (var i = 0; i < Encoder.PSFB21 + 1; i++) {\n var size = (gfc.scalefac_band.l[22] - gfc.scalefac_band.l[21])\n / Encoder.PSFB21;\n var start = gfc.scalefac_band.l[21] + i * size;\n gfc.scalefac_band.psfb21[i] = start;\n }\n gfc.scalefac_band.psfb21[Encoder.PSFB21] = 576;\n\n for (var i = 0; i < Encoder.SBMAX_s + 1; i++)\n gfc.scalefac_band.s[i] = qupvt.sfBandIndex[j].s[i];\n\n for (var i = 0; i < Encoder.PSFB12 + 1; i++) {\n var size = (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12])\n / Encoder.PSFB12;\n var start = gfc.scalefac_band.s[12] + i * size;\n gfc.scalefac_band.psfb12[i] = start;\n }\n gfc.scalefac_band.psfb12[Encoder.PSFB12] = 192;\n /* determine the mean bitrate for main data */\n if (gfp.version == 1) /* MPEG 1 */\n gfc.sideinfo_len = (gfc.channels_out == 1) ? 4 + 17 : 4 + 32;\n else\n /* MPEG 2 */\n gfc.sideinfo_len = (gfc.channels_out == 1) ? 4 + 9 : 4 + 17;\n\n if (gfp.error_protection)\n gfc.sideinfo_len += 2;\n\n lame_init_bitstream(gfp);\n\n gfc.Class_ID = LAME_ID;\n\n {\n var k;\n\n for (k = 0; k < 19; k++)\n gfc.nsPsy.pefirbuf[k] = 700 * gfc.mode_gr * gfc.channels_out;\n\n if (gfp.ATHtype == -1)\n gfp.ATHtype = 4;\n }\n assert(gfp.VBR_q <= 9);\n assert(gfp.VBR_q >= 0);\n\n switch (gfp.VBR) {\n\n case VbrMode.vbr_mt:\n gfp.VBR = VbrMode.vbr_mtrh;\n //$FALL-THROUGH$\n case VbrMode.vbr_mtrh:\n {\n if (gfp.useTemporal == null) {\n gfp.useTemporal = false;\n /* off by default for this VBR mode */\n }\n\n p.apply_preset(gfp, 500 - (gfp.VBR_q * 10), 0);\n /**\n *
\n                 *   The newer VBR code supports only a limited\n                 *     subset of quality levels:\n                 *     9-5=5 are the same, uses x^3/4 quantization\n                 *   4-0=0 are the same  5 plus best huffman divide code\n                 * 
\n */\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n if (gfp.quality < 5)\n gfp.quality = 0;\n if (gfp.quality > 5)\n gfp.quality = 5;\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n /*\n * sfb21 extra only with MPEG-1 at higher sampling rates\n */\n if (gfp.experimentalY)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = (gfp.out_samplerate > 44000);\n\n gfc.iteration_loop = new VBRNewIterationLoop(qu);\n break;\n\n }\n case VbrMode.vbr_rh:\n {\n\n p.apply_preset(gfp, 500 - (gfp.VBR_q * 10), 0);\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n /*\n * sfb21 extra only with MPEG-1 at higher sampling rates\n */\n if (gfp.experimentalY)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = (gfp.out_samplerate > 44000);\n\n /*\n * VBR needs at least the output of GPSYCHO, so we have to garantee\n * that by setting a minimum quality level, actually level 6 does\n * it. down to level 6\n */\n if (gfp.quality > 6)\n gfp.quality = 6;\n\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n\n gfc.iteration_loop = new VBROldIterationLoop(qu);\n break;\n }\n\n default: /* cbr/abr */\n {\n var vbrmode;\n\n /*\n * no sfb21 extra with CBR code\n */\n gfc.sfb21_extra = false;\n\n if (gfp.quality < 0)\n gfp.quality = LAME_DEFAULT_QUALITY;\n\n vbrmode = gfp.VBR;\n if (vbrmode == VbrMode.vbr_off)\n gfp.VBR_mean_bitrate_kbps = gfp.brate;\n /* second, set parameters depending on bitrate */\n p.apply_preset(gfp, gfp.VBR_mean_bitrate_kbps, 0);\n gfp.VBR = vbrmode;\n\n gfc.PSY.mask_adjust = gfp.maskingadjust;\n gfc.PSY.mask_adjust_short = gfp.maskingadjust_short;\n\n if (vbrmode == VbrMode.vbr_off) {\n gfc.iteration_loop = new CBRNewIterationLoop(qu);\n } else {\n gfc.iteration_loop = new ABRIterationLoop(qu);\n }\n break;\n }\n }\n assert(gfp.scale >= 0);\n /* initialize default values common for all modes */\n\n if (gfp.VBR != VbrMode.vbr_off) { /* choose a min/max bitrate for VBR */\n /* if the user didn't specify VBR_max_bitrate: */\n gfc.VBR_min_bitrate = 1;\n /*\n * default: allow 8 kbps (MPEG-2) or 32 kbps (MPEG-1)\n */\n gfc.VBR_max_bitrate = 14;\n /*\n * default: allow 160 kbps (MPEG-2) or 320 kbps (MPEG-1)\n */\n if (gfp.out_samplerate < 16000)\n gfc.VBR_max_bitrate = 8;\n /* default: allow 64 kbps (MPEG-2.5) */\n if (gfp.VBR_min_bitrate_kbps != 0) {\n gfp.VBR_min_bitrate_kbps = FindNearestBitrate(\n gfp.VBR_min_bitrate_kbps, gfp.version,\n gfp.out_samplerate);\n gfc.VBR_min_bitrate = BitrateIndex(gfp.VBR_min_bitrate_kbps,\n gfp.version, gfp.out_samplerate);\n if (gfc.VBR_min_bitrate < 0)\n return -1;\n }\n if (gfp.VBR_max_bitrate_kbps != 0) {\n gfp.VBR_max_bitrate_kbps = FindNearestBitrate(\n gfp.VBR_max_bitrate_kbps, gfp.version,\n gfp.out_samplerate);\n gfc.VBR_max_bitrate = BitrateIndex(gfp.VBR_max_bitrate_kbps,\n gfp.version, gfp.out_samplerate);\n if (gfc.VBR_max_bitrate < 0)\n return -1;\n }\n gfp.VBR_min_bitrate_kbps = Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate];\n gfp.VBR_max_bitrate_kbps = Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate];\n gfp.VBR_mean_bitrate_kbps = Math.min(\n Tables.bitrate_table[gfp.version][gfc.VBR_max_bitrate],\n gfp.VBR_mean_bitrate_kbps);\n gfp.VBR_mean_bitrate_kbps = Math.max(\n Tables.bitrate_table[gfp.version][gfc.VBR_min_bitrate],\n gfp.VBR_mean_bitrate_kbps);\n }\n\n /* just another daily changing developer switch */\n if (gfp.tune) {\n gfc.PSY.mask_adjust += gfp.tune_value_a;\n gfc.PSY.mask_adjust_short += gfp.tune_value_a;\n }\n\n /* initialize internal qval settings */\n lame_init_qval(gfp);\n assert(gfp.scale >= 0);\n /*\n * automatic ATH adjustment on\n */\n if (gfp.athaa_type < 0)\n gfc.ATH.useAdjust = 3;\n else\n gfc.ATH.useAdjust = gfp.athaa_type;\n\n /* initialize internal adaptive ATH settings -jd */\n gfc.ATH.aaSensitivityP = Math.pow(10.0, gfp.athaa_sensitivity\n / -10.0);\n\n if (gfp.short_blocks == null) {\n gfp.short_blocks = ShortBlock.short_block_allowed;\n }\n\n /*\n * Note Jan/2003: Many hardware decoders cannot handle short blocks in\n * regular stereo mode unless they are coupled (same type in both\n * channels) it is a rare event (1 frame per min. or so) that LAME would\n * use uncoupled short blocks, so lets turn them off until we decide how\n * to handle this. No other encoders allow uncoupled short blocks, even\n * though it is in the standard.\n */\n /*\n * rh 20040217: coupling makes no sense for mono and dual-mono streams\n */\n if (gfp.short_blocks == ShortBlock.short_block_allowed\n && (gfp.mode == MPEGMode.JOINT_STEREO || gfp.mode == MPEGMode.STEREO)) {\n gfp.short_blocks = ShortBlock.short_block_coupled;\n }\n\n if (gfp.quant_comp < 0)\n gfp.quant_comp = 1;\n if (gfp.quant_comp_short < 0)\n gfp.quant_comp_short = 0;\n\n if (gfp.msfix < 0)\n gfp.msfix = 0;\n\n /* select psychoacoustic model */\n gfp.exp_nspsytune = gfp.exp_nspsytune | 1;\n\n if (gfp.internal_flags.nsPsy.attackthre < 0)\n gfp.internal_flags.nsPsy.attackthre = PsyModel.NSATTACKTHRE;\n if (gfp.internal_flags.nsPsy.attackthre_s < 0)\n gfp.internal_flags.nsPsy.attackthre_s = PsyModel.NSATTACKTHRE_S;\n\n assert(gfp.scale >= 0);\n\n if (gfp.scale < 0)\n gfp.scale = 1;\n\n if (gfp.ATHtype < 0)\n gfp.ATHtype = 4;\n\n if (gfp.ATHcurve < 0)\n gfp.ATHcurve = 4;\n\n if (gfp.athaa_loudapprox < 0)\n gfp.athaa_loudapprox = 2;\n\n if (gfp.interChRatio < 0)\n gfp.interChRatio = 0;\n\n if (gfp.useTemporal == null)\n gfp.useTemporal = true;\n /* on by default */\n\n /*\n * padding method as described in\n * \"MPEG-Layer3 / Bitstream Syntax and Decoding\" by Martin Sieler, Ralph\n * Sperschneider\n *\n * note: there is no padding for the very first frame\n *\n * Robert Hegemann 2000-06-22\n */\n gfc.slot_lag = gfc.frac_SpF = 0;\n if (gfp.VBR == VbrMode.vbr_off)\n gfc.slot_lag = gfc.frac_SpF = (((gfp.version + 1) * 72000 * gfp.brate) % gfp.out_samplerate) | 0;\n\n qupvt.iteration_init(gfp);\n psy.psymodel_init(gfp);\n assert(gfp.scale >= 0);\n return 0;\n }\n\n function update_inbuffer_size(gfc, nsamples) {\n if (gfc.in_buffer_0 == null || gfc.in_buffer_nsamples < nsamples) {\n gfc.in_buffer_0 = new_float(nsamples);\n gfc.in_buffer_1 = new_float(nsamples);\n gfc.in_buffer_nsamples = nsamples;\n }\n }\n\n this.lame_encode_flush = function (gfp, mp3buffer, mp3bufferPos, mp3buffer_size) {\n var gfc = gfp.internal_flags;\n var buffer = new_short_n([2, 1152]);\n var imp3 = 0, mp3count, mp3buffer_size_remaining;\n\n /*\n * we always add POSTDELAY=288 padding to make sure granule with real\n * data can be complety decoded (because of 50% overlap with next\n * granule\n */\n var end_padding;\n var frames_left;\n var samples_to_encode = gfc.mf_samples_to_encode - Encoder.POSTDELAY;\n var mf_needed = calcNeeded(gfp);\n\n /* Was flush already called? */\n if (gfc.mf_samples_to_encode < 1) {\n return 0;\n }\n mp3count = 0;\n\n if (gfp.in_samplerate != gfp.out_samplerate) {\n /*\n * delay due to resampling; needs to be fixed, if resampling code\n * gets changed\n */\n samples_to_encode += 16. * gfp.out_samplerate / gfp.in_samplerate;\n }\n end_padding = gfp.framesize - (samples_to_encode % gfp.framesize);\n if (end_padding < 576)\n end_padding += gfp.framesize;\n gfp.encoder_padding = end_padding;\n\n frames_left = (samples_to_encode + end_padding) / gfp.framesize;\n\n /*\n * send in a frame of 0 padding until all internal sample buffers are\n * flushed\n */\n while (frames_left > 0 && imp3 >= 0) {\n var bunch = mf_needed - gfc.mf_size;\n var frame_num = gfp.frameNum;\n\n bunch *= gfp.in_samplerate;\n bunch /= gfp.out_samplerate;\n if (bunch > 1152)\n bunch = 1152;\n if (bunch < 1)\n bunch = 1;\n\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n imp3 = this.lame_encode_buffer(gfp, buffer[0], buffer[1], bunch,\n mp3buffer, mp3bufferPos, mp3buffer_size_remaining);\n\n mp3bufferPos += imp3;\n mp3count += imp3;\n frames_left -= (frame_num != gfp.frameNum) ? 1 : 0;\n }\n /*\n * Set gfc.mf_samples_to_encode to 0, so we may detect and break loops\n * calling it more than once in a row.\n */\n gfc.mf_samples_to_encode = 0;\n\n if (imp3 < 0) {\n /* some type of fatal error */\n return imp3;\n }\n\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n /* mp3 related stuff. bit buffer might still contain some mp3 data */\n bs.flush_bitstream(gfp);\n imp3 = bs.copy_buffer(gfc, mp3buffer, mp3bufferPos,\n mp3buffer_size_remaining, 1);\n if (imp3 < 0) {\n /* some type of fatal error */\n return imp3;\n }\n mp3bufferPos += imp3;\n mp3count += imp3;\n mp3buffer_size_remaining = mp3buffer_size - mp3count;\n /* if user specifed buffer size = 0, dont check size */\n if (mp3buffer_size == 0)\n mp3buffer_size_remaining = 0;\n\n if (gfp.write_id3tag_automatic) {\n /* write a id3 tag to the bitstream */\n id3.id3tag_write_v1(gfp);\n\n imp3 = bs.copy_buffer(gfc, mp3buffer, mp3bufferPos,\n mp3buffer_size_remaining, 0);\n\n if (imp3 < 0) {\n return imp3;\n }\n mp3count += imp3;\n }\n return mp3count;\n };\n\n this.lame_encode_buffer = function (gfp, buffer_l, buffer_r, nsamples, mp3buf, mp3bufPos, mp3buf_size) {\n var gfc = gfp.internal_flags;\n var in_buffer = [null, null];\n\n if (gfc.Class_ID != LAME_ID)\n return -3;\n\n if (nsamples == 0)\n return 0;\n\n update_inbuffer_size(gfc, nsamples);\n\n in_buffer[0] = gfc.in_buffer_0;\n in_buffer[1] = gfc.in_buffer_1;\n\n /* make a copy of input buffer, changing type to sample_t */\n for (var i = 0; i < nsamples; i++) {\n in_buffer[0][i] = buffer_l[i];\n if (gfc.channels_in > 1)\n in_buffer[1][i] = buffer_r[i];\n }\n\n return lame_encode_buffer_sample(gfp, in_buffer[0], in_buffer[1],\n nsamples, mp3buf, mp3bufPos, mp3buf_size);\n }\n\n function calcNeeded(gfp) {\n var mf_needed = Encoder.BLKSIZE + gfp.framesize - Encoder.FFTOFFSET;\n /*\n * amount needed for FFT\n */\n mf_needed = Math.max(mf_needed, 512 + gfp.framesize - 32);\n assert(LameInternalFlags.MFSIZE >= mf_needed);\n\n return mf_needed;\n }\n\n function lame_encode_buffer_sample(gfp, buffer_l, buffer_r, nsamples, mp3buf, mp3bufPos, mp3buf_size) {\n var gfc = gfp.internal_flags;\n var mp3size = 0, ret, i, ch, mf_needed;\n var mp3out;\n var mfbuf = [null, null];\n var in_buffer = [null, null];\n\n if (gfc.Class_ID != LAME_ID)\n return -3;\n\n if (nsamples == 0)\n return 0;\n\n /* copy out any tags that may have been written into bitstream */\n mp3out = bs.copy_buffer(gfc, mp3buf, mp3bufPos, mp3buf_size, 0);\n if (mp3out < 0)\n return mp3out;\n /* not enough buffer space */\n mp3bufPos += mp3out;\n mp3size += mp3out;\n\n in_buffer[0] = buffer_l;\n in_buffer[1] = buffer_r;\n\n /* Apply user defined re-scaling */\n\n /* user selected scaling of the samples */\n if (BitStream.NEQ(gfp.scale, 0) && BitStream.NEQ(gfp.scale, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] *= gfp.scale;\n if (gfc.channels_out == 2)\n in_buffer[1][i] *= gfp.scale;\n }\n }\n\n /* user selected scaling of the channel 0 (left) samples */\n if (BitStream.NEQ(gfp.scale_left, 0)\n && BitStream.NEQ(gfp.scale_left, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] *= gfp.scale_left;\n }\n }\n\n /* user selected scaling of the channel 1 (right) samples */\n if (BitStream.NEQ(gfp.scale_right, 0)\n && BitStream.NEQ(gfp.scale_right, 1.0)) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[1][i] *= gfp.scale_right;\n }\n }\n\n /* Downsample to Mono if 2 channels in and 1 channel out */\n if (gfp.num_channels == 2 && gfc.channels_out == 1) {\n for (i = 0; i < nsamples; ++i) {\n in_buffer[0][i] = 0.5 * ( in_buffer[0][i] + in_buffer[1][i]);\n in_buffer[1][i] = 0.0;\n }\n }\n\n mf_needed = calcNeeded(gfp);\n\n mfbuf[0] = gfc.mfbuf[0];\n mfbuf[1] = gfc.mfbuf[1];\n\n var in_bufferPos = 0;\n while (nsamples > 0) {\n var in_buffer_ptr = [null, null];\n var n_in = 0;\n /* number of input samples processed with fill_buffer */\n var n_out = 0;\n /* number of samples output with fill_buffer */\n /* n_in <> n_out if we are resampling */\n\n in_buffer_ptr[0] = in_buffer[0];\n in_buffer_ptr[1] = in_buffer[1];\n /* copy in new samples into mfbuf, with resampling */\n var inOut = new InOut();\n fill_buffer(gfp, mfbuf, in_buffer_ptr, in_bufferPos, nsamples,\n inOut);\n n_in = inOut.n_in;\n n_out = inOut.n_out;\n\n /* compute ReplayGain of resampled input if requested */\n if (gfc.findReplayGain && !gfc.decode_on_the_fly)\n if (ga.AnalyzeSamples(gfc.rgdata, mfbuf[0], gfc.mf_size,\n mfbuf[1], gfc.mf_size, n_out, gfc.channels_out) == GainAnalysis.GAIN_ANALYSIS_ERROR)\n return -6;\n\n /* update in_buffer counters */\n nsamples -= n_in;\n in_bufferPos += n_in;\n if (gfc.channels_out == 2)\n ;// in_bufferPos += n_in;\n\n /* update mfbuf[] counters */\n gfc.mf_size += n_out;\n assert(gfc.mf_size <= LameInternalFlags.MFSIZE);\n\n /*\n * lame_encode_flush may have set gfc.mf_sample_to_encode to 0 so we\n * have to reinitialize it here when that happened.\n */\n if (gfc.mf_samples_to_encode < 1) {\n gfc.mf_samples_to_encode = Encoder.ENCDELAY + Encoder.POSTDELAY;\n }\n gfc.mf_samples_to_encode += n_out;\n\n if (gfc.mf_size >= mf_needed) {\n /* encode the frame. */\n /* mp3buf = pointer to current location in buffer */\n /* mp3buf_size = size of original mp3 output buffer */\n /* = 0 if we should not worry about the */\n /* buffer size because calling program is */\n /* to lazy to compute it */\n /* mp3size = size of data written to buffer so far */\n /* mp3buf_size-mp3size = amount of space avalable */\n\n var buf_size = mp3buf_size - mp3size;\n if (mp3buf_size == 0)\n buf_size = 0;\n\n ret = lame_encode_frame(gfp, mfbuf[0], mfbuf[1], mp3buf,\n mp3bufPos, buf_size);\n\n if (ret < 0)\n return ret;\n mp3bufPos += ret;\n mp3size += ret;\n\n /* shift out old samples */\n gfc.mf_size -= gfp.framesize;\n gfc.mf_samples_to_encode -= gfp.framesize;\n for (ch = 0; ch < gfc.channels_out; ch++)\n for (i = 0; i < gfc.mf_size; i++)\n mfbuf[ch][i] = mfbuf[ch][i + gfp.framesize];\n }\n }\n assert(nsamples == 0);\n\n return mp3size;\n }\n\n function lame_encode_frame(gfp, inbuf_l, inbuf_r, mp3buf, mp3bufPos, mp3buf_size) {\n var ret = self.enc.lame_encode_mp3_frame(gfp, inbuf_l, inbuf_r, mp3buf,\n mp3bufPos, mp3buf_size);\n gfp.frameNum++;\n return ret;\n }\n\n function InOut() {\n this.n_in = 0;\n this.n_out = 0;\n }\n\n\n function NumUsed() {\n this.num_used = 0;\n }\n\n /**\n * Greatest common divisor.\n *

\n * Joint work of Euclid and M. Hendry\n */\n function gcd(i, j) {\n return j != 0 ? gcd(j, i % j) : i;\n }\n\n /**\n * Resampling via FIR filter, blackman window.\n */\n function blackman(x, fcn, l) {\n /*\n * This algorithm from: SIGNAL PROCESSING ALGORITHMS IN FORTRAN AND C\n * S.D. Stearns and R.A. David, Prentice-Hall, 1992\n */\n var wcn = (Math.PI * fcn);\n\n x /= l;\n if (x < 0)\n x = 0;\n if (x > 1)\n x = 1;\n var x2 = x - .5;\n\n var bkwn = 0.42 - 0.5 * Math.cos(2 * x * Math.PI) + 0.08 * Math.cos(4 * x * Math.PI);\n if (Math.abs(x2) < 1e-9)\n return (wcn / Math.PI);\n else\n return (bkwn * Math.sin(l * wcn * x2) / (Math.PI * l * x2));\n }\n\n function fill_buffer_resample(gfp, outbuf, outbufPos, desired_len, inbuf, in_bufferPos, len, num_used, ch) {\n var gfc = gfp.internal_flags;\n var i, j = 0, k;\n /* number of convolution functions to pre-compute */\n var bpc = gfp.out_samplerate\n / gcd(gfp.out_samplerate, gfp.in_samplerate);\n if (bpc > LameInternalFlags.BPC)\n bpc = LameInternalFlags.BPC;\n\n var intratio = (Math.abs(gfc.resample_ratio\n - Math.floor(.5 + gfc.resample_ratio)) < .0001) ? 1 : 0;\n var fcn = 1.00 / gfc.resample_ratio;\n if (fcn > 1.00)\n fcn = 1.00;\n var filter_l = 31;\n if (0 == filter_l % 2)\n --filter_l;\n /* must be odd */\n filter_l += intratio;\n /* unless resample_ratio=int, it must be even */\n\n var BLACKSIZE = filter_l + 1;\n /* size of data needed for FIR */\n\n if (gfc.fill_buffer_resample_init == 0) {\n gfc.inbuf_old[0] = new_float(BLACKSIZE);\n gfc.inbuf_old[1] = new_float(BLACKSIZE);\n for (i = 0; i <= 2 * bpc; ++i)\n gfc.blackfilt[i] = new_float(BLACKSIZE);\n\n gfc.itime[0] = 0;\n gfc.itime[1] = 0;\n\n /* precompute blackman filter coefficients */\n for (j = 0; j <= 2 * bpc; j++) {\n var sum = 0.;\n var offset = (j - bpc) / (2. * bpc);\n for (i = 0; i <= filter_l; i++)\n sum += gfc.blackfilt[j][i] = blackman(i - offset, fcn,\n filter_l);\n for (i = 0; i <= filter_l; i++)\n gfc.blackfilt[j][i] /= sum;\n }\n gfc.fill_buffer_resample_init = 1;\n }\n\n var inbuf_old = gfc.inbuf_old[ch];\n\n /* time of j'th element in inbuf = itime + j/ifreq; */\n /* time of k'th element in outbuf = j/ofreq */\n for (k = 0; k < desired_len; k++) {\n var time0;\n var joff;\n\n time0 = k * gfc.resample_ratio;\n /* time of k'th output sample */\n j = 0 | Math.floor(time0 - gfc.itime[ch]);\n\n /* check if we need more input data */\n if ((filter_l + j - filter_l / 2) >= len)\n break;\n\n /* blackman filter. by default, window centered at j+.5(filter_l%2) */\n /* but we want a window centered at time0. */\n var offset = (time0 - gfc.itime[ch] - (j + .5 * (filter_l % 2)));\n assert(Math.abs(offset) <= .501);\n\n /* find the closest precomputed window for this offset: */\n joff = 0 | Math.floor((offset * 2 * bpc) + bpc + .5);\n var xvalue = 0.;\n for (i = 0; i <= filter_l; ++i) {\n var j2 = i + j - filter_l / 2;\n var y;\n assert(j2 < len);\n assert(j2 + BLACKSIZE >= 0);\n y = (j2 < 0) ? inbuf_old[BLACKSIZE + j2] : inbuf[in_bufferPos\n + j2];\n xvalue += y * gfc.blackfilt[joff][i];\n }\n outbuf[outbufPos + k] = xvalue;\n }\n\n /* k = number of samples added to outbuf */\n /* last k sample used data from [j-filter_l/2,j+filter_l-filter_l/2] */\n\n /* how many samples of input data were used: */\n num_used.num_used = Math.min(len, filter_l + j - filter_l / 2);\n\n /*\n * adjust our input time counter. Incriment by the number of samples\n * used, then normalize so that next output sample is at time 0, next\n * input buffer is at time itime[ch]\n */\n gfc.itime[ch] += num_used.num_used - k * gfc.resample_ratio;\n\n /* save the last BLACKSIZE samples into the inbuf_old buffer */\n if (num_used.num_used >= BLACKSIZE) {\n for (i = 0; i < BLACKSIZE; i++)\n inbuf_old[i] = inbuf[in_bufferPos + num_used.num_used + i\n - BLACKSIZE];\n } else {\n /* shift in num_used.num_used samples into inbuf_old */\n var n_shift = BLACKSIZE - num_used.num_used;\n /*\n * number of samples to\n * shift\n */\n\n /*\n * shift n_shift samples by num_used.num_used, to make room for the\n * num_used new samples\n */\n for (i = 0; i < n_shift; ++i)\n inbuf_old[i] = inbuf_old[i + num_used.num_used];\n\n /* shift in the num_used.num_used samples */\n for (j = 0; i < BLACKSIZE; ++i, ++j)\n inbuf_old[i] = inbuf[in_bufferPos + j];\n\n assert(j == num_used.num_used);\n }\n return k;\n /* return the number samples created at the new samplerate */\n }\n\n function fill_buffer(gfp, mfbuf, in_buffer, in_bufferPos, nsamples, io) {\n var gfc = gfp.internal_flags;\n\n /* copy in new samples into mfbuf, with resampling if necessary */\n if ((gfc.resample_ratio < .9999) || (gfc.resample_ratio > 1.0001)) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var numUsed = new NumUsed();\n io.n_out = fill_buffer_resample(gfp, mfbuf[ch], gfc.mf_size,\n gfp.framesize, in_buffer[ch], in_bufferPos, nsamples,\n numUsed, ch);\n io.n_in = numUsed.num_used;\n }\n } else {\n io.n_out = Math.min(gfp.framesize, nsamples);\n io.n_in = io.n_out;\n for (var i = 0; i < io.n_out; ++i) {\n mfbuf[0][gfc.mf_size + i] = in_buffer[0][in_bufferPos + i];\n if (gfc.channels_out == 2)\n mfbuf[1][gfc.mf_size + i] = in_buffer[1][in_bufferPos + i];\n }\n }\n }\n\n}\n\nmodule.exports = Lame;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nfunction Presets() {\n function VBRPresets(qual, comp, compS,\n y, shThreshold, shThresholdS,\n adj, adjShort, lower,\n curve, sens, inter,\n joint, mod, fix) {\n this.vbr_q = qual;\n this.quant_comp = comp;\n this.quant_comp_s = compS;\n this.expY = y;\n this.st_lrm = shThreshold;\n this.st_s = shThresholdS;\n this.masking_adj = adj;\n this.masking_adj_short = adjShort;\n this.ath_lower = lower;\n this.ath_curve = curve;\n this.ath_sensitivity = sens;\n this.interch = inter;\n this.safejoint = joint;\n this.sfb21mod = mod;\n this.msfix = fix;\n }\n\n function ABRPresets(kbps, comp, compS,\n joint, fix, shThreshold,\n shThresholdS, bass, sc,\n mask, lower, curve,\n interCh, sfScale) {\n this.quant_comp = comp;\n this.quant_comp_s = compS;\n this.safejoint = joint;\n this.nsmsfix = fix;\n this.st_lrm = shThreshold;\n this.st_s = shThresholdS;\n this.nsbass = bass;\n this.scale = sc;\n this.masking_adj = mask;\n this.ath_lower = lower;\n this.ath_curve = curve;\n this.interch = interCh;\n this.sfscale = sfScale;\n }\n\n var lame;\n\n this.setModules = function (_lame) {\n lame = _lame;\n };\n\n /**\n *

\n     * Switch mappings for VBR mode VBR_RH\n     *             vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix\n     * 
\n */\n var vbr_old_switch_map = [\n new VBRPresets(0, 9, 9, 0, 5.20, 125.0, -4.2, -6.3, 4.8, 1, 0, 0, 2, 21, 0.97),\n new VBRPresets(1, 9, 9, 0, 5.30, 125.0, -3.6, -5.6, 4.5, 1.5, 0, 0, 2, 21, 1.35),\n new VBRPresets(2, 9, 9, 0, 5.60, 125.0, -2.2, -3.5, 2.8, 2, 0, 0, 2, 21, 1.49),\n new VBRPresets(3, 9, 9, 1, 5.80, 130.0, -1.8, -2.8, 2.6, 3, -4, 0, 2, 20, 1.64),\n new VBRPresets(4, 9, 9, 1, 6.00, 135.0, -0.7, -1.1, 1.1, 3.5, -8, 0, 2, 0, 1.79),\n new VBRPresets(5, 9, 9, 1, 6.40, 140.0, 0.5, 0.4, -7.5, 4, -12, 0.0002, 0, 0, 1.95),\n new VBRPresets(6, 9, 9, 1, 6.60, 145.0, 0.67, 0.65, -14.7, 6.5, -19, 0.0004, 0, 0, 2.30),\n new VBRPresets(7, 9, 9, 1, 6.60, 145.0, 0.8, 0.75, -19.7, 8, -22, 0.0006, 0, 0, 2.70),\n new VBRPresets(8, 9, 9, 1, 6.60, 145.0, 1.2, 1.15, -27.5, 10, -23, 0.0007, 0, 0, 0),\n new VBRPresets(9, 9, 9, 1, 6.60, 145.0, 1.6, 1.6, -36, 11, -25, 0.0008, 0, 0, 0),\n new VBRPresets(10, 9, 9, 1, 6.60, 145.0, 2.0, 2.0, -36, 12, -25, 0.0008, 0, 0, 0)\n ];\n\n /**\n *
\n     *                 vbr_q  qcomp_l  qcomp_s  expY  st_lrm   st_s  mask adj_l  adj_s  ath_lower  ath_curve  ath_sens  interChR  safejoint sfb21mod  msfix\n     * 
\n */\n var vbr_psy_switch_map = [\n new VBRPresets(0, 9, 9, 0, 4.20, 25.0, -7.0, -4.0, 7.5, 1, 0, 0, 2, 26, 0.97),\n new VBRPresets(1, 9, 9, 0, 4.20, 25.0, -5.6, -3.6, 4.5, 1.5, 0, 0, 2, 21, 1.35),\n new VBRPresets(2, 9, 9, 0, 4.20, 25.0, -4.4, -1.8, 2, 2, 0, 0, 2, 18, 1.49),\n new VBRPresets(3, 9, 9, 1, 4.20, 25.0, -3.4, -1.25, 1.1, 3, -4, 0, 2, 15, 1.64),\n new VBRPresets(4, 9, 9, 1, 4.20, 25.0, -2.2, 0.1, 0, 3.5, -8, 0, 2, 0, 1.79),\n new VBRPresets(5, 9, 9, 1, 4.20, 25.0, -1.0, 1.65, -7.7, 4, -12, 0.0002, 0, 0, 1.95),\n new VBRPresets(6, 9, 9, 1, 4.20, 25.0, -0.0, 2.47, -7.7, 6.5, -19, 0.0004, 0, 0, 2),\n new VBRPresets(7, 9, 9, 1, 4.20, 25.0, 0.5, 2.0, -14.5, 8, -22, 0.0006, 0, 0, 2),\n new VBRPresets(8, 9, 9, 1, 4.20, 25.0, 1.0, 2.4, -22.0, 10, -23, 0.0007, 0, 0, 2),\n new VBRPresets(9, 9, 9, 1, 4.20, 25.0, 1.5, 2.95, -30.0, 11, -25, 0.0008, 0, 0, 2),\n new VBRPresets(10, 9, 9, 1, 4.20, 25.0, 2.0, 2.95, -36.0, 12, -30, 0.0008, 0, 0, 2)\n ];\n\n function apply_vbr_preset(gfp, a, enforce) {\n var vbr_preset = gfp.VBR == VbrMode.vbr_rh ? vbr_old_switch_map\n : vbr_psy_switch_map;\n\n var x = gfp.VBR_q_frac;\n var p = vbr_preset[a];\n var q = vbr_preset[a + 1];\n var set = p;\n\n // NOOP(vbr_q);\n // NOOP(quant_comp);\n // NOOP(quant_comp_s);\n // NOOP(expY);\n p.st_lrm = p.st_lrm + x * (q.st_lrm - p.st_lrm);\n // LERP(st_lrm);\n p.st_s = p.st_s + x * (q.st_s - p.st_s);\n // LERP(st_s);\n p.masking_adj = p.masking_adj + x * (q.masking_adj - p.masking_adj);\n // LERP(masking_adj);\n p.masking_adj_short = p.masking_adj_short + x\n * (q.masking_adj_short - p.masking_adj_short);\n // LERP(masking_adj_short);\n p.ath_lower = p.ath_lower + x * (q.ath_lower - p.ath_lower);\n // LERP(ath_lower);\n p.ath_curve = p.ath_curve + x * (q.ath_curve - p.ath_curve);\n // LERP(ath_curve);\n p.ath_sensitivity = p.ath_sensitivity + x\n * (q.ath_sensitivity - p.ath_sensitivity);\n // LERP(ath_sensitivity);\n p.interch = p.interch + x * (q.interch - p.interch);\n // LERP(interch);\n // NOOP(safejoint);\n // NOOP(sfb21mod);\n p.msfix = p.msfix + x * (q.msfix - p.msfix);\n // LERP(msfix);\n\n lame_set_VBR_q(gfp, set.vbr_q);\n\n if (enforce != 0)\n gfp.quant_comp = set.quant_comp;\n else if (!(Math.abs(gfp.quant_comp - -1) > 0))\n gfp.quant_comp = set.quant_comp;\n // SET_OPTION(quant_comp, set.quant_comp, -1);\n if (enforce != 0)\n gfp.quant_comp_short = set.quant_comp_s;\n else if (!(Math.abs(gfp.quant_comp_short - -1) > 0))\n gfp.quant_comp_short = set.quant_comp_s;\n // SET_OPTION(quant_comp_short, set.quant_comp_s, -1);\n if (set.expY != 0) {\n gfp.experimentalY = set.expY != 0;\n }\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre = set.st_lrm;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre = set.st_lrm;\n // SET_OPTION(short_threshold_lrm, set.st_lrm, -1);\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre_s = set.st_s;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre_s = set.st_s;\n // SET_OPTION(short_threshold_s, set.st_s, -1);\n if (enforce != 0)\n gfp.maskingadjust = set.masking_adj;\n else if (!(Math.abs(gfp.maskingadjust - 0) > 0))\n gfp.maskingadjust = set.masking_adj;\n // SET_OPTION(maskingadjust, set.masking_adj, 0);\n if (enforce != 0)\n gfp.maskingadjust_short = set.masking_adj_short;\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = set.masking_adj_short;\n // SET_OPTION(maskingadjust_short, set.masking_adj_short, 0);\n if (enforce != 0)\n gfp.ATHlower = -set.ath_lower / 10.0;\n else if (!(Math.abs((-gfp.ATHlower * 10.0) - 0) > 0))\n gfp.ATHlower = -set.ath_lower / 10.0;\n // SET_OPTION(ATHlower, set.ath_lower, 0);\n if (enforce != 0)\n gfp.ATHcurve = set.ath_curve;\n else if (!(Math.abs(gfp.ATHcurve - -1) > 0))\n gfp.ATHcurve = set.ath_curve;\n // SET_OPTION(ATHcurve, set.ath_curve, -1);\n if (enforce != 0)\n gfp.athaa_sensitivity = set.ath_sensitivity;\n else if (!(Math.abs(gfp.athaa_sensitivity - -1) > 0))\n gfp.athaa_sensitivity = set.ath_sensitivity;\n // SET_OPTION(athaa_sensitivity, set.ath_sensitivity, 0);\n if (set.interch > 0) {\n if (enforce != 0)\n gfp.interChRatio = set.interch;\n else if (!(Math.abs(gfp.interChRatio - -1) > 0))\n gfp.interChRatio = set.interch;\n // SET_OPTION(interChRatio, set.interch, -1);\n }\n\n /* parameters for which there is no proper set/get interface */\n if (set.safejoint > 0) {\n gfp.exp_nspsytune = gfp.exp_nspsytune | set.safejoint;\n }\n if (set.sfb21mod > 0) {\n gfp.exp_nspsytune = gfp.exp_nspsytune | (set.sfb21mod << 20);\n }\n if (enforce != 0)\n gfp.msfix = set.msfix;\n else if (!(Math.abs(gfp.msfix - -1) > 0))\n gfp.msfix = set.msfix;\n // SET_OPTION(msfix, set.msfix, -1);\n\n if (enforce == 0) {\n gfp.VBR_q = a;\n gfp.VBR_q_frac = x;\n }\n }\n\n /**\n *
\n     *  Switch mappings for ABR mode\n     *\n     *              kbps  quant q_s safejoint nsmsfix st_lrm  st_s  ns-bass scale   msk ath_lwr ath_curve  interch , sfscale\n     * 
\n */\n var abr_switch_map = [\n new ABRPresets(8, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -30.0, 11, 0.0012, 1), /* 8, impossible to use in stereo */\n new ABRPresets(16, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -25.0, 11, 0.0010, 1), /* 16 */\n new ABRPresets(24, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -20.0, 11, 0.0010, 1), /* 24 */\n new ABRPresets(32, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -15.0, 11, 0.0010, 1), /* 32 */\n new ABRPresets(40, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -10.0, 11, 0.0009, 1), /* 40 */\n new ABRPresets(48, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -10.0, 11, 0.0009, 1), /* 48 */\n new ABRPresets(56, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -6.0, 11, 0.0008, 1), /* 56 */\n new ABRPresets(64, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, -2.0, 11, 0.0008, 1), /* 64 */\n new ABRPresets(80, 9, 9, 0, 0, 6.60, 145, 0, 0.95, 0, .0, 8, 0.0007, 1), /* 80 */\n new ABRPresets(96, 9, 9, 0, 2.50, 6.60, 145, 0, 0.95, 0, 1.0, 5.5, 0.0006, 1), /* 96 */\n new ABRPresets(112, 9, 9, 0, 2.25, 6.60, 145, 0, 0.95, 0, 2.0, 4.5, 0.0005, 1), /* 112 */\n new ABRPresets(128, 9, 9, 0, 1.95, 6.40, 140, 0, 0.95, 0, 3.0, 4, 0.0002, 1), /* 128 */\n new ABRPresets(160, 9, 9, 1, 1.79, 6.00, 135, 0, 0.95, -2, 5.0, 3.5, 0, 1), /* 160 */\n new ABRPresets(192, 9, 9, 1, 1.49, 5.60, 125, 0, 0.97, -4, 7.0, 3, 0, 0), /* 192 */\n new ABRPresets(224, 9, 9, 1, 1.25, 5.20, 125, 0, 0.98, -6, 9.0, 2, 0, 0), /* 224 */\n new ABRPresets(256, 9, 9, 1, 0.97, 5.20, 125, 0, 1.00, -8, 10.0, 1, 0, 0), /* 256 */\n new ABRPresets(320, 9, 9, 1, 0.90, 5.20, 125, 0, 1.00, -10, 12.0, 0, 0, 0) /* 320 */\n ];\n\n function apply_abr_preset(gfp, preset, enforce) {\n /* Variables for the ABR stuff */\n var actual_bitrate = preset;\n\n var r = lame.nearestBitrateFullIndex(preset);\n\n gfp.VBR = VbrMode.vbr_abr;\n gfp.VBR_mean_bitrate_kbps = actual_bitrate;\n gfp.VBR_mean_bitrate_kbps = Math.min(gfp.VBR_mean_bitrate_kbps, 320);\n gfp.VBR_mean_bitrate_kbps = Math.max(gfp.VBR_mean_bitrate_kbps, 8);\n gfp.brate = gfp.VBR_mean_bitrate_kbps;\n if (gfp.VBR_mean_bitrate_kbps > 320) {\n gfp.disable_reservoir = true;\n }\n\n /* parameters for which there is no proper set/get interface */\n if (abr_switch_map[r].safejoint > 0)\n gfp.exp_nspsytune = gfp.exp_nspsytune | 2;\n /* safejoint */\n\n if (abr_switch_map[r].sfscale > 0) {\n gfp.internal_flags.noise_shaping = 2;\n }\n /* ns-bass tweaks */\n if (Math.abs(abr_switch_map[r].nsbass) > 0) {\n var k = (int)(abr_switch_map[r].nsbass * 4);\n if (k < 0)\n k += 64;\n gfp.exp_nspsytune = gfp.exp_nspsytune | (k << 2);\n }\n\n if (enforce != 0)\n gfp.quant_comp = abr_switch_map[r].quant_comp;\n else if (!(Math.abs(gfp.quant_comp - -1) > 0))\n gfp.quant_comp = abr_switch_map[r].quant_comp;\n // SET_OPTION(quant_comp, abr_switch_map[r].quant_comp, -1);\n if (enforce != 0)\n gfp.quant_comp_short = abr_switch_map[r].quant_comp_s;\n else if (!(Math.abs(gfp.quant_comp_short - -1) > 0))\n gfp.quant_comp_short = abr_switch_map[r].quant_comp_s;\n // SET_OPTION(quant_comp_short, abr_switch_map[r].quant_comp_s, -1);\n\n if (enforce != 0)\n gfp.msfix = abr_switch_map[r].nsmsfix;\n else if (!(Math.abs(gfp.msfix - -1) > 0))\n gfp.msfix = abr_switch_map[r].nsmsfix;\n // SET_OPTION(msfix, abr_switch_map[r].nsmsfix, -1);\n\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre = abr_switch_map[r].st_lrm;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre = abr_switch_map[r].st_lrm;\n // SET_OPTION(short_threshold_lrm, abr_switch_map[r].st_lrm, -1);\n if (enforce != 0)\n gfp.internal_flags.nsPsy.attackthre_s = abr_switch_map[r].st_s;\n else if (!(Math.abs(gfp.internal_flags.nsPsy.attackthre_s - -1) > 0))\n gfp.internal_flags.nsPsy.attackthre_s = abr_switch_map[r].st_s;\n // SET_OPTION(short_threshold_s, abr_switch_map[r].st_s, -1);\n\n /*\n * ABR seems to have big problems with clipping, especially at low\n * bitrates\n */\n /*\n * so we compensate for that here by using a scale value depending on\n * bitrate\n */\n if (enforce != 0)\n gfp.scale = abr_switch_map[r].scale;\n else if (!(Math.abs(gfp.scale - -1) > 0))\n gfp.scale = abr_switch_map[r].scale;\n // SET_OPTION(scale, abr_switch_map[r].scale, -1);\n\n if (enforce != 0)\n gfp.maskingadjust = abr_switch_map[r].masking_adj;\n else if (!(Math.abs(gfp.maskingadjust - 0) > 0))\n gfp.maskingadjust = abr_switch_map[r].masking_adj;\n // SET_OPTION(maskingadjust, abr_switch_map[r].masking_adj, 0);\n if (abr_switch_map[r].masking_adj > 0) {\n if (enforce != 0)\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * .9);\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * .9);\n // SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj *\n // .9, 0);\n } else {\n if (enforce != 0)\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * 1.1);\n else if (!(Math.abs(gfp.maskingadjust_short - 0) > 0))\n gfp.maskingadjust_short = (abr_switch_map[r].masking_adj * 1.1);\n // SET_OPTION(maskingadjust_short, abr_switch_map[r].masking_adj *\n // 1.1, 0);\n }\n\n if (enforce != 0)\n gfp.ATHlower = -abr_switch_map[r].ath_lower / 10.;\n else if (!(Math.abs((-gfp.ATHlower * 10.) - 0) > 0))\n gfp.ATHlower = -abr_switch_map[r].ath_lower / 10.;\n // SET_OPTION(ATHlower, abr_switch_map[r].ath_lower, 0);\n if (enforce != 0)\n gfp.ATHcurve = abr_switch_map[r].ath_curve;\n else if (!(Math.abs(gfp.ATHcurve - -1) > 0))\n gfp.ATHcurve = abr_switch_map[r].ath_curve;\n // SET_OPTION(ATHcurve, abr_switch_map[r].ath_curve, -1);\n\n if (enforce != 0)\n gfp.interChRatio = abr_switch_map[r].interch;\n else if (!(Math.abs(gfp.interChRatio - -1) > 0))\n gfp.interChRatio = abr_switch_map[r].interch;\n // SET_OPTION(interChRatio, abr_switch_map[r].interch, -1);\n\n return preset;\n }\n\n this.apply_preset = function(gfp, preset, enforce) {\n /* translate legacy presets */\n switch (preset) {\n case Lame.R3MIX:\n {\n preset = Lame.V3;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.MEDIUM:\n {\n preset = Lame.V4;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.MEDIUM_FAST:\n {\n preset = Lame.V4;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.STANDARD:\n {\n preset = Lame.V2;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.STANDARD_FAST:\n {\n preset = Lame.V2;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.EXTREME:\n {\n preset = Lame.V0;\n gfp.VBR = VbrMode.vbr_rh;\n break;\n }\n case Lame.EXTREME_FAST:\n {\n preset = Lame.V0;\n gfp.VBR = VbrMode.vbr_mtrh;\n break;\n }\n case Lame.INSANE:\n {\n preset = 320;\n gfp.preset = preset;\n apply_abr_preset(gfp, preset, enforce);\n gfp.VBR = VbrMode.vbr_off;\n return preset;\n }\n }\n\n gfp.preset = preset;\n {\n switch (preset) {\n case Lame.V9:\n apply_vbr_preset(gfp, 9, enforce);\n return preset;\n case Lame.V8:\n apply_vbr_preset(gfp, 8, enforce);\n return preset;\n case Lame.V7:\n apply_vbr_preset(gfp, 7, enforce);\n return preset;\n case Lame.V6:\n apply_vbr_preset(gfp, 6, enforce);\n return preset;\n case Lame.V5:\n apply_vbr_preset(gfp, 5, enforce);\n return preset;\n case Lame.V4:\n apply_vbr_preset(gfp, 4, enforce);\n return preset;\n case Lame.V3:\n apply_vbr_preset(gfp, 3, enforce);\n return preset;\n case Lame.V2:\n apply_vbr_preset(gfp, 2, enforce);\n return preset;\n case Lame.V1:\n apply_vbr_preset(gfp, 1, enforce);\n return preset;\n case Lame.V0:\n apply_vbr_preset(gfp, 0, enforce);\n return preset;\n default:\n break;\n }\n }\n if (8 <= preset && preset <= 320) {\n return apply_abr_preset(gfp, preset, enforce);\n }\n\n /* no corresponding preset found */\n gfp.preset = 0;\n return preset;\n }\n\n // Rest from getset.c:\n\n /**\n * VBR quality level.
\n * 0 = highest
\n * 9 = lowest\n */\n function lame_set_VBR_q(gfp, VBR_q) {\n var ret = 0;\n\n if (0 > VBR_q) {\n /* Unknown VBR quality level! */\n ret = -1;\n VBR_q = 0;\n }\n if (9 < VBR_q) {\n ret = -1;\n VBR_q = 9;\n }\n\n gfp.VBR_q = VBR_q;\n gfp.VBR_q_frac = 0;\n return ret;\n }\n\n}\n\nmodule.exports = Presets;\n","function VBRQuantize() {\n var qupvt;\n var tak;\n\n this.setModules = function (_qupvt, _tk) {\n qupvt = _qupvt;\n tak = _tk;\n }\n //TODO\n\n}\n\nmodule.exports = VBRQuantize;\n","//package mp3;\n\nfunction CalcNoiseResult() {\n /**\n * sum of quantization noise > masking\n */\n this.over_noise = 0.;\n /**\n * sum of all quantization noise\n */\n this.tot_noise = 0.;\n /**\n * max quantization noise\n */\n this.max_noise = 0.;\n /**\n * number of quantization noise > masking\n */\n this.over_count = 0;\n /**\n * SSD-like cost of distorted bands\n */\n this.over_SSD = 0;\n this.bits = 0;\n}\n\nmodule.exports = CalcNoiseResult;\n","var common = require('./common.js');\nvar new_float = common.new_float;\nvar new_int = common.new_int;\nvar assert = common.assert;\n\nfunction CalcNoiseData() {\n this.global_gain = 0;\n this.sfb_count1 = 0;\n this.step = new_int(39);\n this.noise = new_float(39);\n this.noise_log = new_float(39);\n}\n\nmodule.exports = CalcNoiseData;\n","/*\n * MP3 quantization\n *\n * Copyright (c) 1999-2000 Mark Taylor\n * Copyright (c) 1999-2003 Takehiro Tominaga\n * Copyright (c) 2000-2007 Robert Hegemann\n * Copyright (c) 2001-2005 Gabriel Bouvigne\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Quantize.java,v 1.24 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n//import java.util.Arrays;\nvar common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nvar VBRQuantize = require('./VBRQuantize.js');\nvar CalcNoiseResult = require('./CalcNoiseResult.js');\nvar CalcNoiseData = require('./CalcNoiseData.js');\nvar Encoder = require('./Encoder.js');\nvar GrInfo = require('./GrInfo.js');\nvar L3Side = require('./L3Side.js');\n\nfunction Quantize() {\n var bs;\n this.rv = null;\n var rv;\n this.qupvt = null;\n var qupvt;\n\n var vbr = new VBRQuantize();\n var tk;\n\n this.setModules = function (_bs, _rv, _qupvt, _tk) {\n bs = _bs;\n rv = _rv;\n this.rv = _rv;\n qupvt = _qupvt;\n this.qupvt = _qupvt;\n tk = _tk;\n vbr.setModules(qupvt, tk);\n }\n\n /**\n * convert from L/R <. Mid/Side\n */\n this.ms_convert = function (l3_side, gr) {\n for (var i = 0; i < 576; ++i) {\n var l = l3_side.tt[gr][0].xr[i];\n var r = l3_side.tt[gr][1].xr[i];\n l3_side.tt[gr][0].xr[i] = (l + r) * (Util.SQRT2 * 0.5);\n l3_side.tt[gr][1].xr[i] = (l - r) * (Util.SQRT2 * 0.5);\n }\n };\n\n /**\n * mt 6/99\n *\n * initializes cod_info, scalefac and xrpow\n *\n * returns 0 if all energies in xr are zero, else 1\n */\n function init_xrpow_core(cod_info, xrpow, upper, sum) {\n sum = 0;\n for (var i = 0; i <= upper; ++i) {\n var tmp = Math.abs(cod_info.xr[i]);\n sum += tmp;\n xrpow[i] = Math.sqrt(tmp * Math.sqrt(tmp));\n\n if (xrpow[i] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[i];\n }\n return sum;\n }\n\n this.init_xrpow = function (gfc, cod_info, xrpow) {\n var sum = 0;\n var upper = 0 | cod_info.max_nonzero_coeff;\n\n assert(xrpow != null);\n cod_info.xrpow_max = 0;\n\n /*\n * check if there is some energy we have to quantize and calculate xrpow\n * matching our fresh scalefactors\n */\n assert(0 <= upper && upper <= 575);\n\n Arrays.fill(xrpow, upper, 576, 0);\n\n sum = init_xrpow_core(cod_info, xrpow, upper, sum);\n\n /*\n * return 1 if we have something to quantize, else 0\n */\n if (sum > 1E-20) {\n var j = 0;\n if ((gfc.substep_shaping & 2) != 0)\n j = 1;\n\n for (var i = 0; i < cod_info.psymax; i++)\n gfc.pseudohalf[i] = j;\n\n return true;\n }\n\n Arrays.fill(cod_info.l3_enc, 0, 576, 0);\n return false;\n }\n\n /**\n * Gabriel Bouvigne feb/apr 2003
\n * Analog silence detection in partitionned sfb21 or sfb12 for short blocks\n *\n * From top to bottom of sfb, changes to 0 coeffs which are below ath. It\n * stops on the first coeff higher than ath.\n */\n function psfb21_analogsilence(gfc, cod_info) {\n var ath = gfc.ATH;\n var xr = cod_info.xr;\n\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n /* NORM, START or STOP type, but not SHORT blocks */\n var stop = false;\n for (var gsfb = Encoder.PSFB21 - 1; gsfb >= 0 && !stop; gsfb--) {\n var start = gfc.scalefac_band.psfb21[gsfb];\n var end = gfc.scalefac_band.psfb21[gsfb + 1];\n var ath21 = qupvt.athAdjust(ath.adjust, ath.psfb21[gsfb],\n ath.floor);\n\n if (gfc.nsPsy.longfact[21] > 1e-12)\n ath21 *= gfc.nsPsy.longfact[21];\n\n for (var j = end - 1; j >= start; j--) {\n if (Math.abs(xr[j]) < ath21)\n xr[j] = 0;\n else {\n stop = true;\n break;\n }\n }\n }\n } else {\n /* note: short blocks coeffs are reordered */\n for (var block = 0; block < 3; block++) {\n var stop = false;\n for (var gsfb = Encoder.PSFB12 - 1; gsfb >= 0 && !stop; gsfb--) {\n var start = gfc.scalefac_band.s[12]\n * 3\n + (gfc.scalefac_band.s[13] - gfc.scalefac_band.s[12])\n * block\n + (gfc.scalefac_band.psfb12[gsfb] - gfc.scalefac_band.psfb12[0]);\n var end = start\n + (gfc.scalefac_band.psfb12[gsfb + 1] - gfc.scalefac_band.psfb12[gsfb]);\n var ath12 = qupvt.athAdjust(ath.adjust, ath.psfb12[gsfb],\n ath.floor);\n\n if (gfc.nsPsy.shortfact[12] > 1e-12)\n ath12 *= gfc.nsPsy.shortfact[12];\n\n for (var j = end - 1; j >= start; j--) {\n if (Math.abs(xr[j]) < ath12)\n xr[j] = 0;\n else {\n stop = true;\n break;\n }\n }\n }\n }\n }\n\n }\n\n this.init_outer_loop = function (gfc, cod_info) {\n /*\n * initialize fresh cod_info\n */\n cod_info.part2_3_length = 0;\n cod_info.big_values = 0;\n cod_info.count1 = 0;\n cod_info.global_gain = 210;\n cod_info.scalefac_compress = 0;\n /* mixed_block_flag, block_type was set in psymodel.c */\n cod_info.table_select[0] = 0;\n cod_info.table_select[1] = 0;\n cod_info.table_select[2] = 0;\n cod_info.subblock_gain[0] = 0;\n cod_info.subblock_gain[1] = 0;\n cod_info.subblock_gain[2] = 0;\n cod_info.subblock_gain[3] = 0;\n /* this one is always 0 */\n cod_info.region0_count = 0;\n cod_info.region1_count = 0;\n cod_info.preflag = 0;\n cod_info.scalefac_scale = 0;\n cod_info.count1table_select = 0;\n cod_info.part2_length = 0;\n cod_info.sfb_lmax = Encoder.SBPSY_l;\n cod_info.sfb_smin = Encoder.SBPSY_s;\n cod_info.psy_lmax = gfc.sfb21_extra ? Encoder.SBMAX_l : Encoder.SBPSY_l;\n cod_info.psymax = cod_info.psy_lmax;\n cod_info.sfbmax = cod_info.sfb_lmax;\n cod_info.sfbdivide = 11;\n for (var sfb = 0; sfb < Encoder.SBMAX_l; sfb++) {\n cod_info.width[sfb] = gfc.scalefac_band.l[sfb + 1]\n - gfc.scalefac_band.l[sfb];\n /* which is always 0. */\n cod_info.window[sfb] = 3;\n }\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n var ixwork = new_float(576);\n\n cod_info.sfb_smin = 0;\n cod_info.sfb_lmax = 0;\n if (cod_info.mixed_block_flag != 0) {\n /*\n * MPEG-1: sfbs 0-7 long block, 3-12 short blocks MPEG-2(.5):\n * sfbs 0-5 long block, 3-12 short blocks\n */\n cod_info.sfb_smin = 3;\n cod_info.sfb_lmax = gfc.mode_gr * 2 + 4;\n }\n cod_info.psymax = cod_info.sfb_lmax\n + 3\n * ((gfc.sfb21_extra ? Encoder.SBMAX_s : Encoder.SBPSY_s) - cod_info.sfb_smin);\n cod_info.sfbmax = cod_info.sfb_lmax + 3\n * (Encoder.SBPSY_s - cod_info.sfb_smin);\n cod_info.sfbdivide = cod_info.sfbmax - 18;\n cod_info.psy_lmax = cod_info.sfb_lmax;\n /* re-order the short blocks, for more efficient encoding below */\n /* By Takehiro TOMINAGA */\n /*\n * Within each scalefactor band, data is given for successive time\n * windows, beginning with window 0 and ending with window 2. Within\n * each window, the quantized values are then arranged in order of\n * increasing frequency...\n */\n var ix = gfc.scalefac_band.l[cod_info.sfb_lmax];\n System.arraycopy(cod_info.xr, 0, ixwork, 0, 576);\n for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n var start = gfc.scalefac_band.s[sfb];\n var end = gfc.scalefac_band.s[sfb + 1];\n for (var window = 0; window < 3; window++) {\n for (var l = start; l < end; l++) {\n cod_info.xr[ix++] = ixwork[3 * l + window];\n }\n }\n }\n\n var j = cod_info.sfb_lmax;\n for (var sfb = cod_info.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n cod_info.width[j] = cod_info.width[j + 1] = cod_info.width[j + 2] = gfc.scalefac_band.s[sfb + 1]\n - gfc.scalefac_band.s[sfb];\n cod_info.window[j] = 0;\n cod_info.window[j + 1] = 1;\n cod_info.window[j + 2] = 2;\n j += 3;\n }\n }\n\n cod_info.count1bits = 0;\n cod_info.sfb_partition_table = qupvt.nr_of_sfb_block[0][0];\n cod_info.slen[0] = 0;\n cod_info.slen[1] = 0;\n cod_info.slen[2] = 0;\n cod_info.slen[3] = 0;\n\n cod_info.max_nonzero_coeff = 575;\n\n /*\n * fresh scalefactors are all zero\n */\n Arrays.fill(cod_info.scalefac, 0);\n\n psfb21_analogsilence(gfc, cod_info);\n };\n\n function BinSearchDirection(ordinal) {\n this.ordinal = ordinal;\n }\n\n BinSearchDirection.BINSEARCH_NONE = new BinSearchDirection(0);\n BinSearchDirection.BINSEARCH_UP = new BinSearchDirection(1);\n BinSearchDirection.BINSEARCH_DOWN = new BinSearchDirection(2);\n\n /**\n * author/date??\n *\n * binary step size search used by outer_loop to get a quantizer step size\n * to start with\n */\n function bin_search_StepSize(gfc, cod_info, desired_rate, ch, xrpow) {\n var nBits;\n var CurrentStep = gfc.CurrentStep[ch];\n var flagGoneOver = false;\n var start = gfc.OldValue[ch];\n var Direction = BinSearchDirection.BINSEARCH_NONE;\n cod_info.global_gain = start;\n desired_rate -= cod_info.part2_length;\n\n assert(CurrentStep != 0);\n for (; ;) {\n var step;\n nBits = tk.count_bits(gfc, xrpow, cod_info, null);\n\n if (CurrentStep == 1 || nBits == desired_rate)\n break;\n /* nothing to adjust anymore */\n\n if (nBits > desired_rate) {\n /* increase Quantize_StepSize */\n if (Direction == BinSearchDirection.BINSEARCH_DOWN)\n flagGoneOver = true;\n\n if (flagGoneOver)\n CurrentStep /= 2;\n Direction = BinSearchDirection.BINSEARCH_UP;\n step = CurrentStep;\n } else {\n /* decrease Quantize_StepSize */\n if (Direction == BinSearchDirection.BINSEARCH_UP)\n flagGoneOver = true;\n\n if (flagGoneOver)\n CurrentStep /= 2;\n Direction = BinSearchDirection.BINSEARCH_DOWN;\n step = -CurrentStep;\n }\n cod_info.global_gain += step;\n if (cod_info.global_gain < 0) {\n cod_info.global_gain = 0;\n flagGoneOver = true;\n }\n if (cod_info.global_gain > 255) {\n cod_info.global_gain = 255;\n flagGoneOver = true;\n }\n }\n\n assert(cod_info.global_gain >= 0);\n assert(cod_info.global_gain < 256);\n\n while (nBits > desired_rate && cod_info.global_gain < 255) {\n cod_info.global_gain++;\n nBits = tk.count_bits(gfc, xrpow, cod_info, null);\n }\n gfc.CurrentStep[ch] = (start - cod_info.global_gain >= 4) ? 4 : 2;\n gfc.OldValue[ch] = cod_info.global_gain;\n cod_info.part2_3_length = nBits;\n return nBits;\n }\n\n this.trancate_smallspectrums = function (gfc, gi, l3_xmin, work) {\n var distort = new_float(L3Side.SFBMAX);\n\n if ((0 == (gfc.substep_shaping & 4) && gi.block_type == Encoder.SHORT_TYPE)\n || (gfc.substep_shaping & 0x80) != 0)\n return;\n qupvt.calc_noise(gi, l3_xmin, distort, new CalcNoiseResult(), null);\n for (var j = 0; j < 576; j++) {\n var xr = 0.0;\n if (gi.l3_enc[j] != 0)\n xr = Math.abs(gi.xr[j]);\n work[j] = xr;\n }\n\n var j = 0;\n var sfb = 8;\n if (gi.block_type == Encoder.SHORT_TYPE)\n sfb = 6;\n do {\n var allowedNoise, trancateThreshold;\n var nsame, start;\n\n var width = gi.width[sfb];\n j += width;\n if (distort[sfb] >= 1.0)\n continue;\n\n Arrays.sort(work, j - width, width);\n if (BitStream.EQ(work[j - 1], 0.0))\n continue;\n /* all zero sfb */\n\n allowedNoise = (1.0 - distort[sfb]) * l3_xmin[sfb];\n trancateThreshold = 0.0;\n start = 0;\n do {\n var noise;\n for (nsame = 1; start + nsame < width; nsame++)\n if (BitStream.NEQ(work[start + j - width], work[start + j\n + nsame - width]))\n break;\n\n noise = work[start + j - width] * work[start + j - width]\n * nsame;\n if (allowedNoise < noise) {\n if (start != 0)\n trancateThreshold = work[start + j - width - 1];\n break;\n }\n allowedNoise -= noise;\n start += nsame;\n } while (start < width);\n if (BitStream.EQ(trancateThreshold, 0.0))\n continue;\n\n do {\n if (Math.abs(gi.xr[j - width]) <= trancateThreshold)\n gi.l3_enc[j - width] = 0;\n } while (--width > 0);\n } while (++sfb < gi.psymax);\n\n gi.part2_3_length = tk.noquant_count_bits(gfc, gi, null);\n };\n\n /**\n * author/date??\n *\n * Function: Returns zero if there is a scalefac which has not been\n * amplified. Otherwise it returns one.\n */\n function loop_break(cod_info) {\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++)\n if (cod_info.scalefac[sfb]\n + cod_info.subblock_gain[cod_info.window[sfb]] == 0)\n return false;\n\n return true;\n }\n\n /* mt 5/99: Function: Improved calc_noise for a single channel */\n\n function penalties(noise) {\n return Util.FAST_LOG10((0.368 + 0.632 * noise * noise * noise));\n }\n\n /**\n * author/date??\n *\n * several different codes to decide which quantization is better\n */\n function get_klemm_noise(distort, gi) {\n var klemm_noise = 1E-37;\n for (var sfb = 0; sfb < gi.psymax; sfb++)\n klemm_noise += penalties(distort[sfb]);\n\n return Math.max(1e-20, klemm_noise);\n }\n\n function quant_compare(quant_comp, best, calc, gi, distort) {\n /**\n * noise is given in decibels (dB) relative to masking thesholds.
\n *\n * over_noise: ??? (the previous comment is fully wrong)
\n * tot_noise: ??? (the previous comment is fully wrong)
\n * max_noise: max quantization noise\n */\n var better;\n\n switch (quant_comp) {\n default:\n case 9:\n {\n if (best.over_count > 0) {\n /* there are distorted sfb */\n better = calc.over_SSD <= best.over_SSD;\n if (calc.over_SSD == best.over_SSD)\n better = calc.bits < best.bits;\n } else {\n /* no distorted sfb */\n better = ((calc.max_noise < 0) && ((calc.max_noise * 10 + calc.bits) <= (best.max_noise * 10 + best.bits)));\n }\n break;\n }\n\n case 0:\n better = calc.over_count < best.over_count\n || (calc.over_count == best.over_count && calc.over_noise < best.over_noise)\n || (calc.over_count == best.over_count\n && BitStream.EQ(calc.over_noise, best.over_noise) && calc.tot_noise < best.tot_noise);\n break;\n\n case 8:\n calc.max_noise = get_klemm_noise(distort, gi);\n //$FALL-THROUGH$\n case 1:\n better = calc.max_noise < best.max_noise;\n break;\n case 2:\n better = calc.tot_noise < best.tot_noise;\n break;\n case 3:\n better = (calc.tot_noise < best.tot_noise)\n && (calc.max_noise < best.max_noise);\n break;\n case 4:\n better = (calc.max_noise <= 0.0 && best.max_noise > 0.2)\n || (calc.max_noise <= 0.0 && best.max_noise < 0.0\n && best.max_noise > calc.max_noise - 0.2 && calc.tot_noise < best.tot_noise)\n || (calc.max_noise <= 0.0 && best.max_noise > 0.0\n && best.max_noise > calc.max_noise - 0.2 && calc.tot_noise < best.tot_noise\n + best.over_noise)\n || (calc.max_noise > 0.0 && best.max_noise > -0.05\n && best.max_noise > calc.max_noise - 0.1 && calc.tot_noise\n + calc.over_noise < best.tot_noise\n + best.over_noise)\n || (calc.max_noise > 0.0 && best.max_noise > -0.1\n && best.max_noise > calc.max_noise - 0.15 && calc.tot_noise\n + calc.over_noise + calc.over_noise < best.tot_noise\n + best.over_noise + best.over_noise);\n break;\n case 5:\n better = calc.over_noise < best.over_noise\n || (BitStream.EQ(calc.over_noise, best.over_noise) && calc.tot_noise < best.tot_noise);\n break;\n case 6:\n better = calc.over_noise < best.over_noise\n || (BitStream.EQ(calc.over_noise, best.over_noise) && (calc.max_noise < best.max_noise || (BitStream\n .EQ(calc.max_noise, best.max_noise) && calc.tot_noise <= best.tot_noise)));\n break;\n case 7:\n better = calc.over_count < best.over_count\n || calc.over_noise < best.over_noise;\n break;\n }\n\n if (best.over_count == 0) {\n /*\n * If no distorted bands, only use this quantization if it is\n * better, and if it uses less bits. Unfortunately, part2_3_length\n * is sometimes a poor estimator of the final size at low bitrates.\n */\n better = better && calc.bits < best.bits;\n }\n\n return better;\n }\n\n /**\n * author/date??\n *\n *
\n     *  Amplify the scalefactor bands that violate the masking threshold.\n     *  See ISO 11172-3 Section C.1.5.4.3.5\n     *\n     *  distort[] = noise/masking\n     *  distort[] > 1   ==> noise is not masked\n     *  distort[] < 1   ==> noise is masked\n     *  max_dist = maximum value of distort[]\n     *\n     *  Three algorithms:\n     *  noise_shaping_amp\n     *        0             Amplify all bands with distort[]>1.\n     *\n     *        1             Amplify all bands with distort[] >= max_dist^(.5);\n     *                     ( 50% in the db scale)\n     *\n     *        2             Amplify first band with distort[] >= max_dist;\n     *\n     *\n     *  For algorithms 0 and 1, if max_dist < 1, then amplify all bands\n     *  with distort[] >= .95*max_dist.  This is to make sure we always\n     *  amplify at least one band.\n     * 
\n */\n function amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine) {\n var gfc = gfp.internal_flags;\n var ifqstep34;\n\n if (cod_info.scalefac_scale == 0) {\n ifqstep34 = 1.29683955465100964055;\n /* 2**(.75*.5) */\n } else {\n ifqstep34 = 1.68179283050742922612;\n /* 2**(.75*1) */\n }\n\n /* compute maximum value of distort[] */\n var trigger = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n if (trigger < distort[sfb])\n trigger = distort[sfb];\n }\n\n var noise_shaping_amp = gfc.noise_shaping_amp;\n if (noise_shaping_amp == 3) {\n if (bRefine)\n noise_shaping_amp = 2;\n else\n noise_shaping_amp = 1;\n }\n switch (noise_shaping_amp) {\n case 2:\n /* amplify exactly 1 band */\n break;\n\n case 1:\n /* amplify bands within 50% of max (on db scale) */\n if (trigger > 1.0)\n trigger = Math.pow(trigger, .5);\n else\n trigger *= .95;\n break;\n\n case 0:\n default:\n /* ISO algorithm. amplify all bands with distort>1 */\n if (trigger > 1.0)\n trigger = 1.0;\n else\n trigger *= .95;\n break;\n }\n\n var j = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n var width = cod_info.width[sfb];\n var l;\n j += width;\n if (distort[sfb] < trigger)\n continue;\n\n if ((gfc.substep_shaping & 2) != 0) {\n gfc.pseudohalf[sfb] = (0 == gfc.pseudohalf[sfb]) ? 1 : 0;\n if (0 == gfc.pseudohalf[sfb] && gfc.noise_shaping_amp == 2)\n return;\n }\n cod_info.scalefac[sfb]++;\n for (l = -width; l < 0; l++) {\n xrpow[j + l] *= ifqstep34;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n\n if (gfc.noise_shaping_amp == 2)\n return;\n }\n }\n\n /**\n * Takehiro Tominaga 2000-xx-xx\n *\n * turns on scalefac scale and adjusts scalefactors\n */\n function inc_scalefac_scale(cod_info, xrpow) {\n var ifqstep34 = 1.29683955465100964055;\n\n var j = 0;\n for (var sfb = 0; sfb < cod_info.sfbmax; sfb++) {\n var width = cod_info.width[sfb];\n var s = cod_info.scalefac[sfb];\n if (cod_info.preflag != 0)\n s += qupvt.pretab[sfb];\n j += width;\n if ((s & 1) != 0) {\n s++;\n for (var l = -width; l < 0; l++) {\n xrpow[j + l] *= ifqstep34;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n }\n cod_info.scalefac[sfb] = s >> 1;\n }\n cod_info.preflag = 0;\n cod_info.scalefac_scale = 1;\n }\n\n /**\n * Takehiro Tominaga 2000-xx-xx\n *\n * increases the subblock gain and adjusts scalefactors\n */\n function inc_subblock_gain(gfc, cod_info, xrpow) {\n var sfb;\n var scalefac = cod_info.scalefac;\n\n /* subbloc_gain can't do anything in the long block region */\n for (sfb = 0; sfb < cod_info.sfb_lmax; sfb++) {\n if (scalefac[sfb] >= 16)\n return true;\n }\n\n for (var window = 0; window < 3; window++) {\n var s1 = 0;\n var s2 = 0;\n\n for (sfb = cod_info.sfb_lmax + window; sfb < cod_info.sfbdivide; sfb += 3) {\n if (s1 < scalefac[sfb])\n s1 = scalefac[sfb];\n }\n for (; sfb < cod_info.sfbmax; sfb += 3) {\n if (s2 < scalefac[sfb])\n s2 = scalefac[sfb];\n }\n\n if (s1 < 16 && s2 < 8)\n continue;\n\n if (cod_info.subblock_gain[window] >= 7)\n return true;\n\n /*\n * even though there is no scalefactor for sfb12 subblock gain\n * affects upper frequencies too, that's why we have to go up to\n * SBMAX_s\n */\n cod_info.subblock_gain[window]++;\n var j = gfc.scalefac_band.l[cod_info.sfb_lmax];\n for (sfb = cod_info.sfb_lmax + window; sfb < cod_info.sfbmax; sfb += 3) {\n var amp;\n var width = cod_info.width[sfb];\n var s = scalefac[sfb];\n assert(s >= 0);\n s = s - (4 >> cod_info.scalefac_scale);\n if (s >= 0) {\n scalefac[sfb] = s;\n j += width * 3;\n continue;\n }\n\n scalefac[sfb] = 0;\n {\n var gain = 210 + (s << (cod_info.scalefac_scale + 1));\n amp = qupvt.IPOW20(gain);\n }\n j += width * (window + 1);\n for (var l = -width; l < 0; l++) {\n xrpow[j + l] *= amp;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n j += width * (3 - window - 1);\n }\n\n {\n var amp = qupvt.IPOW20(202);\n j += cod_info.width[sfb] * (window + 1);\n for (var l = -cod_info.width[sfb]; l < 0; l++) {\n xrpow[j + l] *= amp;\n if (xrpow[j + l] > cod_info.xrpow_max)\n cod_info.xrpow_max = xrpow[j + l];\n }\n }\n }\n return false;\n }\n\n /**\n *
\n     *  Takehiro Tominaga /date??\n     *  Robert Hegemann 2000-09-06: made a function of it\n     *\n     *  amplifies scalefactor bands,\n     *   - if all are already amplified returns 0\n     *   - if some bands are amplified too much:\n     *      * try to increase scalefac_scale\n     *      * if already scalefac_scale was set\n     *          try on short blocks to increase subblock gain\n     * 
\n */\n function balance_noise(gfp, cod_info, distort, xrpow, bRefine) {\n var gfc = gfp.internal_flags;\n\n amp_scalefac_bands(gfp, cod_info, distort, xrpow, bRefine);\n\n /*\n * check to make sure we have not amplified too much loop_break returns\n * 0 if there is an unamplified scalefac scale_bitcount returns 0 if no\n * scalefactors are too large\n */\n\n var status = loop_break(cod_info);\n\n if (status)\n return false;\n /* all bands amplified */\n\n /*\n * not all scalefactors have been amplified. so these scalefacs are\n * possibly valid. encode them:\n */\n if (gfc.mode_gr == 2)\n status = tk.scale_bitcount(cod_info);\n else\n status = tk.scale_bitcount_lsf(gfc, cod_info);\n\n if (!status)\n return true;\n /* amplified some bands not exceeding limits */\n\n /*\n * some scalefactors are too large. lets try setting scalefac_scale=1\n */\n if (gfc.noise_shaping > 1) {\n Arrays.fill(gfc.pseudohalf, 0);\n if (0 == cod_info.scalefac_scale) {\n inc_scalefac_scale(cod_info, xrpow);\n status = false;\n } else {\n if (cod_info.block_type == Encoder.SHORT_TYPE\n && gfc.subblock_gain > 0) {\n status = (inc_subblock_gain(gfc, cod_info, xrpow) || loop_break(cod_info));\n }\n }\n }\n\n if (!status) {\n if (gfc.mode_gr == 2)\n status = tk.scale_bitcount(cod_info);\n else\n status = tk.scale_bitcount_lsf(gfc, cod_info);\n }\n return !status;\n }\n\n /**\n *
\n     *  Function: The outer iteration loop controls the masking conditions\n     *  of all scalefactorbands. It computes the best scalefac and\n     *  global gain. This module calls the inner iteration loop\n     *\n     *  mt 5/99 completely rewritten to allow for bit reservoir control,\n     *  mid/side channels with L/R or mid/side masking thresholds,\n     *  and chooses best quantization instead of last quantization when\n     *  no distortion free quantization can be found.\n     *\n     *  added VBR support mt 5/99\n     *\n     *  some code shuffle rh 9/00\n     * 
\n *\n * @param l3_xmin\n * allowed distortion\n * @param xrpow\n * coloured magnitudes of spectral\n * @param targ_bits\n * maximum allowed bits\n */\n this.outer_loop = function (gfp, cod_info, l3_xmin, xrpow, ch, targ_bits) {\n var gfc = gfp.internal_flags;\n var cod_info_w = new GrInfo();\n var save_xrpow = new_float(576);\n var distort = new_float(L3Side.SFBMAX);\n var best_noise_info = new CalcNoiseResult();\n var better;\n var prev_noise = new CalcNoiseData();\n var best_part2_3_length = 9999999;\n var bEndOfSearch = false;\n var bRefine = false;\n var best_ggain_pass1 = 0;\n\n bin_search_StepSize(gfc, cod_info, targ_bits, ch, xrpow);\n\n if (0 == gfc.noise_shaping)\n /* fast mode, no noise shaping, we are ready */\n return 100;\n /* default noise_info.over_count */\n\n /* compute the distortion in this quantization */\n /* coefficients and thresholds both l/r (or both mid/side) */\n qupvt.calc_noise(cod_info, l3_xmin, distort, best_noise_info,\n prev_noise);\n best_noise_info.bits = cod_info.part2_3_length;\n\n cod_info_w.assign(cod_info);\n var age = 0;\n System.arraycopy(xrpow, 0, save_xrpow, 0, 576);\n\n while (!bEndOfSearch) {\n /* BEGIN MAIN LOOP */\n do {\n var noise_info = new CalcNoiseResult();\n var search_limit;\n var maxggain = 255;\n\n /*\n * When quantization with no distorted bands is found, allow up\n * to X new unsuccesful tries in serial. This gives us more\n * possibilities for different quant_compare modes. Much more\n * than 3 makes not a big difference, it is only slower.\n */\n\n if ((gfc.substep_shaping & 2) != 0) {\n search_limit = 20;\n } else {\n search_limit = 3;\n }\n\n /*\n * Check if the last scalefactor band is distorted. in VBR mode\n * we can't get rid of the distortion, so quit now and VBR mode\n * will try again with more bits. (makes a 10% speed increase,\n * the files I tested were binary identical, 2000/05/20 Robert\n * Hegemann) distort[] > 1 means noise > allowed noise\n */\n if (gfc.sfb21_extra) {\n if (distort[cod_info_w.sfbmax] > 1.0)\n break;\n if (cod_info_w.block_type == Encoder.SHORT_TYPE\n && (distort[cod_info_w.sfbmax + 1] > 1.0 || distort[cod_info_w.sfbmax + 2] > 1.0))\n break;\n }\n\n /* try a new scalefactor conbination on cod_info_w */\n if (!balance_noise(gfp, cod_info_w, distort, xrpow, bRefine))\n break;\n if (cod_info_w.scalefac_scale != 0)\n maxggain = 254;\n\n /*\n * inner_loop starts with the initial quantization step computed\n * above and slowly increases until the bits < huff_bits. Thus\n * it is important not to start with too large of an inital\n * quantization step. Too small is ok, but inner_loop will take\n * longer\n */\n var huff_bits = targ_bits - cod_info_w.part2_length;\n if (huff_bits <= 0)\n break;\n\n /*\n * increase quantizer stepsize until needed bits are below\n * maximum\n */\n while ((cod_info_w.part2_3_length = tk.count_bits(gfc, xrpow,\n cod_info_w, prev_noise)) > huff_bits\n && cod_info_w.global_gain <= maxggain)\n cod_info_w.global_gain++;\n\n if (cod_info_w.global_gain > maxggain)\n break;\n\n if (best_noise_info.over_count == 0) {\n\n while ((cod_info_w.part2_3_length = tk.count_bits(gfc,\n xrpow, cod_info_w, prev_noise)) > best_part2_3_length\n && cod_info_w.global_gain <= maxggain)\n cod_info_w.global_gain++;\n\n if (cod_info_w.global_gain > maxggain)\n break;\n }\n\n /* compute the distortion in this quantization */\n qupvt.calc_noise(cod_info_w, l3_xmin, distort, noise_info,\n prev_noise);\n noise_info.bits = cod_info_w.part2_3_length;\n\n /*\n * check if this quantization is better than our saved\n * quantization\n */\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type\n better = gfp.quant_comp;\n } else\n better = gfp.quant_comp_short;\n\n better = quant_compare(better, best_noise_info, noise_info,\n cod_info_w, distort) ? 1 : 0;\n\n /* save data so we can restore this quantization later */\n if (better != 0) {\n best_part2_3_length = cod_info.part2_3_length;\n best_noise_info = noise_info;\n cod_info.assign(cod_info_w);\n age = 0;\n /* save data so we can restore this quantization later */\n /* store for later reuse */\n System.arraycopy(xrpow, 0, save_xrpow, 0, 576);\n } else {\n /* early stop? */\n if (gfc.full_outer_loop == 0) {\n if (++age > search_limit\n && best_noise_info.over_count == 0)\n break;\n if ((gfc.noise_shaping_amp == 3) && bRefine && age > 30)\n break;\n if ((gfc.noise_shaping_amp == 3)\n && bRefine\n && (cod_info_w.global_gain - best_ggain_pass1) > 15)\n break;\n }\n }\n } while ((cod_info_w.global_gain + cod_info_w.scalefac_scale) < 255);\n\n if (gfc.noise_shaping_amp == 3) {\n if (!bRefine) {\n /* refine search */\n cod_info_w.assign(cod_info);\n System.arraycopy(save_xrpow, 0, xrpow, 0, 576);\n age = 0;\n best_ggain_pass1 = cod_info_w.global_gain;\n\n bRefine = true;\n } else {\n /* search already refined, stop */\n bEndOfSearch = true;\n }\n\n } else {\n bEndOfSearch = true;\n }\n }\n\n assert((cod_info.global_gain + cod_info.scalefac_scale) <= 255);\n /*\n * finish up\n */\n if (gfp.VBR == VbrMode.vbr_rh || gfp.VBR == VbrMode.vbr_mtrh)\n /* restore for reuse on next try */\n System.arraycopy(save_xrpow, 0, xrpow, 0, 576);\n /*\n * do the 'substep shaping'\n */\n else if ((gfc.substep_shaping & 1) != 0)\n trancate_smallspectrums(gfc, cod_info, l3_xmin, xrpow);\n\n return best_noise_info.over_count;\n }\n\n /**\n * Robert Hegemann 2000-09-06\n *\n * update reservoir status after FINAL quantization/bitrate\n */\n this.iteration_finish_one = function (gfc, gr, ch) {\n var l3_side = gfc.l3_side;\n var cod_info = l3_side.tt[gr][ch];\n\n /*\n * try some better scalefac storage\n */\n tk.best_scalefac_store(gfc, gr, ch, l3_side);\n\n /*\n * best huffman_divide may save some bits too\n */\n if (gfc.use_best_huffman == 1)\n tk.best_huffman_divide(gfc, cod_info);\n\n /*\n * update reservoir status after FINAL quantization/bitrate\n */\n rv.ResvAdjust(gfc, cod_info);\n };\n\n /**\n *\n * 2000-09-04 Robert Hegemann\n *\n * @param l3_xmin\n * allowed distortion of the scalefactor\n * @param xrpow\n * coloured magnitudes of spectral values\n */\n this.VBR_encode_granule = function (gfp, cod_info, l3_xmin, xrpow, ch, min_bits, max_bits) {\n var gfc = gfp.internal_flags;\n var bst_cod_info = new GrInfo();\n var bst_xrpow = new_float(576);\n var Max_bits = max_bits;\n var real_bits = max_bits + 1;\n var this_bits = (max_bits + min_bits) / 2;\n var dbits, over, found = 0;\n var sfb21_extra = gfc.sfb21_extra;\n\n assert(Max_bits <= LameInternalFlags.MAX_BITS_PER_CHANNEL);\n Arrays.fill(bst_cod_info.l3_enc, 0);\n\n /*\n * search within round about 40 bits of optimal\n */\n do {\n assert(this_bits >= min_bits);\n assert(this_bits <= max_bits);\n assert(min_bits <= max_bits);\n\n if (this_bits > Max_bits - 42)\n gfc.sfb21_extra = false;\n else\n gfc.sfb21_extra = sfb21_extra;\n\n over = outer_loop(gfp, cod_info, l3_xmin, xrpow, ch, this_bits);\n\n /*\n * is quantization as good as we are looking for ? in this case: is\n * no scalefactor band distorted?\n */\n if (over <= 0) {\n found = 1;\n /*\n * now we know it can be done with \"real_bits\" and maybe we can\n * skip some iterations\n */\n real_bits = cod_info.part2_3_length;\n\n /*\n * store best quantization so far\n */\n bst_cod_info.assign(cod_info);\n System.arraycopy(xrpow, 0, bst_xrpow, 0, 576);\n\n /*\n * try with fewer bits\n */\n max_bits = real_bits - 32;\n dbits = max_bits - min_bits;\n this_bits = (max_bits + min_bits) / 2;\n } else {\n /*\n * try with more bits\n */\n min_bits = this_bits + 32;\n dbits = max_bits - min_bits;\n this_bits = (max_bits + min_bits) / 2;\n\n if (found != 0) {\n found = 2;\n /*\n * start again with best quantization so far\n */\n cod_info.assign(bst_cod_info);\n System.arraycopy(bst_xrpow, 0, xrpow, 0, 576);\n }\n }\n } while (dbits > 12);\n\n gfc.sfb21_extra = sfb21_extra;\n\n /*\n * found=0 => nothing found, use last one found=1 => we just found the\n * best and left the loop found=2 => we restored a good one and have now\n * l3_enc to restore too\n */\n if (found == 2) {\n System.arraycopy(bst_cod_info.l3_enc, 0, cod_info.l3_enc, 0, 576);\n }\n assert(cod_info.part2_3_length <= Max_bits);\n }\n\n /**\n * Robert Hegemann 2000-09-05\n *\n * calculates * how many bits are available for analog silent granules * how\n * many bits to use for the lowest allowed bitrate * how many bits each\n * bitrate would provide\n */\n this.get_framebits = function (gfp, frameBits) {\n var gfc = gfp.internal_flags;\n\n /*\n * always use at least this many bits per granule per channel unless we\n * detect analog silence, see below\n */\n gfc.bitrate_index = gfc.VBR_min_bitrate;\n var bitsPerFrame = bs.getframebits(gfp);\n\n /*\n * bits for analog silence\n */\n gfc.bitrate_index = 1;\n bitsPerFrame = bs.getframebits(gfp);\n\n for (var i = 1; i <= gfc.VBR_max_bitrate; i++) {\n gfc.bitrate_index = i;\n var mb = new MeanBits(bitsPerFrame);\n frameBits[i] = rv.ResvFrameBegin(gfp, mb);\n bitsPerFrame = mb.bits;\n }\n };\n\n /* RH: this one needs to be overhauled sometime */\n\n /**\n *
\n     *  2000-09-04 Robert Hegemann\n     *\n     *  * converts LR to MS coding when necessary\n     *  * calculates allowed/adjusted quantization noise amounts\n     *  * detects analog silent frames\n     *\n     *  some remarks:\n     *  - lower masking depending on Quality setting\n     *  - quality control together with adjusted ATH MDCT scaling\n     *    on lower quality setting allocate more noise from\n     *    ATH masking, and on higher quality setting allocate\n     *    less noise from ATH masking.\n     *  - experiments show that going more than 2dB over GPSYCHO's\n     *    limits ends up in very annoying artefacts\n     * 
\n */\n this.VBR_old_prepare = function (gfp, pe, ms_ener_ratio, ratio, l3_xmin, frameBits, min_bits,\n max_bits, bands) {\n var gfc = gfp.internal_flags;\n\n var masking_lower_db, adjust = 0.0;\n var analog_silence = 1;\n var bits = 0;\n\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n var avg = rv.ResvFrameBegin(gfp, new MeanBits(0)) / gfc.mode_gr;\n\n get_framebits(gfp, frameBits);\n\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n var mxb = qupvt.on_pe(gfp, pe, max_bits[gr], avg, gr, 0);\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n ms_convert(gfc.l3_side, gr);\n qupvt.reduce_side(max_bits[gr], ms_ener_ratio[gr], avg, mxb);\n }\n for (var ch = 0; ch < gfc.channels_out; ++ch) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n\n if (cod_info.block_type != Encoder.SHORT_TYPE) {\n // NORM, START or STOP type\n adjust = 1.28 / (1 + Math\n .exp(3.5 - pe[gr][ch] / 300.)) - 0.05;\n masking_lower_db = gfc.PSY.mask_adjust - adjust;\n } else {\n adjust = 2.56 / (1 + Math\n .exp(3.5 - pe[gr][ch] / 300.)) - 0.14;\n masking_lower_db = gfc.PSY.mask_adjust_short - adjust;\n }\n gfc.masking_lower = Math.pow(10.0,\n masking_lower_db * 0.1);\n\n init_outer_loop(gfc, cod_info);\n bands[gr][ch] = qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n l3_xmin[gr][ch]);\n if (bands[gr][ch] != 0)\n analog_silence = 0;\n\n min_bits[gr][ch] = 126;\n\n bits += max_bits[gr][ch];\n }\n }\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n if (bits > frameBits[gfc.VBR_max_bitrate]) {\n max_bits[gr][ch] *= frameBits[gfc.VBR_max_bitrate];\n max_bits[gr][ch] /= bits;\n }\n if (min_bits[gr][ch] > max_bits[gr][ch])\n min_bits[gr][ch] = max_bits[gr][ch];\n\n }\n /* for ch */\n }\n /* for gr */\n\n return analog_silence;\n };\n\n this.bitpressure_strategy = function (gfc, l3_xmin, min_bits, max_bits) {\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n var gi = gfc.l3_side.tt[gr][ch];\n var pxmin = l3_xmin[gr][ch];\n var pxminPos = 0;\n for (var sfb = 0; sfb < gi.psy_lmax; sfb++)\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_l / Encoder.SBMAX_l;\n\n if (gi.block_type == Encoder.SHORT_TYPE) {\n for (var sfb = gi.sfb_smin; sfb < Encoder.SBMAX_s; sfb++) {\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n pxmin[pxminPos++] *= 1. + .029 * sfb * sfb\n / Encoder.SBMAX_s / Encoder.SBMAX_s;\n }\n }\n max_bits[gr][ch] = 0 | Math.max(min_bits[gr][ch],\n 0.9 * max_bits[gr][ch]);\n }\n }\n };\n\n this.VBR_new_prepare = function (gfp, pe, ratio, l3_xmin, frameBits, max_bits) {\n var gfc = gfp.internal_flags;\n\n var analog_silence = 1;\n var avg = 0, bits = 0;\n var maximum_framebits;\n\n if (!gfp.free_format) {\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n\n var mb = new MeanBits(avg);\n rv.ResvFrameBegin(gfp, mb);\n avg = mb.bits;\n\n get_framebits(gfp, frameBits);\n maximum_framebits = frameBits[gfc.VBR_max_bitrate];\n } else {\n gfc.bitrate_index = 0;\n var mb = new MeanBits(avg);\n maximum_framebits = rv.ResvFrameBegin(gfp, mb);\n avg = mb.bits;\n frameBits[0] = maximum_framebits;\n }\n\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n qupvt.on_pe(gfp, pe, max_bits[gr], avg, gr, 0);\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR) {\n ms_convert(gfc.l3_side, gr);\n }\n for (var ch = 0; ch < gfc.channels_out; ++ch) {\n var cod_info = gfc.l3_side.tt[gr][ch];\n\n gfc.masking_lower = Math.pow(10.0,\n gfc.PSY.mask_adjust * 0.1);\n\n init_outer_loop(gfc, cod_info);\n if (0 != qupvt.calc_xmin(gfp, ratio[gr][ch], cod_info,\n l3_xmin[gr][ch]))\n analog_silence = 0;\n\n bits += max_bits[gr][ch];\n }\n }\n for (var gr = 0; gr < gfc.mode_gr; gr++) {\n for (var ch = 0; ch < gfc.channels_out; ch++) {\n if (bits > maximum_framebits) {\n max_bits[gr][ch] *= maximum_framebits;\n max_bits[gr][ch] /= bits;\n }\n\n }\n /* for ch */\n }\n /* for gr */\n\n return analog_silence;\n };\n\n /**\n * calculates target bits for ABR encoding\n *\n * mt 2000/05/31\n */\n this.calc_target_bits = function (gfp, pe, ms_ener_ratio, targ_bits, analog_silence_bits, max_frame_bits) {\n var gfc = gfp.internal_flags;\n var l3_side = gfc.l3_side;\n var res_factor;\n var gr, ch, totbits, mean_bits = 0;\n\n gfc.bitrate_index = gfc.VBR_max_bitrate;\n var mb = new MeanBits(mean_bits);\n max_frame_bits[0] = rv.ResvFrameBegin(gfp, mb);\n mean_bits = mb.bits;\n\n gfc.bitrate_index = 1;\n mean_bits = bs.getframebits(gfp) - gfc.sideinfo_len * 8;\n analog_silence_bits[0] = mean_bits / (gfc.mode_gr * gfc.channels_out);\n\n mean_bits = gfp.VBR_mean_bitrate_kbps * gfp.framesize * 1000;\n if ((gfc.substep_shaping & 1) != 0)\n mean_bits *= 1.09;\n mean_bits /= gfp.out_samplerate;\n mean_bits -= gfc.sideinfo_len * 8;\n mean_bits /= (gfc.mode_gr * gfc.channels_out);\n\n /**\n *
\n         *           res_factor is the percentage of the target bitrate that should\n         *           be used on average.  the remaining bits are added to the\n         *           bitreservoir and used for difficult to encode frames.\n         *\n         *           Since we are tracking the average bitrate, we should adjust\n         *           res_factor \"on the fly\", increasing it if the average bitrate\n         *           is greater than the requested bitrate, and decreasing it\n         *           otherwise.  Reasonable ranges are from .9 to 1.0\n         *\n         *           Until we get the above suggestion working, we use the following\n         *           tuning:\n         *           compression ratio    res_factor\n         *           5.5  (256kbps)         1.0      no need for bitreservoir\n         *           11   (128kbps)         .93      7% held for reservoir\n         *\n         *           with linear interpolation for other values.\n         * 
\n */\n res_factor = .93 + .07 * (11.0 - gfp.compression_ratio)\n / (11.0 - 5.5);\n if (res_factor < .90)\n res_factor = .90;\n if (res_factor > 1.00)\n res_factor = 1.00;\n\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n var sum = 0;\n for (ch = 0; ch < gfc.channels_out; ch++) {\n targ_bits[gr][ch] = (int)(res_factor * mean_bits);\n\n if (pe[gr][ch] > 700) {\n var add_bits = (int)((pe[gr][ch] - 700) / 1.4);\n\n var cod_info = l3_side.tt[gr][ch];\n targ_bits[gr][ch] = (int)(res_factor * mean_bits);\n\n /* short blocks use a little extra, no matter what the pe */\n if (cod_info.block_type == Encoder.SHORT_TYPE) {\n if (add_bits < mean_bits / 2)\n add_bits = mean_bits / 2;\n }\n /* at most increase bits by 1.5*average */\n if (add_bits > mean_bits * 3 / 2)\n add_bits = mean_bits * 3 / 2;\n else if (add_bits < 0)\n add_bits = 0;\n\n targ_bits[gr][ch] += add_bits;\n }\n if (targ_bits[gr][ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL) {\n targ_bits[gr][ch] = LameInternalFlags.MAX_BITS_PER_CHANNEL;\n }\n sum += targ_bits[gr][ch];\n }\n /* for ch */\n if (sum > LameInternalFlags.MAX_BITS_PER_GRANULE) {\n for (ch = 0; ch < gfc.channels_out; ++ch) {\n targ_bits[gr][ch] *= LameInternalFlags.MAX_BITS_PER_GRANULE;\n targ_bits[gr][ch] /= sum;\n }\n }\n }\n /* for gr */\n\n if (gfc.mode_ext == Encoder.MPG_MD_MS_LR)\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n qupvt.reduce_side(targ_bits[gr], ms_ener_ratio[gr], mean_bits\n * gfc.channels_out,\n LameInternalFlags.MAX_BITS_PER_GRANULE);\n }\n\n /*\n * sum target bits\n */\n totbits = 0;\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n if (targ_bits[gr][ch] > LameInternalFlags.MAX_BITS_PER_CHANNEL)\n targ_bits[gr][ch] = LameInternalFlags.MAX_BITS_PER_CHANNEL;\n totbits += targ_bits[gr][ch];\n }\n }\n\n /*\n * repartion target bits if needed\n */\n if (totbits > max_frame_bits[0]) {\n for (gr = 0; gr < gfc.mode_gr; gr++) {\n for (ch = 0; ch < gfc.channels_out; ch++) {\n targ_bits[gr][ch] *= max_frame_bits[0];\n targ_bits[gr][ch] /= totbits;\n }\n }\n }\n }\n\n}\n\nmodule.exports = Quantize;\n","/*\n * bit reservoir source file\n *\n * Copyright (c) 1999-2000 Mark Taylor\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the\n * Free Software Foundation, Inc., 59 Temple Place - Suite 330,\n * Boston, MA 02111-1307, USA.\n */\n\n/* $Id: Reservoir.java,v 1.9 2011/05/24 20:48:06 kenchis Exp $ */\n\n//package mp3;\n\n/**\n * ResvFrameBegin:
\n * Called (repeatedly) at the beginning of a frame. Updates the maximum size of\n * the reservoir, and checks to make sure main_data_begin was set properly by\n * the formatter
\n * Background information:\n * \n * This is the original text from the ISO standard. Because of sooo many bugs\n * and irritations correcting comments are added in brackets []. A '^W' means\n * you should remove the last word.\n * \n *
\n *  1. The following rule can be used to calculate the maximum\n *     number of bits used for one granule [^W frame]:
\n * At the highest possible bitrate of Layer III (320 kbps\n * per stereo signal [^W^W^W], 48 kHz) the frames must be of\n * [^W^W^W are designed to have] constant length, i.e.\n * one buffer [^W^W the frame] length is:
\n * \n * 320 kbps * 1152/48 kHz = 7680 bit = 960 byte\n * \n * This value is used as the maximum buffer per channel [^W^W] at\n * lower bitrates [than 320 kbps]. At 64 kbps mono or 128 kbps\n * stereo the main granule length is 64 kbps * 576/48 kHz = 768 bit\n * [per granule and channel] at 48 kHz sampling frequency.\n * This means that there is a maximum deviation (short time buffer\n * [= reservoir]) of 7680 - 2*2*768 = 4608 bits is allowed at 64 kbps.\n * The actual deviation is equal to the number of bytes [with the\n * meaning of octets] denoted by the main_data_end offset pointer.\n * The actual maximum deviation is (2^9-1)*8 bit = 4088 bits\n * [for MPEG-1 and (2^8-1)*8 bit for MPEG-2, both are hard limits].\n * ... The xchange of buffer bits between the left and right channel\n * is allowed without restrictions [exception: dual channel].\n * Because of the [constructed] constraint on the buffer size\n * main_data_end is always set to 0 in the case of bit_rate_index==14,\n * i.e. data rate 320 kbps per stereo signal [^W^W^W]. In this case\n * all data are allocated between adjacent header [^W sync] words\n * [, i.e. there is no buffering at all].\n *
\n */\n\nvar common = require('./common.js');\nvar assert = common.assert;\n\nfunction Reservoir() {\n\tvar bs;\n\n\tthis.setModules = function(_bs) {\n\t\tbs = _bs;\n\t}\n\n\tthis.ResvFrameBegin = function(gfp, mean_bits) {\n\t\tvar gfc = gfp.internal_flags;\n\t\tvar maxmp3buf;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tvar frameLength = bs.getframebits(gfp);\n\t\tmean_bits.bits = (frameLength - gfc.sideinfo_len * 8) / gfc.mode_gr;\n\n\t\t/**\n\t\t *
\n\t\t *  Meaning of the variables:\n\t\t *      resvLimit: (0, 8, ..., 8*255 (MPEG-2), 8*511 (MPEG-1))\n\t\t *          Number of bits can be stored in previous frame(s) due to\n\t\t *          counter size constaints\n\t\t *      maxmp3buf: ( ??? ... 8*1951 (MPEG-1 and 2), 8*2047 (MPEG-2.5))\n\t\t *          Number of bits allowed to encode one frame (you can take 8*511 bit\n\t\t *          from the bit reservoir and at most 8*1440 bit from the current\n\t\t *          frame (320 kbps, 32 kHz), so 8*1951 bit is the largest possible\n\t\t *          value for MPEG-1 and -2)\n\t\t * \n\t\t *          maximum allowed granule/channel size times 4 = 8*2047 bits.,\n\t\t *          so this is the absolute maximum supported by the format.\n\t\t * \n\t\t * \n\t\t *      fullFrameBits:  maximum number of bits available for encoding\n\t\t *                      the current frame.\n\t\t * \n\t\t *      mean_bits:      target number of bits per granule.\n\t\t * \n\t\t *      frameLength:\n\t\t * \n\t\t *      gfc.ResvMax:   maximum allowed reservoir\n\t\t * \n\t\t *      gfc.ResvSize:  current reservoir size\n\t\t * \n\t\t *      l3_side.resvDrain_pre:\n\t\t *         ancillary data to be added to previous frame:\n\t\t *         (only usefull in VBR modes if it is possible to have\n\t\t *         maxmp3buf < fullFrameBits)).  Currently disabled,\n\t\t *         see #define NEW_DRAIN\n\t\t *         2010-02-13: RH now enabled, it seems to be needed for CBR too,\n\t\t *                     as there exists one example, where the FhG decoder\n\t\t *                     can't decode a -b320 CBR file anymore.\n\t\t * \n\t\t *      l3_side.resvDrain_post:\n\t\t *         ancillary data to be added to this frame:\n\t\t * \n\t\t * 
\n\t\t */\n\n\t\t/* main_data_begin has 9 bits in MPEG-1, 8 bits MPEG-2 */\n\t\tvar resvLimit = (8 * 256) * gfc.mode_gr - 8;\n\n\t\t/*\n\t\t * maximum allowed frame size. dont use more than this number of bits,\n\t\t * even if the frame has the space for them:\n\t\t */\n\t\tif (gfp.brate > 320) {\n\t\t\t/* in freeformat the buffer is constant */\n\t\t\tmaxmp3buf = 8 * ((int) ((gfp.brate * 1000)\n\t\t\t\t\t/ (gfp.out_samplerate / 1152) / 8 + .5));\n\t\t} else {\n\t\t\t/*\n\t\t\t * all mp3 decoders should have enough buffer to handle this value:\n\t\t\t * size of a 320kbps 32kHz frame\n\t\t\t */\n\t\t\tmaxmp3buf = 8 * 1440;\n\n\t\t\t/*\n\t\t\t * Bouvigne suggests this more lax interpretation of the ISO doc\n\t\t\t * instead of using 8*960.\n\t\t\t */\n\n\t\t\tif (gfp.strict_ISO) {\n\t\t\t\tmaxmp3buf = 8 * ((int) (320000 / (gfp.out_samplerate / 1152) / 8 + .5));\n\t\t\t}\n\t\t}\n\n\t\tgfc.ResvMax = maxmp3buf - frameLength;\n\t\tif (gfc.ResvMax > resvLimit)\n\t\t\tgfc.ResvMax = resvLimit;\n\t\tif (gfc.ResvMax < 0 || gfp.disable_reservoir)\n\t\t\tgfc.ResvMax = 0;\n\n\t\tvar fullFrameBits = mean_bits.bits * gfc.mode_gr\n\t\t\t\t+ Math.min(gfc.ResvSize, gfc.ResvMax);\n\n\t\tif (fullFrameBits > maxmp3buf)\n\t\t\tfullFrameBits = maxmp3buf;\n\n\t\tassert (0 == gfc.ResvMax % 8);\n\t\tassert (gfc.ResvMax >= 0);\n\n\t\tl3_side.resvDrain_pre = 0;\n\n\t\t// frame analyzer code\n\t\tif (gfc.pinfo != null) {\n\t\t\t/*\n\t\t\t * expected bits per channel per granule [is this also right for\n\t\t\t * mono/stereo, MPEG-1/2 ?]\n\t\t\t */\n\t\t\tgfc.pinfo.mean_bits = mean_bits.bits / 2;\n\t\t\tgfc.pinfo.resvsize = gfc.ResvSize;\n\t\t}\n\n\t\treturn fullFrameBits;\n\t}\n\n\t/**\n\t * returns targ_bits: target number of bits to use for 1 granule
\n\t * extra_bits: amount extra available from reservoir
\n\t * Mark Taylor 4/99\n\t */\n\tthis.ResvMaxBits = function(gfp, mean_bits, targ_bits, cbr) {\n\t\tvar gfc = gfp.internal_flags;\n\t\tvar add_bits;\n var ResvSize = gfc.ResvSize, ResvMax = gfc.ResvMax;\n\n\t\t/* compensate the saved bits used in the 1st granule */\n\t\tif (cbr != 0)\n\t\t\tResvSize += mean_bits;\n\n\t\tif ((gfc.substep_shaping & 1) != 0)\n\t\t\tResvMax *= 0.9;\n\n\t\ttarg_bits.bits = mean_bits;\n\n\t\t/* extra bits if the reservoir is almost full */\n\t\tif (ResvSize * 10 > ResvMax * 9) {\n\t\t\tadd_bits = ResvSize - (ResvMax * 9) / 10;\n\t\t\ttarg_bits.bits += add_bits;\n\t\t\tgfc.substep_shaping |= 0x80;\n\t\t} else {\n\t\t\tadd_bits = 0;\n\t\t\tgfc.substep_shaping &= 0x7f;\n\t\t\t/*\n\t\t\t * build up reservoir. this builds the reservoir a little slower\n\t\t\t * than FhG. It could simple be mean_bits/15, but this was rigged to\n\t\t\t * always produce 100 (the old value) at 128kbs\n\t\t\t */\n\t\t\tif (!gfp.disable_reservoir && 0 == (gfc.substep_shaping & 1))\n\t\t\t\ttarg_bits.bits -= .1 * mean_bits;\n\t\t}\n\n\t\t/* amount from the reservoir we are allowed to use. ISO says 6/10 */\n\t\tvar extra_bits = (ResvSize < (gfc.ResvMax * 6) / 10 ? ResvSize\n\t\t\t\t: (gfc.ResvMax * 6) / 10);\n\t\textra_bits -= add_bits;\n\n\t\tif (extra_bits < 0)\n\t\t\textra_bits = 0;\n\t\treturn extra_bits;\n\t}\n\n\t/**\n\t * Called after a granule's bit allocation. Readjusts the size of the\n\t * reservoir to reflect the granule's usage.\n\t */\n\tthis.ResvAdjust = function(gfc, gi) {\n\t\tgfc.ResvSize -= gi.part2_3_length + gi.part2_length;\n\t}\n\n\t/**\n\t * Called after all granules in a frame have been allocated. Makes sure that\n\t * the reservoir size is within limits, possibly by adding stuffing bits.\n\t */\n\tthis.ResvFrameEnd = function(gfc, mean_bits) {\n\t\tvar over_bits;\n\t\tvar l3_side = gfc.l3_side;\n\n\t\tgfc.ResvSize += mean_bits * gfc.mode_gr;\n\t\tvar stuffingBits = 0;\n\t\tl3_side.resvDrain_post = 0;\n\t\tl3_side.resvDrain_pre = 0;\n\n\t\t/* we must be byte aligned */\n\t\tif ((over_bits = gfc.ResvSize % 8) != 0)\n\t\t\tstuffingBits += over_bits;\n\n\t\tover_bits = (gfc.ResvSize - stuffingBits) - gfc.ResvMax;\n\t\tif (over_bits > 0) {\n\t\t\tassert (0 == over_bits % 8);\n\t\t\tassert (over_bits >= 0);\n\t\t\tstuffingBits += over_bits;\n\t\t}\n\n\t\t/*\n\t\t * NOTE: enabling the NEW_DRAIN code fixes some problems with FhG\n\t\t * decoder shipped with MS Windows operating systems. Using this, it is\n\t\t * even possible to use Gabriel's lax buffer consideration again, which\n\t\t * assumes, any decoder should have a buffer large enough for a 320 kbps\n\t\t * frame at 32 kHz sample rate.\n\t\t * \n\t\t * old drain code: lame -b320 BlackBird.wav --. does not play with\n\t\t * GraphEdit.exe using FhG decoder V1.5 Build 50\n\t\t * \n\t\t * new drain code: lame -b320 BlackBird.wav --. plays fine with\n\t\t * GraphEdit.exe using FhG decoder V1.5 Build 50\n\t\t * \n\t\t * Robert Hegemann, 2010-02-13.\n\t\t */\n\t\t/*\n\t\t * drain as many bits as possible into previous frame ancillary data In\n\t\t * particular, in VBR mode ResvMax may have changed, and we have to make\n\t\t * sure main_data_begin does not create a reservoir bigger than ResvMax\n\t\t * mt 4/00\n\t\t */\n\t\t{\n\t\t\tvar mdb_bytes = Math.min(l3_side.main_data_begin * 8, stuffingBits) / 8;\n\t\t\tl3_side.resvDrain_pre += 8 * mdb_bytes;\n\t\t\tstuffingBits -= 8 * mdb_bytes;\n\t\t\tgfc.ResvSize -= 8 * mdb_bytes;\n\t\t\tl3_side.main_data_begin -= mdb_bytes;\n\t\t}\n\t\t/* drain the rest into this frames ancillary data */\n\t\tl3_side.resvDrain_post += stuffingBits;\n\t\tgfc.ResvSize -= stuffingBits;\n\t}\n}\n\nmodule.exports = Reservoir;\n","function Version() {\n\n /**\n * URL for the LAME website.\n */\n var LAME_URL = \"http://www.mp3dev.org/\";\n\n /**\n * Major version number.\n */\n var LAME_MAJOR_VERSION = 3;\n /**\n * Minor version number.\n */\n var LAME_MINOR_VERSION = 98;\n /**\n * Patch level.\n */\n var LAME_PATCH_VERSION = 4;\n\n /**\n * Major version number.\n */\n var PSY_MAJOR_VERSION = 0;\n /**\n * Minor version number.\n */\n var PSY_MINOR_VERSION = 93;\n\n /**\n * A string which describes the version of LAME.\n *\n * @return string which describes the version of LAME\n */\n this.getLameVersion = function () {\n // primary to write screen reports\n return (LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \".\" + LAME_PATCH_VERSION);\n }\n\n /**\n * The short version of the LAME version string.\n *\n * @return short version of the LAME version string\n */\n this.getLameShortVersion = function () {\n // Adding date and time to version string makes it harder for output\n // validation\n return (LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \".\" + LAME_PATCH_VERSION);\n }\n\n /**\n * The shortest version of the LAME version string.\n *\n * @return shortest version of the LAME version string\n */\n this.getLameVeryShortVersion = function () {\n // Adding date and time to version string makes it harder for output\n return (\"LAME\" + LAME_MAJOR_VERSION + \".\" + LAME_MINOR_VERSION + \"r\");\n }\n\n /**\n * String which describes the version of GPSYCHO\n *\n * @return string which describes the version of GPSYCHO\n */\n this.getPsyVersion = function () {\n return (PSY_MAJOR_VERSION + \".\" + PSY_MINOR_VERSION);\n }\n\n /**\n * String which is a URL for the LAME website.\n *\n * @return string which is a URL for the LAME website\n */\n this.getLameUrl = function () {\n return LAME_URL;\n }\n\n /**\n * Quite useless for a java version, however we are compatible ;-)\n *\n * @return \"32bits\"\n */\n this.getLameOsBitness = function () {\n return \"32bits\";\n }\n\n}\n\nmodule.exports = Version;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\n/**\n * A Vbr header may be present in the ancillary data field of the first frame of\n * an mp3 bitstream
\n * The Vbr header (optionally) contains\n *
    \n *
  • frames total number of audio frames in the bitstream\n *
  • bytes total number of bytes in the bitstream\n *
  • toc table of contents\n *
\n *\n * toc (table of contents) gives seek points for random access.
\n * The ith entry determines the seek point for i-percent duration.
\n * seek point in bytes = (toc[i]/256.0) * total_bitstream_bytes
\n * e.g. half duration seek point = (toc[50]/256.0) * total_bitstream_bytes\n */\nVBRTag.NUMTOCENTRIES = 100;\nVBRTag.MAXFRAMESIZE = 2880;\n\nfunction VBRTag() {\n\n var lame;\n var bs;\n var v;\n\n this.setModules = function (_lame, _bs, _v) {\n lame = _lame;\n bs = _bs;\n v = _v;\n };\n\n var FRAMES_FLAG = 0x0001;\n var BYTES_FLAG = 0x0002;\n var TOC_FLAG = 0x0004;\n var VBR_SCALE_FLAG = 0x0008;\n\n var NUMTOCENTRIES = VBRTag.NUMTOCENTRIES;\n\n /**\n * (0xB40) the max freeformat 640 32kHz framesize.\n */\n var MAXFRAMESIZE = VBRTag.MAXFRAMESIZE;\n\n /**\n *
\n     *    4 bytes for Header Tag\n     *    4 bytes for Header Flags\n     *  100 bytes for entry (toc)\n     *    4 bytes for frame size\n     *    4 bytes for stream size\n     *    4 bytes for VBR scale. a VBR quality indicator: 0=best 100=worst\n     *   20 bytes for LAME tag.  for example, \"LAME3.12 (beta 6)\"\n     * ___________\n     *  140 bytes\n     * 
\n */\n var VBRHEADERSIZE = (NUMTOCENTRIES + 4 + 4 + 4 + 4 + 4);\n\n var LAMEHEADERSIZE = (VBRHEADERSIZE + 9 + 1 + 1 + 8\n + 1 + 1 + 3 + 1 + 1 + 2 + 4 + 2 + 2);\n\n /**\n * The size of the Xing header MPEG-1, bit rate in kbps.\n */\n var XING_BITRATE1 = 128;\n /**\n * The size of the Xing header MPEG-2, bit rate in kbps.\n */\n var XING_BITRATE2 = 64;\n /**\n * The size of the Xing header MPEG-2.5, bit rate in kbps.\n */\n var XING_BITRATE25 = 32;\n\n /**\n * ISO-8859-1 charset for byte to string operations.\n */\n var ISO_8859_1 = null; //Charset.forName(\"ISO-8859-1\");\n\n /**\n * VBR header magic string.\n */\n var VBRTag0 = \"Xing\";\n /**\n * VBR header magic string (VBR == VBRMode.vbr_off).\n */\n var VBRTag1 = \"Info\";\n\n /**\n * Lookup table for fast CRC-16 computation. Uses the polynomial\n * x^16+x^15+x^2+1\n */\n var crc16Lookup = [0x0000, 0xC0C1, 0xC181, 0x0140,\n 0xC301, 0x03C0, 0x0280, 0xC241, 0xC601, 0x06C0, 0x0780, 0xC741,\n 0x0500, 0xC5C1, 0xC481, 0x0440, 0xCC01, 0x0CC0, 0x0D80, 0xCD41,\n 0x0F00, 0xCFC1, 0xCE81, 0x0E40, 0x0A00, 0xCAC1, 0xCB81, 0x0B40,\n 0xC901, 0x09C0, 0x0880, 0xC841, 0xD801, 0x18C0, 0x1980, 0xD941,\n 0x1B00, 0xDBC1, 0xDA81, 0x1A40, 0x1E00, 0xDEC1, 0xDF81, 0x1F40,\n 0xDD01, 0x1DC0, 0x1C80, 0xDC41, 0x1400, 0xD4C1, 0xD581, 0x1540,\n 0xD701, 0x17C0, 0x1680, 0xD641, 0xD201, 0x12C0, 0x1380, 0xD341,\n 0x1100, 0xD1C1, 0xD081, 0x1040, 0xF001, 0x30C0, 0x3180, 0xF141,\n 0x3300, 0xF3C1, 0xF281, 0x3240, 0x3600, 0xF6C1, 0xF781, 0x3740,\n 0xF501, 0x35C0, 0x3480, 0xF441, 0x3C00, 0xFCC1, 0xFD81, 0x3D40,\n 0xFF01, 0x3FC0, 0x3E80, 0xFE41, 0xFA01, 0x3AC0, 0x3B80, 0xFB41,\n 0x3900, 0xF9C1, 0xF881, 0x3840, 0x2800, 0xE8C1, 0xE981, 0x2940,\n 0xEB01, 0x2BC0, 0x2A80, 0xEA41, 0xEE01, 0x2EC0, 0x2F80, 0xEF41,\n 0x2D00, 0xEDC1, 0xEC81, 0x2C40, 0xE401, 0x24C0, 0x2580, 0xE541,\n 0x2700, 0xE7C1, 0xE681, 0x2640, 0x2200, 0xE2C1, 0xE381, 0x2340,\n 0xE101, 0x21C0, 0x2080, 0xE041, 0xA001, 0x60C0, 0x6180, 0xA141,\n 0x6300, 0xA3C1, 0xA281, 0x6240, 0x6600, 0xA6C1, 0xA781, 0x6740,\n 0xA501, 0x65C0, 0x6480, 0xA441, 0x6C00, 0xACC1, 0xAD81, 0x6D40,\n 0xAF01, 0x6FC0, 0x6E80, 0xAE41, 0xAA01, 0x6AC0, 0x6B80, 0xAB41,\n 0x6900, 0xA9C1, 0xA881, 0x6840, 0x7800, 0xB8C1, 0xB981, 0x7940,\n 0xBB01, 0x7BC0, 0x7A80, 0xBA41, 0xBE01, 0x7EC0, 0x7F80, 0xBF41,\n 0x7D00, 0xBDC1, 0xBC81, 0x7C40, 0xB401, 0x74C0, 0x7580, 0xB541,\n 0x7700, 0xB7C1, 0xB681, 0x7640, 0x7200, 0xB2C1, 0xB381, 0x7340,\n 0xB101, 0x71C0, 0x7080, 0xB041, 0x5000, 0x90C1, 0x9181, 0x5140,\n 0x9301, 0x53C0, 0x5280, 0x9241, 0x9601, 0x56C0, 0x5780, 0x9741,\n 0x5500, 0x95C1, 0x9481, 0x5440, 0x9C01, 0x5CC0, 0x5D80, 0x9D41,\n 0x5F00, 0x9FC1, 0x9E81, 0x5E40, 0x5A00, 0x9AC1, 0x9B81, 0x5B40,\n 0x9901, 0x59C0, 0x5880, 0x9841, 0x8801, 0x48C0, 0x4980, 0x8941,\n 0x4B00, 0x8BC1, 0x8A81, 0x4A40, 0x4E00, 0x8EC1, 0x8F81, 0x4F40,\n 0x8D01, 0x4DC0, 0x4C80, 0x8C41, 0x4400, 0x84C1, 0x8581, 0x4540,\n 0x8701, 0x47C0, 0x4680, 0x8641, 0x8201, 0x42C0, 0x4380, 0x8341,\n 0x4100, 0x81C1, 0x8081, 0x4040];\n\n /***********************************************************************\n * Robert Hegemann 2001-01-17\n ***********************************************************************/\n\n function addVbr(v, bitrate) {\n v.nVbrNumFrames++;\n v.sum += bitrate;\n v.seen++;\n\n if (v.seen < v.want) {\n return;\n }\n\n if (v.pos < v.size) {\n v.bag[v.pos] = v.sum;\n v.pos++;\n v.seen = 0;\n }\n if (v.pos == v.size) {\n for (var i = 1; i < v.size; i += 2) {\n v.bag[i / 2] = v.bag[i];\n }\n v.want *= 2;\n v.pos /= 2;\n }\n }\n\n function xingSeekTable(v, t) {\n if (v.pos <= 0)\n return;\n\n for (var i = 1; i < NUMTOCENTRIES; ++i) {\n var j = i / NUMTOCENTRIES, act, sum;\n var indx = 0 | (Math.floor(j * v.pos));\n if (indx > v.pos - 1)\n indx = v.pos - 1;\n act = v.bag[indx];\n sum = v.sum;\n var seek_point = 0 | (256. * act / sum);\n if (seek_point > 255)\n seek_point = 255;\n t[i] = 0xff & seek_point;\n }\n }\n\n /**\n * Add VBR entry, used to fill the VBR TOC entries.\n *\n * @param gfp\n * global flags\n */\n this.addVbrFrame = function (gfp) {\n var gfc = gfp.internal_flags;\n var kbps = Tables.bitrate_table[gfp.version][gfc.bitrate_index];\n assert(gfc.VBR_seek_table.bag != null);\n addVbr(gfc.VBR_seek_table, kbps);\n }\n\n /**\n * Read big endian integer (4-bytes) from header.\n *\n * @param buf\n * header containing the integer\n * @param bufPos\n * offset into the header\n * @return extracted integer\n */\n function extractInteger(buf, bufPos) {\n var x = buf[bufPos + 0] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 1] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 2] & 0xff;\n x <<= 8;\n x |= buf[bufPos + 3] & 0xff;\n return x;\n }\n\n /**\n * Write big endian integer (4-bytes) in the header.\n *\n * @param buf\n * header to write the integer into\n * @param bufPos\n * offset into the header\n * @param value\n * integer value to write\n */\n function createInteger(buf, bufPos, value) {\n buf[bufPos + 0] = 0xff & ((value >> 24) & 0xff);\n buf[bufPos + 1] = 0xff & ((value >> 16) & 0xff);\n buf[bufPos + 2] = 0xff & ((value >> 8) & 0xff);\n buf[bufPos + 3] = 0xff & (value & 0xff);\n }\n\n /**\n * Write big endian short (2-bytes) in the header.\n *\n * @param buf\n * header to write the integer into\n * @param bufPos\n * offset into the header\n * @param value\n * integer value to write\n */\n function createShort(buf, bufPos, value) {\n buf[bufPos + 0] = 0xff & ((value >> 8) & 0xff);\n buf[bufPos + 1] = 0xff & (value & 0xff);\n }\n\n /**\n * Check for magic strings (Xing/Info).\n *\n * @param buf\n * header to check\n * @param bufPos\n * header offset to check\n * @return magic string found\n */\n function isVbrTag(buf, bufPos) {\n return new String(buf, bufPos, VBRTag0.length(), ISO_8859_1)\n .equals(VBRTag0)\n || new String(buf, bufPos, VBRTag1.length(), ISO_8859_1)\n .equals(VBRTag1);\n }\n\n function shiftInBitsValue(x, n, v) {\n return 0xff & ((x << n) | (v & ~(-1 << n)));\n }\n\n /**\n * Construct the MP3 header using the settings of the global flags.\n *\n * \n *\n * @param gfp\n * global flags\n * @param buffer\n * header\n */\n function setLameTagFrameHeader(gfp, buffer) {\n var gfc = gfp.internal_flags;\n\n // MP3 Sync Word\n buffer[0] = shiftInBitsValue(buffer[0], 8, 0xff);\n\n buffer[1] = shiftInBitsValue(buffer[1], 3, 7);\n buffer[1] = shiftInBitsValue(buffer[1], 1,\n (gfp.out_samplerate < 16000) ? 0 : 1);\n // Version\n buffer[1] = shiftInBitsValue(buffer[1], 1, gfp.version);\n // 01 == Layer 3\n buffer[1] = shiftInBitsValue(buffer[1], 2, 4 - 3);\n // Error protection\n buffer[1] = shiftInBitsValue(buffer[1], 1, (!gfp.error_protection) ? 1\n : 0);\n\n // Bit rate\n buffer[2] = shiftInBitsValue(buffer[2], 4, gfc.bitrate_index);\n // Frequency\n buffer[2] = shiftInBitsValue(buffer[2], 2, gfc.samplerate_index);\n // Pad. Bit\n buffer[2] = shiftInBitsValue(buffer[2], 1, 0);\n // Priv. Bit\n buffer[2] = shiftInBitsValue(buffer[2], 1, gfp.extension);\n\n // Mode\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfp.mode.ordinal());\n // Mode extension (Used with Joint Stereo)\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfc.mode_ext);\n // Copy\n buffer[3] = shiftInBitsValue(buffer[3], 1, gfp.copyright);\n // Original\n buffer[3] = shiftInBitsValue(buffer[3], 1, gfp.original);\n // Emphasis\n buffer[3] = shiftInBitsValue(buffer[3], 2, gfp.emphasis);\n\n /* the default VBR header. 48 kbps layer III, no padding, no crc */\n /* but sampling freq, mode and copyright/copy protection taken */\n /* from first valid frame */\n buffer[0] = 0xff;\n var abyte = 0xff & (buffer[1] & 0xf1);\n var bitrate;\n if (1 == gfp.version) {\n bitrate = XING_BITRATE1;\n } else {\n if (gfp.out_samplerate < 16000)\n bitrate = XING_BITRATE25;\n else\n bitrate = XING_BITRATE2;\n }\n\n if (gfp.VBR == VbrMode.vbr_off)\n bitrate = gfp.brate;\n\n var bbyte;\n if (gfp.free_format)\n bbyte = 0x00;\n else\n bbyte = 0xff & (16 * lame.BitrateIndex(bitrate, gfp.version,\n gfp.out_samplerate));\n\n /*\n * Use as much of the info from the real frames in the Xing header:\n * samplerate, channels, crc, etc...\n */\n if (gfp.version == 1) {\n /* MPEG1 */\n buffer[1] = 0xff & (abyte | 0x0a);\n /* was 0x0b; */\n abyte = 0xff & (buffer[2] & 0x0d);\n /* AF keep also private bit */\n buffer[2] = 0xff & (bbyte | abyte);\n /* 64kbs MPEG1 frame */\n } else {\n /* MPEG2 */\n buffer[1] = 0xff & (abyte | 0x02);\n /* was 0x03; */\n abyte = 0xff & (buffer[2] & 0x0d);\n /* AF keep also private bit */\n buffer[2] = 0xff & (bbyte | abyte);\n /* 64kbs MPEG2 frame */\n }\n }\n\n /**\n * Get VBR tag information\n *\n * @param buf\n * header to analyze\n * @param bufPos\n * offset into the header\n * @return VBR tag data\n */\n this.getVbrTag = function (buf) {\n var pTagData = new VBRTagData();\n var bufPos = 0;\n\n /* get Vbr header data */\n pTagData.flags = 0;\n\n /* get selected MPEG header data */\n var hId = (buf[bufPos + 1] >> 3) & 1;\n var hSrIndex = (buf[bufPos + 2] >> 2) & 3;\n var hMode = (buf[bufPos + 3] >> 6) & 3;\n var hBitrate = ((buf[bufPos + 2] >> 4) & 0xf);\n hBitrate = Tables.bitrate_table[hId][hBitrate];\n\n /* check for FFE syncword */\n if ((buf[bufPos + 1] >> 4) == 0xE)\n pTagData.samprate = Tables.samplerate_table[2][hSrIndex];\n else\n pTagData.samprate = Tables.samplerate_table[hId][hSrIndex];\n\n /* determine offset of header */\n if (hId != 0) {\n /* mpeg1 */\n if (hMode != 3)\n bufPos += (32 + 4);\n else\n bufPos += (17 + 4);\n } else {\n /* mpeg2 */\n if (hMode != 3)\n bufPos += (17 + 4);\n else\n bufPos += (9 + 4);\n }\n\n if (!isVbrTag(buf, bufPos))\n return null;\n\n bufPos += 4;\n\n pTagData.hId = hId;\n\n /* get flags */\n var head_flags = pTagData.flags = extractInteger(buf, bufPos);\n bufPos += 4;\n\n if ((head_flags & FRAMES_FLAG) != 0) {\n pTagData.frames = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n if ((head_flags & BYTES_FLAG) != 0) {\n pTagData.bytes = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n if ((head_flags & TOC_FLAG) != 0) {\n if (pTagData.toc != null) {\n for (var i = 0; i < NUMTOCENTRIES; i++)\n pTagData.toc[i] = buf[bufPos + i];\n }\n bufPos += NUMTOCENTRIES;\n }\n\n pTagData.vbrScale = -1;\n\n if ((head_flags & VBR_SCALE_FLAG) != 0) {\n pTagData.vbrScale = extractInteger(buf, bufPos);\n bufPos += 4;\n }\n\n pTagData.headersize = ((hId + 1) * 72000 * hBitrate)\n / pTagData.samprate;\n\n bufPos += 21;\n var encDelay = buf[bufPos + 0] << 4;\n encDelay += buf[bufPos + 1] >> 4;\n var encPadding = (buf[bufPos + 1] & 0x0F) << 8;\n encPadding += buf[bufPos + 2] & 0xff;\n /* check for reasonable values (this may be an old Xing header, */\n /* not a INFO tag) */\n if (encDelay < 0 || encDelay > 3000)\n encDelay = -1;\n if (encPadding < 0 || encPadding > 3000)\n encPadding = -1;\n\n pTagData.encDelay = encDelay;\n pTagData.encPadding = encPadding;\n\n /* success */\n return pTagData;\n }\n\n /**\n * Initializes the header\n *\n * @param gfp\n * global flags\n */\n this.InitVbrTag = function (gfp) {\n var gfc = gfp.internal_flags;\n\n /**\n *
\n         * Xing VBR pretends to be a 48kbs layer III frame.  (at 44.1kHz).\n         * (at 48kHz they use 56kbs since 48kbs frame not big enough for\n         * table of contents)\n         * let's always embed Xing header inside a 64kbs layer III frame.\n         * this gives us enough room for a LAME version string too.\n         * size determined by sampling frequency (MPEG1)\n         * 32kHz:    216 bytes@48kbs    288bytes@ 64kbs\n         * 44.1kHz:  156 bytes          208bytes@64kbs     (+1 if padding = 1)\n         * 48kHz:    144 bytes          192\n         *\n         * MPEG 2 values are the same since the framesize and samplerate\n         * are each reduced by a factor of 2.\n         * 
\n */\n var kbps_header;\n if (1 == gfp.version) {\n kbps_header = XING_BITRATE1;\n } else {\n if (gfp.out_samplerate < 16000)\n kbps_header = XING_BITRATE25;\n else\n kbps_header = XING_BITRATE2;\n }\n\n if (gfp.VBR == VbrMode.vbr_off)\n kbps_header = gfp.brate;\n\n // make sure LAME Header fits into Frame\n var totalFrameSize = ((gfp.version + 1) * 72000 * kbps_header)\n / gfp.out_samplerate;\n var headerSize = (gfc.sideinfo_len + LAMEHEADERSIZE);\n gfc.VBR_seek_table.TotalFrameSize = totalFrameSize;\n if (totalFrameSize < headerSize || totalFrameSize > MAXFRAMESIZE) {\n /* disable tag, it wont fit */\n gfp.bWriteVbrTag = false;\n return;\n }\n\n gfc.VBR_seek_table.nVbrNumFrames = 0;\n gfc.VBR_seek_table.nBytesWritten = 0;\n gfc.VBR_seek_table.sum = 0;\n\n gfc.VBR_seek_table.seen = 0;\n gfc.VBR_seek_table.want = 1;\n gfc.VBR_seek_table.pos = 0;\n\n if (gfc.VBR_seek_table.bag == null) {\n gfc.VBR_seek_table.bag = new int[400];\n gfc.VBR_seek_table.size = 400;\n }\n\n // write dummy VBR tag of all 0's into bitstream\n var buffer = new_byte(MAXFRAMESIZE);\n\n setLameTagFrameHeader(gfp, buffer);\n var n = gfc.VBR_seek_table.TotalFrameSize;\n for (var i = 0; i < n; ++i) {\n bs.add_dummy_byte(gfp, buffer[i] & 0xff, 1);\n }\n }\n\n /**\n * Fast CRC-16 computation (uses table crc16Lookup).\n *\n * @param value\n * @param crc\n * @return\n */\n function crcUpdateLookup(value, crc) {\n var tmp = crc ^ value;\n crc = (crc >> 8) ^ crc16Lookup[tmp & 0xff];\n return crc;\n }\n\n this.updateMusicCRC = function (crc, buffer, bufferPos, size) {\n for (var i = 0; i < size; ++i)\n crc[0] = crcUpdateLookup(buffer[bufferPos + i], crc[0]);\n }\n\n /**\n * Write LAME info: mini version + info on various switches used (Jonathan\n * Dee 2001/08/31).\n *\n * @param gfp\n * global flags\n * @param musicLength\n * music length\n * @param streamBuffer\n * pointer to output buffer\n * @param streamBufferPos\n * offset into the output buffer\n * @param crc\n * computation of CRC-16 of Lame Tag so far (starting at frame\n * sync)\n * @return number of bytes written to the stream\n */\n function putLameVBR(gfp, musicLength, streamBuffer, streamBufferPos, crc) {\n var gfc = gfp.internal_flags;\n var bytesWritten = 0;\n\n /* encoder delay */\n var encDelay = gfp.encoder_delay;\n /* encoder padding */\n var encPadding = gfp.encoder_padding;\n\n /* recall: gfp.VBR_q is for example set by the switch -V */\n /* gfp.quality by -q, -h, -f, etc */\n var quality = (100 - 10 * gfp.VBR_q - gfp.quality);\n\n var version = v.getLameVeryShortVersion();\n var vbr;\n var revision = 0x00;\n var revMethod;\n // numbering different in vbr_mode vs. Lame tag\n var vbrTypeTranslator = [1, 5, 3, 2, 4, 0, 3];\n var lowpass = 0 | (((gfp.lowpassfreq / 100.0) + .5) > 255 ? 255\n : (gfp.lowpassfreq / 100.0) + .5);\n var peakSignalAmplitude = 0;\n var radioReplayGain = 0;\n var audiophileReplayGain = 0;\n var noiseShaping = gfp.internal_flags.noise_shaping;\n var stereoMode = 0;\n var nonOptimal = 0;\n var sourceFreq = 0;\n var misc = 0;\n var musicCRC = 0;\n\n // psy model type: Gpsycho or NsPsytune\n var expNPsyTune = (gfp.exp_nspsytune & 1) != 0;\n var safeJoint = (gfp.exp_nspsytune & 2) != 0;\n var noGapMore = false;\n var noGapPrevious = false;\n var noGapCount = gfp.internal_flags.nogap_total;\n var noGapCurr = gfp.internal_flags.nogap_current;\n\n // 4 bits\n var athType = gfp.ATHtype;\n var flags = 0;\n\n // vbr modes\n var abrBitrate;\n switch (gfp.VBR) {\n case vbr_abr:\n abrBitrate = gfp.VBR_mean_bitrate_kbps;\n break;\n case vbr_off:\n abrBitrate = gfp.brate;\n break;\n default:\n abrBitrate = gfp.VBR_min_bitrate_kbps;\n }\n\n // revision and vbr method\n if (gfp.VBR.ordinal() < vbrTypeTranslator.length)\n vbr = vbrTypeTranslator[gfp.VBR.ordinal()];\n else\n vbr = 0x00; // unknown\n\n revMethod = 0x10 * revision + vbr;\n\n // ReplayGain\n if (gfc.findReplayGain) {\n if (gfc.RadioGain > 0x1FE)\n gfc.RadioGain = 0x1FE;\n if (gfc.RadioGain < -0x1FE)\n gfc.RadioGain = -0x1FE;\n\n // set name code\n radioReplayGain = 0x2000;\n // set originator code to `determined automatically'\n radioReplayGain |= 0xC00;\n\n if (gfc.RadioGain >= 0) {\n // set gain adjustment\n radioReplayGain |= gfc.RadioGain;\n } else {\n // set the sign bit\n radioReplayGain |= 0x200;\n // set gain adjustment\n radioReplayGain |= -gfc.RadioGain;\n }\n }\n\n // peak sample\n if (gfc.findPeakSample)\n peakSignalAmplitude = Math\n .abs(0 | ((( gfc.PeakSample) / 32767.0) * Math.pow(2, 23) + .5));\n\n // nogap\n if (noGapCount != -1) {\n if (noGapCurr > 0)\n noGapPrevious = true;\n\n if (noGapCurr < noGapCount - 1)\n noGapMore = true;\n }\n\n // flags\n flags = athType + ((expNPsyTune ? 1 : 0) << 4)\n + ((safeJoint ? 1 : 0) << 5) + ((noGapMore ? 1 : 0) << 6)\n + ((noGapPrevious ? 1 : 0) << 7);\n\n if (quality < 0)\n quality = 0;\n\n // stereo mode field (Intensity stereo is not implemented)\n switch (gfp.mode) {\n case MONO:\n stereoMode = 0;\n break;\n case STEREO:\n stereoMode = 1;\n break;\n case DUAL_CHANNEL:\n stereoMode = 2;\n break;\n case JOINT_STEREO:\n if (gfp.force_ms)\n stereoMode = 4;\n else\n stereoMode = 3;\n break;\n case NOT_SET:\n //$FALL-THROUGH$\n default:\n stereoMode = 7;\n break;\n }\n\n if (gfp.in_samplerate <= 32000)\n sourceFreq = 0x00;\n else if (gfp.in_samplerate == 48000)\n sourceFreq = 0x02;\n else if (gfp.in_samplerate > 48000)\n sourceFreq = 0x03;\n else {\n // default is 44100Hz\n sourceFreq = 0x01;\n }\n\n // Check if the user overrided the default LAME behavior with some\n // nasty options\n if (gfp.short_blocks == ShortBlock.short_block_forced\n || gfp.short_blocks == ShortBlock.short_block_dispensed\n || ((gfp.lowpassfreq == -1) && (gfp.highpassfreq == -1)) || /* \"-k\" */\n (gfp.scale_left < gfp.scale_right)\n || (gfp.scale_left > gfp.scale_right)\n || (gfp.disable_reservoir && gfp.brate < 320) || gfp.noATH\n || gfp.ATHonly || (athType == 0) || gfp.in_samplerate <= 32000)\n nonOptimal = 1;\n\n misc = noiseShaping + (stereoMode << 2) + (nonOptimal << 5)\n + (sourceFreq << 6);\n\n musicCRC = gfc.nMusicCRC;\n\n // Write all this information into the stream\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten, quality);\n bytesWritten += 4;\n\n for (var j = 0; j < 9; j++) {\n streamBuffer[streamBufferPos + bytesWritten + j] = 0xff & version .charAt(j);\n }\n bytesWritten += 9;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & revMethod;\n bytesWritten++;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & lowpass;\n bytesWritten++;\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten,\n peakSignalAmplitude);\n bytesWritten += 4;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten,\n radioReplayGain);\n bytesWritten += 2;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten,\n audiophileReplayGain);\n bytesWritten += 2;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & flags;\n bytesWritten++;\n\n if (abrBitrate >= 255)\n streamBuffer[streamBufferPos + bytesWritten] = 0xFF;\n else\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & abrBitrate;\n bytesWritten++;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & (encDelay >> 4);\n streamBuffer[streamBufferPos + bytesWritten + 1] = 0xff & ((encDelay << 4) + (encPadding >> 8));\n streamBuffer[streamBufferPos + bytesWritten + 2] = 0xff & encPadding;\n\n bytesWritten += 3;\n\n streamBuffer[streamBufferPos + bytesWritten] = 0xff & misc;\n bytesWritten++;\n\n // unused in rev0\n streamBuffer[streamBufferPos + bytesWritten++] = 0;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, gfp.preset);\n bytesWritten += 2;\n\n createInteger(streamBuffer, streamBufferPos + bytesWritten, musicLength);\n bytesWritten += 4;\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, musicCRC);\n bytesWritten += 2;\n\n // Calculate tag CRC.... must be done here, since it includes previous\n // information\n\n for (var i = 0; i < bytesWritten; i++)\n crc = crcUpdateLookup(streamBuffer[streamBufferPos + i], crc);\n\n createShort(streamBuffer, streamBufferPos + bytesWritten, crc);\n bytesWritten += 2;\n\n return bytesWritten;\n }\n\n function skipId3v2(fpStream) {\n // seek to the beginning of the stream\n fpStream.seek(0);\n // read 10 bytes in case there's an ID3 version 2 header here\n var id3v2Header = new_byte(10);\n fpStream.readFully(id3v2Header);\n /* does the stream begin with the ID3 version 2 file identifier? */\n var id3v2TagSize;\n if (!new String(id3v2Header, \"ISO-8859-1\").startsWith(\"ID3\")) {\n /*\n * the tag size (minus the 10-byte header) is encoded into four\n * bytes where the most significant bit is clear in each byte\n */\n id3v2TagSize = (((id3v2Header[6] & 0x7f) << 21)\n | ((id3v2Header[7] & 0x7f) << 14)\n | ((id3v2Header[8] & 0x7f) << 7) | (id3v2Header[9] & 0x7f))\n + id3v2Header.length;\n } else {\n /* no ID3 version 2 tag in this stream */\n id3v2TagSize = 0;\n }\n return id3v2TagSize;\n }\n\n this.getLameTagFrame = function (gfp, buffer) {\n var gfc = gfp.internal_flags;\n\n if (!gfp.bWriteVbrTag) {\n return 0;\n }\n if (gfc.Class_ID != Lame.LAME_ID) {\n return 0;\n }\n if (gfc.VBR_seek_table.pos <= 0) {\n return 0;\n }\n if (buffer.length < gfc.VBR_seek_table.TotalFrameSize) {\n return gfc.VBR_seek_table.TotalFrameSize;\n }\n\n Arrays.fill(buffer, 0, gfc.VBR_seek_table.TotalFrameSize, 0);\n\n // 4 bytes frame header\n setLameTagFrameHeader(gfp, buffer);\n\n // Create TOC entries\n var toc = new_byte(NUMTOCENTRIES);\n\n if (gfp.free_format) {\n for (var i = 1; i < NUMTOCENTRIES; ++i)\n toc[i] = 0xff & (255 * i / 100);\n } else {\n xingSeekTable(gfc.VBR_seek_table, toc);\n }\n\n // Start writing the tag after the zero frame\n var streamIndex = gfc.sideinfo_len;\n /**\n * Note: Xing header specifies that Xing data goes in the ancillary data\n * with NO ERROR PROTECTION. If error protecton in enabled, the Xing\n * data still starts at the same offset, and now it is in sideinfo data\n * block, and thus will not decode correctly by non-Xing tag aware\n * players\n */\n if (gfp.error_protection)\n streamIndex -= 2;\n\n // Put Vbr tag\n if (gfp.VBR == VbrMode.vbr_off) {\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(0);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(1);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(2);\n buffer[streamIndex++] = 0xff & VBRTag1.charAt(3);\n\n } else {\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(0);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(1);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(2);\n buffer[streamIndex++] = 0xff & VBRTag0.charAt(3);\n }\n\n // Put header flags\n createInteger(buffer, streamIndex, FRAMES_FLAG + BYTES_FLAG + TOC_FLAG\n + VBR_SCALE_FLAG);\n streamIndex += 4;\n\n // Put Total Number of frames\n createInteger(buffer, streamIndex, gfc.VBR_seek_table.nVbrNumFrames);\n streamIndex += 4;\n\n // Put total audio stream size, including Xing/LAME Header\n var streamSize = (gfc.VBR_seek_table.nBytesWritten + gfc.VBR_seek_table.TotalFrameSize);\n createInteger(buffer, streamIndex, 0 | streamSize);\n streamIndex += 4;\n\n /* Put TOC */\n System.arraycopy(toc, 0, buffer, streamIndex, toc.length);\n streamIndex += toc.length;\n\n if (gfp.error_protection) {\n // (jo) error_protection: add crc16 information to header\n bs.CRC_writeheader(gfc, buffer);\n }\n\n // work out CRC so far: initially crc = 0\n var crc = 0x00;\n for (var i = 0; i < streamIndex; i++)\n crc = crcUpdateLookup(buffer[i], crc);\n // Put LAME VBR info\n streamIndex += putLameVBR(gfp, streamSize, buffer, streamIndex, crc);\n\n return gfc.VBR_seek_table.TotalFrameSize;\n }\n\n /**\n * Write final VBR tag to the file.\n *\n * @param gfp\n * global flags\n * @param stream\n * stream to add the VBR tag to\n * @return 0 (OK), -1 else\n * @throws IOException\n * I/O error\n */\n this.putVbrTag = function (gfp, stream) {\n var gfc = gfp.internal_flags;\n\n if (gfc.VBR_seek_table.pos <= 0)\n return -1;\n\n // Seek to end of file\n stream.seek(stream.length());\n\n // Get file size, abort if file has zero length.\n if (stream.length() == 0)\n return -1;\n\n // The VBR tag may NOT be located at the beginning of the stream. If an\n // ID3 version 2 tag was added, then it must be skipped to write the VBR\n // tag data.\n var id3v2TagSize = skipId3v2(stream);\n\n // Seek to the beginning of the stream\n stream.seek(id3v2TagSize);\n\n var buffer = new_byte(MAXFRAMESIZE);\n var bytes = getLameTagFrame(gfp, buffer);\n if (bytes > buffer.length) {\n return -1;\n }\n\n if (bytes < 1) {\n return 0;\n }\n\n // Put it all to disk again\n stream.write(buffer, 0, bytes);\n // success\n return 0;\n }\n\n}\n\nmodule.exports = VBRTag;\n","var common = require('./common.js');\nvar System = common.System;\nvar VbrMode = common.VbrMode;\nvar Float = common.Float;\nvar ShortBlock = common.ShortBlock;\nvar Util = common.Util;\nvar Arrays = common.Arrays;\nvar new_array_n = common.new_array_n;\nvar new_byte = common.new_byte;\nvar new_double = common.new_double;\nvar new_float = common.new_float;\nvar new_float_n = common.new_float_n;\nvar new_int = common.new_int;\nvar new_int_n = common.new_int_n;\nvar assert = common.assert;\n\nLame = require('./Lame.js');\nPresets = require('./Presets.js');\nGainAnalysis = require('./GainAnalysis.js');\nQuantizePVT = require('./QuantizePVT.js');\nQuantize = require('./Quantize.js');\nTakehiro = require('./Takehiro.js');\nReservoir = require('./Reservoir.js');\nMPEGMode = require('./MPEGMode.js');\nBitStream = require('./BitStream.js');\nvar Encoder = require('./Encoder.js');\nvar Version = require('./Version.js');\nvar VBRTag = require('./VBRTag.js');\n\nfunction GetAudio() {\n var parse;\n var mpg;\n\n this.setModules = function (parse2, mpg2) {\n parse = parse2;\n mpg = mpg2;\n }\n}\n\n\nfunction Parse() {\n var ver;\n var id3;\n var pre;\n\n this.setModules = function (ver2, id32, pre2) {\n ver = ver2;\n id3 = id32;\n pre = pre2;\n }\n}\n\nfunction MPGLib() {\n}\n\nfunction ID3Tag() {\n var bits;\n var ver;\n\n this.setModules = function (_bits, _ver) {\n bits = _bits;\n ver = _ver;\n }\n}\n\nfunction Mp3Encoder(channels, samplerate, kbps) {\n if (arguments.length != 3) {\n console.error('WARN: Mp3Encoder(channels, samplerate, kbps) not specified');\n channels = 1;\n samplerate = 44100;\n kbps = 128;\n }\n var lame = new Lame();\n var gaud = new GetAudio();\n var ga = new GainAnalysis();\n var bs = new BitStream();\n var p = new Presets();\n var qupvt = new QuantizePVT();\n var qu = new Quantize();\n var vbr = new VBRTag();\n var ver = new Version();\n var id3 = new ID3Tag();\n var rv = new Reservoir();\n var tak = new Takehiro();\n var parse = new Parse();\n var mpg = new MPGLib();\n\n lame.setModules(ga, bs, p, qupvt, qu, vbr, ver, id3, mpg);\n bs.setModules(ga, mpg, ver, vbr);\n id3.setModules(bs, ver);\n p.setModules(lame);\n qu.setModules(bs, rv, qupvt, tak);\n qupvt.setModules(tak, rv, lame.enc.psy);\n rv.setModules(bs);\n tak.setModules(qupvt);\n vbr.setModules(lame, bs, ver);\n gaud.setModules(parse, mpg);\n parse.setModules(ver, id3, p);\n\n var gfp = lame.lame_init();\n\n gfp.num_channels = channels;\n gfp.in_samplerate = samplerate;\n gfp.brate = kbps;\n gfp.mode = MPEGMode.STEREO;\n gfp.quality = 3;\n gfp.bWriteVbrTag = false;\n gfp.disable_reservoir = true;\n gfp.write_id3tag_automatic = false;\n\n var retcode = lame.lame_init_params(gfp);\n assert(0 == retcode);\n var maxSamples = 1152;\n var mp3buf_size = 0 | (1.25 * maxSamples + 7200);\n var mp3buf = new_byte(mp3buf_size);\n\n this.encodeBuffer = function (left, right) {\n if (channels == 1) {\n right = left;\n }\n assert(left.length == right.length);\n if (left.length > maxSamples) {\n maxSamples = left.length;\n mp3buf_size = 0 | (1.25 * maxSamples + 7200);\n mp3buf = new_byte(mp3buf_size);\n }\n\n var _sz = lame.lame_encode_buffer(gfp, left, right, left.length, mp3buf, 0, mp3buf_size);\n return new Int8Array(mp3buf.subarray(0, _sz));\n };\n\n this.flush = function () {\n var _sz = lame.lame_encode_flush(gfp, mp3buf, 0, mp3buf_size);\n return new Int8Array(mp3buf.subarray(0, _sz));\n };\n}\n\nfunction WavHeader() {\n this.dataOffset = 0;\n this.dataLen = 0;\n this.channels = 0;\n this.sampleRate = 0;\n}\n\nfunction fourccToInt(fourcc) {\n return fourcc.charCodeAt(0) << 24 | fourcc.charCodeAt(1) << 16 | fourcc.charCodeAt(2) << 8 | fourcc.charCodeAt(3);\n}\n\nWavHeader.RIFF = fourccToInt(\"RIFF\");\nWavHeader.WAVE = fourccToInt(\"WAVE\");\nWavHeader.fmt_ = fourccToInt(\"fmt \");\nWavHeader.data = fourccToInt(\"data\");\n\nWavHeader.readHeader = function (dataView) {\n var w = new WavHeader();\n\n var header = dataView.getUint32(0, false);\n if (WavHeader.RIFF != header) {\n return;\n }\n var fileLen = dataView.getUint32(4, true);\n if (WavHeader.WAVE != dataView.getUint32(8, false)) {\n return;\n }\n if (WavHeader.fmt_ != dataView.getUint32(12, false)) {\n return;\n }\n var fmtLen = dataView.getUint32(16, true);\n var pos = 16 + 4;\n switch (fmtLen) {\n case 16:\n case 18:\n w.channels = dataView.getUint16(pos + 2, true);\n w.sampleRate = dataView.getUint32(pos + 4, true);\n break;\n default:\n throw 'extended fmt chunk not implemented';\n }\n pos += fmtLen;\n var data = WavHeader.data;\n var len = 0;\n while (data != header) {\n header = dataView.getUint32(pos, false);\n len = dataView.getUint32(pos + 4, true);\n if (data == header) {\n break;\n }\n pos += (len + 8);\n }\n w.dataLen = len;\n w.dataOffset = pos + 8;\n return w;\n};\n\nmodule.exports.Mp3Encoder = Mp3Encoder;\nmodule.exports.WavHeader = WavHeader;\n","import { Mp3Encoder } from 'lamejs';\n\nclass Encoder {\n constructor(config) {\n this.config = {\n sampleRate: 44100,\n bitRate: 128\n };\n\n Object.assign(this.config, config);\n\n this.mp3Encoder = new Mp3Encoder(\n 1,\n this.config.sampleRate,\n this.config.bitRate\n );\n\n // Audio is processed by frames of 1152 samples per audio channel\n // http://lame.sourceforge.net/tech-FAQ.txt\n this.maxSamples = 1152;\n\n this.samplesMono = null;\n this.clearBuffer();\n }\n\n /**\n * Clear active buffer\n */\n clearBuffer() {\n this.dataBuffer = [];\n }\n\n /**\n * Append new audio buffer to current active buffer\n * @param {Buffer} buffer\n */\n appendToBuffer(buffer) {\n this.dataBuffer.push(new Int8Array(buffer));\n }\n\n /**\n * Float current data to 16 bits PCM\n * @param {Float32Array} input\n * @param {Int16Array} output\n */\n floatTo16BitPCM(input, output) {\n for (let i = 0; i < input.length; i++) {\n const s = Math.max(-1, Math.min(1, input[i]));\n output[i] = (s < 0 ? s * 0x8000 : s * 0x7FFF);\n }\n }\n\n /**\n * Convert buffer to proper format\n * @param {Array} arrayBuffer\n */\n convertBuffer(arrayBuffer) {\n const data = new Float32Array(arrayBuffer);\n const out = new Int16Array(arrayBuffer.length);\n this.floatTo16BitPCM(data, out);\n\n return out;\n }\n\n /**\n * Encode and append current buffer to dataBuffer\n * @param {Array} arrayBuffer\n */\n encode(arrayBuffer) {\n this.samplesMono = this.convertBuffer(arrayBuffer);\n let remaining = this.samplesMono.length;\n\n for (let i = 0; remaining >= 0; i += this.maxSamples) {\n const left = this.samplesMono.subarray(i, i + this.maxSamples);\n const mp3buffer = this.mp3Encoder.encodeBuffer(left);\n this.appendToBuffer(mp3buffer);\n remaining -= this.maxSamples;\n }\n }\n\n /**\n * Return full dataBuffer\n */\n finish() {\n this.appendToBuffer(this.mp3Encoder.flush());\n\n return this.dataBuffer;\n }\n}\n\nexport default Encoder;\n","import Encoder from './encoder';\n\nclass MicRecorder {\n constructor(config) {\n this.config = {\n // 128 or 160 kbit/s – mid-range bitrate quality\n bitRate: 128,\n\n deviceId: null,\n // Encode to mp3 after finish recording\n // Encoding during recording may result in distorted audio\n // This could be crucial on mobile devices\n encodeAfterRecord: true,\n // There is a known issue with some macOS machines, where the recording\n // will sometimes have a loud 'pop' or 'pop-click' sound. This flag\n // prevents getting audio from the microphone a few milliseconds after\n // the beginning of the recording. It also helps to remove the mouse\n // \"click\" sound from the output mp3 file.\n startRecordingAt: 300,\n };\n\n this.activeStream = null;\n this.context = null;\n this.microphone = null;\n this.processor = null;\n this.startTime = 0;\n this.rawChunksBuffer = null;\n\n Object.assign(this.config, config);\n }\n\n /**\n * Starts to listen for the microphone sound\n * @param {MediaStream} stream\n */\n addMicrophoneListener(stream) {\n this.activeStream = stream;\n\n // This prevents the weird noise once you start listening to the microphone\n this.timerToStart = setTimeout(() => {\n delete this.timerToStart;\n }, this.config.startRecordingAt);\n\n // Set up Web Audio API to process data from the media stream (microphone).\n this.microphone = this.context.createMediaStreamSource(stream);\n\n // Settings a bufferSize of 0 instructs the browser to choose the best bufferSize\n this.processor = this.context.createScriptProcessor(0, 1, 1);\n\n // Add all buffers from LAME into an array.\n this.processor.onaudioprocess = (event) => {\n if (this.timerToStart) {\n return;\n }\n\n const rawChunk = event.inputBuffer.getChannelData(0);\n\n if (this.config.encodeAfterRecord) {\n // Save copy of raw chunk for future encoding\n this.rawChunksBuffer.push( Object.assign([], rawChunk));\n } else {\n // Send microphone data to LAME for MP3 encoding while recording.\n this.lameEncoder.encode(rawChunk);\n }\n };\n\n this.connectMicrophone();\n };\n\n /**\n * Requests access to the microphone and starts recording\n * @return Promise\n */\n initialize() {\n const { deviceId, encodeAfterRecord } = this.config;\n const AudioContext = window.AudioContext || window.webkitAudioContext;\n this.context = new AudioContext();\n this.config.sampleRate = this.context.sampleRate;\n this.rawChunksBuffer = encodeAfterRecord ? [] : null;\n this.lameEncoder = new Encoder(this.config);\n this.i = 0;\n\n const audio = deviceId ? { deviceId: { exact: deviceId } } : true;\n\n return new Promise((resolve, reject) => {\n navigator.mediaDevices.getUserMedia({ audio })\n .then(stream => {\n this.addMicrophoneListener(stream);\n resolve(stream);\n }).catch(function(err) {\n reject(err);\n });\n })\n };\n\n /**\n * Initializes or resumes recording\n * @return Promise\n */\n start() {\n if (!this.processor || !this.microphone) {\n return this.initialize();\n } else {\n this.connectMicrophone();\n return Promise.resolve();\n }\n }\n\n /**\n * Pause recording\n * @return Promise\n */\n pause() {\n this.disconnectMicrophone();\n return Promise.resolve();\n };\n\n /**\n * Start retrieving microphone data\n */\n connectMicrophone() {\n if (this.processor && this.microphone) {\n this.microphone.connect(this.processor);\n this.processor.connect(this.context.destination);\n }\n }\n\n /**\n * Stop retrieving microphone data\n */\n disconnectMicrophone() {\n if (this.processor && this.microphone) {\n this.microphone.disconnect();\n this.processor.disconnect();\n }\n }\n\n /**\n * Disconnect microphone, processor and remove activeStream\n * @return MicRecorder\n */\n stop() {\n if (this.processor && this.microphone) {\n // Clean up the Web Audio API resources.\n this.disconnectMicrophone();\n\n // If all references using this.context are destroyed, context is closed\n // automatically. DOMException is fired when trying to close again\n if (this.context && this.context.state !== 'closed') {\n this.context.close();\n }\n\n this.processor.onaudioprocess = null;\n\n // Stop all audio tracks. Also, removes recording icon from chrome tab\n this.activeStream.getAudioTracks().forEach(track => track.stop());\n this.processor = null;\n this.microphone = null;\n }\n\n return this;\n };\n\n /**\n * Return Mp3 Buffer and Blob with type mp3\n * @return Promise\n */\n getMp3() {\n if (this.config.encodeAfterRecord) {\n this.rawChunksBuffer.forEach((rawChunk) => {\n this.lameEncoder.encode(rawChunk);\n })\n this.rawChunksBuffer = null;\n }\n\n const finalBuffer = this.lameEncoder.finish();\n\n return new Promise((resolve, reject) => {\n if (finalBuffer.length === 0) {\n reject(new Error('No buffer to send'));\n } else {\n resolve([finalBuffer, new Blob(finalBuffer, { type: 'audio/mp3' })]);\n this.lameEncoder.clearBuffer();\n }\n });\n };\n}\n\nexport default MicRecorder;\n"],"names":["new_byte","new_int","new_float","new_double","new_float_n","new_int_n","new_array_n","Arrays","System","Util","ShortBlock","Float","VbrMode","assert","Encoder","III_psy_xmin","require$$0","require$$1","FFT","MPEGMode","L3Side","GrInfo","LameInternalFlags","IIISideInfo","ScaleFac","NsPsy","VBRSeekInfo","GainAnalysis","MeanBits","Tables","QuantizePVT","Takehiro","BitStream","new_short_n","Lame","PsyModel","LameGlobalFlags","ATH","ReplayGain","CBRNewIterationLoop","Presets","CalcNoiseResult","Quantize","VBRQuantize","CalcNoiseData","Reservoir","require$$2","require$$3","require$$4","require$$5","require$$6","require$$7","require$$8","VBRTag","Version","config","assign","mp3Encoder","Mp3Encoder","sampleRate","bitRate","maxSamples","samplesMono","clearBuffer","dataBuffer","buffer","push","Int8Array","input","output","i","length","s","Math","max","min","arrayBuffer","data","Float32Array","out","Int16Array","floatTo16BitPCM","convertBuffer","remaining","left","subarray","mp3buffer","encodeBuffer","appendToBuffer","flush","MicRecorder","activeStream","context","microphone","processor","startTime","rawChunksBuffer","stream","timerToStart","setTimeout","startRecordingAt","createMediaStreamSource","createScriptProcessor","onaudioprocess","event","rawChunk","inputBuffer","getChannelData","encodeAfterRecord","Object","lameEncoder","encode","connectMicrophone","deviceId","AudioContext","window","webkitAudioContext","audio","exact","Promise","resolve","reject","mediaDevices","getUserMedia","then","addMicrophoneListener","catch","err","initialize","disconnectMicrophone","connect","destination","disconnect","state","close","getAudioTracks","forEach","track","stop","finalBuffer","finish","Error","Blob","type"],"mappings":";;;;;;AAAA,SAASA,UAAQ,CAAC,KAAK,EAAE;IACrB,OAAO,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC;CAC/B;;AAED,SAAS,SAAS,CAAC,KAAK,EAAE;IACtB,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;;AAED,SAASC,SAAO,CAAC,KAAK,EAAE;IACpB,OAAO,IAAI,UAAU,CAAC,KAAK,CAAC,CAAC;CAChC;;AAED,SAASC,WAAS,CAAC,KAAK,EAAE;IACtB,OAAO,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;CAClC;;AAED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6B,UAAC/B,QAAD,EAAc;iBACpCK,WAAL,CAAiBC,MAAjB,CAAwBN,QAAxB;SADF;aAGKT,eAAL,GAAuB,IAAvB;;;UAGI2C,cAAc,KAAK7B,WAAL,CAAiB8B,MAAjB,EAApB;;aAEO,IAAIrB,OAAJ,CAAY,UAACC,OAAD,EAAUC,MAAV,EAAqB;YAClCkB,YAAYpE,MAAZ,KAAuB,CAA3B,EAA8B;iBACrB,IAAIsE,KAAJ,CAAU,mBAAV,CAAP;SADF,MAEO;kBACG,CAACF,WAAD,EAAc,IAAIG,IAAJ,CAASH,WAAT,EAAsB,EAAEI,MAAM,WAAR,EAAtB,CAAd,CAAR;iBACKjC,WAAL,CAAiB/C,WAAjB;;OALG,CAAP;;;;;;;;;;;;"} \ No newline at end of file diff --git a/samples/index.html b/samples/index.html index 680ea78..111224a 100644 --- a/samples/index.html +++ b/samples/index.html @@ -12,6 +12,14 @@

Mic Recorder to Mp3 Example


+
+ + Encode after record +
+ +
+
+ @@ -33,20 +41,29 @@

Mic Recorder to Mp3 Example

STOP: 'Stop recording' }; + const encodeAfterRecordCheck = document.getElementById('encode-after-record'); const startPauseButton = document.getElementById('start-pause'); const stopButton = document.getElementById('stop'); - const recorder = new MicRecorder({ - bitRate: 128 - }); + let recorder + initRecorder() startPauseButton.textContent = LABELS.START; stopButton.textContent = LABELS.STOP; + encodeAfterRecordCheck.addEventListener('change', initRecorder) startPauseButton.addEventListener('click', startRecording); stopButton.addEventListener('click', stopRecording); + function initRecorder() { + recorder = new MicRecorder({ + bitRate: 128, + encodeAfterRecordCheck: encodeAfterRecordCheck.checked + }); + } + function startRecording() { recorder.start().then(() => { + encodeAfterRecordCheck.disabled = true; startPauseButton.textContent = LABELS.PAUSE; startPauseButton.classList.add('btn-info'); stopButton.disabled = false; @@ -71,6 +88,7 @@

Mic Recorder to Mp3 Example

function stopRecording() { recorder.stop().getMp3().then(([buffer, blob]) => { console.log(buffer, blob); + encodeAfterRecordCheck.disabled = false; stopButton.disabled = true; const file = new File(buffer, 'music.mp3', { type: blob.type, diff --git a/src/encoder.js b/src/encoder.js index b99f2c1..313ce4f 100644 --- a/src/encoder.js +++ b/src/encoder.js @@ -86,6 +86,6 @@ class Encoder { return this.dataBuffer; } -}; +} export default Encoder; diff --git a/src/mic-recorder.js b/src/mic-recorder.js index ed7958a..ef71924 100644 --- a/src/mic-recorder.js +++ b/src/mic-recorder.js @@ -6,13 +6,17 @@ class MicRecorder { // 128 or 160 kbit/s – mid-range bitrate quality bitRate: 128, + deviceId: null, + // Encode to mp3 after finish recording + // Encoding during recording may result in distorted audio + // This could be crucial on mobile devices + encodeAfterRecord: true, // There is a known issue with some macOS machines, where the recording // will sometimes have a loud 'pop' or 'pop-click' sound. This flag // prevents getting audio from the microphone a few milliseconds after - // the begining of the recording. It also helps to remove the mouse + // the beginning of the recording. It also helps to remove the mouse // "click" sound from the output mp3 file. startRecordingAt: 300, - deviceId: null, }; this.activeStream = null; @@ -20,6 +24,7 @@ class MicRecorder { this.microphone = null; this.processor = null; this.startTime = 0; + this.rawChunksBuffer = null; Object.assign(this.config, config); } @@ -48,8 +53,15 @@ class MicRecorder { return; } - // Send microphone data to LAME for MP3 encoding while recording. - this.lameEncoder.encode(event.inputBuffer.getChannelData(0)); + const rawChunk = event.inputBuffer.getChannelData(0); + + if (this.config.encodeAfterRecord) { + // Save copy of raw chunk for future encoding + this.rawChunksBuffer.push( Object.assign([], rawChunk)); + } else { + // Send microphone data to LAME for MP3 encoding while recording. + this.lameEncoder.encode(rawChunk); + } }; this.connectMicrophone(); @@ -60,12 +72,15 @@ class MicRecorder { * @return Promise */ initialize() { + const { deviceId, encodeAfterRecord } = this.config; const AudioContext = window.AudioContext || window.webkitAudioContext; this.context = new AudioContext(); this.config.sampleRate = this.context.sampleRate; + this.rawChunksBuffer = encodeAfterRecord ? [] : null; this.lameEncoder = new Encoder(this.config); + this.i = 0; - const audio = this.config.deviceId ? { deviceId: { exact: this.config.deviceId } } : true; + const audio = deviceId ? { deviceId: { exact: deviceId } } : true; return new Promise((resolve, reject) => { navigator.mediaDevices.getUserMedia({ audio }) @@ -151,6 +166,13 @@ class MicRecorder { * @return Promise */ getMp3() { + if (this.config.encodeAfterRecord) { + this.rawChunksBuffer.forEach((rawChunk) => { + this.lameEncoder.encode(rawChunk); + }) + this.rawChunksBuffer = null; + } + const finalBuffer = this.lameEncoder.finish(); return new Promise((resolve, reject) => {