Hi,
I read all the manuals in 'doc' folder and found that Intel Media SDK supports planar YUV format( ex.NV12 ) but not packed YUV format( ex. YUYV ).
Therefore I use the converter function as below whosefirst parameter is YUYV format and the Second is NV12.
Ioptimizedthe functionin my own way but it needs many CPU operation in line 17-30. In multi-decoder environment, it's terrible.
Has Intel any plan to support YUYV format? ... as decoder output.
Or give me any information abouthow todiscard many pixel-by-pixel copys( shown in line 17-30 ).
WriteFrame( BYTE *pDec, mfxFrameSurface1 *pSurface )
{
if ( !pSurface || !pSurface->Data.Y || !pSurface->Data.UV )
return FALSE;
BYTE *Y = pSurface->Data.Y;
BYTE *UV = pSurface->Data.UV;
int i, j, k, h, w, w_pitch, h_Y, h_UV;
h = pSurface->Info.CropH;
w = pSurface->Info.CropW;
w_pitch = pSurface->Data.Pitch;
i = h;
k = w * h * 2 - 1;
h_Y = (h - 1) * w_pitch;
h_UV = ( (h - 1) >> 1 ) * w_pitch;
while ( i-- )
{
j = w;
while ( j-- )
{
pDec[ k-- ] = UV[ h_UV + j ];
pDec[ k-- ] = Y[ h_Y + j-- ];
pDec[ k-- ] = UV[ h_UV + j ];
pDec[ k-- ] = Y[ h_Y + j ];
}
h_Y -= w_pitch;
if ( i & 0x1 )
h_UV -= w_pitch;
}
return TRUE;
}Regards,
kmjlove130




