- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My goal is to enable intra refresh on H.265. However, I am encountering a problem where the following code results in the error "MFX_ERR_UNSUPPORTED" (error value -3). I appreciate any help.
The code:
// Initialize encode parameters
mfxExtCodingOption2 ext_encode_opt_2 = { };
ext_encode_opt_2.Header.BufferId = MFX_EXTBUFF_CODING_OPTION2;
ext_encode_opt_2.Header.BufferSz = sizeof(mfxExtCodingOption2);
mfxExtCodingOption3 ext_encode_opt_3 = {};
ext_encode_opt_3.Header.BufferId = MFX_EXTBUFF_CODING_OPTION3;
ext_encode_opt_3.Header.BufferSz = sizeof(mfxExtCodingOption3);
mfxExtBuffer* ext_buffers[2];
ext_buffers[0] = (mfxExtBuffer*)&ext_encode_opt_2;
ext_buffers[1] = (mfxExtBuffer*)&ext_encode_opt_3;
ext_encode_opt_2.IntRefType = MFX_REFRESH_VERTICAL;
ext_encode_opt_2.IntRefCycleSize = 2;
ext_encode_opt_3.IntRefCycleDist = 50;
mfxVideoParam encodeParams = {};
encodeParams.mfx.CodecId = MFX_CODEC_HEVC;
encodeParams.mfx.TargetUsage = MFX_TARGETUSAGE_BEST_QUALITY;
encodeParams.mfx.TargetKbps = TARGETKBPS;
encodeParams.mfx.RateControlMethod = MFX_RATECONTROL_AVBR;
encodeParams.mfx.FrameInfo.FrameRateExtN = FRAMERATE;
encodeParams.mfx.FrameInfo.FrameRateExtD = 1;
encodeParams.mfx.FrameInfo.FourCC = MFX_FOURCC_NV12;
encodeParams.mfx.FrameInfo.ChromaFormat = MFX_CHROMAFORMAT_YUV420;
encodeParams.mfx.FrameInfo.CropW = SRC_WIDTH;
encodeParams.mfx.FrameInfo.CropH = SRC_HEIGHT;
encodeParams.mfx.FrameInfo.Width = ALIGN16(SRC_WIDTH);
encodeParams.mfx.FrameInfo.Height = ALIGN16(SRC_HEIGHT);
encodeParams.IOPattern = MFX_IOPATTERN_IN_SYSTEM_MEMORY;
encodeParams.ExtParam = ext_buffers;
encodeParams.NumExtParam = 2;
// Validate video encode parameters
// - In this example the validation result is written to same structure
// - MFX_WRN_INCOMPATIBLE_VIDEO_PARAM is returned if some of the video parameters are not supported,
// instead the encoder will select suitable parameters closest matching the requested configuration,
// and it's ignorable.
sts = MFXVideoENCODE_Query(m_session->Get(), &encodeParams, &encodeParams);
if (sts == MFX_WRN_INCOMPATIBLE_VIDEO_PARAM)
sts = MFX_ERR_NONE;
VERIFY(MFX_ERR_NONE == sts, "Encode query failed");
Link Copied

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