SDL2: about SDL_UpdateYUVTexture

Recently I am trying to use SDL_UpdateYUVTexture to display YUV content, but
the speed seems not as fast as I excepted. After checking the source code of
this part, I found a method of transferring RGB is used in this process,
which not good in video stream with a high resolution.
I suggest that maybe you could try to use DirectX or OpenGL first, then the
cuttent method could be another choice when the system doesn’t support the
hard acceleration.–
View this message in context: http://sdl.5483.n7.nabble.com/SDL2-about-SDL-UpdateYUVTexture-tp38475.html
Sent from the SDL mailing list archive at Nabble.com.

Recently I am trying to use SDL_UpdateYUVTexture to display YUV content, but

the speed seems not as fast as I excepted. After checking the source code
of
this part, I found a method of transferring RGB is used in this process,
which not good in video stream with a high resolution.
I suggest that maybe you could try to use DirectX or OpenGL first, then the
cuttent method could be another choice when the system doesn’t support the
hard acceleration.

I’m quite sure that at least with opengl renderer and SDL 2.0.1+
SDL_UpdateYUVTexture just does three calls to glTexSubImage2D with the
three components, I think you are looking at the software backend fallback.

Code reference at line 823 of src/render/opengl/SDL_render_gl.c–
Bye,
Gabry