Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Ankündigungen
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Help with enabling intra refresh on H.265

IFcommcrete
Neuer Benutzer
2.279Aufrufe

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");

0 Kudos
0 Antworten
Antworten