radeon/vcn: determine idr by pic type

Submitted by Zhang, Boyuan on Dec. 8, 2017, 11:33 p.m.

Details

Message ID 1512776040-28585-1-git-send-email-boyuan.zhang@amd.com
State New
Headers show
Series "radeon/vcn: determine idr by pic type" ( rev: 2 ) in Mesa

Not browsing as part of any series.

Commit Message

Zhang, Boyuan Dec. 8, 2017, 11:33 p.m.
From: Boyuan Zhang <boyuan.zhang@amd.com>

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 <boyuan.zhang@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian K├Ânig <christian.koenig@amd.com>
---
 src/gallium/drivers/radeon/radeon_vcn_enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeon/radeon_vcn_enc.c b/src/gallium/drivers/radeon/radeon_vcn_enc.c
index 9806a69..5fc9fc7 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;