diff --git a/.pick_status.json b/.pick_status.json index e4d96e0160f..c09d3b74f85 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1724,7 +1724,7 @@ "description": "vulkan/video: hevc: b-frames can be reference or not", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "72f52329cd7166bf46d1544e7d93705d3ff9a7dd", "notes": null diff --git a/src/vulkan/runtime/vk_video.c b/src/vulkan/runtime/vk_video.c index cba345c3cd6..9934e1271a9 100644 --- a/src/vulkan/runtime/vk_video.c +++ b/src/vulkan/runtime/vk_video.c @@ -1314,9 +1314,9 @@ enum HEVCNALUnitType { }; unsigned -vk_video_get_h265_nal_unit(StdVideoH265PictureType pic_type, bool irap_pic_flag) +vk_video_get_h265_nal_unit(const StdVideoEncodeH265PictureInfo *pic_info) { - switch (pic_type) { + switch (pic_info->pic_type) { case STD_VIDEO_H265_PICTURE_TYPE_IDR: return HEVC_NAL_IDR_W_RADL; case STD_VIDEO_H265_PICTURE_TYPE_I: @@ -1324,10 +1324,16 @@ vk_video_get_h265_nal_unit(StdVideoH265PictureType pic_type, bool irap_pic_flag) case STD_VIDEO_H265_PICTURE_TYPE_P: return HEVC_NAL_TRAIL_R; case STD_VIDEO_H265_PICTURE_TYPE_B: - if (irap_pic_flag) - return HEVC_NAL_RASL_R; + if (pic_info->flags.IrapPicFlag) + if (pic_info->flags.is_reference) + return HEVC_NAL_RASL_R; + else + return HEVC_NAL_RASL_N; else - return HEVC_NAL_TRAIL_R; + if (pic_info->flags.is_reference) + return HEVC_NAL_TRAIL_R; + else + return HEVC_NAL_TRAIL_N; break; default: assert(0); diff --git a/src/vulkan/runtime/vk_video.h b/src/vulkan/runtime/vk_video.h index 71248537e25..b02da73ce42 100644 --- a/src/vulkan/runtime/vk_video.h +++ b/src/vulkan/runtime/vk_video.h @@ -262,7 +262,7 @@ vk_video_encode_h264_pps(StdVideoH264PictureParameterSet *pps, void *data_ptr); unsigned -vk_video_get_h265_nal_unit(StdVideoH265PictureType pic_type, bool irap_pic_flag); +vk_video_get_h265_nal_unit(const StdVideoEncodeH265PictureInfo *pic_info); void vk_video_encode_h265_vps(StdVideoH265VideoParameterSet *vps,