mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
radeonsi/vcn: Only allow to enable pre-encode on first frame
The quality level may change every frame, but we can only enable pre-encode on first frame because it changes context buffer layout and currently we only allow the context buffer to grow (append recon pics at the end). Reviewed-by: Benjamin Cheng <benjamin.cheng@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38257>
This commit is contained in:
parent
b8c317c459
commit
7845ba5a8d
1 changed files with 6 additions and 4 deletions
|
|
@ -32,11 +32,13 @@ static void radeon_vcn_enc_quality_modes(struct radeon_encoder *enc,
|
|||
p->preset_mode == RENCODE_PRESET_MODE_HIGH_QUALITY)
|
||||
p->preset_mode = RENCODE_PRESET_MODE_QUALITY;
|
||||
|
||||
p->pre_encode_mode = in->pre_encode_mode ? RENCODE_PREENCODE_MODE_4X
|
||||
: RENCODE_PREENCODE_MODE_NONE;
|
||||
if (enc->first_frame) {
|
||||
p->pre_encode_mode = in->pre_encode_mode ? RENCODE_PREENCODE_MODE_4X
|
||||
: RENCODE_PREENCODE_MODE_NONE;
|
||||
|
||||
if (enc->enc_pic.rc_session_init.rate_control_method == RENCODE_RATE_CONTROL_METHOD_QUALITY_VBR)
|
||||
p->pre_encode_mode = RENCODE_PREENCODE_MODE_4X;
|
||||
if (enc->enc_pic.rc_session_init.rate_control_method == RENCODE_RATE_CONTROL_METHOD_QUALITY_VBR)
|
||||
p->pre_encode_mode = RENCODE_PREENCODE_MODE_4X;
|
||||
}
|
||||
|
||||
p->vbaq_mode = in->vbaq_mode ? RENCODE_VBAQ_AUTO : RENCODE_VBAQ_NONE;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue