- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i use the intel media sdk to encode video .
when i get the encoded frame i want to know what frame it is .
sts = m_VideoSession.SyncOperation(syncp,6000) ;
MSDK_CHECK_RESULT(sts,MFX_ERR_NONE,sts) ;
nLenOut = m_fxBS.DataLength ;
if (MFX_FRAMETYPE_I==m_fxBS.FrameType)
{
bKeyFrame = TRUE ;
}
else
{
bKeyFrame = FALSE ;
}
WriteBitStream(&m_fxBS,pBuffOut) ;
up is my code i am confused about the m_fxBS.FrameType
its value is 193 when i encoded the first frame ,this must be a key frame ,but the sdk do not define any value 193 as the frame type ,
sometime it return 66 the same .
and very little it return 4 that means a B_frame
i was confused about this
is anybody who can give me some suggest?
very appreciate it
thank you very much in advanced
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MFX_FRAMETYPE_I and its brethren appear to be mask values, an should be checked for using Bitwise And.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Look in the file mfxstructures.h
/* FrameType */
enum {
MFX_FRAMETYPE_UNKNOWN =0x0000,
MFX_FRAMETYPE_I =0x0001,
MFX_FRAMETYPE_P =0x0002,
MFX_FRAMETYPE_B =0x0004,
MFX_FRAMETYPE_S =0x0008,
MFX_FRAMETYPE_REF =0x0040,
MFX_FRAMETYPE_IDR =0x0080,
MFX_FRAMETYPE_xI =0x0100,
MFX_FRAMETYPE_xP =0x0200,
MFX_FRAMETYPE_xB =0x0400,
MFX_FRAMETYPE_xS =0x0800,
MFX_FRAMETYPE_xREF =0x4000,
MFX_FRAMETYPE_xIDR =0x8000
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
If you do the following:
sts = m_pmfxENC-> EncodeFrameAsync (NULL, & m_pEncSurfaces [nEncSurfIdx], & pCurrentTask-> mfxBS, & pCurrentTask-> EncSyncP);
How do I know if I am on the current frame is a key frame?
Or Do I know from another function?
Regards,
Lee
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page