On Mon, 15 Dec 2008 12:46:52 -0500, Arnau Font <[email protected]> wrote: > Hi group! > > > I'm trying to develop a videoplayer in opengl. I've followed the SDL and > FFMPEG tutorial and now I have a functional player under SDL, using the > SDL_Overlays and all that. But now I want to use openGL. I guess I have > to > do a sws_scale to a opengl format, but I'm quite lost about how to do it. > Does anybody have a working example or some guidelines?
This is really more of an OpenGL question than libav; you'll probably have better luck looking for tutorials of how to load textures in OpenGL. The "best solution" for you will depend heavily on what hardware and OpenGL implementation you are working with. Some OpenGL implementations support rectangular textures. Some OpenGl implementations can do efficient color conversion (YUV->RGB) in hardware. But, if none of these extensions are present you'll need to convert YUV to RGB in software and either rescale it to a power of 2, or upload into multiple textures and tile them to form the complete image. (You can also just choose a texture size that holds the entire frame, but 1024x1024 textures are extremely inefficient... depending on hardware and GL implementation) Also, be sure to check out glPixelStorei(GL_PACK_ROW_LENGTH, n) -- Michael Conrad IntelliTree Solutions llc. 513-552-6362 [email protected] _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
