back to index

Stereoscopic 3D video
      3d stereoscopy types
            left/right in the same image
            spatially separated images
            temporally separated images
      Practical systems
      3D HDMI types
            anaglyph
            individual independent streams
            frame packed, 3DFP, FP
            frame sequential, FS, F/S, "page-flip", field-alternative
            side-by-side full, SbS-Full
            top-bottom, top-and-bottom, 3DTB, TB, TaB, T/B, over/under, above/below, AB
            side-by-side, SBS (for TVs, interlaced)
            side-by-side, 3DSBS, SBS, S/S, SBS half-horizontal, SBS-HH (for TVs, progressive)
            side-by-side, SBS (for VR)
            alternating scanlines, line-by-line, LbL, row-interlaced, horizontal-interlaced
                  line-alternative (maybe LbL?)
            checkerboard, CB, C/B, CK, alternating pixels, SbS-OLER/SbS-ELOR/SbS-OLOR/SbS-ELER (quincunx subsamplings), quincunx, Qx
            alternating columns, column-interlaced, vertical-interlaced
            layered-depth video, LDV
                  L-depth
                  L-depth+GFX
      most common formats
            streams on internet, video files
            3D players, BluRay...
      format signalling
            HDMI 3D formats
                  primary
                  secondary
software
      format support considerations
            resolution-halving approaches, frame-compatible formats (FCF)
            resolution-preserving approaches
            exotics
      quad-buffering
      javascript rendering frameworks (Babylon.js)
hardware support tests
      passive-3d LG TV, tested
      Epson Moverio BT-35 goggles, untested, researched
TODO

Stereoscopic 3D video

For stereoscopic video, a sometimes fairly good illusion of three-dimensional image, different image has to be served to each eye. (Assuming two eyes, side by side, human/mammal/bird/reptile class, no exotic arrangements.)

Ordinary displays tend to be flat, without depth, observed by both eyes from distance. Achieving per-eye delivery requires special measures and can be challenging, or compromises have to be taken.

If image from the same display is split to two channels, by filters or shutters, ghosting can become a problem; imperfect separation of left/right channels leave a weak "echo" image in the wrong channel. Can be significantly annoying.

Intro slides: https://www.iwssip.org/archive/2012/fileadmin/CONTENT/Logos/IWSSIP%202012%20Tutorial%20Coding%20of%20Stereoscopic%20and%203D%20Video.pdf

Signal description: https://etmriwi.home.xs4all.nl/forum/hdmi_spec1.4a_3dextraction.pdf

3d stereoscopy types

left/right in the same image

spatially separated images

temporally separated images

Practical systems

Anaglyph based systems became rare. Due to their simplicity they still can be encountered in niche applications.

Most common systems encountered in the wild as of 2020 are:

3D HDMI types

In context of HDMI displays (assume 1920x1080, other sizes are the same via simple proportions), several ways to deliver the 3d signal are used.

As 3d requires twice the information, one of compromises has to be taken:

For video file compression, some formats are better than others; compression combines many pixels into macroblocks (8x8, 16x16, 32x32...) and sharp transitions inside may be corrupted (see the fringing around edges in JPEG images for an example). Having boundaries between the left and right images in the macroblock can introduce such fringing as crosstalk/ghosting.

Discrete images (top-bottom, side-by-side, frame sequential...) are much more friendly than more intimate mixing (alternate lines, alternate columns, checkerboard patterns...). With most resolutions, even the largest macroblocks can be vertically divided (1920 is 30 64-pixel macroblocks, 1280 is 20). Horizontally (for top-bottom) the division is less favorable, but with only one boundary through macroblocks the effects are sweeped to the topmost and bottommost edges of the image where they are way less conspicuous.

anaglyph

individual independent streams

frame packed, 3DFP, FP

[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LLLLLL  LLLLLL  ]
[------------------]
[  RRRR    RRRR    ]
[  RR  RR  RR  RR  ]
[  RR  RR  RR  RR  ]
[  RRRR    RRRR    ]
[  RR RR   RR RR   ]
[  RR  RR  RR  RR  ]

frame sequential, FS, F/S, "page-flip", field-alternative

[  LL      LL      ][  RRRR    RRRR    ][  LL      LL      ][  RRRR    RRRR    ]
[  LL      LL      ][  RR  RR  RR  RR  ][  LL      LL      ][  RR  RR  RR  RR  ]
[  LL      LL      ][  RR  RR  RR  RR  ][  LL      LL      ][  RR  RR  RR  RR  ]
[  LL      LL      ][  RRRR    RRRR    ][  LL      LL      ][  RRRR    RRRR    ]
[  LL      LL      ][  RR RR   RR RR   ][  LL      LL      ][  RR RR   RR RR   ]
[  LLLLLL  LLLLLL  ][  RR  RR  RR  RR  ][  LLLLLL  LLLLLL  ][  RR  RR  RR  RR  ]
   ----> time

