radeon/vce: determine idr by pic type
authorBoyuan Zhang <boyuan.zhang@amd.com>
Thu, 7 Dec 2017 21:10:13 +0000 (16:10 -0500)
committerLeo Liu <leo.liu@amd.com>
Fri, 15 Dec 2017 21:04:05 +0000 (16:04 -0500)
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>
src/gallium/drivers/radeon/radeon_vce_52.c

index 10bf718c55a60de9a263a5ed0a1535c6f5655fe3..a941c476f65bc9fbabf2a73d13c757793563692b 100644 (file)
@@ -162,7 +162,7 @@ void si_vce_52_get_param(struct rvce_encoder *enc, struct pipe_h264_enc_picture_
                enc->enc_pic.addrmode_arraymode_disrdo_distwoinstants = 0x00000201;
        else
                enc->enc_pic.addrmode_arraymode_disrdo_distwoinstants = 0x01000201;
-       enc->enc_pic.is_idr = pic->is_idr;
+       enc->enc_pic.is_idr = (pic->picture_type == PIPE_H264_ENC_PICTURE_TYPE_IDR);
 }
 
 static void create(struct rvce_encoder *enc)