[Bug 703346] Integrate shaders from eglglessink

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jul 18 22:01:48 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=703346
  GStreamer | gst-plugins-gl | git

--- Comment #6 from Matthew Waters <ystreet00 at gmail.com> 2013-07-19 05:01:40 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > > Maybe drop the tex_scaling bits everywhere for now until we support arbitrary
> > > strides. That makes the code simpler
> > 
> > And breaks the resulting image for video formats with subsampling.
> 
> For the planar formats you'll have different width/height values depending on
> the subsampling in glTexImage2D(). However in the shader you'll always go from
> 0.0 to 1.0 in all directions and no scaling is required there (1.0 would be at
> the end of the texture, i.e. the pixel at 1/4 width for Y41B chroma planes).

And that will fail with the TEXTURE_RECTANLGE target which we currently use for
Desktop GL.  TexCoords with TEXTURE_RECTANGLE are unnormalized i.e. go from 0
to width/height NOT 0 to 1.0.  You may want to instead check for the NPOT
extension and use that if you want normalized TexCoords.  It could also be
implemented using multitexturing in the shader i.e. use gl_TexCoord[i].  IMHO
it's just a different way of doing the same thing and doesn't really matter.

> For the packed and semi-planar formats the scaling will be required but that
> should IMHO happen inside the shader for now. Just remove the texScale stuff
> until we add support for arbitrary strides.

It is happening in the shader already using tex_scaling.

> See
> http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/eglgles/gstegladaptation.c?h=0.10#n156
> and the related code. That's the non-abitrary-stride versions from the past
> that worked just fine :)

See above.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list