side-by-side full, SbS-Full

[  LL      LL        RRRR    RRRR    ]
[  LL      LL        RR  RR  RR  RR  ]
[  LL      LL        RR  RR  RR  RR  ]
[  LL      LL        RRRR    RRRR    ]
[  LL      LL        RR RR   RR RR   ]
[  LLLLLL  LLLLLL    RR  RR  RR  RR  ]

top-bottom, top-and-bottom, 3DTB, TB, TaB, T/B, over/under, above/below, AB

[  LL      LL      ]
[  LL      LL      ]
[  LLLLLL  LLLLLL  ]
[  RRRRR   RRRRR   ]
[  RRRRR   RRRRR   ]
[  RR  RR  RR  RR  ]

side-by-side, SBS (for TVs, interlaced)

side-by-side, 3DSBS, SBS, S/S, SBS half-horizontal, SBS-HH (for TVs, progressive)

[ L   L    RR  RR  ]
[ L   L    R R R R ]
[ L   L    R R R R ]
[ L   L    RR  R   ]
[ L   L    R R RR  ]
[ LLL LLL  R R R R ]

side-by-side, SBS (for VR)

[  LL        RRRR    ]
[  LL        RR  RR  ]
[  LL        RR  RR  ]
[  LL        RRRR    ]
[  LL        RR RR   ]
[  LLLLLL    RR  RR  ]

alternating scanlines, line-by-line, LbL, row-interlaced, horizontal-interlaced

[  LL      LL      ]
[  RRRRR   RRRRR   ]
[  LL      LL      ]
[  RRRRR   RRRRR   ]
[  LLLLLL  LLLLLL  ]
[  RR  RR  RR  RR  ]
line-alternative (maybe LbL?)
[  LL      LL      ]
[  RRRR    RRRR    ]
[  LL      LL      ]
[  RR  RR  RR  RR  ]
[  LL      LL      ]
[  RR  RR  RR  RR  ]
[  LL      LL      ]
[  RRRR    RRRR    ]
[  LL      LL      ]
[  RR RR   RR RR   ]
[  LLLLLL  LLLLLL  ]
[  RR  RR  RR  RR  ]

checkerboard, CB, C/B, CK, alternating pixels, SbS-OLER/SbS-ELOR/SbS-OLOR/SbS-ELER (quincunx subsamplings), quincunx, Qx

[ LR R    LR R     ]
[ RL  R   RL  R    ]
[ LR   R  LR   R   ]
[ RLR     RLR      ]
[ LR   R  LR   R   ]
[ RL LRL  RL LRL   ]

alternating columns, column-interlaced, vertical-interlaced

[ LR R    LR R     ]
[ LR   R  LR   R   ]
[ LR   R  LR   R   ]
[ LR R    LR R     ]
[ LR   R  LR   R   ]
[ LRL LR  LRL LR   ]

layered-depth video, LDV

described in paper: http://pixeltje.be/wp-content/uploads/Bartczaketal11.pdf

see also 2D-plus-depth

L-depth
[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LLLLLL  LLLLLL  ]
[------------------]
[  depth           ]
[  depth           ]
[  depth           ]
[  depth           ]
[  depth           ]
[  depth           ]
L-depth+GFX
[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LL      LL      ]
[  LLLLLL  LLLLLL  ]
[------------------]
[  depth           ]
[  depth           ]
[  depth           ]
[  depth           ]
[  depth           ]
[  depth           ]
[------------------]
[  graphics        ]
[  graphics        ]
[  graphics        ]
[  graphics        ]
[  graphics        ]
[  graphics        ]
[------------------]
[  graphics depth  ]
[  graphics depth  ]
[  graphics depth  ]
[  graphics depth  ]
[  graphics depth  ]
[  graphics depth  ]

most common formats

streams on internet, video files

In contect of youtube streams, the most common 3d video is SBS-HH, TV flavor. The VR flavor is close second, if not first already. Top-bottom is fairly rare.

The Kodi player 3D uses filename conventions as a format hint.

Eg. "movie.3d.sbs.mkv" is a side-by-side 3d movie.

Usually they come in the frame-compatible way, where two images are anamorphically squeezed to one of the same size.

Full-size images in double-length or double-width frames are comparatively rare.

3D players, BluRay...

The players usually support the frame-packed format as a default.

This one takes twice the bandwidth, but the movies usually are running in 24, 25, 29.97 or 30 fps, which gives plenty of margin.

format signalling

