- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Media Team,
I was hoping someone code explain to me how to call MFXVideoENCODE_Reset function and get it to successfully modify the TargetKbps in the sample encode project. I've read through the manual as well as the programming guide and it seems to indicate that modifying the output bitrate on the fly requires this variable to modified and then called with reset. I however am unable to call these functions without the sdk crashing. Even when I am not modifying any of the parameters set in m_pmfxENC structure the call fails which is strange as it should be directly running with those parameters before hand. The code that I am using successfully encodes the video stream that I am using otherwise. I am trying to understand the why reset is failing. Is it one of the settings I have set initially configuring the encoder. Are the internal parameters changing without the m_pmfxENC structure? Can I not call the function from the run function? Any guidance would be appreciated as to what could be causing my calls to the hardware to fail.
https://intel.github.io/libvpl/latest/appendix/VPL_apnds_c.html
Here is an example of the code that I am calling from the sample encode project, in CEncodingPipeline::Run function as it loops through frames that need to be encoded.
if (pSurf != NULL && nFramesProcessed % 200 == 199) {
printf("Calling Reset \n");
sts = m_pmfxENC->GetVideoParam(&m_mfxEncParams);
MSDK_CHECK_STATUS(sts, "ENCODE: GetVideoParam failed");
sts = m_pmfxENC->Reset(&m_mfxEncParams);
MSDK_CHECK_STATUS(sts, "ENCODE: Reset call failed");
}
I am receiving the following error when just running the reset call.
sts=MFX_ERR_INVALID_VIDEO_PARAM(-15), Run, Reset
and this when running the GetVideoParam Call .
[ERROR], sts=MFX_ERR_UNSUPPORTED(-3), Run, GetVideoParam
Here is a look at p_mfxEncParams structure right before I make the reset call extracted from the debugger:
{reserved = {0, 0, 0, 0, 0, 0, 0}, LowPower = 32, BRCParamMultiplier = 1, FrameInfo = {reserved = {0, 0, 0, 0}, ChannelId = 0, BitDepthLuma = 8, BitDepthChroma = 8, Shift = 0, FrameId = {TemporalId = 0, PriorityId = 0, {{DependencyId = 0, QualityId = 0}, {ViewId = 0}}}, FourCC = 842094158, {{Width = 1920, Height = 1088, CropX = 0, CropY = 0, CropW = 1920, CropH = 1080}, {BufferSize = 71305088, reserved5 = 70780800}}, FrameRateExtN = 30000, FrameRateExtD = 1001, reserved3 = 0, AspectRatioW = 1, AspectRatioH = 1, PicStruct = 1, ChromaFormat = 1, reserved2 = 0}, CodecId = 541283905, CodecProfile = 100, CodecLevel = 40, NumThread = 0, {{TargetUsage = 4, GopPicSize = 15, GopRefDist = 3, GopOptFlag = 0, IdrInterval = 1, RateControlMethod = 2, {InitialDelayInKB = 250, QPI = 250, Accuracy = 250}, BufferSizeInKB = 500, {TargetKbps = 3000, QPP = 3000, ICQQuality = 3000}, {MaxKbps = 5000, QPB = 5000, Convergence = 5000}, NumSlice = 1, NumRefFrame = 2, EncodedOrder = 0}, {DecodedOrder = 4, ExtendedPicStruct = 15, TimeStampCalc = 3, SliceGroupsPresent = 0, MaxDecFrameBuffering = 1, EnableReallocRequest = 2, FilmGrain = 250, IgnoreLevelConstrain = 500, SkipOutput = 3000, reserved2 = {5000, 1, 2, 0}}, {JPEGChromaFormat = 4, Rotation = 15, JPEGColorFormat = 3, InterleavedDec = 0, SamplingFactorH = "\001\000\002", SamplingFactorV = "\372\000\364\001", reserved3 = {3000, 5000, 1, 2, 0}}, {Interleaved = 4, Quality = 15, RestartInterval = 3, reserved5 = {0, 1, 2, 250, 500, 3000, 5000, 1, 2, 0}}}}
If anyone has any further questions to ask me, please feel free to reach out. I am hoping to try and get this working soon.
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