I want to use OpenGL ES vertex and fragment shader to work on HDMI video data received by a TC358743. Which interface or API shall I use to have the fastest transfer of video data to OpenGL ES texture. It runs on a PI 4.
# /boot/config.txt
dtoverlay=vc4-fkms-v3d
dtoverlay=tc358743
# Video source
/dev/video0
# texture initialize
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 1920, 1080, 0, GL_RGB, GL_UNSIGNED_BYTE, nullptr);
# texture update
unsigned char data[1920*1080*3];
read(FileDesc, data, 1920*1080* 3);
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 1920, 1080, GL_RGB, GL_UNSIGNED_BYTE, data);
The current problem is the slow transfer of each frame to GPU memory with glTexSubImage2D which takes about ~50ms. Can someone please help? Thank you.
