Use OpenGL to convert RGB to YUV image formats

Interviewer: Please use OpenGL to convert RGB to YUV image format.  I……

Recently, a reader gave feedback in the background: When participating in an interview, the interviewer asked him to use a shader to convert the image format RGB to YUV. After hearing this, he was confused, and then told the interviewer angrily that he only used I have done shader conversion from YUV to RGB, but I don’t know what the idea is for converting RGB to YUV.

In response to his doubts, today I will write an article to introduce how to use OpenGL to convert RGB to YUV image formats to help readers resolve such problems.

Recommended YUV image viewing tools

A reader asked me to recommend a YUV image viewing software. Since I couldn't share the tools I had, I searched around on Github and found that this type of open source software has a lot of bugs.

YUV image viewing tool

Finally, I found a free commercial software, YUV Viewer, which is okay to use.

https://www.elecard.com/products/video-analysis/yuv-viewer

It is just that it is slow to download. I have already downloaded it for readers. [Byte Flow] You can get it by replying the keyword yuvViewer in the background.

benefit

What are the usage scenarios of using shader to convert RGB to YUV image format? It is extremely commonly used in production environments.

Guess you like

Origin blog.csdn.net/Kennethdroid/article/details/117675581