stereoscopic video and gstreamer€¦ · 3d movies avatar => ~2.8 billion usd 2010-10-18 martin...

26
2010-10-18 Martin Bisson 1 Stereoscopic video and GStreamer By Martin Bisson

Upload: others

Post on 23-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

2010-10-18 Martin Bisson 1

Stereoscopic video

and GStreamer

By Martin Bisson

Page 2: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Presentation outline

Introduction

Use cases

Implementation

Road ahead

2010-10-18 Martin Bisson 2

Page 3: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Presentation outline

Introduction

Use cases

Implementation

Road ahead

2010-10-18 Martin Bisson 3

Page 4: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Stereoscopy

2010-10-18 Martin Bisson 4

Page 5: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Recent popularity

3D-ready hardware

3D movies

Avatar => ~2.8 billion USD

2010-10-18 Martin Bisson 5

Page 6: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Presentation outline

Introduction

Use cases

Implementation

Road ahead

2010-10-18 Martin Bisson 6

Page 7: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Use cases

1) Merge 2 video streams into a stereo

stream

2) Convert a (double) video stream into a

stereo stream

2010-10-18 Martin Bisson 7

Page 8: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Use cases

3) Convert a stereo stream into a « regular »

video stream

Can be displayed or encoded by normal plugins

4) Generate an anaglyph video stream from

a stereo stream

5) Output a stereo stream on various 3D

display hardware

2010-10-18 Martin Bisson 8

Page 9: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Presentation outline

Introduction

Use cases

Implementation

Road ahead

2010-10-18 Martin Bisson 9

Page 10: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Implementation

What is a « stereo stream »?

Buffer flags?

New caps

video/x-raw-{rgb,yuv,gray}-stereo

layout = { 1122 , 1212 }

fourcc = { YUY2, YVYU, UYVY , Y800 ,

GREY , Y8 , Y16 }

2010-10-18 Martin Bisson 10

Page 11: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Memory layout

2010-10-18 Martin Bisson 11

1122

Memory-consecutive

1212

Row-interleaved

Page 12: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Supported formats

Only packed, no planar

RGB : RGBx, xRGB, BGRx, xBGR, RGB,

BGR, RGB_16, RGB_15

YUV : YUY2, YVYU, UYVY, Y800, GREY,

Y8, Y16

GRAY : GRAY8, GRAY16

2010-10-18 Martin Bisson 12

Page 13: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Plugins

video3dmerge

GstCollectPads

mode : memory-consecutive or row-interleaved

2010-10-18 Martin Bisson 13

Page 14: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Plugins

video3dconvert

GstVideoFilter

mode : left-right or top-bottom

2010-10-18 Martin Bisson 14

Page 15: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Plugins

video3dpresent

GstVideoFilter

mode : a lot of them…

2010-10-18 Martin Bisson 15

Page 16: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

video3dpresent modes

Left, Right

Left/Right, Right/Left, Top/Bottom, Bottom/Top

Anaglyph

Gray/Gray, Gray/Color, Color/Gray, Color/Color

Red/Cyan, Green/Magenta, Blue/Yellow, and vice-versa

2010-10-18 Martin Bisson 16

Page 17: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Anaglyph implementation

« C templates »

Inspired by ffmpegcolorspace (imgconvert.c)

Orc optimization

Only RGBx/BGRx/xRGB/xBGR output formats

YUY2/YVYU/UYVY/Y800/GREY/Y8/Y16 input

formats for gray-gray anaglyph

RGBx/BGRx/xRGB/xBGR input formats for all

anaglyph types

2010-10-18 Martin Bisson 17

Page 18: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

2010-10-18 Martin Bisson 18

Page 19: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Example application

2010-10-18 Martin Bisson 19

Page 20: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Presentation outline

Introduction

Use cases

Implementation

Road ahead

2010-10-18 Martin Bisson 20

Page 21: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Integration

Not in main GStreamer tree (in a branch at

http://www.gitorious.org/video3d/video3d/)

Talks about how to handle stereo video:

Buffer flags

Metadata

New caps

2010-10-18 Martin Bisson 21

Page 22: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Integration

New caps (video/x-raw-*-stereo)

Caps negotiation and all that jazz…

Buffer flags/metadata

Buffers can be used in existing plugins

2010-10-18 Martin Bisson 22

Page 23: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Integration

2010-10-18 Martin Bisson 23

Page 24: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

3D hardware

Implement stereo sinks

NVIDIA 3D Vision

Quad Buffered OpenGL

iZ3D

Etc…

See Stereoscopic Player

(http://www.3dtv.at/)

2010-10-18 Martin Bisson 24

Page 25: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

Stereo codecs

Multiview Video Coding (H.264/MPEG-4

AVC)

Uses temporal AND inter-view prediction

Existing implementation by Nokia

http://research.nokia.com/page/4988

2010-10-18 Martin Bisson 25

Page 26: Stereoscopic video and GStreamer€¦ · 3D movies Avatar => ~2.8 billion USD 2010-10-18 Martin Bisson 5. Presentation outline Introduction Use cases Implementation Road ahead 2010-10-18

2010-10-18 Martin Bisson 26

Questions?