[MPlayer-dev-eng] Question regarding MPlayer's OpenGL output

Reimar Döffinger Reimar.Doeffinger at gmx.de
Wed Oct 19 18:29:05 CEST 2011


On Wed, Oct 19, 2011 at 05:51:26PM +0200, Reimar Döffinger wrote:
> On Wed, Oct 19, 2011 at 11:32:40AM -0400, Mostapha El-Shafey wrote:
> > The reason I'm asking is because I'm developing an application (in Qt) that
> > displays many (up to 20) video streams at once and it is required for the
> > video display to take up as little CPU time as possible. By my simple tests
> > it looks like MPlayer is doing something right, OpenGL-wise. I went through
> > the vlc code and what it seems to do is just create a quad with a texture,
> > while it looks to me that MPlayer is using pixel buffers, glMapBuffer() and
> > glUnmapBuffer(). Problem is I tried using pixel buffers in my application
> > but it doesn't make a difference in terms of performance so I must be
> > missing something MPlayer is doing.
> 
> The PBO code isn't usually used I think, it doesn't make all that much
> difference.
> However if you used PBOs naively you'd probably get atrocious
> performance, depending on the hardware and driver version you need to
> have the right line stride, input format etc. etc.
> Depending on what kind of memory you get you should also be careful
> which memcpy code you use, for AGP memory SSE2-based copy can have
> issues and be a good 10% or more slower that SSE one.
> But are you sure it's not just that you are pushing RGB textures, which not
> only means you have to do the YUV->RGB conversion in software first but
> also requires almost 3 times the bandwidth?

And forgot to say I hope you are not trying to use non-power-of-two
textures (VLC seems to), the effect varies between "useless" and
"completely kills performance, max 20 FPS".


More information about the MPlayer-dev-eng mailing list