Android OpenGL ES rendering YUV

1. EGL environment construction 1.1 Introduction to key methods 1)eglGetDisplay Get the EGL display window 2)eglInitialize Initialize the Display obtained in (1) 3)eglChooseConfig Select the best configuration data from the system based on the conditional requirements for the window 4)eglCreateContext Combine EGLDisplay and EGLConfig to create an EGL context 5)eglCreateWindowSurface Create a canvas through the […]

Android FFmpeg + OpenGL ES YUV Player

1. FFmpeg decodes YUV frame data Method introduction Open encapsulation format context 1) [avformat.h] avformat_open_input Open the media stream (local or network resource) to get the encapsulation format context AVFormatContext AVFormatContext contains basic information of the media, such as duration, etc. Initialize decoder 2) [avformat.h] avformat_find_stream_info Find all media data streams AVStream from the encapsulation […]

1-FPGA hardware acceleration-YUV_YCbCr

This is the study notes of “Image Processing Tutorial Based on Matlab and FPGA”. The code and content are excerpted from the book. Experience: The focus of using FPGA for hardware acceleration is to eliminate or reduce floating-point operations, convert them to fixed-point operations, and then convert them to parallel implementation through pipeline design to […]

Discussion on the differences and interface design of color coding formats such as NV21, NV12, YV12, RGB565, YUV, etc.

NV21, NV12, YV12, RGB565, YUV literacy NV21, NV12, YV12, RGB565, and YUV are different color encoding formats. These color encoding formats have their own characteristics and are suitable for different application scenarios. Choosing the appropriate color coding format depends on your specific needs and environment: NV21: NV21 is an image color encoding format for Android […]

V4L2+ monochrome USB camera programming practice 2: reading YUV format images

Introduction to the experiment This experiment is to read images from a USB camera, convert images in YUV format into grayscale images, and save them as BMP images. The image resolution is 640X480. The camera supports formats: $v4l2-ctl –list-formats-ext –device /dev/video0 ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: ‘MJPG’ (Motion-JPEG, compressed) Size: Discrete 1280×720 Interval: Discrete […]

Optimization method of converting RGBA to yuv

Article directory OpenGL reads YUV data ##Optimization method of converting RGBA to yuv Android – OpenGLDemo OpenGL reads YUV data Application scenarios: video encoding or AI, solve OpenGL to read RGBA data and use libyuv conversion optimization corresponding shader #version 300 es layout(location = 0) in vec4 a_position; layout(location = 1) in vec2 a_texCoord; out […]

The audio and video player developed under QT supports single-channel and multi-channel playback, supports hardware and software decoding, supports local file and real-time streaming playback, supports video screenshots, supports YUV and RGB display, supports volume adjustment, and supports stream information display. Support functions such as progress bar jump, stable and practical, provide source code download

Foreword The qt version used in this project is version 5.8, which can be compiled on version 5.8 and above. ffmpeg uses version 5.1, and there are x86 and 64-bit ffmpeg available under WinLib of the project. The video files of the local test are in the Bin directory, and the real-time stream is tested […]

FFmpeg converts an rgb file to yuv and encapsulates it into mp4

extern “C” { #include <libavformat/avformat.h> #include <libswscale/swscale.h> } #include <iostream> using namespace std; #pragma comment(lib,”avformat.lib”) #pragma comment(lib,”avcodec.lib”) #pragma comment(lib,”avutil.lib”) #pragma comment(lib,”swscale.lib”) int main() { char infile[] = “out.rgb”; char outfile[] = “rgb.mp4”; //muxer,demuters av_register_all(); avcodec_register_all();//register codec FILE *fp = fopen(infile, “rb”); if (!fp) { cout << infile << ” open failed!” << endl; getchar(); return […]

ffmpeg H264 to YUV420p

The version is ffmpeg4.3 (several higher or lower versions are acceptable) Result: Convert H264 to yuv420p The H264 file used is D:/videos/264.dat (dat suffix does not matter)264.dat download without points Can be played with ffplay ffplay D:/videos/264.dat The final generated file yuv420p_1920_1080_264.yuv Can be played with ffplay ffplay -pix_fmt yuv420p -s 1920×1080 D:/output/yuv420p_1920_1080_264.yuv Method 1: […]