- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to enable the CAVLC option in the sample_encode?
Can someone give me a sample code?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
to use CAVLC you must use the extended encoding options feature of Intel Media SDK.
See below for an example on to implement this. Please refer to Intel Media SDK samples for details on common code.
[cpp]// // In containing class declaration // mfxExtBuffer* m_pExtBuf[1]; mfxExtCodingOption m_ExtCO; mfxVideoParam m_mfxParamsVideo; // // In section of code initializing encoder video paramters // memset(&m_ExtCO, 0, sizeof(mfxExtCodingOption)); m_ExtCO.Header.BufferId = MFX_EXTBUFF_CODING_OPTION; m_ExtCO.Header.BufferSz = sizeof(mfxExtCodingOption); m_ExtCO.CAVLC = MFX_CODINGOPTION_ON; m_mfxParamsVideo.ExtParam = m_pExtBuf; m_pExtBuf[0] = (mfxExtBuffer*)&(m_ExtCO); m_mfxParamsVideo.NumExtParam = 1; // // Call to query the encoder // (note: make sure to also reference the extended buffer from the Query out structure) mfxVideoParam actualParams; actualParams.ExtParam = m_mfxParamsVideo.ExtParam; actualParams.NumExtParam = m_mfxParamsVideo.NumExtParam; sts = m_pmfxEnc->Query(&m_mfxParamsVideo, &actualParams); // // Alternatively if you use encoder Init without Query // sts = m_pmfxEnc->Init(&m_mfxParamsVideo);[/cpp]
Regards,
Petter

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