Skip to content

Commit

Permalink
Fix functionaly of vp9 icq
Browse files Browse the repository at this point in the history
Signed-off-by: Yao, Leyu <[email protected]>
  • Loading branch information
leyu-yao committed Feb 7, 2024
1 parent 695d562 commit 431f868
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
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

0 comments on commit 431f868

Please sign in to comment.