Dominic Szablewski hace 11 años
padre
commit
86f9f48f1f
Se han modificado 1 ficheros con 9 adiciones y 23 borrados
  1. 9 23
      jsmpg.js

+ 9 - 23
jsmpg.js Ver fichero

@@ -564,7 +564,7 @@ jsmpeg.prototype.initBuffers = function() {
564 564
 	
565 565
 	if( this.gl ) {
566 566
 		this.gl.useProgram(this.program);
567
-    	this.gl.viewport(0, 0, this.width, this.height);
567
+		this.gl.viewport(0, 0, this.width, this.height);
568 568
 
569 569
 		// WebGL doesn't like Uint8ClampedArrays, so we have to create a 
570 570
 		// Uint8Array view for each plane
@@ -1470,12 +1470,8 @@ jsmpeg.prototype.decodeBlock = function(block) {
1470 1470
 	n = 0;
1471 1471
 };
1472 1472
 
1473
-jsmpeg.prototype.copyBlockToDestination = function(_blockData, _destArray, _destIndex, scan) {
1474
-	var blockData = _blockData;
1475
-	var destArray = _destArray;
1476
-	var destIndex = _destIndex;
1477
-
1478
-	for (var n = 0; n < 64; n += 8, destIndex += scan+8) {
1473
+jsmpeg.prototype.copyBlockToDestination = function(blockData, destArray, destIndex, scan) {
1474
+	for( var n = 0; n < 64; n += 8, destIndex += scan+8 ) {
1479 1475
 		destArray[destIndex+0] = blockData[n+0];
1480 1476
 		destArray[destIndex+1] = blockData[n+1];
1481 1477
 		destArray[destIndex+2] = blockData[n+2];
@@ -1487,12 +1483,8 @@ jsmpeg.prototype.copyBlockToDestination = function(_blockData, _destArray, _dest
1487 1483
 	}
1488 1484
 };
1489 1485
 
1490
-jsmpeg.prototype.addBlockToDestination = function(_blockData, _destArray, _destIndex, scan) {
1491
-	var blockData = _blockData;
1492
-	var destArray = _destArray;
1493
-	var destIndex = _destIndex;
1494
-
1495
-	for (var n = 0; n < 64; n += 8, destIndex += scan+8) {
1486
+jsmpeg.prototype.addBlockToDestination = function(blockData, destArray, destIndex, scan) {
1487
+	for( var n = 0; n < 64; n += 8, destIndex += scan+8 ) {
1496 1488
 		destArray[destIndex+0] += blockData[n+0];
1497 1489
 		destArray[destIndex+1] += blockData[n+1];
1498 1490
 		destArray[destIndex+2] += blockData[n+2];
@@ -1504,11 +1496,8 @@ jsmpeg.prototype.addBlockToDestination = function(_blockData, _destArray, _destI
1504 1496
 	}
1505 1497
 };
1506 1498
 
1507
-jsmpeg.prototype.copyValueToDestination = function(value, _destArray, _destIndex, scan) {
1508
-	var destArray = _destArray;
1509
-	var destIndex = _destIndex;
1510
-
1511
-	for (var n = 0; n < 64; n += 8, destIndex += scan+8) {
1499
+jsmpeg.prototype.copyValueToDestination = function(value, destArray, destIndex, scan) {
1500
+	for( var n = 0; n < 64; n += 8, destIndex += scan+8 ) {
1512 1501
 		destArray[destIndex+0] = value;
1513 1502
 		destArray[destIndex+1] = value;
1514 1503
 		destArray[destIndex+2] = value;
@@ -1520,11 +1509,8 @@ jsmpeg.prototype.copyValueToDestination = function(value, _destArray, _destIndex
1520 1509
 	}
1521 1510
 };
1522 1511
 
1523
-jsmpeg.prototype.addValueToDestination = function(value, _destArray, _destIndex, scan) {
1524
-	var destArray = _destArray;
1525
-	var destIndex = _destIndex;
1526
-
1527
-	for (var n = 0; n < 64; n += 8, destIndex += scan+8) {
1512
+jsmpeg.prototype.addValueToDestination = function(value, destArray, destIndex, scan) {
1513
+	for( var n = 0; n < 64; n += 8, destIndex += scan+8 ) {
1528 1514
 		destArray[destIndex+0] += value;
1529 1515
 		destArray[destIndex+1] += value;
1530 1516
 		destArray[destIndex+2] += value;