Hello,
I am writing a USB camera mini-driver using USBCAMD2. I have
the basic driver working, but need to get the video into the desired
format for proper viewing in DirectShow. The video is 8-bit grayscale,
and is interlaced (I receive two fields in one “frame” from the camera
and interlace them in the CamProcessRawVideoFrameEx() function in my
minidriver. They are displayed on the screen using RGB8 (8-bit color.)
I would like to know how I can describe (or set somehow) the
color palette as a grayscale palette. I’ve tried converting to RGB24 in
the minidriver and replicating the 8-bit pixel value that I receive from
the camera in the RGB fields. This works, but is so slow that I’m
dropping frames. Any suggestions or hints would be appreciated.
Sincerely,
Howard M. Harte
========================
Harte Technologies, LLC.
(925) 551-0120 (voice)
(925) 551-0125 (fax)
http://www.hartetechnologies.com/
(1) I would see if the video card has capabilites to help with video
conversions.
Generally, the guideline is to expose whatever format your device happen to support and see if
DShow can handle it. On top of Video Render possibly being able to work with the format directly
on particular graphic card, DShow has tons of format converters that can do the conversion for
you.
Only if that does not work you should think about tweaking the format to please DShow.
– Max.
— William Michael Jones wrote:
> (1) I would see if the video card has capabilites to help with video
> conversions.
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
Hello,
Thank you for the tip. I looked in ksmedia.h and was unable to
find anything that looked like it was some sort of grayscale format. I
did find a RGB8 to grayscale filter (Called LEAD RGB Converter which has
its own grayscale format called LGRY12) that works well; however, I
would like to take care of this inside the driver if possible so that I
don’t have to distribute a 3rd party filter with it.
Any suggestions on grayscale formats supported by Windows?
Sincerely,
Howard M. Harte
========================
Harte Technologies, LLC.
(925) 551-0120 (voice)
(925) 551-0125 (fax)
http://www.hartetechnologies.com/
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Max Paklin
Sent: Tuesday, October 21, 2003 1:25 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Palettes and Kernel-streaming driver (USBCAMD2)
Generally, the guideline is to expose whatever format your device happen
to support and see if
DShow can handle it. On top of Video Render possibly being able to work
with the format directly
on particular graphic card, DShow has tons of format converters that can
do the conversion for
you.
Only if that does not work you should think about tweaking the format to
please DShow.
– Max.
— William Michael Jones wrote:
> (1) I would see if the video card has capabilites to help with video
> conversions.
>
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@hartetec.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Hi!
Seems to me you should use Y800 format (media subtype as usual:
30303859-0000-0010-8000-00AA00389B71).
S.Y.
Igor Slewsarev
“Howard M. Harte” wrote in message
news:xxxxx@ntdev…
>
> Hello,
>
> I am writing a USB camera mini-driver using USBCAMD2. I have
> the basic driver working, but need to get the video into the desired
> format for proper viewing in DirectShow. The video is 8-bit grayscale,
> and is interlaced (I receive two fields in one “frame” from the camera
> and interlace them in the CamProcessRawVideoFrameEx() function in my
> minidriver. They are displayed on the screen using RGB8 (8-bit color.)
>
>
> I would like to know how I can describe (or set somehow) the
> color palette as a grayscale palette. I’ve tried converting to RGB24 in
> the minidriver and replicating the 8-bit pixel value that I receive from
> the camera in the RGB fields. This works, but is so slow that I’m
> dropping frames. Any suggestions or hints would be appreciated.
>
> Sincerely,
>
>
> Howard M. Harte
>
> ========================
> Harte Technologies, LLC.
> (925) 551-0120 (voice)
> (925) 551-0125 (fax)
> http://www.hartetechnologies.com/
>
>
>
>
Hello Igor,
Thank you for the information. I tried the Y800 format, and I
can see Y800 in my capture filter properties. When I try to render the
output pin, GraphEdit reports that it cannot render, and when I look in
the kernel debugger, I see an error message from “MsYuv” saying that the
format is not “YUV or YUVU.” Do you know if there is a directshow YUV
converter that handles the Y800 format?
I can’t find out much about Y800 via a web search other than
that it seems to be the same as the “GRAY” and “Y8” formats.
Thank you. Sincerely,
Howard M. Harte
========================
Harte Technologies, LLC.
(925) 551-0120 (voice)
(925) 551-0125 (fax)
http://www.hartetechnologies.com/
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Igor Slewsarev
Sent: Wednesday, October 22, 2003 12:32 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Re: Palettes and Kernel-streaming driver (USBCAMD2)
Hi!
Seems to me you should use Y800 format (media subtype as usual:
30303859-0000-0010-8000-00AA00389B71).
S.Y.
Igor Slewsarev
“Howard M. Harte” wrote in message
news:xxxxx@ntdev…
>
> Hello,
>
> I am writing a USB camera mini-driver using USBCAMD2. I have
> the basic driver working, but need to get the video into the desired
> format for proper viewing in DirectShow. The video is 8-bit
grayscale,
> and is interlaced (I receive two fields in one “frame” from the camera
> and interlace them in the CamProcessRawVideoFrameEx() function in my
> minidriver. They are displayed on the screen using RGB8 (8-bit
color.)
>
>
> I would like to know how I can describe (or set somehow) the
> color palette as a grayscale palette. I’ve tried converting to RGB24
in
> the minidriver and replicating the 8-bit pixel value that I receive
from
> the camera in the RGB fields. This works, but is so slow that I’m
> dropping frames. Any suggestions or hints would be appreciated.
>
> Sincerely,
>
>
> Howard M. Harte
>
> ========================
> Harte Technologies, LLC.
> (925) 551-0120 (voice)
> (925) 551-0125 (fax)
> http://www.hartetechnologies.com/
>
>
>
>
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@hartetec.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Hello, Howard!
It’s not so difficult to write your own DS in-place transform filter (you
can start from PSDK example EZRGB24).
As for me, I’ve just used my own filter of such kind. If you really need any
filter, please e-mail me, and I’ll send you this filter.
S.Y.
Igor Slewsarev
mailto://xxxxx@lycos.co.uk
P.S. As far as I’ve understood, your frame had two fields. If you are using
KS_DATAFORMAT_VIDEO2 and
KS_VIDEOINFOHEADER2 to describe interlace features it will be doubly
difficult to find a filter.
You should not expect every possible GUID to be present in ksmedia.h. If you check format and type
GUIDs in DDK and SDK you will see that they match. So if some particular GUID is missing in
ksmedia.h, just define it in your driver and go ahead and use it.
For your particular case define pin in such a way that it supports video type with this unique
subtype (LGRY12). Format for the pin should be KSDATAFORMAT_VIDEO (or something like this). As a
part of this format you will have to provide BITMAPINFO structure (part of VIDEOINFO), which
specifies bitmap parameters (sizes, encoding and so forth). Palette can also be set in BITMAPINFO.
– Max.
— “Howard M. Harte” wrote:
> Hello,
>
> Thank you for the tip. I looked in ksmedia.h and was unable to
> find anything that looked like it was some sort of grayscale format. I
> did find a RGB8 to grayscale filter (Called LEAD RGB Converter which has
> its own grayscale format called LGRY12) that works well; however, I
> would like to take care of this inside the driver if possible so that I
> don’t have to distribute a 3rd party filter with it.
>
> Any suggestions on grayscale formats supported by Windows?
>
> Sincerely,
>
>
> Howard M. Harte
>
> ========================
> Harte Technologies, LLC.
> (925) 551-0120 (voice)
> (925) 551-0125 (fax)
> http://www.hartetechnologies.com/
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Max Paklin
> Sent: Tuesday, October 21, 2003 1:25 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] Re: Palettes and Kernel-streaming driver (USBCAMD2)
>
> Generally, the guideline is to expose whatever format your device happen
> to support and see if
> DShow can handle it. On top of Video Render possibly being able to work
> with the format directly
> on particular graphic card, DShow has tons of format converters that can
> do the conversion for
> you.
>
> Only if that does not work you should think about tweaking the format to
> please DShow.
>
> – Max.
>
>
> — William Michael Jones wrote:
> > (1) I would see if the video card has capabilites to help with video
> > conversions.
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@yahoo.com
> > To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
>
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@hartetec.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@yahoo.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com