Re: Does RGB mode display in reverse line order for video capture driver?
From: Jackal Huang (huangjj_at_hotmail.com)
Date: 10/25/04
- Next message: Gary G. Little: "Re: LNK1218"
- Previous message: Wahyu: "Re: Strange thing on using bulkusb with multiple interface"
- In reply to: Tim Roberts: "Re: Does RGB mode display in reverse line order for video capture driver?"
- Next in thread: Dave August: "Re: Does RGB mode display in reverse line order for video capture driver?"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Gary G. Little: "Re: LNK1218"
- Previous message: Wahyu: "Re: Strange thing on using bulkusb with multiple interface"
- In reply to: Tim Roberts: "Re: Does RGB mode display in reverse line order for video capture driver?"
- Next in thread: Dave August: "Re: Does RGB mode display in reverse line order for video capture driver?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|