I have a question regarding the function: 'CalculateDefaultBitrate' in sample_utils.cpp
mfxU16 CalculateDefaultBitrate(mfxU32 nCodecId, mfxU32 nTargetUsage, mfxU32 nWidth, mfxU32 nHeight, mfxF64 dFrameRate) { PartiallyLinearFNC fnc; mfxF64 bitrate = 0; switch (nCodecId) { case MFX_CODEC_AVC : { fnc.AddPair(0, 0); fnc.AddPair(25344, 225); fnc.AddPair(101376, 1000); fnc.AddPair(414720, 4000); fnc.AddPair(2058240, 5000); break; } case MFX_CODEC_MPEG2: { fnc.AddPair(0, 0); fnc.AddPair(414720, 12000); break; } default: { fnc.AddPair(0, 0); fnc.AddPair(414720, 12000); break; } } mfxF64 at = nWidth * nHeight * dFrameRate / 30.0; //.... }
- What happes when my input framerate is higher then 30? We want to use this calculation function for framerates higher then 30.
- What are the X and Y values of the used PartiallyLinearFNC?