radv/video: Select temporal layer when encoding each frame

This makes the rate control per temporal layer work.

Fixes: 54d499818c ("radv/video: add initial support for encoding with h264.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28734>
This commit is contained in:
David Rosca 2024-04-12 21:14:00 +02:00 committed by Dave Airlie
parent 3393e56373
commit 4a19047d32

View file

@ -1349,6 +1349,7 @@ radv_enc_params(struct radv_cmd_buffer *cmd_buffer, const VkVideoEncodeInfoKHR *
pic_type = RENCODE_PICTURE_TYPE_I;
break;
}
radv_enc_layer_select(cmd_buffer, h264_pic->temporal_id);
} else if (h265_pic) {
switch (h265_pic->pic_type) {
case STD_VIDEO_H265_PICTURE_TYPE_P:
@ -1365,6 +1366,7 @@ radv_enc_params(struct radv_cmd_buffer *cmd_buffer, const VkVideoEncodeInfoKHR *
pic_type = RENCODE_PICTURE_TYPE_I;
break;
}
radv_enc_layer_select(cmd_buffer, h265_pic->TemporalId);
} else {
assert(0);
return;