SDL_UpdateTexture and NV12

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

SDL_UpdateTexture and NV12

yoann
Hi everyone,

I have a SDL_PIXELFORMAT_NV12 texture that I would like to fill with an ffmpeg AVFrame with AV_PIX_FMT_NV12 pixel format.
Passing the frame data with SDL_UpdateTexture(texture, NULL, frame->data[0], frame->linesize[0]) seems to work for the Y plane since I can see my image but mixes up UV channel, I have red and green images blinking alternatively on my screen.

Even if I have created my texture with SDL_PIXELFORMAT_NV12, have I to split my UV pixel data into different planes for SDL_UpdateTexture to process it ?

Yoann


_______________________________________________
SDL mailing list
[hidden email]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org