[MPlayer-dev-eng] vo_gl PBO patch ..
Reimar Döffinger
Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Apr 29 21:31:50 CEST 2008
On Tue, Apr 29, 2008 at 01:11:35PM -0600, Sven Gothel wrote:
> To do the unification, one more question ..
>
> Why is that orig Upload function so complicated ?
> I might miss something here completly, but IMHO:
>
> +++
> glAdjustAlignment(stride);
> glPixelStorei(GL_UNPACK_ROW_LENGTH, stride / glFmt2bpp(format, type));
> for (; y + slice <= y_max; y += slice) {
> glTexSubImage2D(target, 0, x, y, w, slice, format, type, data);
> data += stride * slice;
> }
> if (y < y_max)
> glTexSubImage2D(target, 0, x, y, w, y_max - y, format, type, data);
> +++
>
> equals to just:
>
> +++
> glAdjustAlignment(stride);
> glPixelStorei(GL_UNPACK_ROW_LENGTH, stride / glFmt2bpp(format, type));
> glTexSubImage2D(target, 0, x, y, w, h, format, type, data);
> +++
Functionality-wise, yes they are the same. Speed-wise not (necessarily).
In tests long ago on a TNT 2 code above could be almost 5% faster.
More information about the MPlayer-dev-eng
mailing list