Parcourir la source

optmiziation: No need to clamp Y, Cb and Cr arrays.

Robert Nagy il y a 11 ans
Parent
révision
21b94eea2d
1 fichiers modifiés avec 6 ajouts et 6 suppressions
  1. 6 6
      jsmpg.js

+ 6 - 6
jsmpg.js Voir le fichier

@@ -520,23 +520,23 @@ jsmpeg.prototype.initBuffers = function() {
520 520
 	}
521 521
 	
522 522
 	// Allocated buffers and resize the canvas
523
-	this.currentY = new MaybeClampedUint8Array(this.codedSize);
523
+	this.currentY = new Uint8Array(this.codedSize);
524 524
 	this.currentY32 = new Uint32Array(this.currentY.buffer);
525 525
 
526
-	this.currentCr = new MaybeClampedUint8Array(this.codedSize >> 2);
526
+	this.currentCr = new Uint8Array(this.codedSize >> 2);
527 527
 	this.currentCr32 = new Uint32Array(this.currentCr.buffer);
528 528
 
529
-	this.currentCb = new MaybeClampedUint8Array(this.codedSize >> 2);
529
+	this.currentCb = new Uint8Array(this.codedSize >> 2);
530 530
 	this.currentCb32 = new Uint32Array(this.currentCb.buffer);
531 531
 	
532 532
 
533
-	this.forwardY = new MaybeClampedUint8Array(this.codedSize);
533
+	this.forwardY = new Uint8Array(this.codedSize);
534 534
 	this.forwardY32 = new Uint32Array(this.forwardY.buffer);
535 535
 
536
-	this.forwardCr = new MaybeClampedUint8Array(this.codedSize >> 2);
536
+	this.forwardCr = new Uint8Array(this.codedSize >> 2);
537 537
 	this.forwardCr32 = new Uint32Array(this.forwardCr.buffer);
538 538
 
539
-	this.forwardCb = new MaybeClampedUint8Array(this.codedSize >> 2);
539
+	this.forwardCb = new Uint8Array(this.codedSize >> 2);
540 540
 	this.forwardCb32 = new Uint32Array(this.forwardCb.buffer);
541 541
 	
542 542
 	this.canvas.width = this.width;