Re: Does RGB mode display in reverse line order for video capture driver?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jackal Huang (huangjj_at_hotmail.com)
Date: 10/25/04


Date: Mon, 25 Oct 2004 11:43:53 +0800

Thank you very much!!
You did solve my problem.

I am new in video display related topic.
Where can I find the document for display mode such as different
RGB or YUV arrangement?

"Tim Roberts" <timr@probo.com> :
>
>>Recently, I traced testcap sample code of XPDDK.
>>testcap simulates a video capture device and exports muliple output pin.
>>It produces some predefined YUV or RGB data for display.
>>It draws a horizontal bar (from Line 3 to Line 6).
>>In YUV mode, the horizontal bar appears in the top of display window.
>>In RGB mode, the horizontal bar appears in the bottom of display window.
>>Why does RGB mode reverse the line order for display?
>>Is it a normal behavior?
>>Does it mean the capture driver also needs to reverse the line order
>>before
>>return the frame buffer?
>
> In an RGB DIB, the first byte of pixel data is the bottom-left pixel.
> Scanlines are numbered from bottom to top. This has been true since
> Windows 3.0. It is a leftover from OS/2, from which the DIB concept was
> taken. In OS/2's Presentation Manager, ALL graphics coordinates ran from
> bottom to top. The reasoning was that it looked more like the
> x-positive/y-positive quadrant of a cartesian coordinate system.
>
> Since this scheme is provably silly :), YUV DIBs (which did not have any
> backward compatibility requirements) do not follow it. The first byte of
> data is the top-left pixel.
>
> In an RGB DIB, you can negate the bmiHeight field in the BITMAPINFOHEADER
> to indicate that it is really a top-down DIB.
> --
> - Tim Roberts, timr@probo.com
> Providenza & Boekelheide, Inc



Relevant Pages

  • Re: Reduced gamut display
    ... > am working on a display system which is only capable of displaying ... >regular 8bit/channel RGB image to a 3bit/channel image? ... numbers for the primaries, white point, etc you can create a custom ... 'working space' very quickly ... ...
    (comp.graphics.apps.photoshop)
  • Re: Does RGB mode display in reverse line order for video capture driver?
    ... >In YUV mode, the horizontal bar appears in the top of display window. ... >In RGB mode, the horizontal bar appears in the bottom of display window. ... In an RGB DIB, the first byte of pixel data is the bottom-left pixel. ...
    (microsoft.public.development.device.drivers)
  • Re: Can the 1080 monitor work with the 128?
    ... RGB outputs work on the same monitors? ... It is NOT a VGA display but a true ... television compatible display. ... You just have to press a switch at the display to switch ...
    (comp.sys.cbm)
  • Re: load & display multichannel images quickly
    ... MxN arrays and assigning them to an 8 bit MxNx3 array ... % M maps data channels to RGB weight (column) ... % map the channels to the RGB frame for display ...
    (comp.soft-sys.matlab)
  • Re: UpdateLayeredWindow and alpha values
    ... Yet i assure you that the layered window does not display the pixels ... it should display a very faint pixel, ... reguardless of the RGB. ...
    (microsoft.public.win32.programmer.gdi)