SMPTE 2022-6 A Practical IP Software Encode/Decode ...

24
SMPTE 2022-6 A Practical IP Software Encode/Decode Implementation

Transcript of SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Page 1: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

SMPTE 2022-6 A Practical IP Software

Encode/Decode Implementation

Page 2: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Jean Lapierre

Senior Director of Engineering

and

Bruno Latorre

Software Project Manager

Matrox Video

Page 3: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Matrox = Hardware

• We develop PCIe cards and a powerful SDK

• Our customers build broadcast equipment

• We have more software engineers than hardware engineers!

Page 4: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Why we Decided to do a Study

• Customer asked why he still needed hardware

• Using inexpensive off-the-shelf hardware

• Racks of computers running virtual machines

• Vidtrans presenter said it would help with latency

Page 5: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

The Project

• Selected a 1080i signal using SMPTE 2022-6

• Used a Windows machine and 10 Gig network card

• Lots of data to handle, 135000 packets/sec

• Quick response, new packet every 7.4 uSec

• Don’t use too many system resources

Page 6: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Complexity of SMPTE 2022-6

• Transition from a 10 bits aligned (SDI) to a 8 bits aligned (computer) space

• Building a proper SDI frame is complex

• Building UDP packets from scratch

Page 7: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Scope of Software Implementation

• Windows only, process video only on receive/transmit

• Receiver

• Transmitter

IP Stream Receiver

Video Demuxer

Video SDI Out Depacketizer

IP Stream Transmiter

Video Muxer

SDI Video In Packetizer

Page 8: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Setup • CPU: E5620 @ 2.40GHz (2 processors, 16 logical cores), RAM: 12GB

• Network: Intel X520-2, Switch: 10GE

• Matrox XMIO3 I/O hardware

SDI In

IP Out IP In SDI Out

(Transmitter) (Receiver)

(10GE Switch)

(Feed 1080i59.94)

Page 9: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

OSI Model

Physical Link

Data User

Application Layer

Presentation Layer

UDP Transport Layer

Network Layer

Data link Layer

Physical Layer

Transmit Receive

Data

RTP, HBRMP

IPv4

802.3, …

Session Layer

Page 10: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Sockets

• What is a socket?

• Windows uses sockets (Winsock)

– Easy to implement

– Close to the OSI protocol stack model

– Filtering is packet based and at user space

– Our experience with SMPTE 2022-6

Page 11: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Finding a Solution

• Bypassing some of the layers

• Winsock and raw sockets

• A solution without Winsock

• Implement a protocol driver to bypass the protocol stack

• Implement a more efficient packet filtering (kernel space)

• Minimize context switches between kernel and user space

Page 12: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Our Solution

Physical Link

Receive Raw Ethernet Frames

Data

Application Builds Raw Ethernet

Frames

User

Data Link Layer

Physical Layer

Transmit Receive

Data

Application Layer RTP, HBRMP, UDP, IPv4

802.3, …

Efficient Packet Filtering = = = = = = = = = = = = = = = = = = = =

Page 13: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Receiving and CPU Load

– What we got …

– What we wanted …

Page 14: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

What We Did

• Distribute CPU load when receiving data

– Receive side scaling (RSS)

Page 15: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Results Receiver

• 1 stream, multicast

• 3 streams, multicast

Page 16: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Issues with Transmission

• Bursting the network is prohibited

• Notification granularity of operating system is in milliseconds whereas what we need is microseconds!

• Need to implement a busy loop function

Page 17: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Results Transmitter

• 1 stream transmitter

Page 18: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Conclusions

• Will my customer still need hardware?

• 4 Input and 4 Output CPU usage

Page 19: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Conclusions

• Can everything run on generic hardware?

Page 20: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Conclusions

• Can everything run on generic hardware?

• Observations about virtual machines.

Page 21: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Conclusions

• Can everything run on generic hardware?

• Observations about virtual machines.

• Can IP video really deliver lower latency?

Page 22: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Conclusions

• Can everything run on generic hardware?

• Observations about virtual machines.

• Can IP video really deliver lower latency?

• The future needs compression

Page 23: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Conclusions

• Can everything run on generic hardware?

• Observations about virtual machines.

• Can IP video really deliver lower latency?

• The future needs compression

• What is in it for me?

Page 24: SMPTE 2022-6 A Practical IP Software Encode/Decode ...

Contact Information

• Jean Lapierre

• Senior Director of Engineering

• Matrox Video Product Group

[email protected]