Automatic YUV & # 8594; DirectShow RGB for custom decoder

After hours of searching the net, I am pretty desperate to find a solution to this. I am working on an OGG Theora decoder at DirectShow that releases color models YV12 and YUY2.

Now I want to create an RGB pixel manipulation filter for this output and process it in a video renderer. According to this and this , it should be really easy and transparent, but it is not.

For example, I performed CheckInputType()this check:

if( IsEqualGUID(*mtIn->Type(), MEDIATYPE_Video )
        && IsEqualGUID(*mtIn->Subtype(), MEDIASUBTYPE_RGB565 ) )
{
   return S_OK;
}

and I expect him to add MSYUV between Theora and my decoder and do the job for me (i.e., convert it to RGB). The problem is that I get an error every time (in GraphEdit application). And I am 100% sure that this is YV12 as input (checked in the debugger). The only explanation I could think of was a reference to abandoning AVI, but there is no further information about this.

  • Does this mean that I need to use an AVI container if I want to get this automatic functionality?
  • It is strange that this works, for example, for WMV video (with YUV at their output), only this OGG decoder has problems with it. So, probably, the question is what did this OGG decoder skip?

Too bad that the MSYUV filter does not work as a color space converter, i.e. visible and directly used in GraphEdit ...

, YV12 → RGB, .

+3
1

YUV RGG, Directshow. , WMV , , WMV- RGB YUV- , .

, , , YUV .

Fourcc.org YUV RGB. , Video Demystified by Keith Jack .

+3

Source: https://habr.com/ru/post/1698749/


All Articles