Re: Problem: color space conversion by DirectShow

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



AL wrote:

> i don't think this is the case. My card can handle YUY2
> just fine. I already tested it by using other software to
> open these files and it worked just fine without having
> to do any conversions.

How do you know this other software is drawing the video
using YUY2 without any conversion?

> So I guess I out of luck here. This is just unelievable
> that advanced technology such as DirectX can' t handle a
> common YUY2 format

DirectX is agnostic to the format. The graph builder will
try to make the decoder and renderer agree on a common
format before inserting the CSC and the video converted will
accept any format the decoder proposes after checking with
DirectDraw if its OK and DirectDraw will support any format
the video card driver lists as supported. In the very end,
it's the video card that selects the format.

As Thore told you, saying that YUY2 is supported is not
really enough. A video format is defined not only by its
pixel format/compression but also by other parameters, like
stride and pixel count. The whole combination must be
supported. Many video cards will not accept strides that are
not multiple of 32, for example, and other will even require
the stride to be a multiple of 64. Even if the stride is OK,
the width and height may need to be multiples of 2 or larger
powers of 2 and the total pixel count may be restricted. If
you really want to go to the bottom of this, you should
program a little to discover what restrictions your video
card drivers imposes on DirectDraw surfaces and what exactly
the video decoder is proposing or willing to accept.


--

// Alessandro Angeli
// MVP :: Digital Media
// a dot angeli at psynet dot net


.



Relevant Pages

  • Re: Info on H.264
    ... I have a DVR card that supports H.264 video compression. ... It might make more sense, to use a $20 capture chip, with uncompressed ... and write it out to disk in an economical format. ...
    (rec.video.desktop)
  • Re: Converting YUY2 format video to AVI
    ... I have a video capture card that captures videos in H.264 format. ... using the api that comes with the card to decode the videos frame by ...
    (rec.video.desktop)
  • Re: Confusion With Hardware
    ... transfer video from the firewire card only, and stills from USB. ... > necessary to work in AVI format, or can I retain the format it is saved ...
    (comp.sys.ibm.pc.hardware.chips)
  • Re: Converting YUY2 format video to AVI
    ... this thread is related to my streaming thread. ... XviD is that i tried looking around how to convert YUY2 to wmv or asf ... is a IBP 1704 card manufactured by IBASE, ... videos and stores them in their proprietary format. ...
    (rec.video.desktop)
  • Re: AVStream driver show upside-down video for RGB24 format
    ... But the video is upside-down. ... Are you returning YUY2, or are you returning RGB24? ... RGB24 as pin format to render in the Graphedit. ...
    (microsoft.public.development.device.drivers)