Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accelerated textured depth streaming #2

Closed
bmegli opened this issue Feb 24, 2020 · 3 comments
Closed

accelerated textured depth streaming #2

bmegli opened this issue Feb 24, 2020 · 3 comments
Labels
planning high level plans

Comments

@bmegli
Copy link
Owner

bmegli commented Feb 24, 2020

Related to #1

Potential Encoding

Currently only luminance Y plane of HEVC Main10 P010LE (encoding details) is used.

This means that P010LE chroma (interleaved U/V) channel is still unused.

The U/V plane is:

  • half the size of Y (H/2 height and same stride as Y)
  • with P010LE this means 16 bits for each color value of which only 10 MSBs are used

Funnily enough this is exactly the size of D435 infrared greyscale data (which is 8 bit per sample with Y8 format).

If the stride of infrared matches its width it should be possible to:

  • directly map infrared data to interleaved U/V plane data
  • at the cost of losing every second value (P010LE 16 bits of which only 10 MSBs are used)
  • the 2 excess LSB bits should not affect the encoding too much (LSB) and may be ignored

This is somewhat like 4:2:2 chroma sampling (if you consider IR "to be" the U/V chroma.

The decoding

The decoding would use the same mechanism as currently with additional notes:

Final notes

This should not affect latency in any significant way but may affect the required bitrate

  • the trivial chroma U/V plane is encoded, decoded and ignored anyway
  • increasing chroma complexity will affect the bitrate

It is difficult to say anything about the quality of texture encoding without performing some tests

  • the encoded and ignored 2 LSB bits from every second value may have minor impact
  • the resulting "4:2:2" sampling may have some impact (every second horizontal value)
@bmegli bmegli added the planning high level plans label Feb 24, 2020
bmegli added a commit to bmegli/unity-network-hardware-video-decoder that referenced this issue Feb 27, 2020
Experimental support for:
- depth data encoded in Y P010LE Main10 plane
- 8 bit color data encoded in UV P010LE Main10 plane

See #11

Proof of concept for decoding/rendering side of:
bmegli/hardware-video-streaming#2
@bmegli
Copy link
Owner Author

bmegli commented Feb 27, 2020

Working proof-of-concept between:

Some first subjective impressions:

  • textured point clouds need more bitrate
  • the effect for human perception is profound and worth it

Some quick screenshots, same view.

Point cloud only:
depth_only
Textured point cloud:
textured

bmegli added a commit to bmegli/realsense-network-hardware-video-encoder that referenced this issue Feb 28, 2020
Implementation with:
- depth encoded in luminance plane
- infrared encoded in chroma U/V plane

Requires at least KabyLake architecture.
Textured depth is implemented only for D435.
It is possible to also make it working for D415 (greyscale infrared, not implemented now).

Closes #2
implements encoding side of [hardware-video-streaming#2](bmegli/hardware-video-streaming#2)
bmegli added a commit to bmegli/unity-network-hardware-video-decoder that referenced this issue Feb 28, 2020
- hardware decode and render point clouds with greyscale colors (infrared D435)
- depth data encoded in Y P010LE Main10 plane
- 8 bit color data encoded in UV P010LE Main10 plane

For implementation details see #11

Closes #11
Implements decoding side of [hardware-video-streaming#2](bmegli/hardware-video-streaming#2)
@bmegli
Copy link
Owner Author

bmegli commented Feb 29, 2020

This is already implemented, merged into master branches and working between:

It would be nice at add some (short and simple) video showing the functionality.

@bmegli
Copy link
Owner Author

bmegli commented Mar 7, 2020

Done, documented, video added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
planning high level plans
Projects
None yet
Development

No branches or pull requests

1 participant