-
Notifications
You must be signed in to change notification settings - Fork 0
/
610.min.worker.js.map
1 lines (1 loc) · 96.3 KB
/
610.min.worker.js.map
1
{"version":3,"file":"610.min.worker.js","mappings":"0EAEA,SAAWA,GACT,GAAuB,iBAAZC,QAA0C,IAAXC,EACxCA,EAAOD,QAAUD,SACZ,GAAsB,mBAAXG,QAAyBA,OAAOC,IAChDD,OAAO,GAAIH,OACN,EAGiB,oBAAXK,OACLA,OACuB,oBAAXC,OACZA,OACqB,oBAATC,KACZA,KAEAC,MAEJC,KAAOT,GACX,CACD,CAnBD,EAmBG,WAGD,OAAO,SAAUU,EAAEC,EAAGC,EAAGC,GACvB,SAASC,EAAEC,EAAGC,GACZ,IAAKJ,EAAEG,GAAI,CACT,IAAKJ,EAAEI,GAAI,CACT,IAAIE,EAAuB,mBAAZC,SAA0BA,QAEzC,IAAKF,GAAKC,EACR,OAAOA,EAAEF,GAAG,GAEd,GAAII,EACF,OAAOA,EAAEJ,GAAG,GAEd,IAAIf,EAAI,IAAIoB,MAAM,uBAAyBL,EAAI,KAE/C,MAAQf,EAAEqB,KAAO,mBAAqBrB,CACxC,CACA,IAAIsB,EAAKV,EAAEG,GAAK,CAAEd,QAAS,CAAC,GAE5BU,EAAEI,GAAG,GAAGQ,KACND,EAAErB,SACF,SAAUS,GACR,IAAIE,EAAID,EAAEI,GAAG,GAAGL,GAEhB,OAAOI,EAAEF,GAAQF,EACnB,GACAY,EACAA,EAAErB,QACFS,EACAC,EACAC,EACAC,EAEJ,CAEA,OAAOD,EAAEG,GAAGd,OACd,CAGA,IAFA,IAAIkB,EAAuB,mBAAZD,SAA0BA,QAEhCH,EAAI,EAAGA,EAAIF,EAAEW,OAAQT,IAC5BD,EAAED,EAAEE,IAGN,OAAOD,CACR,CA3CM,CA4CL,CACE,EAAG,CACD,SAAUI,EAAShB,EAAQD,GAmCzB,IAAIQ,EAAOA,GAAQ,CAAC,EAEpBA,EAAKgB,SAAWhB,EAAKgB,UAAY,CAAC,EAGlChB,EA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ASmB,MAAQnC,EAAKgB,SAASmB,OAAS,CAAC,EAK9CnC,EAAKgB,SAASmB,MAAMQ,YAAc,SAAU5B,GAC1C,IAAI8I,EAAM,IAAIC,MAAM/I,GAAU,GAC5BL,EAAIK,EAEN,GAAIgJ,UAAUhJ,OAAS,EAGrB,IAFA,IAAIiJ,EAAOF,MAAMnI,UAAUsI,MAAMnJ,KAAKiJ,UAAW,GAE1CrJ,KACLmJ,EAAI9I,EAAS,EAAIL,GAAKV,EAAKgB,SAASmB,MAAMQ,YAAYuH,MACpDnK,KACAiK,GAKN,OAAOH,CACT,EAGA7J,EAAKgB,SAASmB,MAAMgI,aAAe,WAIjC,IAHA,IAAIrB,EACAsB,EAAW,GAENjK,EAAI,EAAGA,EAAI,IAAKA,IAAK,CAC5B2I,EAAI3I,EACJ,IAAK,IAAI2H,EAAI,EAAGA,EAAI,EAAGA,IACrBgB,EAAQ,EAAJA,EAAQ,WAAcA,IAAM,EAAKA,IAAM,EAE7CsB,EAASjK,GAAK2I,CAChB,CAEA,OAAOsB,CACT,EAEApK,EAAKgB,SAASmB,MAAMkI,MAAQ,SAAUC,GAQpC,IAPA,IAAIC,EAAY,IAAI9I,WAAW6I,EAAS9I,QACpC4I,EACFpK,EAAKgB,SAASmB,MAAMiI,WACnBpK,EAAKgB,SAASmB,MAAMiI,SACnBpK,EAAKgB,SAASmB,MAAMgI,gBACpBK,GAAM,EAED9J,EAAI,EAAGA,EAAI6J,EAAUxJ,OAAQL,IACpC8J,EAAOA,IAAQ,EAAKJ,EAAgC,KAAtBI,EAAMD,EAAU7J,KAGhD,QAAe,EAAP8J,KAAc,CACxB,EAMmB,qBAFK/K,GAEUA,EAAOD,UACvCC,EAAOD,QAAUQ,EAAKgB,SAASmB,MAEnC,EACA,CAAC,IAGL,CAAC,EACD,CAAC,GAl/DI,CAm/DL,EACJ,G","sources":["webpack:///../codecs/jpegLossless.js"],"sourcesContent":["/* eslint-disable */\n\n(function (f) {\n if (typeof exports === 'object' && typeof module !== 'undefined') {\n module.exports = f();\n } else if (typeof define === 'function' && define.amd) {\n define([], f);\n } else {\n var g;\n\n if (typeof window !== 'undefined') {\n g = window;\n } else if (typeof global !== 'undefined') {\n g = global;\n } else if (typeof self !== 'undefined') {\n g = self;\n } else {\n g = this;\n }\n g.jpeg = f();\n }\n})(function () {\n var define, module, exports;\n\n return (function e(t, n, r) {\n function s(o, u) {\n if (!n[o]) {\n if (!t[o]) {\n var a = typeof require === 'function' && require;\n\n if (!u && a) {\n return a(o, !0);\n }\n if (i) {\n return i(o, !0);\n }\n var f = new Error(\"Cannot find module '\" + o + \"'\");\n\n throw ((f.code = 'MODULE_NOT_FOUND'), f);\n }\n var l = (n[o] = { exports: {} });\n\n t[o][0].call(\n l.exports,\n function (e) {\n var n = t[o][1][e];\n\n return s(n ? n : e);\n },\n l,\n l.exports,\n e,\n t,\n n,\n r\n );\n }\n\n return n[o].exports;\n }\n var i = typeof require === 'function' && require;\n\n for (var o = 0; o < r.length; o++) {\n s(r[o]);\n }\n\n return s;\n })(\n {\n 1: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n\n /*** Constructor ***/\n jpeg.lossless.ComponentSpec =\n jpeg.lossless.ComponentSpec ||\n function () {\n this.hSamp = 0; // Horizontal sampling factor\n this.quantTableSel = 0; // Quantization table destination selector\n this.vSamp = 0; // Vertical\n };\n\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.ComponentSpec;\n }\n },\n {},\n ],\n 2: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n\n /*** Constructor ***/\n jpeg.lossless.DataStream =\n jpeg.lossless.DataStream ||\n function (data, offset, length) {\n // Note: DataView is much slower than Int8Array\n // this.buffer = new DataView(data, offset, length);\n this.buffer = new Uint8Array(data, offset, length);\n this.index = 0;\n };\n jpeg.lossless.DataStream.prototype.get16 = function () {\n // var value = this.buffer.getUint16(this.index, false);\n var value =\n (this.buffer[this.index] << 8) + this.buffer[this.index + 1]; // DataView is big-endian by default\n\n this.index += 2;\n\n return value;\n };\n jpeg.lossless.DataStream.prototype.get8 = function () {\n // var value = this.buffer.getUint8(this.index);\n var value = this.buffer[this.index];\n\n this.index += 1;\n\n return value;\n };\n\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.DataStream;\n }\n },\n {},\n ],\n 3: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n jpeg.lossless.DataStream =\n jpeg.lossless.DataStream ||\n (typeof require !== 'undefined'\n ? require('./data-stream.js')\n : null);\n jpeg.lossless.HuffmanTable =\n jpeg.lossless.HuffmanTable ||\n (typeof require !== 'undefined'\n ? require('./huffman-table.js')\n : null);\n jpeg.lossless.QuantizationTable =\n jpeg.lossless.QuantizationTable ||\n (typeof require !== 'undefined'\n ? require('./quantization-table.js')\n : null);\n jpeg.lossless.ScanHeader =\n jpeg.lossless.ScanHeader ||\n (typeof require !== 'undefined'\n ? require('./scan-header.js')\n : null);\n jpeg.lossless.FrameHeader =\n jpeg.lossless.FrameHeader ||\n (typeof require !== 'undefined'\n ? require('./frame-header.js')\n : null);\n jpeg.lossless.Utils =\n jpeg.lossless.Utils ||\n (typeof require !== 'undefined' ? require('./utils.js') : null);\n\n /*** Constructor ***/\n\n /**\n * The Decoder constructor.\n * @property {number} xDim - size of x dimension\n * @property {number} yDim - size of y dimension\n * @property {number} numComp - number of components\n * @property {number} numBytes - number of bytes per component\n * @type {Function}\n */\n jpeg.lossless.Decoder =\n jpeg.lossless.Decoder ||\n function (buffer, numBytes) {\n this.buffer = buffer;\n this.frame = new jpeg.lossless.FrameHeader();\n this.huffTable = new jpeg.lossless.HuffmanTable();\n this.quantTable = new jpeg.lossless.QuantizationTable();\n this.scan = new jpeg.lossless.ScanHeader();\n this.DU = jpeg.lossless.Utils.createArray(10, 4, 64); // at most 10 data units in a MCU, at most 4 data units in one component\n this.HuffTab = jpeg.lossless.Utils.createArray(4, 2, 50 * 256);\n this.IDCT_Source = [];\n this.nBlock = []; // number of blocks in the i-th Comp in a scan\n this.acTab = jpeg.lossless.Utils.createArray(10, 1); // ac HuffTab for the i-th Comp in a scan\n this.dcTab = jpeg.lossless.Utils.createArray(10, 1); // dc HuffTab for the i-th Comp in a scan\n this.qTab = jpeg.lossless.Utils.createArray(10, 1); // quantization table for the i-th Comp in a scan\n this.marker = 0;\n this.markerIndex = 0;\n this.numComp = 0;\n this.restartInterval = 0;\n this.selection = 0;\n this.xDim = 0;\n this.yDim = 0;\n this.xLoc = 0;\n this.yLoc = 0;\n this.numBytes = 0;\n this.outputData = null;\n this.restarting = false;\n this.mask = 0;\n\n if (typeof numBytes !== 'undefined') {\n this.numBytes = numBytes;\n }\n };\n\n /*** Static Pseudo-constants ***/\n\n jpeg.lossless.Decoder.IDCT_P = [\n 0, 5, 40, 16, 45, 2, 7, 42, 21, 56, 8, 61, 18, 47, 1, 4, 41, 23, 58,\n 13, 32, 24, 37, 10, 63, 17, 44, 3, 6, 43, 20, 57, 15, 34, 29, 48,\n 53, 26, 39, 9, 60, 19, 46, 22, 59, 12, 33, 31, 50, 55, 25, 36, 11,\n 62, 14, 35, 28, 49, 52, 27, 38, 30, 51, 54,\n ];\n jpeg.lossless.Decoder.TABLE = [\n 0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12,\n 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32,\n 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50,\n 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63,\n ];\n jpeg.lossless.Decoder.MAX_HUFFMAN_SUBTREE = 50;\n jpeg.lossless.Decoder.MSB = 0x80000000;\n jpeg.lossless.Decoder.RESTART_MARKER_BEGIN = 0xffd0;\n jpeg.lossless.Decoder.RESTART_MARKER_END = 0xffd7;\n\n /*** Prototype Methods ***/\n\n /**\n * Returns decompressed data.\n * @param {ArrayBuffer} buffer\n * @param {number} [offset]\n * @param {number} [length]\n * @returns {ArrayBufer}\n */\n jpeg.lossless.Decoder.prototype.decompress = function (\n buffer,\n offset,\n length\n ) {\n return this.decode(buffer, offset, length).buffer;\n };\n jpeg.lossless.Decoder.prototype.decode = function (\n buffer,\n offset,\n length,\n numBytes\n ) {\n /*jslint bitwise: true */\n\n var current,\n scanNum = 0,\n pred = [],\n i,\n compN,\n temp = [],\n index = [],\n mcuNum;\n\n if (typeof buffer !== 'undefined') {\n this.buffer = buffer;\n }\n\n if (typeof numBytes !== 'undefined') {\n this.numBytes = numBytes;\n }\n\n this.stream = new jpeg.lossless.DataStream(\n this.buffer,\n offset,\n length\n );\n this.buffer = null;\n\n this.xLoc = 0;\n this.yLoc = 0;\n current = this.stream.get16();\n\n if (current !== 0xffd8) {\n // SOI\n throw new Error('Not a JPEG file');\n }\n\n current = this.stream.get16();\n\n while (current >> 4 !== 0x0ffc || current === 0xffc4) {\n // SOF 0~15\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab);\n break;\n case 0xffcc: // DAC\n throw new Error(\n \"Program doesn't support arithmetic coding. (format throw new IOException)\"\n );\n case 0xffdb:\n this.quantTable.read(\n this.stream,\n jpeg.lossless.Decoder.TABLE\n );\n break;\n case 0xffdd:\n this.restartInterval = this.readNumber();\n break;\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp();\n break;\n case 0xfffe:\n this.readComment();\n break;\n default:\n if (current >> 8 !== 0xff) {\n throw new Error(\n 'ERROR: format throw new IOException! (decode)'\n );\n }\n }\n\n current = this.stream.get16();\n }\n\n if (current < 0xffc0 || current > 0xffc7) {\n throw new Error('ERROR: could not handle arithmetic code!');\n }\n\n this.frame.read(this.stream);\n current = this.stream.get16();\n\n do {\n while (current !== 0x0ffda) {\n // SOS\n switch (current) {\n case 0xffc4: // DHT\n this.huffTable.read(this.stream, this.HuffTab);\n break;\n case 0xffcc: // DAC\n throw new Error(\n \"Program doesn't support arithmetic coding. (format throw new IOException)\"\n );\n case 0xffdb:\n this.quantTable.read(\n this.stream,\n jpeg.lossless.Decoder.TABLE\n );\n break;\n case 0xffdd:\n this.restartInterval = this.readNumber();\n break;\n case 0xffe0:\n case 0xffe1:\n case 0xffe2:\n case 0xffe3:\n case 0xffe4:\n case 0xffe5:\n case 0xffe6:\n case 0xffe7:\n case 0xffe8:\n case 0xffe9:\n case 0xffea:\n case 0xffeb:\n case 0xffec:\n case 0xffed:\n case 0xffee:\n case 0xffef:\n this.readApp();\n break;\n case 0xfffe:\n this.readComment();\n break;\n default:\n if (current >> 8 !== 0xff) {\n throw new Error(\n 'ERROR: format throw new IOException! (Parser.decode)'\n );\n }\n }\n\n current = this.stream.get16();\n }\n\n this.precision = this.frame.precision;\n this.components = this.frame.components;\n\n if (!this.numBytes) {\n this.numBytes = parseInt(Math.ceil(this.precision / 8));\n }\n\n if (this.numBytes == 1) {\n this.mask = 0xff;\n } else {\n this.mask = 0xffff;\n }\n\n this.scan.read(this.stream);\n this.numComp = this.scan.numComp;\n this.selection = this.scan.selection;\n\n if (this.numBytes === 1) {\n if (this.numComp === 3) {\n this.getter = this.getValueRGB;\n this.setter = this.setValueRGB;\n this.output = this.outputRGB;\n } else {\n this.getter = this.getValue8;\n this.setter = this.setValue8;\n this.output = this.outputSingle;\n }\n } else {\n this.getter = this.getValue16;\n this.setter = this.setValue16;\n this.output = this.outputSingle;\n }\n\n switch (this.selection) {\n case 2:\n this.selector = this.select2;\n break;\n case 3:\n this.selector = this.select3;\n break;\n case 4:\n this.selector = this.select4;\n break;\n case 5:\n this.selector = this.select5;\n break;\n case 6:\n this.selector = this.select6;\n break;\n case 7:\n this.selector = this.select7;\n break;\n default:\n this.selector = this.select1;\n break;\n }\n\n this.scanComps = this.scan.components;\n this.quantTables = this.quantTable.quantTables;\n\n for (i = 0; i < this.numComp; i += 1) {\n compN = this.scanComps[i].scanCompSel;\n this.qTab[i] =\n this.quantTables[this.components[compN].quantTableSel];\n this.nBlock[i] =\n this.components[compN].vSamp * this.components[compN].hSamp;\n this.dcTab[i] = this.HuffTab[this.scanComps[i].dcTabSel][0];\n this.acTab[i] = this.HuffTab[this.scanComps[i].acTabSel][1];\n }\n\n this.xDim = this.frame.dimX;\n this.yDim = this.frame.dimY;\n if (this.numBytes == 1) {\n this.outputData = new Uint8Array(\n new ArrayBuffer(\n this.xDim * this.yDim * this.numBytes * this.numComp\n )\n );\n } else {\n this.outputData = new Uint16Array(\n new ArrayBuffer(\n this.xDim * this.yDim * this.numBytes * this.numComp\n )\n );\n }\n\n scanNum += 1;\n\n while (true) {\n // Decode one scan\n temp[0] = 0;\n index[0] = 0;\n\n for (i = 0; i < 10; i += 1) {\n pred[i] = 1 << (this.precision - 1);\n }\n\n if (this.restartInterval === 0) {\n current = this.decodeUnit(pred, temp, index);\n\n while (\n current === 0 &&\n this.xLoc < this.xDim &&\n this.yLoc < this.yDim\n ) {\n this.output(pred);\n current = this.decodeUnit(pred, temp, index);\n }\n\n break; //current=MARKER\n }\n\n for (mcuNum = 0; mcuNum < this.restartInterval; mcuNum += 1) {\n this.restarting = mcuNum == 0;\n current = this.decodeUnit(pred, temp, index);\n this.output(pred);\n\n if (current !== 0) {\n break;\n }\n }\n\n if (current === 0) {\n if (this.markerIndex !== 0) {\n current = 0xff00 | this.marker;\n this.markerIndex = 0;\n } else {\n current = this.stream.get16();\n }\n }\n\n if (\n !(\n current >= jpeg.lossless.Decoder.RESTART_MARKER_BEGIN &&\n current <= jpeg.lossless.Decoder.RESTART_MARKER_END\n )\n ) {\n break; //current=MARKER\n }\n }\n\n if (current === 0xffdc && scanNum === 1) {\n //DNL\n this.readNumber();\n current = this.stream.get16();\n }\n } while (\n current !== 0xffd9 &&\n this.xLoc < this.xDim &&\n this.yLoc < this.yDim &&\n scanNum === 0\n );\n\n return this.outputData;\n };\n jpeg.lossless.Decoder.prototype.decodeUnit = function (\n prev,\n temp,\n index\n ) {\n if (this.numComp == 1) {\n return this.decodeSingle(prev, temp, index);\n } else if (this.numComp == 3) {\n return this.decodeRGB(prev, temp, index);\n }\n\n return -1;\n };\n jpeg.lossless.Decoder.prototype.select1 = function (compOffset) {\n return this.getPreviousX(compOffset);\n };\n jpeg.lossless.Decoder.prototype.select2 = function (compOffset) {\n return this.getPreviousY(compOffset);\n };\n jpeg.lossless.Decoder.prototype.select3 = function (compOffset) {\n return this.getPreviousXY(compOffset);\n };\n jpeg.lossless.Decoder.prototype.select4 = function (compOffset) {\n return (\n this.getPreviousX(compOffset) +\n this.getPreviousY(compOffset) -\n this.getPreviousXY(compOffset)\n );\n };\n jpeg.lossless.Decoder.prototype.select5 = function (compOffset) {\n return (\n this.getPreviousX(compOffset) +\n ((this.getPreviousY(compOffset) -\n this.getPreviousXY(compOffset)) >>\n 1)\n );\n };\n jpeg.lossless.Decoder.prototype.select6 = function (compOffset) {\n return (\n this.getPreviousY(compOffset) +\n ((this.getPreviousX(compOffset) -\n this.getPreviousXY(compOffset)) >>\n 1)\n );\n };\n jpeg.lossless.Decoder.prototype.select7 = function (compOffset) {\n return (\n (this.getPreviousX(compOffset) + this.getPreviousY(compOffset)) /\n 2\n );\n };\n jpeg.lossless.Decoder.prototype.decodeRGB = function (\n prev,\n temp,\n index\n ) {\n /*jslint bitwise: true */\n\n var value, actab, dctab, qtab, ctrC, i, k, j;\n\n prev[0] = this.selector(0);\n prev[1] = this.selector(1);\n prev[2] = this.selector(2);\n\n for (ctrC = 0; ctrC < this.numComp; ctrC += 1) {\n qtab = this.qTab[ctrC];\n actab = this.acTab[ctrC];\n dctab = this.dcTab[ctrC];\n for (i = 0; i < this.nBlock[ctrC]; i += 1) {\n for (k = 0; k < this.IDCT_Source.length; k += 1) {\n this.IDCT_Source[k] = 0;\n }\n\n value = this.getHuffmanValue(dctab, temp, index);\n\n if (value >= 0xff00) {\n return value;\n }\n\n prev[ctrC] = this.IDCT_Source[0] =\n prev[ctrC] + this.getn(index, value, temp, index);\n this.IDCT_Source[0] *= qtab[0];\n\n for (j = 1; j < 64; j += 1) {\n value = this.getHuffmanValue(actab, temp, index);\n\n if (value >= 0xff00) {\n return value;\n }\n\n j += value >> 4;\n\n if ((value & 0x0f) === 0) {\n if (value >> 4 === 0) {\n break;\n }\n } else {\n this.IDCT_Source[jpeg.lossless.Decoder.IDCT_P[j]] =\n this.getn(index, value & 0x0f, temp, index) * qtab[j];\n }\n }\n }\n }\n\n return 0;\n };\n jpeg.lossless.Decoder.prototype.decodeSingle = function (\n prev,\n temp,\n index\n ) {\n /*jslint bitwise: true */\n\n var value, i, n, nRestart;\n\n if (this.restarting) {\n this.restarting = false;\n prev[0] = 1 << (this.frame.precision - 1);\n } else {\n prev[0] = this.selector();\n }\n\n for (i = 0; i < this.nBlock[0]; i += 1) {\n value = this.getHuffmanValue(this.dcTab[0], temp, index);\n if (value >= 0xff00) {\n return value;\n }\n\n n = this.getn(prev, value, temp, index);\n nRestart = n >> 8;\n\n if (\n nRestart >= jpeg.lossless.Decoder.RESTART_MARKER_BEGIN &&\n nRestart <= jpeg.lossless.Decoder.RESTART_MARKER_END\n ) {\n return nRestart;\n }\n\n prev[0] += n;\n }\n\n return 0;\n };\n // Huffman table for fast search: (HuffTab) 8-bit Look up table 2-layer search architecture, 1st-layer represent 256 node (8 bits) if codeword-length > 8\n // bits, then the entry of 1st-layer = (# of 2nd-layer table) | MSB and it is stored in the 2nd-layer Size of tables in each layer are 256.\n // HuffTab[*][*][0-256] is always the only 1st-layer table.\n //\n // An entry can be: (1) (# of 2nd-layer table) | MSB , for code length > 8 in 1st-layer (2) (Code length) << 8 | HuffVal\n //\n // HuffmanValue(table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n // ):\n // return: Huffman Value of table\n // 0xFF?? if it receives a MARKER\n // Parameter: table HuffTab[x][y] (ex) HuffmanValue(HuffTab[1][0],...)\n // temp temp storage for remainded bits\n // index index to bit of temp\n // in FILE pointer\n // Effect:\n // temp store new remainded bits\n // index change to new index\n // in change to new position\n // NOTE:\n // Initial by temp=0; index=0;\n // NOTE: (explain temp and index)\n // temp: is always in the form at calling time or returning time\n // | byte 4 | byte 3 | byte 2 | byte 1 |\n // | 0 | 0 | 00000000 | 00000??? | if not a MARKER\n // ^index=3 (from 0 to 15)\n // 321\n // NOTE (marker and marker_index):\n // If get a MARKER from 'in', marker=the low-byte of the MARKER\n // and marker_index=9\n // If marker_index=9 then index is always > 8, or HuffmanValue()\n // will not be called\n jpeg.lossless.Decoder.prototype.getHuffmanValue = function (\n table,\n temp,\n index\n ) {\n /*jslint bitwise: true */\n\n var code, input, mask;\n\n mask = 0xffff;\n\n if (index[0] < 8) {\n temp[0] <<= 8;\n input = this.stream.get8();\n if (input === 0xff) {\n this.marker = this.stream.get8();\n if (this.marker !== 0) {\n this.markerIndex = 9;\n }\n }\n temp[0] |= input;\n } else {\n index[0] -= 8;\n }\n\n code = table[temp[0] >> index[0]];\n\n if ((code & jpeg.lossless.Decoder.MSB) !== 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0;\n\n return 0xff00 | this.marker;\n }\n\n temp[0] &= mask >> (16 - index[0]);\n temp[0] <<= 8;\n input = this.stream.get8();\n\n if (input === 0xff) {\n this.marker = this.stream.get8();\n if (this.marker !== 0) {\n this.markerIndex = 9;\n }\n }\n\n temp[0] |= input;\n code = table[(code & 0xff) * 256 + (temp[0] >> index[0])];\n index[0] += 8;\n }\n\n index[0] += 8 - (code >> 8);\n\n if (index[0] < 0) {\n throw new Error(\n `index=${index[0]} temp=${temp[0]} code=${code} in HuffmanValue()`\n );\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0;\n\n return 0xff00 | this.marker;\n }\n\n temp[0] &= mask >> (16 - index[0]);\n\n return code & 0xff;\n };\n jpeg.lossless.Decoder.prototype.getn = function (\n PRED,\n n,\n temp,\n index\n ) {\n /*jslint bitwise: true */\n\n var result, one, n_one, mask, input;\n\n one = 1;\n n_one = -1;\n mask = 0xffff;\n\n if (n === 0) {\n return 0;\n }\n\n if (n === 16) {\n if (PRED[0] >= 0) {\n return -32768;\n }\n\n return 32768;\n }\n\n index[0] -= n;\n\n if (index[0] >= 0) {\n if (index[0] < this.markerIndex && !this.isLastPixel()) {\n // this was corrupting the last pixel in some cases\n this.markerIndex = 0;\n\n return (0xff00 | this.marker) << 8;\n }\n\n result = temp[0] >> index[0];\n temp[0] &= mask >> (16 - index[0]);\n } else {\n temp[0] <<= 8;\n input = this.stream.get8();\n\n if (input === 0xff) {\n this.marker = this.stream.get8();\n if (this.marker !== 0) {\n this.markerIndex = 9;\n }\n }\n\n temp[0] |= input;\n index[0] += 8;\n\n if (index[0] < 0) {\n if (this.markerIndex !== 0) {\n this.markerIndex = 0;\n\n return (0xff00 | this.marker) << 8;\n }\n\n temp[0] <<= 8;\n input = this.stream.get8();\n\n if (input === 0xff) {\n this.marker = this.stream.get8();\n if (this.marker !== 0) {\n this.markerIndex = 9;\n }\n }\n\n temp[0] |= input;\n index[0] += 8;\n }\n\n if (index[0] < 0) {\n throw new Error(`index=${index[0]} in getn()`);\n }\n\n if (index[0] < this.markerIndex) {\n this.markerIndex = 0;\n\n return (0xff00 | this.marker) << 8;\n }\n\n result = temp[0] >> index[0];\n temp[0] &= mask >> (16 - index[0]);\n }\n\n if (result < one << (n - 1)) {\n result += (n_one << n) + 1;\n }\n\n return result;\n };\n jpeg.lossless.Decoder.prototype.getPreviousX = function (compOffset) {\n /*jslint bitwise: true */\n\n if (this.xLoc > 0) {\n return this.getter(\n this.yLoc * this.xDim + this.xLoc - 1,\n compOffset\n );\n } else if (this.yLoc > 0) {\n return this.getPreviousY(compOffset);\n }\n\n return 1 << (this.frame.precision - 1);\n };\n\n jpeg.lossless.Decoder.prototype.getPreviousXY = function (\n compOffset\n ) {\n /*jslint bitwise: true */\n\n if (this.xLoc > 0 && this.yLoc > 0) {\n return this.getter(\n (this.yLoc - 1) * this.xDim + this.xLoc - 1,\n compOffset\n );\n }\n\n return this.getPreviousY(compOffset);\n };\n jpeg.lossless.Decoder.prototype.getPreviousY = function (compOffset) {\n /*jslint bitwise: true */\n\n if (this.yLoc > 0) {\n return this.getter(\n (this.yLoc - 1) * this.xDim + this.xLoc,\n compOffset\n );\n }\n\n return this.getPreviousX(compOffset);\n };\n jpeg.lossless.Decoder.prototype.isLastPixel = function () {\n return this.xLoc === this.xDim - 1 && this.yLoc === this.yDim - 1;\n };\n jpeg.lossless.Decoder.prototype.outputSingle = function (PRED) {\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(\n this.yLoc * this.xDim + this.xLoc,\n this.mask & PRED[0]\n );\n\n this.xLoc += 1;\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1;\n this.xLoc = 0;\n }\n }\n };\n jpeg.lossless.Decoder.prototype.outputRGB = function (PRED) {\n var offset = this.yLoc * this.xDim + this.xLoc;\n\n if (this.xLoc < this.xDim && this.yLoc < this.yDim) {\n this.setter(offset, PRED[0], 0);\n this.setter(offset, PRED[1], 1);\n this.setter(offset, PRED[2], 2);\n\n this.xLoc += 1;\n\n if (this.xLoc >= this.xDim) {\n this.yLoc += 1;\n this.xLoc = 0;\n }\n }\n };\n\n jpeg.lossless.Decoder.prototype.setValue8 = function (index, val) {\n this.outputData[index] = val;\n };\n\n jpeg.lossless.Decoder.prototype.getValue8 = function (index) {\n return this.outputData[index]; // mask should not be necessary because outputData is either Int8Array or Int16Array\n };\n\n var littleEndian = (function () {\n var buffer = new ArrayBuffer(2);\n\n new DataView(buffer).setInt16(0, 256, true /* littleEndian */);\n // Int16Array uses the platform's endianness.\n return new Int16Array(buffer)[0] === 256;\n })();\n\n if (littleEndian) {\n // just reading from an array is fine then. Int16Array will use platform endianness.\n jpeg.lossless.Decoder.prototype.setValue16 =\n jpeg.lossless.Decoder.prototype.setValue8;\n jpeg.lossless.Decoder.prototype.getValue16 =\n jpeg.lossless.Decoder.prototype.getValue8;\n } else {\n // If platform is big-endian, we will need to convert to little-endian\n jpeg.lossless.Decoder.prototype.setValue16 = function (index, val) {\n this.outputData[index] =\n ((val & 0xff) << 8) | ((val >> 8) & 0xff);\n };\n\n jpeg.lossless.Decoder.prototype.getValue16 = function (index) {\n var val = this.outputData[index];\n\n return ((val & 0xff) << 8) | ((val >> 8) & 0xff);\n };\n }\n\n jpeg.lossless.Decoder.prototype.setValueRGB = function (\n index,\n val,\n compOffset\n ) {\n // this.outputData.setUint8(index * 3 + compOffset, val);\n this.outputData[index * 3 + compOffset] = val;\n };\n\n jpeg.lossless.Decoder.prototype.getValueRGB = function (\n index,\n compOffset\n ) {\n // return this.outputData.getUint8(index * 3 + compOffset);\n return this.outputData[index * 3 + compOffset];\n };\n jpeg.lossless.Decoder.prototype.readApp = function () {\n var count = 0,\n length = this.stream.get16();\n\n count += 2;\n\n while (count < length) {\n this.stream.get8();\n count += 1;\n }\n\n return length;\n };\n jpeg.lossless.Decoder.prototype.readComment = function () {\n var sb = '',\n count = 0,\n length;\n\n length = this.stream.get16();\n count += 2;\n\n while (count < length) {\n sb += this.stream.get8();\n count += 1;\n }\n\n return sb;\n };\n jpeg.lossless.Decoder.prototype.readNumber = function () {\n var Ld = this.stream.get16();\n\n if (Ld !== 4) {\n throw new Error(\n 'ERROR: Define number format throw new IOException [Ld!=4]'\n );\n }\n\n return this.stream.get16();\n };\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.Decoder;\n }\n },\n {\n './data-stream.js': 2,\n './frame-header.js': 4,\n './huffman-table.js': 5,\n './quantization-table.js': 7,\n './scan-header.js': 9,\n './utils.js': 10,\n },\n ],\n 4: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n jpeg.lossless.ComponentSpec =\n jpeg.lossless.ComponentSpec ||\n (typeof require !== 'undefined'\n ? require('./component-spec.js')\n : null);\n jpeg.lossless.DataStream =\n jpeg.lossless.DataStream ||\n (typeof require !== 'undefined'\n ? require('./data-stream.js')\n : null);\n\n /*** Constructor ***/\n jpeg.lossless.FrameHeader =\n jpeg.lossless.FrameHeader ||\n function () {\n this.components = []; // Components\n this.dimX = 0; // Number of samples per line\n this.dimY = 0; // Number of lines\n this.numComp = 0; // Number of component in the frame\n this.precision = 0; // Sample Precision (from the original image)\n };\n /*** Prototype Methods ***/\n\n jpeg.lossless.FrameHeader.prototype.read = function (data) {\n /*jslint bitwise: true */\n\n var count = 0,\n length,\n i,\n c,\n temp;\n\n length = data.get16();\n count += 2;\n\n this.precision = data.get8();\n count += 1;\n\n this.dimY = data.get16();\n count += 2;\n\n this.dimX = data.get16();\n count += 2;\n\n this.numComp = data.get8();\n count += 1;\n for (i = 1; i <= this.numComp; i += 1) {\n if (count > length) {\n throw new Error('ERROR: frame format error');\n }\n\n c = data.get8();\n count += 1;\n\n if (count >= length) {\n throw new Error('ERROR: frame format error [c>=Lf]');\n }\n\n temp = data.get8();\n count += 1;\n\n if (!this.components[c]) {\n this.components[c] = new jpeg.lossless.ComponentSpec();\n }\n\n this.components[c].hSamp = temp >> 4;\n this.components[c].vSamp = temp & 0x0f;\n this.components[c].quantTableSel = data.get8();\n count += 1;\n }\n\n if (count !== length) {\n throw new Error('ERROR: frame format error [Lf!=count]');\n }\n\n return 1;\n };\n\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.FrameHeader;\n }\n },\n { './component-spec.js': 1, './data-stream.js': 2 },\n ],\n 5: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n jpeg.lossless.DataStream =\n jpeg.lossless.DataStream ||\n (typeof require !== 'undefined'\n ? require('./data-stream.js')\n : null);\n jpeg.lossless.Utils =\n jpeg.lossless.Utils ||\n (typeof require !== 'undefined' ? require('./utils.js') : null);\n\n /*** Constructor ***/\n jpeg.lossless.HuffmanTable =\n jpeg.lossless.HuffmanTable ||\n function () {\n this.l = jpeg.lossless.Utils.createArray(4, 2, 16);\n this.th = [];\n this.v = jpeg.lossless.Utils.createArray(4, 2, 16, 200);\n this.tc = jpeg.lossless.Utils.createArray(4, 2);\n\n this.tc[0][0] = 0;\n this.tc[1][0] = 0;\n this.tc[2][0] = 0;\n this.tc[3][0] = 0;\n this.tc[0][1] = 0;\n this.tc[1][1] = 0;\n this.tc[2][1] = 0;\n this.tc[3][1] = 0;\n this.th[0] = 0;\n this.th[1] = 0;\n this.th[2] = 0;\n this.th[3] = 0;\n };\n /*** Static Pseudo-constants ***/\n\n jpeg.lossless.HuffmanTable.MSB = 0x80000000;\n\n /*** Prototype Methods ***/\n\n jpeg.lossless.HuffmanTable.prototype.read = function (data, HuffTab) {\n /*jslint bitwise: true */\n\n var count = 0,\n length,\n temp,\n t,\n c,\n i,\n j;\n\n length = data.get16();\n count += 2;\n\n while (count < length) {\n temp = data.get8();\n count += 1;\n t = temp & 0x0f;\n if (t > 3) {\n throw new Error('ERROR: Huffman table ID > 3');\n }\n\n c = temp >> 4;\n if (c > 2) {\n throw new Error('ERROR: Huffman table [Table class > 2 ]');\n }\n\n this.th[t] = 1;\n this.tc[t][c] = 1;\n\n for (i = 0; i < 16; i += 1) {\n this.l[t][c][i] = data.get8();\n count += 1;\n }\n\n for (i = 0; i < 16; i += 1) {\n for (j = 0; j < this.l[t][c][i]; j += 1) {\n if (count > length) {\n throw new Error(\n 'ERROR: Huffman table format error [count>Lh]'\n );\n }\n\n this.v[t][c][i][j] = data.get8();\n count += 1;\n }\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Huffman table format error [count!=Lf]');\n }\n\n for (i = 0; i < 4; i += 1) {\n for (j = 0; j < 2; j += 1) {\n if (this.tc[i][j] !== 0) {\n this.buildHuffTable(\n HuffTab[i][j],\n this.l[i][j],\n this.v[i][j]\n );\n }\n }\n }\n\n return 1;\n };\n // Build_HuffTab()\n // Parameter: t table ID\n // c table class ( 0 for DC, 1 for AC )\n // L[i] # of codewords which length is i\n // V[i][j] Huffman Value (length=i)\n // Effect:\n // build up HuffTab[t][c] using L and V.\n jpeg.lossless.HuffmanTable.prototype.buildHuffTable = function (\n tab,\n L,\n V\n ) {\n /*jslint bitwise: true */\n\n var currentTable, temp, k, i, j, n;\n\n temp = 256;\n k = 0;\n\n for (i = 0; i < 8; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i + 1); n += 1) {\n tab[k] = V[i][j] | ((i + 1) << 8);\n k += 1;\n }\n }\n }\n\n for (i = 1; k < 256; i += 1, k += 1) {\n tab[k] = i | jpeg.lossless.HuffmanTable.MSB;\n }\n\n currentTable = 1;\n k = 0;\n\n for (i = 8; i < 16; i += 1) {\n // i+1 is Code length\n for (j = 0; j < L[i]; j += 1) {\n for (n = 0; n < temp >> (i - 7); n += 1) {\n tab[currentTable * 256 + k] = V[i][j] | ((i + 1) << 8);\n k += 1;\n }\n\n if (k >= 256) {\n if (k > 256) {\n throw new Error('ERROR: Huffman table error(1)!');\n }\n\n k = 0;\n currentTable += 1;\n }\n }\n }\n };\n\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.HuffmanTable;\n }\n },\n { './data-stream.js': 2, './utils.js': 10 },\n ],\n 6: [\n function (require, module, exports) {\n /*jslint browser: true, node: true */\n /*global require, module */\n\n /*** Imports ****/\n\n /**\n * jpeg\n * @type {*|{}}\n */\n var jpeg = jpeg || {};\n\n /**\n * jpeg.lossless\n * @type {*|{}}\n */\n jpeg.lossless = jpeg.lossless || {};\n\n jpeg.lossless.ComponentSpec =\n jpeg.lossless.ComponentSpec ||\n (typeof require !== 'undefined'\n ? require('./component-spec.js')\n : null);\n jpeg.lossless.DataStream =\n jpeg.lossless.DataStream ||\n (typeof require !== 'undefined'\n ? require('./data-stream.js')\n : null);\n jpeg.lossless.Decoder =\n jpeg.lossless.Decoder ||\n (typeof require !== 'undefined' ? require('./decoder.js') : null);\n jpeg.lossless.FrameHeader =\n jpeg.lossless.FrameHeader ||\n (typeof require !== 'undefined'\n ? require('./frame-header.js')\n : null);\n jpeg.lossless.HuffmanTable =\n jpeg.lossless.HuffmanTable ||\n (typeof require !== 'undefined'\n ? require('./huffman-table.js')\n : null);\n jpeg.lossless.QuantizationTable =\n jpeg.lossless.QuantizationTable ||\n (typeof require !== 'undefined'\n ? require('./quantization-table.js')\n : null);\n jpeg.lossless.ScanComponent =\n jpeg.lossless.ScanComponent ||\n (typeof require !== 'undefined'\n ? require('./scan-component.js')\n : null);\n jpeg.lossless.ScanHeader =\n jpeg.lossless.ScanHeader ||\n (typeof require !== 'undefined'\n ? require('./scan-header.js')\n : null);\n jpeg.lossless.Utils =\n jpeg.lossless.Utils ||\n (typeof require !== 'undefined' ? require('./utils.js') : null);\n\n /*** Exports ***/\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg;\n }\n },\n {\n './component-spec.js': 1,\n './data-stream.js': 2,\n './decoder.js': 3,\n './frame-header.js': 4,\n './huffman-table.js': 5,\n './quantization-table.js': 7,\n './scan-component.js': 8,\n './scan-header.js': 9,\n './utils.js': 10,\n },\n ],\n 7: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n jpeg.lossless.DataStream =\n jpeg.lossless.DataStream ||\n (typeof require !== 'undefined'\n ? require('./data-stream.js')\n : null);\n jpeg.lossless.Utils =\n jpeg.lossless.Utils ||\n (typeof require !== 'undefined' ? require('./utils.js') : null);\n\n /*** Constructor ***/\n jpeg.lossless.QuantizationTable =\n jpeg.lossless.QuantizationTable ||\n function () {\n this.precision = []; // Quantization precision 8 or 16\n this.tq = []; // 1: this table is presented\n this.quantTables = jpeg.lossless.Utils.createArray(4, 64); // Tables\n\n this.tq[0] = 0;\n this.tq[1] = 0;\n this.tq[2] = 0;\n this.tq[3] = 0;\n };\n /*** Static Methods ***/\n\n jpeg.lossless.QuantizationTable.enhanceQuantizationTable = function (\n qtab,\n table\n ) {\n /*jslint bitwise: true */\n\n var i;\n\n for (i = 0; i < 8; i += 1) {\n qtab[table[0 * 8 + i]] *= 90;\n qtab[table[4 * 8 + i]] *= 90;\n qtab[table[2 * 8 + i]] *= 118;\n qtab[table[6 * 8 + i]] *= 49;\n qtab[table[5 * 8 + i]] *= 71;\n qtab[table[1 * 8 + i]] *= 126;\n qtab[table[7 * 8 + i]] *= 25;\n qtab[table[3 * 8 + i]] *= 106;\n }\n\n for (i = 0; i < 8; i += 1) {\n qtab[table[0 + 8 * i]] *= 90;\n qtab[table[4 + 8 * i]] *= 90;\n qtab[table[2 + 8 * i]] *= 118;\n qtab[table[6 + 8 * i]] *= 49;\n qtab[table[5 + 8 * i]] *= 71;\n qtab[table[1 + 8 * i]] *= 126;\n qtab[table[7 + 8 * i]] *= 25;\n qtab[table[3 + 8 * i]] *= 106;\n }\n\n for (i = 0; i < 64; i += 1) {\n qtab[i] >>= 6;\n }\n };\n\n /*** Prototype Methods ***/\n\n jpeg.lossless.QuantizationTable.prototype.read = function (\n data,\n table\n ) {\n /*jslint bitwise: true */\n\n var count = 0,\n length,\n temp,\n t,\n i;\n\n length = data.get16();\n count += 2;\n\n while (count < length) {\n temp = data.get8();\n count += 1;\n t = temp & 0x0f;\n\n if (t > 3) {\n throw new Error('ERROR: Quantization table ID > 3');\n }\n\n this.precision[t] = temp >> 4;\n\n if (this.precision[t] === 0) {\n this.precision[t] = 8;\n } else if (this.precision[t] === 1) {\n this.precision[t] = 16;\n } else {\n throw new Error('ERROR: Quantization table precision error');\n }\n\n this.tq[t] = 1;\n\n if (this.precision[t] === 8) {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error');\n }\n\n this.quantTables[t][i] = data.get8();\n count += 1;\n }\n\n jpeg.lossless.QuantizationTable.enhanceQuantizationTable(\n this.quantTables[t],\n table\n );\n } else {\n for (i = 0; i < 64; i += 1) {\n if (count > length) {\n throw new Error('ERROR: Quantization table format error');\n }\n\n this.quantTables[t][i] = data.get16();\n count += 2;\n }\n\n jpeg.lossless.QuantizationTable.enhanceQuantizationTable(\n this.quantTables[t],\n table\n );\n }\n }\n\n if (count !== length) {\n throw new Error('ERROR: Quantization table error [count!=Lq]');\n }\n\n return 1;\n };\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.QuantizationTable;\n }\n },\n { './data-stream.js': 2, './utils.js': 10 },\n ],\n 8: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n\n /*** Constructor ***/\n jpeg.lossless.ScanComponent =\n jpeg.lossless.ScanComponent ||\n function () {\n this.acTabSel = 0; // AC table selector\n this.dcTabSel = 0; // DC table selector\n this.scanCompSel = 0; // Scan component selector\n };\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.ScanComponent;\n }\n },\n {},\n ],\n 9: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n jpeg.lossless.DataStream =\n jpeg.lossless.DataStream ||\n (typeof require !== 'undefined'\n ? require('./data-stream.js')\n : null);\n jpeg.lossless.ScanComponent =\n jpeg.lossless.ScanComponent ||\n (typeof require !== 'undefined'\n ? require('./scan-component.js')\n : null);\n\n /*** Constructor ***/\n jpeg.lossless.ScanHeader =\n jpeg.lossless.ScanHeader ||\n function () {\n this.ah = 0;\n this.al = 0;\n this.numComp = 0; // Number of components in the scan\n this.selection = 0; // Start of spectral or predictor selection\n this.spectralEnd = 0; // End of spectral selection\n this.components = [];\n };\n\n /*** Prototype Methods ***/\n\n jpeg.lossless.ScanHeader.prototype.read = function (data) {\n /*jslint bitwise: true */\n\n var count = 0,\n length,\n i,\n temp;\n\n length = data.get16();\n count += 2;\n\n this.numComp = data.get8();\n count += 1;\n\n for (i = 0; i < this.numComp; i += 1) {\n this.components[i] = new jpeg.lossless.ScanComponent();\n\n if (count > length) {\n throw new Error('ERROR: scan header format error');\n }\n\n this.components[i].scanCompSel = data.get8();\n count += 1;\n\n temp = data.get8();\n count += 1;\n\n this.components[i].dcTabSel = temp >> 4;\n this.components[i].acTabSel = temp & 0x0f;\n }\n\n this.selection = data.get8();\n count += 1;\n\n this.spectralEnd = data.get8();\n count += 1;\n\n temp = data.get8();\n this.ah = temp >> 4;\n this.al = temp & 0x0f;\n count += 1;\n\n if (count !== length) {\n throw new Error('ERROR: scan header format error [count!=Ns]');\n }\n\n return 1;\n };\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.ScanHeader;\n }\n },\n { './data-stream.js': 2, './scan-component.js': 8 },\n ],\n 10: [\n function (require, module, exports) {\n /*\n * Copyright (C) 2015 Michael Martinez\n * Changes: Added support for selection values 2-7, fixed minor bugs &\n * warnings, split into multiple class files, and general clean up.\n *\n * 08-25-2015: Helmut Dersch agreed to a license change from LGPL to MIT.\n */\n\n /*\n * Copyright (C) Helmut Dersch\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n /*jslint browser: true, node: true */\n /*global require, module */\n /*** Imports ***/\n var jpeg = jpeg || {};\n\n jpeg.lossless = jpeg.lossless || {};\n\n /*** Constructor ***/\n jpeg.lossless.Utils = jpeg.lossless.Utils || {};\n\n /*** Static methods ***/\n\n // http://stackoverflow.com/questions/966225/how-can-i-create-a-two-dimensional-array-in-javascript\n jpeg.lossless.Utils.createArray = function (length) {\n var arr = new Array(length || 0),\n i = length;\n\n if (arguments.length > 1) {\n var args = Array.prototype.slice.call(arguments, 1);\n\n while (i--) {\n arr[length - 1 - i] = jpeg.lossless.Utils.createArray.apply(\n this,\n args\n );\n }\n }\n\n return arr;\n };\n\n // http://stackoverflow.com/questions/18638900/javascript-crc32\n jpeg.lossless.Utils.makeCRCTable = function () {\n var c;\n var crcTable = [];\n\n for (var n = 0; n < 256; n++) {\n c = n;\n for (var k = 0; k < 8; k++) {\n c = c & 1 ? 0xedb88320 ^ (c >>> 1) : c >>> 1;\n }\n crcTable[n] = c;\n }\n\n return crcTable;\n };\n\n jpeg.lossless.Utils.crc32 = function (dataView) {\n var uint8view = new Uint8Array(dataView.buffer);\n var crcTable =\n jpeg.lossless.Utils.crcTable ||\n (jpeg.lossless.Utils.crcTable =\n jpeg.lossless.Utils.makeCRCTable());\n var crc = 0 ^ -1;\n\n for (var i = 0; i < uint8view.length; i++) {\n crc = (crc >>> 8) ^ crcTable[(crc ^ uint8view[i]) & 0xff];\n }\n\n return (crc ^ -1) >>> 0;\n };\n\n /*** Exports ***/\n\n var moduleType = typeof module;\n\n if (moduleType !== 'undefined' && module.exports) {\n module.exports = jpeg.lossless.Utils;\n }\n },\n {},\n ],\n },\n {},\n [6]\n )(6);\n});\n"],"names":["f","exports","module","define","amd","window","global","self","this","jpeg","e","t","n","r","s","o","u","a","require","i","Error","code","l","call","length","lossless","ComponentSpec","hSamp","quantTableSel","vSamp","DataStream","data","offset","buffer","Uint8Array","index","prototype","get16","value","get8","HuffmanTable","QuantizationTable","ScanHeader","FrameHeader","Utils","Decoder","numBytes","frame","huffTable","quantTable","scan","DU","createArray","HuffTab","IDCT_Source","nBlock","acTab","dcTab","qTab","marker","markerIndex","numComp","restartInterval","selection","xDim","yDim","xLoc","yLoc","outputData","restarting","mask","IDCT_P","TABLE","MAX_HUFFMAN_SUBTREE","MSB","RESTART_MARKER_BEGIN","RESTART_MARKER_END","decompress","decode","current","compN","mcuNum","scanNum","pred","temp","stream","read","readNumber","readApp","readComment","precision","components","parseInt","Math","ceil","getter","getValueRGB","setter","setValueRGB","output","outputRGB","getValue8","setValue8","outputSingle","getValue16","setValue16","selector","select2","select3","select4","select5","select6","select7","select1","scanComps","quantTables","scanCompSel","dcTabSel","acTabSel","dimX","dimY","ArrayBuffer","Uint16Array","decodeUnit","prev","decodeSingle","decodeRGB","compOffset","getPreviousX","getPreviousY","getPreviousXY","actab","dctab","qtab","ctrC","k","j","getHuffmanValue","getn","nRestart","table","input","PRED","result","isLastPixel","val","DataView","setInt16","Int16Array","count","sb","c","th","v","tc","buildHuffTable","tab","L","V","currentTable","ScanComponent","tq","enhanceQuantizationTable","ah","al","spectralEnd","arr","Array","arguments","args","slice","apply","makeCRCTable","crcTable","crc32","dataView","uint8view","crc"],"sourceRoot":""}