[Bug 722587] videotestsrc does not generate correct data for GRAY16_LE and GRAY16_BE

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Jan 20 01:16:51 PST 2014


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

Wim Taymans <wim.taymans> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEEDINFO
                 CC|                            |wim.taymans at gmail.com

--- Comment #2 from Wim Taymans <wim.taymans at gmail.com> 2014-01-20 09:16:46 UTC ---
(In reply to comment #0)
> Created an attachment (id=266704)
 View: https://bugzilla.gnome.org/attachment.cgi?id=266704
 Review: https://bugzilla.gnome.org/review?bug=722587&attachment=266704

> the patch file
> 
> when I tried to process GRAY16_LE/BE  data from videotestsrc, I found that
> LE/BE data is just the same:
> 
> dump data to file:
> gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,
> format=\(string\)GRAY16_LE,width=\(int\)640, height=\(int\)480 ! filesink
> location=le.bin
> gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,
> format=\(string\)GRAY16_BE,width=\(int\)640, height=\(int\)480 ! filesink
> location=be.bin
> 
> no difference between them.hex looks like :  0000000: ebeb ebeb ebeb ebeb ebeb
> ebeb ebeb ebeb  ................
> 
> actually there's almost no difference when display,since low byte affects very
> little. 

Yes, that's correct. videotesrc does not use the full 16 bits of the grey
colorspace and thus there is no difference between LE and BE.

> 
> after some digging , I found that GRAY code path
> convert_hline_generic in videotestsrc.c use TO_16 just dump low byte to high
> byte, 
> I also found that frame->info.finfo->unpack_func seems to do
> GRAY16_LE/BE->AYUV64 convert which confused me.

GRAY is like YUV with only the Y component (and usually different range and
colormatrix).

> I tried a small hack , it can output correct GRAY16_LE/BE buffer ,but I didn't
> follow every line in videotestsrc.c .
> 
> after this hack, 
> GRAY16_LE dump data looks like :0000000: 00eb 00eb 00eb 00eb 00eb 00eb 00eb
> 00eb  ................
> GRAY16_BE dump data looks like :0000000: eb00 eb00 eb00 eb00 eb00 eb00 eb00
> eb00  ................
> 

Yes, but it now you don't use the full range of the 16 bits, your components go
from 0000 to ff00 (and not 0000 to ffff, as it does with the existing
videotestsrc code).


What exactly do you think is the problem and what are you trying to achieve?

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