summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorBoyuan Zhang <boyuan.zhang@amd.com>2021-08-18 22:30:02 -0400
committerMarge Bot <eric+marge@anholt.net>2021-08-19 14:25:09 +0000
commit4081516b3e4288524359c5e664abbf6f38fcb1b9 (patch)
tree9fab77c15555865a52882391f1747e0f88d680e8 /src/gallium/drivers/radeon
parent59f2c85845cd9226b62d83d7d221bd1f1f906068 (diff)
radeon/vcn: set min value for num_temporal_layers
Fixes: 51935d59 In the case where num_temporal_layers is not set (0), set it using the minimum value 1, otherwise the rate control settings will be missing. Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com> Reviewed-by: Thong Thai <thong.thai@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12463>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/radeon_vcn_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vcn_enc.c b/src/gallium/drivers/radeon/radeon_vcn_enc.c
index f02def3a82b..ab13dad3c63 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_enc.c
+++ b/src/gallium/drivers/radeon/radeon_vcn_enc.c
@@ -61,7 +61,7 @@ static void radeon_vcn_enc_get_param(struct radeon_encoder *enc, struct pipe_pic
enc->enc_pic.crop_top = 0;
enc->enc_pic.crop_bottom = (align(enc->base.height, 16) - enc->base.height) / 2;
}
- enc->enc_pic.num_temporal_layers = pic->num_temporal_layers;
+ enc->enc_pic.num_temporal_layers = pic->num_temporal_layers ? pic->num_temporal_layers : 1;
enc->enc_pic.temporal_id = 0;
for (int i = 0; i < enc->enc_pic.num_temporal_layers; i++)
{