yuv420 and converted to bgr

Article directory Get the yuv video frame data y and uv from the video channel, read and merge them into a complete yuv and convert it to bgr. Detailed explanation Further encapsulation ImageConverter.h ImageConverter.cpp main.cpp Obtain yuv video frame data y and uv from the video channel, read and merge them into complete yuv and […]

Understand image formats RAW, RGB, YUV, Packed/Unpacked, Bayer, MIPI, Planar, Semi-Planar, Interleaved in one article

Table of Contents 1. General attributes 1.Packed/Unpacked 2. Compressed/uncompressed 2. RAW 1. Bayer format 2. Classification 3. MIPI RAW 3. RGB Classification 4. YUV 1. YUV to RGB conversion 2. Classification 3. Memory computing 5. Compression format Some people miss it and will never find it again in their lifetime. This article analyzes in detail […]

In ffmpeg, why is the network video stream h264 converted to YUV by default instead of other formats?

When making online videos, knowing and clarifying some video programming concepts early will save you a lot of detours. Corresponding to video transcoding and transmission, if you follow the code directly at first, it is easy to feel that you understand everything, but why you do this seems to be explained in detail. For example: […]

RGB and YUV formula conversion and derivation

Table of Contents Introduction Full Range formula derivation Limit Range derivation Verification Test References Introduction There are many standards for conversion between RGB and YUV. The coefficients of different standards are different, and it is often easy to get confused. There are also differences between full range and limitrange. In fact, these conversion coefficients are […]

Work notes-YUV dump and read

Work notes-YUV dump and read Work notes-YUV dump and read Use dump to generate images yuv2img yuv2img code Work notes-YUV dump and read The work involves work related to model verification. Here is the joint effect of the three models. When the perception model reads the image, it replaces the input with its own given […]

YUV420 stored as BMP and JPG images

YUV420 is stored as BMP and JPG images [personal test and valid] Most of the information about YUV420 on the Internet is about YUV420P, and there is very little about YUV420SP, because the UVs of YUV420SP are staggered, which is relatively troublesome to process, but YUV420SP is also a A common format, so here, I […]

cmake project joins libyuv

Build a cmake project and test whether libyuv compiles successfully on github Entire directory structure Specific approach Create a 3rdparty file, and create a libyuv file inside. Create three files bin include lib in libyuv Copy the header files from the official libyuv in include Copy the compiled libyuv.a\ libyuv.so to the lib folder. Copy […]

How does the Android side pull the RTSP/RTMP stream and call back the YUV/RGB data and then inject the lightweight RTSP service?

Technical background When we were developing audio and video modules for the Android platform, we encountered such a problem. Manufacturers wanted to pull the RTSP streams from Hikvision, Dahua and other cameras, and then send the decoded YUV or RGB data back to them, and they would make videos. After analysis or processing, it is […]

ffmpeg call test under Windows (YUV420P encoding)

1 Download static libraries and dynamic libraries If you are loading dynamically, you can directly use the dynamic library (dlopen, etc.); otherwise, use the dynamic + static method (static loading method of dynamic library); or directly compile the static library into your execution program (pure static components use ); https://www.gyan.dev/ffmpeg/builds/#libraries Add component vs2022: Properties->c/c++->Additional include […]

libyuv implements general cvt, resize, crop functions

My idea of implementation is to convert all formats to i420 first, and then perform crop resize and cvt operations. Get Fourcc code uint32_t Scaler::GetFOURCC(const Scaler::Buffer *src) { uint32_t fourcc = 0; switch (src->color) { case Scaler::ColorFormat::YUV_I420: fourcc = libyuv::FourCC::FOURCC_I420; break; case Scaler::ColorFormat::YUV_NV21: fourcc = libyuv::FourCC::FOURCC_NV21; break; case Scaler::ColorFormat::YUV_NV12: fourcc = libyuv::FourCC::FOURCC_NV12; break; case Scaler::ColorFormat::BGR: […]