VideoFrame copyTo RGB

Pick color, alpha value, VideoFrame's colorSpace, and its copyTo options, then click Draw

Y = 0.299 * R + 0.587 * G + 0.114 * B

U = -0.169 * R - 0.331 * G + 0.5 * B + 128

V = 0.5 * R - 0.419 * G - 0.081 * B + 128

copyTo Options

VideoFrame color space

Note

The canvas size is 20 x 20. The "bytes" below is RGBA buffer data from canvas's getImageData, while "copyTo" data is from VideoFrame's copyTo method.

Click here to check copyTo performance if needed.

fillRect

bytes:

drawImage with VideoFrame RGBX

bytes: copyTo:

drawImage with VideoFrame RGBA

bytes: copyTo:

drawImage with VideoFrame I420

bytes: copyTo:

drawImage with VideoFrame I420A

bytes: copyTo: