[Bug 722670] add GRAY8/GRAY16_LE/GRAY16_BE support to glupload

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue Jan 21 18:18:05 PST 2014


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

comicfans44 <comicfans44> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #266835|0                           |1
        is obsolete|                            |

--- Comment #4 from comicfans44 <comicfans44 at gmail.com> 2014-01-22 02:18:00 UTC ---
Created an attachment (id=266940)
 View: https://bugzilla.gnome.org/attachment.cgi?id=266940
 Review: https://bugzilla.gnome.org/review?bug=722670&attachment=266940

improved patch

(In reply to comment #2)
> Review of attachment 266835 [details]:
> 
> Generally looks good but why not also add support to gldownload? :)
> 
> ::: gst-libs/gst/gl/gstglupload.c
> @@ +145,3 @@
> 
> +#define COMPOSE_WEIGHT \
> +    "const vec2 compose_weight = vec2(0.996109, 0.003891);\n"
> 
> Please write a comment where these magic numbers come from, it might not be
> obvious for everybody :)
> 


I created a improved patch with magic numbers comments ,please review it :)
I'll try to implement gldownload support later in separate  patch,
since I've not reached that code ...

> @@ +1063,3 @@
> +      break;
> +    case GST_VIDEO_FORMAT_GRAY16_LE:
> +      frag_prog = g_strdup_printf (upload->priv->COMPOSE, 'a', 'r');
> 
> I'm not 100% sure if this is correct for big endian systems too. Maybe you need
> to do the inverse there, as GL formats are usually native-endianness.

firstly, LUMINANCE_ALPHA seems the same byte order for LE/BE machine (not found
this explicitly in glspec,neither google ,and not have such machine to test)

secondly, 'LE'  in GRAY16_LE means 'data stored byte order is LE', not means
machine is LE(so is GRAY16_BE), so data is the same byte array on any machine. 
( video-format.c defined the read 16bit uint value from GRAY16_LE  as 
GST_READ_UINT16_LE , this read native 16bit on LE machine, swap read on BE
machine).

so I think there's no need to do byte swap when uploading texture. please
correct me if there's misunderstood

-- 
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