For HDMI displays, the signalling of 3d content presence can be done automatically. In the HDMI signal, the messages are transmitted in InfoFrames, in the Control Island.

3d displays usually have the possibility of manual selection of the 3d standard, for the case when the stream type is not in the HDMI stream.

The InfoFrame is a CEA-861 vendor-specific frame, has structure as follows (according to HDMI1.4a, 2010):

Metadata for parallax_zero, parallax_scale, dref and wref can be present in further bytes.

HDMI 3D formats

primary
 720p@50,59.94/60       - FP, SbS-HH, TB
 720p@23.98/24,29.97/30 - FP
1080i@50,59.94/60       - FP, SbS-HH
1080p@23.98/24          - FP, SbS-HH, TB
1080p@29.97/30          - FP,         TB
1080p@50,59.94/60       -             TB
secondary
 720x240p@50            - FP, SbS-HH, TB
1440x240p@50            - FP, SbS-HH, TB
2880x240p@59.94/60      - FP, SbS-HH, TB
 720x288p@50            - FP, SbS-HH, TB
1440x288p@50            - FP, SbS-HH, TB
2880x288p@50            - FP, SbS-HH, TB
 640x480p@59.94/60      - FP, SbS-HH, TB
 720x480i@59.94/60      - FP, SbS-HH, TB
 720x480p@59.94/60      - FP, SbS-HH, TB
 720x480i@119.88/120    - FP, SbS-HH, TB
 720x480p@119.88/120    - FP, SbS-HH, TB
 720x480i@239.76/240    - FP, SbS-HH, TB
 720x480p@239.76/240    - FP, SbS-HH, TB
1440x480i@59.94/60      - FP, SbS-HH, TB
1440x480p@59.94/60      - FP, SbS-HH, TB
1440x480i@119.88/120    - FP, SbS-HH, TB
1440x480i@239.76/240    - FP, SbS-HH, TB
2880x480i@59.94/60      - FP, SbS-HH, TB
2880x480p@59.94/60      - FP, SbS-HH, TB
 720x576i@50            - FP, SbS-HH, TB
 720x576p@50            - FP, SbS-HH, TB
 720x576i@100           - FP, SbS-HH, TB
 720x576p@100           - FP, SbS-HH, TB
 720x576i@200           - FP, SbS-HH, TB
 720x576p@200           - FP, SbS-HH, TB
1440x576i@50            - FP, SbS-HH, TB
1440x576p@50            - FP, SbS-HH, TB
1440x576i@100           - FP, SbS-HH, TB
1440x576i@200           - FP, SbS-HH, TB
2880@576i@50            - FP, SbS-HH, TB
2880@576p@50            - FP, SbS-HH, TB
1280x720p@23.98/24      -     SbS-HH, TB
1280x720p@25            - FP, SbS-HH, TB
1280x720p@29.97/30      -     SbS-HH, TB
1280x720p@100           - FP, SbS-HH, TB
1280x720p@119.88/120    - FP, SbS-HH, TB
1920x1080p@25           - FP, SbS-HH, TB
1920x1080p@29.97/30     -     SbS-HH
1920x1080i@50           - FP, SbS-HH, TB   1250 lines total
1920x1080i@50,59.94/60  -             TB
1920x1080p@59.94/60     - FP, SbS-HH
1920x1080i@100          - FP, SbS-HH
1920x1080p@100          -     SbS-HH, TB
1920x1080i@119.88/120   - FP, SbS-HH, TB
1920x1080p@119.88/120   -     SbS-HH, TB

software

for 3D signalling to TV (from omxplayer):

on raspi, in /opt-vc/include/interface/vmcs_host/vc_hdmi_property.h:

 * 3D structure: param1 - 3D structure (e.g. top/bottom side by side) (default value is none, i.e. 2D)
 *               param2 - n/a at the moment, may be used in the future
 *
 * 3D structure is auto reset to "2D" every time HDMI is power on. Only affect CEA formats.
 */
 * Matched to the 3d struct bit fields stored internally to represent 3D support in EDID
 */
typedef enum {
   HDMI_3D_FORMAT_NONE = 0,           /** plain and simple 2D! */
   HDMI_3D_FORMAT_SBS_HALF = (1<<7),  /** side by side half horizontal */
   HDMI_3D_FORMAT_TB_HALF  = (1<<6),  /** top and bottom half vertical */
   HDMI_3D_FORMAT_FRAME_PACKING = (1<<8),  /** frame packed */
   HDMI_3D_FORMAT_FRAME_SEQUENTIAL = (1<<9),  /** Output left on even frames and right on odd frames (typically 120Hz)*/
   /* More 3D structs, e.g. full frame packing, may be added here */
   HDMI_3D_FORMAT_INVALID = 0xFFFF
} HDMI_3D_FORMAT_T;

