Link Copied
[cpp]#define SEI_USER_DATA_REGISTERED_ITU_T_T35 4 typedef struct { unsigned char countryCode; unsigned char countryCodeExtension; unsigned char payloadBytes[2]; // In this example only two bytes of data } userdata_reg_t35; mfxEncodeCtrl m_encodeCtrl; mfxPayload m_mySEIPayload; mfxU8 m_seiData[100]; mfxPayload* m_payloads[5]; userdata_reg_t35 m_userSEIData; // Insert SEI_USER_DATA_REGISTERED_ITU_T_T35 into payload m_userSEIData.countryCode = 10; m_userSEIData.countryCodeExtension = 11; m_userSEIData.payloadBytes[0] = 1; m_userSEIData.payloadBytes[1] = 2; MSDK_ZERO_MEMORY(m_mySEIPayload); m_mySEIPayload.Type = SEI_USER_DATA_REGISTERED_ITU_T_T35; m_mySEIPayload.BufSize = sizeof(userdata_reg_t35) + 2; // 2 bytes for header m_mySEIPayload.NumBit = 4*8 + 2*8; // data + header m_mySEIPayload.Data = m_seiData; // SEI header m_seiData[0] = (mfxU8)m_mySEIPayload.Type; m_seiData[1] = (mfxU8)((m_mySEIPayload.NumBit - 16) >> 3); // size of following SEI message in bytes // SEI message memcpy(m_seiData+2, &m_userSEIData, sizeof(userdata_reg_t35)); m_payloads[0] = &m_mySEIPayload; // Encode control structure initialization MSDK_ZERO_MEMORY(m_encodeCtrl); m_encodeCtrl.Payload = (mfxPayload**)&m_payloads[0]; m_encodeCtrl.NumPayload = 1; // Use encode control structure while calling encode sts = m_pmfxENC->EncodeFrameAsync(&m_pEncodeCtrl, &m_pEncSurfaces[nEncSurfIdx], &pCurrentTask->mfxBS, &pCurrentTask->EncSyncP);[/cpp]
For more complete information about compiler optimizations, see our Optimization Notice.