aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_vcn_enc.c
diff options
context:
space:
mode:
authorBoyuan Zhang <[email protected]>2017-11-30 11:58:32 -0500
committerLeo Liu <[email protected]>2017-12-15 16:04:05 -0500
commitc87d91b9d87c6837df16cf0537b9e964cc94106c (patch)
tree0d1cc58fe8346dfd5b0633959765e6593416cb02 /src/gallium/drivers/radeon/radeon_vcn_enc.c
parent5d03a68640dcf216484e37c316d2d91db9994a66 (diff)
radeon/vcn: determine idr by pic type
Vaapi encode interface provides idr frame flags, where omx interface doesn't. Therefore, change to use picture type to determine idr frame, which will work for both interfaces. Signed-off-by: Boyuan Zhang <[email protected]> Reviewed-by: Leo Liu <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_vcn_enc.c')
-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 abc89a7c597..06579c83f24 100644
--- a/src/gallium/drivers/radeon/radeon_vcn_enc.c
+++ b/src/gallium/drivers/radeon/radeon_vcn_enc.c
@@ -47,7 +47,7 @@ static void radeon_vcn_enc_get_param(struct radeon_encoder *enc, struct pipe_h26
enc->enc_pic.ref_idx_l0 = pic->ref_idx_l0;
enc->enc_pic.ref_idx_l1 = pic->ref_idx_l1;
enc->enc_pic.not_referenced = pic->not_referenced;
- enc->enc_pic.is_idr = pic->is_idr;
+ enc->enc_pic.is_idr = (pic->picture_type == PIPE_H264_ENC_PICTURE_TYPE_IDR);
enc->enc_pic.crop_left = 0;
enc->enc_pic.crop_right = (align(enc->base.width, 16) - enc->base.width) / 2;
enc->enc_pic.crop_top = 0;