Why use YUV to collect source data
The image uses RGB one pixel point RGB 8 + 8 + 8bit
One frame = 3 bytes * 1280* 720/1024/1024 = 2.63m storage space
In order to reduce the amount of YUV data in the video, the brightness is selectively discarded, because the video can reach 60 frames per second, without the appearance of blurring and other phenomena. Adjacent pixels have similar colors, and the sampling rate of the loss of the borrow is one pixel YUV 8 + 8 + 8
- YUV 4:4:42.63m - YUV 4:2:21.76m - YUV 4:2:01.32m Collect dataCopy the code
4:2:2 Y color degree is not lost, near color borrow UV, the acquisition level of 10 pixels, 10 Y, 5 U/V
4:2:0 borrow up and down,
Then H264 compression. 88G – 873M
Black and white/color TV, one line Y signal, three lines Y, U, V
Phone screen RGBa
YUV<=>RGB conversion formula such as 720p, 1280*720 = 921600,92W YUV=>RGB, CPU is impossible to perform to GPU, performance GPU is good at parallel computing, CPU serial logical computing
Metal
-
Vertex function that determines the position of the graph buttonCopy the code
-
The slice function, slice/pixel, calculates the value of each pixel point in the moleCopy the code