-
Notifications
You must be signed in to change notification settings - Fork 502
Closed
Labels
VideoVulkan Video extensionsVulkan Video extensions
Description
Originally noticed in ash-rs/ash#417 (comment), Windows and Linux C compilers treat the total size of bitfields differently. The struct:
typedef struct StdVideoH265HrdFlags {
uint32_t nal_hrd_parameters_present_flag : 1;
uint32_t vcl_hrd_parameters_present_flag : 1;
uint32_t sub_pic_hrd_params_present_flag : 1;
uint32_t sub_pic_cpb_params_in_pic_timing_sei_flag : 1;
uint8_t fixed_pic_rate_general_flag; // each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1
uint8_t fixed_pic_rate_within_cvs_flag; // each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1
uint8_t low_delay_hrd_flag; // each bit represents a sublayer, bit 0 - vps_max_sub_layers_minus1
} StdVideoH265HrdFlags;
Takes up 1
byte for the first four bitflags on Linux, but 4
bytes on Windows, leading to a - perhaps unexpected - mismatch. See https://godbolt.org/z/bev9eEzdv for a compiler comparison. Is this known and desired?
Metadata
Metadata
Assignees
Labels
VideoVulkan Video extensionsVulkan Video extensions