Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix functionality of vp9 icq #317

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace MfxHwVP9Encode
#define MAX_IVF_HEADER_SIZE IVF_SEQ_HEADER_SIZE_BYTES + IVF_PIC_HEADER_SIZE_BYTES

#define MAX_Q_INDEX 255
#define MAX_ICQ_QUALITY_INDEX 255
#define MAX_ICQ_QUALITY_INDEX 51
#define MAX_LF_LEVEL 63

#define MAX_ABS_COEFF_TYPE_Q_INDEX_DELTA 15
Expand Down
5 changes: 5 additions & 0 deletions _studio/mfx_lib/encode_hw/vp9/src/mfx_vp9_encode_hw_vaapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ namespace MfxHwVP9Encode
case MFX_RATECONTROL_VBR: return VA_RC_VBR;
case MFX_RATECONTROL_AVBR: return VA_RC_VBR;
case MFX_RATECONTROL_CQP: return VA_RC_CQP;
case MFX_RATECONTROL_ICQ: return VA_RC_ICQ;
default: assert(!"Unsupported RateControl"); return 0;
}
}
Expand Down Expand Up @@ -419,6 +420,10 @@ mfxStatus SetRateControl(
rate_param->rc_flags.bits.reset = isBrcResetRequired;
rate_param->rc_flags.bits.temporal_id = tl;
}
else if(par.mfx.RateControlMethod == MFX_RATECONTROL_ICQ)
{
rate_param->ICQ_quality_factor = par.mfx.ICQQuality;
}

rate_param->rc_flags.bits.enable_dynamic_scaling = 1;

Expand Down
Loading