From 21b94eea2d80fe519cdf0e430004fedfd352c3b5 Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 4 Nov 2014 10:12:43 +0100 Subject: [PATCH] optmiziation: No need to clamp Y, Cb and Cr arrays. --- jsmpg.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jsmpg.js b/jsmpg.js index ad045016..ad5b9b0e 100755 --- a/jsmpg.js +++ b/jsmpg.js @@ -520,23 +520,23 @@ jsmpeg.prototype.initBuffers = function() { } // Allocated buffers and resize the canvas - this.currentY = new MaybeClampedUint8Array(this.codedSize); + this.currentY = new Uint8Array(this.codedSize); this.currentY32 = new Uint32Array(this.currentY.buffer); - this.currentCr = new MaybeClampedUint8Array(this.codedSize >> 2); + this.currentCr = new Uint8Array(this.codedSize >> 2); this.currentCr32 = new Uint32Array(this.currentCr.buffer); - this.currentCb = new MaybeClampedUint8Array(this.codedSize >> 2); + this.currentCb = new Uint8Array(this.codedSize >> 2); this.currentCb32 = new Uint32Array(this.currentCb.buffer); - this.forwardY = new MaybeClampedUint8Array(this.codedSize); + this.forwardY = new Uint8Array(this.codedSize); this.forwardY32 = new Uint32Array(this.forwardY.buffer); - this.forwardCr = new MaybeClampedUint8Array(this.codedSize >> 2); + this.forwardCr = new Uint8Array(this.codedSize >> 2); this.forwardCr32 = new Uint32Array(this.forwardCr.buffer); - this.forwardCb = new MaybeClampedUint8Array(this.codedSize >> 2); + this.forwardCb = new Uint8Array(this.codedSize >> 2); this.forwardCb32 = new Uint32Array(this.forwardCb.buffer); this.canvas.width = this.width;