can not connect to DV video decoder using MEDIASUBTYPE_YUY2

Pasc059 1 Reputation point
2020-11-02T18:49:50.077+00:00

Hello,

I try to write a 64bits DirectShow Transform Filter that i want to connect to a "DV Video Decoder" using the subtype MEDIASUBTYPE_YUY2, unfortunately without success. The only Subtype for wich the connection works is MEDIASUBTYPE_RGB24, and even with this subtype an "AVI Decompressor" filter is inserted (because of Intelligent connect). However the "DV Video Decoder" can output this subtype MEDIASUBTYPE_YUY2.

Someone has an idea?

regards, Pascal

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,575 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Pasc059 1 Reputation point
    2020-11-03T15:51:25.737+00:00

    Hello,

    I found the reason why the MEDIASUBTYPE_YUY2 was not accepted. The input pin, which is created thru a class CDeinterlaceInputPin inherited from CTransformInputPin, specifies a ALLOCATOR_PROPERTIES::cBuffers value greater than 1 after a call to its GetAllocatorRequirements() method. The next call to the GetAllocator() method of CTransformInputPin return without error, but the next call to NotifyAllocator() of CTransformInputPin gives a Actual.cBuffers value of 1 when the media subtype is MEDIASUBTYPE_YUY2 and this method considers this situation as an error. If i specify the cBuffers value = 1, then the connection works, but not the rest of the filter. With the MEDIASUBTYPE_RGB24 there is no problem.

    So my question becomes, why the IMemAllocator transmitted in the NotifyAllocator() method of my CDeinterlaceInputPin() always give a ALLOCATOR_PROPERTIES::cBuffers of 1 for MEDIASUBTYPE_YUY2 (and not for MEDIASUBTYPE_RGB24 which is however more demanding)?

    regards


  2. Pasc059 1 Reputation point
    2020-11-04T16:50:20.383+00:00

    Hi,

    in fact this not only with MEDIASUBTYPE_YUY2 subtype that the DV Video Decoder does not accept ALLOCATOR_PROPERTIES::cBuffers value greater than 1. But with the MEDIASUBTYPE_RGB24, an AVI Decompressor filter is inserted (with intelligent connect) that accept ALLOCATOR_PROPERTIES::cBuffers greater than 1 with the MEDIASUBTYPE_RGB24 (but not with MEDIASUBTYPE_YUY2 ). Below the 2 graphs showing what happens when ALLOCATOR_PROPERTIES::cBuffers=1
    37521-graph-wyuy2.png

    and when ALLOCATOR_PROPERTIES::cBuffers>1
    37478-graph-wrgb24.png

    After that, i can connect the ouptut of my filter to a VMR9 renderer with MEDIASUBTYPE_RGB24 (however thru a Color space concerter filter), but not with MEDIASUBTYPE_YUY2, but perhaps i should create another post.
    Regards


  3. Pasc059 1 Reputation point
    2020-11-17T16:36:41.1+00:00

    Hi,

    I'm back on this issue.
    I foundthe reason why i could not connect the VMR9 render with the MEDIASUBTYPE_YUY2. It was because in the DecideBufferSize() method of my filter, i specified a cbAlign property different than 1 (but this is not a problem with MEDIASUBTYPE_RGB24 ).

    then other problems with MEDIASUBTYPE_YUY2, but i will submit another Question if needed.

    regards


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.