Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: content/test/data/media/getusermedia-depth-capture.html

Issue 2767063002: 16-bit video upload to float: intermediate R16_EXT and copy to float. (Closed)
Patch Set: Nit. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script type="text/javascript" src="webrtc_test_utilities.js"></script> 3 <script type="text/javascript" src="webrtc_test_utilities.js"></script>
4 <script type="text/javascript" src="depth_stream_test_utilities.js"></script> 4 <script type="text/javascript" src="depth_stream_test_utilities.js"></script>
5 <script type="text/javascript"> 5 <script type="text/javascript">
6 6
7 function cubemapFaces(gl) { 7 function cubemapFaces(gl) {
8 return [gl.TEXTURE_CUBE_MAP_POSITIVE_X, 8 return [gl.TEXTURE_CUBE_MAP_POSITIVE_X,
9 gl.TEXTURE_CUBE_MAP_NEGATIVE_X, 9 gl.TEXTURE_CUBE_MAP_NEGATIVE_X,
10 gl.TEXTURE_CUBE_MAP_POSITIVE_Y, 10 gl.TEXTURE_CUBE_MAP_POSITIVE_Y,
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 var color_step = 1.0 / (width + height); 440 var color_step = 1.0 / (width + height);
441 return verifyPixels(arr, width, height, flip_y, color_step, 441 return verifyPixels(arr, width, height, flip_y, color_step,
442 1.0 /*wrap_around*/, 1.5/65535 /*tolerance*/, 442 1.0 /*wrap_around*/, 1.5/65535 /*tolerance*/,
443 test_name); 443 test_name);
444 } 444 }
445 445
446 function readAndVerifyR32F(gl, width, height, flip_y, test_name) { 446 function readAndVerifyR32F(gl, width, height, flip_y, test_name) {
447 var arr = new Float32Array(width * height * 4); 447 var arr = new Float32Array(width * height * 4);
448 gl.readPixels(0, 0, width, height, gl.RGBA, gl.FLOAT, arr); 448 gl.readPixels(0, 0, width, height, gl.RGBA, gl.FLOAT, arr);
449 var color_step = 1.0 / (width + height); 449 var color_step = 1.0 / (width + height);
450 return verifyPixelsRed(arr, width, height, flip_y, color_step, 450 return verifyPixels(arr, width, height, flip_y, color_step,
451 1.0 /*wrap_around*/, 1.5 / 65535 /*tolerance*/, 451 1.0 /*wrap_around*/, 1.5 / 65535 /*tolerance*/,
452 » » » » » » test_name); 452 test_name);
453 } 453 }
454 454
455 function onLoad() { 455 function onLoad() {
456 var query = /query=(.*)/.exec(window.location.href); 456 var query = /query=(.*)/.exec(window.location.href);
457 if (!query) 457 if (!query)
458 return; 458 return;
459 if (query[1] == "RGBAUint8") 459 if (query[1] == "RGBAUint8")
460 depthStreamToRGBAUint8Texture(); 460 depthStreamToRGBAUint8Texture();
461 else if (query[1] == "RGBAFloat") 461 else if (query[1] == "RGBAFloat")
462 depthStreamToRGBAFloatTexture(); 462 depthStreamToRGBAFloatTexture();
463 else if (query[1] == "R32Float") 463 else if (query[1] == "R32Float")
464 depthStreamToR32FloatTexture(); 464 depthStreamToR32FloatTexture();
465 } 465 }
466 </script> 466 </script>
467 </head> 467 </head>
468 <body onload="onLoad()"> 468 <body onload="onLoad()">
469 <table border="0"> 469 <table border="0">
470 <tr> 470 <tr>
471 <td><video id="local-view-1" width="96" height="96" autoplay 471 <td><video id="local-view-1" width="96" height="96" autoplay
472 style="display:none"></video></td> 472 style="display:none"></video></td>
473 <!-- The canvas is used to detect when video starts and stops. --> 473 <!-- The canvas is used to detect when video starts and stops. -->
474 <td><canvas id="local-view-1-canvas" width="96" height="96" 474 <td><canvas id="local-view-1-canvas" width="96" height="96"
475 style="display:none"></canvas></td> 475 style="display:none"></canvas></td>
476 </tr> 476 </tr>
477 </table> 477 </table>
478 </body> 478 </body>
479 </html> 479 </html>
OLDNEW
« no previous file with comments | « content/test/data/media/depth_stream_test_utilities.js ('k') | gpu/command_buffer/common/capabilities.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698