|
16 bpp video stream capture, render and WebGL usage - Realsense R200 & SR300 support.
It Supports 16 bit depth and infrared video streams from R200 and SR300.
Verified to work on Windows 10 and Ubuntu 16.04.
Rendering video element:
========================
16bpp frames are uploaded to RG textures, respectively - for RG textures
lower byte goes to 'R' and higher byte to 'G'.
Rendered output is original RG texture. Screenshots of demo are available on
crbug.com/624436 page.
RG88 path required custom bilinear filter in shaders.cc.
WebGL:
======
Upload video to texture:
In all the textures, R, G, B components have the same value (as luminance).
- RGBA UNSIGNED_BYTE: R, G and B components presents upper byte of 16 bit video,
so, with precision loss.
- RGB/RGBA FLOAT: Normalized 16 bit value in R, G and B component - no precision loss.
Getting full 16 bit or float data to javascript:
===============================================
1. on start, create framebuffer, attach (COLOR_ATTACHMENT0) RGBA FLOAT texture to it.
2. In loop, when video is ready, after texImage2D video to the texture, bind
the framebuffer and call readpixels to FloatArray. This way the data is
accessible from javascript.
Complete examples are available on Issue 624436 page.
2D canvas + getImageData returns 8 bit color components (higher bit value) in RGBA.
BUG= 624436
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Total comments: 2
Total comments: 2
Total comments: 3
Total comments: 10
Total comments: 3
Total comments: 15
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+1841 lines, -402 lines) |
Patch |
|
M |
cc/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/cc_param_traits.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/cc_param_traits_macros.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/cc_param_traits_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/quads.mojom
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/quads_struct_traits.h
|
View
|
1
2
3
4
5
6
7
|
5 chunks |
+29 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/ipc/quads_struct_traits.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+19 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/layers/video_layer_impl.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+16 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/ca_layer_overlay.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/gl_renderer.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+10 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/gl_renderer.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+79 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/gl_renderer_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/renderer_pixeltest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+138 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/shader.h
|
View
|
1
2
3
4
|
1 chunk |
+21 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/shader.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
1 chunk |
+52 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/output/software_renderer.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
cc/quads/draw_quad.h
|
View
|
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
cc/quads/draw_quad_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+46 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/quads/render_pass.cc
|
View
|
1
2
3
4
5
6
7
|
2 chunks |
+4 lines, -0 lines |
0 comments
|
Download
|
|
A + |
cc/quads/y_video_draw_quad.h
|
View
|
1
2
3
4
5
6
|
4 chunks |
+15 lines, -23 lines |
0 comments
|
Download
|
|
A |
cc/quads/y_video_draw_quad.cc
|
View
|
1
2
3
4
5
6
|
1 chunk |
+63 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/raster/raster_buffer_provider.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/resources/platform_color.h
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
cc/resources/platform_color_unittest.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
cc/resources/resource_format.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
cc/resources/resource_format.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
6 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/resources/resource_format_utils.cc
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
cc/resources/resource_provider.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/resources/resource_provider.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
6 chunks |
+11 lines, -0 lines |
0 comments
|
Download
|
|
M |
cc/resources/video_resource_updater.h
|
View
|
1
2
3
4
5
6
7
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
cc/resources/video_resource_updater.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
11 chunks |
+29 lines, -12 lines |
0 comments
|
Download
|
|
A |
cc/test/data/intersecting_light_dark_squares_video.png
|
View
|
1
2
3
4
5
6
|
Binary file |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_buffer_pool_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_controller.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+5 lines, -3 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_controller_event_handler.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_controller_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
14 chunks |
+57 lines, -57 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_device_client_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_host.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/renderer_host/media/video_capture_manager.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
|
M |
content/browser/webrtc/webrtc_getusermedia_browsertest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+13 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/renderer/media/renderer_gpu_video_accelerator_factories.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
content/renderer/media/renderer_gpu_video_accelerator_factories.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+6 lines, -1 line |
0 comments
|
Download
|
|
M |
content/renderer/media/video_capture_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+4 lines, -3 lines |
0 comments
|
Download
|
|
A |
content/test/data/media/depth_stream_test_utilities.js
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+84 lines, -0 lines |
0 comments
|
Download
|
|
M |
content/test/data/media/getusermedia.html
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+16 lines, -0 lines |
0 comments
|
Download
|
|
M |
media/base/video_frame.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
5 chunks |
+28 lines, -14 lines |
0 comments
|
Download
|
|
M |
media/capture/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+10 lines, -2 lines |
0 comments
|
Download
|
|
D |
media/capture/video/blob_utils.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+0 lines, -23 lines |
0 comments
|
Download
|
|
D |
media/capture/video/blob_utils.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+0 lines, -69 lines |
0 comments
|
Download
|
|
M |
media/capture/video/fake_video_capture_device.h
|
View
|
1
2
3
4
5
6
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
media/capture/video/fake_video_capture_device.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
5 chunks |
+55 lines, -16 lines |
0 comments
|
Download
|
|
M |
media/capture/video/fake_video_capture_device_factory.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+16 lines, -6 lines |
0 comments
|
Download
|
|
M |
media/capture/video/fake_video_capture_device_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
7 chunks |
+33 lines, -22 lines |
0 comments
|
Download
|
|
M |
media/capture/video/linux/v4l2_capture_delegate.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
3 chunks |
+24 lines, -4 lines |
0 comments
|
Download
|
|
M |
media/capture/video/video_capture_device_client.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
6 chunks |
+46 lines, -12 lines |
0 comments
|
Download
|
|
M |
media/capture/video/video_capture_device_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+19 lines, -0 lines |
0 comments
|
Download
|
|
A + |
media/capture/video/video_capture_utils.h
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+9 lines, -3 lines |
0 comments
|
Download
|
|
A + |
media/capture/video/video_capture_utils.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+15 lines, -1 line |
0 comments
|
Download
|
|
M |
media/capture/video/win/sink_input_pin_win.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+10 lines, -2 lines |
0 comments
|
Download
|
|
M |
media/capture/video/win/video_capture_device_factory_win.cc
|
View
|
1
2
3
4
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
|
M |
media/capture/video/win/video_capture_device_mf_win.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
|
M |
media/capture/video/win/video_capture_device_win.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+4 lines, -1 line |
0 comments
|
Download
|
|
M |
media/renderers/gpu_video_accelerator_factories.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+4 lines, -3 lines |
0 comments
|
Download
|
|
M |
media/renderers/mock_gpu_video_accelerator_factories.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
media/renderers/skcanvas_video_renderer.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+56 lines, -1 line |
0 comments
|
Download
|
|
M |
media/renderers/skcanvas_video_renderer.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
9 chunks |
+356 lines, -11 lines |
0 comments
|
Download
|
|
M |
media/renderers/skcanvas_video_renderer_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+58 lines, -0 lines |
0 comments
|
Download
|
|
M |
media/video/gpu_memory_buffer_video_frame_pool.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
23 chunks |
+97 lines, -39 lines |
0 comments
|
Download
|
|
M |
media/video/gpu_memory_buffer_video_frame_pool_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
4 chunks |
+48 lines, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/html/HTMLVideoElement.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+14 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/core/html/HTMLVideoElement.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+19 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
11 chunks |
+80 lines, -48 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/ImageBuffer.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
2 chunks |
+0 lines, -5 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/Source/platform/graphics/gpu/Extensions3DUtil.cpp
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+10 lines, -2 lines |
0 comments
|
Download
|
|
M |
third_party/WebKit/public/platform/WebMediaPlayer.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
1 chunk |
+17 lines, -0 lines |
0 comments
|
Download
|
Total messages: 60 (31 generated)
|