in /opt-vc/include/interface/vmcs_host/vc_hdmi.h:

 * All possible 3D structures
 * to be used in decoded 3D modes (e.g. HDMI_3D_SUPPORTED_MODE)
 */
typedef enum {
   HDMI_3D_STRUCT_NONE                                   = 0,
   HDMI_3D_STRUCT_FRAME_PACKING                          = (1<<0),
   HDMI_3D_STRUCT_FIELD_ALTERNATIVE                      = (1<<1),
   HDMI_3D_STRUCT_LINE_ALTERNATIVE                       = (1<<2),
   HDMI_3D_STRUCT_SIDE_BY_SIDE_FULL                      = (1<<3),
   HDMI_3D_STRUCT_L_DEPTH                                = (1<<4),
   HDMI_3D_STRUCT_L_DEPTH_GRAPHICS_GRAPHICS_DEPTH        = (1<<5),
   HDMI_3D_STRUCT_TOP_AND_BOTTOM                         = (1<<6),
   HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_HORIZONTAL           = (1<<7),
   HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_ODD_LEFT_ODD_RIGHT   = (1<<8),
   HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_ODD_LEFT_EVEN_RIGHT  = (1<<9),
   HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_EVEN_LEFT_ODD_RIGHT  = (1<<10),
   HDMI_3D_STRUCT_SIDE_BY_SIDE_HALF_EVEN_LEFT_EVEN_RIGHT = (1<<11),
   HDMI_3D_STRUCT_FRAME_SEQUENTIAL                       = (1<<12),
} HDMI_3D_STRUCT_T;

On raspi, 3D mode is set by call to m_BcmHost.vc_tv_hdmi_set_property(&property), with HDMI_PROPERTY_PARAM_T struct as parameter

On raspi, in tvservice.c, 3D format names are: (see HDMI_3D_STRUCT_T bit fields):

format support considerations

resolution-halving approaches, frame-compatible formats (FCF)

The SbS-HH and TB (and less commonly line-alternating) approaches divide the standard-size screen vertically or horizontally and squeeze the left and right image in. This can work on any ordinary video hardware with a single framebuffer (not counting doublebuffering etc...). The loss of half the resolution is cost of simplicity.

Standard video-handling pipelines can be used for processing the data - compressing, decompressing, editing, sending around...; the only difference to ordinary 2D video is the two frames being anamorphically squeezed together (or not even anamorphically if it is stereoscope-class VR).

The emergence of 4K displays is lending itself to such 3D video/image; the resolution that is normally unnecessarily high still provides a very acceptable full-HD even after losing half in each direction.

The line-alternating approach used to be employed in SDTV 3D, where even and odd frames recorded the left and right eye.

Aspect ratio correction can result in letterboxing, shifting the images around; vertical bars destroy TB, horizontal bars screw SbS.

SbS can be shot by lens using prisms/mirrors and anamorphic optics to handle the stereo acquisition before the light hits the sensor.

resolution-preserving approaches

The other approach is stretching the frame sent to the output device to twice the height or width (FP, SbS-Full, L-Alt - FP is standard), or twice as fast (F-Alt). This requires less ordinary hardware, usually requires direct support in the signal sending device (FP is common for BluRay players). Some nVidia videocards support quadruple buffers (two doublebuffers, one for each eye).

The resulting video is significantly more complex to handle, may not be supported by all software and hardware. Things can get quirky pretty fast.

exotics

The mosaicing approaches (SbS-OLOR/OLER/ELOR/ELER) are legacy techniques used by some early 3d DLP projectors. Rare to see in the wild.

The Ldep and Ldep+Gfx encode image and per-pixel depth (and graphics and graphics-depth) into each frame.

quad-buffering

Some videocards (NVidias, cards supporting AMD HD3D offer quad buffering. It is a bog-standard double-buffering, with separate buffer pairs for left and right eye, handled synchronously.

javascript rendering frameworks (Babylon.js)

As the image behaves like ordinary image/video, its further handling requires no other considerations. For the cost of losing half of vertical or horizontal resolution, the stereoscopic rendering can be done on unaugmented hardware and software; any WebGL supporting browser should do the job.

The video 3d flag in HDMI signal will not be set without special system calls. This may be solved by some independent process signalled to via HTTP request (or websocket/MQTT or so...), or left to be handled manually.


hardware support tests

passive-3d LG TV, tested

Epson Moverio BT-35 goggles, untested, researched


TODO


If you have any comments or questions about the topic, please let me know here:
Your name:
Your email:
Spambait
Leave this empty!
Only spambots enter stuff here.
Feedback: