vulkan/video: Do byte-alignment when building a h264 slice header

Fixes: ff8de6190 ("vulkan/video: adds a bitstream writer of h264 slice header")
Closes: mesa/mesa#12835

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34094>
(cherry picked from commit c22a635938)
This commit is contained in:
Hyunjun Ko 2025-03-20 16:33:27 +09:00 committed by Eric Engestrom
parent 6ad9455f43
commit 167bcee3b7
2 changed files with 2 additions and 1 deletions

View file

@ -3454,7 +3454,7 @@
"description": "vulkan/video: Do byte-alignment when building a h264 slice header",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "ff8de61907083855a5c3bf307e133628cd919b4c",
"notes": null

View file

@ -2258,6 +2258,7 @@ vk_video_encode_h264_slice_header(const StdVideoEncodeH264PictureInfo *pic_info,
assert(is_aligned);
}
vl_bitstream_rbsp_trailing(&enc);
vl_bitstream_flush(&enc);
*data_size_ptr += vl_bitstream_get_byte_count(&enc);
vl_bitstream_encoder_free(&enc);