- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have some questions about the mfxEncodeCtrl Structrue.
The reference manual says that the member "FrameType" is just short for "Encoding frame type".
Is that a field for write or read? If for write,that means I can (or must) specify the type of every frame by myself? or just to enforce the frame type change when I need?
Other way, if for read,couldI know what frame type the current frame is? where should I got current frame type if not?
Questions seem unsystematic, butappreciate for any device.
Thanks,
Joyah
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your application is expected to fillthis field with the desired frametype. Providing the structure to the MFXVideoENCODE_EncodeFrameAsync() call is optional, and you only need to provide the structure if you want to overwrite the general encoding parameters that have been setup for the session.
In the MSDK 2012 R2 Reference manual, please look at the description for MFXVideoENCODE_EncodeFrameAsync call, as wellasthe structure definition.
"In the case of encoded ordering the mfxEncodeCtrl structure must specify the explicit frame type. In the case of display ordering, this function handles frame order shuffling according to the GOP structure parameters specified during initialization."
and
"If the encoder works in the encoded order, the application must specify the frame type. If the encoder works in the display order, only key frames are enforceable."
In other words, if you do not have a reason to overwrite the encoding parameters, provide a NULL instead of the mfxEncodeCtrl sturcture to the MFXVideoENCODE_EncodeFrameAsync call.
-Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your answer. There's still one question, that how to get the current frame type (I, P or B)?
Regards,
Joyah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When encoding is configured and a GOP pattern is specified, the frames will be encoded with the pattern unless 'pre-frame' mfxEncodeCtrl is used to overwrite the pattern. Your application could keep track of frames being encoded and known the frametype for each encode request.
If you know the frame number, and the GOP pattern paramters, you can use an algorithm like the one shown in the MSDK Reference Manual in the section desribing the mfxInfoMFX sturcture (Example 11).
-Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
When I am forcing encoder (h264) to give out I-Frame by setting
mfxEncCtrlParam.FrameType = MFX_FRAMETYPE_I or
mfxEncCtrlParam.FrameType = MFX_FRAMETYPE_IDR
My application is getting crashed during "SyncOperation". I am using Medis SDK 2017-R2 on Cent-OS 7.2. PFB Back-Trace
#0 0x00007fb8f8d4f900 in ?? () from /opt/intel/mediasdk/lib64/iHD_drv_video.so
#1 0x00007fb8f684d043 in ?? () from /opt/intel/mediasdk/lib64/iHD_drv_video.so
#2 0x00007fb8f68279a1 in ?? () from /opt/intel/mediasdk/lib64/iHD_drv_video.so
#3 0x00007fb8f6858171 in ?? () from /opt/intel/mediasdk/lib64/iHD_drv_video.so
#4 0x00007fb8f5105593 in CmDevice_RT::OSALExtensionExecution(unsigned int, void*, unsigned int, void**, unsigned int) ()
from /opt/intel/common/mdf/lib64/igfxcmrt64.so
#5 0x00007fb8f5108646 in CmSurfaceManager::DestroySurface2DUMD(CmSurface2D*&) ()
from /opt/intel/common/mdf/lib64/igfxcmrt64.so
#6 0x00007fb8f51086ac in CmSurfaceManager::DestroySurface(CmSurface2D*&) () from /opt/intel/common/mdf/lib64/igfxcmrt64.so
#7 0x00007fb8fceac44a in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.21
#8 0x00007fb8fceacb65 in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.21
#9 0x00007fb8fcde2eff in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.21
#10 0x00007fb8fce538f7 in ?? () from /opt/intel/mediasdk/lib64/libmfxhw64-p.so.1.21
#11 0x00007fb901482dc5 in start_thread () from /lib64/libpthread.so.0
#12 0x00007fb90058321d in clone () from /lib64/libc.so.6
Please help me resolving this Issue.
Akash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Akash,
How do you manage mfxEncCtrlParam object ? Do you fill the structure with zero's and set only FrameType ? Can you reproduce the crash if you apply your change to force IDR via FrameType to sample_encode or one of MediaSDK tutorial samples?
Regards,
Dmitry
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page