- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have two question.
*1
I want to converter YUY2 to NV12 with directshow filter, but I can not find out any third party filter.
I found an artical write aboutbelow to converter from YUY2 to NV12.
for ( row = 0; row < Height; ++ row )
{
for ( col = 0; col < Width; ++ col )
{
NV12->Y[ index1 ++ ] = YUY2->Data[ index ++ ];
NV12->U[ index2 ++ ] = YUY2->Data[ index ++ ];
NV12->V[ index3 ++ ] = YUY2->Data[ index ++ ];
NV12->Y[ index1 ++ ] = YUY2->Data[ index ++ ];
}
index += (Stride - Width);
}
But I don't knowthe meaning of index1,index2,index3 and how to caluate Stride.I write my code as below
//================================
ULONG inLen=0,outLen=0;
HRESULT hr = pSource->GetPointer(&pSourceBuffer );
if ( FAILED( hr ) )
return hr;
else
inLen = pSource->GetSize();
hr = pDest->GetPointer(&pDestBuffer );
if ( FAILED( hr ) )
return hr;
else
outLen = pDest->GetSize();
AM_MEDIA_TYPE* pType = &m_pInput->CurrentMediaType();
VIDEOINFOHEADER *pvi = (VIDEOINFOHEADER *) pType->pbFormat;
ASSERT(pvi);
int cWidthImage = pvi->bmiHeader.biWidth;
int cHeightImage = pvi->bmiHeader.biHeight;
int numPixels = cWidthImage * cHeightImage;
int row=0,col=0;
int index=0,indexOut=0,index2=2,index3=3;
//int InTotal=numPixels*2;
int Offset=numPixels;
for(int index=0;index
{
BYTE U0=pDestBuffer[ indexOut++ ] = pSourceBuffer[index++];
BYTE Y0=pDestBuffer[ Offset++] = pSourceBuffer[index++];
BYTE V0=pDestBuffer[ Offset++ ] = pSourceBuffer[index++];
BYTE Y1=pDestBuffer[ indexOut++ ] = pSourceBuffer[index++];
}
//================================================It doesn't work. Could anyone tell me where the problem is.
*2
Can I copy evr.dll to xp OS, then I can use Enhanced Video Render in XP system?
I do this,but I can't connect the output pin of Intel Media SDK h.264 decoder to Enhanced Vdeo Render in XP system.
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Like Peter sad, Media SDK don't support WinXP. They only validated it on Win7.
But, I was using Media SDK on XP and it was ok for me...
About H264 decoder output pin, I suggest to you use ffdshow raw filter if you want to do a simple test.
For example, using GraphEdit:
File Source Async (test.mp4) -> Intel Media SDK H264 Splitter -> Intel Media SDK h264 Decoder -> ffdshow raw Filter-> Video Renderer
It works (I tested on XP and on seven). It's a good way to you understand how these filters works and test it running on your windows environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
But I use ffdshow raw filter on XP and the color of image after decoding is a little strange.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page