mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
frontend/va: Allow distinction for HRD params sent from app and frontend defaults
Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22530>
This commit is contained in:
parent
30a6363c8f
commit
44c53786a0
3 changed files with 12 additions and 0 deletions
|
|
@ -339,6 +339,10 @@ vlVaHandleVAEncMiscParameterTypeHRDH264(vlVaContext *context, VAEncMiscParameter
|
|||
if (ms->buffer_size) {
|
||||
context->desc.h264enc.rate_ctrl[0].vbv_buffer_size = ms->buffer_size;
|
||||
context->desc.h264enc.rate_ctrl[0].vbv_buf_lv = (ms->initial_buffer_fullness << 6 ) / ms->buffer_size;
|
||||
context->desc.h264enc.rate_ctrl[0].vbv_buf_initial_size = ms->initial_buffer_fullness;
|
||||
/* Distinguishes from the default params set for these values in other
|
||||
functions and app specific params passed down via HRD buffer */
|
||||
context->desc.h264enc.rate_ctrl[0].app_requested_hrd_buffer = true;
|
||||
}
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -412,6 +412,10 @@ vlVaHandleVAEncMiscParameterTypeHRDHEVC(vlVaContext *context, VAEncMiscParameter
|
|||
if (ms->buffer_size) {
|
||||
context->desc.h265enc.rc.vbv_buffer_size = ms->buffer_size;
|
||||
context->desc.h265enc.rc.vbv_buf_lv = (ms->initial_buffer_fullness << 6 ) / ms->buffer_size;
|
||||
context->desc.h265enc.rc.vbv_buf_initial_size = ms->initial_buffer_fullness;
|
||||
/* Distinguishes from the default params set for these values in other
|
||||
functions and app specific params passed down via HRD buffer */
|
||||
context->desc.h265enc.rc.app_requested_hrd_buffer = true;
|
||||
}
|
||||
|
||||
return VA_STATUS_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -409,6 +409,8 @@ struct pipe_h264_enc_rate_control
|
|||
unsigned frame_rate_den;
|
||||
unsigned vbv_buffer_size;
|
||||
unsigned vbv_buf_lv;
|
||||
unsigned vbv_buf_initial_size;
|
||||
bool app_requested_hrd_buffer;
|
||||
unsigned target_bits_picture;
|
||||
unsigned peak_bits_picture_integer;
|
||||
unsigned peak_bits_picture_fraction;
|
||||
|
|
@ -612,6 +614,8 @@ struct pipe_h265_enc_rate_control
|
|||
unsigned quant_b_frames;
|
||||
unsigned vbv_buffer_size;
|
||||
unsigned vbv_buf_lv;
|
||||
unsigned vbv_buf_initial_size;
|
||||
bool app_requested_hrd_buffer;
|
||||
unsigned target_bits_picture;
|
||||
unsigned peak_bits_picture_integer;
|
||||
unsigned peak_bits_picture_fraction;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue