1#[repr(C)]
4#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
5pub struct __BindgenBitfieldUnit<Storage> {
6 storage: Storage,
7}
8impl<Storage> __BindgenBitfieldUnit<Storage> {
9 #[inline]
10 pub const fn new(storage: Storage) -> Self {
11 Self { storage }
12 }
13}
14impl<Storage> __BindgenBitfieldUnit<Storage>
15where
16 Storage: AsRef<[u8]> + AsMut<[u8]>,
17{
18 #[inline]
19 fn extract_bit(byte: u8, index: usize) -> bool {
20 let bit_index = if cfg!(target_endian = "big") {
21 7 - (index % 8)
22 } else {
23 index % 8
24 };
25 let mask = 1 << bit_index;
26 byte & mask == mask
27 }
28 #[inline]
29 pub fn get_bit(&self, index: usize) -> bool {
30 debug_assert!(index / 8 < self.storage.as_ref().len());
31 let byte_index = index / 8;
32 let byte = self.storage.as_ref()[byte_index];
33 Self::extract_bit(byte, index)
34 }
35 #[inline]
36 pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool {
37 debug_assert!(index / 8 < core::mem::size_of::<Storage>());
38 let byte_index = index / 8;
39 let byte = unsafe { *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) };
40 Self::extract_bit(byte, index)
41 }
42 #[inline]
43 fn change_bit(byte: u8, index: usize, val: bool) -> u8 {
44 let bit_index = if cfg!(target_endian = "big") {
45 7 - (index % 8)
46 } else {
47 index % 8
48 };
49 let mask = 1 << bit_index;
50 if val {
51 byte | mask
52 } else {
53 byte & !mask
54 }
55 }
56 #[inline]
57 pub fn set_bit(&mut self, index: usize, val: bool) {
58 debug_assert!(index / 8 < self.storage.as_ref().len());
59 let byte_index = index / 8;
60 let byte = &mut self.storage.as_mut()[byte_index];
61 *byte = Self::change_bit(*byte, index, val);
62 }
63 #[inline]
64 pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) {
65 debug_assert!(index / 8 < core::mem::size_of::<Storage>());
66 let byte_index = index / 8;
67 let byte = unsafe { (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) };
68 unsafe { *byte = Self::change_bit(*byte, index, val) };
69 }
70 #[inline]
71 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
72 debug_assert!(bit_width <= 64);
73 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
74 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
75 let mut val = 0;
76 for i in 0..(bit_width as usize) {
77 if self.get_bit(i + bit_offset) {
78 let index = if cfg!(target_endian = "big") {
79 bit_width as usize - 1 - i
80 } else {
81 i
82 };
83 val |= 1 << index;
84 }
85 }
86 val
87 }
88 #[inline]
89 pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 {
90 debug_assert!(bit_width <= 64);
91 debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
92 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
93 let mut val = 0;
94 for i in 0..(bit_width as usize) {
95 if unsafe { Self::raw_get_bit(this, i + bit_offset) } {
96 let index = if cfg!(target_endian = "big") {
97 bit_width as usize - 1 - i
98 } else {
99 i
100 };
101 val |= 1 << index;
102 }
103 }
104 val
105 }
106 #[inline]
107 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
108 debug_assert!(bit_width <= 64);
109 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
110 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
111 for i in 0..(bit_width as usize) {
112 let mask = 1 << i;
113 let val_bit_is_set = val & mask == mask;
114 let index = if cfg!(target_endian = "big") {
115 bit_width as usize - 1 - i
116 } else {
117 i
118 };
119 self.set_bit(index + bit_offset, val_bit_is_set);
120 }
121 }
122 #[inline]
123 pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) {
124 debug_assert!(bit_width <= 64);
125 debug_assert!(bit_offset / 8 < core::mem::size_of::<Storage>());
126 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::<Storage>());
127 for i in 0..(bit_width as usize) {
128 let mask = 1 << i;
129 let val_bit_is_set = val & mask == mask;
130 let index = if cfg!(target_endian = "big") {
131 bit_width as usize - 1 - i
132 } else {
133 i
134 };
135 unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) };
136 }
137 }
138}
139#[repr(C)]
140#[derive(Default)]
141pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
142impl<T> __IncompleteArrayField<T> {
143 #[inline]
144 pub const fn new() -> Self {
145 __IncompleteArrayField(::std::marker::PhantomData, [])
146 }
147 #[inline]
148 pub fn as_ptr(&self) -> *const T {
149 self as *const _ as *const T
150 }
151 #[inline]
152 pub fn as_mut_ptr(&mut self) -> *mut T {
153 self as *mut _ as *mut T
154 }
155 #[inline]
156 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
157 ::std::slice::from_raw_parts(self.as_ptr(), len)
158 }
159 #[inline]
160 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
161 ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
162 }
163}
164impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
165 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
166 fmt.write_str("__IncompleteArrayField")
167 }
168}
169#[doc = " Return status type from functions */\n/** Values for the return status"]
170pub const VA_STATUS_SUCCESS: u32 = 0;
171pub const VA_STATUS_ERROR_OPERATION_FAILED: u32 = 1;
172pub const VA_STATUS_ERROR_INVALID_BUFFER: u32 = 7;
173pub const VA_STATUS_ERROR_INVALID_IMAGE: u32 = 8;
174pub const VA_STATUS_ERROR_DECODING_ERROR: u32 = 23;
175#[doc = "< YUV 4:2:0 8-bit."]
176pub const VA_RT_FORMAT_YUV420: u32 = 1;
177#[doc = "< YUV 4:2:2 8-bit."]
178pub const VA_RT_FORMAT_YUV422: u32 = 2;
179#[doc = "< YUV 4:2:0 10-bit."]
180pub const VA_RT_FORMAT_YUV420_10: u32 = 256;
181#[doc = "< Packed RGB, 32 bits per pixel, 8 bits per colour sample."]
182pub const VA_RT_FORMAT_RGB32: u32 = 131072;
183#[doc = " \\brief Constant bitrate."]
184pub const VA_RC_CBR: u32 = 2;
185#[doc = " \\brief Variable bitrate."]
186pub const VA_RC_VBR: u32 = 4;
187#[doc = " \\brief Driver supports packed sequence headers. e.g. SPS for H.264.\n\n Application must provide it to driver once this flag is returned through\n vaGetConfigAttributes()"]
188pub const VA_ENC_PACKED_HEADER_SEQUENCE: u32 = 1;
189#[doc = " \\brief Driver supports packed picture headers. e.g. PPS for H.264.\n\n Application must provide it to driver once this falg is returned through\n vaGetConfigAttributes()"]
190pub const VA_ENC_PACKED_HEADER_PICTURE: u32 = 2;
191#[doc = " \\brief Driver supports packed slice headers. e.g. slice_header() for H.264.\n\n Application must provide it to driver once this flag is returned through\n vaGetConfigAttributes()"]
192pub const VA_ENC_PACKED_HEADER_SLICE: u32 = 4;
193#[doc = " \\brief Dirver require both reference list must be not empty for inter frame"]
194pub const VA_PREDICTION_DIRECTION_BI_NOT_EMPTY: u32 = 4;
195#[doc = " if an attribute is not applicable for a given\n profile/entrypoint pair, then set the value to the following"]
196pub const VA_ATTRIB_NOT_SUPPORTED: u32 = 2147483648;
197pub const VA_INVALID_ID: u32 = 4294967295;
198#[doc = " \\brief Surface attribute can be set through vaCreateSurfaces()."]
199pub const VA_SURFACE_ATTRIB_SETTABLE: u32 = 2;
200#[doc = " @name VASurfaceAttribMemoryType values in bit fields.\n Bits 0:7 are reserved for generic types. Bits 31:28 are reserved for\n Linux DRM. Bits 23:20 are reserved for Android. Bits 19:16 are reserved for Win32.\n DRM, Android and Win32 specific types are defined in respective va_*.h header files.\n/\n/**@{*/\n/** \\brief VA memory type (default) is supported."]
201pub const VA_SURFACE_ATTRIB_MEM_TYPE_VA: u32 = 1;
202#[doc = " \\brief V4L2 buffer memory type is supported."]
203pub const VA_SURFACE_ATTRIB_MEM_TYPE_V4L2: u32 = 2;
204#[doc = " \\brief User pointer memory type is supported."]
205pub const VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR: u32 = 4;
206#[doc = " \\brief Surface used by video decoder."]
207pub const VA_SURFACE_ATTRIB_USAGE_HINT_DECODER: u32 = 1;
208#[doc = " \\brief Surface used by video encoder."]
209pub const VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER: u32 = 2;
210#[doc = " \\brief Surface read by video post-processing."]
211pub const VA_SURFACE_ATTRIB_USAGE_HINT_VPP_READ: u32 = 4;
212#[doc = " \\brief Surface written by video post-processing."]
213pub const VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE: u32 = 8;
214#[doc = " \\brief Surface used for display."]
215pub const VA_SURFACE_ATTRIB_USAGE_HINT_DISPLAY: u32 = 16;
216#[doc = " \\brief Surface used for export to third-party APIs, e.g. via\n vaExportSurfaceHandle()."]
217pub const VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT: u32 = 32;
218pub const VA_PROGRESSIVE: u32 = 1;
219#[doc = " There will be cases where the bitstream buffer will not have enough room to hold\n the data for the entire slice, and the following flags will be used in the slice\n parameter to signal to the server for the possible cases.\n If a slice parameter buffer and slice data buffer pair is sent to the server with\n the slice data partially in the slice data buffer (BEGIN and MIDDLE cases below),\n then a slice parameter and data buffer needs to be sent again to complete this slice."]
220pub const VA_SLICE_DATA_FLAG_ALL: u32 = 0;
221pub const VA_PICTURE_H264_INVALID: u32 = 1;
222pub const VA_PICTURE_H264_SHORT_TERM_REFERENCE: u32 = 8;
223pub const VA_PICTURE_H264_LONG_TERM_REFERENCE: u32 = 16;
224#[doc = " @name vaExportSurfaceHandle() flags\n\n @{\n/\n/** Export surface to be read by external API."]
225pub const VA_EXPORT_SURFACE_READ_ONLY: u32 = 1;
226#[doc = " Export surface with composed layers.\n\n For example, NV12 surfaces should be exported as a single NV12\n composed object."]
227pub const VA_EXPORT_SURFACE_COMPOSED_LAYERS: u32 = 8;
228#[doc = " NV12: two-plane 8-bit YUV 4:2:0.\n The first plane contains Y, the second plane contains U and V in pairs of bytes."]
229pub const VA_FOURCC_NV12: u32 = 842094158;
230#[doc = " RGBA: packed 8-bit RGBA.\n\n Four bytes per pixel: red, green, blue, alpha."]
231pub const VA_FOURCC_RGBA: u32 = 1094862674;
232#[doc = " RGBX: packed 8-bit RGB.\n\n Four bytes per pixel: red, green, blue, unspecified."]
233pub const VA_FOURCC_RGBX: u32 = 1480738642;
234#[doc = " BGRA: packed 8-bit RGBA.\n\n Four bytes per pixel: blue, green, red, alpha."]
235pub const VA_FOURCC_BGRA: u32 = 1095911234;
236#[doc = " BGRX: packed 8-bit RGB.\n\n Four bytes per pixel: blue, green, red, unspecified."]
237pub const VA_FOURCC_BGRX: u32 = 1481787202;
238#[doc = " ARGB: packed 8-bit RGBA.\n\n Four bytes per pixel: alpha, red, green, blue."]
239pub const VA_FOURCC_ARGB: u32 = 1111970369;
240#[doc = " XRGB: packed 8-bit RGB.\n\n Four bytes per pixel: unspecified, red, green, blue."]
241pub const VA_FOURCC_XRGB: u32 = 1111970392;
242#[doc = " YUY2: packed 8-bit YUV 4:2:2.\n\n Four bytes per pair of pixels: Y, U, Y, V."]
243pub const VA_FOURCC_YUY2: u32 = 844715353;
244#[doc = " YV12: three-plane 8-bit YUV 4:2:0.\n\n The three planes contain Y, V and U respectively."]
245pub const VA_FOURCC_YV12: u32 = 842094169;
246#[doc = " I420: three-plane 8-bit YUV 4:2:0.\n\n The three planes contain Y, U and V respectively."]
247pub const VA_FOURCC_I420: u32 = 808596553;
248#[doc = " P010: two-plane 10-bit YUV 4:2:0.\n\n Each sample is a two-byte little-endian value with the bottom six bits ignored.\n The first plane contains Y, the second plane contains U and V in pairs of samples."]
249pub const VA_FOURCC_P010: u32 = 808530000;
250pub const VA_PICTURE_HEVC_INVALID: u32 = 1;
251#[doc = " \\brief Long term reference picture"]
252pub const VA_PICTURE_HEVC_LONG_TERM_REFERENCE: u32 = 8;
253#[doc = " VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE, VA_PICTURE_HEVC_RPS_ST_CURR_AFTER\n and VA_PICTURE_HEVC_RPS_LT_CURR of any picture in ReferenceFrames[] should\n be exclusive. No more than one of them can be set for any picture.\n Sum of NumPocStCurrBefore, NumPocStCurrAfter and NumPocLtCurr\n equals NumPocTotalCurr, which should be equal to or smaller than 8.\n Application should provide valid values for both short format and long format.\n The pictures in DPB with any of these three flags turned on are referred by\n the current picture.\n/\n/** \\brief RefPicSetStCurrBefore of HEVC spec variable\n Number of ReferenceFrames[] entries with this bit set equals\n NumPocStCurrBefore."]
254pub const VA_PICTURE_HEVC_RPS_ST_CURR_BEFORE: u32 = 16;
255#[doc = " \\brief RefPicSetStCurrAfter of HEVC spec variable\n Number of ReferenceFrames[] entries with this bit set equals\n NumPocStCurrAfter."]
256pub const VA_PICTURE_HEVC_RPS_ST_CURR_AFTER: u32 = 32;
257#[doc = " \\brief RefPicSetLtCurr of HEVC spec variable\n Number of ReferenceFrames[] entries with this bit set equals\n NumPocLtCurr."]
258pub const VA_PICTURE_HEVC_RPS_LT_CURR: u32 = 64;
259pub const VA_SOURCE_RANGE_REDUCED: u32 = 1;
260pub const VA_SOURCE_RANGE_FULL: u32 = 2;
261#[doc = " \\brief DRM PRIME memory type\n\n Used with VADRMPRIMESurfaceDescriptor."]
262pub const VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2: u32 = 1073741824;
263#[doc = "Overview\n\nThe VA API is intended to provide an interface between a video decode/encode/processing\napplication (client) and a hardware accelerator (server), to off-load\nvideo decode/encode/processing operations from the host to the hardware accelerator at various\nentry-points.\n\nThe basic operation steps are:\n\n- Negotiate a mutually acceptable configuration with the server to lock\ndown profile, entrypoints, and other attributes that will not change on\na frame-by-frame basis.\n- Create a video decode, encode or processing context which represents a\n\"virtualized\" hardware device\n- Get and fill the render buffers with the corresponding data (depending on\nprofiles and entrypoints)\n- Pass the render buffers to the server to handle the current frame\n\nInitialization & Configuration Management\n\n- Find out supported profiles\n- Find out entrypoints for a given profile\n- Find out configuration attributes for a given profile/entrypoint pair\n- Create a configuration for use by the application"]
264pub type VADisplay = *mut ::std::os::raw::c_void;
265pub type VAStatus = ::std::os::raw::c_int;
266#[doc = " \\brief Structure to describe rectangle."]
267#[repr(C)]
268#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
269pub struct _VARectangle {
270 pub x: i16,
271 pub y: i16,
272 pub width: u16,
273 pub height: u16,
274}
275#[doc = " \\brief Structure to describe rectangle."]
276pub type VARectangle = _VARectangle;
277pub mod VAProfile {
278 #[doc = " Currently defined profiles"]
279 pub type Type = ::std::os::raw::c_int;
280 #[doc = " \\brief Profile ID used for video processing."]
281 pub const VAProfileNone: Type = -1;
282 #[doc = " \\brief Profile ID used for video processing."]
283 pub const VAProfileMPEG2Simple: Type = 0;
284 #[doc = " \\brief Profile ID used for video processing."]
285 pub const VAProfileMPEG2Main: Type = 1;
286 #[doc = " \\brief Profile ID used for video processing."]
287 pub const VAProfileMPEG4Simple: Type = 2;
288 #[doc = " \\brief Profile ID used for video processing."]
289 pub const VAProfileMPEG4AdvancedSimple: Type = 3;
290 #[doc = " \\brief Profile ID used for video processing."]
291 pub const VAProfileMPEG4Main: Type = 4;
292 #[doc = " \\brief Profile ID used for video processing."]
293 pub const VAProfileH264Baseline: Type = 5;
294 #[doc = " \\brief Profile ID used for video processing."]
295 pub const VAProfileH264Main: Type = 6;
296 #[doc = " \\brief Profile ID used for video processing."]
297 pub const VAProfileH264High: Type = 7;
298 #[doc = " \\brief Profile ID used for video processing."]
299 pub const VAProfileVC1Simple: Type = 8;
300 #[doc = " \\brief Profile ID used for video processing."]
301 pub const VAProfileVC1Main: Type = 9;
302 #[doc = " \\brief Profile ID used for video processing."]
303 pub const VAProfileVC1Advanced: Type = 10;
304 #[doc = " \\brief Profile ID used for video processing."]
305 pub const VAProfileH263Baseline: Type = 11;
306 #[doc = " \\brief Profile ID used for video processing."]
307 pub const VAProfileJPEGBaseline: Type = 12;
308 #[doc = " \\brief Profile ID used for video processing."]
309 pub const VAProfileH264ConstrainedBaseline: Type = 13;
310 #[doc = " \\brief Profile ID used for video processing."]
311 pub const VAProfileVP8Version0_3: Type = 14;
312 #[doc = " \\brief Profile ID used for video processing."]
313 pub const VAProfileH264MultiviewHigh: Type = 15;
314 #[doc = " \\brief Profile ID used for video processing."]
315 pub const VAProfileH264StereoHigh: Type = 16;
316 #[doc = " \\brief Profile ID used for video processing."]
317 pub const VAProfileHEVCMain: Type = 17;
318 #[doc = " \\brief Profile ID used for video processing."]
319 pub const VAProfileHEVCMain10: Type = 18;
320 #[doc = " \\brief Profile ID used for video processing."]
321 pub const VAProfileVP9Profile0: Type = 19;
322 #[doc = " \\brief Profile ID used for video processing."]
323 pub const VAProfileVP9Profile1: Type = 20;
324 #[doc = " \\brief Profile ID used for video processing."]
325 pub const VAProfileVP9Profile2: Type = 21;
326 #[doc = " \\brief Profile ID used for video processing."]
327 pub const VAProfileVP9Profile3: Type = 22;
328 #[doc = " \\brief Profile ID used for video processing."]
329 pub const VAProfileHEVCMain12: Type = 23;
330 #[doc = " \\brief Profile ID used for video processing."]
331 pub const VAProfileHEVCMain422_10: Type = 24;
332 #[doc = " \\brief Profile ID used for video processing."]
333 pub const VAProfileHEVCMain422_12: Type = 25;
334 #[doc = " \\brief Profile ID used for video processing."]
335 pub const VAProfileHEVCMain444: Type = 26;
336 #[doc = " \\brief Profile ID used for video processing."]
337 pub const VAProfileHEVCMain444_10: Type = 27;
338 #[doc = " \\brief Profile ID used for video processing."]
339 pub const VAProfileHEVCMain444_12: Type = 28;
340 #[doc = " \\brief Profile ID used for video processing."]
341 pub const VAProfileHEVCSccMain: Type = 29;
342 #[doc = " \\brief Profile ID used for video processing."]
343 pub const VAProfileHEVCSccMain10: Type = 30;
344 #[doc = " \\brief Profile ID used for video processing."]
345 pub const VAProfileHEVCSccMain444: Type = 31;
346 #[doc = " \\brief Profile ID used for video processing."]
347 pub const VAProfileAV1Profile0: Type = 32;
348 #[doc = " \\brief Profile ID used for video processing."]
349 pub const VAProfileAV1Profile1: Type = 33;
350 #[doc = " \\brief Profile ID used for video processing."]
351 pub const VAProfileHEVCSccMain444_10: Type = 34;
352 #[doc = " \\brief Profile ID used for protected video playback."]
353 pub const VAProfileProtected: Type = 35;
354 #[doc = " \\brief Profile ID used for protected video playback."]
355 pub const VAProfileH264High10: Type = 36;
356 #[doc = " \\brief Profile ID used for protected video playback."]
357 pub const VAProfileVVCMain10: Type = 37;
358 #[doc = " \\brief Profile ID used for protected video playback."]
359 pub const VAProfileVVCMultilayerMain10: Type = 38;
360 #[doc = " \\brief Profile ID used for protected video playback."]
361 pub const VAProfileAV1Profile2: Type = 39;
362 #[doc = " \\brief Profile ID used for protected video playback."]
363 pub const VAProfileH264High422: Type = 40;
364}
365pub mod VAEntrypoint {
366 #[doc = " Currently defined entrypoints"]
367 pub type Type = ::std::os::raw::c_uint;
368 pub const VAEntrypointVLD: Type = 1;
369 pub const VAEntrypointIZZ: Type = 2;
370 pub const VAEntrypointIDCT: Type = 3;
371 pub const VAEntrypointMoComp: Type = 4;
372 pub const VAEntrypointDeblocking: Type = 5;
373 pub const VAEntrypointEncSlice: Type = 6;
374 pub const VAEntrypointEncPicture: Type = 7;
375 pub const VAEntrypointEncSliceLP: Type = 8;
376 #[doc = "< Video pre/post-processing."]
377 pub const VAEntrypointVideoProc: Type = 10;
378 #[doc = " \\brief VAEntrypointFEI\n\n The purpose of FEI (Flexible Encoding Infrastructure) is to allow applications to\n have more controls and trade off quality for speed with their own IPs.\n The application can optionally provide input to ENC for extra encode control\n and get the output from ENC. Application can chose to modify the ENC\n output/PAK input during encoding, but the performance impact is significant.\n\n On top of the existing buffers for normal encode, there will be\n one extra input buffer (VAEncMiscParameterFEIFrameControl) and\n three extra output buffers (VAEncFEIMVBufferType, VAEncFEIMBModeBufferType\n and VAEncFEIDistortionBufferType) for VAEntrypointFEI entry function.\n If separate PAK is set, two extra input buffers\n (VAEncFEIMVBufferType, VAEncFEIMBModeBufferType) are needed for PAK input."]
379 pub const VAEntrypointFEI: Type = 11;
380 #[doc = " \\brief VAEntrypointStats\n\n A pre-processing function for getting some statistics and motion vectors is added,\n and some extra controls for Encode pipeline are provided. The application can\n optionally call the statistics function to get motion vectors and statistics like\n variances, distortions before calling Encode function via this entry point.\n\n Checking whether Statistics is supported can be performed with vaQueryConfigEntrypoints().\n If Statistics entry point is supported, then the list of returned entry-points will\n include #VAEntrypointStats. Supported pixel format, maximum resolution and statistics\n specific attributes can be obtained via normal attribute query. One input buffer\n (VAStatsStatisticsParameterBufferType) and one or two output buffers\n (VAStatsStatisticsBufferType, VAStatsStatisticsBottomFieldBufferType (for interlace only)\n and VAStatsMVBufferType) are needed for this entry point."]
381 pub const VAEntrypointStats: Type = 12;
382 #[doc = " \\brief VAEntrypointProtectedTEEComm\n\n A function for communicating with TEE (Trusted Execution Environment)."]
383 pub const VAEntrypointProtectedTEEComm: Type = 13;
384 #[doc = " \\brief VAEntrypointProtectedContent\n\n A function for protected content to decrypt encrypted content."]
385 pub const VAEntrypointProtectedContent: Type = 14;
386}
387pub mod VAConfigAttribType {
388 #[doc = " Currently defined configuration attribute types"]
389 pub type Type = ::std::os::raw::c_uint;
390 pub const VAConfigAttribRTFormat: Type = 0;
391 pub const VAConfigAttribSpatialResidual: Type = 1;
392 pub const VAConfigAttribSpatialClipping: Type = 2;
393 pub const VAConfigAttribIntraResidual: Type = 3;
394 pub const VAConfigAttribEncryption: Type = 4;
395 pub const VAConfigAttribRateControl: Type = 5;
396 #[doc = " @name Attributes for decoding */\n/**@{*/\n/**\n \\brief Slice Decoding mode. Read/write.\n\n This attribute determines what mode the driver supports for slice\n decoding, through vaGetConfigAttributes(); and what mode the user\n will be providing to the driver, through vaCreateConfig(), if the\n driver supports those. If this attribute is not set by the user then\n it is assumed that VA_DEC_SLICE_MODE_NORMAL mode is used.\n\n See \\c VA_DEC_SLICE_MODE_xxx for the list of slice decoding modes."]
397 pub const VAConfigAttribDecSliceMode: Type = 6;
398 #[doc = " \\brief JPEG decoding attribute. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n JPEG implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValDecJPEG union."]
399 pub const VAConfigAttribDecJPEG: Type = 7;
400 #[doc = " \\brief Decode processing support. Read/write.\n\n This attribute determines if the driver supports video processing\n with decoding using the decoding context in a single call, through\n vaGetConfigAttributes(); and if the user may use this feature,\n through vaCreateConfig(), if the driver supports the user scenario.\n The user will essentially create a regular decode VAContext. Therefore,\n the parameters of vaCreateContext() such as picture_width, picture_height\n and render_targets are in relation to the decode output parameters\n (not processing output parameters) as normal.\n If this attribute is not set by the user then it is assumed that no\n extra processing is done after decoding for this decode context.\n\n Since essentially the application is creating a decoder config and context,\n all function calls that take in the config (e.g. vaQuerySurfaceAttributes())\n or context are in relation to the decoder, except those video processing\n function specified in the next paragraph.\n\n Once the decode config and context are created, the user must further\n query the supported processing filters using vaQueryVideoProcFilters(),\n vaQueryVideoProcFilterCaps(), vaQueryVideoProcPipelineCaps() by specifying\n the created decode context. The user must provide processing information\n and extra processing output surfaces as \"additional_outputs\" to the driver\n through VAProcPipelineParameterBufferType. The render_target specified\n at vaBeginPicture() time refers to the decode output surface. The\n target surface for the output of processing needs to be a different\n surface since the decode process requires the original reconstructed buffer.\n The \"surface\" member of VAProcPipelineParameterBuffer should be set to the\n same as \"render_target\" set in vaBeginPicture(), but the driver may choose\n to ignore this parameter."]
401 pub const VAConfigAttribDecProcessing: Type = 8;
402 #[doc = " @name Attributes for encoding */\n/**@{*/\n/**\n \\brief Packed headers mode. Read/write.\n\n This attribute determines what packed headers the driver supports,\n through vaGetConfigAttributes(); and what packed headers the user\n will be providing to the driver, through vaCreateConfig(), if the\n driver supports those.\n\n See \\c VA_ENC_PACKED_HEADER_xxx for the list of packed headers."]
403 pub const VAConfigAttribEncPackedHeaders: Type = 10;
404 #[doc = " \\brief Interlaced mode. Read/write.\n\n This attribute determines what kind of interlaced encoding mode\n the driver supports.\n\n See \\c VA_ENC_INTERLACED_xxx for the list of interlaced modes."]
405 pub const VAConfigAttribEncInterlaced: Type = 11;
406 #[doc = " \\brief Maximum number of reference frames. Read-only.\n\n This attribute determines the maximum number of reference\n frames supported for encoding.\n\n Note: for H.264 encoding, the value represents the maximum number\n of reference frames for both the reference picture list 0 (bottom\n 16 bits) and the reference picture list 1 (top 16 bits)."]
407 pub const VAConfigAttribEncMaxRefFrames: Type = 13;
408 #[doc = " \\brief Maximum number of slices per frame. Read-only.\n\n This attribute determines the maximum number of slices the\n driver can support to encode a single frame."]
409 pub const VAConfigAttribEncMaxSlices: Type = 14;
410 #[doc = " \\brief Slice structure. Read-only.\n\n This attribute determines slice structures supported by the\n driver for encoding. This attribute is a hint to the user so\n that he can choose a suitable surface size and how to arrange\n the encoding process of multiple slices per frame.\n\n More specifically, for H.264 encoding, this attribute\n determines the range of accepted values to\n VAEncSliceParameterBufferH264::macroblock_address and\n VAEncSliceParameterBufferH264::num_macroblocks.\n\n See \\c VA_ENC_SLICE_STRUCTURE_xxx for the supported slice\n structure types."]
411 pub const VAConfigAttribEncSliceStructure: Type = 15;
412 #[doc = " \\brief Macroblock information. Read-only.\n\n This attribute determines whether the driver supports extra\n encoding information per-macroblock. e.g. QP.\n\n More specifically, for H.264 encoding, if the driver returns a non-zero\n value for this attribute, this means the application can create\n additional #VAEncMacroblockParameterBufferH264 buffers referenced\n through VAEncSliceParameterBufferH264::macroblock_info."]
413 pub const VAConfigAttribEncMacroblockInfo: Type = 16;
414 #[doc = " \\brief Maximum picture width. Read-only.\n\n This attribute determines the maximum picture width the driver supports\n for a given configuration."]
415 pub const VAConfigAttribMaxPictureWidth: Type = 18;
416 #[doc = " \\brief Maximum picture height. Read-only.\n\n This attribute determines the maximum picture height the driver supports\n for a given configuration."]
417 pub const VAConfigAttribMaxPictureHeight: Type = 19;
418 #[doc = " \\brief JPEG encoding attribute. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n JPEG implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncJPEG union."]
419 pub const VAConfigAttribEncJPEG: Type = 20;
420 #[doc = " \\brief Encoding quality range attribute. Read-only.\n\n This attribute conveys whether the driver supports different quality level settings\n for encoding. A value less than or equal to 1 means that the encoder only has a single\n quality setting, and a value greater than 1 represents the number of quality levels\n that can be configured. e.g. a value of 2 means there are two distinct quality levels."]
421 pub const VAConfigAttribEncQualityRange: Type = 21;
422 #[doc = " \\brief Encoding quantization attribute. Read-only.\n\n This attribute conveys whether the driver supports certain types of quantization methods\n for encoding (e.g. trellis). See \\c VA_ENC_QUANTIZATION_xxx for the list of quantization methods"]
423 pub const VAConfigAttribEncQuantization: Type = 22;
424 #[doc = " \\brief Encoding intra refresh attribute. Read-only.\n\n This attribute conveys whether the driver supports certain types of intra refresh methods\n for encoding (e.g. adaptive intra refresh or rolling intra refresh).\n See \\c VA_ENC_INTRA_REFRESH_xxx for intra refresh methods"]
425 pub const VAConfigAttribEncIntraRefresh: Type = 23;
426 #[doc = " \\brief Encoding skip frame attribute. Read-only.\n\n This attribute conveys whether the driver supports sending skip frame parameters\n (VAEncMiscParameterTypeSkipFrame) to the encoder's rate control, when the user has\n externally skipped frames."]
427 pub const VAConfigAttribEncSkipFrame: Type = 24;
428 #[doc = " \\brief Encoding region-of-interest (ROI) attribute. Read-only.\n\n This attribute conveys whether the driver supports region-of-interest (ROI) encoding,\n based on user provided ROI rectangles. The attribute value is partitioned into fields\n as defined in the VAConfigAttribValEncROI union.\n\n If ROI encoding is supported, the ROI information is passed to the driver using\n VAEncMiscParameterTypeROI."]
429 pub const VAConfigAttribEncROI: Type = 25;
430 #[doc = " \\brief Encoding extended rate control attribute. Read-only.\n\n This attribute conveys whether the driver supports any extended rate control features\n The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncRateControlExt union."]
431 pub const VAConfigAttribEncRateControlExt: Type = 26;
432 #[doc = " \\brief Processing rate reporting attribute. Read-only.\n\n This attribute conveys whether the driver supports reporting of\n encode/decode processing rate based on certain set of parameters\n (i.e. levels, I frame internvals) for a given configuration.\n If this is supported, vaQueryProcessingRate() can be used to get\n encode or decode processing rate.\n See \\c VA_PROCESSING_RATE_xxx for encode/decode processing rate"]
433 pub const VAConfigAttribProcessingRate: Type = 27;
434 #[doc = " \\brief Encoding dirty rectangle. Read-only.\n\n This attribute conveys whether the driver supports dirty rectangle.\n encoding, based on user provided ROI rectangles which indicate the rectangular areas\n where the content has changed as compared to the previous picture. The regions of the\n picture that are not covered by dirty rect rectangles are assumed to have not changed\n compared to the previous picture. The encoder may do some optimizations based on\n this information. The attribute value returned indicates the number of regions that\n are supported. e.g. A value of 0 means dirty rect encoding is not supported. If dirty\n rect encoding is supported, the ROI information is passed to the driver using\n VAEncMiscParameterTypeDirtyRect."]
435 pub const VAConfigAttribEncDirtyRect: Type = 28;
436 #[doc = " \\brief Parallel Rate Control (hierachical B) attribute. Read-only.\n\n This attribute conveys whether the encoder supports parallel rate control.\n It is a integer value 0 - unsupported, > 0 - maximum layer supported.\n This is the way when hireachical B frames are encoded, multiple independent B frames\n on the same layer may be processed at same time. If supported, app may enable it by\n setting enable_parallel_brc in VAEncMiscParameterRateControl,and the number of B frames\n per layer per GOP will be passed to driver through VAEncMiscParameterParallelRateControl\n structure.Currently three layers are defined."]
437 pub const VAConfigAttribEncParallelRateControl: Type = 29;
438 #[doc = " \\brief Dynamic Scaling Attribute. Read-only.\n\n This attribute conveys whether encoder is capable to determine dynamic frame\n resolutions adaptive to bandwidth utilization and processing power, etc.\n It is a boolean value 0 - unsupported, 1 - supported.\n If it is supported,for VP9, suggested frame resolution can be retrieved from VACodedBufferVP9Status."]
439 pub const VAConfigAttribEncDynamicScaling: Type = 30;
440 #[doc = " \\brief frame size tolerance support\n it indicates the tolerance of frame size"]
441 pub const VAConfigAttribFrameSizeToleranceSupport: Type = 31;
442 #[doc = " \\brief Encode function type for FEI.\n\n This attribute conveys whether the driver supports different function types for encode.\n It can be VA_FEI_FUNCTION_ENC, VA_FEI_FUNCTION_PAK, or VA_FEI_FUNCTION_ENC_PAK. Currently\n it is for FEI entry point only.\n Default is VA_FEI_FUNCTION_ENC_PAK."]
443 pub const VAConfigAttribFEIFunctionType: Type = 32;
444 #[doc = " \\brief Maximum number of FEI MV predictors. Read-only.\n\n This attribute determines the maximum number of MV predictors the driver\n can support to encode a single frame. 0 means no MV predictor is supported.\n Currently it is for FEI entry point only."]
445 pub const VAConfigAttribFEIMVPredictors: Type = 33;
446 #[doc = " \\brief Statistics attribute. Read-only.\n\n This attribute exposes a number of capabilities of the VAEntrypointStats entry\n point. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValStats union. Currently it is for VAEntrypointStats only."]
447 pub const VAConfigAttribStats: Type = 34;
448 #[doc = " \\brief Tile Support Attribute. Read-only.\n\n This attribute conveys whether encoder is capable to support tiles.\n If not supported, the tile related parameters sent to encoder, such as\n tiling structure, should be ignored. 0 - unsupported, 1 - supported."]
449 pub const VAConfigAttribEncTileSupport: Type = 35;
450 #[doc = " \\brief whether accept rouding setting from application. Read-only.\n This attribute is for encode quality, if it is report,\n application can change the rounding setting by VAEncMiscParameterTypeCustomRoundingControl"]
451 pub const VAConfigAttribCustomRoundingControl: Type = 36;
452 #[doc = " \\brief Encoding QP info block size attribute. Read-only.\n This attribute conveys the block sizes that underlying driver\n support for QP info for buffer #VAEncQpBuffer."]
453 pub const VAConfigAttribQPBlockSize: Type = 37;
454 #[doc = " \\brief encode max frame size attribute. Read-only\n attribute value \\c VAConfigAttribValMaxFrameSize represent max frame size support"]
455 pub const VAConfigAttribMaxFrameSize: Type = 38;
456 #[doc = " \\brief inter frame prediction directrion attribute. Read-only.\n this attribute conveys the prediction direction (backward or forword) for specific config\n the value could be VA_PREDICTION_DIRECTION_XXXX. it can be combined with VAConfigAttribEncMaxRefFrames\n to describe reference list , and the prediction direction. if this attrib is not present,both direction\n should be supported, no restriction.\n for example: normal HEVC encoding , maximum reference frame number in reflist 0 and reflist 1 is deduced\n by VAConfigAttribEncMaxRefFrames. so there are typical P frame, B frame,\n if VAConfigAttribPredictionDirection is also present. it will stipulate prediction direction in both\n reference list. if only one prediction direction present(such as PREVIOUS),all reference frame should be\n previous frame (PoC < current)."]
457 pub const VAConfigAttribPredictionDirection: Type = 39;
458 #[doc = " \\brief combined submission of multiple frames from different streams, it is optimization for different HW\n implementation, multiple frames encode/decode can improve HW concurrency"]
459 pub const VAConfigAttribMultipleFrame: Type = 40;
460 #[doc = " \\brief priority setting for the context. Read-Write\n attribute value is \\c VAConfigAttribValContextPriority\n this setting also could be update by \\c VAContextParameterUpdateBuffer"]
461 pub const VAConfigAttribContextPriority: Type = 41;
462 #[doc = " \\brief AV1 decoding features. Read-only.\n\n This attribute describes the supported features of an\n AV1 decoder configuration. The value returned uses the\n VAConfigAttribValDecAV1Features type."]
463 pub const VAConfigAttribDecAV1Features: Type = 42;
464 #[doc = " \\brief TEE could be any HW secure device. Read-only"]
465 pub const VAConfigAttribTEEType: Type = 43;
466 #[doc = " \\brief TEE type client is a specific module supporting specific functions in TEE. Read-only"]
467 pub const VAConfigAttribTEETypeClient: Type = 44;
468 #[doc = " \\brief Cipher algorithm of the protected content session.\n\n This attribute specifies the cipher algorithm of the protected content session. It\n could be \\c VA_PC_CIPHER_AES, etc...."]
469 pub const VAConfigAttribProtectedContentCipherAlgorithm: Type = 45;
470 #[doc = " \\brief Cipher block size of the protected content session.\n\n This attribute specifies the block size of the protected content session. It could be\n \\c VA_PC_BLOCK_SIZE_128, \\c VA_PC_BLOCK_SIZE_192, or \\c VA_PC_BLOCK_SIZE_256, etc...."]
471 pub const VAConfigAttribProtectedContentCipherBlockSize: Type = 46;
472 #[doc = " \\brief Cipher mode of the protected content session.\n\n This attribute specifies the cipher mode of the protected content session. It could\n be \\c VA_PC_CIPHER_MODE_ECB, \\c VA_PC_CIPHER_MODE_CBC, \\c VA_PC_CIPHER_MODE_CTR, etc..."]
473 pub const VAConfigAttribProtectedContentCipherMode: Type = 47;
474 #[doc = " \\brief Decryption sample type of the protected content session.\n\n This attribute specifies the decryption sample type of the protected content session.\n It could be \\c VA_PC_SAMPLE_TYPE_FULLSAMPLE or \\c VA_PC_SAMPLE_TYPE_SUBSAMPLE."]
475 pub const VAConfigAttribProtectedContentCipherSampleType: Type = 48;
476 #[doc = " \\brief Special usage attribute of the protected session.\n\n The attribute specifies the flow for the protected session could be used. For\n example, it could be \\c VA_PC_USAGE_DEFAULT, \\c VA_PC_USAGE_WIDEVINE, etc...."]
477 pub const VAConfigAttribProtectedContentUsage: Type = 49;
478 #[doc = " \\brief HEVC/H.265 encoding features. Read-only.\n\n This attribute describes the supported features of an\n HEVC/H.265 encoder configuration. The value returned uses the\n VAConfigAttribValEncHEVCFeatures type.\n\n If this attribute is supported by a driver then it must also\n support the VAConfigAttribEncHEVCBlockSizes attribute."]
479 pub const VAConfigAttribEncHEVCFeatures: Type = 50;
480 #[doc = " \\brief HEVC/H.265 encoding block sizes. Read-only.\n\n This attribute describes the supported coding tree and transform\n block sizes of an HEVC/H.265 encoder configuration. The value\n returned uses the VAConfigAttribValEncHEVCBlockSizes type.\n\n If this attribute is supported by a driver then it must also\n support the VAConfigAttribEncHEVCFeatures attribute."]
481 pub const VAConfigAttribEncHEVCBlockSizes: Type = 51;
482 #[doc = " \\brief AV1 encoding attribute. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n AV1 implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncAV1 union."]
483 pub const VAConfigAttribEncAV1: Type = 52;
484 #[doc = " \\brief AV1 encoding attribute extend1. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n AV1 implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncAV1Ext1 union."]
485 pub const VAConfigAttribEncAV1Ext1: Type = 53;
486 #[doc = " \\brief AV1 encoding attribute extend2. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n AV1 implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncAV1Ext2 union."]
487 pub const VAConfigAttribEncAV1Ext2: Type = 54;
488 #[doc = " \\brief Settings per block attribute for Encoding. Read-only.\n\n This attribute describes whether to support delta qp per block,\n the supported size of delta qp block and the size of delta QP in bytes.\n The value returned uses the VAConfigAttribValEncPerBlockControl type."]
489 pub const VAConfigAttribEncPerBlockControl: Type = 55;
490 #[doc = " \\brief Maximum number of tile rows. Read-only.\n\n This attribute determines the maximum number of tile\n rows supported for encoding with tile support."]
491 pub const VAConfigAttribEncMaxTileRows: Type = 56;
492 #[doc = " \\brief Maximum number of tile cols. Read-only.\n\n This attribute determines the maximum number of tile\n columns supported for encoding with tile support."]
493 pub const VAConfigAttribEncMaxTileCols: Type = 57;
494 #[doc = " \\brief VP9 encoding attribute. Read-only.\n\n This attribute exposes a number of capabilities of the underlying\n VP9 implementation. The attribute value is partitioned into fields as defined in the\n VAConfigAttribValEncVP9 union."]
495 pub const VAConfigAttribEncVP9: Type = 58;
496 #[doc = "@}"]
497 pub const VAConfigAttribTypeMax: Type = 59;
498}
499#[doc = " Configuration attributes\n If there is more than one value for an attribute, a default\n value will be assigned to the attribute if the client does not\n specify the attribute when creating a configuration"]
500#[repr(C)]
501#[derive(Debug, Copy, Clone, PartialEq, Eq)]
502pub struct _VAConfigAttrib {
503 pub type_: VAConfigAttribType::Type,
504 pub value: u32,
505}
506impl Default for _VAConfigAttrib {
507 fn default() -> Self {
508 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
509 unsafe {
510 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
511 s.assume_init()
512 }
513 }
514}
515#[doc = " Configuration attributes\n If there is more than one value for an attribute, a default\n value will be assigned to the attribute if the client does not\n specify the attribute when creating a configuration"]
516pub type VAConfigAttrib = _VAConfigAttrib;
517#[doc = " Generic ID type, can be re-typed for specific implementation"]
518pub type VAGenericID = ::std::os::raw::c_uint;
519pub type VAConfigID = VAGenericID;
520#[doc = " Contexts and Surfaces\n\n Context represents a \"virtual\" video decode, encode or video processing\n pipeline. Surfaces are render targets for a given context. The data in the\n surfaces are not accessible to the client except if derived image is supported\n and the internal data format of the surface is implementation specific.\n\n Surfaces are provided as a hint of what surfaces will be used when the context\n is created through vaCreateContext(). A surface may be used by different contexts\n at the same time as soon as application can make sure the operations are synchronized\n between different contexts, e.g. a surface is used as the output of a decode context\n and the input of a video process context. Surfaces can only be destroyed after all\n contexts using these surfaces have been destroyed.\n\n Both contexts and surfaces are identified by unique IDs and its\n implementation specific internals are kept opaque to the clients"]
521pub type VAContextID = VAGenericID;
522pub type VASurfaceID = VAGenericID;
523pub mod VAGenericValueType {
524 #[doc = " \\brief Generic value types."]
525 pub type Type = ::std::os::raw::c_uint;
526 #[doc = "< 32-bit signed integer."]
527 pub const VAGenericValueTypeInteger: Type = 1;
528 #[doc = "< 32-bit floating-point value."]
529 pub const VAGenericValueTypeFloat: Type = 2;
530 #[doc = "< Generic pointer type"]
531 pub const VAGenericValueTypePointer: Type = 3;
532 #[doc = "< Pointer to function"]
533 pub const VAGenericValueTypeFunc: Type = 4;
534}
535#[doc = " \\brief Generic function type."]
536pub type VAGenericFunc = ::std::option::Option<unsafe extern "C" fn()>;
537#[doc = " \\brief Generic value."]
538#[repr(C)]
539#[derive(Copy, Clone)]
540pub struct _VAGenericValue {
541 #[doc = " \\brief Value type. See #VAGenericValueType."]
542 pub type_: VAGenericValueType::Type,
543 pub value: _VAGenericValue__bindgen_ty_1,
544}
545#[doc = " \\brief Value holder."]
546#[repr(C)]
547#[derive(Copy, Clone)]
548pub union _VAGenericValue__bindgen_ty_1 {
549 #[doc = " \\brief 32-bit signed integer."]
550 pub i: i32,
551 #[doc = " \\brief 32-bit float."]
552 pub f: f32,
553 #[doc = " \\brief Generic pointer."]
554 pub p: *mut ::std::os::raw::c_void,
555 #[doc = " \\brief Pointer to function."]
556 pub fn_: VAGenericFunc,
557}
558impl Default for _VAGenericValue__bindgen_ty_1 {
559 fn default() -> Self {
560 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
561 unsafe {
562 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
563 s.assume_init()
564 }
565 }
566}
567impl Default for _VAGenericValue {
568 fn default() -> Self {
569 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
570 unsafe {
571 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
572 s.assume_init()
573 }
574 }
575}
576#[doc = " \\brief Generic value."]
577pub type VAGenericValue = _VAGenericValue;
578pub mod VASurfaceAttribType {
579 #[doc = " \\brief Surface attribute types."]
580 pub type Type = ::std::os::raw::c_uint;
581 pub const VASurfaceAttribNone: Type = 0;
582 #[doc = " \\brief Pixel format as a FOURCC (int, read/write).\n\n When vaQuerySurfaceAttributes() is called, the driver will return one\n PixelFormat attribute per supported pixel format.\n\n When provided as an input to vaCreateSurfaces(), the driver will\n allocate a surface with the provided pixel format."]
583 pub const VASurfaceAttribPixelFormat: Type = 1;
584 #[doc = " \\brief Minimal width in pixels (int, read-only)."]
585 pub const VASurfaceAttribMinWidth: Type = 2;
586 #[doc = " \\brief Maximal width in pixels (int, read-only)."]
587 pub const VASurfaceAttribMaxWidth: Type = 3;
588 #[doc = " \\brief Minimal height in pixels (int, read-only)."]
589 pub const VASurfaceAttribMinHeight: Type = 4;
590 #[doc = " \\brief Maximal height in pixels (int, read-only)."]
591 pub const VASurfaceAttribMaxHeight: Type = 5;
592 #[doc = " \\brief Surface memory type expressed in bit fields (int, read/write)."]
593 pub const VASurfaceAttribMemoryType: Type = 6;
594 #[doc = " \\brief External buffer descriptor (pointer, write).\n\n Refer to the documentation for the memory type being created to\n determine what descriptor structure to pass here. If not otherwise\n stated, the common VASurfaceAttribExternalBuffers should be used."]
595 pub const VASurfaceAttribExternalBufferDescriptor: Type = 7;
596 #[doc = " \\brief Surface usage hint, gives the driver a hint of intended usage\n to optimize allocation (e.g. tiling) (int, read/write)."]
597 pub const VASurfaceAttribUsageHint: Type = 8;
598 #[doc = " \\brief List of possible DRM format modifiers (pointer, write).\n\n The value must be a pointer to a VADRMFormatModifierList. This can only\n be used when allocating a new buffer, it's invalid to use this attribute\n when importing an existing buffer."]
599 pub const VASurfaceAttribDRMFormatModifiers: Type = 9;
600 #[doc = " \\brief width and height log2 aligment in pixels (int, read-only)\n\n For special HW requirement used in some codecs, if\n VASurfaceAttribAlignmentSize is not implemented in the driver, then\n the surface_width and surface_height should keep the original logic\n without any modification, this is an add-on requirement to\n surface_width and surface_height."]
601 pub const VASurfaceAttribAlignmentSize: Type = 10;
602 #[doc = " \\brief Number of surface attributes."]
603 pub const VASurfaceAttribCount: Type = 11;
604}
605#[doc = " \\brief Surface attribute."]
606#[repr(C)]
607#[derive(Copy, Clone)]
608pub struct _VASurfaceAttrib {
609 #[doc = " \\brief Type."]
610 pub type_: VASurfaceAttribType::Type,
611 #[doc = " \\brief Flags. See \"Surface attribute flags\"."]
612 pub flags: u32,
613 #[doc = " \\brief Value. See \"Surface attribute types\" for the expected types."]
614 pub value: VAGenericValue,
615}
616impl Default for _VASurfaceAttrib {
617 fn default() -> Self {
618 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
619 unsafe {
620 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
621 s.assume_init()
622 }
623 }
624}
625#[doc = " \\brief Surface attribute."]
626pub type VASurfaceAttrib = _VASurfaceAttrib;
627#[doc = " \\brief VASurfaceAttribExternalBuffers structure for\n the VASurfaceAttribExternalBufferDescriptor attribute."]
628#[repr(C)]
629#[derive(Debug, Copy, Clone, PartialEq, Eq)]
630pub struct _VASurfaceAttribExternalBuffers {
631 #[doc = " \\brief pixel format in fourcc."]
632 pub pixel_format: u32,
633 #[doc = " \\brief width in pixels."]
634 pub width: u32,
635 #[doc = " \\brief height in pixels."]
636 pub height: u32,
637 #[doc = " \\brief total size of the buffer in bytes."]
638 pub data_size: u32,
639 #[doc = " \\brief number of planes for planar layout"]
640 pub num_planes: u32,
641 #[doc = " \\brief pitch for each plane in bytes"]
642 pub pitches: [u32; 4usize],
643 #[doc = " \\brief offset for each plane in bytes"]
644 pub offsets: [u32; 4usize],
645 #[doc = " \\brief buffer handles or user pointers"]
646 pub buffers: *mut usize,
647 #[doc = " \\brief number of elements in the \"buffers\" array"]
648 pub num_buffers: u32,
649 #[doc = " \\brief flags. See \"Surface external buffer descriptor flags\"."]
650 pub flags: u32,
651 #[doc = " \\brief reserved for passing private data"]
652 pub private_data: *mut ::std::os::raw::c_void,
653}
654impl Default for _VASurfaceAttribExternalBuffers {
655 fn default() -> Self {
656 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
657 unsafe {
658 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
659 s.assume_init()
660 }
661 }
662}
663#[doc = " \\brief VASurfaceAttribExternalBuffers structure for\n the VASurfaceAttribExternalBufferDescriptor attribute."]
664pub type VASurfaceAttribExternalBuffers = _VASurfaceAttribExternalBuffers;
665#[doc = " Buffers\n Buffers are used to pass various types of data from the\n client to the server. The server maintains a data store\n for each buffer created, and the client idenfies a buffer\n through a unique buffer id assigned by the server."]
666pub type VABufferID = VAGenericID;
667pub mod VABufferType {
668 pub type Type = ::std::os::raw::c_uint;
669 pub const VAPictureParameterBufferType: Type = 0;
670 pub const VAIQMatrixBufferType: Type = 1;
671 pub const VABitPlaneBufferType: Type = 2;
672 pub const VASliceGroupMapBufferType: Type = 3;
673 pub const VASliceParameterBufferType: Type = 4;
674 pub const VASliceDataBufferType: Type = 5;
675 pub const VAMacroblockParameterBufferType: Type = 6;
676 pub const VAResidualDataBufferType: Type = 7;
677 pub const VADeblockingParameterBufferType: Type = 8;
678 pub const VAImageBufferType: Type = 9;
679 pub const VAProtectedSliceDataBufferType: Type = 10;
680 pub const VAQMatrixBufferType: Type = 11;
681 pub const VAHuffmanTableBufferType: Type = 12;
682 pub const VAProbabilityBufferType: Type = 13;
683 pub const VAEncCodedBufferType: Type = 21;
684 pub const VAEncSequenceParameterBufferType: Type = 22;
685 pub const VAEncPictureParameterBufferType: Type = 23;
686 pub const VAEncSliceParameterBufferType: Type = 24;
687 pub const VAEncPackedHeaderParameterBufferType: Type = 25;
688 pub const VAEncPackedHeaderDataBufferType: Type = 26;
689 pub const VAEncMiscParameterBufferType: Type = 27;
690 pub const VAEncMacroblockParameterBufferType: Type = 28;
691 pub const VAEncMacroblockMapBufferType: Type = 29;
692 #[doc = " \\brief Encoding QP buffer\n\n This buffer contains QP per MB for encoding. Currently\n VAEncQPBufferH264 is defined for H.264 encoding, see\n #VAEncQPBufferH264 for details"]
693 pub const VAEncQPBufferType: Type = 30;
694 #[doc = " \\brief Video processing pipeline parameter buffer.\n\n This buffer describes the video processing pipeline. See\n #VAProcPipelineParameterBuffer for details."]
695 pub const VAProcPipelineParameterBufferType: Type = 41;
696 #[doc = " \\brief Video filter parameter buffer.\n\n This buffer describes the video filter parameters. All buffers\n inherit from #VAProcFilterParameterBufferBase, thus including\n a unique filter buffer type.\n\n The default buffer used by most filters is #VAProcFilterParameterBuffer.\n Filters requiring advanced parameters include, but are not limited to,\n deinterlacing (#VAProcFilterParameterBufferDeinterlacing),\n color balance (#VAProcFilterParameterBufferColorBalance), etc."]
697 pub const VAProcFilterParameterBufferType: Type = 42;
698 #[doc = " \\brief FEI specific buffer types"]
699 pub const VAEncFEIMVBufferType: Type = 43;
700 #[doc = " \\brief FEI specific buffer types"]
701 pub const VAEncFEIMBCodeBufferType: Type = 44;
702 #[doc = " \\brief FEI specific buffer types"]
703 pub const VAEncFEIDistortionBufferType: Type = 45;
704 #[doc = " \\brief FEI specific buffer types"]
705 pub const VAEncFEIMBControlBufferType: Type = 46;
706 #[doc = " \\brief FEI specific buffer types"]
707 pub const VAEncFEIMVPredictorBufferType: Type = 47;
708 #[doc = " \\brief FEI specific buffer types"]
709 pub const VAStatsStatisticsParameterBufferType: Type = 48;
710 #[doc = " \\brief Statistics output for VAEntrypointStats progressive and top field of interlaced case"]
711 pub const VAStatsStatisticsBufferType: Type = 49;
712 #[doc = " \\brief Statistics output for VAEntrypointStats bottom field of interlaced case"]
713 pub const VAStatsStatisticsBottomFieldBufferType: Type = 50;
714 #[doc = " \\brief Statistics output for VAEntrypointStats bottom field of interlaced case"]
715 pub const VAStatsMVBufferType: Type = 51;
716 #[doc = " \\brief Statistics output for VAEntrypointStats bottom field of interlaced case"]
717 pub const VAStatsMVPredictorBufferType: Type = 52;
718 #[doc = " Force MB's to be non skip for encode.it's per-mb control buffer, The width of the MB map\n Surface is (width of the Picture in MB unit) * 1 byte, multiple of 64 bytes.\n The height is (height of the picture in MB unit). The picture is either\n frame or non-interleaved top or bottom field. If the application provides this\nsurface, it will override the \"skipCheckDisable\" setting in VAEncMiscParameterEncQuality."]
719 pub const VAEncMacroblockDisableSkipMapBufferType: Type = 53;
720 #[doc = " \\brief HEVC FEI CTB level cmd buffer\n it is CTB level information for future usage."]
721 pub const VAEncFEICTBCmdBufferType: Type = 54;
722 #[doc = " \\brief HEVC FEI CU level data buffer\n it's CTB level information for future usage"]
723 pub const VAEncFEICURecordBufferType: Type = 55;
724 #[doc = " decode stream out buffer, intermedia data of decode, it may include MV, MB mode etc.\n it can be used to detect motion and analyze the frame contain"]
725 pub const VADecodeStreamoutBufferType: Type = 56;
726 #[doc = " \\brief HEVC Decoding Subset Parameter buffer type\n\n The subsets parameter buffer is concatenation with one or multiple\n subset entry point offsets. All the offset values are layed out one\n by one according to slice order with first slice segment first, second\n slice segment second, etc... The entry number is indicated by parameter\n \\ref num_entry_point_offsets. And the first entry position of the entry\n point offsets for any slice segment is indicated by parameter\n entry_offset_to_subset_array in VAPictureParameterBufferHEVC data structure."]
727 pub const VASubsetsParameterBufferType: Type = 57;
728 #[doc = " \\brief adjust context parameters dynamically\n\n this parameter is used to update context parameters, detail parameter is in\n \\c VAContextParameterUpdateBuffer"]
729 pub const VAContextParameterUpdateBufferType: Type = 58;
730 #[doc = " \\brief Protected session execution buffer type\n\n It's for TEE execution usage (vaProtectedSessionExecute()). The buffer structure is in\n \\c VAProtectedSessionExecuteBuffer"]
731 pub const VAProtectedSessionExecuteBufferType: Type = 59;
732 #[doc = " \\brief Encryption parameters buffer for protected content session.\n\n Refer to \\c VAEncryptionParameters"]
733 pub const VAEncryptionParameterBufferType: Type = 60;
734 #[doc = " \\brief Encoding delta QP per block buffer\n\n This buffer only could be created and accepted\n when \\c VAConfigAttribValEncPerBlockControl delta_qp_support == 1.\n This input buffer contains delta QP per block for encoding.\n The supported size of delta QP block and the size of delta QP\n must be quried from \\c VAConfigAttribValEncPerBlockControl."]
735 pub const VAEncDeltaQpPerBlockBufferType: Type = 61;
736 #[doc = " \\brief VVC ALF data buffer\n\n Refer to \\c VAAlfDataVVC"]
737 pub const VAAlfBufferType: Type = 62;
738 #[doc = " \\brief VVC LMCS data buffer\n\n Refer to \\c VALmcsDataVVC"]
739 pub const VALmcsBufferType: Type = 63;
740 #[doc = " \\brief VVC SubPic data buffer\n\n Refer to \\c VASubPicVVC"]
741 pub const VASubPicBufferType: Type = 64;
742 #[doc = " \\brief VVC Tile Dimension data buffer\n\n Data buffer of tile widths and heights, with each element formatted as uint16_t"]
743 pub const VATileBufferType: Type = 65;
744 #[doc = " \\brief VVC Slice Structure data buffer\n\n Refer to \\c VASliceStructVVC"]
745 pub const VASliceStructBufferType: Type = 66;
746 #[doc = " \\brief VVC Slice Structure data buffer\n\n Refer to \\c VASliceStructVVC"]
747 pub const VABufferTypeMax: Type = 67;
748}
749pub mod VAEncMiscParameterType {
750 pub type Type = ::std::os::raw::c_uint;
751 pub const VAEncMiscParameterTypeFrameRate: Type = 0;
752 pub const VAEncMiscParameterTypeRateControl: Type = 1;
753 pub const VAEncMiscParameterTypeMaxSliceSize: Type = 2;
754 pub const VAEncMiscParameterTypeAIR: Type = 3;
755 #[doc = " \\brief Buffer type used to express a maximum frame size (in bits)."]
756 pub const VAEncMiscParameterTypeMaxFrameSize: Type = 4;
757 #[doc = " \\brief Buffer type used for HRD parameters."]
758 pub const VAEncMiscParameterTypeHRD: Type = 5;
759 #[doc = " \\brief Buffer type used for HRD parameters."]
760 pub const VAEncMiscParameterTypeQualityLevel: Type = 6;
761 #[doc = " \\brief Buffer type used for Rolling intra refresh"]
762 pub const VAEncMiscParameterTypeRIR: Type = 7;
763 #[doc = " \\brief Buffer type used for quantization parameters, it's per-sequence parameter"]
764 pub const VAEncMiscParameterTypeQuantization: Type = 8;
765 #[doc = " \\brief Buffer type used for sending skip frame parameters to the encoder's\n rate control, when the user has externally skipped frames."]
766 pub const VAEncMiscParameterTypeSkipFrame: Type = 9;
767 #[doc = " \\brief Buffer type used for region-of-interest (ROI) parameters."]
768 pub const VAEncMiscParameterTypeROI: Type = 10;
769 #[doc = " \\brief Buffer type used to express a maximum frame size (in bytes) settings for multiple pass."]
770 pub const VAEncMiscParameterTypeMultiPassFrameSize: Type = 11;
771 #[doc = " \\brief Buffer type used for temporal layer structure"]
772 pub const VAEncMiscParameterTypeTemporalLayerStructure: Type = 12;
773 #[doc = " \\brief Buffer type used for dirty region-of-interest (ROI) parameters."]
774 pub const VAEncMiscParameterTypeDirtyRect: Type = 13;
775 #[doc = " \\brief Buffer type used for parallel BRC parameters."]
776 pub const VAEncMiscParameterTypeParallelBRC: Type = 14;
777 #[doc = " \\brief Set MB partion mode mask and Half-pel/Quant-pel motion search"]
778 pub const VAEncMiscParameterTypeSubMbPartPel: Type = 15;
779 #[doc = " \\brief set encode quality tuning"]
780 pub const VAEncMiscParameterTypeEncQuality: Type = 16;
781 #[doc = " \\brief Buffer type used for encoder rounding offset parameters."]
782 pub const VAEncMiscParameterTypeCustomRoundingControl: Type = 17;
783 #[doc = " \\brief Buffer type used for FEI input frame level parameters"]
784 pub const VAEncMiscParameterTypeFEIFrameControl: Type = 18;
785 #[doc = " \\brief encode extension buffer, ect. MPEG2 Sequence extenstion data"]
786 pub const VAEncMiscParameterTypeExtensionData: Type = 19;
787}
788pub mod VAEncPackedHeaderType {
789 #[doc = " \\brief Packed header type."]
790 pub type Type = ::std::os::raw::c_uint;
791 #[doc = " \\brief Packed sequence header."]
792 pub const VAEncPackedHeaderSequence: Type = 1;
793 #[doc = " \\brief Packed picture header."]
794 pub const VAEncPackedHeaderPicture: Type = 2;
795 #[doc = " \\brief Packed slice header."]
796 pub const VAEncPackedHeaderSlice: Type = 3;
797 #[doc = " \\brief Packed raw header.\n\n Packed raw data header can be used by the client to insert a header\n into the bitstream data buffer at the point it is passed, the driver\n will handle the raw packed header based on \"has_emulation_bytes\" field\n in the packed header parameter structure."]
798 pub const VAEncPackedHeaderRawData: Type = 4;
799 #[doc = " \\brief Misc packed header. See codec-specific definitions.\n\n @deprecated\n This is a deprecated packed header type. All applications can use\n \\c VAEncPackedHeaderRawData to insert a codec-specific packed header"]
800 pub const VAEncPackedHeaderMiscMask: Type = 2147483648;
801}
802#[doc = " \\brief Packed header parameter."]
803#[repr(C)]
804#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
805pub struct _VAEncPackedHeaderParameterBuffer {
806 #[doc = " Type of the packed header buffer. See #VAEncPackedHeaderType."]
807 pub type_: u32,
808 #[doc = " \\brief Size of the #VAEncPackedHeaderDataBuffer in bits."]
809 pub bit_length: u32,
810 #[doc = " \\brief Flag: buffer contains start code emulation prevention bytes?"]
811 pub has_emulation_bytes: u8,
812 #[doc = " \\brief Reserved bytes for future use, must be zero"]
813 pub va_reserved: [u32; 4usize],
814}
815#[doc = " \\brief Packed header parameter."]
816pub type VAEncPackedHeaderParameterBuffer = _VAEncPackedHeaderParameterBuffer;
817#[doc = " For application, e.g. set a new bitrate\n VABufferID buf_id;\n VAEncMiscParameterBuffer *misc_param;\n VAEncMiscParameterRateControl *misc_rate_ctrl;\n\n vaCreateBuffer(dpy, context, VAEncMiscParameterBufferType,\n sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParameterRateControl),\n 1, NULL, &buf_id);\n\n vaMapBuffer(dpy,buf_id,(void **)&misc_param);\n misc_param->type = VAEncMiscParameterTypeRateControl;\n misc_rate_ctrl= (VAEncMiscParameterRateControl *)misc_param->data;\n misc_rate_ctrl->bits_per_second = 6400000;\n vaUnmapBuffer(dpy, buf_id);\n vaRenderPicture(dpy, context, &buf_id, 1);"]
818#[repr(C)]
819#[derive(Debug)]
820pub struct _VAEncMiscParameterBuffer {
821 pub type_: VAEncMiscParameterType::Type,
822 pub data: __IncompleteArrayField<u32>,
823}
824impl Default for _VAEncMiscParameterBuffer {
825 fn default() -> Self {
826 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
827 unsafe {
828 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
829 s.assume_init()
830 }
831 }
832}
833#[doc = " For application, e.g. set a new bitrate\n VABufferID buf_id;\n VAEncMiscParameterBuffer *misc_param;\n VAEncMiscParameterRateControl *misc_rate_ctrl;\n\n vaCreateBuffer(dpy, context, VAEncMiscParameterBufferType,\n sizeof(VAEncMiscParameterBuffer) + sizeof(VAEncMiscParameterRateControl),\n 1, NULL, &buf_id);\n\n vaMapBuffer(dpy,buf_id,(void **)&misc_param);\n misc_param->type = VAEncMiscParameterTypeRateControl;\n misc_rate_ctrl= (VAEncMiscParameterRateControl *)misc_param->data;\n misc_rate_ctrl->bits_per_second = 6400000;\n vaUnmapBuffer(dpy, buf_id);\n vaRenderPicture(dpy, context, &buf_id, 1);"]
834pub type VAEncMiscParameterBuffer = _VAEncMiscParameterBuffer;
835#[doc = " \\brief Rate control parameters"]
836#[repr(C)]
837#[derive(Copy, Clone)]
838pub struct _VAEncMiscParameterRateControl {
839 #[doc = " The maximum bit-rate which the the rate controller should generate."]
840 pub bits_per_second: u32,
841 #[doc = " The target bit-rate which the rate controller should generate, as a percentage of the\n maximum bit-rate.\n\n In CBR mode this value is ignored (treated as 100%)."]
842 pub target_percentage: u32,
843 #[doc = " Rate control window size in milliseconds.\n\n The rate controller will attempt to guarantee that the target and maximum bit-rates are\n correct over this window."]
844 pub window_size: u32,
845 #[doc = " Initial quantiser value used at the start of the stream.\n\n Ignored if set to zero."]
846 pub initial_qp: u32,
847 #[doc = " Minimum quantiser value to use.\n\n The quantiser will not go below the value - if this limit is hit, the output bitrate may\n be lower than the target. Ignored if set to zero."]
848 pub min_qp: u32,
849 #[doc = " Basic unit size.\n\n Only used by some drivers - see driver documentation for details. Set to zero if unused."]
850 pub basic_unit_size: u32,
851 pub rc_flags: _VAEncMiscParameterRateControl__bindgen_ty_1,
852 #[doc = " Initial quality factor used in ICQ mode.\n\n This value must be between 1 and 51.\n this value will be deprecated in future, to use quality_factor instead of it."]
853 pub ICQ_quality_factor: u32,
854 #[doc = " Maximum quantiser value to use.\n\n The quantiser will not go above this value - if this limit is hit, the output bitrate\n may exceed the target. Ignored if set to zero."]
855 pub max_qp: u32,
856 #[doc = " Quality factor\n\n the range will be different for different codec"]
857 pub quality_factor: u32,
858 #[doc = " Target frame size\n\n Desired frame size in bytes.\n This parameter can be used in some RC modes (like Transport Controlled BRC)\n where feedback from the app is required.\n Zero value means no limits.\n"]
859 pub target_frame_size: u32,
860 #[doc = " Reserved bytes for future use, must be zero."]
861 pub va_reserved: [u32; 4usize],
862}
863#[repr(C)]
864#[derive(Copy, Clone)]
865pub union _VAEncMiscParameterRateControl__bindgen_ty_1 {
866 pub bits: _VAEncMiscParameterRateControl__bindgen_ty_1__bindgen_ty_1,
867 pub value: u32,
868}
869#[repr(C)]
870#[repr(align(4))]
871#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
872pub struct _VAEncMiscParameterRateControl__bindgen_ty_1__bindgen_ty_1 {
873 pub _bitfield_align_1: [u16; 0],
874 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
875}
876impl _VAEncMiscParameterRateControl__bindgen_ty_1__bindgen_ty_1 {
877 #[inline]
878 pub fn reset(&self) -> u32 {
879 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
880 }
881 #[inline]
882 pub fn set_reset(&mut self, val: u32) {
883 unsafe {
884 let val: u32 = ::std::mem::transmute(val);
885 self._bitfield_1.set(0usize, 1u8, val as u64)
886 }
887 }
888 #[inline]
889 pub unsafe fn reset_raw(this: *const Self) -> u32 {
890 unsafe {
891 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
892 ::std::ptr::addr_of!((*this)._bitfield_1),
893 0usize,
894 1u8,
895 ) as u32)
896 }
897 }
898 #[inline]
899 pub unsafe fn set_reset_raw(this: *mut Self, val: u32) {
900 unsafe {
901 let val: u32 = ::std::mem::transmute(val);
902 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
903 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
904 0usize,
905 1u8,
906 val as u64,
907 )
908 }
909 }
910 #[inline]
911 pub fn disable_frame_skip(&self) -> u32 {
912 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
913 }
914 #[inline]
915 pub fn set_disable_frame_skip(&mut self, val: u32) {
916 unsafe {
917 let val: u32 = ::std::mem::transmute(val);
918 self._bitfield_1.set(1usize, 1u8, val as u64)
919 }
920 }
921 #[inline]
922 pub unsafe fn disable_frame_skip_raw(this: *const Self) -> u32 {
923 unsafe {
924 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
925 ::std::ptr::addr_of!((*this)._bitfield_1),
926 1usize,
927 1u8,
928 ) as u32)
929 }
930 }
931 #[inline]
932 pub unsafe fn set_disable_frame_skip_raw(this: *mut Self, val: u32) {
933 unsafe {
934 let val: u32 = ::std::mem::transmute(val);
935 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
936 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
937 1usize,
938 1u8,
939 val as u64,
940 )
941 }
942 }
943 #[inline]
944 pub fn disable_bit_stuffing(&self) -> u32 {
945 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
946 }
947 #[inline]
948 pub fn set_disable_bit_stuffing(&mut self, val: u32) {
949 unsafe {
950 let val: u32 = ::std::mem::transmute(val);
951 self._bitfield_1.set(2usize, 1u8, val as u64)
952 }
953 }
954 #[inline]
955 pub unsafe fn disable_bit_stuffing_raw(this: *const Self) -> u32 {
956 unsafe {
957 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
958 ::std::ptr::addr_of!((*this)._bitfield_1),
959 2usize,
960 1u8,
961 ) as u32)
962 }
963 }
964 #[inline]
965 pub unsafe fn set_disable_bit_stuffing_raw(this: *mut Self, val: u32) {
966 unsafe {
967 let val: u32 = ::std::mem::transmute(val);
968 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
969 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
970 2usize,
971 1u8,
972 val as u64,
973 )
974 }
975 }
976 #[inline]
977 pub fn mb_rate_control(&self) -> u32 {
978 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 4u8) as u32) }
979 }
980 #[inline]
981 pub fn set_mb_rate_control(&mut self, val: u32) {
982 unsafe {
983 let val: u32 = ::std::mem::transmute(val);
984 self._bitfield_1.set(3usize, 4u8, val as u64)
985 }
986 }
987 #[inline]
988 pub unsafe fn mb_rate_control_raw(this: *const Self) -> u32 {
989 unsafe {
990 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
991 ::std::ptr::addr_of!((*this)._bitfield_1),
992 3usize,
993 4u8,
994 ) as u32)
995 }
996 }
997 #[inline]
998 pub unsafe fn set_mb_rate_control_raw(this: *mut Self, val: u32) {
999 unsafe {
1000 let val: u32 = ::std::mem::transmute(val);
1001 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1002 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1003 3usize,
1004 4u8,
1005 val as u64,
1006 )
1007 }
1008 }
1009 #[inline]
1010 pub fn temporal_id(&self) -> u32 {
1011 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 8u8) as u32) }
1012 }
1013 #[inline]
1014 pub fn set_temporal_id(&mut self, val: u32) {
1015 unsafe {
1016 let val: u32 = ::std::mem::transmute(val);
1017 self._bitfield_1.set(7usize, 8u8, val as u64)
1018 }
1019 }
1020 #[inline]
1021 pub unsafe fn temporal_id_raw(this: *const Self) -> u32 {
1022 unsafe {
1023 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1024 ::std::ptr::addr_of!((*this)._bitfield_1),
1025 7usize,
1026 8u8,
1027 ) as u32)
1028 }
1029 }
1030 #[inline]
1031 pub unsafe fn set_temporal_id_raw(this: *mut Self, val: u32) {
1032 unsafe {
1033 let val: u32 = ::std::mem::transmute(val);
1034 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1035 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1036 7usize,
1037 8u8,
1038 val as u64,
1039 )
1040 }
1041 }
1042 #[inline]
1043 pub fn cfs_I_frames(&self) -> u32 {
1044 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
1045 }
1046 #[inline]
1047 pub fn set_cfs_I_frames(&mut self, val: u32) {
1048 unsafe {
1049 let val: u32 = ::std::mem::transmute(val);
1050 self._bitfield_1.set(15usize, 1u8, val as u64)
1051 }
1052 }
1053 #[inline]
1054 pub unsafe fn cfs_I_frames_raw(this: *const Self) -> u32 {
1055 unsafe {
1056 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1057 ::std::ptr::addr_of!((*this)._bitfield_1),
1058 15usize,
1059 1u8,
1060 ) as u32)
1061 }
1062 }
1063 #[inline]
1064 pub unsafe fn set_cfs_I_frames_raw(this: *mut Self, val: u32) {
1065 unsafe {
1066 let val: u32 = ::std::mem::transmute(val);
1067 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1068 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1069 15usize,
1070 1u8,
1071 val as u64,
1072 )
1073 }
1074 }
1075 #[inline]
1076 pub fn enable_parallel_brc(&self) -> u32 {
1077 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
1078 }
1079 #[inline]
1080 pub fn set_enable_parallel_brc(&mut self, val: u32) {
1081 unsafe {
1082 let val: u32 = ::std::mem::transmute(val);
1083 self._bitfield_1.set(16usize, 1u8, val as u64)
1084 }
1085 }
1086 #[inline]
1087 pub unsafe fn enable_parallel_brc_raw(this: *const Self) -> u32 {
1088 unsafe {
1089 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1090 ::std::ptr::addr_of!((*this)._bitfield_1),
1091 16usize,
1092 1u8,
1093 ) as u32)
1094 }
1095 }
1096 #[inline]
1097 pub unsafe fn set_enable_parallel_brc_raw(this: *mut Self, val: u32) {
1098 unsafe {
1099 let val: u32 = ::std::mem::transmute(val);
1100 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1101 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1102 16usize,
1103 1u8,
1104 val as u64,
1105 )
1106 }
1107 }
1108 #[inline]
1109 pub fn enable_dynamic_scaling(&self) -> u32 {
1110 unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) }
1111 }
1112 #[inline]
1113 pub fn set_enable_dynamic_scaling(&mut self, val: u32) {
1114 unsafe {
1115 let val: u32 = ::std::mem::transmute(val);
1116 self._bitfield_1.set(17usize, 1u8, val as u64)
1117 }
1118 }
1119 #[inline]
1120 pub unsafe fn enable_dynamic_scaling_raw(this: *const Self) -> u32 {
1121 unsafe {
1122 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1123 ::std::ptr::addr_of!((*this)._bitfield_1),
1124 17usize,
1125 1u8,
1126 ) as u32)
1127 }
1128 }
1129 #[inline]
1130 pub unsafe fn set_enable_dynamic_scaling_raw(this: *mut Self, val: u32) {
1131 unsafe {
1132 let val: u32 = ::std::mem::transmute(val);
1133 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1134 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1135 17usize,
1136 1u8,
1137 val as u64,
1138 )
1139 }
1140 }
1141 #[inline]
1142 pub fn frame_tolerance_mode(&self) -> u32 {
1143 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) }
1144 }
1145 #[inline]
1146 pub fn set_frame_tolerance_mode(&mut self, val: u32) {
1147 unsafe {
1148 let val: u32 = ::std::mem::transmute(val);
1149 self._bitfield_1.set(18usize, 2u8, val as u64)
1150 }
1151 }
1152 #[inline]
1153 pub unsafe fn frame_tolerance_mode_raw(this: *const Self) -> u32 {
1154 unsafe {
1155 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1156 ::std::ptr::addr_of!((*this)._bitfield_1),
1157 18usize,
1158 2u8,
1159 ) as u32)
1160 }
1161 }
1162 #[inline]
1163 pub unsafe fn set_frame_tolerance_mode_raw(this: *mut Self, val: u32) {
1164 unsafe {
1165 let val: u32 = ::std::mem::transmute(val);
1166 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1167 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1168 18usize,
1169 2u8,
1170 val as u64,
1171 )
1172 }
1173 }
1174 #[inline]
1175 pub fn reserved(&self) -> u32 {
1176 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 12u8) as u32) }
1177 }
1178 #[inline]
1179 pub fn set_reserved(&mut self, val: u32) {
1180 unsafe {
1181 let val: u32 = ::std::mem::transmute(val);
1182 self._bitfield_1.set(20usize, 12u8, val as u64)
1183 }
1184 }
1185 #[inline]
1186 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
1187 unsafe {
1188 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1189 ::std::ptr::addr_of!((*this)._bitfield_1),
1190 20usize,
1191 12u8,
1192 ) as u32)
1193 }
1194 }
1195 #[inline]
1196 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
1197 unsafe {
1198 let val: u32 = ::std::mem::transmute(val);
1199 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1200 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1201 20usize,
1202 12u8,
1203 val as u64,
1204 )
1205 }
1206 }
1207 #[inline]
1208 pub fn new_bitfield_1(
1209 reset: u32,
1210 disable_frame_skip: u32,
1211 disable_bit_stuffing: u32,
1212 mb_rate_control: u32,
1213 temporal_id: u32,
1214 cfs_I_frames: u32,
1215 enable_parallel_brc: u32,
1216 enable_dynamic_scaling: u32,
1217 frame_tolerance_mode: u32,
1218 reserved: u32,
1219 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
1220 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
1221 __bindgen_bitfield_unit.set(0usize, 1u8, {
1222 let reset: u32 = unsafe { ::std::mem::transmute(reset) };
1223 reset as u64
1224 });
1225 __bindgen_bitfield_unit.set(1usize, 1u8, {
1226 let disable_frame_skip: u32 = unsafe { ::std::mem::transmute(disable_frame_skip) };
1227 disable_frame_skip as u64
1228 });
1229 __bindgen_bitfield_unit.set(2usize, 1u8, {
1230 let disable_bit_stuffing: u32 = unsafe { ::std::mem::transmute(disable_bit_stuffing) };
1231 disable_bit_stuffing as u64
1232 });
1233 __bindgen_bitfield_unit.set(3usize, 4u8, {
1234 let mb_rate_control: u32 = unsafe { ::std::mem::transmute(mb_rate_control) };
1235 mb_rate_control as u64
1236 });
1237 __bindgen_bitfield_unit.set(7usize, 8u8, {
1238 let temporal_id: u32 = unsafe { ::std::mem::transmute(temporal_id) };
1239 temporal_id as u64
1240 });
1241 __bindgen_bitfield_unit.set(15usize, 1u8, {
1242 let cfs_I_frames: u32 = unsafe { ::std::mem::transmute(cfs_I_frames) };
1243 cfs_I_frames as u64
1244 });
1245 __bindgen_bitfield_unit.set(16usize, 1u8, {
1246 let enable_parallel_brc: u32 = unsafe { ::std::mem::transmute(enable_parallel_brc) };
1247 enable_parallel_brc as u64
1248 });
1249 __bindgen_bitfield_unit.set(17usize, 1u8, {
1250 let enable_dynamic_scaling: u32 = unsafe { ::std::mem::transmute(enable_dynamic_scaling) };
1251 enable_dynamic_scaling as u64
1252 });
1253 __bindgen_bitfield_unit.set(18usize, 2u8, {
1254 let frame_tolerance_mode: u32 = unsafe { ::std::mem::transmute(frame_tolerance_mode) };
1255 frame_tolerance_mode as u64
1256 });
1257 __bindgen_bitfield_unit.set(20usize, 12u8, {
1258 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
1259 reserved as u64
1260 });
1261 __bindgen_bitfield_unit
1262 }
1263}
1264impl Default for _VAEncMiscParameterRateControl__bindgen_ty_1 {
1265 fn default() -> Self {
1266 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1267 unsafe {
1268 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1269 s.assume_init()
1270 }
1271 }
1272}
1273impl Default for _VAEncMiscParameterRateControl {
1274 fn default() -> Self {
1275 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1276 unsafe {
1277 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1278 s.assume_init()
1279 }
1280 }
1281}
1282#[doc = " \\brief Rate control parameters"]
1283pub type VAEncMiscParameterRateControl = _VAEncMiscParameterRateControl;
1284#[doc = " Encode framerate parameters.\n\n Sets the encode framerate used by the rate controller. This should be\n provided in all modes using a bitrate target (variable framerate is not\n supported)."]
1285#[repr(C)]
1286#[derive(Copy, Clone)]
1287pub struct _VAEncMiscParameterFrameRate {
1288 #[doc = " Encode framerate.\n\n The framerate is specified as a number of frames per second, as a\n fraction. The denominator of the fraction is given in the top half\n (the high two bytes) of the framerate field, and the numerator is\n given in the bottom half (the low two bytes).\n\n That is:\n denominator = framerate >> 16 & 0xffff;\n numerator = framerate & 0xffff;\n fps = numerator / denominator;\n\n For example, if framerate is set to (100 << 16 | 750), this is\n 750 / 100, hence 7.5fps.\n\n If the denominator is zero (the high two bytes are both zero) then\n it takes the value one instead, so the framerate is just the integer\n in the low 2 bytes."]
1289 pub framerate: u32,
1290 pub framerate_flags: _VAEncMiscParameterFrameRate__bindgen_ty_1,
1291 #[doc = " \\brief Reserved bytes for future use, must be zero"]
1292 pub va_reserved: [u32; 4usize],
1293}
1294#[repr(C)]
1295#[derive(Copy, Clone)]
1296pub union _VAEncMiscParameterFrameRate__bindgen_ty_1 {
1297 pub bits: _VAEncMiscParameterFrameRate__bindgen_ty_1__bindgen_ty_1,
1298 pub value: u32,
1299}
1300#[repr(C)]
1301#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1302pub struct _VAEncMiscParameterFrameRate__bindgen_ty_1__bindgen_ty_1 {
1303 pub _bitfield_align_1: [u32; 0],
1304 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
1305}
1306impl _VAEncMiscParameterFrameRate__bindgen_ty_1__bindgen_ty_1 {
1307 #[inline]
1308 pub fn temporal_id(&self) -> u32 {
1309 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
1310 }
1311 #[inline]
1312 pub fn set_temporal_id(&mut self, val: u32) {
1313 unsafe {
1314 let val: u32 = ::std::mem::transmute(val);
1315 self._bitfield_1.set(0usize, 8u8, val as u64)
1316 }
1317 }
1318 #[inline]
1319 pub unsafe fn temporal_id_raw(this: *const Self) -> u32 {
1320 unsafe {
1321 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1322 ::std::ptr::addr_of!((*this)._bitfield_1),
1323 0usize,
1324 8u8,
1325 ) as u32)
1326 }
1327 }
1328 #[inline]
1329 pub unsafe fn set_temporal_id_raw(this: *mut Self, val: u32) {
1330 unsafe {
1331 let val: u32 = ::std::mem::transmute(val);
1332 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1333 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1334 0usize,
1335 8u8,
1336 val as u64,
1337 )
1338 }
1339 }
1340 #[inline]
1341 pub fn reserved(&self) -> u32 {
1342 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) }
1343 }
1344 #[inline]
1345 pub fn set_reserved(&mut self, val: u32) {
1346 unsafe {
1347 let val: u32 = ::std::mem::transmute(val);
1348 self._bitfield_1.set(8usize, 24u8, val as u64)
1349 }
1350 }
1351 #[inline]
1352 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
1353 unsafe {
1354 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1355 ::std::ptr::addr_of!((*this)._bitfield_1),
1356 8usize,
1357 24u8,
1358 ) as u32)
1359 }
1360 }
1361 #[inline]
1362 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
1363 unsafe {
1364 let val: u32 = ::std::mem::transmute(val);
1365 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1366 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1367 8usize,
1368 24u8,
1369 val as u64,
1370 )
1371 }
1372 }
1373 #[inline]
1374 pub fn new_bitfield_1(temporal_id: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> {
1375 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
1376 __bindgen_bitfield_unit.set(0usize, 8u8, {
1377 let temporal_id: u32 = unsafe { ::std::mem::transmute(temporal_id) };
1378 temporal_id as u64
1379 });
1380 __bindgen_bitfield_unit.set(8usize, 24u8, {
1381 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
1382 reserved as u64
1383 });
1384 __bindgen_bitfield_unit
1385 }
1386}
1387impl Default for _VAEncMiscParameterFrameRate__bindgen_ty_1 {
1388 fn default() -> Self {
1389 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1390 unsafe {
1391 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1392 s.assume_init()
1393 }
1394 }
1395}
1396impl Default for _VAEncMiscParameterFrameRate {
1397 fn default() -> Self {
1398 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1399 unsafe {
1400 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1401 s.assume_init()
1402 }
1403 }
1404}
1405#[doc = " Encode framerate parameters.\n\n Sets the encode framerate used by the rate controller. This should be\n provided in all modes using a bitrate target (variable framerate is not\n supported)."]
1406pub type VAEncMiscParameterFrameRate = _VAEncMiscParameterFrameRate;
1407#[doc = " Allow a maximum slice size to be specified (in bits).\n The encoder will attempt to make sure that individual slices do not exceed this size\n Or to signal applicate if the slice size exceed this size, see \"status\" of VACodedBufferSegment"]
1408#[repr(C)]
1409#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1410pub struct _VAEncMiscParameterMaxSliceSize {
1411 pub max_slice_size: u32,
1412 #[doc = " \\brief Reserved bytes for future use, must be zero"]
1413 pub va_reserved: [u32; 4usize],
1414}
1415#[doc = " Allow a maximum slice size to be specified (in bits).\n The encoder will attempt to make sure that individual slices do not exceed this size\n Or to signal applicate if the slice size exceed this size, see \"status\" of VACodedBufferSegment"]
1416pub type VAEncMiscParameterMaxSliceSize = _VAEncMiscParameterMaxSliceSize;
1417#[doc = " HRD / VBV buffering parameters for encoding.\n\n This sets the HRD / VBV parameters which will be used by the rate\n controller for encoding. It should be specified in modes using a bitrate\n target when the buffering of the output stream needs to be constrained.\n\n If not provided, the encoder may use arbitrary amounts of buffering."]
1418#[repr(C)]
1419#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1420pub struct _VAEncMiscParameterHRD {
1421 #[doc = " The initial fullness of the HRD coded picture buffer, in bits.\n\n This sets how full the CPB is when encoding begins - that is, how much\n buffering will happen on the decoder side before the first frame.\n The CPB fullness will be reset to this value after any rate control\n reset (a change in parameters or an explicit reset).\n\n For H.264, it should match the value of initial_cpb_removal_delay in\n buffering_period SEI messages."]
1422 pub initial_buffer_fullness: u32,
1423 #[doc = " The HRD coded picture buffer size, in bits.\n\n For H.264, it should match the value of cpb_size_value_minus1 in the VUI\n parameters."]
1424 pub buffer_size: u32,
1425 #[doc = " \\brief Reserved bytes for future use, must be zero"]
1426 pub va_reserved: [u32; 4usize],
1427}
1428#[doc = " HRD / VBV buffering parameters for encoding.\n\n This sets the HRD / VBV parameters which will be used by the rate\n controller for encoding. It should be specified in modes using a bitrate\n target when the buffering of the output stream needs to be constrained.\n\n If not provided, the encoder may use arbitrary amounts of buffering."]
1429pub type VAEncMiscParameterHRD = _VAEncMiscParameterHRD;
1430#[doc = " \\brief Defines a maximum frame size (in bits).\n\n This misc parameter buffer defines the maximum size of a frame (in\n bits). The encoder will try to make sure that each frame does not\n exceed this size. Otherwise, if the frame size exceeds this size,\n the \\c status flag of #VACodedBufferSegment will contain\n #VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW."]
1431#[repr(C)]
1432#[derive(Debug, Copy, Clone, PartialEq, Eq)]
1433pub struct _VAEncMiscParameterBufferMaxFrameSize {
1434 #[doc = " \\brief Type. Shall be set to #VAEncMiscParameterTypeMaxFrameSize. */\n/** duplicated with VAEncMiscParameterBuffer, should be deprecated"]
1435 pub type_: VAEncMiscParameterType::Type,
1436 #[doc = " \\brief Maximum size of a frame (in bits)."]
1437 pub max_frame_size: u32,
1438 #[doc = " \\brief Reserved bytes for future use, must be zero"]
1439 pub va_reserved: [u32; 4usize],
1440}
1441impl Default for _VAEncMiscParameterBufferMaxFrameSize {
1442 fn default() -> Self {
1443 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1444 unsafe {
1445 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1446 s.assume_init()
1447 }
1448 }
1449}
1450#[doc = " \\brief Defines a maximum frame size (in bits).\n\n This misc parameter buffer defines the maximum size of a frame (in\n bits). The encoder will try to make sure that each frame does not\n exceed this size. Otherwise, if the frame size exceeds this size,\n the \\c status flag of #VACodedBufferSegment will contain\n #VA_CODED_BUF_STATUS_FRAME_SIZE_OVERFLOW."]
1451pub type VAEncMiscParameterBufferMaxFrameSize = _VAEncMiscParameterBufferMaxFrameSize;
1452#[doc = " \\brief Encoding quality level.\n\n The encoding quality could be set through this structure, if the implementation\n supports multiple quality levels. The quality level set through this structure is\n persistent over the entire coded sequence, or until a new structure is being sent.\n The quality level range can be queried through the VAConfigAttribEncQualityRange\n attribute. A lower value means higher quality, and a value of 1 represents the highest\n quality. The quality level setting is used as a trade-off between quality and speed/power\n consumption, with higher quality corresponds to lower speed and higher power consumption."]
1453#[repr(C)]
1454#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1455pub struct _VAEncMiscParameterBufferQualityLevel {
1456 #[doc = " \\brief Encoding quality level setting. When set to 0, default quality\n level is used."]
1457 pub quality_level: u32,
1458 #[doc = " \\brief Reserved bytes for future use, must be zero"]
1459 pub va_reserved: [u32; 4usize],
1460}
1461#[doc = " \\brief Encoding quality level.\n\n The encoding quality could be set through this structure, if the implementation\n supports multiple quality levels. The quality level set through this structure is\n persistent over the entire coded sequence, or until a new structure is being sent.\n The quality level range can be queried through the VAConfigAttribEncQualityRange\n attribute. A lower value means higher quality, and a value of 1 represents the highest\n quality. The quality level setting is used as a trade-off between quality and speed/power\n consumption, with higher quality corresponds to lower speed and higher power consumption."]
1462pub type VAEncMiscParameterBufferQualityLevel = _VAEncMiscParameterBufferQualityLevel;
1463#[doc = " \\brief Quantization settings for encoding.\n\n Some encoders support special types of quantization such as trellis, and this structure\n can be used by the app to control these special types of quantization by the encoder."]
1464#[repr(C)]
1465#[derive(Copy, Clone)]
1466pub struct _VAEncMiscParameterQuantization {
1467 pub quantization_flags: _VAEncMiscParameterQuantization__bindgen_ty_1,
1468 pub va_reserved: u32,
1469}
1470#[repr(C)]
1471#[derive(Copy, Clone)]
1472pub union _VAEncMiscParameterQuantization__bindgen_ty_1 {
1473 pub bits: _VAEncMiscParameterQuantization__bindgen_ty_1__bindgen_ty_1,
1474 pub value: u32,
1475}
1476#[repr(C)]
1477#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1478pub struct _VAEncMiscParameterQuantization__bindgen_ty_1__bindgen_ty_1 {
1479 pub _bitfield_align_1: [u32; 0],
1480 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
1481}
1482impl _VAEncMiscParameterQuantization__bindgen_ty_1__bindgen_ty_1 {
1483 #[inline]
1484 pub fn disable_trellis(&self) -> u32 {
1485 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
1486 }
1487 #[inline]
1488 pub fn set_disable_trellis(&mut self, val: u32) {
1489 unsafe {
1490 let val: u32 = ::std::mem::transmute(val);
1491 self._bitfield_1.set(0usize, 1u8, val as u64)
1492 }
1493 }
1494 #[inline]
1495 pub unsafe fn disable_trellis_raw(this: *const Self) -> u32 {
1496 unsafe {
1497 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1498 ::std::ptr::addr_of!((*this)._bitfield_1),
1499 0usize,
1500 1u8,
1501 ) as u32)
1502 }
1503 }
1504 #[inline]
1505 pub unsafe fn set_disable_trellis_raw(this: *mut Self, val: u32) {
1506 unsafe {
1507 let val: u32 = ::std::mem::transmute(val);
1508 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1509 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1510 0usize,
1511 1u8,
1512 val as u64,
1513 )
1514 }
1515 }
1516 #[inline]
1517 pub fn enable_trellis_I(&self) -> u32 {
1518 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
1519 }
1520 #[inline]
1521 pub fn set_enable_trellis_I(&mut self, val: u32) {
1522 unsafe {
1523 let val: u32 = ::std::mem::transmute(val);
1524 self._bitfield_1.set(1usize, 1u8, val as u64)
1525 }
1526 }
1527 #[inline]
1528 pub unsafe fn enable_trellis_I_raw(this: *const Self) -> u32 {
1529 unsafe {
1530 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1531 ::std::ptr::addr_of!((*this)._bitfield_1),
1532 1usize,
1533 1u8,
1534 ) as u32)
1535 }
1536 }
1537 #[inline]
1538 pub unsafe fn set_enable_trellis_I_raw(this: *mut Self, val: u32) {
1539 unsafe {
1540 let val: u32 = ::std::mem::transmute(val);
1541 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1542 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1543 1usize,
1544 1u8,
1545 val as u64,
1546 )
1547 }
1548 }
1549 #[inline]
1550 pub fn enable_trellis_P(&self) -> u32 {
1551 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
1552 }
1553 #[inline]
1554 pub fn set_enable_trellis_P(&mut self, val: u32) {
1555 unsafe {
1556 let val: u32 = ::std::mem::transmute(val);
1557 self._bitfield_1.set(2usize, 1u8, val as u64)
1558 }
1559 }
1560 #[inline]
1561 pub unsafe fn enable_trellis_P_raw(this: *const Self) -> u32 {
1562 unsafe {
1563 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1564 ::std::ptr::addr_of!((*this)._bitfield_1),
1565 2usize,
1566 1u8,
1567 ) as u32)
1568 }
1569 }
1570 #[inline]
1571 pub unsafe fn set_enable_trellis_P_raw(this: *mut Self, val: u32) {
1572 unsafe {
1573 let val: u32 = ::std::mem::transmute(val);
1574 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1575 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1576 2usize,
1577 1u8,
1578 val as u64,
1579 )
1580 }
1581 }
1582 #[inline]
1583 pub fn enable_trellis_B(&self) -> u32 {
1584 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
1585 }
1586 #[inline]
1587 pub fn set_enable_trellis_B(&mut self, val: u32) {
1588 unsafe {
1589 let val: u32 = ::std::mem::transmute(val);
1590 self._bitfield_1.set(3usize, 1u8, val as u64)
1591 }
1592 }
1593 #[inline]
1594 pub unsafe fn enable_trellis_B_raw(this: *const Self) -> u32 {
1595 unsafe {
1596 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1597 ::std::ptr::addr_of!((*this)._bitfield_1),
1598 3usize,
1599 1u8,
1600 ) as u32)
1601 }
1602 }
1603 #[inline]
1604 pub unsafe fn set_enable_trellis_B_raw(this: *mut Self, val: u32) {
1605 unsafe {
1606 let val: u32 = ::std::mem::transmute(val);
1607 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1608 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1609 3usize,
1610 1u8,
1611 val as u64,
1612 )
1613 }
1614 }
1615 #[inline]
1616 pub fn reserved(&self) -> u32 {
1617 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) }
1618 }
1619 #[inline]
1620 pub fn set_reserved(&mut self, val: u32) {
1621 unsafe {
1622 let val: u32 = ::std::mem::transmute(val);
1623 self._bitfield_1.set(4usize, 28u8, val as u64)
1624 }
1625 }
1626 #[inline]
1627 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
1628 unsafe {
1629 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
1630 ::std::ptr::addr_of!((*this)._bitfield_1),
1631 4usize,
1632 28u8,
1633 ) as u32)
1634 }
1635 }
1636 #[inline]
1637 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
1638 unsafe {
1639 let val: u32 = ::std::mem::transmute(val);
1640 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
1641 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1642 4usize,
1643 28u8,
1644 val as u64,
1645 )
1646 }
1647 }
1648 #[inline]
1649 pub fn new_bitfield_1(
1650 disable_trellis: u32,
1651 enable_trellis_I: u32,
1652 enable_trellis_P: u32,
1653 enable_trellis_B: u32,
1654 reserved: u32,
1655 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
1656 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
1657 __bindgen_bitfield_unit.set(0usize, 1u8, {
1658 let disable_trellis: u32 = unsafe { ::std::mem::transmute(disable_trellis) };
1659 disable_trellis as u64
1660 });
1661 __bindgen_bitfield_unit.set(1usize, 1u8, {
1662 let enable_trellis_I: u32 = unsafe { ::std::mem::transmute(enable_trellis_I) };
1663 enable_trellis_I as u64
1664 });
1665 __bindgen_bitfield_unit.set(2usize, 1u8, {
1666 let enable_trellis_P: u32 = unsafe { ::std::mem::transmute(enable_trellis_P) };
1667 enable_trellis_P as u64
1668 });
1669 __bindgen_bitfield_unit.set(3usize, 1u8, {
1670 let enable_trellis_B: u32 = unsafe { ::std::mem::transmute(enable_trellis_B) };
1671 enable_trellis_B as u64
1672 });
1673 __bindgen_bitfield_unit.set(4usize, 28u8, {
1674 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
1675 reserved as u64
1676 });
1677 __bindgen_bitfield_unit
1678 }
1679}
1680impl Default for _VAEncMiscParameterQuantization__bindgen_ty_1 {
1681 fn default() -> Self {
1682 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1683 unsafe {
1684 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1685 s.assume_init()
1686 }
1687 }
1688}
1689impl Default for _VAEncMiscParameterQuantization {
1690 fn default() -> Self {
1691 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
1692 unsafe {
1693 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
1694 s.assume_init()
1695 }
1696 }
1697}
1698#[doc = " \\brief Quantization settings for encoding.\n\n Some encoders support special types of quantization such as trellis, and this structure\n can be used by the app to control these special types of quantization by the encoder."]
1699pub type VAEncMiscParameterQuantization = _VAEncMiscParameterQuantization;
1700#[doc = " \\brief Encoding skip frame.\n\n The application may choose to skip frames externally to the encoder (e.g. drop completely or\n code as all skip's). For rate control purposes the encoder will need to know the size and number\n of skipped frames. Skip frame(s) indicated through this structure is applicable only to the\n current frame. It is allowed for the application to still send in packed headers for the driver to\n pack, although no frame will be encoded (e.g. for HW to encrypt the frame)."]
1701#[repr(C)]
1702#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1703pub struct _VAEncMiscParameterSkipFrame {
1704 #[doc = " \\brief Indicates skip frames as below.\n 0: Encode as normal, no skip.\n 1: One or more frames were skipped prior to the current frame, encode the current frame as normal.\n 2: The current frame is to be skipped, do not encode it but pack/encrypt the packed header contents\n (all except VAEncPackedHeaderSlice) which could contain actual frame contents (e.g. pack the frame\n in VAEncPackedHeaderPicture)."]
1705 pub skip_frame_flag: u8,
1706 #[doc = " \\brief The number of frames skipped prior to the current frame. Valid when skip_frame_flag = 1."]
1707 pub num_skip_frames: u8,
1708 #[doc = " \\brief When skip_frame_flag = 1, the size of the skipped frames in bits. When skip_frame_flag = 2,\n the size of the current skipped frame that is to be packed/encrypted in bits."]
1709 pub size_skip_frames: u32,
1710 #[doc = " \\brief Reserved bytes for future use, must be zero"]
1711 pub va_reserved: [u32; 4usize],
1712}
1713#[doc = " \\brief Encoding skip frame.\n\n The application may choose to skip frames externally to the encoder (e.g. drop completely or\n code as all skip's). For rate control purposes the encoder will need to know the size and number\n of skipped frames. Skip frame(s) indicated through this structure is applicable only to the\n current frame. It is allowed for the application to still send in packed headers for the driver to\n pack, although no frame will be encoded (e.g. for HW to encrypt the frame)."]
1714pub type VAEncMiscParameterSkipFrame = _VAEncMiscParameterSkipFrame;
1715#[doc = " H.264/AVC data structures"]
1716#[repr(C)]
1717#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1718pub struct _VAPictureH264 {
1719 pub picture_id: VASurfaceID,
1720 pub frame_idx: u32,
1721 pub flags: u32,
1722 pub TopFieldOrderCnt: i32,
1723 pub BottomFieldOrderCnt: i32,
1724 #[doc = " \\brief Reserved bytes for future use, must be zero"]
1725 pub va_reserved: [u32; 4usize],
1726}
1727#[doc = " H.264/AVC data structures"]
1728pub type VAPictureH264 = _VAPictureH264;
1729#[doc = " H.264 Picture Parameter Buffer"]
1730#[repr(C)]
1731#[derive(Copy, Clone)]
1732pub struct _VAPictureParameterBufferH264 {
1733 pub CurrPic: VAPictureH264,
1734 pub ReferenceFrames: [VAPictureH264; 16usize],
1735 pub picture_width_in_mbs_minus1: u16,
1736 pub picture_height_in_mbs_minus1: u16,
1737 pub bit_depth_luma_minus8: u8,
1738 pub bit_depth_chroma_minus8: u8,
1739 pub num_ref_frames: u8,
1740 pub seq_fields: _VAPictureParameterBufferH264__bindgen_ty_1,
1741 pub num_slice_groups_minus1: u8,
1742 pub slice_group_map_type: u8,
1743 pub slice_group_change_rate_minus1: u16,
1744 pub pic_init_qp_minus26: i8,
1745 pub pic_init_qs_minus26: i8,
1746 pub chroma_qp_index_offset: i8,
1747 pub second_chroma_qp_index_offset: i8,
1748 pub pic_fields: _VAPictureParameterBufferH264__bindgen_ty_2,
1749 pub frame_num: u16,
1750 #[doc = " \\brief Reserved bytes for future use, must be zero"]
1751 pub va_reserved: [u32; 8usize],
1752}
1753#[repr(C)]
1754#[derive(Copy, Clone)]
1755pub union _VAPictureParameterBufferH264__bindgen_ty_1 {
1756 pub bits: _VAPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1,
1757 pub value: u32,
1758}
1759#[repr(C)]
1760#[repr(align(4))]
1761#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
1762pub struct _VAPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1 {
1763 pub _bitfield_align_1: [u8; 0],
1764 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
1765 pub __bindgen_padding_0: u8,
1766}
1767impl _VAPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1 {
1768 #[inline]
1769 pub fn chroma_format_idc(&self) -> u32 {
1770 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
1771 }
1772 #[inline]
1773 pub fn set_chroma_format_idc(&mut self, val: u32) {
1774 unsafe {
1775 let val: u32 = ::std::mem::transmute(val);
1776 self._bitfield_1.set(0usize, 2u8, val as u64)
1777 }
1778 }
1779 #[inline]
1780 pub unsafe fn chroma_format_idc_raw(this: *const Self) -> u32 {
1781 unsafe {
1782 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
1783 ::std::ptr::addr_of!((*this)._bitfield_1),
1784 0usize,
1785 2u8,
1786 ) as u32)
1787 }
1788 }
1789 #[inline]
1790 pub unsafe fn set_chroma_format_idc_raw(this: *mut Self, val: u32) {
1791 unsafe {
1792 let val: u32 = ::std::mem::transmute(val);
1793 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
1794 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1795 0usize,
1796 2u8,
1797 val as u64,
1798 )
1799 }
1800 }
1801 #[inline]
1802 pub fn residual_colour_transform_flag(&self) -> u32 {
1803 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
1804 }
1805 #[inline]
1806 pub fn set_residual_colour_transform_flag(&mut self, val: u32) {
1807 unsafe {
1808 let val: u32 = ::std::mem::transmute(val);
1809 self._bitfield_1.set(2usize, 1u8, val as u64)
1810 }
1811 }
1812 #[inline]
1813 pub unsafe fn residual_colour_transform_flag_raw(this: *const Self) -> u32 {
1814 unsafe {
1815 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
1816 ::std::ptr::addr_of!((*this)._bitfield_1),
1817 2usize,
1818 1u8,
1819 ) as u32)
1820 }
1821 }
1822 #[inline]
1823 pub unsafe fn set_residual_colour_transform_flag_raw(this: *mut Self, val: u32) {
1824 unsafe {
1825 let val: u32 = ::std::mem::transmute(val);
1826 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
1827 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1828 2usize,
1829 1u8,
1830 val as u64,
1831 )
1832 }
1833 }
1834 #[inline]
1835 pub fn gaps_in_frame_num_value_allowed_flag(&self) -> u32 {
1836 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
1837 }
1838 #[inline]
1839 pub fn set_gaps_in_frame_num_value_allowed_flag(&mut self, val: u32) {
1840 unsafe {
1841 let val: u32 = ::std::mem::transmute(val);
1842 self._bitfield_1.set(3usize, 1u8, val as u64)
1843 }
1844 }
1845 #[inline]
1846 pub unsafe fn gaps_in_frame_num_value_allowed_flag_raw(this: *const Self) -> u32 {
1847 unsafe {
1848 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
1849 ::std::ptr::addr_of!((*this)._bitfield_1),
1850 3usize,
1851 1u8,
1852 ) as u32)
1853 }
1854 }
1855 #[inline]
1856 pub unsafe fn set_gaps_in_frame_num_value_allowed_flag_raw(this: *mut Self, val: u32) {
1857 unsafe {
1858 let val: u32 = ::std::mem::transmute(val);
1859 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
1860 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1861 3usize,
1862 1u8,
1863 val as u64,
1864 )
1865 }
1866 }
1867 #[inline]
1868 pub fn frame_mbs_only_flag(&self) -> u32 {
1869 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
1870 }
1871 #[inline]
1872 pub fn set_frame_mbs_only_flag(&mut self, val: u32) {
1873 unsafe {
1874 let val: u32 = ::std::mem::transmute(val);
1875 self._bitfield_1.set(4usize, 1u8, val as u64)
1876 }
1877 }
1878 #[inline]
1879 pub unsafe fn frame_mbs_only_flag_raw(this: *const Self) -> u32 {
1880 unsafe {
1881 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
1882 ::std::ptr::addr_of!((*this)._bitfield_1),
1883 4usize,
1884 1u8,
1885 ) as u32)
1886 }
1887 }
1888 #[inline]
1889 pub unsafe fn set_frame_mbs_only_flag_raw(this: *mut Self, val: u32) {
1890 unsafe {
1891 let val: u32 = ::std::mem::transmute(val);
1892 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
1893 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1894 4usize,
1895 1u8,
1896 val as u64,
1897 )
1898 }
1899 }
1900 #[inline]
1901 pub fn mb_adaptive_frame_field_flag(&self) -> u32 {
1902 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
1903 }
1904 #[inline]
1905 pub fn set_mb_adaptive_frame_field_flag(&mut self, val: u32) {
1906 unsafe {
1907 let val: u32 = ::std::mem::transmute(val);
1908 self._bitfield_1.set(5usize, 1u8, val as u64)
1909 }
1910 }
1911 #[inline]
1912 pub unsafe fn mb_adaptive_frame_field_flag_raw(this: *const Self) -> u32 {
1913 unsafe {
1914 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
1915 ::std::ptr::addr_of!((*this)._bitfield_1),
1916 5usize,
1917 1u8,
1918 ) as u32)
1919 }
1920 }
1921 #[inline]
1922 pub unsafe fn set_mb_adaptive_frame_field_flag_raw(this: *mut Self, val: u32) {
1923 unsafe {
1924 let val: u32 = ::std::mem::transmute(val);
1925 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
1926 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1927 5usize,
1928 1u8,
1929 val as u64,
1930 )
1931 }
1932 }
1933 #[inline]
1934 pub fn direct_8x8_inference_flag(&self) -> u32 {
1935 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
1936 }
1937 #[inline]
1938 pub fn set_direct_8x8_inference_flag(&mut self, val: u32) {
1939 unsafe {
1940 let val: u32 = ::std::mem::transmute(val);
1941 self._bitfield_1.set(6usize, 1u8, val as u64)
1942 }
1943 }
1944 #[inline]
1945 pub unsafe fn direct_8x8_inference_flag_raw(this: *const Self) -> u32 {
1946 unsafe {
1947 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
1948 ::std::ptr::addr_of!((*this)._bitfield_1),
1949 6usize,
1950 1u8,
1951 ) as u32)
1952 }
1953 }
1954 #[inline]
1955 pub unsafe fn set_direct_8x8_inference_flag_raw(this: *mut Self, val: u32) {
1956 unsafe {
1957 let val: u32 = ::std::mem::transmute(val);
1958 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
1959 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1960 6usize,
1961 1u8,
1962 val as u64,
1963 )
1964 }
1965 }
1966 #[inline]
1967 pub fn MinLumaBiPredSize8x8(&self) -> u32 {
1968 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
1969 }
1970 #[inline]
1971 pub fn set_MinLumaBiPredSize8x8(&mut self, val: u32) {
1972 unsafe {
1973 let val: u32 = ::std::mem::transmute(val);
1974 self._bitfield_1.set(7usize, 1u8, val as u64)
1975 }
1976 }
1977 #[inline]
1978 pub unsafe fn MinLumaBiPredSize8x8_raw(this: *const Self) -> u32 {
1979 unsafe {
1980 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
1981 ::std::ptr::addr_of!((*this)._bitfield_1),
1982 7usize,
1983 1u8,
1984 ) as u32)
1985 }
1986 }
1987 #[inline]
1988 pub unsafe fn set_MinLumaBiPredSize8x8_raw(this: *mut Self, val: u32) {
1989 unsafe {
1990 let val: u32 = ::std::mem::transmute(val);
1991 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
1992 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
1993 7usize,
1994 1u8,
1995 val as u64,
1996 )
1997 }
1998 }
1999 #[inline]
2000 pub fn log2_max_frame_num_minus4(&self) -> u32 {
2001 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) }
2002 }
2003 #[inline]
2004 pub fn set_log2_max_frame_num_minus4(&mut self, val: u32) {
2005 unsafe {
2006 let val: u32 = ::std::mem::transmute(val);
2007 self._bitfield_1.set(8usize, 4u8, val as u64)
2008 }
2009 }
2010 #[inline]
2011 pub unsafe fn log2_max_frame_num_minus4_raw(this: *const Self) -> u32 {
2012 unsafe {
2013 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
2014 ::std::ptr::addr_of!((*this)._bitfield_1),
2015 8usize,
2016 4u8,
2017 ) as u32)
2018 }
2019 }
2020 #[inline]
2021 pub unsafe fn set_log2_max_frame_num_minus4_raw(this: *mut Self, val: u32) {
2022 unsafe {
2023 let val: u32 = ::std::mem::transmute(val);
2024 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
2025 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2026 8usize,
2027 4u8,
2028 val as u64,
2029 )
2030 }
2031 }
2032 #[inline]
2033 pub fn pic_order_cnt_type(&self) -> u32 {
2034 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) }
2035 }
2036 #[inline]
2037 pub fn set_pic_order_cnt_type(&mut self, val: u32) {
2038 unsafe {
2039 let val: u32 = ::std::mem::transmute(val);
2040 self._bitfield_1.set(12usize, 2u8, val as u64)
2041 }
2042 }
2043 #[inline]
2044 pub unsafe fn pic_order_cnt_type_raw(this: *const Self) -> u32 {
2045 unsafe {
2046 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
2047 ::std::ptr::addr_of!((*this)._bitfield_1),
2048 12usize,
2049 2u8,
2050 ) as u32)
2051 }
2052 }
2053 #[inline]
2054 pub unsafe fn set_pic_order_cnt_type_raw(this: *mut Self, val: u32) {
2055 unsafe {
2056 let val: u32 = ::std::mem::transmute(val);
2057 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
2058 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2059 12usize,
2060 2u8,
2061 val as u64,
2062 )
2063 }
2064 }
2065 #[inline]
2066 pub fn log2_max_pic_order_cnt_lsb_minus4(&self) -> u32 {
2067 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 4u8) as u32) }
2068 }
2069 #[inline]
2070 pub fn set_log2_max_pic_order_cnt_lsb_minus4(&mut self, val: u32) {
2071 unsafe {
2072 let val: u32 = ::std::mem::transmute(val);
2073 self._bitfield_1.set(14usize, 4u8, val as u64)
2074 }
2075 }
2076 #[inline]
2077 pub unsafe fn log2_max_pic_order_cnt_lsb_minus4_raw(this: *const Self) -> u32 {
2078 unsafe {
2079 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
2080 ::std::ptr::addr_of!((*this)._bitfield_1),
2081 14usize,
2082 4u8,
2083 ) as u32)
2084 }
2085 }
2086 #[inline]
2087 pub unsafe fn set_log2_max_pic_order_cnt_lsb_minus4_raw(this: *mut Self, val: u32) {
2088 unsafe {
2089 let val: u32 = ::std::mem::transmute(val);
2090 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
2091 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2092 14usize,
2093 4u8,
2094 val as u64,
2095 )
2096 }
2097 }
2098 #[inline]
2099 pub fn delta_pic_order_always_zero_flag(&self) -> u32 {
2100 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) }
2101 }
2102 #[inline]
2103 pub fn set_delta_pic_order_always_zero_flag(&mut self, val: u32) {
2104 unsafe {
2105 let val: u32 = ::std::mem::transmute(val);
2106 self._bitfield_1.set(18usize, 1u8, val as u64)
2107 }
2108 }
2109 #[inline]
2110 pub unsafe fn delta_pic_order_always_zero_flag_raw(this: *const Self) -> u32 {
2111 unsafe {
2112 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
2113 ::std::ptr::addr_of!((*this)._bitfield_1),
2114 18usize,
2115 1u8,
2116 ) as u32)
2117 }
2118 }
2119 #[inline]
2120 pub unsafe fn set_delta_pic_order_always_zero_flag_raw(this: *mut Self, val: u32) {
2121 unsafe {
2122 let val: u32 = ::std::mem::transmute(val);
2123 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
2124 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2125 18usize,
2126 1u8,
2127 val as u64,
2128 )
2129 }
2130 }
2131 #[inline]
2132 pub fn new_bitfield_1(
2133 chroma_format_idc: u32,
2134 residual_colour_transform_flag: u32,
2135 gaps_in_frame_num_value_allowed_flag: u32,
2136 frame_mbs_only_flag: u32,
2137 mb_adaptive_frame_field_flag: u32,
2138 direct_8x8_inference_flag: u32,
2139 MinLumaBiPredSize8x8: u32,
2140 log2_max_frame_num_minus4: u32,
2141 pic_order_cnt_type: u32,
2142 log2_max_pic_order_cnt_lsb_minus4: u32,
2143 delta_pic_order_always_zero_flag: u32,
2144 ) -> __BindgenBitfieldUnit<[u8; 3usize]> {
2145 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
2146 __bindgen_bitfield_unit.set(0usize, 2u8, {
2147 let chroma_format_idc: u32 = unsafe { ::std::mem::transmute(chroma_format_idc) };
2148 chroma_format_idc as u64
2149 });
2150 __bindgen_bitfield_unit.set(2usize, 1u8, {
2151 let residual_colour_transform_flag: u32 = unsafe { ::std::mem::transmute(residual_colour_transform_flag) };
2152 residual_colour_transform_flag as u64
2153 });
2154 __bindgen_bitfield_unit.set(3usize, 1u8, {
2155 let gaps_in_frame_num_value_allowed_flag: u32 =
2156 unsafe { ::std::mem::transmute(gaps_in_frame_num_value_allowed_flag) };
2157 gaps_in_frame_num_value_allowed_flag as u64
2158 });
2159 __bindgen_bitfield_unit.set(4usize, 1u8, {
2160 let frame_mbs_only_flag: u32 = unsafe { ::std::mem::transmute(frame_mbs_only_flag) };
2161 frame_mbs_only_flag as u64
2162 });
2163 __bindgen_bitfield_unit.set(5usize, 1u8, {
2164 let mb_adaptive_frame_field_flag: u32 = unsafe { ::std::mem::transmute(mb_adaptive_frame_field_flag) };
2165 mb_adaptive_frame_field_flag as u64
2166 });
2167 __bindgen_bitfield_unit.set(6usize, 1u8, {
2168 let direct_8x8_inference_flag: u32 = unsafe { ::std::mem::transmute(direct_8x8_inference_flag) };
2169 direct_8x8_inference_flag as u64
2170 });
2171 __bindgen_bitfield_unit.set(7usize, 1u8, {
2172 let MinLumaBiPredSize8x8: u32 = unsafe { ::std::mem::transmute(MinLumaBiPredSize8x8) };
2173 MinLumaBiPredSize8x8 as u64
2174 });
2175 __bindgen_bitfield_unit.set(8usize, 4u8, {
2176 let log2_max_frame_num_minus4: u32 = unsafe { ::std::mem::transmute(log2_max_frame_num_minus4) };
2177 log2_max_frame_num_minus4 as u64
2178 });
2179 __bindgen_bitfield_unit.set(12usize, 2u8, {
2180 let pic_order_cnt_type: u32 = unsafe { ::std::mem::transmute(pic_order_cnt_type) };
2181 pic_order_cnt_type as u64
2182 });
2183 __bindgen_bitfield_unit.set(14usize, 4u8, {
2184 let log2_max_pic_order_cnt_lsb_minus4: u32 =
2185 unsafe { ::std::mem::transmute(log2_max_pic_order_cnt_lsb_minus4) };
2186 log2_max_pic_order_cnt_lsb_minus4 as u64
2187 });
2188 __bindgen_bitfield_unit.set(18usize, 1u8, {
2189 let delta_pic_order_always_zero_flag: u32 =
2190 unsafe { ::std::mem::transmute(delta_pic_order_always_zero_flag) };
2191 delta_pic_order_always_zero_flag as u64
2192 });
2193 __bindgen_bitfield_unit
2194 }
2195}
2196impl Default for _VAPictureParameterBufferH264__bindgen_ty_1 {
2197 fn default() -> Self {
2198 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2199 unsafe {
2200 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2201 s.assume_init()
2202 }
2203 }
2204}
2205#[repr(C)]
2206#[derive(Copy, Clone)]
2207pub union _VAPictureParameterBufferH264__bindgen_ty_2 {
2208 pub bits: _VAPictureParameterBufferH264__bindgen_ty_2__bindgen_ty_1,
2209 pub value: u32,
2210}
2211#[repr(C)]
2212#[repr(align(4))]
2213#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
2214pub struct _VAPictureParameterBufferH264__bindgen_ty_2__bindgen_ty_1 {
2215 pub _bitfield_align_1: [u8; 0],
2216 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
2217 pub __bindgen_padding_0: u16,
2218}
2219impl _VAPictureParameterBufferH264__bindgen_ty_2__bindgen_ty_1 {
2220 #[inline]
2221 pub fn entropy_coding_mode_flag(&self) -> u32 {
2222 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
2223 }
2224 #[inline]
2225 pub fn set_entropy_coding_mode_flag(&mut self, val: u32) {
2226 unsafe {
2227 let val: u32 = ::std::mem::transmute(val);
2228 self._bitfield_1.set(0usize, 1u8, val as u64)
2229 }
2230 }
2231 #[inline]
2232 pub unsafe fn entropy_coding_mode_flag_raw(this: *const Self) -> u32 {
2233 unsafe {
2234 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2235 ::std::ptr::addr_of!((*this)._bitfield_1),
2236 0usize,
2237 1u8,
2238 ) as u32)
2239 }
2240 }
2241 #[inline]
2242 pub unsafe fn set_entropy_coding_mode_flag_raw(this: *mut Self, val: u32) {
2243 unsafe {
2244 let val: u32 = ::std::mem::transmute(val);
2245 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2246 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2247 0usize,
2248 1u8,
2249 val as u64,
2250 )
2251 }
2252 }
2253 #[inline]
2254 pub fn weighted_pred_flag(&self) -> u32 {
2255 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
2256 }
2257 #[inline]
2258 pub fn set_weighted_pred_flag(&mut self, val: u32) {
2259 unsafe {
2260 let val: u32 = ::std::mem::transmute(val);
2261 self._bitfield_1.set(1usize, 1u8, val as u64)
2262 }
2263 }
2264 #[inline]
2265 pub unsafe fn weighted_pred_flag_raw(this: *const Self) -> u32 {
2266 unsafe {
2267 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2268 ::std::ptr::addr_of!((*this)._bitfield_1),
2269 1usize,
2270 1u8,
2271 ) as u32)
2272 }
2273 }
2274 #[inline]
2275 pub unsafe fn set_weighted_pred_flag_raw(this: *mut Self, val: u32) {
2276 unsafe {
2277 let val: u32 = ::std::mem::transmute(val);
2278 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2279 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2280 1usize,
2281 1u8,
2282 val as u64,
2283 )
2284 }
2285 }
2286 #[inline]
2287 pub fn weighted_bipred_idc(&self) -> u32 {
2288 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) }
2289 }
2290 #[inline]
2291 pub fn set_weighted_bipred_idc(&mut self, val: u32) {
2292 unsafe {
2293 let val: u32 = ::std::mem::transmute(val);
2294 self._bitfield_1.set(2usize, 2u8, val as u64)
2295 }
2296 }
2297 #[inline]
2298 pub unsafe fn weighted_bipred_idc_raw(this: *const Self) -> u32 {
2299 unsafe {
2300 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2301 ::std::ptr::addr_of!((*this)._bitfield_1),
2302 2usize,
2303 2u8,
2304 ) as u32)
2305 }
2306 }
2307 #[inline]
2308 pub unsafe fn set_weighted_bipred_idc_raw(this: *mut Self, val: u32) {
2309 unsafe {
2310 let val: u32 = ::std::mem::transmute(val);
2311 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2312 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2313 2usize,
2314 2u8,
2315 val as u64,
2316 )
2317 }
2318 }
2319 #[inline]
2320 pub fn transform_8x8_mode_flag(&self) -> u32 {
2321 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
2322 }
2323 #[inline]
2324 pub fn set_transform_8x8_mode_flag(&mut self, val: u32) {
2325 unsafe {
2326 let val: u32 = ::std::mem::transmute(val);
2327 self._bitfield_1.set(4usize, 1u8, val as u64)
2328 }
2329 }
2330 #[inline]
2331 pub unsafe fn transform_8x8_mode_flag_raw(this: *const Self) -> u32 {
2332 unsafe {
2333 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2334 ::std::ptr::addr_of!((*this)._bitfield_1),
2335 4usize,
2336 1u8,
2337 ) as u32)
2338 }
2339 }
2340 #[inline]
2341 pub unsafe fn set_transform_8x8_mode_flag_raw(this: *mut Self, val: u32) {
2342 unsafe {
2343 let val: u32 = ::std::mem::transmute(val);
2344 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2345 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2346 4usize,
2347 1u8,
2348 val as u64,
2349 )
2350 }
2351 }
2352 #[inline]
2353 pub fn field_pic_flag(&self) -> u32 {
2354 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
2355 }
2356 #[inline]
2357 pub fn set_field_pic_flag(&mut self, val: u32) {
2358 unsafe {
2359 let val: u32 = ::std::mem::transmute(val);
2360 self._bitfield_1.set(5usize, 1u8, val as u64)
2361 }
2362 }
2363 #[inline]
2364 pub unsafe fn field_pic_flag_raw(this: *const Self) -> u32 {
2365 unsafe {
2366 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2367 ::std::ptr::addr_of!((*this)._bitfield_1),
2368 5usize,
2369 1u8,
2370 ) as u32)
2371 }
2372 }
2373 #[inline]
2374 pub unsafe fn set_field_pic_flag_raw(this: *mut Self, val: u32) {
2375 unsafe {
2376 let val: u32 = ::std::mem::transmute(val);
2377 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2378 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2379 5usize,
2380 1u8,
2381 val as u64,
2382 )
2383 }
2384 }
2385 #[inline]
2386 pub fn constrained_intra_pred_flag(&self) -> u32 {
2387 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
2388 }
2389 #[inline]
2390 pub fn set_constrained_intra_pred_flag(&mut self, val: u32) {
2391 unsafe {
2392 let val: u32 = ::std::mem::transmute(val);
2393 self._bitfield_1.set(6usize, 1u8, val as u64)
2394 }
2395 }
2396 #[inline]
2397 pub unsafe fn constrained_intra_pred_flag_raw(this: *const Self) -> u32 {
2398 unsafe {
2399 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2400 ::std::ptr::addr_of!((*this)._bitfield_1),
2401 6usize,
2402 1u8,
2403 ) as u32)
2404 }
2405 }
2406 #[inline]
2407 pub unsafe fn set_constrained_intra_pred_flag_raw(this: *mut Self, val: u32) {
2408 unsafe {
2409 let val: u32 = ::std::mem::transmute(val);
2410 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2411 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2412 6usize,
2413 1u8,
2414 val as u64,
2415 )
2416 }
2417 }
2418 #[inline]
2419 pub fn pic_order_present_flag(&self) -> u32 {
2420 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
2421 }
2422 #[inline]
2423 pub fn set_pic_order_present_flag(&mut self, val: u32) {
2424 unsafe {
2425 let val: u32 = ::std::mem::transmute(val);
2426 self._bitfield_1.set(7usize, 1u8, val as u64)
2427 }
2428 }
2429 #[inline]
2430 pub unsafe fn pic_order_present_flag_raw(this: *const Self) -> u32 {
2431 unsafe {
2432 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2433 ::std::ptr::addr_of!((*this)._bitfield_1),
2434 7usize,
2435 1u8,
2436 ) as u32)
2437 }
2438 }
2439 #[inline]
2440 pub unsafe fn set_pic_order_present_flag_raw(this: *mut Self, val: u32) {
2441 unsafe {
2442 let val: u32 = ::std::mem::transmute(val);
2443 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2444 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2445 7usize,
2446 1u8,
2447 val as u64,
2448 )
2449 }
2450 }
2451 #[inline]
2452 pub fn deblocking_filter_control_present_flag(&self) -> u32 {
2453 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
2454 }
2455 #[inline]
2456 pub fn set_deblocking_filter_control_present_flag(&mut self, val: u32) {
2457 unsafe {
2458 let val: u32 = ::std::mem::transmute(val);
2459 self._bitfield_1.set(8usize, 1u8, val as u64)
2460 }
2461 }
2462 #[inline]
2463 pub unsafe fn deblocking_filter_control_present_flag_raw(this: *const Self) -> u32 {
2464 unsafe {
2465 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2466 ::std::ptr::addr_of!((*this)._bitfield_1),
2467 8usize,
2468 1u8,
2469 ) as u32)
2470 }
2471 }
2472 #[inline]
2473 pub unsafe fn set_deblocking_filter_control_present_flag_raw(this: *mut Self, val: u32) {
2474 unsafe {
2475 let val: u32 = ::std::mem::transmute(val);
2476 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2477 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2478 8usize,
2479 1u8,
2480 val as u64,
2481 )
2482 }
2483 }
2484 #[inline]
2485 pub fn redundant_pic_cnt_present_flag(&self) -> u32 {
2486 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
2487 }
2488 #[inline]
2489 pub fn set_redundant_pic_cnt_present_flag(&mut self, val: u32) {
2490 unsafe {
2491 let val: u32 = ::std::mem::transmute(val);
2492 self._bitfield_1.set(9usize, 1u8, val as u64)
2493 }
2494 }
2495 #[inline]
2496 pub unsafe fn redundant_pic_cnt_present_flag_raw(this: *const Self) -> u32 {
2497 unsafe {
2498 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2499 ::std::ptr::addr_of!((*this)._bitfield_1),
2500 9usize,
2501 1u8,
2502 ) as u32)
2503 }
2504 }
2505 #[inline]
2506 pub unsafe fn set_redundant_pic_cnt_present_flag_raw(this: *mut Self, val: u32) {
2507 unsafe {
2508 let val: u32 = ::std::mem::transmute(val);
2509 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2510 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2511 9usize,
2512 1u8,
2513 val as u64,
2514 )
2515 }
2516 }
2517 #[inline]
2518 pub fn reference_pic_flag(&self) -> u32 {
2519 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
2520 }
2521 #[inline]
2522 pub fn set_reference_pic_flag(&mut self, val: u32) {
2523 unsafe {
2524 let val: u32 = ::std::mem::transmute(val);
2525 self._bitfield_1.set(10usize, 1u8, val as u64)
2526 }
2527 }
2528 #[inline]
2529 pub unsafe fn reference_pic_flag_raw(this: *const Self) -> u32 {
2530 unsafe {
2531 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
2532 ::std::ptr::addr_of!((*this)._bitfield_1),
2533 10usize,
2534 1u8,
2535 ) as u32)
2536 }
2537 }
2538 #[inline]
2539 pub unsafe fn set_reference_pic_flag_raw(this: *mut Self, val: u32) {
2540 unsafe {
2541 let val: u32 = ::std::mem::transmute(val);
2542 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
2543 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2544 10usize,
2545 1u8,
2546 val as u64,
2547 )
2548 }
2549 }
2550 #[inline]
2551 pub fn new_bitfield_1(
2552 entropy_coding_mode_flag: u32,
2553 weighted_pred_flag: u32,
2554 weighted_bipred_idc: u32,
2555 transform_8x8_mode_flag: u32,
2556 field_pic_flag: u32,
2557 constrained_intra_pred_flag: u32,
2558 pic_order_present_flag: u32,
2559 deblocking_filter_control_present_flag: u32,
2560 redundant_pic_cnt_present_flag: u32,
2561 reference_pic_flag: u32,
2562 ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
2563 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
2564 __bindgen_bitfield_unit.set(0usize, 1u8, {
2565 let entropy_coding_mode_flag: u32 = unsafe { ::std::mem::transmute(entropy_coding_mode_flag) };
2566 entropy_coding_mode_flag as u64
2567 });
2568 __bindgen_bitfield_unit.set(1usize, 1u8, {
2569 let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) };
2570 weighted_pred_flag as u64
2571 });
2572 __bindgen_bitfield_unit.set(2usize, 2u8, {
2573 let weighted_bipred_idc: u32 = unsafe { ::std::mem::transmute(weighted_bipred_idc) };
2574 weighted_bipred_idc as u64
2575 });
2576 __bindgen_bitfield_unit.set(4usize, 1u8, {
2577 let transform_8x8_mode_flag: u32 = unsafe { ::std::mem::transmute(transform_8x8_mode_flag) };
2578 transform_8x8_mode_flag as u64
2579 });
2580 __bindgen_bitfield_unit.set(5usize, 1u8, {
2581 let field_pic_flag: u32 = unsafe { ::std::mem::transmute(field_pic_flag) };
2582 field_pic_flag as u64
2583 });
2584 __bindgen_bitfield_unit.set(6usize, 1u8, {
2585 let constrained_intra_pred_flag: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred_flag) };
2586 constrained_intra_pred_flag as u64
2587 });
2588 __bindgen_bitfield_unit.set(7usize, 1u8, {
2589 let pic_order_present_flag: u32 = unsafe { ::std::mem::transmute(pic_order_present_flag) };
2590 pic_order_present_flag as u64
2591 });
2592 __bindgen_bitfield_unit.set(8usize, 1u8, {
2593 let deblocking_filter_control_present_flag: u32 =
2594 unsafe { ::std::mem::transmute(deblocking_filter_control_present_flag) };
2595 deblocking_filter_control_present_flag as u64
2596 });
2597 __bindgen_bitfield_unit.set(9usize, 1u8, {
2598 let redundant_pic_cnt_present_flag: u32 = unsafe { ::std::mem::transmute(redundant_pic_cnt_present_flag) };
2599 redundant_pic_cnt_present_flag as u64
2600 });
2601 __bindgen_bitfield_unit.set(10usize, 1u8, {
2602 let reference_pic_flag: u32 = unsafe { ::std::mem::transmute(reference_pic_flag) };
2603 reference_pic_flag as u64
2604 });
2605 __bindgen_bitfield_unit
2606 }
2607}
2608impl Default for _VAPictureParameterBufferH264__bindgen_ty_2 {
2609 fn default() -> Self {
2610 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2611 unsafe {
2612 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2613 s.assume_init()
2614 }
2615 }
2616}
2617impl Default for _VAPictureParameterBufferH264 {
2618 fn default() -> Self {
2619 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2620 unsafe {
2621 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2622 s.assume_init()
2623 }
2624 }
2625}
2626#[doc = " H.264 Picture Parameter Buffer"]
2627pub type VAPictureParameterBufferH264 = _VAPictureParameterBufferH264;
2628#[doc = " H.264 Inverse Quantization Matrix Buffer"]
2629#[repr(C)]
2630#[derive(Debug, Copy, Clone, PartialEq, Eq)]
2631pub struct _VAIQMatrixBufferH264 {
2632 #[doc = " \\brief 4x4 scaling list, in raster scan order."]
2633 pub ScalingList4x4: [[u8; 16usize]; 6usize],
2634 #[doc = " \\brief 8x8 scaling list, in raster scan order."]
2635 pub ScalingList8x8: [[u8; 64usize]; 2usize],
2636 #[doc = " \\brief Reserved bytes for future use, must be zero"]
2637 pub va_reserved: [u32; 4usize],
2638}
2639impl Default for _VAIQMatrixBufferH264 {
2640 fn default() -> Self {
2641 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2642 unsafe {
2643 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2644 s.assume_init()
2645 }
2646 }
2647}
2648#[doc = " H.264 Inverse Quantization Matrix Buffer"]
2649pub type VAIQMatrixBufferH264 = _VAIQMatrixBufferH264;
2650#[doc = " H.264 Slice Parameter Buffer"]
2651#[repr(C)]
2652#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
2653pub struct _VASliceParameterBufferH264 {
2654 pub slice_data_size: u32,
2655 #[doc = " \\brief Byte offset to the NAL Header Unit for this slice."]
2656 pub slice_data_offset: u32,
2657 pub slice_data_flag: u32,
2658 #[doc = " \\brief Bit offset from NAL Header Unit to the begining of slice_data().\n\n This bit offset is relative to and includes the NAL unit byte\n and represents the number of bits parsed in the slice_header()\n after the removal of any emulation prevention bytes in\n there. However, the slice data buffer passed to the hardware is\n the original bitstream, thus including any emulation prevention\n bytes."]
2659 pub slice_data_bit_offset: u16,
2660 pub first_mb_in_slice: u16,
2661 pub slice_type: u8,
2662 pub direct_spatial_mv_pred_flag: u8,
2663 #[doc = " H264/AVC syntax element\n\n if num_ref_idx_active_override_flag equals 0, host decoder should\n set its value to num_ref_idx_l0_default_active_minus1."]
2664 pub num_ref_idx_l0_active_minus1: u8,
2665 #[doc = " H264/AVC syntax element\n\n if num_ref_idx_active_override_flag equals 0, host decoder should\n set its value to num_ref_idx_l1_default_active_minus1."]
2666 pub num_ref_idx_l1_active_minus1: u8,
2667 pub cabac_init_idc: u8,
2668 pub slice_qp_delta: i8,
2669 pub disable_deblocking_filter_idc: u8,
2670 pub slice_alpha_c0_offset_div2: i8,
2671 pub slice_beta_offset_div2: i8,
2672 pub RefPicList0: [VAPictureH264; 32usize],
2673 pub RefPicList1: [VAPictureH264; 32usize],
2674 pub luma_log2_weight_denom: u8,
2675 pub chroma_log2_weight_denom: u8,
2676 pub luma_weight_l0_flag: u8,
2677 pub luma_weight_l0: [i16; 32usize],
2678 pub luma_offset_l0: [i16; 32usize],
2679 pub chroma_weight_l0_flag: u8,
2680 pub chroma_weight_l0: [[i16; 2usize]; 32usize],
2681 pub chroma_offset_l0: [[i16; 2usize]; 32usize],
2682 pub luma_weight_l1_flag: u8,
2683 pub luma_weight_l1: [i16; 32usize],
2684 pub luma_offset_l1: [i16; 32usize],
2685 pub chroma_weight_l1_flag: u8,
2686 pub chroma_weight_l1: [[i16; 2usize]; 32usize],
2687 pub chroma_offset_l1: [[i16; 2usize]; 32usize],
2688 #[doc = " \\brief Reserved bytes for future use, must be zero"]
2689 pub va_reserved: [u32; 4usize],
2690}
2691#[doc = " H.264 Slice Parameter Buffer"]
2692pub type VASliceParameterBufferH264 = _VASliceParameterBufferH264;
2693#[doc = " \\brief Coded buffer segment.\n\n #VACodedBufferSegment is an element of a linked list describing\n some information on the coded buffer. The coded buffer segment\n could contain either a single NAL unit, or more than one NAL unit.\n It is recommended (but not required) to return a single NAL unit\n in a coded buffer segment, and the implementation should set the\n VA_CODED_BUF_STATUS_SINGLE_NALU status flag if that is the case."]
2694#[repr(C)]
2695#[derive(Debug, Copy, Clone, PartialEq, Eq)]
2696pub struct _VACodedBufferSegment {
2697 #[doc = " \\brief Size of the data buffer in this segment (in bytes)."]
2698 pub size: u32,
2699 #[doc = " \\brief Bit offset into the data buffer where the video data starts."]
2700 pub bit_offset: u32,
2701 #[doc = " \\brief Status set by the driver. See \\c VA_CODED_BUF_STATUS_*."]
2702 pub status: u32,
2703 #[doc = " \\brief Reserved for future use."]
2704 pub reserved: u32,
2705 #[doc = " \\brief Pointer to the start of the data buffer."]
2706 pub buf: *mut ::std::os::raw::c_void,
2707 #[doc = " \\brief Pointer to the next #VACodedBufferSegment element,\n or \\c NULL if there is none."]
2708 pub next: *mut ::std::os::raw::c_void,
2709 #[doc = " \\brief Reserved bytes for future use, must be zero"]
2710 pub va_reserved: [u32; 4usize],
2711}
2712impl Default for _VACodedBufferSegment {
2713 fn default() -> Self {
2714 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2715 unsafe {
2716 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2717 s.assume_init()
2718 }
2719 }
2720}
2721#[doc = " \\brief Coded buffer segment.\n\n #VACodedBufferSegment is an element of a linked list describing\n some information on the coded buffer. The coded buffer segment\n could contain either a single NAL unit, or more than one NAL unit.\n It is recommended (but not required) to return a single NAL unit\n in a coded buffer segment, and the implementation should set the\n VA_CODED_BUF_STATUS_SINGLE_NALU status flag if that is the case."]
2722pub type VACodedBufferSegment = _VACodedBufferSegment;
2723pub mod VASurfaceStatus {
2724 pub type Type = ::std::os::raw::c_uint;
2725 pub const VASurfaceRendering: Type = 1;
2726 pub const VASurfaceDisplaying: Type = 2;
2727 pub const VASurfaceReady: Type = 4;
2728 pub const VASurfaceSkipped: Type = 8;
2729}
2730pub mod VADecodeErrorType {
2731 pub type Type = ::std::os::raw::c_uint;
2732 pub const VADecodeSliceMissing: Type = 0;
2733 pub const VADecodeMBError: Type = 1;
2734 pub const VADecodeReset: Type = 2;
2735}
2736#[doc = " Client calls vaQuerySurfaceError with VA_STATUS_ERROR_DECODING_ERROR, server side returns\n an array of structure VASurfaceDecodeMBErrors, and the array is terminated by setting status=-1"]
2737#[repr(C)]
2738#[derive(Debug, Copy, Clone, PartialEq, Eq)]
2739pub struct _VASurfaceDecodeMBErrors {
2740 pub status: i32,
2741 pub start_mb: u32,
2742 pub end_mb: u32,
2743 pub decode_error_type: VADecodeErrorType::Type,
2744 pub num_mb: u32,
2745 #[doc = " \\brief Reserved bytes for future use, must be zero"]
2746 pub va_reserved: [u32; 3usize],
2747}
2748impl Default for _VASurfaceDecodeMBErrors {
2749 fn default() -> Self {
2750 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
2751 unsafe {
2752 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
2753 s.assume_init()
2754 }
2755 }
2756}
2757#[doc = " Client calls vaQuerySurfaceError with VA_STATUS_ERROR_DECODING_ERROR, server side returns\n an array of structure VASurfaceDecodeMBErrors, and the array is terminated by setting status=-1"]
2758pub type VASurfaceDecodeMBErrors = _VASurfaceDecodeMBErrors;
2759#[repr(C)]
2760#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
2761pub struct _VAImageFormat {
2762 pub fourcc: u32,
2763 pub byte_order: u32,
2764 pub bits_per_pixel: u32,
2765 pub depth: u32,
2766 pub red_mask: u32,
2767 pub green_mask: u32,
2768 pub blue_mask: u32,
2769 pub alpha_mask: u32,
2770 #[doc = " \\brief Reserved bytes for future use, must be zero"]
2771 pub va_reserved: [u32; 4usize],
2772}
2773pub type VAImageFormat = _VAImageFormat;
2774pub type VAImageID = VAGenericID;
2775#[repr(C)]
2776#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
2777pub struct _VAImage {
2778 pub image_id: VAImageID,
2779 pub format: VAImageFormat,
2780 pub buf: VABufferID,
2781 pub width: u16,
2782 pub height: u16,
2783 pub data_size: u32,
2784 pub num_planes: u32,
2785 pub pitches: [u32; 3usize],
2786 pub offsets: [u32; 3usize],
2787 pub num_palette_entries: i32,
2788 pub entry_bytes: i32,
2789 pub component_order: [i8; 4usize],
2790 #[doc = " \\brief Reserved bytes for future use, must be zero"]
2791 pub va_reserved: [u32; 4usize],
2792}
2793pub type VAImage = _VAImage;
2794#[doc = " HEVC data structures\n/\n/**\n \\brief Description of picture properties of those in DPB surfaces.\n\n If only progressive scan is supported, each surface contains one whole\n frame picture.\n Otherwise, each surface contains two fields of whole picture.\n In this case, two entries of ReferenceFrames[] may share same picture_id\n value."]
2795#[repr(C)]
2796#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
2797pub struct _VAPictureHEVC {
2798 #[doc = " \\brief reconstructed picture buffer surface index\n invalid when taking value VA_INVALID_SURFACE."]
2799 pub picture_id: VASurfaceID,
2800 #[doc = " \\brief picture order count.\n in HEVC, POCs for top and bottom fields of same picture should\n take different values."]
2801 pub pic_order_cnt: i32,
2802 pub flags: u32,
2803 #[doc = " \\brief Reserved bytes for future use, must be zero"]
2804 pub va_reserved: [u32; 4usize],
2805}
2806#[doc = " HEVC data structures\n/\n/**\n \\brief Description of picture properties of those in DPB surfaces.\n\n If only progressive scan is supported, each surface contains one whole\n frame picture.\n Otherwise, each surface contains two fields of whole picture.\n In this case, two entries of ReferenceFrames[] may share same picture_id\n value."]
2807pub type VAPictureHEVC = _VAPictureHEVC;
2808#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters and should be sent once\n per frame.\n"]
2809#[repr(C)]
2810#[derive(Copy, Clone)]
2811pub struct _VAPictureParameterBufferHEVC {
2812 #[doc = " \\brief buffer description of decoded current picture\n only VA_PICTURE_HEVC_FIELD_PIC and VA_PICTURE_HEVC_BOTTOM_FIELD\n of \"flags\" fields are meaningful."]
2813 pub CurrPic: VAPictureHEVC,
2814 #[doc = " \\brief buffer description of reference frames in DPB"]
2815 pub ReferenceFrames: [VAPictureHEVC; 15usize],
2816 #[doc = " \\brief picture width, shall be integer multiple of minimum CB size."]
2817 pub pic_width_in_luma_samples: u16,
2818 #[doc = " \\brief picture height, shall be integer multiple of minimum CB size."]
2819 pub pic_height_in_luma_samples: u16,
2820 pub pic_fields: _VAPictureParameterBufferHEVC__bindgen_ty_1,
2821 #[doc = " following parameters have same syntax with those in HEVC spec */\n/** \\brief DPB size for current temporal layer"]
2822 pub sps_max_dec_pic_buffering_minus1: u8,
2823 pub bit_depth_luma_minus8: u8,
2824 pub bit_depth_chroma_minus8: u8,
2825 pub pcm_sample_bit_depth_luma_minus1: u8,
2826 pub pcm_sample_bit_depth_chroma_minus1: u8,
2827 pub log2_min_luma_coding_block_size_minus3: u8,
2828 pub log2_diff_max_min_luma_coding_block_size: u8,
2829 pub log2_min_transform_block_size_minus2: u8,
2830 pub log2_diff_max_min_transform_block_size: u8,
2831 pub log2_min_pcm_luma_coding_block_size_minus3: u8,
2832 pub log2_diff_max_min_pcm_luma_coding_block_size: u8,
2833 pub max_transform_hierarchy_depth_intra: u8,
2834 pub max_transform_hierarchy_depth_inter: u8,
2835 pub init_qp_minus26: i8,
2836 pub diff_cu_qp_delta_depth: u8,
2837 pub pps_cb_qp_offset: i8,
2838 pub pps_cr_qp_offset: i8,
2839 pub log2_parallel_merge_level_minus2: u8,
2840 pub num_tile_columns_minus1: u8,
2841 pub num_tile_rows_minus1: u8,
2842 #[doc = " when uniform_spacing_flag equals 1, application should populate\n column_width_minus[], and row_height_minus1[] with approperiate values."]
2843 pub column_width_minus1: [u16; 19usize],
2844 pub row_height_minus1: [u16; 21usize],
2845 pub slice_parsing_fields: _VAPictureParameterBufferHEVC__bindgen_ty_2,
2846 #[doc = " following parameters have same syntax with those in HEVC spec"]
2847 pub log2_max_pic_order_cnt_lsb_minus4: u8,
2848 pub num_short_term_ref_pic_sets: u8,
2849 pub num_long_term_ref_pic_sps: u8,
2850 pub num_ref_idx_l0_default_active_minus1: u8,
2851 pub num_ref_idx_l1_default_active_minus1: u8,
2852 pub pps_beta_offset_div2: i8,
2853 pub pps_tc_offset_div2: i8,
2854 pub num_extra_slice_header_bits: u8,
2855 #[doc = " \\brief number of bits that structure\n short_term_ref_pic_set( num_short_term_ref_pic_sets ) takes in slice\n segment header when short_term_ref_pic_set_sps_flag equals 0.\n if short_term_ref_pic_set_sps_flag equals 1, the value should be 0.\n the bit count is calculated after emulation prevention bytes are removed\n from bit streams.\n This variable is used for accelorater to skip parsing the\n short_term_ref_pic_set( num_short_term_ref_pic_sets ) structure."]
2856 pub st_rps_bits: u32,
2857 #[doc = " \\brief Reserved bytes for future use, must be zero"]
2858 pub va_reserved: [u32; 8usize],
2859}
2860#[repr(C)]
2861#[derive(Copy, Clone)]
2862pub union _VAPictureParameterBufferHEVC__bindgen_ty_1 {
2863 pub bits: _VAPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1,
2864 pub value: u32,
2865}
2866#[repr(C)]
2867#[repr(align(4))]
2868#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
2869pub struct _VAPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
2870 pub _bitfield_align_1: [u16; 0],
2871 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
2872}
2873impl _VAPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
2874 #[inline]
2875 pub fn chroma_format_idc(&self) -> u32 {
2876 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
2877 }
2878 #[inline]
2879 pub fn set_chroma_format_idc(&mut self, val: u32) {
2880 unsafe {
2881 let val: u32 = ::std::mem::transmute(val);
2882 self._bitfield_1.set(0usize, 2u8, val as u64)
2883 }
2884 }
2885 #[inline]
2886 pub unsafe fn chroma_format_idc_raw(this: *const Self) -> u32 {
2887 unsafe {
2888 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
2889 ::std::ptr::addr_of!((*this)._bitfield_1),
2890 0usize,
2891 2u8,
2892 ) as u32)
2893 }
2894 }
2895 #[inline]
2896 pub unsafe fn set_chroma_format_idc_raw(this: *mut Self, val: u32) {
2897 unsafe {
2898 let val: u32 = ::std::mem::transmute(val);
2899 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
2900 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2901 0usize,
2902 2u8,
2903 val as u64,
2904 )
2905 }
2906 }
2907 #[inline]
2908 pub fn separate_colour_plane_flag(&self) -> u32 {
2909 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
2910 }
2911 #[inline]
2912 pub fn set_separate_colour_plane_flag(&mut self, val: u32) {
2913 unsafe {
2914 let val: u32 = ::std::mem::transmute(val);
2915 self._bitfield_1.set(2usize, 1u8, val as u64)
2916 }
2917 }
2918 #[inline]
2919 pub unsafe fn separate_colour_plane_flag_raw(this: *const Self) -> u32 {
2920 unsafe {
2921 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
2922 ::std::ptr::addr_of!((*this)._bitfield_1),
2923 2usize,
2924 1u8,
2925 ) as u32)
2926 }
2927 }
2928 #[inline]
2929 pub unsafe fn set_separate_colour_plane_flag_raw(this: *mut Self, val: u32) {
2930 unsafe {
2931 let val: u32 = ::std::mem::transmute(val);
2932 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
2933 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2934 2usize,
2935 1u8,
2936 val as u64,
2937 )
2938 }
2939 }
2940 #[inline]
2941 pub fn pcm_enabled_flag(&self) -> u32 {
2942 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
2943 }
2944 #[inline]
2945 pub fn set_pcm_enabled_flag(&mut self, val: u32) {
2946 unsafe {
2947 let val: u32 = ::std::mem::transmute(val);
2948 self._bitfield_1.set(3usize, 1u8, val as u64)
2949 }
2950 }
2951 #[inline]
2952 pub unsafe fn pcm_enabled_flag_raw(this: *const Self) -> u32 {
2953 unsafe {
2954 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
2955 ::std::ptr::addr_of!((*this)._bitfield_1),
2956 3usize,
2957 1u8,
2958 ) as u32)
2959 }
2960 }
2961 #[inline]
2962 pub unsafe fn set_pcm_enabled_flag_raw(this: *mut Self, val: u32) {
2963 unsafe {
2964 let val: u32 = ::std::mem::transmute(val);
2965 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
2966 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
2967 3usize,
2968 1u8,
2969 val as u64,
2970 )
2971 }
2972 }
2973 #[inline]
2974 pub fn scaling_list_enabled_flag(&self) -> u32 {
2975 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
2976 }
2977 #[inline]
2978 pub fn set_scaling_list_enabled_flag(&mut self, val: u32) {
2979 unsafe {
2980 let val: u32 = ::std::mem::transmute(val);
2981 self._bitfield_1.set(4usize, 1u8, val as u64)
2982 }
2983 }
2984 #[inline]
2985 pub unsafe fn scaling_list_enabled_flag_raw(this: *const Self) -> u32 {
2986 unsafe {
2987 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
2988 ::std::ptr::addr_of!((*this)._bitfield_1),
2989 4usize,
2990 1u8,
2991 ) as u32)
2992 }
2993 }
2994 #[inline]
2995 pub unsafe fn set_scaling_list_enabled_flag_raw(this: *mut Self, val: u32) {
2996 unsafe {
2997 let val: u32 = ::std::mem::transmute(val);
2998 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
2999 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3000 4usize,
3001 1u8,
3002 val as u64,
3003 )
3004 }
3005 }
3006 #[inline]
3007 pub fn transform_skip_enabled_flag(&self) -> u32 {
3008 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
3009 }
3010 #[inline]
3011 pub fn set_transform_skip_enabled_flag(&mut self, val: u32) {
3012 unsafe {
3013 let val: u32 = ::std::mem::transmute(val);
3014 self._bitfield_1.set(5usize, 1u8, val as u64)
3015 }
3016 }
3017 #[inline]
3018 pub unsafe fn transform_skip_enabled_flag_raw(this: *const Self) -> u32 {
3019 unsafe {
3020 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3021 ::std::ptr::addr_of!((*this)._bitfield_1),
3022 5usize,
3023 1u8,
3024 ) as u32)
3025 }
3026 }
3027 #[inline]
3028 pub unsafe fn set_transform_skip_enabled_flag_raw(this: *mut Self, val: u32) {
3029 unsafe {
3030 let val: u32 = ::std::mem::transmute(val);
3031 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3032 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3033 5usize,
3034 1u8,
3035 val as u64,
3036 )
3037 }
3038 }
3039 #[inline]
3040 pub fn amp_enabled_flag(&self) -> u32 {
3041 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
3042 }
3043 #[inline]
3044 pub fn set_amp_enabled_flag(&mut self, val: u32) {
3045 unsafe {
3046 let val: u32 = ::std::mem::transmute(val);
3047 self._bitfield_1.set(6usize, 1u8, val as u64)
3048 }
3049 }
3050 #[inline]
3051 pub unsafe fn amp_enabled_flag_raw(this: *const Self) -> u32 {
3052 unsafe {
3053 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3054 ::std::ptr::addr_of!((*this)._bitfield_1),
3055 6usize,
3056 1u8,
3057 ) as u32)
3058 }
3059 }
3060 #[inline]
3061 pub unsafe fn set_amp_enabled_flag_raw(this: *mut Self, val: u32) {
3062 unsafe {
3063 let val: u32 = ::std::mem::transmute(val);
3064 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3065 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3066 6usize,
3067 1u8,
3068 val as u64,
3069 )
3070 }
3071 }
3072 #[inline]
3073 pub fn strong_intra_smoothing_enabled_flag(&self) -> u32 {
3074 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
3075 }
3076 #[inline]
3077 pub fn set_strong_intra_smoothing_enabled_flag(&mut self, val: u32) {
3078 unsafe {
3079 let val: u32 = ::std::mem::transmute(val);
3080 self._bitfield_1.set(7usize, 1u8, val as u64)
3081 }
3082 }
3083 #[inline]
3084 pub unsafe fn strong_intra_smoothing_enabled_flag_raw(this: *const Self) -> u32 {
3085 unsafe {
3086 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3087 ::std::ptr::addr_of!((*this)._bitfield_1),
3088 7usize,
3089 1u8,
3090 ) as u32)
3091 }
3092 }
3093 #[inline]
3094 pub unsafe fn set_strong_intra_smoothing_enabled_flag_raw(this: *mut Self, val: u32) {
3095 unsafe {
3096 let val: u32 = ::std::mem::transmute(val);
3097 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3098 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3099 7usize,
3100 1u8,
3101 val as u64,
3102 )
3103 }
3104 }
3105 #[inline]
3106 pub fn sign_data_hiding_enabled_flag(&self) -> u32 {
3107 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
3108 }
3109 #[inline]
3110 pub fn set_sign_data_hiding_enabled_flag(&mut self, val: u32) {
3111 unsafe {
3112 let val: u32 = ::std::mem::transmute(val);
3113 self._bitfield_1.set(8usize, 1u8, val as u64)
3114 }
3115 }
3116 #[inline]
3117 pub unsafe fn sign_data_hiding_enabled_flag_raw(this: *const Self) -> u32 {
3118 unsafe {
3119 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3120 ::std::ptr::addr_of!((*this)._bitfield_1),
3121 8usize,
3122 1u8,
3123 ) as u32)
3124 }
3125 }
3126 #[inline]
3127 pub unsafe fn set_sign_data_hiding_enabled_flag_raw(this: *mut Self, val: u32) {
3128 unsafe {
3129 let val: u32 = ::std::mem::transmute(val);
3130 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3131 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3132 8usize,
3133 1u8,
3134 val as u64,
3135 )
3136 }
3137 }
3138 #[inline]
3139 pub fn constrained_intra_pred_flag(&self) -> u32 {
3140 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
3141 }
3142 #[inline]
3143 pub fn set_constrained_intra_pred_flag(&mut self, val: u32) {
3144 unsafe {
3145 let val: u32 = ::std::mem::transmute(val);
3146 self._bitfield_1.set(9usize, 1u8, val as u64)
3147 }
3148 }
3149 #[inline]
3150 pub unsafe fn constrained_intra_pred_flag_raw(this: *const Self) -> u32 {
3151 unsafe {
3152 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3153 ::std::ptr::addr_of!((*this)._bitfield_1),
3154 9usize,
3155 1u8,
3156 ) as u32)
3157 }
3158 }
3159 #[inline]
3160 pub unsafe fn set_constrained_intra_pred_flag_raw(this: *mut Self, val: u32) {
3161 unsafe {
3162 let val: u32 = ::std::mem::transmute(val);
3163 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3164 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3165 9usize,
3166 1u8,
3167 val as u64,
3168 )
3169 }
3170 }
3171 #[inline]
3172 pub fn cu_qp_delta_enabled_flag(&self) -> u32 {
3173 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
3174 }
3175 #[inline]
3176 pub fn set_cu_qp_delta_enabled_flag(&mut self, val: u32) {
3177 unsafe {
3178 let val: u32 = ::std::mem::transmute(val);
3179 self._bitfield_1.set(10usize, 1u8, val as u64)
3180 }
3181 }
3182 #[inline]
3183 pub unsafe fn cu_qp_delta_enabled_flag_raw(this: *const Self) -> u32 {
3184 unsafe {
3185 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3186 ::std::ptr::addr_of!((*this)._bitfield_1),
3187 10usize,
3188 1u8,
3189 ) as u32)
3190 }
3191 }
3192 #[inline]
3193 pub unsafe fn set_cu_qp_delta_enabled_flag_raw(this: *mut Self, val: u32) {
3194 unsafe {
3195 let val: u32 = ::std::mem::transmute(val);
3196 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3197 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3198 10usize,
3199 1u8,
3200 val as u64,
3201 )
3202 }
3203 }
3204 #[inline]
3205 pub fn weighted_pred_flag(&self) -> u32 {
3206 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
3207 }
3208 #[inline]
3209 pub fn set_weighted_pred_flag(&mut self, val: u32) {
3210 unsafe {
3211 let val: u32 = ::std::mem::transmute(val);
3212 self._bitfield_1.set(11usize, 1u8, val as u64)
3213 }
3214 }
3215 #[inline]
3216 pub unsafe fn weighted_pred_flag_raw(this: *const Self) -> u32 {
3217 unsafe {
3218 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3219 ::std::ptr::addr_of!((*this)._bitfield_1),
3220 11usize,
3221 1u8,
3222 ) as u32)
3223 }
3224 }
3225 #[inline]
3226 pub unsafe fn set_weighted_pred_flag_raw(this: *mut Self, val: u32) {
3227 unsafe {
3228 let val: u32 = ::std::mem::transmute(val);
3229 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3230 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3231 11usize,
3232 1u8,
3233 val as u64,
3234 )
3235 }
3236 }
3237 #[inline]
3238 pub fn weighted_bipred_flag(&self) -> u32 {
3239 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
3240 }
3241 #[inline]
3242 pub fn set_weighted_bipred_flag(&mut self, val: u32) {
3243 unsafe {
3244 let val: u32 = ::std::mem::transmute(val);
3245 self._bitfield_1.set(12usize, 1u8, val as u64)
3246 }
3247 }
3248 #[inline]
3249 pub unsafe fn weighted_bipred_flag_raw(this: *const Self) -> u32 {
3250 unsafe {
3251 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3252 ::std::ptr::addr_of!((*this)._bitfield_1),
3253 12usize,
3254 1u8,
3255 ) as u32)
3256 }
3257 }
3258 #[inline]
3259 pub unsafe fn set_weighted_bipred_flag_raw(this: *mut Self, val: u32) {
3260 unsafe {
3261 let val: u32 = ::std::mem::transmute(val);
3262 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3263 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3264 12usize,
3265 1u8,
3266 val as u64,
3267 )
3268 }
3269 }
3270 #[inline]
3271 pub fn transquant_bypass_enabled_flag(&self) -> u32 {
3272 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
3273 }
3274 #[inline]
3275 pub fn set_transquant_bypass_enabled_flag(&mut self, val: u32) {
3276 unsafe {
3277 let val: u32 = ::std::mem::transmute(val);
3278 self._bitfield_1.set(13usize, 1u8, val as u64)
3279 }
3280 }
3281 #[inline]
3282 pub unsafe fn transquant_bypass_enabled_flag_raw(this: *const Self) -> u32 {
3283 unsafe {
3284 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3285 ::std::ptr::addr_of!((*this)._bitfield_1),
3286 13usize,
3287 1u8,
3288 ) as u32)
3289 }
3290 }
3291 #[inline]
3292 pub unsafe fn set_transquant_bypass_enabled_flag_raw(this: *mut Self, val: u32) {
3293 unsafe {
3294 let val: u32 = ::std::mem::transmute(val);
3295 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3296 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3297 13usize,
3298 1u8,
3299 val as u64,
3300 )
3301 }
3302 }
3303 #[inline]
3304 pub fn tiles_enabled_flag(&self) -> u32 {
3305 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
3306 }
3307 #[inline]
3308 pub fn set_tiles_enabled_flag(&mut self, val: u32) {
3309 unsafe {
3310 let val: u32 = ::std::mem::transmute(val);
3311 self._bitfield_1.set(14usize, 1u8, val as u64)
3312 }
3313 }
3314 #[inline]
3315 pub unsafe fn tiles_enabled_flag_raw(this: *const Self) -> u32 {
3316 unsafe {
3317 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3318 ::std::ptr::addr_of!((*this)._bitfield_1),
3319 14usize,
3320 1u8,
3321 ) as u32)
3322 }
3323 }
3324 #[inline]
3325 pub unsafe fn set_tiles_enabled_flag_raw(this: *mut Self, val: u32) {
3326 unsafe {
3327 let val: u32 = ::std::mem::transmute(val);
3328 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3329 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3330 14usize,
3331 1u8,
3332 val as u64,
3333 )
3334 }
3335 }
3336 #[inline]
3337 pub fn entropy_coding_sync_enabled_flag(&self) -> u32 {
3338 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
3339 }
3340 #[inline]
3341 pub fn set_entropy_coding_sync_enabled_flag(&mut self, val: u32) {
3342 unsafe {
3343 let val: u32 = ::std::mem::transmute(val);
3344 self._bitfield_1.set(15usize, 1u8, val as u64)
3345 }
3346 }
3347 #[inline]
3348 pub unsafe fn entropy_coding_sync_enabled_flag_raw(this: *const Self) -> u32 {
3349 unsafe {
3350 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3351 ::std::ptr::addr_of!((*this)._bitfield_1),
3352 15usize,
3353 1u8,
3354 ) as u32)
3355 }
3356 }
3357 #[inline]
3358 pub unsafe fn set_entropy_coding_sync_enabled_flag_raw(this: *mut Self, val: u32) {
3359 unsafe {
3360 let val: u32 = ::std::mem::transmute(val);
3361 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3362 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3363 15usize,
3364 1u8,
3365 val as u64,
3366 )
3367 }
3368 }
3369 #[inline]
3370 pub fn pps_loop_filter_across_slices_enabled_flag(&self) -> u32 {
3371 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
3372 }
3373 #[inline]
3374 pub fn set_pps_loop_filter_across_slices_enabled_flag(&mut self, val: u32) {
3375 unsafe {
3376 let val: u32 = ::std::mem::transmute(val);
3377 self._bitfield_1.set(16usize, 1u8, val as u64)
3378 }
3379 }
3380 #[inline]
3381 pub unsafe fn pps_loop_filter_across_slices_enabled_flag_raw(this: *const Self) -> u32 {
3382 unsafe {
3383 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3384 ::std::ptr::addr_of!((*this)._bitfield_1),
3385 16usize,
3386 1u8,
3387 ) as u32)
3388 }
3389 }
3390 #[inline]
3391 pub unsafe fn set_pps_loop_filter_across_slices_enabled_flag_raw(this: *mut Self, val: u32) {
3392 unsafe {
3393 let val: u32 = ::std::mem::transmute(val);
3394 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3395 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3396 16usize,
3397 1u8,
3398 val as u64,
3399 )
3400 }
3401 }
3402 #[inline]
3403 pub fn loop_filter_across_tiles_enabled_flag(&self) -> u32 {
3404 unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) }
3405 }
3406 #[inline]
3407 pub fn set_loop_filter_across_tiles_enabled_flag(&mut self, val: u32) {
3408 unsafe {
3409 let val: u32 = ::std::mem::transmute(val);
3410 self._bitfield_1.set(17usize, 1u8, val as u64)
3411 }
3412 }
3413 #[inline]
3414 pub unsafe fn loop_filter_across_tiles_enabled_flag_raw(this: *const Self) -> u32 {
3415 unsafe {
3416 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3417 ::std::ptr::addr_of!((*this)._bitfield_1),
3418 17usize,
3419 1u8,
3420 ) as u32)
3421 }
3422 }
3423 #[inline]
3424 pub unsafe fn set_loop_filter_across_tiles_enabled_flag_raw(this: *mut Self, val: u32) {
3425 unsafe {
3426 let val: u32 = ::std::mem::transmute(val);
3427 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3428 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3429 17usize,
3430 1u8,
3431 val as u64,
3432 )
3433 }
3434 }
3435 #[inline]
3436 pub fn pcm_loop_filter_disabled_flag(&self) -> u32 {
3437 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) }
3438 }
3439 #[inline]
3440 pub fn set_pcm_loop_filter_disabled_flag(&mut self, val: u32) {
3441 unsafe {
3442 let val: u32 = ::std::mem::transmute(val);
3443 self._bitfield_1.set(18usize, 1u8, val as u64)
3444 }
3445 }
3446 #[inline]
3447 pub unsafe fn pcm_loop_filter_disabled_flag_raw(this: *const Self) -> u32 {
3448 unsafe {
3449 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3450 ::std::ptr::addr_of!((*this)._bitfield_1),
3451 18usize,
3452 1u8,
3453 ) as u32)
3454 }
3455 }
3456 #[inline]
3457 pub unsafe fn set_pcm_loop_filter_disabled_flag_raw(this: *mut Self, val: u32) {
3458 unsafe {
3459 let val: u32 = ::std::mem::transmute(val);
3460 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3461 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3462 18usize,
3463 1u8,
3464 val as u64,
3465 )
3466 }
3467 }
3468 #[inline]
3469 pub fn NoPicReorderingFlag(&self) -> u32 {
3470 unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) }
3471 }
3472 #[inline]
3473 pub fn set_NoPicReorderingFlag(&mut self, val: u32) {
3474 unsafe {
3475 let val: u32 = ::std::mem::transmute(val);
3476 self._bitfield_1.set(19usize, 1u8, val as u64)
3477 }
3478 }
3479 #[inline]
3480 pub unsafe fn NoPicReorderingFlag_raw(this: *const Self) -> u32 {
3481 unsafe {
3482 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3483 ::std::ptr::addr_of!((*this)._bitfield_1),
3484 19usize,
3485 1u8,
3486 ) as u32)
3487 }
3488 }
3489 #[inline]
3490 pub unsafe fn set_NoPicReorderingFlag_raw(this: *mut Self, val: u32) {
3491 unsafe {
3492 let val: u32 = ::std::mem::transmute(val);
3493 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3494 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3495 19usize,
3496 1u8,
3497 val as u64,
3498 )
3499 }
3500 }
3501 #[inline]
3502 pub fn NoBiPredFlag(&self) -> u32 {
3503 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) }
3504 }
3505 #[inline]
3506 pub fn set_NoBiPredFlag(&mut self, val: u32) {
3507 unsafe {
3508 let val: u32 = ::std::mem::transmute(val);
3509 self._bitfield_1.set(20usize, 1u8, val as u64)
3510 }
3511 }
3512 #[inline]
3513 pub unsafe fn NoBiPredFlag_raw(this: *const Self) -> u32 {
3514 unsafe {
3515 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3516 ::std::ptr::addr_of!((*this)._bitfield_1),
3517 20usize,
3518 1u8,
3519 ) as u32)
3520 }
3521 }
3522 #[inline]
3523 pub unsafe fn set_NoBiPredFlag_raw(this: *mut Self, val: u32) {
3524 unsafe {
3525 let val: u32 = ::std::mem::transmute(val);
3526 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3527 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3528 20usize,
3529 1u8,
3530 val as u64,
3531 )
3532 }
3533 }
3534 #[inline]
3535 pub fn ReservedBits(&self) -> u32 {
3536 unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 11u8) as u32) }
3537 }
3538 #[inline]
3539 pub fn set_ReservedBits(&mut self, val: u32) {
3540 unsafe {
3541 let val: u32 = ::std::mem::transmute(val);
3542 self._bitfield_1.set(21usize, 11u8, val as u64)
3543 }
3544 }
3545 #[inline]
3546 pub unsafe fn ReservedBits_raw(this: *const Self) -> u32 {
3547 unsafe {
3548 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3549 ::std::ptr::addr_of!((*this)._bitfield_1),
3550 21usize,
3551 11u8,
3552 ) as u32)
3553 }
3554 }
3555 #[inline]
3556 pub unsafe fn set_ReservedBits_raw(this: *mut Self, val: u32) {
3557 unsafe {
3558 let val: u32 = ::std::mem::transmute(val);
3559 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3560 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3561 21usize,
3562 11u8,
3563 val as u64,
3564 )
3565 }
3566 }
3567 #[inline]
3568 pub fn new_bitfield_1(
3569 chroma_format_idc: u32,
3570 separate_colour_plane_flag: u32,
3571 pcm_enabled_flag: u32,
3572 scaling_list_enabled_flag: u32,
3573 transform_skip_enabled_flag: u32,
3574 amp_enabled_flag: u32,
3575 strong_intra_smoothing_enabled_flag: u32,
3576 sign_data_hiding_enabled_flag: u32,
3577 constrained_intra_pred_flag: u32,
3578 cu_qp_delta_enabled_flag: u32,
3579 weighted_pred_flag: u32,
3580 weighted_bipred_flag: u32,
3581 transquant_bypass_enabled_flag: u32,
3582 tiles_enabled_flag: u32,
3583 entropy_coding_sync_enabled_flag: u32,
3584 pps_loop_filter_across_slices_enabled_flag: u32,
3585 loop_filter_across_tiles_enabled_flag: u32,
3586 pcm_loop_filter_disabled_flag: u32,
3587 NoPicReorderingFlag: u32,
3588 NoBiPredFlag: u32,
3589 ReservedBits: u32,
3590 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
3591 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
3592 __bindgen_bitfield_unit.set(0usize, 2u8, {
3593 let chroma_format_idc: u32 = unsafe { ::std::mem::transmute(chroma_format_idc) };
3594 chroma_format_idc as u64
3595 });
3596 __bindgen_bitfield_unit.set(2usize, 1u8, {
3597 let separate_colour_plane_flag: u32 = unsafe { ::std::mem::transmute(separate_colour_plane_flag) };
3598 separate_colour_plane_flag as u64
3599 });
3600 __bindgen_bitfield_unit.set(3usize, 1u8, {
3601 let pcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_enabled_flag) };
3602 pcm_enabled_flag as u64
3603 });
3604 __bindgen_bitfield_unit.set(4usize, 1u8, {
3605 let scaling_list_enabled_flag: u32 = unsafe { ::std::mem::transmute(scaling_list_enabled_flag) };
3606 scaling_list_enabled_flag as u64
3607 });
3608 __bindgen_bitfield_unit.set(5usize, 1u8, {
3609 let transform_skip_enabled_flag: u32 = unsafe { ::std::mem::transmute(transform_skip_enabled_flag) };
3610 transform_skip_enabled_flag as u64
3611 });
3612 __bindgen_bitfield_unit.set(6usize, 1u8, {
3613 let amp_enabled_flag: u32 = unsafe { ::std::mem::transmute(amp_enabled_flag) };
3614 amp_enabled_flag as u64
3615 });
3616 __bindgen_bitfield_unit.set(7usize, 1u8, {
3617 let strong_intra_smoothing_enabled_flag: u32 =
3618 unsafe { ::std::mem::transmute(strong_intra_smoothing_enabled_flag) };
3619 strong_intra_smoothing_enabled_flag as u64
3620 });
3621 __bindgen_bitfield_unit.set(8usize, 1u8, {
3622 let sign_data_hiding_enabled_flag: u32 = unsafe { ::std::mem::transmute(sign_data_hiding_enabled_flag) };
3623 sign_data_hiding_enabled_flag as u64
3624 });
3625 __bindgen_bitfield_unit.set(9usize, 1u8, {
3626 let constrained_intra_pred_flag: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred_flag) };
3627 constrained_intra_pred_flag as u64
3628 });
3629 __bindgen_bitfield_unit.set(10usize, 1u8, {
3630 let cu_qp_delta_enabled_flag: u32 = unsafe { ::std::mem::transmute(cu_qp_delta_enabled_flag) };
3631 cu_qp_delta_enabled_flag as u64
3632 });
3633 __bindgen_bitfield_unit.set(11usize, 1u8, {
3634 let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) };
3635 weighted_pred_flag as u64
3636 });
3637 __bindgen_bitfield_unit.set(12usize, 1u8, {
3638 let weighted_bipred_flag: u32 = unsafe { ::std::mem::transmute(weighted_bipred_flag) };
3639 weighted_bipred_flag as u64
3640 });
3641 __bindgen_bitfield_unit.set(13usize, 1u8, {
3642 let transquant_bypass_enabled_flag: u32 = unsafe { ::std::mem::transmute(transquant_bypass_enabled_flag) };
3643 transquant_bypass_enabled_flag as u64
3644 });
3645 __bindgen_bitfield_unit.set(14usize, 1u8, {
3646 let tiles_enabled_flag: u32 = unsafe { ::std::mem::transmute(tiles_enabled_flag) };
3647 tiles_enabled_flag as u64
3648 });
3649 __bindgen_bitfield_unit.set(15usize, 1u8, {
3650 let entropy_coding_sync_enabled_flag: u32 =
3651 unsafe { ::std::mem::transmute(entropy_coding_sync_enabled_flag) };
3652 entropy_coding_sync_enabled_flag as u64
3653 });
3654 __bindgen_bitfield_unit.set(16usize, 1u8, {
3655 let pps_loop_filter_across_slices_enabled_flag: u32 =
3656 unsafe { ::std::mem::transmute(pps_loop_filter_across_slices_enabled_flag) };
3657 pps_loop_filter_across_slices_enabled_flag as u64
3658 });
3659 __bindgen_bitfield_unit.set(17usize, 1u8, {
3660 let loop_filter_across_tiles_enabled_flag: u32 =
3661 unsafe { ::std::mem::transmute(loop_filter_across_tiles_enabled_flag) };
3662 loop_filter_across_tiles_enabled_flag as u64
3663 });
3664 __bindgen_bitfield_unit.set(18usize, 1u8, {
3665 let pcm_loop_filter_disabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_loop_filter_disabled_flag) };
3666 pcm_loop_filter_disabled_flag as u64
3667 });
3668 __bindgen_bitfield_unit.set(19usize, 1u8, {
3669 let NoPicReorderingFlag: u32 = unsafe { ::std::mem::transmute(NoPicReorderingFlag) };
3670 NoPicReorderingFlag as u64
3671 });
3672 __bindgen_bitfield_unit.set(20usize, 1u8, {
3673 let NoBiPredFlag: u32 = unsafe { ::std::mem::transmute(NoBiPredFlag) };
3674 NoBiPredFlag as u64
3675 });
3676 __bindgen_bitfield_unit.set(21usize, 11u8, {
3677 let ReservedBits: u32 = unsafe { ::std::mem::transmute(ReservedBits) };
3678 ReservedBits as u64
3679 });
3680 __bindgen_bitfield_unit
3681 }
3682}
3683impl Default for _VAPictureParameterBufferHEVC__bindgen_ty_1 {
3684 fn default() -> Self {
3685 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
3686 unsafe {
3687 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
3688 s.assume_init()
3689 }
3690 }
3691}
3692#[doc = " \\brief Parameters needed for parsing slice segment headers"]
3693#[repr(C)]
3694#[derive(Copy, Clone)]
3695pub union _VAPictureParameterBufferHEVC__bindgen_ty_2 {
3696 pub bits: _VAPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1,
3697 pub value: u32,
3698}
3699#[repr(C)]
3700#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
3701pub struct _VAPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 {
3702 pub _bitfield_align_1: [u32; 0],
3703 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
3704}
3705impl _VAPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 {
3706 #[inline]
3707 pub fn lists_modification_present_flag(&self) -> u32 {
3708 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
3709 }
3710 #[inline]
3711 pub fn set_lists_modification_present_flag(&mut self, val: u32) {
3712 unsafe {
3713 let val: u32 = ::std::mem::transmute(val);
3714 self._bitfield_1.set(0usize, 1u8, val as u64)
3715 }
3716 }
3717 #[inline]
3718 pub unsafe fn lists_modification_present_flag_raw(this: *const Self) -> u32 {
3719 unsafe {
3720 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3721 ::std::ptr::addr_of!((*this)._bitfield_1),
3722 0usize,
3723 1u8,
3724 ) as u32)
3725 }
3726 }
3727 #[inline]
3728 pub unsafe fn set_lists_modification_present_flag_raw(this: *mut Self, val: u32) {
3729 unsafe {
3730 let val: u32 = ::std::mem::transmute(val);
3731 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3732 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3733 0usize,
3734 1u8,
3735 val as u64,
3736 )
3737 }
3738 }
3739 #[inline]
3740 pub fn long_term_ref_pics_present_flag(&self) -> u32 {
3741 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
3742 }
3743 #[inline]
3744 pub fn set_long_term_ref_pics_present_flag(&mut self, val: u32) {
3745 unsafe {
3746 let val: u32 = ::std::mem::transmute(val);
3747 self._bitfield_1.set(1usize, 1u8, val as u64)
3748 }
3749 }
3750 #[inline]
3751 pub unsafe fn long_term_ref_pics_present_flag_raw(this: *const Self) -> u32 {
3752 unsafe {
3753 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3754 ::std::ptr::addr_of!((*this)._bitfield_1),
3755 1usize,
3756 1u8,
3757 ) as u32)
3758 }
3759 }
3760 #[inline]
3761 pub unsafe fn set_long_term_ref_pics_present_flag_raw(this: *mut Self, val: u32) {
3762 unsafe {
3763 let val: u32 = ::std::mem::transmute(val);
3764 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3765 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3766 1usize,
3767 1u8,
3768 val as u64,
3769 )
3770 }
3771 }
3772 #[inline]
3773 pub fn sps_temporal_mvp_enabled_flag(&self) -> u32 {
3774 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
3775 }
3776 #[inline]
3777 pub fn set_sps_temporal_mvp_enabled_flag(&mut self, val: u32) {
3778 unsafe {
3779 let val: u32 = ::std::mem::transmute(val);
3780 self._bitfield_1.set(2usize, 1u8, val as u64)
3781 }
3782 }
3783 #[inline]
3784 pub unsafe fn sps_temporal_mvp_enabled_flag_raw(this: *const Self) -> u32 {
3785 unsafe {
3786 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3787 ::std::ptr::addr_of!((*this)._bitfield_1),
3788 2usize,
3789 1u8,
3790 ) as u32)
3791 }
3792 }
3793 #[inline]
3794 pub unsafe fn set_sps_temporal_mvp_enabled_flag_raw(this: *mut Self, val: u32) {
3795 unsafe {
3796 let val: u32 = ::std::mem::transmute(val);
3797 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3798 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3799 2usize,
3800 1u8,
3801 val as u64,
3802 )
3803 }
3804 }
3805 #[inline]
3806 pub fn cabac_init_present_flag(&self) -> u32 {
3807 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
3808 }
3809 #[inline]
3810 pub fn set_cabac_init_present_flag(&mut self, val: u32) {
3811 unsafe {
3812 let val: u32 = ::std::mem::transmute(val);
3813 self._bitfield_1.set(3usize, 1u8, val as u64)
3814 }
3815 }
3816 #[inline]
3817 pub unsafe fn cabac_init_present_flag_raw(this: *const Self) -> u32 {
3818 unsafe {
3819 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3820 ::std::ptr::addr_of!((*this)._bitfield_1),
3821 3usize,
3822 1u8,
3823 ) as u32)
3824 }
3825 }
3826 #[inline]
3827 pub unsafe fn set_cabac_init_present_flag_raw(this: *mut Self, val: u32) {
3828 unsafe {
3829 let val: u32 = ::std::mem::transmute(val);
3830 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3831 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3832 3usize,
3833 1u8,
3834 val as u64,
3835 )
3836 }
3837 }
3838 #[inline]
3839 pub fn output_flag_present_flag(&self) -> u32 {
3840 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
3841 }
3842 #[inline]
3843 pub fn set_output_flag_present_flag(&mut self, val: u32) {
3844 unsafe {
3845 let val: u32 = ::std::mem::transmute(val);
3846 self._bitfield_1.set(4usize, 1u8, val as u64)
3847 }
3848 }
3849 #[inline]
3850 pub unsafe fn output_flag_present_flag_raw(this: *const Self) -> u32 {
3851 unsafe {
3852 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3853 ::std::ptr::addr_of!((*this)._bitfield_1),
3854 4usize,
3855 1u8,
3856 ) as u32)
3857 }
3858 }
3859 #[inline]
3860 pub unsafe fn set_output_flag_present_flag_raw(this: *mut Self, val: u32) {
3861 unsafe {
3862 let val: u32 = ::std::mem::transmute(val);
3863 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3864 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3865 4usize,
3866 1u8,
3867 val as u64,
3868 )
3869 }
3870 }
3871 #[inline]
3872 pub fn dependent_slice_segments_enabled_flag(&self) -> u32 {
3873 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
3874 }
3875 #[inline]
3876 pub fn set_dependent_slice_segments_enabled_flag(&mut self, val: u32) {
3877 unsafe {
3878 let val: u32 = ::std::mem::transmute(val);
3879 self._bitfield_1.set(5usize, 1u8, val as u64)
3880 }
3881 }
3882 #[inline]
3883 pub unsafe fn dependent_slice_segments_enabled_flag_raw(this: *const Self) -> u32 {
3884 unsafe {
3885 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3886 ::std::ptr::addr_of!((*this)._bitfield_1),
3887 5usize,
3888 1u8,
3889 ) as u32)
3890 }
3891 }
3892 #[inline]
3893 pub unsafe fn set_dependent_slice_segments_enabled_flag_raw(this: *mut Self, val: u32) {
3894 unsafe {
3895 let val: u32 = ::std::mem::transmute(val);
3896 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3897 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3898 5usize,
3899 1u8,
3900 val as u64,
3901 )
3902 }
3903 }
3904 #[inline]
3905 pub fn pps_slice_chroma_qp_offsets_present_flag(&self) -> u32 {
3906 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
3907 }
3908 #[inline]
3909 pub fn set_pps_slice_chroma_qp_offsets_present_flag(&mut self, val: u32) {
3910 unsafe {
3911 let val: u32 = ::std::mem::transmute(val);
3912 self._bitfield_1.set(6usize, 1u8, val as u64)
3913 }
3914 }
3915 #[inline]
3916 pub unsafe fn pps_slice_chroma_qp_offsets_present_flag_raw(this: *const Self) -> u32 {
3917 unsafe {
3918 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3919 ::std::ptr::addr_of!((*this)._bitfield_1),
3920 6usize,
3921 1u8,
3922 ) as u32)
3923 }
3924 }
3925 #[inline]
3926 pub unsafe fn set_pps_slice_chroma_qp_offsets_present_flag_raw(this: *mut Self, val: u32) {
3927 unsafe {
3928 let val: u32 = ::std::mem::transmute(val);
3929 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3930 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3931 6usize,
3932 1u8,
3933 val as u64,
3934 )
3935 }
3936 }
3937 #[inline]
3938 pub fn sample_adaptive_offset_enabled_flag(&self) -> u32 {
3939 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
3940 }
3941 #[inline]
3942 pub fn set_sample_adaptive_offset_enabled_flag(&mut self, val: u32) {
3943 unsafe {
3944 let val: u32 = ::std::mem::transmute(val);
3945 self._bitfield_1.set(7usize, 1u8, val as u64)
3946 }
3947 }
3948 #[inline]
3949 pub unsafe fn sample_adaptive_offset_enabled_flag_raw(this: *const Self) -> u32 {
3950 unsafe {
3951 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3952 ::std::ptr::addr_of!((*this)._bitfield_1),
3953 7usize,
3954 1u8,
3955 ) as u32)
3956 }
3957 }
3958 #[inline]
3959 pub unsafe fn set_sample_adaptive_offset_enabled_flag_raw(this: *mut Self, val: u32) {
3960 unsafe {
3961 let val: u32 = ::std::mem::transmute(val);
3962 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3963 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3964 7usize,
3965 1u8,
3966 val as u64,
3967 )
3968 }
3969 }
3970 #[inline]
3971 pub fn deblocking_filter_override_enabled_flag(&self) -> u32 {
3972 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
3973 }
3974 #[inline]
3975 pub fn set_deblocking_filter_override_enabled_flag(&mut self, val: u32) {
3976 unsafe {
3977 let val: u32 = ::std::mem::transmute(val);
3978 self._bitfield_1.set(8usize, 1u8, val as u64)
3979 }
3980 }
3981 #[inline]
3982 pub unsafe fn deblocking_filter_override_enabled_flag_raw(this: *const Self) -> u32 {
3983 unsafe {
3984 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
3985 ::std::ptr::addr_of!((*this)._bitfield_1),
3986 8usize,
3987 1u8,
3988 ) as u32)
3989 }
3990 }
3991 #[inline]
3992 pub unsafe fn set_deblocking_filter_override_enabled_flag_raw(this: *mut Self, val: u32) {
3993 unsafe {
3994 let val: u32 = ::std::mem::transmute(val);
3995 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
3996 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
3997 8usize,
3998 1u8,
3999 val as u64,
4000 )
4001 }
4002 }
4003 #[inline]
4004 pub fn pps_disable_deblocking_filter_flag(&self) -> u32 {
4005 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
4006 }
4007 #[inline]
4008 pub fn set_pps_disable_deblocking_filter_flag(&mut self, val: u32) {
4009 unsafe {
4010 let val: u32 = ::std::mem::transmute(val);
4011 self._bitfield_1.set(9usize, 1u8, val as u64)
4012 }
4013 }
4014 #[inline]
4015 pub unsafe fn pps_disable_deblocking_filter_flag_raw(this: *const Self) -> u32 {
4016 unsafe {
4017 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4018 ::std::ptr::addr_of!((*this)._bitfield_1),
4019 9usize,
4020 1u8,
4021 ) as u32)
4022 }
4023 }
4024 #[inline]
4025 pub unsafe fn set_pps_disable_deblocking_filter_flag_raw(this: *mut Self, val: u32) {
4026 unsafe {
4027 let val: u32 = ::std::mem::transmute(val);
4028 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4029 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4030 9usize,
4031 1u8,
4032 val as u64,
4033 )
4034 }
4035 }
4036 #[inline]
4037 pub fn slice_segment_header_extension_present_flag(&self) -> u32 {
4038 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
4039 }
4040 #[inline]
4041 pub fn set_slice_segment_header_extension_present_flag(&mut self, val: u32) {
4042 unsafe {
4043 let val: u32 = ::std::mem::transmute(val);
4044 self._bitfield_1.set(10usize, 1u8, val as u64)
4045 }
4046 }
4047 #[inline]
4048 pub unsafe fn slice_segment_header_extension_present_flag_raw(this: *const Self) -> u32 {
4049 unsafe {
4050 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4051 ::std::ptr::addr_of!((*this)._bitfield_1),
4052 10usize,
4053 1u8,
4054 ) as u32)
4055 }
4056 }
4057 #[inline]
4058 pub unsafe fn set_slice_segment_header_extension_present_flag_raw(this: *mut Self, val: u32) {
4059 unsafe {
4060 let val: u32 = ::std::mem::transmute(val);
4061 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4062 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4063 10usize,
4064 1u8,
4065 val as u64,
4066 )
4067 }
4068 }
4069 #[inline]
4070 pub fn RapPicFlag(&self) -> u32 {
4071 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
4072 }
4073 #[inline]
4074 pub fn set_RapPicFlag(&mut self, val: u32) {
4075 unsafe {
4076 let val: u32 = ::std::mem::transmute(val);
4077 self._bitfield_1.set(11usize, 1u8, val as u64)
4078 }
4079 }
4080 #[inline]
4081 pub unsafe fn RapPicFlag_raw(this: *const Self) -> u32 {
4082 unsafe {
4083 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4084 ::std::ptr::addr_of!((*this)._bitfield_1),
4085 11usize,
4086 1u8,
4087 ) as u32)
4088 }
4089 }
4090 #[inline]
4091 pub unsafe fn set_RapPicFlag_raw(this: *mut Self, val: u32) {
4092 unsafe {
4093 let val: u32 = ::std::mem::transmute(val);
4094 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4095 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4096 11usize,
4097 1u8,
4098 val as u64,
4099 )
4100 }
4101 }
4102 #[inline]
4103 pub fn IdrPicFlag(&self) -> u32 {
4104 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
4105 }
4106 #[inline]
4107 pub fn set_IdrPicFlag(&mut self, val: u32) {
4108 unsafe {
4109 let val: u32 = ::std::mem::transmute(val);
4110 self._bitfield_1.set(12usize, 1u8, val as u64)
4111 }
4112 }
4113 #[inline]
4114 pub unsafe fn IdrPicFlag_raw(this: *const Self) -> u32 {
4115 unsafe {
4116 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4117 ::std::ptr::addr_of!((*this)._bitfield_1),
4118 12usize,
4119 1u8,
4120 ) as u32)
4121 }
4122 }
4123 #[inline]
4124 pub unsafe fn set_IdrPicFlag_raw(this: *mut Self, val: u32) {
4125 unsafe {
4126 let val: u32 = ::std::mem::transmute(val);
4127 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4128 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4129 12usize,
4130 1u8,
4131 val as u64,
4132 )
4133 }
4134 }
4135 #[inline]
4136 pub fn IntraPicFlag(&self) -> u32 {
4137 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
4138 }
4139 #[inline]
4140 pub fn set_IntraPicFlag(&mut self, val: u32) {
4141 unsafe {
4142 let val: u32 = ::std::mem::transmute(val);
4143 self._bitfield_1.set(13usize, 1u8, val as u64)
4144 }
4145 }
4146 #[inline]
4147 pub unsafe fn IntraPicFlag_raw(this: *const Self) -> u32 {
4148 unsafe {
4149 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4150 ::std::ptr::addr_of!((*this)._bitfield_1),
4151 13usize,
4152 1u8,
4153 ) as u32)
4154 }
4155 }
4156 #[inline]
4157 pub unsafe fn set_IntraPicFlag_raw(this: *mut Self, val: u32) {
4158 unsafe {
4159 let val: u32 = ::std::mem::transmute(val);
4160 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4161 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4162 13usize,
4163 1u8,
4164 val as u64,
4165 )
4166 }
4167 }
4168 #[inline]
4169 pub fn ReservedBits(&self) -> u32 {
4170 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) }
4171 }
4172 #[inline]
4173 pub fn set_ReservedBits(&mut self, val: u32) {
4174 unsafe {
4175 let val: u32 = ::std::mem::transmute(val);
4176 self._bitfield_1.set(14usize, 18u8, val as u64)
4177 }
4178 }
4179 #[inline]
4180 pub unsafe fn ReservedBits_raw(this: *const Self) -> u32 {
4181 unsafe {
4182 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4183 ::std::ptr::addr_of!((*this)._bitfield_1),
4184 14usize,
4185 18u8,
4186 ) as u32)
4187 }
4188 }
4189 #[inline]
4190 pub unsafe fn set_ReservedBits_raw(this: *mut Self, val: u32) {
4191 unsafe {
4192 let val: u32 = ::std::mem::transmute(val);
4193 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4194 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4195 14usize,
4196 18u8,
4197 val as u64,
4198 )
4199 }
4200 }
4201 #[inline]
4202 pub fn new_bitfield_1(
4203 lists_modification_present_flag: u32,
4204 long_term_ref_pics_present_flag: u32,
4205 sps_temporal_mvp_enabled_flag: u32,
4206 cabac_init_present_flag: u32,
4207 output_flag_present_flag: u32,
4208 dependent_slice_segments_enabled_flag: u32,
4209 pps_slice_chroma_qp_offsets_present_flag: u32,
4210 sample_adaptive_offset_enabled_flag: u32,
4211 deblocking_filter_override_enabled_flag: u32,
4212 pps_disable_deblocking_filter_flag: u32,
4213 slice_segment_header_extension_present_flag: u32,
4214 RapPicFlag: u32,
4215 IdrPicFlag: u32,
4216 IntraPicFlag: u32,
4217 ReservedBits: u32,
4218 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
4219 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
4220 __bindgen_bitfield_unit.set(0usize, 1u8, {
4221 let lists_modification_present_flag: u32 =
4222 unsafe { ::std::mem::transmute(lists_modification_present_flag) };
4223 lists_modification_present_flag as u64
4224 });
4225 __bindgen_bitfield_unit.set(1usize, 1u8, {
4226 let long_term_ref_pics_present_flag: u32 =
4227 unsafe { ::std::mem::transmute(long_term_ref_pics_present_flag) };
4228 long_term_ref_pics_present_flag as u64
4229 });
4230 __bindgen_bitfield_unit.set(2usize, 1u8, {
4231 let sps_temporal_mvp_enabled_flag: u32 = unsafe { ::std::mem::transmute(sps_temporal_mvp_enabled_flag) };
4232 sps_temporal_mvp_enabled_flag as u64
4233 });
4234 __bindgen_bitfield_unit.set(3usize, 1u8, {
4235 let cabac_init_present_flag: u32 = unsafe { ::std::mem::transmute(cabac_init_present_flag) };
4236 cabac_init_present_flag as u64
4237 });
4238 __bindgen_bitfield_unit.set(4usize, 1u8, {
4239 let output_flag_present_flag: u32 = unsafe { ::std::mem::transmute(output_flag_present_flag) };
4240 output_flag_present_flag as u64
4241 });
4242 __bindgen_bitfield_unit.set(5usize, 1u8, {
4243 let dependent_slice_segments_enabled_flag: u32 =
4244 unsafe { ::std::mem::transmute(dependent_slice_segments_enabled_flag) };
4245 dependent_slice_segments_enabled_flag as u64
4246 });
4247 __bindgen_bitfield_unit.set(6usize, 1u8, {
4248 let pps_slice_chroma_qp_offsets_present_flag: u32 =
4249 unsafe { ::std::mem::transmute(pps_slice_chroma_qp_offsets_present_flag) };
4250 pps_slice_chroma_qp_offsets_present_flag as u64
4251 });
4252 __bindgen_bitfield_unit.set(7usize, 1u8, {
4253 let sample_adaptive_offset_enabled_flag: u32 =
4254 unsafe { ::std::mem::transmute(sample_adaptive_offset_enabled_flag) };
4255 sample_adaptive_offset_enabled_flag as u64
4256 });
4257 __bindgen_bitfield_unit.set(8usize, 1u8, {
4258 let deblocking_filter_override_enabled_flag: u32 =
4259 unsafe { ::std::mem::transmute(deblocking_filter_override_enabled_flag) };
4260 deblocking_filter_override_enabled_flag as u64
4261 });
4262 __bindgen_bitfield_unit.set(9usize, 1u8, {
4263 let pps_disable_deblocking_filter_flag: u32 =
4264 unsafe { ::std::mem::transmute(pps_disable_deblocking_filter_flag) };
4265 pps_disable_deblocking_filter_flag as u64
4266 });
4267 __bindgen_bitfield_unit.set(10usize, 1u8, {
4268 let slice_segment_header_extension_present_flag: u32 =
4269 unsafe { ::std::mem::transmute(slice_segment_header_extension_present_flag) };
4270 slice_segment_header_extension_present_flag as u64
4271 });
4272 __bindgen_bitfield_unit.set(11usize, 1u8, {
4273 let RapPicFlag: u32 = unsafe { ::std::mem::transmute(RapPicFlag) };
4274 RapPicFlag as u64
4275 });
4276 __bindgen_bitfield_unit.set(12usize, 1u8, {
4277 let IdrPicFlag: u32 = unsafe { ::std::mem::transmute(IdrPicFlag) };
4278 IdrPicFlag as u64
4279 });
4280 __bindgen_bitfield_unit.set(13usize, 1u8, {
4281 let IntraPicFlag: u32 = unsafe { ::std::mem::transmute(IntraPicFlag) };
4282 IntraPicFlag as u64
4283 });
4284 __bindgen_bitfield_unit.set(14usize, 18u8, {
4285 let ReservedBits: u32 = unsafe { ::std::mem::transmute(ReservedBits) };
4286 ReservedBits as u64
4287 });
4288 __bindgen_bitfield_unit
4289 }
4290}
4291impl Default for _VAPictureParameterBufferHEVC__bindgen_ty_2 {
4292 fn default() -> Self {
4293 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4294 unsafe {
4295 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4296 s.assume_init()
4297 }
4298 }
4299}
4300impl Default for _VAPictureParameterBufferHEVC {
4301 fn default() -> Self {
4302 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4303 unsafe {
4304 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4305 s.assume_init()
4306 }
4307 }
4308}
4309#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure\n\n This structure conveys picture level parameters and should be sent once\n per frame.\n"]
4310pub type VAPictureParameterBufferHEVC = _VAPictureParameterBufferHEVC;
4311#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure for Range Extension\n\n This structure conveys picture level HEVC Range Extension parameters\n and should be sent once per frame. This data structure should be sent\n together with VAPictureParameterBufferHEVC in a single buffer of\n \\ref VAPictureParameterBufferHEVCExtension since each frame\n of HEVC range extension contains both picture level parameters and picture\n level range extension parameters. They should be parsed together. The buffer\n type is same as \\ref VAPictureParameterBufferHEVC.\n"]
4312#[repr(C)]
4313#[derive(Copy, Clone)]
4314pub struct _VAPictureParameterBufferHEVCRext {
4315 pub range_extension_pic_fields: _VAPictureParameterBufferHEVCRext__bindgen_ty_1,
4316 #[doc = " \\brief HEVC range extension flags\n The following flags bears the same syntax and semantics as\n those defined in HEVC bit stream spec."]
4317 pub diff_cu_chroma_qp_offset_depth: u8,
4318 pub chroma_qp_offset_list_len_minus1: u8,
4319 pub log2_sao_offset_scale_luma: u8,
4320 pub log2_sao_offset_scale_chroma: u8,
4321 pub log2_max_transform_skip_block_size_minus2: u8,
4322 pub cb_qp_offset_list: [i8; 6usize],
4323 pub cr_qp_offset_list: [i8; 6usize],
4324}
4325#[repr(C)]
4326#[derive(Copy, Clone)]
4327pub union _VAPictureParameterBufferHEVCRext__bindgen_ty_1 {
4328 pub bits: _VAPictureParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1,
4329 pub value: u32,
4330}
4331#[repr(C)]
4332#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
4333pub struct _VAPictureParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1 {
4334 pub _bitfield_align_1: [u32; 0],
4335 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
4336}
4337impl _VAPictureParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1 {
4338 #[inline]
4339 pub fn transform_skip_rotation_enabled_flag(&self) -> u32 {
4340 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
4341 }
4342 #[inline]
4343 pub fn set_transform_skip_rotation_enabled_flag(&mut self, val: u32) {
4344 unsafe {
4345 let val: u32 = ::std::mem::transmute(val);
4346 self._bitfield_1.set(0usize, 1u8, val as u64)
4347 }
4348 }
4349 #[inline]
4350 pub unsafe fn transform_skip_rotation_enabled_flag_raw(this: *const Self) -> u32 {
4351 unsafe {
4352 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4353 ::std::ptr::addr_of!((*this)._bitfield_1),
4354 0usize,
4355 1u8,
4356 ) as u32)
4357 }
4358 }
4359 #[inline]
4360 pub unsafe fn set_transform_skip_rotation_enabled_flag_raw(this: *mut Self, val: u32) {
4361 unsafe {
4362 let val: u32 = ::std::mem::transmute(val);
4363 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4364 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4365 0usize,
4366 1u8,
4367 val as u64,
4368 )
4369 }
4370 }
4371 #[inline]
4372 pub fn transform_skip_context_enabled_flag(&self) -> u32 {
4373 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
4374 }
4375 #[inline]
4376 pub fn set_transform_skip_context_enabled_flag(&mut self, val: u32) {
4377 unsafe {
4378 let val: u32 = ::std::mem::transmute(val);
4379 self._bitfield_1.set(1usize, 1u8, val as u64)
4380 }
4381 }
4382 #[inline]
4383 pub unsafe fn transform_skip_context_enabled_flag_raw(this: *const Self) -> u32 {
4384 unsafe {
4385 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4386 ::std::ptr::addr_of!((*this)._bitfield_1),
4387 1usize,
4388 1u8,
4389 ) as u32)
4390 }
4391 }
4392 #[inline]
4393 pub unsafe fn set_transform_skip_context_enabled_flag_raw(this: *mut Self, val: u32) {
4394 unsafe {
4395 let val: u32 = ::std::mem::transmute(val);
4396 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4397 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4398 1usize,
4399 1u8,
4400 val as u64,
4401 )
4402 }
4403 }
4404 #[inline]
4405 pub fn implicit_rdpcm_enabled_flag(&self) -> u32 {
4406 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
4407 }
4408 #[inline]
4409 pub fn set_implicit_rdpcm_enabled_flag(&mut self, val: u32) {
4410 unsafe {
4411 let val: u32 = ::std::mem::transmute(val);
4412 self._bitfield_1.set(2usize, 1u8, val as u64)
4413 }
4414 }
4415 #[inline]
4416 pub unsafe fn implicit_rdpcm_enabled_flag_raw(this: *const Self) -> u32 {
4417 unsafe {
4418 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4419 ::std::ptr::addr_of!((*this)._bitfield_1),
4420 2usize,
4421 1u8,
4422 ) as u32)
4423 }
4424 }
4425 #[inline]
4426 pub unsafe fn set_implicit_rdpcm_enabled_flag_raw(this: *mut Self, val: u32) {
4427 unsafe {
4428 let val: u32 = ::std::mem::transmute(val);
4429 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4430 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4431 2usize,
4432 1u8,
4433 val as u64,
4434 )
4435 }
4436 }
4437 #[inline]
4438 pub fn explicit_rdpcm_enabled_flag(&self) -> u32 {
4439 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
4440 }
4441 #[inline]
4442 pub fn set_explicit_rdpcm_enabled_flag(&mut self, val: u32) {
4443 unsafe {
4444 let val: u32 = ::std::mem::transmute(val);
4445 self._bitfield_1.set(3usize, 1u8, val as u64)
4446 }
4447 }
4448 #[inline]
4449 pub unsafe fn explicit_rdpcm_enabled_flag_raw(this: *const Self) -> u32 {
4450 unsafe {
4451 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4452 ::std::ptr::addr_of!((*this)._bitfield_1),
4453 3usize,
4454 1u8,
4455 ) as u32)
4456 }
4457 }
4458 #[inline]
4459 pub unsafe fn set_explicit_rdpcm_enabled_flag_raw(this: *mut Self, val: u32) {
4460 unsafe {
4461 let val: u32 = ::std::mem::transmute(val);
4462 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4463 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4464 3usize,
4465 1u8,
4466 val as u64,
4467 )
4468 }
4469 }
4470 #[inline]
4471 pub fn extended_precision_processing_flag(&self) -> u32 {
4472 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
4473 }
4474 #[inline]
4475 pub fn set_extended_precision_processing_flag(&mut self, val: u32) {
4476 unsafe {
4477 let val: u32 = ::std::mem::transmute(val);
4478 self._bitfield_1.set(4usize, 1u8, val as u64)
4479 }
4480 }
4481 #[inline]
4482 pub unsafe fn extended_precision_processing_flag_raw(this: *const Self) -> u32 {
4483 unsafe {
4484 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4485 ::std::ptr::addr_of!((*this)._bitfield_1),
4486 4usize,
4487 1u8,
4488 ) as u32)
4489 }
4490 }
4491 #[inline]
4492 pub unsafe fn set_extended_precision_processing_flag_raw(this: *mut Self, val: u32) {
4493 unsafe {
4494 let val: u32 = ::std::mem::transmute(val);
4495 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4496 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4497 4usize,
4498 1u8,
4499 val as u64,
4500 )
4501 }
4502 }
4503 #[inline]
4504 pub fn intra_smoothing_disabled_flag(&self) -> u32 {
4505 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
4506 }
4507 #[inline]
4508 pub fn set_intra_smoothing_disabled_flag(&mut self, val: u32) {
4509 unsafe {
4510 let val: u32 = ::std::mem::transmute(val);
4511 self._bitfield_1.set(5usize, 1u8, val as u64)
4512 }
4513 }
4514 #[inline]
4515 pub unsafe fn intra_smoothing_disabled_flag_raw(this: *const Self) -> u32 {
4516 unsafe {
4517 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4518 ::std::ptr::addr_of!((*this)._bitfield_1),
4519 5usize,
4520 1u8,
4521 ) as u32)
4522 }
4523 }
4524 #[inline]
4525 pub unsafe fn set_intra_smoothing_disabled_flag_raw(this: *mut Self, val: u32) {
4526 unsafe {
4527 let val: u32 = ::std::mem::transmute(val);
4528 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4529 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4530 5usize,
4531 1u8,
4532 val as u64,
4533 )
4534 }
4535 }
4536 #[inline]
4537 pub fn high_precision_offsets_enabled_flag(&self) -> u32 {
4538 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
4539 }
4540 #[inline]
4541 pub fn set_high_precision_offsets_enabled_flag(&mut self, val: u32) {
4542 unsafe {
4543 let val: u32 = ::std::mem::transmute(val);
4544 self._bitfield_1.set(6usize, 1u8, val as u64)
4545 }
4546 }
4547 #[inline]
4548 pub unsafe fn high_precision_offsets_enabled_flag_raw(this: *const Self) -> u32 {
4549 unsafe {
4550 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4551 ::std::ptr::addr_of!((*this)._bitfield_1),
4552 6usize,
4553 1u8,
4554 ) as u32)
4555 }
4556 }
4557 #[inline]
4558 pub unsafe fn set_high_precision_offsets_enabled_flag_raw(this: *mut Self, val: u32) {
4559 unsafe {
4560 let val: u32 = ::std::mem::transmute(val);
4561 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4562 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4563 6usize,
4564 1u8,
4565 val as u64,
4566 )
4567 }
4568 }
4569 #[inline]
4570 pub fn persistent_rice_adaptation_enabled_flag(&self) -> u32 {
4571 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
4572 }
4573 #[inline]
4574 pub fn set_persistent_rice_adaptation_enabled_flag(&mut self, val: u32) {
4575 unsafe {
4576 let val: u32 = ::std::mem::transmute(val);
4577 self._bitfield_1.set(7usize, 1u8, val as u64)
4578 }
4579 }
4580 #[inline]
4581 pub unsafe fn persistent_rice_adaptation_enabled_flag_raw(this: *const Self) -> u32 {
4582 unsafe {
4583 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4584 ::std::ptr::addr_of!((*this)._bitfield_1),
4585 7usize,
4586 1u8,
4587 ) as u32)
4588 }
4589 }
4590 #[inline]
4591 pub unsafe fn set_persistent_rice_adaptation_enabled_flag_raw(this: *mut Self, val: u32) {
4592 unsafe {
4593 let val: u32 = ::std::mem::transmute(val);
4594 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4595 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4596 7usize,
4597 1u8,
4598 val as u64,
4599 )
4600 }
4601 }
4602 #[inline]
4603 pub fn cabac_bypass_alignment_enabled_flag(&self) -> u32 {
4604 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
4605 }
4606 #[inline]
4607 pub fn set_cabac_bypass_alignment_enabled_flag(&mut self, val: u32) {
4608 unsafe {
4609 let val: u32 = ::std::mem::transmute(val);
4610 self._bitfield_1.set(8usize, 1u8, val as u64)
4611 }
4612 }
4613 #[inline]
4614 pub unsafe fn cabac_bypass_alignment_enabled_flag_raw(this: *const Self) -> u32 {
4615 unsafe {
4616 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4617 ::std::ptr::addr_of!((*this)._bitfield_1),
4618 8usize,
4619 1u8,
4620 ) as u32)
4621 }
4622 }
4623 #[inline]
4624 pub unsafe fn set_cabac_bypass_alignment_enabled_flag_raw(this: *mut Self, val: u32) {
4625 unsafe {
4626 let val: u32 = ::std::mem::transmute(val);
4627 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4628 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4629 8usize,
4630 1u8,
4631 val as u64,
4632 )
4633 }
4634 }
4635 #[inline]
4636 pub fn cross_component_prediction_enabled_flag(&self) -> u32 {
4637 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
4638 }
4639 #[inline]
4640 pub fn set_cross_component_prediction_enabled_flag(&mut self, val: u32) {
4641 unsafe {
4642 let val: u32 = ::std::mem::transmute(val);
4643 self._bitfield_1.set(9usize, 1u8, val as u64)
4644 }
4645 }
4646 #[inline]
4647 pub unsafe fn cross_component_prediction_enabled_flag_raw(this: *const Self) -> u32 {
4648 unsafe {
4649 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4650 ::std::ptr::addr_of!((*this)._bitfield_1),
4651 9usize,
4652 1u8,
4653 ) as u32)
4654 }
4655 }
4656 #[inline]
4657 pub unsafe fn set_cross_component_prediction_enabled_flag_raw(this: *mut Self, val: u32) {
4658 unsafe {
4659 let val: u32 = ::std::mem::transmute(val);
4660 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4661 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4662 9usize,
4663 1u8,
4664 val as u64,
4665 )
4666 }
4667 }
4668 #[inline]
4669 pub fn chroma_qp_offset_list_enabled_flag(&self) -> u32 {
4670 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
4671 }
4672 #[inline]
4673 pub fn set_chroma_qp_offset_list_enabled_flag(&mut self, val: u32) {
4674 unsafe {
4675 let val: u32 = ::std::mem::transmute(val);
4676 self._bitfield_1.set(10usize, 1u8, val as u64)
4677 }
4678 }
4679 #[inline]
4680 pub unsafe fn chroma_qp_offset_list_enabled_flag_raw(this: *const Self) -> u32 {
4681 unsafe {
4682 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4683 ::std::ptr::addr_of!((*this)._bitfield_1),
4684 10usize,
4685 1u8,
4686 ) as u32)
4687 }
4688 }
4689 #[inline]
4690 pub unsafe fn set_chroma_qp_offset_list_enabled_flag_raw(this: *mut Self, val: u32) {
4691 unsafe {
4692 let val: u32 = ::std::mem::transmute(val);
4693 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4694 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4695 10usize,
4696 1u8,
4697 val as u64,
4698 )
4699 }
4700 }
4701 #[inline]
4702 pub fn reserved(&self) -> u32 {
4703 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 21u8) as u32) }
4704 }
4705 #[inline]
4706 pub fn set_reserved(&mut self, val: u32) {
4707 unsafe {
4708 let val: u32 = ::std::mem::transmute(val);
4709 self._bitfield_1.set(11usize, 21u8, val as u64)
4710 }
4711 }
4712 #[inline]
4713 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
4714 unsafe {
4715 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4716 ::std::ptr::addr_of!((*this)._bitfield_1),
4717 11usize,
4718 21u8,
4719 ) as u32)
4720 }
4721 }
4722 #[inline]
4723 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
4724 unsafe {
4725 let val: u32 = ::std::mem::transmute(val);
4726 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4727 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4728 11usize,
4729 21u8,
4730 val as u64,
4731 )
4732 }
4733 }
4734 #[inline]
4735 pub fn new_bitfield_1(
4736 transform_skip_rotation_enabled_flag: u32,
4737 transform_skip_context_enabled_flag: u32,
4738 implicit_rdpcm_enabled_flag: u32,
4739 explicit_rdpcm_enabled_flag: u32,
4740 extended_precision_processing_flag: u32,
4741 intra_smoothing_disabled_flag: u32,
4742 high_precision_offsets_enabled_flag: u32,
4743 persistent_rice_adaptation_enabled_flag: u32,
4744 cabac_bypass_alignment_enabled_flag: u32,
4745 cross_component_prediction_enabled_flag: u32,
4746 chroma_qp_offset_list_enabled_flag: u32,
4747 reserved: u32,
4748 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
4749 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
4750 __bindgen_bitfield_unit.set(0usize, 1u8, {
4751 let transform_skip_rotation_enabled_flag: u32 =
4752 unsafe { ::std::mem::transmute(transform_skip_rotation_enabled_flag) };
4753 transform_skip_rotation_enabled_flag as u64
4754 });
4755 __bindgen_bitfield_unit.set(1usize, 1u8, {
4756 let transform_skip_context_enabled_flag: u32 =
4757 unsafe { ::std::mem::transmute(transform_skip_context_enabled_flag) };
4758 transform_skip_context_enabled_flag as u64
4759 });
4760 __bindgen_bitfield_unit.set(2usize, 1u8, {
4761 let implicit_rdpcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(implicit_rdpcm_enabled_flag) };
4762 implicit_rdpcm_enabled_flag as u64
4763 });
4764 __bindgen_bitfield_unit.set(3usize, 1u8, {
4765 let explicit_rdpcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(explicit_rdpcm_enabled_flag) };
4766 explicit_rdpcm_enabled_flag as u64
4767 });
4768 __bindgen_bitfield_unit.set(4usize, 1u8, {
4769 let extended_precision_processing_flag: u32 =
4770 unsafe { ::std::mem::transmute(extended_precision_processing_flag) };
4771 extended_precision_processing_flag as u64
4772 });
4773 __bindgen_bitfield_unit.set(5usize, 1u8, {
4774 let intra_smoothing_disabled_flag: u32 = unsafe { ::std::mem::transmute(intra_smoothing_disabled_flag) };
4775 intra_smoothing_disabled_flag as u64
4776 });
4777 __bindgen_bitfield_unit.set(6usize, 1u8, {
4778 let high_precision_offsets_enabled_flag: u32 =
4779 unsafe { ::std::mem::transmute(high_precision_offsets_enabled_flag) };
4780 high_precision_offsets_enabled_flag as u64
4781 });
4782 __bindgen_bitfield_unit.set(7usize, 1u8, {
4783 let persistent_rice_adaptation_enabled_flag: u32 =
4784 unsafe { ::std::mem::transmute(persistent_rice_adaptation_enabled_flag) };
4785 persistent_rice_adaptation_enabled_flag as u64
4786 });
4787 __bindgen_bitfield_unit.set(8usize, 1u8, {
4788 let cabac_bypass_alignment_enabled_flag: u32 =
4789 unsafe { ::std::mem::transmute(cabac_bypass_alignment_enabled_flag) };
4790 cabac_bypass_alignment_enabled_flag as u64
4791 });
4792 __bindgen_bitfield_unit.set(9usize, 1u8, {
4793 let cross_component_prediction_enabled_flag: u32 =
4794 unsafe { ::std::mem::transmute(cross_component_prediction_enabled_flag) };
4795 cross_component_prediction_enabled_flag as u64
4796 });
4797 __bindgen_bitfield_unit.set(10usize, 1u8, {
4798 let chroma_qp_offset_list_enabled_flag: u32 =
4799 unsafe { ::std::mem::transmute(chroma_qp_offset_list_enabled_flag) };
4800 chroma_qp_offset_list_enabled_flag as u64
4801 });
4802 __bindgen_bitfield_unit.set(11usize, 21u8, {
4803 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
4804 reserved as u64
4805 });
4806 __bindgen_bitfield_unit
4807 }
4808}
4809impl Default for _VAPictureParameterBufferHEVCRext__bindgen_ty_1 {
4810 fn default() -> Self {
4811 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4812 unsafe {
4813 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4814 s.assume_init()
4815 }
4816 }
4817}
4818impl Default for _VAPictureParameterBufferHEVCRext {
4819 fn default() -> Self {
4820 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
4821 unsafe {
4822 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
4823 s.assume_init()
4824 }
4825 }
4826}
4827#[doc = " \\brief HEVC Decoding Picture Parameter Buffer Structure for Range Extension\n\n This structure conveys picture level HEVC Range Extension parameters\n and should be sent once per frame. This data structure should be sent\n together with VAPictureParameterBufferHEVC in a single buffer of\n \\ref VAPictureParameterBufferHEVCExtension since each frame\n of HEVC range extension contains both picture level parameters and picture\n level range extension parameters. They should be parsed together. The buffer\n type is same as \\ref VAPictureParameterBufferHEVC.\n"]
4828pub type VAPictureParameterBufferHEVCRext = _VAPictureParameterBufferHEVCRext;
4829#[doc = "\\brief HEVC Decoding Picture Parameter Buffer Structure for\nScreen Content extension\n\nThis structure conveys picture level HEVC Scc parameters\nand should be sent once per frame. This data structure should be sent\ntogether with VAPictureParameterBufferHEVC and VAPictureParameterBufferHEVCRext\nin a single buffer of \\ref VAPictureParameterBufferHEVCExtension since each\nframe of HEVC SCC contains picture level parameters, picture level range\nextension parameters and picture level Scc parameters. They should be parsed\ntogether and the buffer type is same as \\ref VAPictureParameterBufferHEVC.\n"]
4830#[repr(C)]
4831#[derive(Copy, Clone)]
4832pub struct _VAPictureParameterBufferHEVCScc {
4833 pub screen_content_pic_fields: _VAPictureParameterBufferHEVCScc__bindgen_ty_1,
4834 pub palette_max_size: u8,
4835 pub delta_palette_max_predictor_size: u8,
4836 #[doc = " \\brief Size of initial palette predictor.\n It is derived from pps_num_palette_predictor_initializer or\n sps_num_palette_predictor_initializer_minus1.\n Details in HEVC SCC spec section 9.3.2.3."]
4837 pub predictor_palette_size: u8,
4838 #[doc = " \\brief Palette predictor initializer.\n It is derived from pps_palette_predictor_initializers[][]\n or sps_palette_predictor_initializers[][].\n Details in HEVC SCC spec section 9.3.2.3."]
4839 pub predictor_palette_entries: [[u16; 128usize]; 3usize],
4840 pub pps_act_y_qp_offset_plus5: i8,
4841 pub pps_act_cb_qp_offset_plus5: i8,
4842 pub pps_act_cr_qp_offset_plus3: i8,
4843}
4844#[repr(C)]
4845#[derive(Copy, Clone)]
4846pub union _VAPictureParameterBufferHEVCScc__bindgen_ty_1 {
4847 pub bits: _VAPictureParameterBufferHEVCScc__bindgen_ty_1__bindgen_ty_1,
4848 pub value: u32,
4849}
4850#[repr(C)]
4851#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
4852pub struct _VAPictureParameterBufferHEVCScc__bindgen_ty_1__bindgen_ty_1 {
4853 pub _bitfield_align_1: [u32; 0],
4854 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
4855}
4856impl _VAPictureParameterBufferHEVCScc__bindgen_ty_1__bindgen_ty_1 {
4857 #[inline]
4858 pub fn pps_curr_pic_ref_enabled_flag(&self) -> u32 {
4859 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
4860 }
4861 #[inline]
4862 pub fn set_pps_curr_pic_ref_enabled_flag(&mut self, val: u32) {
4863 unsafe {
4864 let val: u32 = ::std::mem::transmute(val);
4865 self._bitfield_1.set(0usize, 1u8, val as u64)
4866 }
4867 }
4868 #[inline]
4869 pub unsafe fn pps_curr_pic_ref_enabled_flag_raw(this: *const Self) -> u32 {
4870 unsafe {
4871 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4872 ::std::ptr::addr_of!((*this)._bitfield_1),
4873 0usize,
4874 1u8,
4875 ) as u32)
4876 }
4877 }
4878 #[inline]
4879 pub unsafe fn set_pps_curr_pic_ref_enabled_flag_raw(this: *mut Self, val: u32) {
4880 unsafe {
4881 let val: u32 = ::std::mem::transmute(val);
4882 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4883 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4884 0usize,
4885 1u8,
4886 val as u64,
4887 )
4888 }
4889 }
4890 #[inline]
4891 pub fn palette_mode_enabled_flag(&self) -> u32 {
4892 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
4893 }
4894 #[inline]
4895 pub fn set_palette_mode_enabled_flag(&mut self, val: u32) {
4896 unsafe {
4897 let val: u32 = ::std::mem::transmute(val);
4898 self._bitfield_1.set(1usize, 1u8, val as u64)
4899 }
4900 }
4901 #[inline]
4902 pub unsafe fn palette_mode_enabled_flag_raw(this: *const Self) -> u32 {
4903 unsafe {
4904 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4905 ::std::ptr::addr_of!((*this)._bitfield_1),
4906 1usize,
4907 1u8,
4908 ) as u32)
4909 }
4910 }
4911 #[inline]
4912 pub unsafe fn set_palette_mode_enabled_flag_raw(this: *mut Self, val: u32) {
4913 unsafe {
4914 let val: u32 = ::std::mem::transmute(val);
4915 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4916 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4917 1usize,
4918 1u8,
4919 val as u64,
4920 )
4921 }
4922 }
4923 #[inline]
4924 pub fn motion_vector_resolution_control_idc(&self) -> u32 {
4925 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) }
4926 }
4927 #[inline]
4928 pub fn set_motion_vector_resolution_control_idc(&mut self, val: u32) {
4929 unsafe {
4930 let val: u32 = ::std::mem::transmute(val);
4931 self._bitfield_1.set(2usize, 2u8, val as u64)
4932 }
4933 }
4934 #[inline]
4935 pub unsafe fn motion_vector_resolution_control_idc_raw(this: *const Self) -> u32 {
4936 unsafe {
4937 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4938 ::std::ptr::addr_of!((*this)._bitfield_1),
4939 2usize,
4940 2u8,
4941 ) as u32)
4942 }
4943 }
4944 #[inline]
4945 pub unsafe fn set_motion_vector_resolution_control_idc_raw(this: *mut Self, val: u32) {
4946 unsafe {
4947 let val: u32 = ::std::mem::transmute(val);
4948 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4949 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4950 2usize,
4951 2u8,
4952 val as u64,
4953 )
4954 }
4955 }
4956 #[inline]
4957 pub fn intra_boundary_filtering_disabled_flag(&self) -> u32 {
4958 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
4959 }
4960 #[inline]
4961 pub fn set_intra_boundary_filtering_disabled_flag(&mut self, val: u32) {
4962 unsafe {
4963 let val: u32 = ::std::mem::transmute(val);
4964 self._bitfield_1.set(4usize, 1u8, val as u64)
4965 }
4966 }
4967 #[inline]
4968 pub unsafe fn intra_boundary_filtering_disabled_flag_raw(this: *const Self) -> u32 {
4969 unsafe {
4970 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
4971 ::std::ptr::addr_of!((*this)._bitfield_1),
4972 4usize,
4973 1u8,
4974 ) as u32)
4975 }
4976 }
4977 #[inline]
4978 pub unsafe fn set_intra_boundary_filtering_disabled_flag_raw(this: *mut Self, val: u32) {
4979 unsafe {
4980 let val: u32 = ::std::mem::transmute(val);
4981 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
4982 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
4983 4usize,
4984 1u8,
4985 val as u64,
4986 )
4987 }
4988 }
4989 #[inline]
4990 pub fn residual_adaptive_colour_transform_enabled_flag(&self) -> u32 {
4991 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
4992 }
4993 #[inline]
4994 pub fn set_residual_adaptive_colour_transform_enabled_flag(&mut self, val: u32) {
4995 unsafe {
4996 let val: u32 = ::std::mem::transmute(val);
4997 self._bitfield_1.set(5usize, 1u8, val as u64)
4998 }
4999 }
5000 #[inline]
5001 pub unsafe fn residual_adaptive_colour_transform_enabled_flag_raw(this: *const Self) -> u32 {
5002 unsafe {
5003 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5004 ::std::ptr::addr_of!((*this)._bitfield_1),
5005 5usize,
5006 1u8,
5007 ) as u32)
5008 }
5009 }
5010 #[inline]
5011 pub unsafe fn set_residual_adaptive_colour_transform_enabled_flag_raw(this: *mut Self, val: u32) {
5012 unsafe {
5013 let val: u32 = ::std::mem::transmute(val);
5014 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5015 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5016 5usize,
5017 1u8,
5018 val as u64,
5019 )
5020 }
5021 }
5022 #[inline]
5023 pub fn pps_slice_act_qp_offsets_present_flag(&self) -> u32 {
5024 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
5025 }
5026 #[inline]
5027 pub fn set_pps_slice_act_qp_offsets_present_flag(&mut self, val: u32) {
5028 unsafe {
5029 let val: u32 = ::std::mem::transmute(val);
5030 self._bitfield_1.set(6usize, 1u8, val as u64)
5031 }
5032 }
5033 #[inline]
5034 pub unsafe fn pps_slice_act_qp_offsets_present_flag_raw(this: *const Self) -> u32 {
5035 unsafe {
5036 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5037 ::std::ptr::addr_of!((*this)._bitfield_1),
5038 6usize,
5039 1u8,
5040 ) as u32)
5041 }
5042 }
5043 #[inline]
5044 pub unsafe fn set_pps_slice_act_qp_offsets_present_flag_raw(this: *mut Self, val: u32) {
5045 unsafe {
5046 let val: u32 = ::std::mem::transmute(val);
5047 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5048 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5049 6usize,
5050 1u8,
5051 val as u64,
5052 )
5053 }
5054 }
5055 #[inline]
5056 pub fn reserved(&self) -> u32 {
5057 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 25u8) as u32) }
5058 }
5059 #[inline]
5060 pub fn set_reserved(&mut self, val: u32) {
5061 unsafe {
5062 let val: u32 = ::std::mem::transmute(val);
5063 self._bitfield_1.set(7usize, 25u8, val as u64)
5064 }
5065 }
5066 #[inline]
5067 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
5068 unsafe {
5069 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5070 ::std::ptr::addr_of!((*this)._bitfield_1),
5071 7usize,
5072 25u8,
5073 ) as u32)
5074 }
5075 }
5076 #[inline]
5077 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
5078 unsafe {
5079 let val: u32 = ::std::mem::transmute(val);
5080 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5081 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5082 7usize,
5083 25u8,
5084 val as u64,
5085 )
5086 }
5087 }
5088 #[inline]
5089 pub fn new_bitfield_1(
5090 pps_curr_pic_ref_enabled_flag: u32,
5091 palette_mode_enabled_flag: u32,
5092 motion_vector_resolution_control_idc: u32,
5093 intra_boundary_filtering_disabled_flag: u32,
5094 residual_adaptive_colour_transform_enabled_flag: u32,
5095 pps_slice_act_qp_offsets_present_flag: u32,
5096 reserved: u32,
5097 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
5098 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
5099 __bindgen_bitfield_unit.set(0usize, 1u8, {
5100 let pps_curr_pic_ref_enabled_flag: u32 = unsafe { ::std::mem::transmute(pps_curr_pic_ref_enabled_flag) };
5101 pps_curr_pic_ref_enabled_flag as u64
5102 });
5103 __bindgen_bitfield_unit.set(1usize, 1u8, {
5104 let palette_mode_enabled_flag: u32 = unsafe { ::std::mem::transmute(palette_mode_enabled_flag) };
5105 palette_mode_enabled_flag as u64
5106 });
5107 __bindgen_bitfield_unit.set(2usize, 2u8, {
5108 let motion_vector_resolution_control_idc: u32 =
5109 unsafe { ::std::mem::transmute(motion_vector_resolution_control_idc) };
5110 motion_vector_resolution_control_idc as u64
5111 });
5112 __bindgen_bitfield_unit.set(4usize, 1u8, {
5113 let intra_boundary_filtering_disabled_flag: u32 =
5114 unsafe { ::std::mem::transmute(intra_boundary_filtering_disabled_flag) };
5115 intra_boundary_filtering_disabled_flag as u64
5116 });
5117 __bindgen_bitfield_unit.set(5usize, 1u8, {
5118 let residual_adaptive_colour_transform_enabled_flag: u32 =
5119 unsafe { ::std::mem::transmute(residual_adaptive_colour_transform_enabled_flag) };
5120 residual_adaptive_colour_transform_enabled_flag as u64
5121 });
5122 __bindgen_bitfield_unit.set(6usize, 1u8, {
5123 let pps_slice_act_qp_offsets_present_flag: u32 =
5124 unsafe { ::std::mem::transmute(pps_slice_act_qp_offsets_present_flag) };
5125 pps_slice_act_qp_offsets_present_flag as u64
5126 });
5127 __bindgen_bitfield_unit.set(7usize, 25u8, {
5128 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
5129 reserved as u64
5130 });
5131 __bindgen_bitfield_unit
5132 }
5133}
5134impl Default for _VAPictureParameterBufferHEVCScc__bindgen_ty_1 {
5135 fn default() -> Self {
5136 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5137 unsafe {
5138 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5139 s.assume_init()
5140 }
5141 }
5142}
5143impl Default for _VAPictureParameterBufferHEVCScc {
5144 fn default() -> Self {
5145 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5146 unsafe {
5147 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5148 s.assume_init()
5149 }
5150 }
5151}
5152#[doc = "\\brief HEVC Decoding Picture Parameter Buffer Structure for\nScreen Content extension\n\nThis structure conveys picture level HEVC Scc parameters\nand should be sent once per frame. This data structure should be sent\ntogether with VAPictureParameterBufferHEVC and VAPictureParameterBufferHEVCRext\nin a single buffer of \\ref VAPictureParameterBufferHEVCExtension since each\nframe of HEVC SCC contains picture level parameters, picture level range\nextension parameters and picture level Scc parameters. They should be parsed\ntogether and the buffer type is same as \\ref VAPictureParameterBufferHEVC.\n"]
5153pub type VAPictureParameterBufferHEVCScc = _VAPictureParameterBufferHEVCScc;
5154#[doc = " \\brief HEVC Slice Parameter Buffer Structure For Long Format\n\n VASliceParameterBufferHEVC structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice.\n\n For short format, this data structure is not sent by application.\n"]
5155#[repr(C)]
5156#[derive(Copy, Clone)]
5157pub struct _VASliceParameterBufferHEVC {
5158 #[doc = " \\brief Number of bytes in the slice data buffer for this slice\n counting from and including NAL unit header."]
5159 pub slice_data_size: u32,
5160 #[doc = " \\brief The offset to the NAL unit header for this slice"]
5161 pub slice_data_offset: u32,
5162 #[doc = " \\brief Slice data buffer flags. See \\c VA_SLICE_DATA_FLAG_XXX."]
5163 pub slice_data_flag: u32,
5164 #[doc = " \\brief Byte offset from NAL unit header to the begining of slice_data().\n\n This byte offset is relative to and includes the NAL unit header\n and represents the number of bytes parsed in the slice_header()\n after the removal of any emulation prevention bytes in\n there. However, the slice data buffer passed to the hardware is\n the original bitstream, thus including any emulation prevention\n bytes."]
5165 pub slice_data_byte_offset: u32,
5166 #[doc = " HEVC syntax element."]
5167 pub slice_segment_address: u32,
5168 #[doc = " \\brief index into ReferenceFrames[]\n RefPicList[0][] corresponds to RefPicList0[] of HEVC variable.\n RefPicList[1][] corresponds to RefPicList1[] of HEVC variable.\n value range [0..14, 0xFF], where 0xFF indicates invalid entry."]
5169 pub RefPicList: [[u8; 15usize]; 2usize],
5170 pub LongSliceFlags: _VASliceParameterBufferHEVC__bindgen_ty_1,
5171 #[doc = " HEVC syntax element. Collocated Reference Picture Index.\n index to RefPicList[0][] or RefPicList[1][].\n when slice_temporal_mvp_enabled_flag equals 0, it should take value 0xFF.\n value range [0..14, 0xFF]."]
5172 pub collocated_ref_idx: u8,
5173 #[doc = " HEVC syntax element.\n if num_ref_idx_active_override_flag equals 0, host decoder should\n set its value to num_ref_idx_l0_default_active_minus1."]
5174 pub num_ref_idx_l0_active_minus1: u8,
5175 #[doc = " HEVC syntax element.\n if num_ref_idx_active_override_flag equals 0, host decoder should\n set its value to num_ref_idx_l1_default_active_minus1."]
5176 pub num_ref_idx_l1_active_minus1: u8,
5177 #[doc = " HEVC syntax element."]
5178 pub slice_qp_delta: i8,
5179 #[doc = " HEVC syntax element."]
5180 pub slice_cb_qp_offset: i8,
5181 #[doc = " HEVC syntax element."]
5182 pub slice_cr_qp_offset: i8,
5183 #[doc = " HEVC syntax element."]
5184 pub slice_beta_offset_div2: i8,
5185 #[doc = " HEVC syntax element."]
5186 pub slice_tc_offset_div2: i8,
5187 #[doc = " HEVC syntax element."]
5188 pub luma_log2_weight_denom: u8,
5189 #[doc = " HEVC syntax element."]
5190 pub delta_chroma_log2_weight_denom: i8,
5191 #[doc = " HEVC syntax element."]
5192 pub delta_luma_weight_l0: [i8; 15usize],
5193 #[doc = " HEVC syntax element."]
5194 pub luma_offset_l0: [i8; 15usize],
5195 #[doc = " HEVC syntax element."]
5196 pub delta_chroma_weight_l0: [[i8; 2usize]; 15usize],
5197 #[doc = " corresponds to HEVC spec variable of the same name."]
5198 pub ChromaOffsetL0: [[i8; 2usize]; 15usize],
5199 #[doc = " HEVC syntax element."]
5200 pub delta_luma_weight_l1: [i8; 15usize],
5201 #[doc = " HEVC syntax element."]
5202 pub luma_offset_l1: [i8; 15usize],
5203 #[doc = " HEVC syntax element."]
5204 pub delta_chroma_weight_l1: [[i8; 2usize]; 15usize],
5205 #[doc = " corresponds to HEVC spec variable of the same name."]
5206 pub ChromaOffsetL1: [[i8; 2usize]; 15usize],
5207 #[doc = " HEVC syntax element."]
5208 pub five_minus_max_num_merge_cand: u8,
5209 #[doc = " HEVC syntax element."]
5210 pub num_entry_point_offsets: u16,
5211 #[doc = " HEVC syntax element."]
5212 pub entry_offset_to_subset_array: u16,
5213 #[doc = " \\brief Number of emulation prevention bytes in slice header."]
5214 pub slice_data_num_emu_prevn_bytes: u16,
5215 #[doc = " \\brief Reserved bytes for future use, must be zero"]
5216 pub va_reserved: [u32; 2usize],
5217}
5218#[repr(C)]
5219#[derive(Copy, Clone)]
5220pub union _VASliceParameterBufferHEVC__bindgen_ty_1 {
5221 pub value: u32,
5222 pub fields: _VASliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1,
5223}
5224#[repr(C)]
5225#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
5226pub struct _VASliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
5227 pub _bitfield_align_1: [u32; 0],
5228 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
5229}
5230impl _VASliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
5231 #[inline]
5232 pub fn LastSliceOfPic(&self) -> u32 {
5233 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
5234 }
5235 #[inline]
5236 pub fn set_LastSliceOfPic(&mut self, val: u32) {
5237 unsafe {
5238 let val: u32 = ::std::mem::transmute(val);
5239 self._bitfield_1.set(0usize, 1u8, val as u64)
5240 }
5241 }
5242 #[inline]
5243 pub unsafe fn LastSliceOfPic_raw(this: *const Self) -> u32 {
5244 unsafe {
5245 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5246 ::std::ptr::addr_of!((*this)._bitfield_1),
5247 0usize,
5248 1u8,
5249 ) as u32)
5250 }
5251 }
5252 #[inline]
5253 pub unsafe fn set_LastSliceOfPic_raw(this: *mut Self, val: u32) {
5254 unsafe {
5255 let val: u32 = ::std::mem::transmute(val);
5256 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5257 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5258 0usize,
5259 1u8,
5260 val as u64,
5261 )
5262 }
5263 }
5264 #[inline]
5265 pub fn dependent_slice_segment_flag(&self) -> u32 {
5266 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
5267 }
5268 #[inline]
5269 pub fn set_dependent_slice_segment_flag(&mut self, val: u32) {
5270 unsafe {
5271 let val: u32 = ::std::mem::transmute(val);
5272 self._bitfield_1.set(1usize, 1u8, val as u64)
5273 }
5274 }
5275 #[inline]
5276 pub unsafe fn dependent_slice_segment_flag_raw(this: *const Self) -> u32 {
5277 unsafe {
5278 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5279 ::std::ptr::addr_of!((*this)._bitfield_1),
5280 1usize,
5281 1u8,
5282 ) as u32)
5283 }
5284 }
5285 #[inline]
5286 pub unsafe fn set_dependent_slice_segment_flag_raw(this: *mut Self, val: u32) {
5287 unsafe {
5288 let val: u32 = ::std::mem::transmute(val);
5289 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5290 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5291 1usize,
5292 1u8,
5293 val as u64,
5294 )
5295 }
5296 }
5297 #[inline]
5298 pub fn slice_type(&self) -> u32 {
5299 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) }
5300 }
5301 #[inline]
5302 pub fn set_slice_type(&mut self, val: u32) {
5303 unsafe {
5304 let val: u32 = ::std::mem::transmute(val);
5305 self._bitfield_1.set(2usize, 2u8, val as u64)
5306 }
5307 }
5308 #[inline]
5309 pub unsafe fn slice_type_raw(this: *const Self) -> u32 {
5310 unsafe {
5311 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5312 ::std::ptr::addr_of!((*this)._bitfield_1),
5313 2usize,
5314 2u8,
5315 ) as u32)
5316 }
5317 }
5318 #[inline]
5319 pub unsafe fn set_slice_type_raw(this: *mut Self, val: u32) {
5320 unsafe {
5321 let val: u32 = ::std::mem::transmute(val);
5322 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5323 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5324 2usize,
5325 2u8,
5326 val as u64,
5327 )
5328 }
5329 }
5330 #[inline]
5331 pub fn color_plane_id(&self) -> u32 {
5332 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) }
5333 }
5334 #[inline]
5335 pub fn set_color_plane_id(&mut self, val: u32) {
5336 unsafe {
5337 let val: u32 = ::std::mem::transmute(val);
5338 self._bitfield_1.set(4usize, 2u8, val as u64)
5339 }
5340 }
5341 #[inline]
5342 pub unsafe fn color_plane_id_raw(this: *const Self) -> u32 {
5343 unsafe {
5344 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5345 ::std::ptr::addr_of!((*this)._bitfield_1),
5346 4usize,
5347 2u8,
5348 ) as u32)
5349 }
5350 }
5351 #[inline]
5352 pub unsafe fn set_color_plane_id_raw(this: *mut Self, val: u32) {
5353 unsafe {
5354 let val: u32 = ::std::mem::transmute(val);
5355 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5356 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5357 4usize,
5358 2u8,
5359 val as u64,
5360 )
5361 }
5362 }
5363 #[inline]
5364 pub fn slice_sao_luma_flag(&self) -> u32 {
5365 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
5366 }
5367 #[inline]
5368 pub fn set_slice_sao_luma_flag(&mut self, val: u32) {
5369 unsafe {
5370 let val: u32 = ::std::mem::transmute(val);
5371 self._bitfield_1.set(6usize, 1u8, val as u64)
5372 }
5373 }
5374 #[inline]
5375 pub unsafe fn slice_sao_luma_flag_raw(this: *const Self) -> u32 {
5376 unsafe {
5377 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5378 ::std::ptr::addr_of!((*this)._bitfield_1),
5379 6usize,
5380 1u8,
5381 ) as u32)
5382 }
5383 }
5384 #[inline]
5385 pub unsafe fn set_slice_sao_luma_flag_raw(this: *mut Self, val: u32) {
5386 unsafe {
5387 let val: u32 = ::std::mem::transmute(val);
5388 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5389 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5390 6usize,
5391 1u8,
5392 val as u64,
5393 )
5394 }
5395 }
5396 #[inline]
5397 pub fn slice_sao_chroma_flag(&self) -> u32 {
5398 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
5399 }
5400 #[inline]
5401 pub fn set_slice_sao_chroma_flag(&mut self, val: u32) {
5402 unsafe {
5403 let val: u32 = ::std::mem::transmute(val);
5404 self._bitfield_1.set(7usize, 1u8, val as u64)
5405 }
5406 }
5407 #[inline]
5408 pub unsafe fn slice_sao_chroma_flag_raw(this: *const Self) -> u32 {
5409 unsafe {
5410 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5411 ::std::ptr::addr_of!((*this)._bitfield_1),
5412 7usize,
5413 1u8,
5414 ) as u32)
5415 }
5416 }
5417 #[inline]
5418 pub unsafe fn set_slice_sao_chroma_flag_raw(this: *mut Self, val: u32) {
5419 unsafe {
5420 let val: u32 = ::std::mem::transmute(val);
5421 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5422 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5423 7usize,
5424 1u8,
5425 val as u64,
5426 )
5427 }
5428 }
5429 #[inline]
5430 pub fn mvd_l1_zero_flag(&self) -> u32 {
5431 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
5432 }
5433 #[inline]
5434 pub fn set_mvd_l1_zero_flag(&mut self, val: u32) {
5435 unsafe {
5436 let val: u32 = ::std::mem::transmute(val);
5437 self._bitfield_1.set(8usize, 1u8, val as u64)
5438 }
5439 }
5440 #[inline]
5441 pub unsafe fn mvd_l1_zero_flag_raw(this: *const Self) -> u32 {
5442 unsafe {
5443 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5444 ::std::ptr::addr_of!((*this)._bitfield_1),
5445 8usize,
5446 1u8,
5447 ) as u32)
5448 }
5449 }
5450 #[inline]
5451 pub unsafe fn set_mvd_l1_zero_flag_raw(this: *mut Self, val: u32) {
5452 unsafe {
5453 let val: u32 = ::std::mem::transmute(val);
5454 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5455 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5456 8usize,
5457 1u8,
5458 val as u64,
5459 )
5460 }
5461 }
5462 #[inline]
5463 pub fn cabac_init_flag(&self) -> u32 {
5464 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
5465 }
5466 #[inline]
5467 pub fn set_cabac_init_flag(&mut self, val: u32) {
5468 unsafe {
5469 let val: u32 = ::std::mem::transmute(val);
5470 self._bitfield_1.set(9usize, 1u8, val as u64)
5471 }
5472 }
5473 #[inline]
5474 pub unsafe fn cabac_init_flag_raw(this: *const Self) -> u32 {
5475 unsafe {
5476 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5477 ::std::ptr::addr_of!((*this)._bitfield_1),
5478 9usize,
5479 1u8,
5480 ) as u32)
5481 }
5482 }
5483 #[inline]
5484 pub unsafe fn set_cabac_init_flag_raw(this: *mut Self, val: u32) {
5485 unsafe {
5486 let val: u32 = ::std::mem::transmute(val);
5487 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5488 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5489 9usize,
5490 1u8,
5491 val as u64,
5492 )
5493 }
5494 }
5495 #[inline]
5496 pub fn slice_temporal_mvp_enabled_flag(&self) -> u32 {
5497 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
5498 }
5499 #[inline]
5500 pub fn set_slice_temporal_mvp_enabled_flag(&mut self, val: u32) {
5501 unsafe {
5502 let val: u32 = ::std::mem::transmute(val);
5503 self._bitfield_1.set(10usize, 1u8, val as u64)
5504 }
5505 }
5506 #[inline]
5507 pub unsafe fn slice_temporal_mvp_enabled_flag_raw(this: *const Self) -> u32 {
5508 unsafe {
5509 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5510 ::std::ptr::addr_of!((*this)._bitfield_1),
5511 10usize,
5512 1u8,
5513 ) as u32)
5514 }
5515 }
5516 #[inline]
5517 pub unsafe fn set_slice_temporal_mvp_enabled_flag_raw(this: *mut Self, val: u32) {
5518 unsafe {
5519 let val: u32 = ::std::mem::transmute(val);
5520 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5521 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5522 10usize,
5523 1u8,
5524 val as u64,
5525 )
5526 }
5527 }
5528 #[inline]
5529 pub fn slice_deblocking_filter_disabled_flag(&self) -> u32 {
5530 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
5531 }
5532 #[inline]
5533 pub fn set_slice_deblocking_filter_disabled_flag(&mut self, val: u32) {
5534 unsafe {
5535 let val: u32 = ::std::mem::transmute(val);
5536 self._bitfield_1.set(11usize, 1u8, val as u64)
5537 }
5538 }
5539 #[inline]
5540 pub unsafe fn slice_deblocking_filter_disabled_flag_raw(this: *const Self) -> u32 {
5541 unsafe {
5542 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5543 ::std::ptr::addr_of!((*this)._bitfield_1),
5544 11usize,
5545 1u8,
5546 ) as u32)
5547 }
5548 }
5549 #[inline]
5550 pub unsafe fn set_slice_deblocking_filter_disabled_flag_raw(this: *mut Self, val: u32) {
5551 unsafe {
5552 let val: u32 = ::std::mem::transmute(val);
5553 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5554 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5555 11usize,
5556 1u8,
5557 val as u64,
5558 )
5559 }
5560 }
5561 #[inline]
5562 pub fn collocated_from_l0_flag(&self) -> u32 {
5563 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
5564 }
5565 #[inline]
5566 pub fn set_collocated_from_l0_flag(&mut self, val: u32) {
5567 unsafe {
5568 let val: u32 = ::std::mem::transmute(val);
5569 self._bitfield_1.set(12usize, 1u8, val as u64)
5570 }
5571 }
5572 #[inline]
5573 pub unsafe fn collocated_from_l0_flag_raw(this: *const Self) -> u32 {
5574 unsafe {
5575 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5576 ::std::ptr::addr_of!((*this)._bitfield_1),
5577 12usize,
5578 1u8,
5579 ) as u32)
5580 }
5581 }
5582 #[inline]
5583 pub unsafe fn set_collocated_from_l0_flag_raw(this: *mut Self, val: u32) {
5584 unsafe {
5585 let val: u32 = ::std::mem::transmute(val);
5586 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5587 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5588 12usize,
5589 1u8,
5590 val as u64,
5591 )
5592 }
5593 }
5594 #[inline]
5595 pub fn slice_loop_filter_across_slices_enabled_flag(&self) -> u32 {
5596 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
5597 }
5598 #[inline]
5599 pub fn set_slice_loop_filter_across_slices_enabled_flag(&mut self, val: u32) {
5600 unsafe {
5601 let val: u32 = ::std::mem::transmute(val);
5602 self._bitfield_1.set(13usize, 1u8, val as u64)
5603 }
5604 }
5605 #[inline]
5606 pub unsafe fn slice_loop_filter_across_slices_enabled_flag_raw(this: *const Self) -> u32 {
5607 unsafe {
5608 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5609 ::std::ptr::addr_of!((*this)._bitfield_1),
5610 13usize,
5611 1u8,
5612 ) as u32)
5613 }
5614 }
5615 #[inline]
5616 pub unsafe fn set_slice_loop_filter_across_slices_enabled_flag_raw(this: *mut Self, val: u32) {
5617 unsafe {
5618 let val: u32 = ::std::mem::transmute(val);
5619 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5620 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5621 13usize,
5622 1u8,
5623 val as u64,
5624 )
5625 }
5626 }
5627 #[inline]
5628 pub fn reserved(&self) -> u32 {
5629 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) }
5630 }
5631 #[inline]
5632 pub fn set_reserved(&mut self, val: u32) {
5633 unsafe {
5634 let val: u32 = ::std::mem::transmute(val);
5635 self._bitfield_1.set(14usize, 18u8, val as u64)
5636 }
5637 }
5638 #[inline]
5639 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
5640 unsafe {
5641 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5642 ::std::ptr::addr_of!((*this)._bitfield_1),
5643 14usize,
5644 18u8,
5645 ) as u32)
5646 }
5647 }
5648 #[inline]
5649 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
5650 unsafe {
5651 let val: u32 = ::std::mem::transmute(val);
5652 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5653 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5654 14usize,
5655 18u8,
5656 val as u64,
5657 )
5658 }
5659 }
5660 #[inline]
5661 pub fn new_bitfield_1(
5662 LastSliceOfPic: u32,
5663 dependent_slice_segment_flag: u32,
5664 slice_type: u32,
5665 color_plane_id: u32,
5666 slice_sao_luma_flag: u32,
5667 slice_sao_chroma_flag: u32,
5668 mvd_l1_zero_flag: u32,
5669 cabac_init_flag: u32,
5670 slice_temporal_mvp_enabled_flag: u32,
5671 slice_deblocking_filter_disabled_flag: u32,
5672 collocated_from_l0_flag: u32,
5673 slice_loop_filter_across_slices_enabled_flag: u32,
5674 reserved: u32,
5675 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
5676 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
5677 __bindgen_bitfield_unit.set(0usize, 1u8, {
5678 let LastSliceOfPic: u32 = unsafe { ::std::mem::transmute(LastSliceOfPic) };
5679 LastSliceOfPic as u64
5680 });
5681 __bindgen_bitfield_unit.set(1usize, 1u8, {
5682 let dependent_slice_segment_flag: u32 = unsafe { ::std::mem::transmute(dependent_slice_segment_flag) };
5683 dependent_slice_segment_flag as u64
5684 });
5685 __bindgen_bitfield_unit.set(2usize, 2u8, {
5686 let slice_type: u32 = unsafe { ::std::mem::transmute(slice_type) };
5687 slice_type as u64
5688 });
5689 __bindgen_bitfield_unit.set(4usize, 2u8, {
5690 let color_plane_id: u32 = unsafe { ::std::mem::transmute(color_plane_id) };
5691 color_plane_id as u64
5692 });
5693 __bindgen_bitfield_unit.set(6usize, 1u8, {
5694 let slice_sao_luma_flag: u32 = unsafe { ::std::mem::transmute(slice_sao_luma_flag) };
5695 slice_sao_luma_flag as u64
5696 });
5697 __bindgen_bitfield_unit.set(7usize, 1u8, {
5698 let slice_sao_chroma_flag: u32 = unsafe { ::std::mem::transmute(slice_sao_chroma_flag) };
5699 slice_sao_chroma_flag as u64
5700 });
5701 __bindgen_bitfield_unit.set(8usize, 1u8, {
5702 let mvd_l1_zero_flag: u32 = unsafe { ::std::mem::transmute(mvd_l1_zero_flag) };
5703 mvd_l1_zero_flag as u64
5704 });
5705 __bindgen_bitfield_unit.set(9usize, 1u8, {
5706 let cabac_init_flag: u32 = unsafe { ::std::mem::transmute(cabac_init_flag) };
5707 cabac_init_flag as u64
5708 });
5709 __bindgen_bitfield_unit.set(10usize, 1u8, {
5710 let slice_temporal_mvp_enabled_flag: u32 =
5711 unsafe { ::std::mem::transmute(slice_temporal_mvp_enabled_flag) };
5712 slice_temporal_mvp_enabled_flag as u64
5713 });
5714 __bindgen_bitfield_unit.set(11usize, 1u8, {
5715 let slice_deblocking_filter_disabled_flag: u32 =
5716 unsafe { ::std::mem::transmute(slice_deblocking_filter_disabled_flag) };
5717 slice_deblocking_filter_disabled_flag as u64
5718 });
5719 __bindgen_bitfield_unit.set(12usize, 1u8, {
5720 let collocated_from_l0_flag: u32 = unsafe { ::std::mem::transmute(collocated_from_l0_flag) };
5721 collocated_from_l0_flag as u64
5722 });
5723 __bindgen_bitfield_unit.set(13usize, 1u8, {
5724 let slice_loop_filter_across_slices_enabled_flag: u32 =
5725 unsafe { ::std::mem::transmute(slice_loop_filter_across_slices_enabled_flag) };
5726 slice_loop_filter_across_slices_enabled_flag as u64
5727 });
5728 __bindgen_bitfield_unit.set(14usize, 18u8, {
5729 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
5730 reserved as u64
5731 });
5732 __bindgen_bitfield_unit
5733 }
5734}
5735impl Default for _VASliceParameterBufferHEVC__bindgen_ty_1 {
5736 fn default() -> Self {
5737 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5738 unsafe {
5739 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5740 s.assume_init()
5741 }
5742 }
5743}
5744impl Default for _VASliceParameterBufferHEVC {
5745 fn default() -> Self {
5746 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5747 unsafe {
5748 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5749 s.assume_init()
5750 }
5751 }
5752}
5753#[doc = " \\brief HEVC Slice Parameter Buffer Structure For Long Format\n\n VASliceParameterBufferHEVC structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice.\n\n For short format, this data structure is not sent by application.\n"]
5754pub type VASliceParameterBufferHEVC = _VASliceParameterBufferHEVC;
5755#[doc = " \\brief HEVC Extented Slice Parameter Buffer Structure For Long Format\n\n This data structure contains extension profiles (range extension and screen content).\n\n VASliceParameterBufferHEVCRext structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice with VASliceParameterBufferHEVC in a single buffer of\n \\ref VASliceParameterBufferHEVCExtension and the buffer type is same as \\ref\n VASliceParameterBufferHEVC.\n\n For short format, this data structure is not sent by application.\n"]
5756#[repr(C)]
5757#[derive(Copy, Clone)]
5758pub struct _VASliceParameterBufferHEVCRext {
5759 pub luma_offset_l0: [i16; 15usize],
5760 pub ChromaOffsetL0: [[i16; 2usize]; 15usize],
5761 pub luma_offset_l1: [i16; 15usize],
5762 pub ChromaOffsetL1: [[i16; 2usize]; 15usize],
5763 pub slice_ext_flags: _VASliceParameterBufferHEVCRext__bindgen_ty_1,
5764 #[doc = " \\brief Screen Content Extension parameters.\n data range [-12..12]"]
5765 pub slice_act_y_qp_offset: i8,
5766 pub slice_act_cb_qp_offset: i8,
5767 pub slice_act_cr_qp_offset: i8,
5768}
5769#[repr(C)]
5770#[derive(Copy, Clone)]
5771pub union _VASliceParameterBufferHEVCRext__bindgen_ty_1 {
5772 pub bits: _VASliceParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1,
5773 pub value: u32,
5774}
5775#[repr(C)]
5776#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
5777pub struct _VASliceParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1 {
5778 pub _bitfield_align_1: [u32; 0],
5779 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
5780}
5781impl _VASliceParameterBufferHEVCRext__bindgen_ty_1__bindgen_ty_1 {
5782 #[inline]
5783 pub fn cu_chroma_qp_offset_enabled_flag(&self) -> u32 {
5784 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
5785 }
5786 #[inline]
5787 pub fn set_cu_chroma_qp_offset_enabled_flag(&mut self, val: u32) {
5788 unsafe {
5789 let val: u32 = ::std::mem::transmute(val);
5790 self._bitfield_1.set(0usize, 1u8, val as u64)
5791 }
5792 }
5793 #[inline]
5794 pub unsafe fn cu_chroma_qp_offset_enabled_flag_raw(this: *const Self) -> u32 {
5795 unsafe {
5796 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5797 ::std::ptr::addr_of!((*this)._bitfield_1),
5798 0usize,
5799 1u8,
5800 ) as u32)
5801 }
5802 }
5803 #[inline]
5804 pub unsafe fn set_cu_chroma_qp_offset_enabled_flag_raw(this: *mut Self, val: u32) {
5805 unsafe {
5806 let val: u32 = ::std::mem::transmute(val);
5807 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5808 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5809 0usize,
5810 1u8,
5811 val as u64,
5812 )
5813 }
5814 }
5815 #[inline]
5816 pub fn use_integer_mv_flag(&self) -> u32 {
5817 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
5818 }
5819 #[inline]
5820 pub fn set_use_integer_mv_flag(&mut self, val: u32) {
5821 unsafe {
5822 let val: u32 = ::std::mem::transmute(val);
5823 self._bitfield_1.set(1usize, 1u8, val as u64)
5824 }
5825 }
5826 #[inline]
5827 pub unsafe fn use_integer_mv_flag_raw(this: *const Self) -> u32 {
5828 unsafe {
5829 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5830 ::std::ptr::addr_of!((*this)._bitfield_1),
5831 1usize,
5832 1u8,
5833 ) as u32)
5834 }
5835 }
5836 #[inline]
5837 pub unsafe fn set_use_integer_mv_flag_raw(this: *mut Self, val: u32) {
5838 unsafe {
5839 let val: u32 = ::std::mem::transmute(val);
5840 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5841 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5842 1usize,
5843 1u8,
5844 val as u64,
5845 )
5846 }
5847 }
5848 #[inline]
5849 pub fn reserved(&self) -> u32 {
5850 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) }
5851 }
5852 #[inline]
5853 pub fn set_reserved(&mut self, val: u32) {
5854 unsafe {
5855 let val: u32 = ::std::mem::transmute(val);
5856 self._bitfield_1.set(2usize, 30u8, val as u64)
5857 }
5858 }
5859 #[inline]
5860 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
5861 unsafe {
5862 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5863 ::std::ptr::addr_of!((*this)._bitfield_1),
5864 2usize,
5865 30u8,
5866 ) as u32)
5867 }
5868 }
5869 #[inline]
5870 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
5871 unsafe {
5872 let val: u32 = ::std::mem::transmute(val);
5873 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5874 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5875 2usize,
5876 30u8,
5877 val as u64,
5878 )
5879 }
5880 }
5881 #[inline]
5882 pub fn new_bitfield_1(
5883 cu_chroma_qp_offset_enabled_flag: u32,
5884 use_integer_mv_flag: u32,
5885 reserved: u32,
5886 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
5887 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
5888 __bindgen_bitfield_unit.set(0usize, 1u8, {
5889 let cu_chroma_qp_offset_enabled_flag: u32 =
5890 unsafe { ::std::mem::transmute(cu_chroma_qp_offset_enabled_flag) };
5891 cu_chroma_qp_offset_enabled_flag as u64
5892 });
5893 __bindgen_bitfield_unit.set(1usize, 1u8, {
5894 let use_integer_mv_flag: u32 = unsafe { ::std::mem::transmute(use_integer_mv_flag) };
5895 use_integer_mv_flag as u64
5896 });
5897 __bindgen_bitfield_unit.set(2usize, 30u8, {
5898 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
5899 reserved as u64
5900 });
5901 __bindgen_bitfield_unit
5902 }
5903}
5904impl Default for _VASliceParameterBufferHEVCRext__bindgen_ty_1 {
5905 fn default() -> Self {
5906 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5907 unsafe {
5908 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5909 s.assume_init()
5910 }
5911 }
5912}
5913impl Default for _VASliceParameterBufferHEVCRext {
5914 fn default() -> Self {
5915 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5916 unsafe {
5917 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5918 s.assume_init()
5919 }
5920 }
5921}
5922#[doc = " \\brief HEVC Extented Slice Parameter Buffer Structure For Long Format\n\n This data structure contains extension profiles (range extension and screen content).\n\n VASliceParameterBufferHEVCRext structure should be accompanied by a\n slice data buffer, which holds the whole raw slice NAL unit bit streams\n including start code prefix and emulation prevention bytes not removed.\n\n This structure conveys parameters related to slice segment header and should\n be sent once per slice with VASliceParameterBufferHEVC in a single buffer of\n \\ref VASliceParameterBufferHEVCExtension and the buffer type is same as \\ref\n VASliceParameterBufferHEVC.\n\n For short format, this data structure is not sent by application.\n"]
5923pub type VASliceParameterBufferHEVCRext = _VASliceParameterBufferHEVCRext;
5924#[doc = " \\brief HEVC Inverse Quantization Matrix Buffer Structure\n\n This structure is sent once per frame,\n and only when scaling_list_enabled_flag = 1.\n When sps_scaling_list_data_present_flag = 0, app still\n needs to send in this structure with default matrix values.\n\n Matrix entries are in raster scan order which follows HEVC spec."]
5925#[repr(C)]
5926#[derive(Debug, Copy, Clone, PartialEq, Eq)]
5927pub struct _VAIQMatrixBufferHEVC {
5928 #[doc = " \\brief scaling lists,\n corresponds to same HEVC spec syntax element\n ScalingList[ i ][ MatrixID ][ j ].\n\n \\brief 4x4 scaling,\n correspongs i = 0, MatrixID is in the range of 0 to 5,\n inclusive. And j is in the range of 0 to 15, inclusive."]
5929 pub ScalingList4x4: [[u8; 16usize]; 6usize],
5930 #[doc = " \\brief 8x8 scaling,\n correspongs i = 1, MatrixID is in the range of 0 to 5,\n inclusive. And j is in the range of 0 to 63, inclusive."]
5931 pub ScalingList8x8: [[u8; 64usize]; 6usize],
5932 #[doc = " \\brief 16x16 scaling,\n correspongs i = 2, MatrixID is in the range of 0 to 5,\n inclusive. And j is in the range of 0 to 63, inclusive."]
5933 pub ScalingList16x16: [[u8; 64usize]; 6usize],
5934 #[doc = " \\brief 32x32 scaling,\n correspongs i = 3, MatrixID is in the range of 0 to 1,\n inclusive. And j is in the range of 0 to 63, inclusive."]
5935 pub ScalingList32x32: [[u8; 64usize]; 2usize],
5936 #[doc = " \\brief DC values of the 16x16 scaling lists,\n corresponds to HEVC spec syntax\n scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8\n with sizeID = 2 and matrixID in the range of 0 to 5, inclusive."]
5937 pub ScalingListDC16x16: [u8; 6usize],
5938 #[doc = " \\brief DC values of the 32x32 scaling lists,\n corresponds to HEVC spec syntax\n scaling_list_dc_coef_minus8[ sizeID - 2 ][ matrixID ] + 8\n with sizeID = 3 and matrixID in the range of 0 to 1, inclusive."]
5939 pub ScalingListDC32x32: [u8; 2usize],
5940 #[doc = " \\brief Reserved bytes for future use, must be zero"]
5941 pub va_reserved: [u32; 4usize],
5942}
5943impl Default for _VAIQMatrixBufferHEVC {
5944 fn default() -> Self {
5945 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
5946 unsafe {
5947 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
5948 s.assume_init()
5949 }
5950 }
5951}
5952#[doc = " \\brief HEVC Inverse Quantization Matrix Buffer Structure\n\n This structure is sent once per frame,\n and only when scaling_list_enabled_flag = 1.\n When sps_scaling_list_data_present_flag = 0, app still\n needs to send in this structure with default matrix values.\n\n Matrix entries are in raster scan order which follows HEVC spec."]
5953pub type VAIQMatrixBufferHEVC = _VAIQMatrixBufferHEVC;
5954#[doc = " Attribute value for VAConfigAttribEncHEVCFeatures.\n\n This attribute decribes the supported features of an HEVC/H.265\n encoder configuration.\n\n All of the field values in this attribute are VA_FEATURE_* values,\n indicating support for the corresponding feature."]
5955#[repr(C)]
5956#[derive(Copy, Clone)]
5957pub union VAConfigAttribValEncHEVCFeatures {
5958 pub bits: VAConfigAttribValEncHEVCFeatures__bindgen_ty_1,
5959 pub value: u32,
5960}
5961#[repr(C)]
5962#[repr(align(4))]
5963#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
5964pub struct VAConfigAttribValEncHEVCFeatures__bindgen_ty_1 {
5965 pub _bitfield_align_1: [u8; 0],
5966 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
5967}
5968impl VAConfigAttribValEncHEVCFeatures__bindgen_ty_1 {
5969 #[inline]
5970 pub fn separate_colour_planes(&self) -> u32 {
5971 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
5972 }
5973 #[inline]
5974 pub fn set_separate_colour_planes(&mut self, val: u32) {
5975 unsafe {
5976 let val: u32 = ::std::mem::transmute(val);
5977 self._bitfield_1.set(0usize, 2u8, val as u64)
5978 }
5979 }
5980 #[inline]
5981 pub unsafe fn separate_colour_planes_raw(this: *const Self) -> u32 {
5982 unsafe {
5983 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
5984 ::std::ptr::addr_of!((*this)._bitfield_1),
5985 0usize,
5986 2u8,
5987 ) as u32)
5988 }
5989 }
5990 #[inline]
5991 pub unsafe fn set_separate_colour_planes_raw(this: *mut Self, val: u32) {
5992 unsafe {
5993 let val: u32 = ::std::mem::transmute(val);
5994 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
5995 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
5996 0usize,
5997 2u8,
5998 val as u64,
5999 )
6000 }
6001 }
6002 #[inline]
6003 pub fn scaling_lists(&self) -> u32 {
6004 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) }
6005 }
6006 #[inline]
6007 pub fn set_scaling_lists(&mut self, val: u32) {
6008 unsafe {
6009 let val: u32 = ::std::mem::transmute(val);
6010 self._bitfield_1.set(2usize, 2u8, val as u64)
6011 }
6012 }
6013 #[inline]
6014 pub unsafe fn scaling_lists_raw(this: *const Self) -> u32 {
6015 unsafe {
6016 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6017 ::std::ptr::addr_of!((*this)._bitfield_1),
6018 2usize,
6019 2u8,
6020 ) as u32)
6021 }
6022 }
6023 #[inline]
6024 pub unsafe fn set_scaling_lists_raw(this: *mut Self, val: u32) {
6025 unsafe {
6026 let val: u32 = ::std::mem::transmute(val);
6027 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6028 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6029 2usize,
6030 2u8,
6031 val as u64,
6032 )
6033 }
6034 }
6035 #[inline]
6036 pub fn amp(&self) -> u32 {
6037 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) }
6038 }
6039 #[inline]
6040 pub fn set_amp(&mut self, val: u32) {
6041 unsafe {
6042 let val: u32 = ::std::mem::transmute(val);
6043 self._bitfield_1.set(4usize, 2u8, val as u64)
6044 }
6045 }
6046 #[inline]
6047 pub unsafe fn amp_raw(this: *const Self) -> u32 {
6048 unsafe {
6049 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6050 ::std::ptr::addr_of!((*this)._bitfield_1),
6051 4usize,
6052 2u8,
6053 ) as u32)
6054 }
6055 }
6056 #[inline]
6057 pub unsafe fn set_amp_raw(this: *mut Self, val: u32) {
6058 unsafe {
6059 let val: u32 = ::std::mem::transmute(val);
6060 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6061 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6062 4usize,
6063 2u8,
6064 val as u64,
6065 )
6066 }
6067 }
6068 #[inline]
6069 pub fn sao(&self) -> u32 {
6070 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) }
6071 }
6072 #[inline]
6073 pub fn set_sao(&mut self, val: u32) {
6074 unsafe {
6075 let val: u32 = ::std::mem::transmute(val);
6076 self._bitfield_1.set(6usize, 2u8, val as u64)
6077 }
6078 }
6079 #[inline]
6080 pub unsafe fn sao_raw(this: *const Self) -> u32 {
6081 unsafe {
6082 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6083 ::std::ptr::addr_of!((*this)._bitfield_1),
6084 6usize,
6085 2u8,
6086 ) as u32)
6087 }
6088 }
6089 #[inline]
6090 pub unsafe fn set_sao_raw(this: *mut Self, val: u32) {
6091 unsafe {
6092 let val: u32 = ::std::mem::transmute(val);
6093 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6094 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6095 6usize,
6096 2u8,
6097 val as u64,
6098 )
6099 }
6100 }
6101 #[inline]
6102 pub fn pcm(&self) -> u32 {
6103 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) }
6104 }
6105 #[inline]
6106 pub fn set_pcm(&mut self, val: u32) {
6107 unsafe {
6108 let val: u32 = ::std::mem::transmute(val);
6109 self._bitfield_1.set(8usize, 2u8, val as u64)
6110 }
6111 }
6112 #[inline]
6113 pub unsafe fn pcm_raw(this: *const Self) -> u32 {
6114 unsafe {
6115 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6116 ::std::ptr::addr_of!((*this)._bitfield_1),
6117 8usize,
6118 2u8,
6119 ) as u32)
6120 }
6121 }
6122 #[inline]
6123 pub unsafe fn set_pcm_raw(this: *mut Self, val: u32) {
6124 unsafe {
6125 let val: u32 = ::std::mem::transmute(val);
6126 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6127 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6128 8usize,
6129 2u8,
6130 val as u64,
6131 )
6132 }
6133 }
6134 #[inline]
6135 pub fn temporal_mvp(&self) -> u32 {
6136 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) }
6137 }
6138 #[inline]
6139 pub fn set_temporal_mvp(&mut self, val: u32) {
6140 unsafe {
6141 let val: u32 = ::std::mem::transmute(val);
6142 self._bitfield_1.set(10usize, 2u8, val as u64)
6143 }
6144 }
6145 #[inline]
6146 pub unsafe fn temporal_mvp_raw(this: *const Self) -> u32 {
6147 unsafe {
6148 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6149 ::std::ptr::addr_of!((*this)._bitfield_1),
6150 10usize,
6151 2u8,
6152 ) as u32)
6153 }
6154 }
6155 #[inline]
6156 pub unsafe fn set_temporal_mvp_raw(this: *mut Self, val: u32) {
6157 unsafe {
6158 let val: u32 = ::std::mem::transmute(val);
6159 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6160 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6161 10usize,
6162 2u8,
6163 val as u64,
6164 )
6165 }
6166 }
6167 #[inline]
6168 pub fn strong_intra_smoothing(&self) -> u32 {
6169 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) }
6170 }
6171 #[inline]
6172 pub fn set_strong_intra_smoothing(&mut self, val: u32) {
6173 unsafe {
6174 let val: u32 = ::std::mem::transmute(val);
6175 self._bitfield_1.set(12usize, 2u8, val as u64)
6176 }
6177 }
6178 #[inline]
6179 pub unsafe fn strong_intra_smoothing_raw(this: *const Self) -> u32 {
6180 unsafe {
6181 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6182 ::std::ptr::addr_of!((*this)._bitfield_1),
6183 12usize,
6184 2u8,
6185 ) as u32)
6186 }
6187 }
6188 #[inline]
6189 pub unsafe fn set_strong_intra_smoothing_raw(this: *mut Self, val: u32) {
6190 unsafe {
6191 let val: u32 = ::std::mem::transmute(val);
6192 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6193 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6194 12usize,
6195 2u8,
6196 val as u64,
6197 )
6198 }
6199 }
6200 #[inline]
6201 pub fn dependent_slices(&self) -> u32 {
6202 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) }
6203 }
6204 #[inline]
6205 pub fn set_dependent_slices(&mut self, val: u32) {
6206 unsafe {
6207 let val: u32 = ::std::mem::transmute(val);
6208 self._bitfield_1.set(14usize, 2u8, val as u64)
6209 }
6210 }
6211 #[inline]
6212 pub unsafe fn dependent_slices_raw(this: *const Self) -> u32 {
6213 unsafe {
6214 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6215 ::std::ptr::addr_of!((*this)._bitfield_1),
6216 14usize,
6217 2u8,
6218 ) as u32)
6219 }
6220 }
6221 #[inline]
6222 pub unsafe fn set_dependent_slices_raw(this: *mut Self, val: u32) {
6223 unsafe {
6224 let val: u32 = ::std::mem::transmute(val);
6225 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6226 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6227 14usize,
6228 2u8,
6229 val as u64,
6230 )
6231 }
6232 }
6233 #[inline]
6234 pub fn sign_data_hiding(&self) -> u32 {
6235 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u32) }
6236 }
6237 #[inline]
6238 pub fn set_sign_data_hiding(&mut self, val: u32) {
6239 unsafe {
6240 let val: u32 = ::std::mem::transmute(val);
6241 self._bitfield_1.set(16usize, 2u8, val as u64)
6242 }
6243 }
6244 #[inline]
6245 pub unsafe fn sign_data_hiding_raw(this: *const Self) -> u32 {
6246 unsafe {
6247 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6248 ::std::ptr::addr_of!((*this)._bitfield_1),
6249 16usize,
6250 2u8,
6251 ) as u32)
6252 }
6253 }
6254 #[inline]
6255 pub unsafe fn set_sign_data_hiding_raw(this: *mut Self, val: u32) {
6256 unsafe {
6257 let val: u32 = ::std::mem::transmute(val);
6258 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6259 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6260 16usize,
6261 2u8,
6262 val as u64,
6263 )
6264 }
6265 }
6266 #[inline]
6267 pub fn constrained_intra_pred(&self) -> u32 {
6268 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) }
6269 }
6270 #[inline]
6271 pub fn set_constrained_intra_pred(&mut self, val: u32) {
6272 unsafe {
6273 let val: u32 = ::std::mem::transmute(val);
6274 self._bitfield_1.set(18usize, 2u8, val as u64)
6275 }
6276 }
6277 #[inline]
6278 pub unsafe fn constrained_intra_pred_raw(this: *const Self) -> u32 {
6279 unsafe {
6280 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6281 ::std::ptr::addr_of!((*this)._bitfield_1),
6282 18usize,
6283 2u8,
6284 ) as u32)
6285 }
6286 }
6287 #[inline]
6288 pub unsafe fn set_constrained_intra_pred_raw(this: *mut Self, val: u32) {
6289 unsafe {
6290 let val: u32 = ::std::mem::transmute(val);
6291 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6292 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6293 18usize,
6294 2u8,
6295 val as u64,
6296 )
6297 }
6298 }
6299 #[inline]
6300 pub fn transform_skip(&self) -> u32 {
6301 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 2u8) as u32) }
6302 }
6303 #[inline]
6304 pub fn set_transform_skip(&mut self, val: u32) {
6305 unsafe {
6306 let val: u32 = ::std::mem::transmute(val);
6307 self._bitfield_1.set(20usize, 2u8, val as u64)
6308 }
6309 }
6310 #[inline]
6311 pub unsafe fn transform_skip_raw(this: *const Self) -> u32 {
6312 unsafe {
6313 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6314 ::std::ptr::addr_of!((*this)._bitfield_1),
6315 20usize,
6316 2u8,
6317 ) as u32)
6318 }
6319 }
6320 #[inline]
6321 pub unsafe fn set_transform_skip_raw(this: *mut Self, val: u32) {
6322 unsafe {
6323 let val: u32 = ::std::mem::transmute(val);
6324 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6325 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6326 20usize,
6327 2u8,
6328 val as u64,
6329 )
6330 }
6331 }
6332 #[inline]
6333 pub fn cu_qp_delta(&self) -> u32 {
6334 unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 2u8) as u32) }
6335 }
6336 #[inline]
6337 pub fn set_cu_qp_delta(&mut self, val: u32) {
6338 unsafe {
6339 let val: u32 = ::std::mem::transmute(val);
6340 self._bitfield_1.set(22usize, 2u8, val as u64)
6341 }
6342 }
6343 #[inline]
6344 pub unsafe fn cu_qp_delta_raw(this: *const Self) -> u32 {
6345 unsafe {
6346 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6347 ::std::ptr::addr_of!((*this)._bitfield_1),
6348 22usize,
6349 2u8,
6350 ) as u32)
6351 }
6352 }
6353 #[inline]
6354 pub unsafe fn set_cu_qp_delta_raw(this: *mut Self, val: u32) {
6355 unsafe {
6356 let val: u32 = ::std::mem::transmute(val);
6357 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6358 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6359 22usize,
6360 2u8,
6361 val as u64,
6362 )
6363 }
6364 }
6365 #[inline]
6366 pub fn weighted_prediction(&self) -> u32 {
6367 unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 2u8) as u32) }
6368 }
6369 #[inline]
6370 pub fn set_weighted_prediction(&mut self, val: u32) {
6371 unsafe {
6372 let val: u32 = ::std::mem::transmute(val);
6373 self._bitfield_1.set(24usize, 2u8, val as u64)
6374 }
6375 }
6376 #[inline]
6377 pub unsafe fn weighted_prediction_raw(this: *const Self) -> u32 {
6378 unsafe {
6379 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6380 ::std::ptr::addr_of!((*this)._bitfield_1),
6381 24usize,
6382 2u8,
6383 ) as u32)
6384 }
6385 }
6386 #[inline]
6387 pub unsafe fn set_weighted_prediction_raw(this: *mut Self, val: u32) {
6388 unsafe {
6389 let val: u32 = ::std::mem::transmute(val);
6390 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6391 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6392 24usize,
6393 2u8,
6394 val as u64,
6395 )
6396 }
6397 }
6398 #[inline]
6399 pub fn transquant_bypass(&self) -> u32 {
6400 unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 2u8) as u32) }
6401 }
6402 #[inline]
6403 pub fn set_transquant_bypass(&mut self, val: u32) {
6404 unsafe {
6405 let val: u32 = ::std::mem::transmute(val);
6406 self._bitfield_1.set(26usize, 2u8, val as u64)
6407 }
6408 }
6409 #[inline]
6410 pub unsafe fn transquant_bypass_raw(this: *const Self) -> u32 {
6411 unsafe {
6412 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6413 ::std::ptr::addr_of!((*this)._bitfield_1),
6414 26usize,
6415 2u8,
6416 ) as u32)
6417 }
6418 }
6419 #[inline]
6420 pub unsafe fn set_transquant_bypass_raw(this: *mut Self, val: u32) {
6421 unsafe {
6422 let val: u32 = ::std::mem::transmute(val);
6423 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6424 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6425 26usize,
6426 2u8,
6427 val as u64,
6428 )
6429 }
6430 }
6431 #[inline]
6432 pub fn deblocking_filter_disable(&self) -> u32 {
6433 unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 2u8) as u32) }
6434 }
6435 #[inline]
6436 pub fn set_deblocking_filter_disable(&mut self, val: u32) {
6437 unsafe {
6438 let val: u32 = ::std::mem::transmute(val);
6439 self._bitfield_1.set(28usize, 2u8, val as u64)
6440 }
6441 }
6442 #[inline]
6443 pub unsafe fn deblocking_filter_disable_raw(this: *const Self) -> u32 {
6444 unsafe {
6445 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6446 ::std::ptr::addr_of!((*this)._bitfield_1),
6447 28usize,
6448 2u8,
6449 ) as u32)
6450 }
6451 }
6452 #[inline]
6453 pub unsafe fn set_deblocking_filter_disable_raw(this: *mut Self, val: u32) {
6454 unsafe {
6455 let val: u32 = ::std::mem::transmute(val);
6456 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6457 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6458 28usize,
6459 2u8,
6460 val as u64,
6461 )
6462 }
6463 }
6464 #[inline]
6465 pub fn reserved(&self) -> u32 {
6466 unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 2u8) as u32) }
6467 }
6468 #[inline]
6469 pub fn set_reserved(&mut self, val: u32) {
6470 unsafe {
6471 let val: u32 = ::std::mem::transmute(val);
6472 self._bitfield_1.set(30usize, 2u8, val as u64)
6473 }
6474 }
6475 #[inline]
6476 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
6477 unsafe {
6478 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6479 ::std::ptr::addr_of!((*this)._bitfield_1),
6480 30usize,
6481 2u8,
6482 ) as u32)
6483 }
6484 }
6485 #[inline]
6486 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
6487 unsafe {
6488 let val: u32 = ::std::mem::transmute(val);
6489 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6490 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6491 30usize,
6492 2u8,
6493 val as u64,
6494 )
6495 }
6496 }
6497 #[inline]
6498 pub fn new_bitfield_1(
6499 separate_colour_planes: u32,
6500 scaling_lists: u32,
6501 amp: u32,
6502 sao: u32,
6503 pcm: u32,
6504 temporal_mvp: u32,
6505 strong_intra_smoothing: u32,
6506 dependent_slices: u32,
6507 sign_data_hiding: u32,
6508 constrained_intra_pred: u32,
6509 transform_skip: u32,
6510 cu_qp_delta: u32,
6511 weighted_prediction: u32,
6512 transquant_bypass: u32,
6513 deblocking_filter_disable: u32,
6514 reserved: u32,
6515 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
6516 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
6517 __bindgen_bitfield_unit.set(0usize, 2u8, {
6518 let separate_colour_planes: u32 = unsafe { ::std::mem::transmute(separate_colour_planes) };
6519 separate_colour_planes as u64
6520 });
6521 __bindgen_bitfield_unit.set(2usize, 2u8, {
6522 let scaling_lists: u32 = unsafe { ::std::mem::transmute(scaling_lists) };
6523 scaling_lists as u64
6524 });
6525 __bindgen_bitfield_unit.set(4usize, 2u8, {
6526 let amp: u32 = unsafe { ::std::mem::transmute(amp) };
6527 amp as u64
6528 });
6529 __bindgen_bitfield_unit.set(6usize, 2u8, {
6530 let sao: u32 = unsafe { ::std::mem::transmute(sao) };
6531 sao as u64
6532 });
6533 __bindgen_bitfield_unit.set(8usize, 2u8, {
6534 let pcm: u32 = unsafe { ::std::mem::transmute(pcm) };
6535 pcm as u64
6536 });
6537 __bindgen_bitfield_unit.set(10usize, 2u8, {
6538 let temporal_mvp: u32 = unsafe { ::std::mem::transmute(temporal_mvp) };
6539 temporal_mvp as u64
6540 });
6541 __bindgen_bitfield_unit.set(12usize, 2u8, {
6542 let strong_intra_smoothing: u32 = unsafe { ::std::mem::transmute(strong_intra_smoothing) };
6543 strong_intra_smoothing as u64
6544 });
6545 __bindgen_bitfield_unit.set(14usize, 2u8, {
6546 let dependent_slices: u32 = unsafe { ::std::mem::transmute(dependent_slices) };
6547 dependent_slices as u64
6548 });
6549 __bindgen_bitfield_unit.set(16usize, 2u8, {
6550 let sign_data_hiding: u32 = unsafe { ::std::mem::transmute(sign_data_hiding) };
6551 sign_data_hiding as u64
6552 });
6553 __bindgen_bitfield_unit.set(18usize, 2u8, {
6554 let constrained_intra_pred: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred) };
6555 constrained_intra_pred as u64
6556 });
6557 __bindgen_bitfield_unit.set(20usize, 2u8, {
6558 let transform_skip: u32 = unsafe { ::std::mem::transmute(transform_skip) };
6559 transform_skip as u64
6560 });
6561 __bindgen_bitfield_unit.set(22usize, 2u8, {
6562 let cu_qp_delta: u32 = unsafe { ::std::mem::transmute(cu_qp_delta) };
6563 cu_qp_delta as u64
6564 });
6565 __bindgen_bitfield_unit.set(24usize, 2u8, {
6566 let weighted_prediction: u32 = unsafe { ::std::mem::transmute(weighted_prediction) };
6567 weighted_prediction as u64
6568 });
6569 __bindgen_bitfield_unit.set(26usize, 2u8, {
6570 let transquant_bypass: u32 = unsafe { ::std::mem::transmute(transquant_bypass) };
6571 transquant_bypass as u64
6572 });
6573 __bindgen_bitfield_unit.set(28usize, 2u8, {
6574 let deblocking_filter_disable: u32 = unsafe { ::std::mem::transmute(deblocking_filter_disable) };
6575 deblocking_filter_disable as u64
6576 });
6577 __bindgen_bitfield_unit.set(30usize, 2u8, {
6578 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
6579 reserved as u64
6580 });
6581 __bindgen_bitfield_unit
6582 }
6583}
6584impl Default for VAConfigAttribValEncHEVCFeatures {
6585 fn default() -> Self {
6586 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
6587 unsafe {
6588 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
6589 s.assume_init()
6590 }
6591 }
6592}
6593#[doc = " Attribute value for VAConfigAttribEncHEVCBlockSizes.\n\n This attribute describes the supported coding tree and transform block\n sizes of an HEVC/H.265 encoder configuration"]
6594#[repr(C)]
6595#[derive(Copy, Clone)]
6596pub union VAConfigAttribValEncHEVCBlockSizes {
6597 pub bits: VAConfigAttribValEncHEVCBlockSizes__bindgen_ty_1,
6598 pub value: u32,
6599}
6600#[repr(C)]
6601#[repr(align(4))]
6602#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
6603pub struct VAConfigAttribValEncHEVCBlockSizes__bindgen_ty_1 {
6604 pub _bitfield_align_1: [u16; 0],
6605 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
6606}
6607impl VAConfigAttribValEncHEVCBlockSizes__bindgen_ty_1 {
6608 #[inline]
6609 pub fn log2_max_coding_tree_block_size_minus3(&self) -> u32 {
6610 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
6611 }
6612 #[inline]
6613 pub fn set_log2_max_coding_tree_block_size_minus3(&mut self, val: u32) {
6614 unsafe {
6615 let val: u32 = ::std::mem::transmute(val);
6616 self._bitfield_1.set(0usize, 2u8, val as u64)
6617 }
6618 }
6619 #[inline]
6620 pub unsafe fn log2_max_coding_tree_block_size_minus3_raw(this: *const Self) -> u32 {
6621 unsafe {
6622 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6623 ::std::ptr::addr_of!((*this)._bitfield_1),
6624 0usize,
6625 2u8,
6626 ) as u32)
6627 }
6628 }
6629 #[inline]
6630 pub unsafe fn set_log2_max_coding_tree_block_size_minus3_raw(this: *mut Self, val: u32) {
6631 unsafe {
6632 let val: u32 = ::std::mem::transmute(val);
6633 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6634 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6635 0usize,
6636 2u8,
6637 val as u64,
6638 )
6639 }
6640 }
6641 #[inline]
6642 pub fn log2_min_coding_tree_block_size_minus3(&self) -> u32 {
6643 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) }
6644 }
6645 #[inline]
6646 pub fn set_log2_min_coding_tree_block_size_minus3(&mut self, val: u32) {
6647 unsafe {
6648 let val: u32 = ::std::mem::transmute(val);
6649 self._bitfield_1.set(2usize, 2u8, val as u64)
6650 }
6651 }
6652 #[inline]
6653 pub unsafe fn log2_min_coding_tree_block_size_minus3_raw(this: *const Self) -> u32 {
6654 unsafe {
6655 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6656 ::std::ptr::addr_of!((*this)._bitfield_1),
6657 2usize,
6658 2u8,
6659 ) as u32)
6660 }
6661 }
6662 #[inline]
6663 pub unsafe fn set_log2_min_coding_tree_block_size_minus3_raw(this: *mut Self, val: u32) {
6664 unsafe {
6665 let val: u32 = ::std::mem::transmute(val);
6666 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6667 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6668 2usize,
6669 2u8,
6670 val as u64,
6671 )
6672 }
6673 }
6674 #[inline]
6675 pub fn log2_min_luma_coding_block_size_minus3(&self) -> u32 {
6676 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u32) }
6677 }
6678 #[inline]
6679 pub fn set_log2_min_luma_coding_block_size_minus3(&mut self, val: u32) {
6680 unsafe {
6681 let val: u32 = ::std::mem::transmute(val);
6682 self._bitfield_1.set(4usize, 2u8, val as u64)
6683 }
6684 }
6685 #[inline]
6686 pub unsafe fn log2_min_luma_coding_block_size_minus3_raw(this: *const Self) -> u32 {
6687 unsafe {
6688 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6689 ::std::ptr::addr_of!((*this)._bitfield_1),
6690 4usize,
6691 2u8,
6692 ) as u32)
6693 }
6694 }
6695 #[inline]
6696 pub unsafe fn set_log2_min_luma_coding_block_size_minus3_raw(this: *mut Self, val: u32) {
6697 unsafe {
6698 let val: u32 = ::std::mem::transmute(val);
6699 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6700 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6701 4usize,
6702 2u8,
6703 val as u64,
6704 )
6705 }
6706 }
6707 #[inline]
6708 pub fn log2_max_luma_transform_block_size_minus2(&self) -> u32 {
6709 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) }
6710 }
6711 #[inline]
6712 pub fn set_log2_max_luma_transform_block_size_minus2(&mut self, val: u32) {
6713 unsafe {
6714 let val: u32 = ::std::mem::transmute(val);
6715 self._bitfield_1.set(6usize, 2u8, val as u64)
6716 }
6717 }
6718 #[inline]
6719 pub unsafe fn log2_max_luma_transform_block_size_minus2_raw(this: *const Self) -> u32 {
6720 unsafe {
6721 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6722 ::std::ptr::addr_of!((*this)._bitfield_1),
6723 6usize,
6724 2u8,
6725 ) as u32)
6726 }
6727 }
6728 #[inline]
6729 pub unsafe fn set_log2_max_luma_transform_block_size_minus2_raw(this: *mut Self, val: u32) {
6730 unsafe {
6731 let val: u32 = ::std::mem::transmute(val);
6732 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6733 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6734 6usize,
6735 2u8,
6736 val as u64,
6737 )
6738 }
6739 }
6740 #[inline]
6741 pub fn log2_min_luma_transform_block_size_minus2(&self) -> u32 {
6742 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u32) }
6743 }
6744 #[inline]
6745 pub fn set_log2_min_luma_transform_block_size_minus2(&mut self, val: u32) {
6746 unsafe {
6747 let val: u32 = ::std::mem::transmute(val);
6748 self._bitfield_1.set(8usize, 2u8, val as u64)
6749 }
6750 }
6751 #[inline]
6752 pub unsafe fn log2_min_luma_transform_block_size_minus2_raw(this: *const Self) -> u32 {
6753 unsafe {
6754 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6755 ::std::ptr::addr_of!((*this)._bitfield_1),
6756 8usize,
6757 2u8,
6758 ) as u32)
6759 }
6760 }
6761 #[inline]
6762 pub unsafe fn set_log2_min_luma_transform_block_size_minus2_raw(this: *mut Self, val: u32) {
6763 unsafe {
6764 let val: u32 = ::std::mem::transmute(val);
6765 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6766 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6767 8usize,
6768 2u8,
6769 val as u64,
6770 )
6771 }
6772 }
6773 #[inline]
6774 pub fn max_max_transform_hierarchy_depth_inter(&self) -> u32 {
6775 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) }
6776 }
6777 #[inline]
6778 pub fn set_max_max_transform_hierarchy_depth_inter(&mut self, val: u32) {
6779 unsafe {
6780 let val: u32 = ::std::mem::transmute(val);
6781 self._bitfield_1.set(10usize, 2u8, val as u64)
6782 }
6783 }
6784 #[inline]
6785 pub unsafe fn max_max_transform_hierarchy_depth_inter_raw(this: *const Self) -> u32 {
6786 unsafe {
6787 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6788 ::std::ptr::addr_of!((*this)._bitfield_1),
6789 10usize,
6790 2u8,
6791 ) as u32)
6792 }
6793 }
6794 #[inline]
6795 pub unsafe fn set_max_max_transform_hierarchy_depth_inter_raw(this: *mut Self, val: u32) {
6796 unsafe {
6797 let val: u32 = ::std::mem::transmute(val);
6798 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6799 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6800 10usize,
6801 2u8,
6802 val as u64,
6803 )
6804 }
6805 }
6806 #[inline]
6807 pub fn min_max_transform_hierarchy_depth_inter(&self) -> u32 {
6808 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 2u8) as u32) }
6809 }
6810 #[inline]
6811 pub fn set_min_max_transform_hierarchy_depth_inter(&mut self, val: u32) {
6812 unsafe {
6813 let val: u32 = ::std::mem::transmute(val);
6814 self._bitfield_1.set(12usize, 2u8, val as u64)
6815 }
6816 }
6817 #[inline]
6818 pub unsafe fn min_max_transform_hierarchy_depth_inter_raw(this: *const Self) -> u32 {
6819 unsafe {
6820 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6821 ::std::ptr::addr_of!((*this)._bitfield_1),
6822 12usize,
6823 2u8,
6824 ) as u32)
6825 }
6826 }
6827 #[inline]
6828 pub unsafe fn set_min_max_transform_hierarchy_depth_inter_raw(this: *mut Self, val: u32) {
6829 unsafe {
6830 let val: u32 = ::std::mem::transmute(val);
6831 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6832 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6833 12usize,
6834 2u8,
6835 val as u64,
6836 )
6837 }
6838 }
6839 #[inline]
6840 pub fn max_max_transform_hierarchy_depth_intra(&self) -> u32 {
6841 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u32) }
6842 }
6843 #[inline]
6844 pub fn set_max_max_transform_hierarchy_depth_intra(&mut self, val: u32) {
6845 unsafe {
6846 let val: u32 = ::std::mem::transmute(val);
6847 self._bitfield_1.set(14usize, 2u8, val as u64)
6848 }
6849 }
6850 #[inline]
6851 pub unsafe fn max_max_transform_hierarchy_depth_intra_raw(this: *const Self) -> u32 {
6852 unsafe {
6853 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6854 ::std::ptr::addr_of!((*this)._bitfield_1),
6855 14usize,
6856 2u8,
6857 ) as u32)
6858 }
6859 }
6860 #[inline]
6861 pub unsafe fn set_max_max_transform_hierarchy_depth_intra_raw(this: *mut Self, val: u32) {
6862 unsafe {
6863 let val: u32 = ::std::mem::transmute(val);
6864 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6865 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6866 14usize,
6867 2u8,
6868 val as u64,
6869 )
6870 }
6871 }
6872 #[inline]
6873 pub fn min_max_transform_hierarchy_depth_intra(&self) -> u32 {
6874 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u32) }
6875 }
6876 #[inline]
6877 pub fn set_min_max_transform_hierarchy_depth_intra(&mut self, val: u32) {
6878 unsafe {
6879 let val: u32 = ::std::mem::transmute(val);
6880 self._bitfield_1.set(16usize, 2u8, val as u64)
6881 }
6882 }
6883 #[inline]
6884 pub unsafe fn min_max_transform_hierarchy_depth_intra_raw(this: *const Self) -> u32 {
6885 unsafe {
6886 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6887 ::std::ptr::addr_of!((*this)._bitfield_1),
6888 16usize,
6889 2u8,
6890 ) as u32)
6891 }
6892 }
6893 #[inline]
6894 pub unsafe fn set_min_max_transform_hierarchy_depth_intra_raw(this: *mut Self, val: u32) {
6895 unsafe {
6896 let val: u32 = ::std::mem::transmute(val);
6897 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6898 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6899 16usize,
6900 2u8,
6901 val as u64,
6902 )
6903 }
6904 }
6905 #[inline]
6906 pub fn log2_max_pcm_coding_block_size_minus3(&self) -> u32 {
6907 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u32) }
6908 }
6909 #[inline]
6910 pub fn set_log2_max_pcm_coding_block_size_minus3(&mut self, val: u32) {
6911 unsafe {
6912 let val: u32 = ::std::mem::transmute(val);
6913 self._bitfield_1.set(18usize, 2u8, val as u64)
6914 }
6915 }
6916 #[inline]
6917 pub unsafe fn log2_max_pcm_coding_block_size_minus3_raw(this: *const Self) -> u32 {
6918 unsafe {
6919 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6920 ::std::ptr::addr_of!((*this)._bitfield_1),
6921 18usize,
6922 2u8,
6923 ) as u32)
6924 }
6925 }
6926 #[inline]
6927 pub unsafe fn set_log2_max_pcm_coding_block_size_minus3_raw(this: *mut Self, val: u32) {
6928 unsafe {
6929 let val: u32 = ::std::mem::transmute(val);
6930 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6931 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6932 18usize,
6933 2u8,
6934 val as u64,
6935 )
6936 }
6937 }
6938 #[inline]
6939 pub fn log2_min_pcm_coding_block_size_minus3(&self) -> u32 {
6940 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 2u8) as u32) }
6941 }
6942 #[inline]
6943 pub fn set_log2_min_pcm_coding_block_size_minus3(&mut self, val: u32) {
6944 unsafe {
6945 let val: u32 = ::std::mem::transmute(val);
6946 self._bitfield_1.set(20usize, 2u8, val as u64)
6947 }
6948 }
6949 #[inline]
6950 pub unsafe fn log2_min_pcm_coding_block_size_minus3_raw(this: *const Self) -> u32 {
6951 unsafe {
6952 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6953 ::std::ptr::addr_of!((*this)._bitfield_1),
6954 20usize,
6955 2u8,
6956 ) as u32)
6957 }
6958 }
6959 #[inline]
6960 pub unsafe fn set_log2_min_pcm_coding_block_size_minus3_raw(this: *mut Self, val: u32) {
6961 unsafe {
6962 let val: u32 = ::std::mem::transmute(val);
6963 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6964 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6965 20usize,
6966 2u8,
6967 val as u64,
6968 )
6969 }
6970 }
6971 #[inline]
6972 pub fn reserved(&self) -> u32 {
6973 unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 10u8) as u32) }
6974 }
6975 #[inline]
6976 pub fn set_reserved(&mut self, val: u32) {
6977 unsafe {
6978 let val: u32 = ::std::mem::transmute(val);
6979 self._bitfield_1.set(22usize, 10u8, val as u64)
6980 }
6981 }
6982 #[inline]
6983 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
6984 unsafe {
6985 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
6986 ::std::ptr::addr_of!((*this)._bitfield_1),
6987 22usize,
6988 10u8,
6989 ) as u32)
6990 }
6991 }
6992 #[inline]
6993 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
6994 unsafe {
6995 let val: u32 = ::std::mem::transmute(val);
6996 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
6997 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
6998 22usize,
6999 10u8,
7000 val as u64,
7001 )
7002 }
7003 }
7004 #[inline]
7005 pub fn new_bitfield_1(
7006 log2_max_coding_tree_block_size_minus3: u32,
7007 log2_min_coding_tree_block_size_minus3: u32,
7008 log2_min_luma_coding_block_size_minus3: u32,
7009 log2_max_luma_transform_block_size_minus2: u32,
7010 log2_min_luma_transform_block_size_minus2: u32,
7011 max_max_transform_hierarchy_depth_inter: u32,
7012 min_max_transform_hierarchy_depth_inter: u32,
7013 max_max_transform_hierarchy_depth_intra: u32,
7014 min_max_transform_hierarchy_depth_intra: u32,
7015 log2_max_pcm_coding_block_size_minus3: u32,
7016 log2_min_pcm_coding_block_size_minus3: u32,
7017 reserved: u32,
7018 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
7019 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
7020 __bindgen_bitfield_unit.set(0usize, 2u8, {
7021 let log2_max_coding_tree_block_size_minus3: u32 =
7022 unsafe { ::std::mem::transmute(log2_max_coding_tree_block_size_minus3) };
7023 log2_max_coding_tree_block_size_minus3 as u64
7024 });
7025 __bindgen_bitfield_unit.set(2usize, 2u8, {
7026 let log2_min_coding_tree_block_size_minus3: u32 =
7027 unsafe { ::std::mem::transmute(log2_min_coding_tree_block_size_minus3) };
7028 log2_min_coding_tree_block_size_minus3 as u64
7029 });
7030 __bindgen_bitfield_unit.set(4usize, 2u8, {
7031 let log2_min_luma_coding_block_size_minus3: u32 =
7032 unsafe { ::std::mem::transmute(log2_min_luma_coding_block_size_minus3) };
7033 log2_min_luma_coding_block_size_minus3 as u64
7034 });
7035 __bindgen_bitfield_unit.set(6usize, 2u8, {
7036 let log2_max_luma_transform_block_size_minus2: u32 =
7037 unsafe { ::std::mem::transmute(log2_max_luma_transform_block_size_minus2) };
7038 log2_max_luma_transform_block_size_minus2 as u64
7039 });
7040 __bindgen_bitfield_unit.set(8usize, 2u8, {
7041 let log2_min_luma_transform_block_size_minus2: u32 =
7042 unsafe { ::std::mem::transmute(log2_min_luma_transform_block_size_minus2) };
7043 log2_min_luma_transform_block_size_minus2 as u64
7044 });
7045 __bindgen_bitfield_unit.set(10usize, 2u8, {
7046 let max_max_transform_hierarchy_depth_inter: u32 =
7047 unsafe { ::std::mem::transmute(max_max_transform_hierarchy_depth_inter) };
7048 max_max_transform_hierarchy_depth_inter as u64
7049 });
7050 __bindgen_bitfield_unit.set(12usize, 2u8, {
7051 let min_max_transform_hierarchy_depth_inter: u32 =
7052 unsafe { ::std::mem::transmute(min_max_transform_hierarchy_depth_inter) };
7053 min_max_transform_hierarchy_depth_inter as u64
7054 });
7055 __bindgen_bitfield_unit.set(14usize, 2u8, {
7056 let max_max_transform_hierarchy_depth_intra: u32 =
7057 unsafe { ::std::mem::transmute(max_max_transform_hierarchy_depth_intra) };
7058 max_max_transform_hierarchy_depth_intra as u64
7059 });
7060 __bindgen_bitfield_unit.set(16usize, 2u8, {
7061 let min_max_transform_hierarchy_depth_intra: u32 =
7062 unsafe { ::std::mem::transmute(min_max_transform_hierarchy_depth_intra) };
7063 min_max_transform_hierarchy_depth_intra as u64
7064 });
7065 __bindgen_bitfield_unit.set(18usize, 2u8, {
7066 let log2_max_pcm_coding_block_size_minus3: u32 =
7067 unsafe { ::std::mem::transmute(log2_max_pcm_coding_block_size_minus3) };
7068 log2_max_pcm_coding_block_size_minus3 as u64
7069 });
7070 __bindgen_bitfield_unit.set(20usize, 2u8, {
7071 let log2_min_pcm_coding_block_size_minus3: u32 =
7072 unsafe { ::std::mem::transmute(log2_min_pcm_coding_block_size_minus3) };
7073 log2_min_pcm_coding_block_size_minus3 as u64
7074 });
7075 __bindgen_bitfield_unit.set(22usize, 10u8, {
7076 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
7077 reserved as u64
7078 });
7079 __bindgen_bitfield_unit
7080 }
7081}
7082impl Default for VAConfigAttribValEncHEVCBlockSizes {
7083 fn default() -> Self {
7084 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
7085 unsafe {
7086 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
7087 s.assume_init()
7088 }
7089 }
7090}
7091#[doc = " \\brief Sequence parameter for HEVC encoding in main & main 10\n profiles.\n\n This structure holds information for \\c seq_parameter_set_data() as\n defined by the HEVC specification.\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c seq_scaling_matrix_present_flag is set to \\c 1, then a\n #VAQMatrixBufferHEVC buffer shall also be provided within the same\n \\c vaRenderPicture() call as this sequence parameter buffer."]
7092#[repr(C)]
7093#[derive(Copy, Clone)]
7094pub struct _VAEncSequenceParameterBufferHEVC {
7095 #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [1..2]."]
7096 pub general_profile_idc: u8,
7097 #[doc = " \\brief Same as the HEVC bitstream syntax element.\n general_level_idc shall be set equal to a value of 30 times the level\n numbers allowed [1, 2, 2.1, 3, 3.1, 4, 4.1, 5, 5.1, 5.2, 6, 6.1, 6.2]"]
7098 pub general_level_idc: u8,
7099 #[doc = " \\brief Same as the HEVC bitstream syntax element.\n Only value 0 is allowed for level value below 4, exclusive."]
7100 pub general_tier_flag: u8,
7101 #[doc = " \\brief Period between I frames."]
7102 pub intra_period: u32,
7103 #[doc = " \\brief Period between IDR frames."]
7104 pub intra_idr_period: u32,
7105 #[doc = " \\brief Period between I/P frames."]
7106 pub ip_period: u32,
7107 #[doc = " \\brief Initial bitrate set for this sequence in CBR or VBR modes.\n\n This field represents the initial bitrate value for this\n sequence if CBR or VBR mode is used, i.e. if the encoder\n pipeline was created with a #VAConfigAttribRateControl\n attribute set to either \\ref VA_RC_CBR or \\ref VA_RC_VBR.\n\n The bitrate can be modified later on through\n #VAEncMiscParameterRateControl buffers."]
7108 pub bits_per_second: u32,
7109 #[doc = " \\brief Picture width in pixel samples.\n Its value must be multiple of min CU size."]
7110 pub pic_width_in_luma_samples: u16,
7111 #[doc = " \\brief Picture height in pixel samples.\n Its value must be multiple of min CU size."]
7112 pub pic_height_in_luma_samples: u16,
7113 pub seq_fields: _VAEncSequenceParameterBufferHEVC__bindgen_ty_1,
7114 #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [0..3]"]
7115 pub log2_min_luma_coding_block_size_minus3: u8,
7116 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7117 pub log2_diff_max_min_luma_coding_block_size: u8,
7118 #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [0..3]"]
7119 pub log2_min_transform_block_size_minus2: u8,
7120 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7121 pub log2_diff_max_min_transform_block_size: u8,
7122 #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [2]"]
7123 pub max_transform_hierarchy_depth_inter: u8,
7124 #[doc = " \\brief Same as the HEVC bitstream syntax element.\n value range [2]"]
7125 pub max_transform_hierarchy_depth_intra: u8,
7126 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7127 pub pcm_sample_bit_depth_luma_minus1: u32,
7128 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7129 pub pcm_sample_bit_depth_chroma_minus1: u32,
7130 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7131 pub log2_min_pcm_luma_coding_block_size_minus3: u32,
7132 #[doc = " \\brief Derived from the HEVC bitstream syntax element.\n log2_min_pcm_luma_coding_block_size_minus3 +\n log2_diff_max_min_pcm_luma_coding_block_size"]
7133 pub log2_max_pcm_luma_coding_block_size_minus3: u32,
7134 #[doc = " @name VUI parameters (optional) */\n/**@{*/\n/** \\brief Same as the HEVC bitstream syntax element."]
7135 pub vui_parameters_present_flag: u8,
7136 pub vui_fields: _VAEncSequenceParameterBufferHEVC__bindgen_ty_2,
7137 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7138 pub aspect_ratio_idc: u8,
7139 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7140 pub sar_width: u32,
7141 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7142 pub sar_height: u32,
7143 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7144 pub vui_num_units_in_tick: u32,
7145 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7146 pub vui_time_scale: u32,
7147 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7148 pub min_spatial_segmentation_idc: u16,
7149 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7150 pub max_bytes_per_pic_denom: u8,
7151 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
7152 pub max_bits_per_min_cu_denom: u8,
7153 pub scc_fields: _VAEncSequenceParameterBufferHEVC__bindgen_ty_3,
7154 #[doc = " \\brief Reserved bytes for future use, must be zero"]
7155 pub va_reserved: [u32; 7usize],
7156}
7157#[repr(C)]
7158#[derive(Copy, Clone)]
7159pub union _VAEncSequenceParameterBufferHEVC__bindgen_ty_1 {
7160 pub bits: _VAEncSequenceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1,
7161 pub value: u32,
7162}
7163#[repr(C)]
7164#[repr(align(4))]
7165#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
7166pub struct _VAEncSequenceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
7167 pub _bitfield_align_1: [u16; 0],
7168 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
7169}
7170impl _VAEncSequenceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
7171 #[inline]
7172 pub fn chroma_format_idc(&self) -> u32 {
7173 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
7174 }
7175 #[inline]
7176 pub fn set_chroma_format_idc(&mut self, val: u32) {
7177 unsafe {
7178 let val: u32 = ::std::mem::transmute(val);
7179 self._bitfield_1.set(0usize, 2u8, val as u64)
7180 }
7181 }
7182 #[inline]
7183 pub unsafe fn chroma_format_idc_raw(this: *const Self) -> u32 {
7184 unsafe {
7185 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7186 ::std::ptr::addr_of!((*this)._bitfield_1),
7187 0usize,
7188 2u8,
7189 ) as u32)
7190 }
7191 }
7192 #[inline]
7193 pub unsafe fn set_chroma_format_idc_raw(this: *mut Self, val: u32) {
7194 unsafe {
7195 let val: u32 = ::std::mem::transmute(val);
7196 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7197 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7198 0usize,
7199 2u8,
7200 val as u64,
7201 )
7202 }
7203 }
7204 #[inline]
7205 pub fn separate_colour_plane_flag(&self) -> u32 {
7206 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
7207 }
7208 #[inline]
7209 pub fn set_separate_colour_plane_flag(&mut self, val: u32) {
7210 unsafe {
7211 let val: u32 = ::std::mem::transmute(val);
7212 self._bitfield_1.set(2usize, 1u8, val as u64)
7213 }
7214 }
7215 #[inline]
7216 pub unsafe fn separate_colour_plane_flag_raw(this: *const Self) -> u32 {
7217 unsafe {
7218 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7219 ::std::ptr::addr_of!((*this)._bitfield_1),
7220 2usize,
7221 1u8,
7222 ) as u32)
7223 }
7224 }
7225 #[inline]
7226 pub unsafe fn set_separate_colour_plane_flag_raw(this: *mut Self, val: u32) {
7227 unsafe {
7228 let val: u32 = ::std::mem::transmute(val);
7229 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7230 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7231 2usize,
7232 1u8,
7233 val as u64,
7234 )
7235 }
7236 }
7237 #[inline]
7238 pub fn bit_depth_luma_minus8(&self) -> u32 {
7239 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 3u8) as u32) }
7240 }
7241 #[inline]
7242 pub fn set_bit_depth_luma_minus8(&mut self, val: u32) {
7243 unsafe {
7244 let val: u32 = ::std::mem::transmute(val);
7245 self._bitfield_1.set(3usize, 3u8, val as u64)
7246 }
7247 }
7248 #[inline]
7249 pub unsafe fn bit_depth_luma_minus8_raw(this: *const Self) -> u32 {
7250 unsafe {
7251 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7252 ::std::ptr::addr_of!((*this)._bitfield_1),
7253 3usize,
7254 3u8,
7255 ) as u32)
7256 }
7257 }
7258 #[inline]
7259 pub unsafe fn set_bit_depth_luma_minus8_raw(this: *mut Self, val: u32) {
7260 unsafe {
7261 let val: u32 = ::std::mem::transmute(val);
7262 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7263 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7264 3usize,
7265 3u8,
7266 val as u64,
7267 )
7268 }
7269 }
7270 #[inline]
7271 pub fn bit_depth_chroma_minus8(&self) -> u32 {
7272 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u32) }
7273 }
7274 #[inline]
7275 pub fn set_bit_depth_chroma_minus8(&mut self, val: u32) {
7276 unsafe {
7277 let val: u32 = ::std::mem::transmute(val);
7278 self._bitfield_1.set(6usize, 3u8, val as u64)
7279 }
7280 }
7281 #[inline]
7282 pub unsafe fn bit_depth_chroma_minus8_raw(this: *const Self) -> u32 {
7283 unsafe {
7284 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7285 ::std::ptr::addr_of!((*this)._bitfield_1),
7286 6usize,
7287 3u8,
7288 ) as u32)
7289 }
7290 }
7291 #[inline]
7292 pub unsafe fn set_bit_depth_chroma_minus8_raw(this: *mut Self, val: u32) {
7293 unsafe {
7294 let val: u32 = ::std::mem::transmute(val);
7295 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7296 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7297 6usize,
7298 3u8,
7299 val as u64,
7300 )
7301 }
7302 }
7303 #[inline]
7304 pub fn scaling_list_enabled_flag(&self) -> u32 {
7305 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
7306 }
7307 #[inline]
7308 pub fn set_scaling_list_enabled_flag(&mut self, val: u32) {
7309 unsafe {
7310 let val: u32 = ::std::mem::transmute(val);
7311 self._bitfield_1.set(9usize, 1u8, val as u64)
7312 }
7313 }
7314 #[inline]
7315 pub unsafe fn scaling_list_enabled_flag_raw(this: *const Self) -> u32 {
7316 unsafe {
7317 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7318 ::std::ptr::addr_of!((*this)._bitfield_1),
7319 9usize,
7320 1u8,
7321 ) as u32)
7322 }
7323 }
7324 #[inline]
7325 pub unsafe fn set_scaling_list_enabled_flag_raw(this: *mut Self, val: u32) {
7326 unsafe {
7327 let val: u32 = ::std::mem::transmute(val);
7328 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7329 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7330 9usize,
7331 1u8,
7332 val as u64,
7333 )
7334 }
7335 }
7336 #[inline]
7337 pub fn strong_intra_smoothing_enabled_flag(&self) -> u32 {
7338 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
7339 }
7340 #[inline]
7341 pub fn set_strong_intra_smoothing_enabled_flag(&mut self, val: u32) {
7342 unsafe {
7343 let val: u32 = ::std::mem::transmute(val);
7344 self._bitfield_1.set(10usize, 1u8, val as u64)
7345 }
7346 }
7347 #[inline]
7348 pub unsafe fn strong_intra_smoothing_enabled_flag_raw(this: *const Self) -> u32 {
7349 unsafe {
7350 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7351 ::std::ptr::addr_of!((*this)._bitfield_1),
7352 10usize,
7353 1u8,
7354 ) as u32)
7355 }
7356 }
7357 #[inline]
7358 pub unsafe fn set_strong_intra_smoothing_enabled_flag_raw(this: *mut Self, val: u32) {
7359 unsafe {
7360 let val: u32 = ::std::mem::transmute(val);
7361 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7362 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7363 10usize,
7364 1u8,
7365 val as u64,
7366 )
7367 }
7368 }
7369 #[inline]
7370 pub fn amp_enabled_flag(&self) -> u32 {
7371 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
7372 }
7373 #[inline]
7374 pub fn set_amp_enabled_flag(&mut self, val: u32) {
7375 unsafe {
7376 let val: u32 = ::std::mem::transmute(val);
7377 self._bitfield_1.set(11usize, 1u8, val as u64)
7378 }
7379 }
7380 #[inline]
7381 pub unsafe fn amp_enabled_flag_raw(this: *const Self) -> u32 {
7382 unsafe {
7383 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7384 ::std::ptr::addr_of!((*this)._bitfield_1),
7385 11usize,
7386 1u8,
7387 ) as u32)
7388 }
7389 }
7390 #[inline]
7391 pub unsafe fn set_amp_enabled_flag_raw(this: *mut Self, val: u32) {
7392 unsafe {
7393 let val: u32 = ::std::mem::transmute(val);
7394 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7395 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7396 11usize,
7397 1u8,
7398 val as u64,
7399 )
7400 }
7401 }
7402 #[inline]
7403 pub fn sample_adaptive_offset_enabled_flag(&self) -> u32 {
7404 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
7405 }
7406 #[inline]
7407 pub fn set_sample_adaptive_offset_enabled_flag(&mut self, val: u32) {
7408 unsafe {
7409 let val: u32 = ::std::mem::transmute(val);
7410 self._bitfield_1.set(12usize, 1u8, val as u64)
7411 }
7412 }
7413 #[inline]
7414 pub unsafe fn sample_adaptive_offset_enabled_flag_raw(this: *const Self) -> u32 {
7415 unsafe {
7416 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7417 ::std::ptr::addr_of!((*this)._bitfield_1),
7418 12usize,
7419 1u8,
7420 ) as u32)
7421 }
7422 }
7423 #[inline]
7424 pub unsafe fn set_sample_adaptive_offset_enabled_flag_raw(this: *mut Self, val: u32) {
7425 unsafe {
7426 let val: u32 = ::std::mem::transmute(val);
7427 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7428 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7429 12usize,
7430 1u8,
7431 val as u64,
7432 )
7433 }
7434 }
7435 #[inline]
7436 pub fn pcm_enabled_flag(&self) -> u32 {
7437 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
7438 }
7439 #[inline]
7440 pub fn set_pcm_enabled_flag(&mut self, val: u32) {
7441 unsafe {
7442 let val: u32 = ::std::mem::transmute(val);
7443 self._bitfield_1.set(13usize, 1u8, val as u64)
7444 }
7445 }
7446 #[inline]
7447 pub unsafe fn pcm_enabled_flag_raw(this: *const Self) -> u32 {
7448 unsafe {
7449 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7450 ::std::ptr::addr_of!((*this)._bitfield_1),
7451 13usize,
7452 1u8,
7453 ) as u32)
7454 }
7455 }
7456 #[inline]
7457 pub unsafe fn set_pcm_enabled_flag_raw(this: *mut Self, val: u32) {
7458 unsafe {
7459 let val: u32 = ::std::mem::transmute(val);
7460 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7461 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7462 13usize,
7463 1u8,
7464 val as u64,
7465 )
7466 }
7467 }
7468 #[inline]
7469 pub fn pcm_loop_filter_disabled_flag(&self) -> u32 {
7470 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
7471 }
7472 #[inline]
7473 pub fn set_pcm_loop_filter_disabled_flag(&mut self, val: u32) {
7474 unsafe {
7475 let val: u32 = ::std::mem::transmute(val);
7476 self._bitfield_1.set(14usize, 1u8, val as u64)
7477 }
7478 }
7479 #[inline]
7480 pub unsafe fn pcm_loop_filter_disabled_flag_raw(this: *const Self) -> u32 {
7481 unsafe {
7482 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7483 ::std::ptr::addr_of!((*this)._bitfield_1),
7484 14usize,
7485 1u8,
7486 ) as u32)
7487 }
7488 }
7489 #[inline]
7490 pub unsafe fn set_pcm_loop_filter_disabled_flag_raw(this: *mut Self, val: u32) {
7491 unsafe {
7492 let val: u32 = ::std::mem::transmute(val);
7493 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7494 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7495 14usize,
7496 1u8,
7497 val as u64,
7498 )
7499 }
7500 }
7501 #[inline]
7502 pub fn sps_temporal_mvp_enabled_flag(&self) -> u32 {
7503 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
7504 }
7505 #[inline]
7506 pub fn set_sps_temporal_mvp_enabled_flag(&mut self, val: u32) {
7507 unsafe {
7508 let val: u32 = ::std::mem::transmute(val);
7509 self._bitfield_1.set(15usize, 1u8, val as u64)
7510 }
7511 }
7512 #[inline]
7513 pub unsafe fn sps_temporal_mvp_enabled_flag_raw(this: *const Self) -> u32 {
7514 unsafe {
7515 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7516 ::std::ptr::addr_of!((*this)._bitfield_1),
7517 15usize,
7518 1u8,
7519 ) as u32)
7520 }
7521 }
7522 #[inline]
7523 pub unsafe fn set_sps_temporal_mvp_enabled_flag_raw(this: *mut Self, val: u32) {
7524 unsafe {
7525 let val: u32 = ::std::mem::transmute(val);
7526 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7527 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7528 15usize,
7529 1u8,
7530 val as u64,
7531 )
7532 }
7533 }
7534 #[inline]
7535 pub fn low_delay_seq(&self) -> u32 {
7536 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
7537 }
7538 #[inline]
7539 pub fn set_low_delay_seq(&mut self, val: u32) {
7540 unsafe {
7541 let val: u32 = ::std::mem::transmute(val);
7542 self._bitfield_1.set(16usize, 1u8, val as u64)
7543 }
7544 }
7545 #[inline]
7546 pub unsafe fn low_delay_seq_raw(this: *const Self) -> u32 {
7547 unsafe {
7548 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7549 ::std::ptr::addr_of!((*this)._bitfield_1),
7550 16usize,
7551 1u8,
7552 ) as u32)
7553 }
7554 }
7555 #[inline]
7556 pub unsafe fn set_low_delay_seq_raw(this: *mut Self, val: u32) {
7557 unsafe {
7558 let val: u32 = ::std::mem::transmute(val);
7559 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7560 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7561 16usize,
7562 1u8,
7563 val as u64,
7564 )
7565 }
7566 }
7567 #[inline]
7568 pub fn hierachical_flag(&self) -> u32 {
7569 unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) }
7570 }
7571 #[inline]
7572 pub fn set_hierachical_flag(&mut self, val: u32) {
7573 unsafe {
7574 let val: u32 = ::std::mem::transmute(val);
7575 self._bitfield_1.set(17usize, 1u8, val as u64)
7576 }
7577 }
7578 #[inline]
7579 pub unsafe fn hierachical_flag_raw(this: *const Self) -> u32 {
7580 unsafe {
7581 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7582 ::std::ptr::addr_of!((*this)._bitfield_1),
7583 17usize,
7584 1u8,
7585 ) as u32)
7586 }
7587 }
7588 #[inline]
7589 pub unsafe fn set_hierachical_flag_raw(this: *mut Self, val: u32) {
7590 unsafe {
7591 let val: u32 = ::std::mem::transmute(val);
7592 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7593 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7594 17usize,
7595 1u8,
7596 val as u64,
7597 )
7598 }
7599 }
7600 #[inline]
7601 pub fn reserved_bits(&self) -> u32 {
7602 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 14u8) as u32) }
7603 }
7604 #[inline]
7605 pub fn set_reserved_bits(&mut self, val: u32) {
7606 unsafe {
7607 let val: u32 = ::std::mem::transmute(val);
7608 self._bitfield_1.set(18usize, 14u8, val as u64)
7609 }
7610 }
7611 #[inline]
7612 pub unsafe fn reserved_bits_raw(this: *const Self) -> u32 {
7613 unsafe {
7614 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
7615 ::std::ptr::addr_of!((*this)._bitfield_1),
7616 18usize,
7617 14u8,
7618 ) as u32)
7619 }
7620 }
7621 #[inline]
7622 pub unsafe fn set_reserved_bits_raw(this: *mut Self, val: u32) {
7623 unsafe {
7624 let val: u32 = ::std::mem::transmute(val);
7625 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
7626 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7627 18usize,
7628 14u8,
7629 val as u64,
7630 )
7631 }
7632 }
7633 #[inline]
7634 pub fn new_bitfield_1(
7635 chroma_format_idc: u32,
7636 separate_colour_plane_flag: u32,
7637 bit_depth_luma_minus8: u32,
7638 bit_depth_chroma_minus8: u32,
7639 scaling_list_enabled_flag: u32,
7640 strong_intra_smoothing_enabled_flag: u32,
7641 amp_enabled_flag: u32,
7642 sample_adaptive_offset_enabled_flag: u32,
7643 pcm_enabled_flag: u32,
7644 pcm_loop_filter_disabled_flag: u32,
7645 sps_temporal_mvp_enabled_flag: u32,
7646 low_delay_seq: u32,
7647 hierachical_flag: u32,
7648 reserved_bits: u32,
7649 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
7650 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
7651 __bindgen_bitfield_unit.set(0usize, 2u8, {
7652 let chroma_format_idc: u32 = unsafe { ::std::mem::transmute(chroma_format_idc) };
7653 chroma_format_idc as u64
7654 });
7655 __bindgen_bitfield_unit.set(2usize, 1u8, {
7656 let separate_colour_plane_flag: u32 = unsafe { ::std::mem::transmute(separate_colour_plane_flag) };
7657 separate_colour_plane_flag as u64
7658 });
7659 __bindgen_bitfield_unit.set(3usize, 3u8, {
7660 let bit_depth_luma_minus8: u32 = unsafe { ::std::mem::transmute(bit_depth_luma_minus8) };
7661 bit_depth_luma_minus8 as u64
7662 });
7663 __bindgen_bitfield_unit.set(6usize, 3u8, {
7664 let bit_depth_chroma_minus8: u32 = unsafe { ::std::mem::transmute(bit_depth_chroma_minus8) };
7665 bit_depth_chroma_minus8 as u64
7666 });
7667 __bindgen_bitfield_unit.set(9usize, 1u8, {
7668 let scaling_list_enabled_flag: u32 = unsafe { ::std::mem::transmute(scaling_list_enabled_flag) };
7669 scaling_list_enabled_flag as u64
7670 });
7671 __bindgen_bitfield_unit.set(10usize, 1u8, {
7672 let strong_intra_smoothing_enabled_flag: u32 =
7673 unsafe { ::std::mem::transmute(strong_intra_smoothing_enabled_flag) };
7674 strong_intra_smoothing_enabled_flag as u64
7675 });
7676 __bindgen_bitfield_unit.set(11usize, 1u8, {
7677 let amp_enabled_flag: u32 = unsafe { ::std::mem::transmute(amp_enabled_flag) };
7678 amp_enabled_flag as u64
7679 });
7680 __bindgen_bitfield_unit.set(12usize, 1u8, {
7681 let sample_adaptive_offset_enabled_flag: u32 =
7682 unsafe { ::std::mem::transmute(sample_adaptive_offset_enabled_flag) };
7683 sample_adaptive_offset_enabled_flag as u64
7684 });
7685 __bindgen_bitfield_unit.set(13usize, 1u8, {
7686 let pcm_enabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_enabled_flag) };
7687 pcm_enabled_flag as u64
7688 });
7689 __bindgen_bitfield_unit.set(14usize, 1u8, {
7690 let pcm_loop_filter_disabled_flag: u32 = unsafe { ::std::mem::transmute(pcm_loop_filter_disabled_flag) };
7691 pcm_loop_filter_disabled_flag as u64
7692 });
7693 __bindgen_bitfield_unit.set(15usize, 1u8, {
7694 let sps_temporal_mvp_enabled_flag: u32 = unsafe { ::std::mem::transmute(sps_temporal_mvp_enabled_flag) };
7695 sps_temporal_mvp_enabled_flag as u64
7696 });
7697 __bindgen_bitfield_unit.set(16usize, 1u8, {
7698 let low_delay_seq: u32 = unsafe { ::std::mem::transmute(low_delay_seq) };
7699 low_delay_seq as u64
7700 });
7701 __bindgen_bitfield_unit.set(17usize, 1u8, {
7702 let hierachical_flag: u32 = unsafe { ::std::mem::transmute(hierachical_flag) };
7703 hierachical_flag as u64
7704 });
7705 __bindgen_bitfield_unit.set(18usize, 14u8, {
7706 let reserved_bits: u32 = unsafe { ::std::mem::transmute(reserved_bits) };
7707 reserved_bits as u64
7708 });
7709 __bindgen_bitfield_unit
7710 }
7711}
7712impl Default for _VAEncSequenceParameterBufferHEVC__bindgen_ty_1 {
7713 fn default() -> Self {
7714 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
7715 unsafe {
7716 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
7717 s.assume_init()
7718 }
7719 }
7720}
7721#[repr(C)]
7722#[derive(Copy, Clone)]
7723pub union _VAEncSequenceParameterBufferHEVC__bindgen_ty_2 {
7724 pub bits: _VAEncSequenceParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1,
7725 pub value: u32,
7726}
7727#[repr(C)]
7728#[repr(align(4))]
7729#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
7730pub struct _VAEncSequenceParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 {
7731 pub _bitfield_align_1: [u8; 0],
7732 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
7733 pub __bindgen_padding_0: u8,
7734}
7735impl _VAEncSequenceParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 {
7736 #[inline]
7737 pub fn aspect_ratio_info_present_flag(&self) -> u32 {
7738 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
7739 }
7740 #[inline]
7741 pub fn set_aspect_ratio_info_present_flag(&mut self, val: u32) {
7742 unsafe {
7743 let val: u32 = ::std::mem::transmute(val);
7744 self._bitfield_1.set(0usize, 1u8, val as u64)
7745 }
7746 }
7747 #[inline]
7748 pub unsafe fn aspect_ratio_info_present_flag_raw(this: *const Self) -> u32 {
7749 unsafe {
7750 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
7751 ::std::ptr::addr_of!((*this)._bitfield_1),
7752 0usize,
7753 1u8,
7754 ) as u32)
7755 }
7756 }
7757 #[inline]
7758 pub unsafe fn set_aspect_ratio_info_present_flag_raw(this: *mut Self, val: u32) {
7759 unsafe {
7760 let val: u32 = ::std::mem::transmute(val);
7761 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
7762 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7763 0usize,
7764 1u8,
7765 val as u64,
7766 )
7767 }
7768 }
7769 #[inline]
7770 pub fn neutral_chroma_indication_flag(&self) -> u32 {
7771 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
7772 }
7773 #[inline]
7774 pub fn set_neutral_chroma_indication_flag(&mut self, val: u32) {
7775 unsafe {
7776 let val: u32 = ::std::mem::transmute(val);
7777 self._bitfield_1.set(1usize, 1u8, val as u64)
7778 }
7779 }
7780 #[inline]
7781 pub unsafe fn neutral_chroma_indication_flag_raw(this: *const Self) -> u32 {
7782 unsafe {
7783 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
7784 ::std::ptr::addr_of!((*this)._bitfield_1),
7785 1usize,
7786 1u8,
7787 ) as u32)
7788 }
7789 }
7790 #[inline]
7791 pub unsafe fn set_neutral_chroma_indication_flag_raw(this: *mut Self, val: u32) {
7792 unsafe {
7793 let val: u32 = ::std::mem::transmute(val);
7794 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
7795 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7796 1usize,
7797 1u8,
7798 val as u64,
7799 )
7800 }
7801 }
7802 #[inline]
7803 pub fn field_seq_flag(&self) -> u32 {
7804 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
7805 }
7806 #[inline]
7807 pub fn set_field_seq_flag(&mut self, val: u32) {
7808 unsafe {
7809 let val: u32 = ::std::mem::transmute(val);
7810 self._bitfield_1.set(2usize, 1u8, val as u64)
7811 }
7812 }
7813 #[inline]
7814 pub unsafe fn field_seq_flag_raw(this: *const Self) -> u32 {
7815 unsafe {
7816 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
7817 ::std::ptr::addr_of!((*this)._bitfield_1),
7818 2usize,
7819 1u8,
7820 ) as u32)
7821 }
7822 }
7823 #[inline]
7824 pub unsafe fn set_field_seq_flag_raw(this: *mut Self, val: u32) {
7825 unsafe {
7826 let val: u32 = ::std::mem::transmute(val);
7827 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
7828 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7829 2usize,
7830 1u8,
7831 val as u64,
7832 )
7833 }
7834 }
7835 #[inline]
7836 pub fn vui_timing_info_present_flag(&self) -> u32 {
7837 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
7838 }
7839 #[inline]
7840 pub fn set_vui_timing_info_present_flag(&mut self, val: u32) {
7841 unsafe {
7842 let val: u32 = ::std::mem::transmute(val);
7843 self._bitfield_1.set(3usize, 1u8, val as u64)
7844 }
7845 }
7846 #[inline]
7847 pub unsafe fn vui_timing_info_present_flag_raw(this: *const Self) -> u32 {
7848 unsafe {
7849 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
7850 ::std::ptr::addr_of!((*this)._bitfield_1),
7851 3usize,
7852 1u8,
7853 ) as u32)
7854 }
7855 }
7856 #[inline]
7857 pub unsafe fn set_vui_timing_info_present_flag_raw(this: *mut Self, val: u32) {
7858 unsafe {
7859 let val: u32 = ::std::mem::transmute(val);
7860 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
7861 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7862 3usize,
7863 1u8,
7864 val as u64,
7865 )
7866 }
7867 }
7868 #[inline]
7869 pub fn bitstream_restriction_flag(&self) -> u32 {
7870 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
7871 }
7872 #[inline]
7873 pub fn set_bitstream_restriction_flag(&mut self, val: u32) {
7874 unsafe {
7875 let val: u32 = ::std::mem::transmute(val);
7876 self._bitfield_1.set(4usize, 1u8, val as u64)
7877 }
7878 }
7879 #[inline]
7880 pub unsafe fn bitstream_restriction_flag_raw(this: *const Self) -> u32 {
7881 unsafe {
7882 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
7883 ::std::ptr::addr_of!((*this)._bitfield_1),
7884 4usize,
7885 1u8,
7886 ) as u32)
7887 }
7888 }
7889 #[inline]
7890 pub unsafe fn set_bitstream_restriction_flag_raw(this: *mut Self, val: u32) {
7891 unsafe {
7892 let val: u32 = ::std::mem::transmute(val);
7893 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
7894 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7895 4usize,
7896 1u8,
7897 val as u64,
7898 )
7899 }
7900 }
7901 #[inline]
7902 pub fn tiles_fixed_structure_flag(&self) -> u32 {
7903 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
7904 }
7905 #[inline]
7906 pub fn set_tiles_fixed_structure_flag(&mut self, val: u32) {
7907 unsafe {
7908 let val: u32 = ::std::mem::transmute(val);
7909 self._bitfield_1.set(5usize, 1u8, val as u64)
7910 }
7911 }
7912 #[inline]
7913 pub unsafe fn tiles_fixed_structure_flag_raw(this: *const Self) -> u32 {
7914 unsafe {
7915 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
7916 ::std::ptr::addr_of!((*this)._bitfield_1),
7917 5usize,
7918 1u8,
7919 ) as u32)
7920 }
7921 }
7922 #[inline]
7923 pub unsafe fn set_tiles_fixed_structure_flag_raw(this: *mut Self, val: u32) {
7924 unsafe {
7925 let val: u32 = ::std::mem::transmute(val);
7926 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
7927 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7928 5usize,
7929 1u8,
7930 val as u64,
7931 )
7932 }
7933 }
7934 #[inline]
7935 pub fn motion_vectors_over_pic_boundaries_flag(&self) -> u32 {
7936 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
7937 }
7938 #[inline]
7939 pub fn set_motion_vectors_over_pic_boundaries_flag(&mut self, val: u32) {
7940 unsafe {
7941 let val: u32 = ::std::mem::transmute(val);
7942 self._bitfield_1.set(6usize, 1u8, val as u64)
7943 }
7944 }
7945 #[inline]
7946 pub unsafe fn motion_vectors_over_pic_boundaries_flag_raw(this: *const Self) -> u32 {
7947 unsafe {
7948 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
7949 ::std::ptr::addr_of!((*this)._bitfield_1),
7950 6usize,
7951 1u8,
7952 ) as u32)
7953 }
7954 }
7955 #[inline]
7956 pub unsafe fn set_motion_vectors_over_pic_boundaries_flag_raw(this: *mut Self, val: u32) {
7957 unsafe {
7958 let val: u32 = ::std::mem::transmute(val);
7959 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
7960 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7961 6usize,
7962 1u8,
7963 val as u64,
7964 )
7965 }
7966 }
7967 #[inline]
7968 pub fn restricted_ref_pic_lists_flag(&self) -> u32 {
7969 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
7970 }
7971 #[inline]
7972 pub fn set_restricted_ref_pic_lists_flag(&mut self, val: u32) {
7973 unsafe {
7974 let val: u32 = ::std::mem::transmute(val);
7975 self._bitfield_1.set(7usize, 1u8, val as u64)
7976 }
7977 }
7978 #[inline]
7979 pub unsafe fn restricted_ref_pic_lists_flag_raw(this: *const Self) -> u32 {
7980 unsafe {
7981 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
7982 ::std::ptr::addr_of!((*this)._bitfield_1),
7983 7usize,
7984 1u8,
7985 ) as u32)
7986 }
7987 }
7988 #[inline]
7989 pub unsafe fn set_restricted_ref_pic_lists_flag_raw(this: *mut Self, val: u32) {
7990 unsafe {
7991 let val: u32 = ::std::mem::transmute(val);
7992 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
7993 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
7994 7usize,
7995 1u8,
7996 val as u64,
7997 )
7998 }
7999 }
8000 #[inline]
8001 pub fn log2_max_mv_length_horizontal(&self) -> u32 {
8002 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u32) }
8003 }
8004 #[inline]
8005 pub fn set_log2_max_mv_length_horizontal(&mut self, val: u32) {
8006 unsafe {
8007 let val: u32 = ::std::mem::transmute(val);
8008 self._bitfield_1.set(8usize, 5u8, val as u64)
8009 }
8010 }
8011 #[inline]
8012 pub unsafe fn log2_max_mv_length_horizontal_raw(this: *const Self) -> u32 {
8013 unsafe {
8014 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
8015 ::std::ptr::addr_of!((*this)._bitfield_1),
8016 8usize,
8017 5u8,
8018 ) as u32)
8019 }
8020 }
8021 #[inline]
8022 pub unsafe fn set_log2_max_mv_length_horizontal_raw(this: *mut Self, val: u32) {
8023 unsafe {
8024 let val: u32 = ::std::mem::transmute(val);
8025 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
8026 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8027 8usize,
8028 5u8,
8029 val as u64,
8030 )
8031 }
8032 }
8033 #[inline]
8034 pub fn log2_max_mv_length_vertical(&self) -> u32 {
8035 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 5u8) as u32) }
8036 }
8037 #[inline]
8038 pub fn set_log2_max_mv_length_vertical(&mut self, val: u32) {
8039 unsafe {
8040 let val: u32 = ::std::mem::transmute(val);
8041 self._bitfield_1.set(13usize, 5u8, val as u64)
8042 }
8043 }
8044 #[inline]
8045 pub unsafe fn log2_max_mv_length_vertical_raw(this: *const Self) -> u32 {
8046 unsafe {
8047 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
8048 ::std::ptr::addr_of!((*this)._bitfield_1),
8049 13usize,
8050 5u8,
8051 ) as u32)
8052 }
8053 }
8054 #[inline]
8055 pub unsafe fn set_log2_max_mv_length_vertical_raw(this: *mut Self, val: u32) {
8056 unsafe {
8057 let val: u32 = ::std::mem::transmute(val);
8058 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
8059 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8060 13usize,
8061 5u8,
8062 val as u64,
8063 )
8064 }
8065 }
8066 #[inline]
8067 pub fn new_bitfield_1(
8068 aspect_ratio_info_present_flag: u32,
8069 neutral_chroma_indication_flag: u32,
8070 field_seq_flag: u32,
8071 vui_timing_info_present_flag: u32,
8072 bitstream_restriction_flag: u32,
8073 tiles_fixed_structure_flag: u32,
8074 motion_vectors_over_pic_boundaries_flag: u32,
8075 restricted_ref_pic_lists_flag: u32,
8076 log2_max_mv_length_horizontal: u32,
8077 log2_max_mv_length_vertical: u32,
8078 ) -> __BindgenBitfieldUnit<[u8; 3usize]> {
8079 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
8080 __bindgen_bitfield_unit.set(0usize, 1u8, {
8081 let aspect_ratio_info_present_flag: u32 = unsafe { ::std::mem::transmute(aspect_ratio_info_present_flag) };
8082 aspect_ratio_info_present_flag as u64
8083 });
8084 __bindgen_bitfield_unit.set(1usize, 1u8, {
8085 let neutral_chroma_indication_flag: u32 = unsafe { ::std::mem::transmute(neutral_chroma_indication_flag) };
8086 neutral_chroma_indication_flag as u64
8087 });
8088 __bindgen_bitfield_unit.set(2usize, 1u8, {
8089 let field_seq_flag: u32 = unsafe { ::std::mem::transmute(field_seq_flag) };
8090 field_seq_flag as u64
8091 });
8092 __bindgen_bitfield_unit.set(3usize, 1u8, {
8093 let vui_timing_info_present_flag: u32 = unsafe { ::std::mem::transmute(vui_timing_info_present_flag) };
8094 vui_timing_info_present_flag as u64
8095 });
8096 __bindgen_bitfield_unit.set(4usize, 1u8, {
8097 let bitstream_restriction_flag: u32 = unsafe { ::std::mem::transmute(bitstream_restriction_flag) };
8098 bitstream_restriction_flag as u64
8099 });
8100 __bindgen_bitfield_unit.set(5usize, 1u8, {
8101 let tiles_fixed_structure_flag: u32 = unsafe { ::std::mem::transmute(tiles_fixed_structure_flag) };
8102 tiles_fixed_structure_flag as u64
8103 });
8104 __bindgen_bitfield_unit.set(6usize, 1u8, {
8105 let motion_vectors_over_pic_boundaries_flag: u32 =
8106 unsafe { ::std::mem::transmute(motion_vectors_over_pic_boundaries_flag) };
8107 motion_vectors_over_pic_boundaries_flag as u64
8108 });
8109 __bindgen_bitfield_unit.set(7usize, 1u8, {
8110 let restricted_ref_pic_lists_flag: u32 = unsafe { ::std::mem::transmute(restricted_ref_pic_lists_flag) };
8111 restricted_ref_pic_lists_flag as u64
8112 });
8113 __bindgen_bitfield_unit.set(8usize, 5u8, {
8114 let log2_max_mv_length_horizontal: u32 = unsafe { ::std::mem::transmute(log2_max_mv_length_horizontal) };
8115 log2_max_mv_length_horizontal as u64
8116 });
8117 __bindgen_bitfield_unit.set(13usize, 5u8, {
8118 let log2_max_mv_length_vertical: u32 = unsafe { ::std::mem::transmute(log2_max_mv_length_vertical) };
8119 log2_max_mv_length_vertical as u64
8120 });
8121 __bindgen_bitfield_unit
8122 }
8123}
8124impl Default for _VAEncSequenceParameterBufferHEVC__bindgen_ty_2 {
8125 fn default() -> Self {
8126 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
8127 unsafe {
8128 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
8129 s.assume_init()
8130 }
8131 }
8132}
8133#[doc = " \\brief SCC flags to enable/disable features, including IBC and palette mode at present."]
8134#[repr(C)]
8135#[derive(Copy, Clone)]
8136pub union _VAEncSequenceParameterBufferHEVC__bindgen_ty_3 {
8137 pub bits: _VAEncSequenceParameterBufferHEVC__bindgen_ty_3__bindgen_ty_1,
8138 pub value: u32,
8139}
8140#[repr(C)]
8141#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
8142pub struct _VAEncSequenceParameterBufferHEVC__bindgen_ty_3__bindgen_ty_1 {
8143 pub _bitfield_align_1: [u32; 0],
8144 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
8145}
8146impl _VAEncSequenceParameterBufferHEVC__bindgen_ty_3__bindgen_ty_1 {
8147 #[inline]
8148 pub fn palette_mode_enabled_flag(&self) -> u32 {
8149 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
8150 }
8151 #[inline]
8152 pub fn set_palette_mode_enabled_flag(&mut self, val: u32) {
8153 unsafe {
8154 let val: u32 = ::std::mem::transmute(val);
8155 self._bitfield_1.set(0usize, 1u8, val as u64)
8156 }
8157 }
8158 #[inline]
8159 pub unsafe fn palette_mode_enabled_flag_raw(this: *const Self) -> u32 {
8160 unsafe {
8161 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8162 ::std::ptr::addr_of!((*this)._bitfield_1),
8163 0usize,
8164 1u8,
8165 ) as u32)
8166 }
8167 }
8168 #[inline]
8169 pub unsafe fn set_palette_mode_enabled_flag_raw(this: *mut Self, val: u32) {
8170 unsafe {
8171 let val: u32 = ::std::mem::transmute(val);
8172 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8173 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8174 0usize,
8175 1u8,
8176 val as u64,
8177 )
8178 }
8179 }
8180 #[inline]
8181 pub fn reserved(&self) -> u32 {
8182 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) }
8183 }
8184 #[inline]
8185 pub fn set_reserved(&mut self, val: u32) {
8186 unsafe {
8187 let val: u32 = ::std::mem::transmute(val);
8188 self._bitfield_1.set(1usize, 31u8, val as u64)
8189 }
8190 }
8191 #[inline]
8192 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
8193 unsafe {
8194 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8195 ::std::ptr::addr_of!((*this)._bitfield_1),
8196 1usize,
8197 31u8,
8198 ) as u32)
8199 }
8200 }
8201 #[inline]
8202 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
8203 unsafe {
8204 let val: u32 = ::std::mem::transmute(val);
8205 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8206 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8207 1usize,
8208 31u8,
8209 val as u64,
8210 )
8211 }
8212 }
8213 #[inline]
8214 pub fn new_bitfield_1(palette_mode_enabled_flag: u32, reserved: u32) -> __BindgenBitfieldUnit<[u8; 4usize]> {
8215 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
8216 __bindgen_bitfield_unit.set(0usize, 1u8, {
8217 let palette_mode_enabled_flag: u32 = unsafe { ::std::mem::transmute(palette_mode_enabled_flag) };
8218 palette_mode_enabled_flag as u64
8219 });
8220 __bindgen_bitfield_unit.set(1usize, 31u8, {
8221 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
8222 reserved as u64
8223 });
8224 __bindgen_bitfield_unit
8225 }
8226}
8227impl Default for _VAEncSequenceParameterBufferHEVC__bindgen_ty_3 {
8228 fn default() -> Self {
8229 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
8230 unsafe {
8231 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
8232 s.assume_init()
8233 }
8234 }
8235}
8236impl Default for _VAEncSequenceParameterBufferHEVC {
8237 fn default() -> Self {
8238 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
8239 unsafe {
8240 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
8241 s.assume_init()
8242 }
8243 }
8244}
8245#[doc = " \\brief Sequence parameter for HEVC encoding in main & main 10\n profiles.\n\n This structure holds information for \\c seq_parameter_set_data() as\n defined by the HEVC specification.\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c seq_scaling_matrix_present_flag is set to \\c 1, then a\n #VAQMatrixBufferHEVC buffer shall also be provided within the same\n \\c vaRenderPicture() call as this sequence parameter buffer."]
8246pub type VAEncSequenceParameterBufferHEVC = _VAEncSequenceParameterBufferHEVC;
8247#[doc = " HEVC data structures\n/\n/**\n \\brief Picture parameter for HEVC encoding in main & main 10\n profiles.\n\n This structure holds information for \\c pic_parameter_set_rbsp() as\n defined by the HEVC specification.\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c pic_scaling_matrix_present_flag is set to \\c 1, then a\n #VAQMatrixBufferHEVC buffer shall also be provided within the same\n \\c vaRenderPicture() call as this picture parameter buffer."]
8248#[repr(C)]
8249#[derive(Copy, Clone)]
8250pub struct _VAEncPictureParameterBufferHEVC {
8251 #[doc = " \\brief Information about the picture to be encoded.\n\n See #VAPictureHEVC for further description of each field.\n Note that decoded_curr_pic.picture_id represents the reconstructed\n (decoded) picture. User provides a scratch VA surface ID here.\n Long term reference and RPS related fields should be set to 0\n and ignored."]
8252 pub decoded_curr_pic: VAPictureHEVC,
8253 #[doc = " \\brief Decoded Picture Buffer (DPB).\n\n This array represents the list of reconstructed (decoded)\n frames used as reference. It is important to keep track of\n reconstructed frames so that they can be used later on as\n reference for P or B-frames encoding."]
8254 pub reference_frames: [VAPictureHEVC; 15usize],
8255 #[doc = " \\brief Output encoded bitstream.\n\n \\ref coded_buf has type #VAEncCodedBufferType. It should be\n large enough to hold the compressed NAL slice and possibly VPS, SPS\n and PPS NAL units, and other NAL units such as SEI."]
8256 pub coded_buf: VABufferID,
8257 #[doc = " \\brief collocated reference picture buffer index of ReferenceFrames[].\n Please note it is different from HEVC syntac element collocated_ref_idx.\n When the HEVC syntax element slice_temporal_mvp_enable_flag takes value 0,\n collocated_ref_pic_index should take value 0xFF. .\n Range: [0..14, 0xFF]"]
8258 pub collocated_ref_pic_index: u8,
8259 #[doc = " \\brief OR'd flags describing whether the picture is the last one or not.\n\n This fields holds 0 if the picture to be encoded is not the last\n one in the stream or sequence. Otherwise, it is a combination of\n \\ref HEVC_LAST_PICTURE_EOSEQ or \\ref HEVC_LAST_PICTURE_EOSTREAM."]
8260 pub last_picture: u8,
8261 #[doc = " \\brief \\c init_qp_minus26 + 26."]
8262 pub pic_init_qp: u8,
8263 #[doc = " \\brief Corresponds to HEVC syntax element of the same name."]
8264 pub diff_cu_qp_delta_depth: u8,
8265 #[doc = " \\brief Corresponds to HEVC syntax element of the same name."]
8266 pub pps_cb_qp_offset: i8,
8267 #[doc = " \\brief Corresponds to HEVC syntax element of the same name."]
8268 pub pps_cr_qp_offset: i8,
8269 #[doc = " \\brief Corresponds to HEVC syntax element of the same name."]
8270 pub num_tile_columns_minus1: u8,
8271 #[doc = " \\brief Corresponds to HEVC syntax element of the same name."]
8272 pub num_tile_rows_minus1: u8,
8273 #[doc = " \\brief Corresponds to HEVC syntax element of the same name."]
8274 pub column_width_minus1: [u8; 19usize],
8275 #[doc = " \\brief Corresponds to HEVC syntax element of the same name."]
8276 pub row_height_minus1: [u8; 21usize],
8277 #[doc = " \\brief Corresponds to HEVC syntax element of the same name."]
8278 pub log2_parallel_merge_level_minus2: u8,
8279 #[doc = " \\brief Application may set the CTU bit size limit based on\n spec requirement (A.3.2), or other value for special purpose.\n If the value is set 0, no bit size limit is checked."]
8280 pub ctu_max_bitsize_allowed: u8,
8281 #[doc = " \\brief Maximum reference index for reference picture list 0.\n value range: [0..14]."]
8282 pub num_ref_idx_l0_default_active_minus1: u8,
8283 #[doc = " \\brief Maximum reference index for reference picture list 1.\n value range: [0..14]."]
8284 pub num_ref_idx_l1_default_active_minus1: u8,
8285 #[doc = " \\brief PPS header\n Used by GPU to generate new slice headers in slice size control.\n value range: [0..63]."]
8286 pub slice_pic_parameter_set_id: u8,
8287 #[doc = " \\brief NAL unit type\n Used by GPU to generate new slice headers in slice size control.\n value range: [0..63]."]
8288 pub nal_unit_type: u8,
8289 pub pic_fields: _VAEncPictureParameterBufferHEVC__bindgen_ty_1,
8290 #[doc = " \\brief When hierachical_level_plus1 > 0, hierachical_level_plus1-1 indicates\nthe current frame's level.when it > 0. B1, B2 setting in CodingType can be treated as B,\nhirachical level is determined by this variable.When hierachical_level_plus1 == 0,\nhierarchical level information still comes from coding_type."]
8291 pub hierarchical_level_plus1: u8,
8292 #[doc = " \\brief Reserved bytes for future use, must be zero"]
8293 pub va_byte_reserved: u8,
8294 pub scc_fields: _VAEncPictureParameterBufferHEVC__bindgen_ty_2,
8295 #[doc = " \\brief Reserved bytes for future use, must be zero"]
8296 pub va_reserved: [u32; 15usize],
8297}
8298#[repr(C)]
8299#[derive(Copy, Clone)]
8300pub union _VAEncPictureParameterBufferHEVC__bindgen_ty_1 {
8301 pub bits: _VAEncPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1,
8302 pub value: u32,
8303}
8304#[repr(C)]
8305#[repr(align(4))]
8306#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
8307pub struct _VAEncPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
8308 pub _bitfield_align_1: [u16; 0],
8309 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
8310}
8311impl _VAEncPictureParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
8312 #[inline]
8313 pub fn idr_pic_flag(&self) -> u32 {
8314 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
8315 }
8316 #[inline]
8317 pub fn set_idr_pic_flag(&mut self, val: u32) {
8318 unsafe {
8319 let val: u32 = ::std::mem::transmute(val);
8320 self._bitfield_1.set(0usize, 1u8, val as u64)
8321 }
8322 }
8323 #[inline]
8324 pub unsafe fn idr_pic_flag_raw(this: *const Self) -> u32 {
8325 unsafe {
8326 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8327 ::std::ptr::addr_of!((*this)._bitfield_1),
8328 0usize,
8329 1u8,
8330 ) as u32)
8331 }
8332 }
8333 #[inline]
8334 pub unsafe fn set_idr_pic_flag_raw(this: *mut Self, val: u32) {
8335 unsafe {
8336 let val: u32 = ::std::mem::transmute(val);
8337 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8338 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8339 0usize,
8340 1u8,
8341 val as u64,
8342 )
8343 }
8344 }
8345 #[inline]
8346 pub fn coding_type(&self) -> u32 {
8347 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) }
8348 }
8349 #[inline]
8350 pub fn set_coding_type(&mut self, val: u32) {
8351 unsafe {
8352 let val: u32 = ::std::mem::transmute(val);
8353 self._bitfield_1.set(1usize, 3u8, val as u64)
8354 }
8355 }
8356 #[inline]
8357 pub unsafe fn coding_type_raw(this: *const Self) -> u32 {
8358 unsafe {
8359 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8360 ::std::ptr::addr_of!((*this)._bitfield_1),
8361 1usize,
8362 3u8,
8363 ) as u32)
8364 }
8365 }
8366 #[inline]
8367 pub unsafe fn set_coding_type_raw(this: *mut Self, val: u32) {
8368 unsafe {
8369 let val: u32 = ::std::mem::transmute(val);
8370 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8371 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8372 1usize,
8373 3u8,
8374 val as u64,
8375 )
8376 }
8377 }
8378 #[inline]
8379 pub fn reference_pic_flag(&self) -> u32 {
8380 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
8381 }
8382 #[inline]
8383 pub fn set_reference_pic_flag(&mut self, val: u32) {
8384 unsafe {
8385 let val: u32 = ::std::mem::transmute(val);
8386 self._bitfield_1.set(4usize, 1u8, val as u64)
8387 }
8388 }
8389 #[inline]
8390 pub unsafe fn reference_pic_flag_raw(this: *const Self) -> u32 {
8391 unsafe {
8392 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8393 ::std::ptr::addr_of!((*this)._bitfield_1),
8394 4usize,
8395 1u8,
8396 ) as u32)
8397 }
8398 }
8399 #[inline]
8400 pub unsafe fn set_reference_pic_flag_raw(this: *mut Self, val: u32) {
8401 unsafe {
8402 let val: u32 = ::std::mem::transmute(val);
8403 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8404 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8405 4usize,
8406 1u8,
8407 val as u64,
8408 )
8409 }
8410 }
8411 #[inline]
8412 pub fn dependent_slice_segments_enabled_flag(&self) -> u32 {
8413 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
8414 }
8415 #[inline]
8416 pub fn set_dependent_slice_segments_enabled_flag(&mut self, val: u32) {
8417 unsafe {
8418 let val: u32 = ::std::mem::transmute(val);
8419 self._bitfield_1.set(5usize, 1u8, val as u64)
8420 }
8421 }
8422 #[inline]
8423 pub unsafe fn dependent_slice_segments_enabled_flag_raw(this: *const Self) -> u32 {
8424 unsafe {
8425 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8426 ::std::ptr::addr_of!((*this)._bitfield_1),
8427 5usize,
8428 1u8,
8429 ) as u32)
8430 }
8431 }
8432 #[inline]
8433 pub unsafe fn set_dependent_slice_segments_enabled_flag_raw(this: *mut Self, val: u32) {
8434 unsafe {
8435 let val: u32 = ::std::mem::transmute(val);
8436 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8437 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8438 5usize,
8439 1u8,
8440 val as u64,
8441 )
8442 }
8443 }
8444 #[inline]
8445 pub fn sign_data_hiding_enabled_flag(&self) -> u32 {
8446 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
8447 }
8448 #[inline]
8449 pub fn set_sign_data_hiding_enabled_flag(&mut self, val: u32) {
8450 unsafe {
8451 let val: u32 = ::std::mem::transmute(val);
8452 self._bitfield_1.set(6usize, 1u8, val as u64)
8453 }
8454 }
8455 #[inline]
8456 pub unsafe fn sign_data_hiding_enabled_flag_raw(this: *const Self) -> u32 {
8457 unsafe {
8458 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8459 ::std::ptr::addr_of!((*this)._bitfield_1),
8460 6usize,
8461 1u8,
8462 ) as u32)
8463 }
8464 }
8465 #[inline]
8466 pub unsafe fn set_sign_data_hiding_enabled_flag_raw(this: *mut Self, val: u32) {
8467 unsafe {
8468 let val: u32 = ::std::mem::transmute(val);
8469 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8470 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8471 6usize,
8472 1u8,
8473 val as u64,
8474 )
8475 }
8476 }
8477 #[inline]
8478 pub fn constrained_intra_pred_flag(&self) -> u32 {
8479 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
8480 }
8481 #[inline]
8482 pub fn set_constrained_intra_pred_flag(&mut self, val: u32) {
8483 unsafe {
8484 let val: u32 = ::std::mem::transmute(val);
8485 self._bitfield_1.set(7usize, 1u8, val as u64)
8486 }
8487 }
8488 #[inline]
8489 pub unsafe fn constrained_intra_pred_flag_raw(this: *const Self) -> u32 {
8490 unsafe {
8491 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8492 ::std::ptr::addr_of!((*this)._bitfield_1),
8493 7usize,
8494 1u8,
8495 ) as u32)
8496 }
8497 }
8498 #[inline]
8499 pub unsafe fn set_constrained_intra_pred_flag_raw(this: *mut Self, val: u32) {
8500 unsafe {
8501 let val: u32 = ::std::mem::transmute(val);
8502 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8503 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8504 7usize,
8505 1u8,
8506 val as u64,
8507 )
8508 }
8509 }
8510 #[inline]
8511 pub fn transform_skip_enabled_flag(&self) -> u32 {
8512 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
8513 }
8514 #[inline]
8515 pub fn set_transform_skip_enabled_flag(&mut self, val: u32) {
8516 unsafe {
8517 let val: u32 = ::std::mem::transmute(val);
8518 self._bitfield_1.set(8usize, 1u8, val as u64)
8519 }
8520 }
8521 #[inline]
8522 pub unsafe fn transform_skip_enabled_flag_raw(this: *const Self) -> u32 {
8523 unsafe {
8524 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8525 ::std::ptr::addr_of!((*this)._bitfield_1),
8526 8usize,
8527 1u8,
8528 ) as u32)
8529 }
8530 }
8531 #[inline]
8532 pub unsafe fn set_transform_skip_enabled_flag_raw(this: *mut Self, val: u32) {
8533 unsafe {
8534 let val: u32 = ::std::mem::transmute(val);
8535 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8536 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8537 8usize,
8538 1u8,
8539 val as u64,
8540 )
8541 }
8542 }
8543 #[inline]
8544 pub fn cu_qp_delta_enabled_flag(&self) -> u32 {
8545 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
8546 }
8547 #[inline]
8548 pub fn set_cu_qp_delta_enabled_flag(&mut self, val: u32) {
8549 unsafe {
8550 let val: u32 = ::std::mem::transmute(val);
8551 self._bitfield_1.set(9usize, 1u8, val as u64)
8552 }
8553 }
8554 #[inline]
8555 pub unsafe fn cu_qp_delta_enabled_flag_raw(this: *const Self) -> u32 {
8556 unsafe {
8557 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8558 ::std::ptr::addr_of!((*this)._bitfield_1),
8559 9usize,
8560 1u8,
8561 ) as u32)
8562 }
8563 }
8564 #[inline]
8565 pub unsafe fn set_cu_qp_delta_enabled_flag_raw(this: *mut Self, val: u32) {
8566 unsafe {
8567 let val: u32 = ::std::mem::transmute(val);
8568 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8569 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8570 9usize,
8571 1u8,
8572 val as u64,
8573 )
8574 }
8575 }
8576 #[inline]
8577 pub fn weighted_pred_flag(&self) -> u32 {
8578 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
8579 }
8580 #[inline]
8581 pub fn set_weighted_pred_flag(&mut self, val: u32) {
8582 unsafe {
8583 let val: u32 = ::std::mem::transmute(val);
8584 self._bitfield_1.set(10usize, 1u8, val as u64)
8585 }
8586 }
8587 #[inline]
8588 pub unsafe fn weighted_pred_flag_raw(this: *const Self) -> u32 {
8589 unsafe {
8590 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8591 ::std::ptr::addr_of!((*this)._bitfield_1),
8592 10usize,
8593 1u8,
8594 ) as u32)
8595 }
8596 }
8597 #[inline]
8598 pub unsafe fn set_weighted_pred_flag_raw(this: *mut Self, val: u32) {
8599 unsafe {
8600 let val: u32 = ::std::mem::transmute(val);
8601 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8602 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8603 10usize,
8604 1u8,
8605 val as u64,
8606 )
8607 }
8608 }
8609 #[inline]
8610 pub fn weighted_bipred_flag(&self) -> u32 {
8611 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
8612 }
8613 #[inline]
8614 pub fn set_weighted_bipred_flag(&mut self, val: u32) {
8615 unsafe {
8616 let val: u32 = ::std::mem::transmute(val);
8617 self._bitfield_1.set(11usize, 1u8, val as u64)
8618 }
8619 }
8620 #[inline]
8621 pub unsafe fn weighted_bipred_flag_raw(this: *const Self) -> u32 {
8622 unsafe {
8623 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8624 ::std::ptr::addr_of!((*this)._bitfield_1),
8625 11usize,
8626 1u8,
8627 ) as u32)
8628 }
8629 }
8630 #[inline]
8631 pub unsafe fn set_weighted_bipred_flag_raw(this: *mut Self, val: u32) {
8632 unsafe {
8633 let val: u32 = ::std::mem::transmute(val);
8634 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8635 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8636 11usize,
8637 1u8,
8638 val as u64,
8639 )
8640 }
8641 }
8642 #[inline]
8643 pub fn transquant_bypass_enabled_flag(&self) -> u32 {
8644 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
8645 }
8646 #[inline]
8647 pub fn set_transquant_bypass_enabled_flag(&mut self, val: u32) {
8648 unsafe {
8649 let val: u32 = ::std::mem::transmute(val);
8650 self._bitfield_1.set(12usize, 1u8, val as u64)
8651 }
8652 }
8653 #[inline]
8654 pub unsafe fn transquant_bypass_enabled_flag_raw(this: *const Self) -> u32 {
8655 unsafe {
8656 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8657 ::std::ptr::addr_of!((*this)._bitfield_1),
8658 12usize,
8659 1u8,
8660 ) as u32)
8661 }
8662 }
8663 #[inline]
8664 pub unsafe fn set_transquant_bypass_enabled_flag_raw(this: *mut Self, val: u32) {
8665 unsafe {
8666 let val: u32 = ::std::mem::transmute(val);
8667 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8668 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8669 12usize,
8670 1u8,
8671 val as u64,
8672 )
8673 }
8674 }
8675 #[inline]
8676 pub fn tiles_enabled_flag(&self) -> u32 {
8677 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
8678 }
8679 #[inline]
8680 pub fn set_tiles_enabled_flag(&mut self, val: u32) {
8681 unsafe {
8682 let val: u32 = ::std::mem::transmute(val);
8683 self._bitfield_1.set(13usize, 1u8, val as u64)
8684 }
8685 }
8686 #[inline]
8687 pub unsafe fn tiles_enabled_flag_raw(this: *const Self) -> u32 {
8688 unsafe {
8689 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8690 ::std::ptr::addr_of!((*this)._bitfield_1),
8691 13usize,
8692 1u8,
8693 ) as u32)
8694 }
8695 }
8696 #[inline]
8697 pub unsafe fn set_tiles_enabled_flag_raw(this: *mut Self, val: u32) {
8698 unsafe {
8699 let val: u32 = ::std::mem::transmute(val);
8700 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8701 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8702 13usize,
8703 1u8,
8704 val as u64,
8705 )
8706 }
8707 }
8708 #[inline]
8709 pub fn entropy_coding_sync_enabled_flag(&self) -> u32 {
8710 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
8711 }
8712 #[inline]
8713 pub fn set_entropy_coding_sync_enabled_flag(&mut self, val: u32) {
8714 unsafe {
8715 let val: u32 = ::std::mem::transmute(val);
8716 self._bitfield_1.set(14usize, 1u8, val as u64)
8717 }
8718 }
8719 #[inline]
8720 pub unsafe fn entropy_coding_sync_enabled_flag_raw(this: *const Self) -> u32 {
8721 unsafe {
8722 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8723 ::std::ptr::addr_of!((*this)._bitfield_1),
8724 14usize,
8725 1u8,
8726 ) as u32)
8727 }
8728 }
8729 #[inline]
8730 pub unsafe fn set_entropy_coding_sync_enabled_flag_raw(this: *mut Self, val: u32) {
8731 unsafe {
8732 let val: u32 = ::std::mem::transmute(val);
8733 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8734 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8735 14usize,
8736 1u8,
8737 val as u64,
8738 )
8739 }
8740 }
8741 #[inline]
8742 pub fn loop_filter_across_tiles_enabled_flag(&self) -> u32 {
8743 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
8744 }
8745 #[inline]
8746 pub fn set_loop_filter_across_tiles_enabled_flag(&mut self, val: u32) {
8747 unsafe {
8748 let val: u32 = ::std::mem::transmute(val);
8749 self._bitfield_1.set(15usize, 1u8, val as u64)
8750 }
8751 }
8752 #[inline]
8753 pub unsafe fn loop_filter_across_tiles_enabled_flag_raw(this: *const Self) -> u32 {
8754 unsafe {
8755 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8756 ::std::ptr::addr_of!((*this)._bitfield_1),
8757 15usize,
8758 1u8,
8759 ) as u32)
8760 }
8761 }
8762 #[inline]
8763 pub unsafe fn set_loop_filter_across_tiles_enabled_flag_raw(this: *mut Self, val: u32) {
8764 unsafe {
8765 let val: u32 = ::std::mem::transmute(val);
8766 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8767 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8768 15usize,
8769 1u8,
8770 val as u64,
8771 )
8772 }
8773 }
8774 #[inline]
8775 pub fn pps_loop_filter_across_slices_enabled_flag(&self) -> u32 {
8776 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
8777 }
8778 #[inline]
8779 pub fn set_pps_loop_filter_across_slices_enabled_flag(&mut self, val: u32) {
8780 unsafe {
8781 let val: u32 = ::std::mem::transmute(val);
8782 self._bitfield_1.set(16usize, 1u8, val as u64)
8783 }
8784 }
8785 #[inline]
8786 pub unsafe fn pps_loop_filter_across_slices_enabled_flag_raw(this: *const Self) -> u32 {
8787 unsafe {
8788 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8789 ::std::ptr::addr_of!((*this)._bitfield_1),
8790 16usize,
8791 1u8,
8792 ) as u32)
8793 }
8794 }
8795 #[inline]
8796 pub unsafe fn set_pps_loop_filter_across_slices_enabled_flag_raw(this: *mut Self, val: u32) {
8797 unsafe {
8798 let val: u32 = ::std::mem::transmute(val);
8799 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8800 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8801 16usize,
8802 1u8,
8803 val as u64,
8804 )
8805 }
8806 }
8807 #[inline]
8808 pub fn scaling_list_data_present_flag(&self) -> u32 {
8809 unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u32) }
8810 }
8811 #[inline]
8812 pub fn set_scaling_list_data_present_flag(&mut self, val: u32) {
8813 unsafe {
8814 let val: u32 = ::std::mem::transmute(val);
8815 self._bitfield_1.set(17usize, 1u8, val as u64)
8816 }
8817 }
8818 #[inline]
8819 pub unsafe fn scaling_list_data_present_flag_raw(this: *const Self) -> u32 {
8820 unsafe {
8821 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8822 ::std::ptr::addr_of!((*this)._bitfield_1),
8823 17usize,
8824 1u8,
8825 ) as u32)
8826 }
8827 }
8828 #[inline]
8829 pub unsafe fn set_scaling_list_data_present_flag_raw(this: *mut Self, val: u32) {
8830 unsafe {
8831 let val: u32 = ::std::mem::transmute(val);
8832 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8833 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8834 17usize,
8835 1u8,
8836 val as u64,
8837 )
8838 }
8839 }
8840 #[inline]
8841 pub fn screen_content_flag(&self) -> u32 {
8842 unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u32) }
8843 }
8844 #[inline]
8845 pub fn set_screen_content_flag(&mut self, val: u32) {
8846 unsafe {
8847 let val: u32 = ::std::mem::transmute(val);
8848 self._bitfield_1.set(18usize, 1u8, val as u64)
8849 }
8850 }
8851 #[inline]
8852 pub unsafe fn screen_content_flag_raw(this: *const Self) -> u32 {
8853 unsafe {
8854 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8855 ::std::ptr::addr_of!((*this)._bitfield_1),
8856 18usize,
8857 1u8,
8858 ) as u32)
8859 }
8860 }
8861 #[inline]
8862 pub unsafe fn set_screen_content_flag_raw(this: *mut Self, val: u32) {
8863 unsafe {
8864 let val: u32 = ::std::mem::transmute(val);
8865 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8866 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8867 18usize,
8868 1u8,
8869 val as u64,
8870 )
8871 }
8872 }
8873 #[inline]
8874 pub fn enable_gpu_weighted_prediction(&self) -> u32 {
8875 unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u32) }
8876 }
8877 #[inline]
8878 pub fn set_enable_gpu_weighted_prediction(&mut self, val: u32) {
8879 unsafe {
8880 let val: u32 = ::std::mem::transmute(val);
8881 self._bitfield_1.set(19usize, 1u8, val as u64)
8882 }
8883 }
8884 #[inline]
8885 pub unsafe fn enable_gpu_weighted_prediction_raw(this: *const Self) -> u32 {
8886 unsafe {
8887 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8888 ::std::ptr::addr_of!((*this)._bitfield_1),
8889 19usize,
8890 1u8,
8891 ) as u32)
8892 }
8893 }
8894 #[inline]
8895 pub unsafe fn set_enable_gpu_weighted_prediction_raw(this: *mut Self, val: u32) {
8896 unsafe {
8897 let val: u32 = ::std::mem::transmute(val);
8898 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8899 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8900 19usize,
8901 1u8,
8902 val as u64,
8903 )
8904 }
8905 }
8906 #[inline]
8907 pub fn no_output_of_prior_pics_flag(&self) -> u32 {
8908 unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u32) }
8909 }
8910 #[inline]
8911 pub fn set_no_output_of_prior_pics_flag(&mut self, val: u32) {
8912 unsafe {
8913 let val: u32 = ::std::mem::transmute(val);
8914 self._bitfield_1.set(20usize, 1u8, val as u64)
8915 }
8916 }
8917 #[inline]
8918 pub unsafe fn no_output_of_prior_pics_flag_raw(this: *const Self) -> u32 {
8919 unsafe {
8920 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8921 ::std::ptr::addr_of!((*this)._bitfield_1),
8922 20usize,
8923 1u8,
8924 ) as u32)
8925 }
8926 }
8927 #[inline]
8928 pub unsafe fn set_no_output_of_prior_pics_flag_raw(this: *mut Self, val: u32) {
8929 unsafe {
8930 let val: u32 = ::std::mem::transmute(val);
8931 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8932 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8933 20usize,
8934 1u8,
8935 val as u64,
8936 )
8937 }
8938 }
8939 #[inline]
8940 pub fn reserved(&self) -> u32 {
8941 unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 11u8) as u32) }
8942 }
8943 #[inline]
8944 pub fn set_reserved(&mut self, val: u32) {
8945 unsafe {
8946 let val: u32 = ::std::mem::transmute(val);
8947 self._bitfield_1.set(21usize, 11u8, val as u64)
8948 }
8949 }
8950 #[inline]
8951 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
8952 unsafe {
8953 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
8954 ::std::ptr::addr_of!((*this)._bitfield_1),
8955 21usize,
8956 11u8,
8957 ) as u32)
8958 }
8959 }
8960 #[inline]
8961 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
8962 unsafe {
8963 let val: u32 = ::std::mem::transmute(val);
8964 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
8965 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
8966 21usize,
8967 11u8,
8968 val as u64,
8969 )
8970 }
8971 }
8972 #[inline]
8973 pub fn new_bitfield_1(
8974 idr_pic_flag: u32,
8975 coding_type: u32,
8976 reference_pic_flag: u32,
8977 dependent_slice_segments_enabled_flag: u32,
8978 sign_data_hiding_enabled_flag: u32,
8979 constrained_intra_pred_flag: u32,
8980 transform_skip_enabled_flag: u32,
8981 cu_qp_delta_enabled_flag: u32,
8982 weighted_pred_flag: u32,
8983 weighted_bipred_flag: u32,
8984 transquant_bypass_enabled_flag: u32,
8985 tiles_enabled_flag: u32,
8986 entropy_coding_sync_enabled_flag: u32,
8987 loop_filter_across_tiles_enabled_flag: u32,
8988 pps_loop_filter_across_slices_enabled_flag: u32,
8989 scaling_list_data_present_flag: u32,
8990 screen_content_flag: u32,
8991 enable_gpu_weighted_prediction: u32,
8992 no_output_of_prior_pics_flag: u32,
8993 reserved: u32,
8994 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
8995 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
8996 __bindgen_bitfield_unit.set(0usize, 1u8, {
8997 let idr_pic_flag: u32 = unsafe { ::std::mem::transmute(idr_pic_flag) };
8998 idr_pic_flag as u64
8999 });
9000 __bindgen_bitfield_unit.set(1usize, 3u8, {
9001 let coding_type: u32 = unsafe { ::std::mem::transmute(coding_type) };
9002 coding_type as u64
9003 });
9004 __bindgen_bitfield_unit.set(4usize, 1u8, {
9005 let reference_pic_flag: u32 = unsafe { ::std::mem::transmute(reference_pic_flag) };
9006 reference_pic_flag as u64
9007 });
9008 __bindgen_bitfield_unit.set(5usize, 1u8, {
9009 let dependent_slice_segments_enabled_flag: u32 =
9010 unsafe { ::std::mem::transmute(dependent_slice_segments_enabled_flag) };
9011 dependent_slice_segments_enabled_flag as u64
9012 });
9013 __bindgen_bitfield_unit.set(6usize, 1u8, {
9014 let sign_data_hiding_enabled_flag: u32 = unsafe { ::std::mem::transmute(sign_data_hiding_enabled_flag) };
9015 sign_data_hiding_enabled_flag as u64
9016 });
9017 __bindgen_bitfield_unit.set(7usize, 1u8, {
9018 let constrained_intra_pred_flag: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred_flag) };
9019 constrained_intra_pred_flag as u64
9020 });
9021 __bindgen_bitfield_unit.set(8usize, 1u8, {
9022 let transform_skip_enabled_flag: u32 = unsafe { ::std::mem::transmute(transform_skip_enabled_flag) };
9023 transform_skip_enabled_flag as u64
9024 });
9025 __bindgen_bitfield_unit.set(9usize, 1u8, {
9026 let cu_qp_delta_enabled_flag: u32 = unsafe { ::std::mem::transmute(cu_qp_delta_enabled_flag) };
9027 cu_qp_delta_enabled_flag as u64
9028 });
9029 __bindgen_bitfield_unit.set(10usize, 1u8, {
9030 let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) };
9031 weighted_pred_flag as u64
9032 });
9033 __bindgen_bitfield_unit.set(11usize, 1u8, {
9034 let weighted_bipred_flag: u32 = unsafe { ::std::mem::transmute(weighted_bipred_flag) };
9035 weighted_bipred_flag as u64
9036 });
9037 __bindgen_bitfield_unit.set(12usize, 1u8, {
9038 let transquant_bypass_enabled_flag: u32 = unsafe { ::std::mem::transmute(transquant_bypass_enabled_flag) };
9039 transquant_bypass_enabled_flag as u64
9040 });
9041 __bindgen_bitfield_unit.set(13usize, 1u8, {
9042 let tiles_enabled_flag: u32 = unsafe { ::std::mem::transmute(tiles_enabled_flag) };
9043 tiles_enabled_flag as u64
9044 });
9045 __bindgen_bitfield_unit.set(14usize, 1u8, {
9046 let entropy_coding_sync_enabled_flag: u32 =
9047 unsafe { ::std::mem::transmute(entropy_coding_sync_enabled_flag) };
9048 entropy_coding_sync_enabled_flag as u64
9049 });
9050 __bindgen_bitfield_unit.set(15usize, 1u8, {
9051 let loop_filter_across_tiles_enabled_flag: u32 =
9052 unsafe { ::std::mem::transmute(loop_filter_across_tiles_enabled_flag) };
9053 loop_filter_across_tiles_enabled_flag as u64
9054 });
9055 __bindgen_bitfield_unit.set(16usize, 1u8, {
9056 let pps_loop_filter_across_slices_enabled_flag: u32 =
9057 unsafe { ::std::mem::transmute(pps_loop_filter_across_slices_enabled_flag) };
9058 pps_loop_filter_across_slices_enabled_flag as u64
9059 });
9060 __bindgen_bitfield_unit.set(17usize, 1u8, {
9061 let scaling_list_data_present_flag: u32 = unsafe { ::std::mem::transmute(scaling_list_data_present_flag) };
9062 scaling_list_data_present_flag as u64
9063 });
9064 __bindgen_bitfield_unit.set(18usize, 1u8, {
9065 let screen_content_flag: u32 = unsafe { ::std::mem::transmute(screen_content_flag) };
9066 screen_content_flag as u64
9067 });
9068 __bindgen_bitfield_unit.set(19usize, 1u8, {
9069 let enable_gpu_weighted_prediction: u32 = unsafe { ::std::mem::transmute(enable_gpu_weighted_prediction) };
9070 enable_gpu_weighted_prediction as u64
9071 });
9072 __bindgen_bitfield_unit.set(20usize, 1u8, {
9073 let no_output_of_prior_pics_flag: u32 = unsafe { ::std::mem::transmute(no_output_of_prior_pics_flag) };
9074 no_output_of_prior_pics_flag as u64
9075 });
9076 __bindgen_bitfield_unit.set(21usize, 11u8, {
9077 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
9078 reserved as u64
9079 });
9080 __bindgen_bitfield_unit
9081 }
9082}
9083impl Default for _VAEncPictureParameterBufferHEVC__bindgen_ty_1 {
9084 fn default() -> Self {
9085 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
9086 unsafe {
9087 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
9088 s.assume_init()
9089 }
9090 }
9091}
9092#[doc = " \\brief SCC flags to enable/disable feature, only IBC at present."]
9093#[repr(C)]
9094#[derive(Copy, Clone)]
9095pub union _VAEncPictureParameterBufferHEVC__bindgen_ty_2 {
9096 pub bits: _VAEncPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1,
9097 pub value: u16,
9098}
9099#[repr(C)]
9100#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
9101pub struct _VAEncPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 {
9102 pub _bitfield_align_1: [u16; 0],
9103 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
9104}
9105impl _VAEncPictureParameterBufferHEVC__bindgen_ty_2__bindgen_ty_1 {
9106 #[inline]
9107 pub fn pps_curr_pic_ref_enabled_flag(&self) -> u16 {
9108 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u16) }
9109 }
9110 #[inline]
9111 pub fn set_pps_curr_pic_ref_enabled_flag(&mut self, val: u16) {
9112 unsafe {
9113 let val: u16 = ::std::mem::transmute(val);
9114 self._bitfield_1.set(0usize, 1u8, val as u64)
9115 }
9116 }
9117 #[inline]
9118 pub unsafe fn pps_curr_pic_ref_enabled_flag_raw(this: *const Self) -> u16 {
9119 unsafe {
9120 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9121 ::std::ptr::addr_of!((*this)._bitfield_1),
9122 0usize,
9123 1u8,
9124 ) as u16)
9125 }
9126 }
9127 #[inline]
9128 pub unsafe fn set_pps_curr_pic_ref_enabled_flag_raw(this: *mut Self, val: u16) {
9129 unsafe {
9130 let val: u16 = ::std::mem::transmute(val);
9131 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9132 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9133 0usize,
9134 1u8,
9135 val as u64,
9136 )
9137 }
9138 }
9139 #[inline]
9140 pub fn reserved(&self) -> u16 {
9141 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 15u8) as u16) }
9142 }
9143 #[inline]
9144 pub fn set_reserved(&mut self, val: u16) {
9145 unsafe {
9146 let val: u16 = ::std::mem::transmute(val);
9147 self._bitfield_1.set(1usize, 15u8, val as u64)
9148 }
9149 }
9150 #[inline]
9151 pub unsafe fn reserved_raw(this: *const Self) -> u16 {
9152 unsafe {
9153 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9154 ::std::ptr::addr_of!((*this)._bitfield_1),
9155 1usize,
9156 15u8,
9157 ) as u16)
9158 }
9159 }
9160 #[inline]
9161 pub unsafe fn set_reserved_raw(this: *mut Self, val: u16) {
9162 unsafe {
9163 let val: u16 = ::std::mem::transmute(val);
9164 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9165 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9166 1usize,
9167 15u8,
9168 val as u64,
9169 )
9170 }
9171 }
9172 #[inline]
9173 pub fn new_bitfield_1(pps_curr_pic_ref_enabled_flag: u16, reserved: u16) -> __BindgenBitfieldUnit<[u8; 2usize]> {
9174 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
9175 __bindgen_bitfield_unit.set(0usize, 1u8, {
9176 let pps_curr_pic_ref_enabled_flag: u16 = unsafe { ::std::mem::transmute(pps_curr_pic_ref_enabled_flag) };
9177 pps_curr_pic_ref_enabled_flag as u64
9178 });
9179 __bindgen_bitfield_unit.set(1usize, 15u8, {
9180 let reserved: u16 = unsafe { ::std::mem::transmute(reserved) };
9181 reserved as u64
9182 });
9183 __bindgen_bitfield_unit
9184 }
9185}
9186impl Default for _VAEncPictureParameterBufferHEVC__bindgen_ty_2 {
9187 fn default() -> Self {
9188 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
9189 unsafe {
9190 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
9191 s.assume_init()
9192 }
9193 }
9194}
9195impl Default for _VAEncPictureParameterBufferHEVC {
9196 fn default() -> Self {
9197 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
9198 unsafe {
9199 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
9200 s.assume_init()
9201 }
9202 }
9203}
9204#[doc = " HEVC data structures\n/\n/**\n \\brief Picture parameter for HEVC encoding in main & main 10\n profiles.\n\n This structure holds information for \\c pic_parameter_set_rbsp() as\n defined by the HEVC specification.\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c pic_scaling_matrix_present_flag is set to \\c 1, then a\n #VAQMatrixBufferHEVC buffer shall also be provided within the same\n \\c vaRenderPicture() call as this picture parameter buffer."]
9205pub type VAEncPictureParameterBufferHEVC = _VAEncPictureParameterBufferHEVC;
9206#[doc = " \\brief Slice parameter for HEVC encoding in main & main 10 profiles.\n\n This structure holds information for \\c\n slice_segment_layer_rbsp() as defined by the HEVC\n specification.\n\n If packed slice headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSlice ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n"]
9207#[repr(C)]
9208#[derive(Copy, Clone)]
9209pub struct _VAEncSliceParameterBufferHEVC {
9210 #[doc = " \\brief Starting CTU address for this slice."]
9211 pub slice_segment_address: u32,
9212 #[doc = " \\brief Number of CTUs in this slice."]
9213 pub num_ctu_in_slice: u32,
9214 #[doc = " \\brief Slice type.\n Corresponds to HEVC syntax element of the same name."]
9215 pub slice_type: u8,
9216 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9217 pub slice_pic_parameter_set_id: u8,
9218 #[doc = " \\brief Maximum reference index for reference picture list 0.\n Range: 0 to 14, inclusive."]
9219 pub num_ref_idx_l0_active_minus1: u8,
9220 #[doc = " \\brief Maximum reference index for reference picture list 1.\n Range: 0 to 14, inclusive."]
9221 pub num_ref_idx_l1_active_minus1: u8,
9222 #[doc = " \\brief Reference picture list 0 (for P slices)."]
9223 pub ref_pic_list0: [VAPictureHEVC; 15usize],
9224 #[doc = " \\brief Reference picture list 1 (for B slices)."]
9225 pub ref_pic_list1: [VAPictureHEVC; 15usize],
9226 #[doc = " @name pred_weight_table() */\n/**@{*/\n/** \\brief Same as the HEVC bitstream syntax element."]
9227 pub luma_log2_weight_denom: u8,
9228 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9229 pub delta_chroma_log2_weight_denom: i8,
9230 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9231 pub delta_luma_weight_l0: [i8; 15usize],
9232 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9233 pub luma_offset_l0: [i8; 15usize],
9234 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9235 pub delta_chroma_weight_l0: [[i8; 2usize]; 15usize],
9236 #[doc = " \\brief Same as the HEVC spec variable ChromaOffsetL0[]."]
9237 pub chroma_offset_l0: [[i8; 2usize]; 15usize],
9238 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9239 pub delta_luma_weight_l1: [i8; 15usize],
9240 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9241 pub luma_offset_l1: [i8; 15usize],
9242 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9243 pub delta_chroma_weight_l1: [[i8; 2usize]; 15usize],
9244 #[doc = " \\brief Same as the HEVC spec variable ChromaOffsetL1[]."]
9245 pub chroma_offset_l1: [[i8; 2usize]; 15usize],
9246 #[doc = " \\brief Corresponds to HEVC spec variable MaxNumMergeCand.\n Range: [1..5]."]
9247 pub max_num_merge_cand: u8,
9248 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9249 pub slice_qp_delta: i8,
9250 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9251 pub slice_cb_qp_offset: i8,
9252 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9253 pub slice_cr_qp_offset: i8,
9254 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9255 pub slice_beta_offset_div2: i8,
9256 #[doc = " \\brief Same as the HEVC bitstream syntax element."]
9257 pub slice_tc_offset_div2: i8,
9258 pub slice_fields: _VAEncSliceParameterBufferHEVC__bindgen_ty_1,
9259 #[doc = " \\brief bit offset of syntax element pred_weight_table() in slice segment header.\n It aligns with the starting position of the current packed slice header.\n It is used when encoder prefers to override the weighted prediction parameters passed in\n from application.\n Please refer to enable_gpu_weighted_prediction in VAEncPictureParameterBufferHEVC."]
9260 pub pred_weight_table_bit_offset: u32,
9261 #[doc = " \\brief bit length of syntax element pred_weight_table() in slice segment header.\n It is used when encoder prefers to override the weighted prediction parameters passed in\n from application.\n Please refer to enable_gpu_weighted_prediction in VAEncPictureParameterBufferHEVC."]
9262 pub pred_weight_table_bit_length: u32,
9263 #[doc = " \\brief Reserved bytes for future use, must be zero"]
9264 pub va_reserved: [u32; 6usize],
9265}
9266#[repr(C)]
9267#[derive(Copy, Clone)]
9268pub union _VAEncSliceParameterBufferHEVC__bindgen_ty_1 {
9269 pub bits: _VAEncSliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1,
9270 pub value: u32,
9271}
9272#[repr(C)]
9273#[repr(align(4))]
9274#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
9275pub struct _VAEncSliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
9276 pub _bitfield_align_1: [u8; 0],
9277 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
9278 pub __bindgen_padding_0: u16,
9279}
9280impl _VAEncSliceParameterBufferHEVC__bindgen_ty_1__bindgen_ty_1 {
9281 #[inline]
9282 pub fn last_slice_of_pic_flag(&self) -> u32 {
9283 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
9284 }
9285 #[inline]
9286 pub fn set_last_slice_of_pic_flag(&mut self, val: u32) {
9287 unsafe {
9288 let val: u32 = ::std::mem::transmute(val);
9289 self._bitfield_1.set(0usize, 1u8, val as u64)
9290 }
9291 }
9292 #[inline]
9293 pub unsafe fn last_slice_of_pic_flag_raw(this: *const Self) -> u32 {
9294 unsafe {
9295 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9296 ::std::ptr::addr_of!((*this)._bitfield_1),
9297 0usize,
9298 1u8,
9299 ) as u32)
9300 }
9301 }
9302 #[inline]
9303 pub unsafe fn set_last_slice_of_pic_flag_raw(this: *mut Self, val: u32) {
9304 unsafe {
9305 let val: u32 = ::std::mem::transmute(val);
9306 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9307 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9308 0usize,
9309 1u8,
9310 val as u64,
9311 )
9312 }
9313 }
9314 #[inline]
9315 pub fn dependent_slice_segment_flag(&self) -> u32 {
9316 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
9317 }
9318 #[inline]
9319 pub fn set_dependent_slice_segment_flag(&mut self, val: u32) {
9320 unsafe {
9321 let val: u32 = ::std::mem::transmute(val);
9322 self._bitfield_1.set(1usize, 1u8, val as u64)
9323 }
9324 }
9325 #[inline]
9326 pub unsafe fn dependent_slice_segment_flag_raw(this: *const Self) -> u32 {
9327 unsafe {
9328 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9329 ::std::ptr::addr_of!((*this)._bitfield_1),
9330 1usize,
9331 1u8,
9332 ) as u32)
9333 }
9334 }
9335 #[inline]
9336 pub unsafe fn set_dependent_slice_segment_flag_raw(this: *mut Self, val: u32) {
9337 unsafe {
9338 let val: u32 = ::std::mem::transmute(val);
9339 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9340 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9341 1usize,
9342 1u8,
9343 val as u64,
9344 )
9345 }
9346 }
9347 #[inline]
9348 pub fn colour_plane_id(&self) -> u32 {
9349 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) }
9350 }
9351 #[inline]
9352 pub fn set_colour_plane_id(&mut self, val: u32) {
9353 unsafe {
9354 let val: u32 = ::std::mem::transmute(val);
9355 self._bitfield_1.set(2usize, 2u8, val as u64)
9356 }
9357 }
9358 #[inline]
9359 pub unsafe fn colour_plane_id_raw(this: *const Self) -> u32 {
9360 unsafe {
9361 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9362 ::std::ptr::addr_of!((*this)._bitfield_1),
9363 2usize,
9364 2u8,
9365 ) as u32)
9366 }
9367 }
9368 #[inline]
9369 pub unsafe fn set_colour_plane_id_raw(this: *mut Self, val: u32) {
9370 unsafe {
9371 let val: u32 = ::std::mem::transmute(val);
9372 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9373 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9374 2usize,
9375 2u8,
9376 val as u64,
9377 )
9378 }
9379 }
9380 #[inline]
9381 pub fn slice_temporal_mvp_enabled_flag(&self) -> u32 {
9382 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
9383 }
9384 #[inline]
9385 pub fn set_slice_temporal_mvp_enabled_flag(&mut self, val: u32) {
9386 unsafe {
9387 let val: u32 = ::std::mem::transmute(val);
9388 self._bitfield_1.set(4usize, 1u8, val as u64)
9389 }
9390 }
9391 #[inline]
9392 pub unsafe fn slice_temporal_mvp_enabled_flag_raw(this: *const Self) -> u32 {
9393 unsafe {
9394 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9395 ::std::ptr::addr_of!((*this)._bitfield_1),
9396 4usize,
9397 1u8,
9398 ) as u32)
9399 }
9400 }
9401 #[inline]
9402 pub unsafe fn set_slice_temporal_mvp_enabled_flag_raw(this: *mut Self, val: u32) {
9403 unsafe {
9404 let val: u32 = ::std::mem::transmute(val);
9405 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9406 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9407 4usize,
9408 1u8,
9409 val as u64,
9410 )
9411 }
9412 }
9413 #[inline]
9414 pub fn slice_sao_luma_flag(&self) -> u32 {
9415 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
9416 }
9417 #[inline]
9418 pub fn set_slice_sao_luma_flag(&mut self, val: u32) {
9419 unsafe {
9420 let val: u32 = ::std::mem::transmute(val);
9421 self._bitfield_1.set(5usize, 1u8, val as u64)
9422 }
9423 }
9424 #[inline]
9425 pub unsafe fn slice_sao_luma_flag_raw(this: *const Self) -> u32 {
9426 unsafe {
9427 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9428 ::std::ptr::addr_of!((*this)._bitfield_1),
9429 5usize,
9430 1u8,
9431 ) as u32)
9432 }
9433 }
9434 #[inline]
9435 pub unsafe fn set_slice_sao_luma_flag_raw(this: *mut Self, val: u32) {
9436 unsafe {
9437 let val: u32 = ::std::mem::transmute(val);
9438 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9439 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9440 5usize,
9441 1u8,
9442 val as u64,
9443 )
9444 }
9445 }
9446 #[inline]
9447 pub fn slice_sao_chroma_flag(&self) -> u32 {
9448 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) }
9449 }
9450 #[inline]
9451 pub fn set_slice_sao_chroma_flag(&mut self, val: u32) {
9452 unsafe {
9453 let val: u32 = ::std::mem::transmute(val);
9454 self._bitfield_1.set(6usize, 1u8, val as u64)
9455 }
9456 }
9457 #[inline]
9458 pub unsafe fn slice_sao_chroma_flag_raw(this: *const Self) -> u32 {
9459 unsafe {
9460 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9461 ::std::ptr::addr_of!((*this)._bitfield_1),
9462 6usize,
9463 1u8,
9464 ) as u32)
9465 }
9466 }
9467 #[inline]
9468 pub unsafe fn set_slice_sao_chroma_flag_raw(this: *mut Self, val: u32) {
9469 unsafe {
9470 let val: u32 = ::std::mem::transmute(val);
9471 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9472 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9473 6usize,
9474 1u8,
9475 val as u64,
9476 )
9477 }
9478 }
9479 #[inline]
9480 pub fn num_ref_idx_active_override_flag(&self) -> u32 {
9481 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
9482 }
9483 #[inline]
9484 pub fn set_num_ref_idx_active_override_flag(&mut self, val: u32) {
9485 unsafe {
9486 let val: u32 = ::std::mem::transmute(val);
9487 self._bitfield_1.set(7usize, 1u8, val as u64)
9488 }
9489 }
9490 #[inline]
9491 pub unsafe fn num_ref_idx_active_override_flag_raw(this: *const Self) -> u32 {
9492 unsafe {
9493 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9494 ::std::ptr::addr_of!((*this)._bitfield_1),
9495 7usize,
9496 1u8,
9497 ) as u32)
9498 }
9499 }
9500 #[inline]
9501 pub unsafe fn set_num_ref_idx_active_override_flag_raw(this: *mut Self, val: u32) {
9502 unsafe {
9503 let val: u32 = ::std::mem::transmute(val);
9504 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9505 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9506 7usize,
9507 1u8,
9508 val as u64,
9509 )
9510 }
9511 }
9512 #[inline]
9513 pub fn mvd_l1_zero_flag(&self) -> u32 {
9514 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
9515 }
9516 #[inline]
9517 pub fn set_mvd_l1_zero_flag(&mut self, val: u32) {
9518 unsafe {
9519 let val: u32 = ::std::mem::transmute(val);
9520 self._bitfield_1.set(8usize, 1u8, val as u64)
9521 }
9522 }
9523 #[inline]
9524 pub unsafe fn mvd_l1_zero_flag_raw(this: *const Self) -> u32 {
9525 unsafe {
9526 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9527 ::std::ptr::addr_of!((*this)._bitfield_1),
9528 8usize,
9529 1u8,
9530 ) as u32)
9531 }
9532 }
9533 #[inline]
9534 pub unsafe fn set_mvd_l1_zero_flag_raw(this: *mut Self, val: u32) {
9535 unsafe {
9536 let val: u32 = ::std::mem::transmute(val);
9537 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9538 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9539 8usize,
9540 1u8,
9541 val as u64,
9542 )
9543 }
9544 }
9545 #[inline]
9546 pub fn cabac_init_flag(&self) -> u32 {
9547 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
9548 }
9549 #[inline]
9550 pub fn set_cabac_init_flag(&mut self, val: u32) {
9551 unsafe {
9552 let val: u32 = ::std::mem::transmute(val);
9553 self._bitfield_1.set(9usize, 1u8, val as u64)
9554 }
9555 }
9556 #[inline]
9557 pub unsafe fn cabac_init_flag_raw(this: *const Self) -> u32 {
9558 unsafe {
9559 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9560 ::std::ptr::addr_of!((*this)._bitfield_1),
9561 9usize,
9562 1u8,
9563 ) as u32)
9564 }
9565 }
9566 #[inline]
9567 pub unsafe fn set_cabac_init_flag_raw(this: *mut Self, val: u32) {
9568 unsafe {
9569 let val: u32 = ::std::mem::transmute(val);
9570 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9571 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9572 9usize,
9573 1u8,
9574 val as u64,
9575 )
9576 }
9577 }
9578 #[inline]
9579 pub fn slice_deblocking_filter_disabled_flag(&self) -> u32 {
9580 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) }
9581 }
9582 #[inline]
9583 pub fn set_slice_deblocking_filter_disabled_flag(&mut self, val: u32) {
9584 unsafe {
9585 let val: u32 = ::std::mem::transmute(val);
9586 self._bitfield_1.set(10usize, 2u8, val as u64)
9587 }
9588 }
9589 #[inline]
9590 pub unsafe fn slice_deblocking_filter_disabled_flag_raw(this: *const Self) -> u32 {
9591 unsafe {
9592 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9593 ::std::ptr::addr_of!((*this)._bitfield_1),
9594 10usize,
9595 2u8,
9596 ) as u32)
9597 }
9598 }
9599 #[inline]
9600 pub unsafe fn set_slice_deblocking_filter_disabled_flag_raw(this: *mut Self, val: u32) {
9601 unsafe {
9602 let val: u32 = ::std::mem::transmute(val);
9603 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9604 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9605 10usize,
9606 2u8,
9607 val as u64,
9608 )
9609 }
9610 }
9611 #[inline]
9612 pub fn slice_loop_filter_across_slices_enabled_flag(&self) -> u32 {
9613 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
9614 }
9615 #[inline]
9616 pub fn set_slice_loop_filter_across_slices_enabled_flag(&mut self, val: u32) {
9617 unsafe {
9618 let val: u32 = ::std::mem::transmute(val);
9619 self._bitfield_1.set(12usize, 1u8, val as u64)
9620 }
9621 }
9622 #[inline]
9623 pub unsafe fn slice_loop_filter_across_slices_enabled_flag_raw(this: *const Self) -> u32 {
9624 unsafe {
9625 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9626 ::std::ptr::addr_of!((*this)._bitfield_1),
9627 12usize,
9628 1u8,
9629 ) as u32)
9630 }
9631 }
9632 #[inline]
9633 pub unsafe fn set_slice_loop_filter_across_slices_enabled_flag_raw(this: *mut Self, val: u32) {
9634 unsafe {
9635 let val: u32 = ::std::mem::transmute(val);
9636 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9637 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9638 12usize,
9639 1u8,
9640 val as u64,
9641 )
9642 }
9643 }
9644 #[inline]
9645 pub fn collocated_from_l0_flag(&self) -> u32 {
9646 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
9647 }
9648 #[inline]
9649 pub fn set_collocated_from_l0_flag(&mut self, val: u32) {
9650 unsafe {
9651 let val: u32 = ::std::mem::transmute(val);
9652 self._bitfield_1.set(13usize, 1u8, val as u64)
9653 }
9654 }
9655 #[inline]
9656 pub unsafe fn collocated_from_l0_flag_raw(this: *const Self) -> u32 {
9657 unsafe {
9658 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
9659 ::std::ptr::addr_of!((*this)._bitfield_1),
9660 13usize,
9661 1u8,
9662 ) as u32)
9663 }
9664 }
9665 #[inline]
9666 pub unsafe fn set_collocated_from_l0_flag_raw(this: *mut Self, val: u32) {
9667 unsafe {
9668 let val: u32 = ::std::mem::transmute(val);
9669 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
9670 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9671 13usize,
9672 1u8,
9673 val as u64,
9674 )
9675 }
9676 }
9677 #[inline]
9678 pub fn new_bitfield_1(
9679 last_slice_of_pic_flag: u32,
9680 dependent_slice_segment_flag: u32,
9681 colour_plane_id: u32,
9682 slice_temporal_mvp_enabled_flag: u32,
9683 slice_sao_luma_flag: u32,
9684 slice_sao_chroma_flag: u32,
9685 num_ref_idx_active_override_flag: u32,
9686 mvd_l1_zero_flag: u32,
9687 cabac_init_flag: u32,
9688 slice_deblocking_filter_disabled_flag: u32,
9689 slice_loop_filter_across_slices_enabled_flag: u32,
9690 collocated_from_l0_flag: u32,
9691 ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
9692 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
9693 __bindgen_bitfield_unit.set(0usize, 1u8, {
9694 let last_slice_of_pic_flag: u32 = unsafe { ::std::mem::transmute(last_slice_of_pic_flag) };
9695 last_slice_of_pic_flag as u64
9696 });
9697 __bindgen_bitfield_unit.set(1usize, 1u8, {
9698 let dependent_slice_segment_flag: u32 = unsafe { ::std::mem::transmute(dependent_slice_segment_flag) };
9699 dependent_slice_segment_flag as u64
9700 });
9701 __bindgen_bitfield_unit.set(2usize, 2u8, {
9702 let colour_plane_id: u32 = unsafe { ::std::mem::transmute(colour_plane_id) };
9703 colour_plane_id as u64
9704 });
9705 __bindgen_bitfield_unit.set(4usize, 1u8, {
9706 let slice_temporal_mvp_enabled_flag: u32 =
9707 unsafe { ::std::mem::transmute(slice_temporal_mvp_enabled_flag) };
9708 slice_temporal_mvp_enabled_flag as u64
9709 });
9710 __bindgen_bitfield_unit.set(5usize, 1u8, {
9711 let slice_sao_luma_flag: u32 = unsafe { ::std::mem::transmute(slice_sao_luma_flag) };
9712 slice_sao_luma_flag as u64
9713 });
9714 __bindgen_bitfield_unit.set(6usize, 1u8, {
9715 let slice_sao_chroma_flag: u32 = unsafe { ::std::mem::transmute(slice_sao_chroma_flag) };
9716 slice_sao_chroma_flag as u64
9717 });
9718 __bindgen_bitfield_unit.set(7usize, 1u8, {
9719 let num_ref_idx_active_override_flag: u32 =
9720 unsafe { ::std::mem::transmute(num_ref_idx_active_override_flag) };
9721 num_ref_idx_active_override_flag as u64
9722 });
9723 __bindgen_bitfield_unit.set(8usize, 1u8, {
9724 let mvd_l1_zero_flag: u32 = unsafe { ::std::mem::transmute(mvd_l1_zero_flag) };
9725 mvd_l1_zero_flag as u64
9726 });
9727 __bindgen_bitfield_unit.set(9usize, 1u8, {
9728 let cabac_init_flag: u32 = unsafe { ::std::mem::transmute(cabac_init_flag) };
9729 cabac_init_flag as u64
9730 });
9731 __bindgen_bitfield_unit.set(10usize, 2u8, {
9732 let slice_deblocking_filter_disabled_flag: u32 =
9733 unsafe { ::std::mem::transmute(slice_deblocking_filter_disabled_flag) };
9734 slice_deblocking_filter_disabled_flag as u64
9735 });
9736 __bindgen_bitfield_unit.set(12usize, 1u8, {
9737 let slice_loop_filter_across_slices_enabled_flag: u32 =
9738 unsafe { ::std::mem::transmute(slice_loop_filter_across_slices_enabled_flag) };
9739 slice_loop_filter_across_slices_enabled_flag as u64
9740 });
9741 __bindgen_bitfield_unit.set(13usize, 1u8, {
9742 let collocated_from_l0_flag: u32 = unsafe { ::std::mem::transmute(collocated_from_l0_flag) };
9743 collocated_from_l0_flag as u64
9744 });
9745 __bindgen_bitfield_unit
9746 }
9747}
9748impl Default for _VAEncSliceParameterBufferHEVC__bindgen_ty_1 {
9749 fn default() -> Self {
9750 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
9751 unsafe {
9752 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
9753 s.assume_init()
9754 }
9755 }
9756}
9757impl Default for _VAEncSliceParameterBufferHEVC {
9758 fn default() -> Self {
9759 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
9760 unsafe {
9761 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
9762 s.assume_init()
9763 }
9764 }
9765}
9766#[doc = " \\brief Slice parameter for HEVC encoding in main & main 10 profiles.\n\n This structure holds information for \\c\n slice_segment_layer_rbsp() as defined by the HEVC\n specification.\n\n If packed slice headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSlice ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n"]
9767pub type VAEncSliceParameterBufferHEVC = _VAEncSliceParameterBufferHEVC;
9768#[doc = " \\brief Sequence parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds information for \\c seq_parameter_set_data() as\n defined by the H.264 specification.\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c seq_scaling_matrix_present_flag is set to \\c 1, then a\n #VAIQMatrixBufferH264 buffer shall also be provided within the same\n \\c vaRenderPicture() call as this sequence parameter buffer."]
9769#[repr(C)]
9770#[derive(Copy, Clone)]
9771pub struct _VAEncSequenceParameterBufferH264 {
9772 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9773 pub seq_parameter_set_id: u8,
9774 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9775 pub level_idc: u8,
9776 #[doc = " \\brief Period between I frames."]
9777 pub intra_period: u32,
9778 #[doc = " \\brief Period between IDR frames."]
9779 pub intra_idr_period: u32,
9780 #[doc = " \\brief Period between I/P frames."]
9781 pub ip_period: u32,
9782 #[doc = " \\brief Initial bitrate set for this sequence in CBR or VBR modes.\n\n This field represents the initial bitrate value for this\n sequence if CBR or VBR mode is used, i.e. if the encoder\n pipeline was created with a #VAConfigAttribRateControl\n attribute set to either \\ref VA_RC_CBR or \\ref VA_RC_VBR.\n\n The bitrate can be modified later on through\n #VAEncMiscParameterRateControl buffers."]
9783 pub bits_per_second: u32,
9784 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9785 pub max_num_ref_frames: u32,
9786 #[doc = " \\brief Picture width in macroblocks."]
9787 pub picture_width_in_mbs: u16,
9788 #[doc = " \\brief Picture height in macroblocks."]
9789 pub picture_height_in_mbs: u16,
9790 pub seq_fields: _VAEncSequenceParameterBufferH264__bindgen_ty_1,
9791 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9792 pub bit_depth_luma_minus8: u8,
9793 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9794 pub bit_depth_chroma_minus8: u8,
9795 #[doc = " if pic_order_cnt_type == 1 */\n/**@{*/\n/** \\brief Same as the H.264 bitstream syntax element."]
9796 pub num_ref_frames_in_pic_order_cnt_cycle: u8,
9797 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9798 pub offset_for_non_ref_pic: i32,
9799 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9800 pub offset_for_top_to_bottom_field: i32,
9801 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9802 pub offset_for_ref_frame: [i32; 256usize],
9803 #[doc = " @name Cropping (optional) */\n/**@{*/\n/** \\brief Same as the H.264 bitstream syntax element."]
9804 pub frame_cropping_flag: u8,
9805 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9806 pub frame_crop_left_offset: u32,
9807 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9808 pub frame_crop_right_offset: u32,
9809 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9810 pub frame_crop_top_offset: u32,
9811 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9812 pub frame_crop_bottom_offset: u32,
9813 #[doc = " @name VUI parameters (optional) */\n/**@{*/\n/** \\brief Same as the H.264 bitstream syntax element."]
9814 pub vui_parameters_present_flag: u8,
9815 pub vui_fields: _VAEncSequenceParameterBufferH264__bindgen_ty_2,
9816 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9817 pub aspect_ratio_idc: u8,
9818 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9819 pub sar_width: u32,
9820 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9821 pub sar_height: u32,
9822 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9823 pub num_units_in_tick: u32,
9824 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
9825 pub time_scale: u32,
9826 #[doc = " \\brief Reserved bytes for future use, must be zero"]
9827 pub va_reserved: [u32; 4usize],
9828}
9829#[repr(C)]
9830#[derive(Copy, Clone)]
9831pub union _VAEncSequenceParameterBufferH264__bindgen_ty_1 {
9832 pub bits: _VAEncSequenceParameterBufferH264__bindgen_ty_1__bindgen_ty_1,
9833 pub value: u32,
9834}
9835#[repr(C)]
9836#[repr(align(4))]
9837#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
9838pub struct _VAEncSequenceParameterBufferH264__bindgen_ty_1__bindgen_ty_1 {
9839 pub _bitfield_align_1: [u8; 0],
9840 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
9841 pub __bindgen_padding_0: u8,
9842}
9843impl _VAEncSequenceParameterBufferH264__bindgen_ty_1__bindgen_ty_1 {
9844 #[inline]
9845 pub fn chroma_format_idc(&self) -> u32 {
9846 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) }
9847 }
9848 #[inline]
9849 pub fn set_chroma_format_idc(&mut self, val: u32) {
9850 unsafe {
9851 let val: u32 = ::std::mem::transmute(val);
9852 self._bitfield_1.set(0usize, 2u8, val as u64)
9853 }
9854 }
9855 #[inline]
9856 pub unsafe fn chroma_format_idc_raw(this: *const Self) -> u32 {
9857 unsafe {
9858 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
9859 ::std::ptr::addr_of!((*this)._bitfield_1),
9860 0usize,
9861 2u8,
9862 ) as u32)
9863 }
9864 }
9865 #[inline]
9866 pub unsafe fn set_chroma_format_idc_raw(this: *mut Self, val: u32) {
9867 unsafe {
9868 let val: u32 = ::std::mem::transmute(val);
9869 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
9870 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9871 0usize,
9872 2u8,
9873 val as u64,
9874 )
9875 }
9876 }
9877 #[inline]
9878 pub fn frame_mbs_only_flag(&self) -> u32 {
9879 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
9880 }
9881 #[inline]
9882 pub fn set_frame_mbs_only_flag(&mut self, val: u32) {
9883 unsafe {
9884 let val: u32 = ::std::mem::transmute(val);
9885 self._bitfield_1.set(2usize, 1u8, val as u64)
9886 }
9887 }
9888 #[inline]
9889 pub unsafe fn frame_mbs_only_flag_raw(this: *const Self) -> u32 {
9890 unsafe {
9891 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
9892 ::std::ptr::addr_of!((*this)._bitfield_1),
9893 2usize,
9894 1u8,
9895 ) as u32)
9896 }
9897 }
9898 #[inline]
9899 pub unsafe fn set_frame_mbs_only_flag_raw(this: *mut Self, val: u32) {
9900 unsafe {
9901 let val: u32 = ::std::mem::transmute(val);
9902 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
9903 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9904 2usize,
9905 1u8,
9906 val as u64,
9907 )
9908 }
9909 }
9910 #[inline]
9911 pub fn mb_adaptive_frame_field_flag(&self) -> u32 {
9912 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
9913 }
9914 #[inline]
9915 pub fn set_mb_adaptive_frame_field_flag(&mut self, val: u32) {
9916 unsafe {
9917 let val: u32 = ::std::mem::transmute(val);
9918 self._bitfield_1.set(3usize, 1u8, val as u64)
9919 }
9920 }
9921 #[inline]
9922 pub unsafe fn mb_adaptive_frame_field_flag_raw(this: *const Self) -> u32 {
9923 unsafe {
9924 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
9925 ::std::ptr::addr_of!((*this)._bitfield_1),
9926 3usize,
9927 1u8,
9928 ) as u32)
9929 }
9930 }
9931 #[inline]
9932 pub unsafe fn set_mb_adaptive_frame_field_flag_raw(this: *mut Self, val: u32) {
9933 unsafe {
9934 let val: u32 = ::std::mem::transmute(val);
9935 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
9936 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9937 3usize,
9938 1u8,
9939 val as u64,
9940 )
9941 }
9942 }
9943 #[inline]
9944 pub fn seq_scaling_matrix_present_flag(&self) -> u32 {
9945 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
9946 }
9947 #[inline]
9948 pub fn set_seq_scaling_matrix_present_flag(&mut self, val: u32) {
9949 unsafe {
9950 let val: u32 = ::std::mem::transmute(val);
9951 self._bitfield_1.set(4usize, 1u8, val as u64)
9952 }
9953 }
9954 #[inline]
9955 pub unsafe fn seq_scaling_matrix_present_flag_raw(this: *const Self) -> u32 {
9956 unsafe {
9957 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
9958 ::std::ptr::addr_of!((*this)._bitfield_1),
9959 4usize,
9960 1u8,
9961 ) as u32)
9962 }
9963 }
9964 #[inline]
9965 pub unsafe fn set_seq_scaling_matrix_present_flag_raw(this: *mut Self, val: u32) {
9966 unsafe {
9967 let val: u32 = ::std::mem::transmute(val);
9968 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
9969 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
9970 4usize,
9971 1u8,
9972 val as u64,
9973 )
9974 }
9975 }
9976 #[inline]
9977 pub fn direct_8x8_inference_flag(&self) -> u32 {
9978 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
9979 }
9980 #[inline]
9981 pub fn set_direct_8x8_inference_flag(&mut self, val: u32) {
9982 unsafe {
9983 let val: u32 = ::std::mem::transmute(val);
9984 self._bitfield_1.set(5usize, 1u8, val as u64)
9985 }
9986 }
9987 #[inline]
9988 pub unsafe fn direct_8x8_inference_flag_raw(this: *const Self) -> u32 {
9989 unsafe {
9990 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
9991 ::std::ptr::addr_of!((*this)._bitfield_1),
9992 5usize,
9993 1u8,
9994 ) as u32)
9995 }
9996 }
9997 #[inline]
9998 pub unsafe fn set_direct_8x8_inference_flag_raw(this: *mut Self, val: u32) {
9999 unsafe {
10000 let val: u32 = ::std::mem::transmute(val);
10001 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
10002 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10003 5usize,
10004 1u8,
10005 val as u64,
10006 )
10007 }
10008 }
10009 #[inline]
10010 pub fn log2_max_frame_num_minus4(&self) -> u32 {
10011 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 4u8) as u32) }
10012 }
10013 #[inline]
10014 pub fn set_log2_max_frame_num_minus4(&mut self, val: u32) {
10015 unsafe {
10016 let val: u32 = ::std::mem::transmute(val);
10017 self._bitfield_1.set(6usize, 4u8, val as u64)
10018 }
10019 }
10020 #[inline]
10021 pub unsafe fn log2_max_frame_num_minus4_raw(this: *const Self) -> u32 {
10022 unsafe {
10023 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
10024 ::std::ptr::addr_of!((*this)._bitfield_1),
10025 6usize,
10026 4u8,
10027 ) as u32)
10028 }
10029 }
10030 #[inline]
10031 pub unsafe fn set_log2_max_frame_num_minus4_raw(this: *mut Self, val: u32) {
10032 unsafe {
10033 let val: u32 = ::std::mem::transmute(val);
10034 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
10035 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10036 6usize,
10037 4u8,
10038 val as u64,
10039 )
10040 }
10041 }
10042 #[inline]
10043 pub fn pic_order_cnt_type(&self) -> u32 {
10044 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 2u8) as u32) }
10045 }
10046 #[inline]
10047 pub fn set_pic_order_cnt_type(&mut self, val: u32) {
10048 unsafe {
10049 let val: u32 = ::std::mem::transmute(val);
10050 self._bitfield_1.set(10usize, 2u8, val as u64)
10051 }
10052 }
10053 #[inline]
10054 pub unsafe fn pic_order_cnt_type_raw(this: *const Self) -> u32 {
10055 unsafe {
10056 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
10057 ::std::ptr::addr_of!((*this)._bitfield_1),
10058 10usize,
10059 2u8,
10060 ) as u32)
10061 }
10062 }
10063 #[inline]
10064 pub unsafe fn set_pic_order_cnt_type_raw(this: *mut Self, val: u32) {
10065 unsafe {
10066 let val: u32 = ::std::mem::transmute(val);
10067 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
10068 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10069 10usize,
10070 2u8,
10071 val as u64,
10072 )
10073 }
10074 }
10075 #[inline]
10076 pub fn log2_max_pic_order_cnt_lsb_minus4(&self) -> u32 {
10077 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u32) }
10078 }
10079 #[inline]
10080 pub fn set_log2_max_pic_order_cnt_lsb_minus4(&mut self, val: u32) {
10081 unsafe {
10082 let val: u32 = ::std::mem::transmute(val);
10083 self._bitfield_1.set(12usize, 4u8, val as u64)
10084 }
10085 }
10086 #[inline]
10087 pub unsafe fn log2_max_pic_order_cnt_lsb_minus4_raw(this: *const Self) -> u32 {
10088 unsafe {
10089 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
10090 ::std::ptr::addr_of!((*this)._bitfield_1),
10091 12usize,
10092 4u8,
10093 ) as u32)
10094 }
10095 }
10096 #[inline]
10097 pub unsafe fn set_log2_max_pic_order_cnt_lsb_minus4_raw(this: *mut Self, val: u32) {
10098 unsafe {
10099 let val: u32 = ::std::mem::transmute(val);
10100 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
10101 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10102 12usize,
10103 4u8,
10104 val as u64,
10105 )
10106 }
10107 }
10108 #[inline]
10109 pub fn delta_pic_order_always_zero_flag(&self) -> u32 {
10110 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u32) }
10111 }
10112 #[inline]
10113 pub fn set_delta_pic_order_always_zero_flag(&mut self, val: u32) {
10114 unsafe {
10115 let val: u32 = ::std::mem::transmute(val);
10116 self._bitfield_1.set(16usize, 1u8, val as u64)
10117 }
10118 }
10119 #[inline]
10120 pub unsafe fn delta_pic_order_always_zero_flag_raw(this: *const Self) -> u32 {
10121 unsafe {
10122 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get(
10123 ::std::ptr::addr_of!((*this)._bitfield_1),
10124 16usize,
10125 1u8,
10126 ) as u32)
10127 }
10128 }
10129 #[inline]
10130 pub unsafe fn set_delta_pic_order_always_zero_flag_raw(this: *mut Self, val: u32) {
10131 unsafe {
10132 let val: u32 = ::std::mem::transmute(val);
10133 <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set(
10134 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10135 16usize,
10136 1u8,
10137 val as u64,
10138 )
10139 }
10140 }
10141 #[inline]
10142 pub fn new_bitfield_1(
10143 chroma_format_idc: u32,
10144 frame_mbs_only_flag: u32,
10145 mb_adaptive_frame_field_flag: u32,
10146 seq_scaling_matrix_present_flag: u32,
10147 direct_8x8_inference_flag: u32,
10148 log2_max_frame_num_minus4: u32,
10149 pic_order_cnt_type: u32,
10150 log2_max_pic_order_cnt_lsb_minus4: u32,
10151 delta_pic_order_always_zero_flag: u32,
10152 ) -> __BindgenBitfieldUnit<[u8; 3usize]> {
10153 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
10154 __bindgen_bitfield_unit.set(0usize, 2u8, {
10155 let chroma_format_idc: u32 = unsafe { ::std::mem::transmute(chroma_format_idc) };
10156 chroma_format_idc as u64
10157 });
10158 __bindgen_bitfield_unit.set(2usize, 1u8, {
10159 let frame_mbs_only_flag: u32 = unsafe { ::std::mem::transmute(frame_mbs_only_flag) };
10160 frame_mbs_only_flag as u64
10161 });
10162 __bindgen_bitfield_unit.set(3usize, 1u8, {
10163 let mb_adaptive_frame_field_flag: u32 = unsafe { ::std::mem::transmute(mb_adaptive_frame_field_flag) };
10164 mb_adaptive_frame_field_flag as u64
10165 });
10166 __bindgen_bitfield_unit.set(4usize, 1u8, {
10167 let seq_scaling_matrix_present_flag: u32 =
10168 unsafe { ::std::mem::transmute(seq_scaling_matrix_present_flag) };
10169 seq_scaling_matrix_present_flag as u64
10170 });
10171 __bindgen_bitfield_unit.set(5usize, 1u8, {
10172 let direct_8x8_inference_flag: u32 = unsafe { ::std::mem::transmute(direct_8x8_inference_flag) };
10173 direct_8x8_inference_flag as u64
10174 });
10175 __bindgen_bitfield_unit.set(6usize, 4u8, {
10176 let log2_max_frame_num_minus4: u32 = unsafe { ::std::mem::transmute(log2_max_frame_num_minus4) };
10177 log2_max_frame_num_minus4 as u64
10178 });
10179 __bindgen_bitfield_unit.set(10usize, 2u8, {
10180 let pic_order_cnt_type: u32 = unsafe { ::std::mem::transmute(pic_order_cnt_type) };
10181 pic_order_cnt_type as u64
10182 });
10183 __bindgen_bitfield_unit.set(12usize, 4u8, {
10184 let log2_max_pic_order_cnt_lsb_minus4: u32 =
10185 unsafe { ::std::mem::transmute(log2_max_pic_order_cnt_lsb_minus4) };
10186 log2_max_pic_order_cnt_lsb_minus4 as u64
10187 });
10188 __bindgen_bitfield_unit.set(16usize, 1u8, {
10189 let delta_pic_order_always_zero_flag: u32 =
10190 unsafe { ::std::mem::transmute(delta_pic_order_always_zero_flag) };
10191 delta_pic_order_always_zero_flag as u64
10192 });
10193 __bindgen_bitfield_unit
10194 }
10195}
10196impl Default for _VAEncSequenceParameterBufferH264__bindgen_ty_1 {
10197 fn default() -> Self {
10198 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10199 unsafe {
10200 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10201 s.assume_init()
10202 }
10203 }
10204}
10205#[repr(C)]
10206#[derive(Copy, Clone)]
10207pub union _VAEncSequenceParameterBufferH264__bindgen_ty_2 {
10208 pub bits: _VAEncSequenceParameterBufferH264__bindgen_ty_2__bindgen_ty_1,
10209 pub value: u32,
10210}
10211#[repr(C)]
10212#[repr(align(4))]
10213#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
10214pub struct _VAEncSequenceParameterBufferH264__bindgen_ty_2__bindgen_ty_1 {
10215 pub _bitfield_align_1: [u16; 0],
10216 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
10217}
10218impl _VAEncSequenceParameterBufferH264__bindgen_ty_2__bindgen_ty_1 {
10219 #[inline]
10220 pub fn aspect_ratio_info_present_flag(&self) -> u32 {
10221 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
10222 }
10223 #[inline]
10224 pub fn set_aspect_ratio_info_present_flag(&mut self, val: u32) {
10225 unsafe {
10226 let val: u32 = ::std::mem::transmute(val);
10227 self._bitfield_1.set(0usize, 1u8, val as u64)
10228 }
10229 }
10230 #[inline]
10231 pub unsafe fn aspect_ratio_info_present_flag_raw(this: *const Self) -> u32 {
10232 unsafe {
10233 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10234 ::std::ptr::addr_of!((*this)._bitfield_1),
10235 0usize,
10236 1u8,
10237 ) as u32)
10238 }
10239 }
10240 #[inline]
10241 pub unsafe fn set_aspect_ratio_info_present_flag_raw(this: *mut Self, val: u32) {
10242 unsafe {
10243 let val: u32 = ::std::mem::transmute(val);
10244 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10245 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10246 0usize,
10247 1u8,
10248 val as u64,
10249 )
10250 }
10251 }
10252 #[inline]
10253 pub fn timing_info_present_flag(&self) -> u32 {
10254 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) }
10255 }
10256 #[inline]
10257 pub fn set_timing_info_present_flag(&mut self, val: u32) {
10258 unsafe {
10259 let val: u32 = ::std::mem::transmute(val);
10260 self._bitfield_1.set(1usize, 1u8, val as u64)
10261 }
10262 }
10263 #[inline]
10264 pub unsafe fn timing_info_present_flag_raw(this: *const Self) -> u32 {
10265 unsafe {
10266 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10267 ::std::ptr::addr_of!((*this)._bitfield_1),
10268 1usize,
10269 1u8,
10270 ) as u32)
10271 }
10272 }
10273 #[inline]
10274 pub unsafe fn set_timing_info_present_flag_raw(this: *mut Self, val: u32) {
10275 unsafe {
10276 let val: u32 = ::std::mem::transmute(val);
10277 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10278 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10279 1usize,
10280 1u8,
10281 val as u64,
10282 )
10283 }
10284 }
10285 #[inline]
10286 pub fn bitstream_restriction_flag(&self) -> u32 {
10287 unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) }
10288 }
10289 #[inline]
10290 pub fn set_bitstream_restriction_flag(&mut self, val: u32) {
10291 unsafe {
10292 let val: u32 = ::std::mem::transmute(val);
10293 self._bitfield_1.set(2usize, 1u8, val as u64)
10294 }
10295 }
10296 #[inline]
10297 pub unsafe fn bitstream_restriction_flag_raw(this: *const Self) -> u32 {
10298 unsafe {
10299 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10300 ::std::ptr::addr_of!((*this)._bitfield_1),
10301 2usize,
10302 1u8,
10303 ) as u32)
10304 }
10305 }
10306 #[inline]
10307 pub unsafe fn set_bitstream_restriction_flag_raw(this: *mut Self, val: u32) {
10308 unsafe {
10309 let val: u32 = ::std::mem::transmute(val);
10310 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10311 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10312 2usize,
10313 1u8,
10314 val as u64,
10315 )
10316 }
10317 }
10318 #[inline]
10319 pub fn log2_max_mv_length_horizontal(&self) -> u32 {
10320 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u32) }
10321 }
10322 #[inline]
10323 pub fn set_log2_max_mv_length_horizontal(&mut self, val: u32) {
10324 unsafe {
10325 let val: u32 = ::std::mem::transmute(val);
10326 self._bitfield_1.set(3usize, 5u8, val as u64)
10327 }
10328 }
10329 #[inline]
10330 pub unsafe fn log2_max_mv_length_horizontal_raw(this: *const Self) -> u32 {
10331 unsafe {
10332 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10333 ::std::ptr::addr_of!((*this)._bitfield_1),
10334 3usize,
10335 5u8,
10336 ) as u32)
10337 }
10338 }
10339 #[inline]
10340 pub unsafe fn set_log2_max_mv_length_horizontal_raw(this: *mut Self, val: u32) {
10341 unsafe {
10342 let val: u32 = ::std::mem::transmute(val);
10343 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10344 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10345 3usize,
10346 5u8,
10347 val as u64,
10348 )
10349 }
10350 }
10351 #[inline]
10352 pub fn log2_max_mv_length_vertical(&self) -> u32 {
10353 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 5u8) as u32) }
10354 }
10355 #[inline]
10356 pub fn set_log2_max_mv_length_vertical(&mut self, val: u32) {
10357 unsafe {
10358 let val: u32 = ::std::mem::transmute(val);
10359 self._bitfield_1.set(8usize, 5u8, val as u64)
10360 }
10361 }
10362 #[inline]
10363 pub unsafe fn log2_max_mv_length_vertical_raw(this: *const Self) -> u32 {
10364 unsafe {
10365 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10366 ::std::ptr::addr_of!((*this)._bitfield_1),
10367 8usize,
10368 5u8,
10369 ) as u32)
10370 }
10371 }
10372 #[inline]
10373 pub unsafe fn set_log2_max_mv_length_vertical_raw(this: *mut Self, val: u32) {
10374 unsafe {
10375 let val: u32 = ::std::mem::transmute(val);
10376 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10377 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10378 8usize,
10379 5u8,
10380 val as u64,
10381 )
10382 }
10383 }
10384 #[inline]
10385 pub fn fixed_frame_rate_flag(&self) -> u32 {
10386 unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u32) }
10387 }
10388 #[inline]
10389 pub fn set_fixed_frame_rate_flag(&mut self, val: u32) {
10390 unsafe {
10391 let val: u32 = ::std::mem::transmute(val);
10392 self._bitfield_1.set(13usize, 1u8, val as u64)
10393 }
10394 }
10395 #[inline]
10396 pub unsafe fn fixed_frame_rate_flag_raw(this: *const Self) -> u32 {
10397 unsafe {
10398 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10399 ::std::ptr::addr_of!((*this)._bitfield_1),
10400 13usize,
10401 1u8,
10402 ) as u32)
10403 }
10404 }
10405 #[inline]
10406 pub unsafe fn set_fixed_frame_rate_flag_raw(this: *mut Self, val: u32) {
10407 unsafe {
10408 let val: u32 = ::std::mem::transmute(val);
10409 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10410 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10411 13usize,
10412 1u8,
10413 val as u64,
10414 )
10415 }
10416 }
10417 #[inline]
10418 pub fn low_delay_hrd_flag(&self) -> u32 {
10419 unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u32) }
10420 }
10421 #[inline]
10422 pub fn set_low_delay_hrd_flag(&mut self, val: u32) {
10423 unsafe {
10424 let val: u32 = ::std::mem::transmute(val);
10425 self._bitfield_1.set(14usize, 1u8, val as u64)
10426 }
10427 }
10428 #[inline]
10429 pub unsafe fn low_delay_hrd_flag_raw(this: *const Self) -> u32 {
10430 unsafe {
10431 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10432 ::std::ptr::addr_of!((*this)._bitfield_1),
10433 14usize,
10434 1u8,
10435 ) as u32)
10436 }
10437 }
10438 #[inline]
10439 pub unsafe fn set_low_delay_hrd_flag_raw(this: *mut Self, val: u32) {
10440 unsafe {
10441 let val: u32 = ::std::mem::transmute(val);
10442 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10443 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10444 14usize,
10445 1u8,
10446 val as u64,
10447 )
10448 }
10449 }
10450 #[inline]
10451 pub fn motion_vectors_over_pic_boundaries_flag(&self) -> u32 {
10452 unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
10453 }
10454 #[inline]
10455 pub fn set_motion_vectors_over_pic_boundaries_flag(&mut self, val: u32) {
10456 unsafe {
10457 let val: u32 = ::std::mem::transmute(val);
10458 self._bitfield_1.set(15usize, 1u8, val as u64)
10459 }
10460 }
10461 #[inline]
10462 pub unsafe fn motion_vectors_over_pic_boundaries_flag_raw(this: *const Self) -> u32 {
10463 unsafe {
10464 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10465 ::std::ptr::addr_of!((*this)._bitfield_1),
10466 15usize,
10467 1u8,
10468 ) as u32)
10469 }
10470 }
10471 #[inline]
10472 pub unsafe fn set_motion_vectors_over_pic_boundaries_flag_raw(this: *mut Self, val: u32) {
10473 unsafe {
10474 let val: u32 = ::std::mem::transmute(val);
10475 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10476 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10477 15usize,
10478 1u8,
10479 val as u64,
10480 )
10481 }
10482 }
10483 #[inline]
10484 pub fn reserved(&self) -> u32 {
10485 unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) }
10486 }
10487 #[inline]
10488 pub fn set_reserved(&mut self, val: u32) {
10489 unsafe {
10490 let val: u32 = ::std::mem::transmute(val);
10491 self._bitfield_1.set(16usize, 16u8, val as u64)
10492 }
10493 }
10494 #[inline]
10495 pub unsafe fn reserved_raw(this: *const Self) -> u32 {
10496 unsafe {
10497 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get(
10498 ::std::ptr::addr_of!((*this)._bitfield_1),
10499 16usize,
10500 16u8,
10501 ) as u32)
10502 }
10503 }
10504 #[inline]
10505 pub unsafe fn set_reserved_raw(this: *mut Self, val: u32) {
10506 unsafe {
10507 let val: u32 = ::std::mem::transmute(val);
10508 <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set(
10509 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10510 16usize,
10511 16u8,
10512 val as u64,
10513 )
10514 }
10515 }
10516 #[inline]
10517 pub fn new_bitfield_1(
10518 aspect_ratio_info_present_flag: u32,
10519 timing_info_present_flag: u32,
10520 bitstream_restriction_flag: u32,
10521 log2_max_mv_length_horizontal: u32,
10522 log2_max_mv_length_vertical: u32,
10523 fixed_frame_rate_flag: u32,
10524 low_delay_hrd_flag: u32,
10525 motion_vectors_over_pic_boundaries_flag: u32,
10526 reserved: u32,
10527 ) -> __BindgenBitfieldUnit<[u8; 4usize]> {
10528 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
10529 __bindgen_bitfield_unit.set(0usize, 1u8, {
10530 let aspect_ratio_info_present_flag: u32 = unsafe { ::std::mem::transmute(aspect_ratio_info_present_flag) };
10531 aspect_ratio_info_present_flag as u64
10532 });
10533 __bindgen_bitfield_unit.set(1usize, 1u8, {
10534 let timing_info_present_flag: u32 = unsafe { ::std::mem::transmute(timing_info_present_flag) };
10535 timing_info_present_flag as u64
10536 });
10537 __bindgen_bitfield_unit.set(2usize, 1u8, {
10538 let bitstream_restriction_flag: u32 = unsafe { ::std::mem::transmute(bitstream_restriction_flag) };
10539 bitstream_restriction_flag as u64
10540 });
10541 __bindgen_bitfield_unit.set(3usize, 5u8, {
10542 let log2_max_mv_length_horizontal: u32 = unsafe { ::std::mem::transmute(log2_max_mv_length_horizontal) };
10543 log2_max_mv_length_horizontal as u64
10544 });
10545 __bindgen_bitfield_unit.set(8usize, 5u8, {
10546 let log2_max_mv_length_vertical: u32 = unsafe { ::std::mem::transmute(log2_max_mv_length_vertical) };
10547 log2_max_mv_length_vertical as u64
10548 });
10549 __bindgen_bitfield_unit.set(13usize, 1u8, {
10550 let fixed_frame_rate_flag: u32 = unsafe { ::std::mem::transmute(fixed_frame_rate_flag) };
10551 fixed_frame_rate_flag as u64
10552 });
10553 __bindgen_bitfield_unit.set(14usize, 1u8, {
10554 let low_delay_hrd_flag: u32 = unsafe { ::std::mem::transmute(low_delay_hrd_flag) };
10555 low_delay_hrd_flag as u64
10556 });
10557 __bindgen_bitfield_unit.set(15usize, 1u8, {
10558 let motion_vectors_over_pic_boundaries_flag: u32 =
10559 unsafe { ::std::mem::transmute(motion_vectors_over_pic_boundaries_flag) };
10560 motion_vectors_over_pic_boundaries_flag as u64
10561 });
10562 __bindgen_bitfield_unit.set(16usize, 16u8, {
10563 let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
10564 reserved as u64
10565 });
10566 __bindgen_bitfield_unit
10567 }
10568}
10569impl Default for _VAEncSequenceParameterBufferH264__bindgen_ty_2 {
10570 fn default() -> Self {
10571 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10572 unsafe {
10573 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10574 s.assume_init()
10575 }
10576 }
10577}
10578impl Default for _VAEncSequenceParameterBufferH264 {
10579 fn default() -> Self {
10580 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
10581 unsafe {
10582 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
10583 s.assume_init()
10584 }
10585 }
10586}
10587#[doc = " \\brief Sequence parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds information for \\c seq_parameter_set_data() as\n defined by the H.264 specification.\n\n If packed sequence headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSequence ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c seq_scaling_matrix_present_flag is set to \\c 1, then a\n #VAIQMatrixBufferH264 buffer shall also be provided within the same\n \\c vaRenderPicture() call as this sequence parameter buffer."]
10588pub type VAEncSequenceParameterBufferH264 = _VAEncSequenceParameterBufferH264;
10589#[doc = " \\brief Picture parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds information for \\c pic_parameter_set_rbsp() as\n defined by the H.264 specification.\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c pic_scaling_matrix_present_flag is set to \\c 1, then a\n #VAIQMatrixBufferH264 buffer shall also be provided within the same\n \\c vaRenderPicture() call as this picture parameter buffer."]
10590#[repr(C)]
10591#[derive(Copy, Clone)]
10592pub struct _VAEncPictureParameterBufferH264 {
10593 #[doc = " \\brief Information about the picture to be encoded.\n\n See #VAPictureH264 for further description of each field.\n Note that CurrPic.picture_id represents the reconstructed\n (decoded) picture. User provides a scratch VA surface ID here."]
10594 pub CurrPic: VAPictureH264,
10595 #[doc = " \\brief Decoded Picture Buffer (DPB).\n\n This array represents the list of reconstructed (decoded)\n frames used as reference. It is important to keep track of\n reconstructed frames so that they can be used later on as\n reference for P or B-frames encoding."]
10596 pub ReferenceFrames: [VAPictureH264; 16usize],
10597 #[doc = " \\brief Output encoded bitstream.\n\n \\ref coded_buf has type #VAEncCodedBufferType. It should be\n large enough to hold the compressed NAL slice and possibly SPS\n and PPS NAL units."]
10598 pub coded_buf: VABufferID,
10599 #[doc = " \\brief The picture parameter set referred to in the slice header."]
10600 pub pic_parameter_set_id: u8,
10601 #[doc = " \\brief The active sequence parameter set. Range: 0 to 31, inclusive."]
10602 pub seq_parameter_set_id: u8,
10603 #[doc = " \\brief OR'd flags describing whether the picture is the last one or not.\n\n This fields holds 0 if the picture to be encoded is not the last\n one in the stream or sequence. Otherwise, it is a combination of\n \\ref H264_LAST_PICTURE_EOSEQ or \\ref H264_LAST_PICTURE_EOSTREAM."]
10604 pub last_picture: u8,
10605 #[doc = " \\brief The picture identifier.\n Range: 0 to \\f$2^{log2\\_max\\_frame\\_num\\_minus4 + 4} - 1\\f$, inclusive."]
10606 pub frame_num: u16,
10607 #[doc = " \\brief \\c pic_init_qp_minus26 + 26."]
10608 pub pic_init_qp: u8,
10609 #[doc = " \\brief Maximum reference index for reference picture list 0.\n Range: 0 to 31, inclusive."]
10610 pub num_ref_idx_l0_active_minus1: u8,
10611 #[doc = " \\brief Maximum reference index for reference picture list 1.\n Range: 0 to 31, inclusive."]
10612 pub num_ref_idx_l1_active_minus1: u8,
10613 #[doc = " \\brief Range: -12 to 12, inclusive."]
10614 pub chroma_qp_index_offset: i8,
10615 #[doc = " \\brief Range: -12 to 12, inclusive."]
10616 pub second_chroma_qp_index_offset: i8,
10617 pub pic_fields: _VAEncPictureParameterBufferH264__bindgen_ty_1,
10618 #[doc = " \\brief Reserved bytes for future use, must be zero"]
10619 pub va_reserved: [u32; 4usize],
10620}
10621#[repr(C)]
10622#[derive(Copy, Clone)]
10623pub union _VAEncPictureParameterBufferH264__bindgen_ty_1 {
10624 pub bits: _VAEncPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1,
10625 pub value: u32,
10626}
10627#[repr(C)]
10628#[repr(align(4))]
10629#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
10630pub struct _VAEncPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1 {
10631 pub _bitfield_align_1: [u8; 0],
10632 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
10633 pub __bindgen_padding_0: u16,
10634}
10635impl _VAEncPictureParameterBufferH264__bindgen_ty_1__bindgen_ty_1 {
10636 #[inline]
10637 pub fn idr_pic_flag(&self) -> u32 {
10638 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
10639 }
10640 #[inline]
10641 pub fn set_idr_pic_flag(&mut self, val: u32) {
10642 unsafe {
10643 let val: u32 = ::std::mem::transmute(val);
10644 self._bitfield_1.set(0usize, 1u8, val as u64)
10645 }
10646 }
10647 #[inline]
10648 pub unsafe fn idr_pic_flag_raw(this: *const Self) -> u32 {
10649 unsafe {
10650 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10651 ::std::ptr::addr_of!((*this)._bitfield_1),
10652 0usize,
10653 1u8,
10654 ) as u32)
10655 }
10656 }
10657 #[inline]
10658 pub unsafe fn set_idr_pic_flag_raw(this: *mut Self, val: u32) {
10659 unsafe {
10660 let val: u32 = ::std::mem::transmute(val);
10661 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10662 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10663 0usize,
10664 1u8,
10665 val as u64,
10666 )
10667 }
10668 }
10669 #[inline]
10670 pub fn reference_pic_flag(&self) -> u32 {
10671 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) }
10672 }
10673 #[inline]
10674 pub fn set_reference_pic_flag(&mut self, val: u32) {
10675 unsafe {
10676 let val: u32 = ::std::mem::transmute(val);
10677 self._bitfield_1.set(1usize, 2u8, val as u64)
10678 }
10679 }
10680 #[inline]
10681 pub unsafe fn reference_pic_flag_raw(this: *const Self) -> u32 {
10682 unsafe {
10683 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10684 ::std::ptr::addr_of!((*this)._bitfield_1),
10685 1usize,
10686 2u8,
10687 ) as u32)
10688 }
10689 }
10690 #[inline]
10691 pub unsafe fn set_reference_pic_flag_raw(this: *mut Self, val: u32) {
10692 unsafe {
10693 let val: u32 = ::std::mem::transmute(val);
10694 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10695 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10696 1usize,
10697 2u8,
10698 val as u64,
10699 )
10700 }
10701 }
10702 #[inline]
10703 pub fn entropy_coding_mode_flag(&self) -> u32 {
10704 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) }
10705 }
10706 #[inline]
10707 pub fn set_entropy_coding_mode_flag(&mut self, val: u32) {
10708 unsafe {
10709 let val: u32 = ::std::mem::transmute(val);
10710 self._bitfield_1.set(3usize, 1u8, val as u64)
10711 }
10712 }
10713 #[inline]
10714 pub unsafe fn entropy_coding_mode_flag_raw(this: *const Self) -> u32 {
10715 unsafe {
10716 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10717 ::std::ptr::addr_of!((*this)._bitfield_1),
10718 3usize,
10719 1u8,
10720 ) as u32)
10721 }
10722 }
10723 #[inline]
10724 pub unsafe fn set_entropy_coding_mode_flag_raw(this: *mut Self, val: u32) {
10725 unsafe {
10726 let val: u32 = ::std::mem::transmute(val);
10727 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10728 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10729 3usize,
10730 1u8,
10731 val as u64,
10732 )
10733 }
10734 }
10735 #[inline]
10736 pub fn weighted_pred_flag(&self) -> u32 {
10737 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
10738 }
10739 #[inline]
10740 pub fn set_weighted_pred_flag(&mut self, val: u32) {
10741 unsafe {
10742 let val: u32 = ::std::mem::transmute(val);
10743 self._bitfield_1.set(4usize, 1u8, val as u64)
10744 }
10745 }
10746 #[inline]
10747 pub unsafe fn weighted_pred_flag_raw(this: *const Self) -> u32 {
10748 unsafe {
10749 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10750 ::std::ptr::addr_of!((*this)._bitfield_1),
10751 4usize,
10752 1u8,
10753 ) as u32)
10754 }
10755 }
10756 #[inline]
10757 pub unsafe fn set_weighted_pred_flag_raw(this: *mut Self, val: u32) {
10758 unsafe {
10759 let val: u32 = ::std::mem::transmute(val);
10760 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10761 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10762 4usize,
10763 1u8,
10764 val as u64,
10765 )
10766 }
10767 }
10768 #[inline]
10769 pub fn weighted_bipred_idc(&self) -> u32 {
10770 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u32) }
10771 }
10772 #[inline]
10773 pub fn set_weighted_bipred_idc(&mut self, val: u32) {
10774 unsafe {
10775 let val: u32 = ::std::mem::transmute(val);
10776 self._bitfield_1.set(5usize, 2u8, val as u64)
10777 }
10778 }
10779 #[inline]
10780 pub unsafe fn weighted_bipred_idc_raw(this: *const Self) -> u32 {
10781 unsafe {
10782 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10783 ::std::ptr::addr_of!((*this)._bitfield_1),
10784 5usize,
10785 2u8,
10786 ) as u32)
10787 }
10788 }
10789 #[inline]
10790 pub unsafe fn set_weighted_bipred_idc_raw(this: *mut Self, val: u32) {
10791 unsafe {
10792 let val: u32 = ::std::mem::transmute(val);
10793 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10794 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10795 5usize,
10796 2u8,
10797 val as u64,
10798 )
10799 }
10800 }
10801 #[inline]
10802 pub fn constrained_intra_pred_flag(&self) -> u32 {
10803 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) }
10804 }
10805 #[inline]
10806 pub fn set_constrained_intra_pred_flag(&mut self, val: u32) {
10807 unsafe {
10808 let val: u32 = ::std::mem::transmute(val);
10809 self._bitfield_1.set(7usize, 1u8, val as u64)
10810 }
10811 }
10812 #[inline]
10813 pub unsafe fn constrained_intra_pred_flag_raw(this: *const Self) -> u32 {
10814 unsafe {
10815 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10816 ::std::ptr::addr_of!((*this)._bitfield_1),
10817 7usize,
10818 1u8,
10819 ) as u32)
10820 }
10821 }
10822 #[inline]
10823 pub unsafe fn set_constrained_intra_pred_flag_raw(this: *mut Self, val: u32) {
10824 unsafe {
10825 let val: u32 = ::std::mem::transmute(val);
10826 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10827 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10828 7usize,
10829 1u8,
10830 val as u64,
10831 )
10832 }
10833 }
10834 #[inline]
10835 pub fn transform_8x8_mode_flag(&self) -> u32 {
10836 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
10837 }
10838 #[inline]
10839 pub fn set_transform_8x8_mode_flag(&mut self, val: u32) {
10840 unsafe {
10841 let val: u32 = ::std::mem::transmute(val);
10842 self._bitfield_1.set(8usize, 1u8, val as u64)
10843 }
10844 }
10845 #[inline]
10846 pub unsafe fn transform_8x8_mode_flag_raw(this: *const Self) -> u32 {
10847 unsafe {
10848 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10849 ::std::ptr::addr_of!((*this)._bitfield_1),
10850 8usize,
10851 1u8,
10852 ) as u32)
10853 }
10854 }
10855 #[inline]
10856 pub unsafe fn set_transform_8x8_mode_flag_raw(this: *mut Self, val: u32) {
10857 unsafe {
10858 let val: u32 = ::std::mem::transmute(val);
10859 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10860 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10861 8usize,
10862 1u8,
10863 val as u64,
10864 )
10865 }
10866 }
10867 #[inline]
10868 pub fn deblocking_filter_control_present_flag(&self) -> u32 {
10869 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
10870 }
10871 #[inline]
10872 pub fn set_deblocking_filter_control_present_flag(&mut self, val: u32) {
10873 unsafe {
10874 let val: u32 = ::std::mem::transmute(val);
10875 self._bitfield_1.set(9usize, 1u8, val as u64)
10876 }
10877 }
10878 #[inline]
10879 pub unsafe fn deblocking_filter_control_present_flag_raw(this: *const Self) -> u32 {
10880 unsafe {
10881 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10882 ::std::ptr::addr_of!((*this)._bitfield_1),
10883 9usize,
10884 1u8,
10885 ) as u32)
10886 }
10887 }
10888 #[inline]
10889 pub unsafe fn set_deblocking_filter_control_present_flag_raw(this: *mut Self, val: u32) {
10890 unsafe {
10891 let val: u32 = ::std::mem::transmute(val);
10892 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10893 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10894 9usize,
10895 1u8,
10896 val as u64,
10897 )
10898 }
10899 }
10900 #[inline]
10901 pub fn redundant_pic_cnt_present_flag(&self) -> u32 {
10902 unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u32) }
10903 }
10904 #[inline]
10905 pub fn set_redundant_pic_cnt_present_flag(&mut self, val: u32) {
10906 unsafe {
10907 let val: u32 = ::std::mem::transmute(val);
10908 self._bitfield_1.set(10usize, 1u8, val as u64)
10909 }
10910 }
10911 #[inline]
10912 pub unsafe fn redundant_pic_cnt_present_flag_raw(this: *const Self) -> u32 {
10913 unsafe {
10914 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10915 ::std::ptr::addr_of!((*this)._bitfield_1),
10916 10usize,
10917 1u8,
10918 ) as u32)
10919 }
10920 }
10921 #[inline]
10922 pub unsafe fn set_redundant_pic_cnt_present_flag_raw(this: *mut Self, val: u32) {
10923 unsafe {
10924 let val: u32 = ::std::mem::transmute(val);
10925 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10926 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10927 10usize,
10928 1u8,
10929 val as u64,
10930 )
10931 }
10932 }
10933 #[inline]
10934 pub fn pic_order_present_flag(&self) -> u32 {
10935 unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u32) }
10936 }
10937 #[inline]
10938 pub fn set_pic_order_present_flag(&mut self, val: u32) {
10939 unsafe {
10940 let val: u32 = ::std::mem::transmute(val);
10941 self._bitfield_1.set(11usize, 1u8, val as u64)
10942 }
10943 }
10944 #[inline]
10945 pub unsafe fn pic_order_present_flag_raw(this: *const Self) -> u32 {
10946 unsafe {
10947 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10948 ::std::ptr::addr_of!((*this)._bitfield_1),
10949 11usize,
10950 1u8,
10951 ) as u32)
10952 }
10953 }
10954 #[inline]
10955 pub unsafe fn set_pic_order_present_flag_raw(this: *mut Self, val: u32) {
10956 unsafe {
10957 let val: u32 = ::std::mem::transmute(val);
10958 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10959 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10960 11usize,
10961 1u8,
10962 val as u64,
10963 )
10964 }
10965 }
10966 #[inline]
10967 pub fn pic_scaling_matrix_present_flag(&self) -> u32 {
10968 unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u32) }
10969 }
10970 #[inline]
10971 pub fn set_pic_scaling_matrix_present_flag(&mut self, val: u32) {
10972 unsafe {
10973 let val: u32 = ::std::mem::transmute(val);
10974 self._bitfield_1.set(12usize, 1u8, val as u64)
10975 }
10976 }
10977 #[inline]
10978 pub unsafe fn pic_scaling_matrix_present_flag_raw(this: *const Self) -> u32 {
10979 unsafe {
10980 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
10981 ::std::ptr::addr_of!((*this)._bitfield_1),
10982 12usize,
10983 1u8,
10984 ) as u32)
10985 }
10986 }
10987 #[inline]
10988 pub unsafe fn set_pic_scaling_matrix_present_flag_raw(this: *mut Self, val: u32) {
10989 unsafe {
10990 let val: u32 = ::std::mem::transmute(val);
10991 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
10992 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
10993 12usize,
10994 1u8,
10995 val as u64,
10996 )
10997 }
10998 }
10999 #[inline]
11000 pub fn new_bitfield_1(
11001 idr_pic_flag: u32,
11002 reference_pic_flag: u32,
11003 entropy_coding_mode_flag: u32,
11004 weighted_pred_flag: u32,
11005 weighted_bipred_idc: u32,
11006 constrained_intra_pred_flag: u32,
11007 transform_8x8_mode_flag: u32,
11008 deblocking_filter_control_present_flag: u32,
11009 redundant_pic_cnt_present_flag: u32,
11010 pic_order_present_flag: u32,
11011 pic_scaling_matrix_present_flag: u32,
11012 ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
11013 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
11014 __bindgen_bitfield_unit.set(0usize, 1u8, {
11015 let idr_pic_flag: u32 = unsafe { ::std::mem::transmute(idr_pic_flag) };
11016 idr_pic_flag as u64
11017 });
11018 __bindgen_bitfield_unit.set(1usize, 2u8, {
11019 let reference_pic_flag: u32 = unsafe { ::std::mem::transmute(reference_pic_flag) };
11020 reference_pic_flag as u64
11021 });
11022 __bindgen_bitfield_unit.set(3usize, 1u8, {
11023 let entropy_coding_mode_flag: u32 = unsafe { ::std::mem::transmute(entropy_coding_mode_flag) };
11024 entropy_coding_mode_flag as u64
11025 });
11026 __bindgen_bitfield_unit.set(4usize, 1u8, {
11027 let weighted_pred_flag: u32 = unsafe { ::std::mem::transmute(weighted_pred_flag) };
11028 weighted_pred_flag as u64
11029 });
11030 __bindgen_bitfield_unit.set(5usize, 2u8, {
11031 let weighted_bipred_idc: u32 = unsafe { ::std::mem::transmute(weighted_bipred_idc) };
11032 weighted_bipred_idc as u64
11033 });
11034 __bindgen_bitfield_unit.set(7usize, 1u8, {
11035 let constrained_intra_pred_flag: u32 = unsafe { ::std::mem::transmute(constrained_intra_pred_flag) };
11036 constrained_intra_pred_flag as u64
11037 });
11038 __bindgen_bitfield_unit.set(8usize, 1u8, {
11039 let transform_8x8_mode_flag: u32 = unsafe { ::std::mem::transmute(transform_8x8_mode_flag) };
11040 transform_8x8_mode_flag as u64
11041 });
11042 __bindgen_bitfield_unit.set(9usize, 1u8, {
11043 let deblocking_filter_control_present_flag: u32 =
11044 unsafe { ::std::mem::transmute(deblocking_filter_control_present_flag) };
11045 deblocking_filter_control_present_flag as u64
11046 });
11047 __bindgen_bitfield_unit.set(10usize, 1u8, {
11048 let redundant_pic_cnt_present_flag: u32 = unsafe { ::std::mem::transmute(redundant_pic_cnt_present_flag) };
11049 redundant_pic_cnt_present_flag as u64
11050 });
11051 __bindgen_bitfield_unit.set(11usize, 1u8, {
11052 let pic_order_present_flag: u32 = unsafe { ::std::mem::transmute(pic_order_present_flag) };
11053 pic_order_present_flag as u64
11054 });
11055 __bindgen_bitfield_unit.set(12usize, 1u8, {
11056 let pic_scaling_matrix_present_flag: u32 =
11057 unsafe { ::std::mem::transmute(pic_scaling_matrix_present_flag) };
11058 pic_scaling_matrix_present_flag as u64
11059 });
11060 __bindgen_bitfield_unit
11061 }
11062}
11063impl Default for _VAEncPictureParameterBufferH264__bindgen_ty_1 {
11064 fn default() -> Self {
11065 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11066 unsafe {
11067 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11068 s.assume_init()
11069 }
11070 }
11071}
11072impl Default for _VAEncPictureParameterBufferH264 {
11073 fn default() -> Self {
11074 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11075 unsafe {
11076 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11077 s.assume_init()
11078 }
11079 }
11080}
11081#[doc = " \\brief Picture parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds information for \\c pic_parameter_set_rbsp() as\n defined by the H.264 specification.\n\n If packed picture headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderPicture ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If \\c pic_scaling_matrix_present_flag is set to \\c 1, then a\n #VAIQMatrixBufferH264 buffer shall also be provided within the same\n \\c vaRenderPicture() call as this picture parameter buffer."]
11082pub type VAEncPictureParameterBufferH264 = _VAEncPictureParameterBufferH264;
11083#[doc = " \\brief Slice parameter for H.264 encoding in baseline, main & high profiles.\n\n This structure holds information for \\c\n slice_layer_without_partitioning_rbsp() as defined by the H.264\n specification.\n\n If packed slice headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSlice ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If per-macroblock encoder configuration is needed, \\c macroblock_info\n references a buffer of type #VAEncMacroblockParameterBufferH264. This\n buffer is not passed to vaRenderPicture() and it can be re-used\n without re-allocating the whole buffer."]
11084#[repr(C)]
11085#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
11086pub struct _VAEncSliceParameterBufferH264 {
11087 #[doc = " \\brief Starting MB address for this slice."]
11088 pub macroblock_address: u32,
11089 #[doc = " \\brief Number of macroblocks in this slice."]
11090 pub num_macroblocks: u32,
11091 #[doc = " \\brief Per-MB encoder configuration buffer, or \\c VA_INVALID_ID.\n\n If per-MB encoder configuration is needed, then \\ref macroblock_info\n references a buffer of type #VAEncMacroblockParameterBufferH264\n (\\c VAEncMacroblockParameterBufferType). Otherwise, buffer id\n is set to \\c VA_INVALID_ID and per-MB configuration is derived\n from this slice parameter.\n\n The \\c macroblock_info buffer must hold \\ref num_macroblocks\n elements."]
11092 pub macroblock_info: VABufferID,
11093 #[doc = " \\brief Slice type.\n Range: 0..2, 5..7, i.e. no switching slices."]
11094 pub slice_type: u8,
11095 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11096 pub pic_parameter_set_id: u8,
11097 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11098 pub idr_pic_id: u16,
11099 #[doc = " @name If pic_order_cnt_type == 0 */\n/**@{*/\n/** \\brief The picture order count modulo MaxPicOrderCntLsb."]
11100 pub pic_order_cnt_lsb: u16,
11101 #[doc = " \\brief Valid if \\c pic_order_present_flag and this is a bottom field."]
11102 pub delta_pic_order_cnt_bottom: i32,
11103 #[doc = "@}*/\n/** @name If pic_order_cnt_type == 1 && !delta_pic_order_always_zero_flag */\n/**@{*/\n/** \\brief [0]: top, [1]: bottom."]
11104 pub delta_pic_order_cnt: [i32; 2usize],
11105 #[doc = " @name If slice_type == B */\n/**@{"]
11106 pub direct_spatial_mv_pred_flag: u8,
11107 #[doc = " @name If slice_type == P */\n/**@{*/\n/** \\brief Specifies if\n \\ref _VAEncPictureParameterBufferH264::num_ref_idx_l0_active_minus1 or\n \\ref _VAEncPictureParameterBufferH264::num_ref_idx_l1_active_minus1 are\n overriden by the values for this slice."]
11108 pub num_ref_idx_active_override_flag: u8,
11109 #[doc = " \\brief Maximum reference index for reference picture list 0.\n Range: 0 to 31, inclusive."]
11110 pub num_ref_idx_l0_active_minus1: u8,
11111 #[doc = " \\brief Maximum reference index for reference picture list 1.\n Range: 0 to 31, inclusive."]
11112 pub num_ref_idx_l1_active_minus1: u8,
11113 #[doc = " \\brief Reference picture list 0 (for P slices)."]
11114 pub RefPicList0: [VAPictureH264; 32usize],
11115 #[doc = " \\brief Reference picture list 1 (for B slices)."]
11116 pub RefPicList1: [VAPictureH264; 32usize],
11117 #[doc = " @name pred_weight_table() */\n/**@{*/\n/** \\brief Same as the H.264 bitstream syntax element."]
11118 pub luma_log2_weight_denom: u8,
11119 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11120 pub chroma_log2_weight_denom: u8,
11121 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11122 pub luma_weight_l0_flag: u8,
11123 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11124 pub luma_weight_l0: [::std::os::raw::c_short; 32usize],
11125 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11126 pub luma_offset_l0: [::std::os::raw::c_short; 32usize],
11127 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11128 pub chroma_weight_l0_flag: u8,
11129 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11130 pub chroma_weight_l0: [[::std::os::raw::c_short; 2usize]; 32usize],
11131 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11132 pub chroma_offset_l0: [[::std::os::raw::c_short; 2usize]; 32usize],
11133 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11134 pub luma_weight_l1_flag: u8,
11135 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11136 pub luma_weight_l1: [::std::os::raw::c_short; 32usize],
11137 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11138 pub luma_offset_l1: [::std::os::raw::c_short; 32usize],
11139 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11140 pub chroma_weight_l1_flag: u8,
11141 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11142 pub chroma_weight_l1: [[::std::os::raw::c_short; 2usize]; 32usize],
11143 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11144 pub chroma_offset_l1: [[::std::os::raw::c_short; 2usize]; 32usize],
11145 #[doc = " \\brief Range: 0 to 2, inclusive."]
11146 pub cabac_init_idc: u8,
11147 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11148 pub slice_qp_delta: i8,
11149 #[doc = " @name If deblocking_filter_control_present_flag */\n/**@{*/\n/** \\brief Range: 0 to 2, inclusive."]
11150 pub disable_deblocking_filter_idc: u8,
11151 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11152 pub slice_alpha_c0_offset_div2: i8,
11153 #[doc = " \\brief Same as the H.264 bitstream syntax element."]
11154 pub slice_beta_offset_div2: i8,
11155 #[doc = " \\brief Reserved bytes for future use, must be zero"]
11156 pub va_reserved: [u32; 4usize],
11157}
11158#[doc = " \\brief Slice parameter for H.264 encoding in baseline, main & high profiles.\n\n This structure holds information for \\c\n slice_layer_without_partitioning_rbsp() as defined by the H.264\n specification.\n\n If packed slice headers mode is used, i.e. if the encoding\n pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE\n flag, then the driver expects two more buffers to be provided to\n the same \\c vaRenderPicture() as this buffer:\n - a #VAEncPackedHeaderParameterBuffer with type set to\n VAEncPackedHeaderType::VAEncPackedHeaderSlice ;\n - a #VAEncPackedHeaderDataBuffer which holds the actual packed\n header data.\n\n If per-macroblock encoder configuration is needed, \\c macroblock_info\n references a buffer of type #VAEncMacroblockParameterBufferH264. This\n buffer is not passed to vaRenderPicture() and it can be re-used\n without re-allocating the whole buffer."]
11159pub type VAEncSliceParameterBufferH264 = _VAEncSliceParameterBufferH264;
11160#[doc = " \\brief Macroblock parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds per-macroblock information. The buffer must be\n allocated with as many elements (macroblocks) as necessary to fit\n the slice to be encoded. Besides, the per-macroblock records must\n be written in a strict raster order and with no gap. i.e. every\n macroblock, regardless of its type, shall have an entry."]
11161#[repr(C)]
11162#[derive(Copy, Clone)]
11163pub struct _VAEncMacroblockParameterBufferH264 {
11164 #[doc = " \\brief Quantization parameter.\n\n Requested quantization parameter. Range: 0 to 51, inclusive.\n If \\ref qp is set to 0xff, then the actual value is derived\n from the slice-level value: \\c pic_init_qp + \\c slice_qp_delta."]
11165 pub qp: u8,
11166 pub info: _VAEncMacroblockParameterBufferH264__bindgen_ty_1,
11167 #[doc = " \\brief Reserved bytes for future use, must be zero"]
11168 pub va_reserved: [u32; 4usize],
11169}
11170#[repr(C)]
11171#[derive(Copy, Clone)]
11172pub union _VAEncMacroblockParameterBufferH264__bindgen_ty_1 {
11173 pub intra_fields: _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1,
11174 pub inter_fields: _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2,
11175}
11176#[doc = " @name Data for intra macroblock */\n/**@{"]
11177#[repr(C)]
11178#[derive(Copy, Clone)]
11179pub union _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1 {
11180 pub bits: _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
11181 pub value: u32,
11182}
11183#[repr(C)]
11184#[repr(align(4))]
11185#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
11186pub struct _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
11187 pub _bitfield_align_1: [u8; 0],
11188 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
11189 pub __bindgen_padding_0: u16,
11190}
11191impl _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
11192 #[inline]
11193 pub fn pred_avail_override_flag(&self) -> u32 {
11194 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
11195 }
11196 #[inline]
11197 pub fn set_pred_avail_override_flag(&mut self, val: u32) {
11198 unsafe {
11199 let val: u32 = ::std::mem::transmute(val);
11200 self._bitfield_1.set(0usize, 1u8, val as u64)
11201 }
11202 }
11203 #[inline]
11204 pub unsafe fn pred_avail_override_flag_raw(this: *const Self) -> u32 {
11205 unsafe {
11206 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
11207 ::std::ptr::addr_of!((*this)._bitfield_1),
11208 0usize,
11209 1u8,
11210 ) as u32)
11211 }
11212 }
11213 #[inline]
11214 pub unsafe fn set_pred_avail_override_flag_raw(this: *mut Self, val: u32) {
11215 unsafe {
11216 let val: u32 = ::std::mem::transmute(val);
11217 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
11218 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
11219 0usize,
11220 1u8,
11221 val as u64,
11222 )
11223 }
11224 }
11225 #[inline]
11226 pub fn pred_avail_flags(&self) -> u32 {
11227 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 8u8) as u32) }
11228 }
11229 #[inline]
11230 pub fn set_pred_avail_flags(&mut self, val: u32) {
11231 unsafe {
11232 let val: u32 = ::std::mem::transmute(val);
11233 self._bitfield_1.set(1usize, 8u8, val as u64)
11234 }
11235 }
11236 #[inline]
11237 pub unsafe fn pred_avail_flags_raw(this: *const Self) -> u32 {
11238 unsafe {
11239 ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 2usize]>>::raw_get(
11240 ::std::ptr::addr_of!((*this)._bitfield_1),
11241 1usize,
11242 8u8,
11243 ) as u32)
11244 }
11245 }
11246 #[inline]
11247 pub unsafe fn set_pred_avail_flags_raw(this: *mut Self, val: u32) {
11248 unsafe {
11249 let val: u32 = ::std::mem::transmute(val);
11250 <__BindgenBitfieldUnit<[u8; 2usize]>>::raw_set(
11251 ::std::ptr::addr_of_mut!((*this)._bitfield_1),
11252 1usize,
11253 8u8,
11254 val as u64,
11255 )
11256 }
11257 }
11258 #[inline]
11259 pub fn new_bitfield_1(pred_avail_override_flag: u32, pred_avail_flags: u32) -> __BindgenBitfieldUnit<[u8; 2usize]> {
11260 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
11261 __bindgen_bitfield_unit.set(0usize, 1u8, {
11262 let pred_avail_override_flag: u32 = unsafe { ::std::mem::transmute(pred_avail_override_flag) };
11263 pred_avail_override_flag as u64
11264 });
11265 __bindgen_bitfield_unit.set(1usize, 8u8, {
11266 let pred_avail_flags: u32 = unsafe { ::std::mem::transmute(pred_avail_flags) };
11267 pred_avail_flags as u64
11268 });
11269 __bindgen_bitfield_unit
11270 }
11271}
11272impl Default for _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_1 {
11273 fn default() -> Self {
11274 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11275 unsafe {
11276 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11277 s.assume_init()
11278 }
11279 }
11280}
11281#[doc = " @name Data for inter macroblock */\n/**@{"]
11282#[repr(C)]
11283#[derive(Copy, Clone)]
11284pub union _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2 {
11285 pub bits: _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1,
11286 pub value: u32,
11287}
11288#[repr(C)]
11289#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
11290pub struct _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {
11291 pub reserved: u32,
11292}
11293impl Default for _VAEncMacroblockParameterBufferH264__bindgen_ty_1__bindgen_ty_2 {
11294 fn default() -> Self {
11295 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11296 unsafe {
11297 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11298 s.assume_init()
11299 }
11300 }
11301}
11302impl Default for _VAEncMacroblockParameterBufferH264__bindgen_ty_1 {
11303 fn default() -> Self {
11304 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11305 unsafe {
11306 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11307 s.assume_init()
11308 }
11309 }
11310}
11311impl Default for _VAEncMacroblockParameterBufferH264 {
11312 fn default() -> Self {
11313 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11314 unsafe {
11315 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11316 s.assume_init()
11317 }
11318 }
11319}
11320#[doc = " \\brief Macroblock parameter for H.264 encoding in baseline, main & high\n profiles.\n\n This structure holds per-macroblock information. The buffer must be\n allocated with as many elements (macroblocks) as necessary to fit\n the slice to be encoded. Besides, the per-macroblock records must\n be written in a strict raster order and with no gap. i.e. every\n macroblock, regardless of its type, shall have an entry."]
11321pub type VAEncMacroblockParameterBufferH264 = _VAEncMacroblockParameterBufferH264;
11322pub const _VAProcColorStandardType_VAProcColorStandardNone: _VAProcColorStandardType = 0;
11323#[doc = " \\brief ITU-R BT.601.\n\n It is unspecified whether this will use 525-line or 625-line values;\n specify the colour primaries and matrix coefficients explicitly if\n it is known which one is required.\n\n Equivalent to:\n colour_primaries = 5 or 6\n transfer_characteristics = 6\n matrix_coefficients = 5 or 6"]
11324pub const _VAProcColorStandardType_VAProcColorStandardBT601: _VAProcColorStandardType = 1;
11325#[doc = " \\brief ITU-R BT.709.\n\n Equivalent to:\n colour_primaries = 1\n transfer_characteristics = 1\n matrix_coefficients = 1"]
11326pub const _VAProcColorStandardType_VAProcColorStandardBT709: _VAProcColorStandardType = 2;
11327#[doc = " \\brief ITU-R BT.470-2 System M.\n\n Equivalent to:\n colour_primaries = 4\n transfer_characteristics = 4\n matrix_coefficients = 4"]
11328pub const _VAProcColorStandardType_VAProcColorStandardBT470M: _VAProcColorStandardType = 3;
11329#[doc = " \\brief ITU-R BT.470-2 System B, G.\n\n Equivalent to:\n colour_primaries = 5\n transfer_characteristics = 5\n matrix_coefficients = 5"]
11330pub const _VAProcColorStandardType_VAProcColorStandardBT470BG: _VAProcColorStandardType = 4;
11331#[doc = " \\brief SMPTE-170M.\n\n Equivalent to:\n colour_primaries = 6\n transfer_characteristics = 6\n matrix_coefficients = 6"]
11332pub const _VAProcColorStandardType_VAProcColorStandardSMPTE170M: _VAProcColorStandardType = 5;
11333#[doc = " \\brief SMPTE-240M.\n\n Equivalent to:\n colour_primaries = 7\n transfer_characteristics = 7\n matrix_coefficients = 7"]
11334pub const _VAProcColorStandardType_VAProcColorStandardSMPTE240M: _VAProcColorStandardType = 6;
11335#[doc = " \\brief Generic film.\n\n Equivalent to:\n colour_primaries = 8\n transfer_characteristics = 1\n matrix_coefficients = 1"]
11336pub const _VAProcColorStandardType_VAProcColorStandardGenericFilm: _VAProcColorStandardType = 7;
11337#[doc = " \\brief sRGB.\n\n Equivalent to:\n colour_primaries = 1\n transfer_characteristics = 13\n matrix_coefficients = 0"]
11338pub const _VAProcColorStandardType_VAProcColorStandardSRGB: _VAProcColorStandardType = 8;
11339#[doc = " \\brief stRGB.\n\n ???"]
11340pub const _VAProcColorStandardType_VAProcColorStandardSTRGB: _VAProcColorStandardType = 9;
11341#[doc = " \\brief xvYCC601.\n\n Equivalent to:\n colour_primaries = 1\n transfer_characteristics = 11\n matrix_coefficients = 5"]
11342pub const _VAProcColorStandardType_VAProcColorStandardXVYCC601: _VAProcColorStandardType = 10;
11343#[doc = " \\brief xvYCC709.\n\n Equivalent to:\n colour_primaries = 1\n transfer_characteristics = 11\n matrix_coefficients = 1"]
11344pub const _VAProcColorStandardType_VAProcColorStandardXVYCC709: _VAProcColorStandardType = 11;
11345#[doc = " \\brief ITU-R BT.2020.\n\n Equivalent to:\n colour_primaries = 9\n transfer_characteristics = 14\n matrix_coefficients = 9"]
11346pub const _VAProcColorStandardType_VAProcColorStandardBT2020: _VAProcColorStandardType = 12;
11347#[doc = " \\brief Explicitly specified color properties.\n\n Use corresponding color properties section.\n For example, HDR10 content:\n colour_primaries = 9 (BT2020)\n transfer_characteristics = 16 (SMPTE ST2084)\n matrix_coefficients = 9"]
11348pub const _VAProcColorStandardType_VAProcColorStandardExplicit: _VAProcColorStandardType = 13;
11349#[doc = " \\brief Number of color standards."]
11350pub const _VAProcColorStandardType_VAProcColorStandardCount: _VAProcColorStandardType = 14;
11351#[doc = " \\brief Color standard types.\n\n These define a set of color properties corresponding to particular\n video standards.\n\n Where matrix_coefficients is specified, it applies only to YUV data -\n RGB data always use the identity matrix (matrix_coefficients = 0)."]
11352pub type _VAProcColorStandardType = ::std::os::raw::c_uint;
11353#[doc = " \\brief Color standard types.\n\n These define a set of color properties corresponding to particular\n video standards.\n\n Where matrix_coefficients is specified, it applies only to YUV data -\n RGB data always use the identity matrix (matrix_coefficients = 0)."]
11354pub use self::_VAProcColorStandardType as VAProcColorStandardType;
11355pub const _VAProcHighDynamicRangeMetadataType_VAProcHighDynamicRangeMetadataNone: _VAProcHighDynamicRangeMetadataType =
11356 0;
11357#[doc = " \\brief Metadata type for HDR10."]
11358pub const _VAProcHighDynamicRangeMetadataType_VAProcHighDynamicRangeMetadataHDR10: _VAProcHighDynamicRangeMetadataType =
11359 1;
11360#[doc = " \\brief Number of Metadata type."]
11361pub const _VAProcHighDynamicRangeMetadataType_VAProcHighDynamicRangeMetadataTypeCount:
11362 _VAProcHighDynamicRangeMetadataType = 2;
11363#[doc = " \\brief High Dynamic Range Metadata types."]
11364pub type _VAProcHighDynamicRangeMetadataType = ::std::os::raw::c_uint;
11365#[doc = " \\brief High Dynamic Range Metadata types."]
11366pub use self::_VAProcHighDynamicRangeMetadataType as VAProcHighDynamicRangeMetadataType;
11367#[doc = " \\brief Default Mode.\n In this mode, pipeline is decided in driver to the appropriate mode.\n e.g. a mode that's a balance between power and performance."]
11368pub const _VAProcMode_VAProcDefaultMode: _VAProcMode = 0;
11369#[doc = " \\brief Power Saving Mode.\n In this mode, pipeline is optimized for power saving."]
11370pub const _VAProcMode_VAProcPowerSavingMode: _VAProcMode = 1;
11371#[doc = " \\brief Performance Mode.\n In this mode, pipeline is optimized for performance."]
11372pub const _VAProcMode_VAProcPerformanceMode: _VAProcMode = 2;
11373#[doc = " \\brief Video Processing Mode."]
11374pub type _VAProcMode = ::std::os::raw::c_uint;
11375#[doc = " \\brief Video Processing Mode."]
11376pub use self::_VAProcMode as VAProcMode;
11377#[doc = " \\brief Video blending state definition."]
11378#[repr(C)]
11379#[derive(Debug, Default, Copy, Clone, PartialEq)]
11380pub struct _VABlendState {
11381 #[doc = " \\brief Video blending flags."]
11382 pub flags: ::std::os::raw::c_uint,
11383 #[doc = " \\brief Global alpha value.\n\n Valid if \\ref flags has VA_BLEND_GLOBAL_ALPHA.\n Valid range is 0.0 to 1.0 inclusive."]
11384 pub global_alpha: f32,
11385 #[doc = " \\brief Minimum luma value.\n\n Valid if \\ref flags has VA_BLEND_LUMA_KEY.\n Valid range is 0.0 to 1.0 inclusive.\n \\ref min_luma shall be set to a sensible value lower than \\ref max_luma."]
11386 pub min_luma: f32,
11387 #[doc = " \\brief Maximum luma value.\n\n Valid if \\ref flags has VA_BLEND_LUMA_KEY.\n Valid range is 0.0 to 1.0 inclusive.\n \\ref max_luma shall be set to a sensible value larger than \\ref min_luma."]
11388 pub max_luma: f32,
11389}
11390#[doc = " \\brief Video blending state definition."]
11391pub type VABlendState = _VABlendState;
11392#[repr(C)]
11393#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
11394pub struct _VAProcColorProperties {
11395 #[doc = " Chroma sample location.\\c VA_CHROMA_SITING_VERTICAL_XXX | VA_CHROMA_SITING_HORIZONTAL_XXX"]
11396 pub chroma_sample_location: u8,
11397 #[doc = " Color range. \\c VA_SOURCE_RANGE_XXX"]
11398 pub color_range: u8,
11399 #[doc = " Colour primaries.\n\n See ISO/IEC 23001-8 or ITU H.273, section 8.1 and table 2.\n Only used if the color standard in use is \\c VAColorStandardExplicit.\n Below list the typical colour primaries for the reference.\n ---------------------------------------------------------------------------------\n | Value | Primaries | Informative Remark |\n --------------------------------------------------------------------------------\n | 1 |primary x y |Rec.ITU-R BT.709-5 |\n | |green 0.300 0.600 |IEC 61966-2-1(sRGB or sYCC) |\n | |blue 0.150 0.060 | |\n | |red 0.640 0.330 | |\n | |whiteD65 0.3127 0.3290 | |\n ---------------------------------------------------------------------------------\n | 6 |primary x y |Rec.ITU-R BT.601-6 525 |\n | |green 0.310 0.595 | |\n | |blue 0.155 0.070 | |\n | |red 0.630 0.340 | |\n | |whiteD65 0.3127 0.3290 | |\n ---------------------------------------------------------------------------------\n | 9 |primary x y |Rec.ITU-R BT.2020 |\n | |green 0.170 0.797 | |\n | |blue 0.131 0.046 | |\n | |red 0.708 0.292 | |\n | |whiteD65 0.3127 0.3290 | |\n ---------------------------------------------------------------------------------"]
11400 pub colour_primaries: u8,
11401 #[doc = " Transfer characteristics.\n\n See ISO/IEC 23001-8 or ITU H.273, section 8.2 and table 3.\n Only used if the color standard in use is \\c VAColorStandardExplicit.\n Below list the typical transfer characteristics for the reference.\n -----------------------------------------------------------\n | Value | Informative Remark |\n -----------------------------------------------------------\n | 1 |Rec.ITU-R BT.709-5 |\n | |colour gamut system |\n -----------------------------------------------------------\n | 4 |Assumed display gamma 2.2 |\n -----------------------------------------------------------\n | 6 |Rec.ITU-R BT.601-6 525 or 625 |\n -----------------------------------------------------------\n | 8 |Linear transfer characteristics |\n -----------------------------------------------------------\n | 13 |IEC 61966-2-1(sRGB or sYCC) |\n -----------------------------------------------------------\n | 14,15 |Rec.ITU-R BT.2020 |\n -----------------------------------------------------------\n | 16 |SMPTE ST 2084 for 10,12,14 and 16bit system |\n -----------------------------------------------------------"]
11402 pub transfer_characteristics: u8,
11403 #[doc = " Matrix coefficients.\n\n See ISO/IEC 23001-8 or ITU H.273, section 8.3 and table 4.\n Only used if the color standard in use is \\c VAColorStandardExplicit."]
11404 pub matrix_coefficients: u8,
11405 #[doc = " Reserved bytes for future use, must be zero."]
11406 pub reserved: [u8; 3usize],
11407}
11408pub type VAProcColorProperties = _VAProcColorProperties;
11409#[doc = " \\brief High Dynamic Range Meta Data."]
11410#[repr(C)]
11411#[derive(Debug, Copy, Clone, PartialEq, Eq)]
11412pub struct _VAHdrMetaData {
11413 #[doc = " \\brief high dynamic range metadata type, HDR10 etc."]
11414 pub metadata_type: VAProcHighDynamicRangeMetadataType,
11415 #[doc = " \\brief Pointer to high dynamic range metadata.\n\n The pointer could point to VAHdrMetaDataHDR10 or other HDR meta data."]
11416 pub metadata: *mut ::std::os::raw::c_void,
11417 #[doc = " \\brief Size of high dynamic range metadata."]
11418 pub metadata_size: u32,
11419 #[doc = " \\brief Reserved bytes for future use, must be zero"]
11420 pub reserved: [u32; 4usize],
11421}
11422impl Default for _VAHdrMetaData {
11423 fn default() -> Self {
11424 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11425 unsafe {
11426 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11427 s.assume_init()
11428 }
11429 }
11430}
11431#[doc = " \\brief High Dynamic Range Meta Data."]
11432pub type VAHdrMetaData = _VAHdrMetaData;
11433#[doc = " \\brief Video processing pipeline configuration.\n\n This buffer defines a video processing pipeline. The actual filters to\n be applied are provided in the \\c filters field, they can be re-used\n in other processing pipelines.\n\n The target surface is specified by the \\c render_target argument of\n \\c vaBeginPicture(). The general usage model is described as follows:\n - \\c vaBeginPicture(): specify the target surface that receives the\n processed output;\n - \\c vaRenderPicture(): specify a surface to be processed and composed\n into the \\c render_target. Use as many \\c vaRenderPicture() calls as\n necessary surfaces to compose ;\n - \\c vaEndPicture(): tell the driver to start processing the surfaces\n with the requested filters.\n\n If a filter (e.g. noise reduction) needs to be applied with different\n values for multiple surfaces, the application needs to create as many\n filter parameter buffers as necessary. i.e. the filter parameters shall\n not change between two calls to \\c vaRenderPicture().\n\n For composition usage models, the first surface to process will generally\n use an opaque background color, i.e. \\c output_background_color set with\n the most significant byte set to \\c 0xff. For instance, \\c 0xff000000 for\n a black background. Then, subsequent surfaces would use a transparent\n background color."]
11434#[repr(C)]
11435#[derive(Debug, Copy, Clone, PartialEq, Eq)]
11436pub struct _VAProcPipelineParameterBuffer {
11437 #[doc = " \\brief Source surface ID.\n\n ID of the source surface to process. If subpictures are associated\n with the video surfaces then they shall be rendered to the target\n surface, if the #VA_PROC_PIPELINE_SUBPICTURES pipeline flag is set."]
11438 pub surface: VASurfaceID,
11439 #[doc = " \\brief Region within the source surface to be processed.\n\n Pointer to a #VARectangle defining the region within the source\n surface to be processed. If NULL, \\c surface_region implies the\n whole surface."]
11440 pub surface_region: *const VARectangle,
11441 #[doc = " \\brief Requested input color standard.\n\n Color properties are implicitly converted throughout the processing\n pipeline. The video processor chooses the best moment to apply\n this conversion. The set of supported color standards for input shall\n be queried with vaQueryVideoProcPipelineCaps().\n\n If this is set to VAProcColorStandardExplicit, the color properties\n are specified explicitly in input_color_properties instead."]
11442 pub surface_color_standard: VAProcColorStandardType,
11443 #[doc = " \\brief Region within the output surface.\n\n Pointer to a #VARectangle defining the region within the output\n surface that receives the processed pixels. If NULL, \\c output_region\n implies the whole surface.\n\n Note that any pixels residing outside the specified region will\n be filled in with the \\ref output_background_color."]
11444 pub output_region: *const VARectangle,
11445 #[doc = " \\brief Background color.\n\n Background color used to fill in pixels that reside outside of the\n specified \\ref output_region. The color is specified in ARGB format:\n [31:24] alpha, [23:16] red, [15:8] green, [7:0] blue.\n\n Unless the alpha value is zero or the \\ref output_region represents\n the whole target surface size, implementations shall not render the\n source surface to the target surface directly. Rather, in order to\n maintain the exact semantics of \\ref output_background_color, the\n driver shall use a temporary surface and fill it in with the\n appropriate background color. Next, the driver will blend this\n temporary surface into the target surface."]
11446 pub output_background_color: u32,
11447 #[doc = " \\brief Requested output color standard.\n\n If this is set to VAProcColorStandardExplicit, the color properties\n are specified explicitly in output_color_properties instead."]
11448 pub output_color_standard: VAProcColorStandardType,
11449 #[doc = " \\brief Pipeline filters. See video pipeline flags.\n\n Flags to control the pipeline, like whether to apply subpictures\n or not, notify the driver that it can opt for power optimizations,\n should this be needed."]
11450 pub pipeline_flags: u32,
11451 #[doc = " \\brief Extra filter flags. See vaPutSurface() flags.\n\n Filter flags are used as a fast path, wherever possible, to use\n vaPutSurface() flags instead of explicit filter parameter buffers.\n\n Allowed filter flags API-wise. Use vaQueryVideoProcPipelineCaps()\n to check for implementation details:\n - Bob-deinterlacing: \\c VA_FRAME_PICTURE, \\c VA_TOP_FIELD,\n \\c VA_BOTTOM_FIELD. Note that any deinterlacing filter\n (#VAProcFilterDeinterlacing) will override those flags.\n - Color space conversion: \\c VA_SRC_BT601, \\c VA_SRC_BT709,\n \\c VA_SRC_SMPTE_240.\n - Scaling: \\c VA_FILTER_SCALING_DEFAULT, \\c VA_FILTER_SCALING_FAST,\n \\c VA_FILTER_SCALING_HQ, \\c VA_FILTER_SCALING_NL_ANAMORPHIC.\n - Interpolation Method: \\c VA_FILTER_INTERPOLATION_DEFAULT,\n \\c VA_FILTER_INTERPOLATION_NEAREST_NEIGHBOR,\n \\c VA_FILTER_INTERPOLATION_BILINEAR, \\c VA_FILTER_INTERPOLATION_ADVANCED."]
11452 pub filter_flags: u32,
11453 #[doc = " \\brief Array of filters to apply to the surface.\n\n The list of filters shall be ordered in the same way the driver expects\n them. i.e. as was returned from vaQueryVideoProcFilters().\n Otherwise, a #VA_STATUS_ERROR_INVALID_FILTER_CHAIN is returned\n from vaRenderPicture() with this buffer.\n\n #VA_STATUS_ERROR_UNSUPPORTED_FILTER is returned if the list\n contains an unsupported filter.\n"]
11454 pub filters: *mut VABufferID,
11455 #[doc = " \\brief Actual number of filters."]
11456 pub num_filters: u32,
11457 #[doc = " \\brief Array of forward reference frames (past frames)."]
11458 pub forward_references: *mut VASurfaceID,
11459 #[doc = " \\brief Number of forward reference frames that were supplied."]
11460 pub num_forward_references: u32,
11461 #[doc = " \\brief Array of backward reference frames (future frames)."]
11462 pub backward_references: *mut VASurfaceID,
11463 #[doc = " \\brief Number of backward reference frames that were supplied."]
11464 pub num_backward_references: u32,
11465 #[doc = " \\brief Rotation state. See rotation angles.\n\n The rotation angle is clockwise. There is no specific rotation\n center for this operation. Rather, The source \\ref surface is\n first rotated by the specified angle and then scaled to fit the\n \\ref output_region.\n\n This means that the top-left hand corner (0,0) of the output\n (rotated) surface is expressed as follows:\n - \\ref VA_ROTATION_NONE: (0,0) is the top left corner of the\n source surface -- no rotation is performed ;\n - \\ref VA_ROTATION_90: (0,0) is the bottom-left corner of the\n source surface ;\n - \\ref VA_ROTATION_180: (0,0) is the bottom-right corner of the\n source surface -- the surface is flipped around the X axis ;\n - \\ref VA_ROTATION_270: (0,0) is the top-right corner of the\n source surface.\n\n Check VAProcPipelineCaps::rotation_flags first prior to\n defining a specific rotation angle. Otherwise, the hardware can\n perfectly ignore this variable if it does not support any\n rotation."]
11466 pub rotation_state: u32,
11467 #[doc = " \\brief blending state. See \"Video blending state definition\".\n\n If \\ref blend_state is NULL, then default operation mode depends\n on the source \\ref surface format:\n - RGB: per-pixel alpha blending ;\n - YUV: no blending, i.e override the underlying pixels.\n\n Otherwise, \\ref blend_state is a pointer to a #VABlendState\n structure that shall be live until vaEndPicture().\n\n Implementation note: the driver is responsible for checking the\n blend state flags against the actual source \\ref surface format.\n e.g. premultiplied alpha blending is only applicable to RGB\n surfaces, and luma keying is only applicable to YUV surfaces.\n If a mismatch occurs, then #VA_STATUS_ERROR_INVALID_BLEND_STATE\n is returned."]
11468 pub blend_state: *const VABlendState,
11469 #[doc = " \\brief mirroring state. See \"Mirroring directions\".\n\n Mirroring of an image can be performed either along the\n horizontal or vertical axis. It is assumed that the rotation\n operation is always performed before the mirroring operation."]
11470 pub mirror_state: u32,
11471 #[doc = " \\brief Array of additional output surfaces."]
11472 pub additional_outputs: *mut VASurfaceID,
11473 #[doc = " \\brief Number of additional output surfaces."]
11474 pub num_additional_outputs: u32,
11475 #[doc = " \\brief Flag to indicate the input surface flag\n\n bit0~3: Surface sample type\n - 0000: Progressive --> VA_FRAME_PICTURE\n - 0001: Single Top Field --> VA_TOP_FIELD\n - 0010: Single Bottom Field --> VA_BOTTOM_FIELD\n - 0100: Interleaved Top Field First --> VA_TOP_FIELD_FIRST\n - 1000: Interleaved Bottom Field First --> VA_BOTTOM_FIELD_FIRST\n\n For interlaced scaling, examples as follow:\n - 1. Interleaved to Interleaved (Suppose input is top field first)\n -- set input_surface_flag as VA_TOP_FIELD_FIRST\n -- set output_surface_flag as VA_TOP_FIELD_FIRST\n - 2. Interleaved to Field (Suppose input is top field first)\n An interleaved frame need to be passed twice.\n First cycle to get the first field:\n -- set input_surface_flag as VA_TOP_FIELD_FIRST\n -- set output_surface_flag as VA_TOP_FIELD\n Second cycle to get the second field:\n -- set input_surface_flag as VA_TOP_FIELD_FIRST\n -- set output_surface_flag as VA_BOTTOM_FIELD\n - 3. Field to Interleaved (Suppose first field is top field)\n -- create two surfaces, one for top field, the other for bottom field\n -- set surface with the first field surface id\n -- set backward_reference with the second field surface id\n -- set input_surface_flag as VA_TOP_FIELD\n -- set output_surface_flag as VA_TOP_FIELD_FIRST\n - 4. Field to Field:\n -- set flag according to each frame.\n\n bit31: Surface encryption\n - 0: non-protected\n - 1: protected\n\n bit4~30 for future"]
11476 pub input_surface_flag: u32,
11477 #[doc = " \\brief Flag to indicate the output surface flag\n\n bit0~3: Surface sample type\n - 0000: Progressive --> VA_FRAME_PICTURE\n - 0001: Top Field --> VA_TOP_FIELD\n - 0010: Bottom Field --> VA_BOTTOM_FIELD\n - 0100: Top Field First --> VA_TOP_FIELD_FIRST\n - 1000: Bottom Field First --> VA_BOTTOM_FIELD_FIRST\n\n bit31: Surface encryption\n - 0: non-protected\n - 1: protected\n\n bit4~30 for future"]
11478 pub output_surface_flag: u32,
11479 #[doc = " \\brief Input Color Properties. See \"VAProcColorProperties\"."]
11480 pub input_color_properties: VAProcColorProperties,
11481 #[doc = " \\brief Output Color Properties. See \"VAProcColorProperties\"."]
11482 pub output_color_properties: VAProcColorProperties,
11483 #[doc = " \\brief Processing mode. See \"VAProcMode\"."]
11484 pub processing_mode: VAProcMode,
11485 #[doc = " \\brief Output High Dynamic Metadata.\n\n If output_metadata is NULL, then output default to SDR."]
11486 pub output_hdr_metadata: *mut VAHdrMetaData,
11487 #[cfg(any(target_arch = "x86_64", all(target_pointer_width = "64", not(windows))))]
11488 pub va_reserved: [u32; 16usize],
11489 #[cfg(not(any(target_arch = "x86_64", all(target_pointer_width = "64", not(windows)))))]
11490 pub va_reserved: [u32; 19usize],
11491}
11492impl Default for _VAProcPipelineParameterBuffer {
11493 fn default() -> Self {
11494 let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
11495 unsafe {
11496 ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
11497 s.assume_init()
11498 }
11499 }
11500}
11501#[doc = " \\brief Video processing pipeline configuration.\n\n This buffer defines a video processing pipeline. The actual filters to\n be applied are provided in the \\c filters field, they can be re-used\n in other processing pipelines.\n\n The target surface is specified by the \\c render_target argument of\n \\c vaBeginPicture(). The general usage model is described as follows:\n - \\c vaBeginPicture(): specify the target surface that receives the\n processed output;\n - \\c vaRenderPicture(): specify a surface to be processed and composed\n into the \\c render_target. Use as many \\c vaRenderPicture() calls as\n necessary surfaces to compose ;\n - \\c vaEndPicture(): tell the driver to start processing the surfaces\n with the requested filters.\n\n If a filter (e.g. noise reduction) needs to be applied with different\n values for multiple surfaces, the application needs to create as many\n filter parameter buffers as necessary. i.e. the filter parameters shall\n not change between two calls to \\c vaRenderPicture().\n\n For composition usage models, the first surface to process will generally\n use an opaque background color, i.e. \\c output_background_color set with\n the most significant byte set to \\c 0xff. For instance, \\c 0xff000000 for\n a black background. Then, subsequent surfaces would use a transparent\n background color."]
11502pub type VAProcPipelineParameterBuffer = _VAProcPipelineParameterBuffer;
11503#[doc = " \\brief External buffer descriptor for a DRM PRIME surface.\n\n For export, call vaExportSurfaceHandle() with mem_type set to\n VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and pass a pointer to an\n instance of this structure to fill.\n If VA_EXPORT_SURFACE_SEPARATE_LAYERS is specified on export, each\n layer will contain exactly one plane. For example, an NV12\n surface will be exported as two layers, one of DRM_FORMAT_R8 and\n one of DRM_FORMAT_GR88.\n If VA_EXPORT_SURFACE_COMPOSED_LAYERS is specified on export,\n there will be exactly one layer.\n\n For import, call vaCreateSurfaces() with the MemoryType attribute\n set to VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and the\n ExternalBufferDescriptor attribute set to point to an array of\n num_surfaces instances of this structure.\n The number of planes which need to be provided for a given layer\n is dependent on both the format and the format modifier used for\n the objects containing it. For example, the format DRM_FORMAT_RGBA\n normally requires one plane, but with the format modifier\n I915_FORMAT_MOD_Y_TILED_CCS it requires two planes - the first\n being the main data plane and the second containing the color\n control surface.\n Note that a given driver may only support a subset of possible\n representations of a particular format. For example, it may only\n support NV12 surfaces when they are contained within a single DRM\n object, and therefore fail to create such surfaces if the two\n planes are in different DRM objects.\n Note that backend driver will retrieve the resource represent by fd,\n and a valid surface ID is generated. Backend driver will not close\n the file descriptor. Application should handle the release of the fd.\n releasing the fd will not impact the existence of the surface."]
11504#[repr(C)]
11505#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
11506pub struct _VADRMPRIMESurfaceDescriptor {
11507 #[doc = " Pixel format fourcc of the whole surface (VA_FOURCC_*)."]
11508 pub fourcc: u32,
11509 #[doc = " Width of the surface in pixels."]
11510 pub width: u32,
11511 #[doc = " Height of the surface in pixels."]
11512 pub height: u32,
11513 #[doc = " Number of distinct DRM objects making up the surface."]
11514 pub num_objects: u32,
11515 pub objects: [_VADRMPRIMESurfaceDescriptor__bindgen_ty_1; 4usize],
11516 #[doc = " Number of layers making up the surface."]
11517 pub num_layers: u32,
11518 pub layers: [_VADRMPRIMESurfaceDescriptor__bindgen_ty_2; 4usize],
11519}
11520#[doc = " Description of each object."]
11521#[repr(C)]
11522#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
11523pub struct _VADRMPRIMESurfaceDescriptor__bindgen_ty_1 {
11524 #[doc = " DRM PRIME file descriptor for this object."]
11525 pub fd: ::std::os::raw::c_int,
11526 #[doc = " Total size of this object (may include regions which are\n not part of the surface)."]
11527 pub size: u32,
11528 #[doc = " Format modifier applied to this object."]
11529 pub drm_format_modifier: u64,
11530}
11531#[doc = " Description of each layer in the surface."]
11532#[repr(C)]
11533#[derive(Debug, Default, Copy, Clone, PartialEq, Eq)]
11534pub struct _VADRMPRIMESurfaceDescriptor__bindgen_ty_2 {
11535 #[doc = " DRM format fourcc of this layer (DRM_FOURCC_*)."]
11536 pub drm_format: u32,
11537 #[doc = " Number of planes in this layer."]
11538 pub num_planes: u32,
11539 #[doc = " Index in the objects array of the object containing each\n plane."]
11540 pub object_index: [u32; 4usize],
11541 #[doc = " Offset within the object of each plane."]
11542 pub offset: [u32; 4usize],
11543 #[doc = " Pitch of each plane."]
11544 pub pitch: [u32; 4usize],
11545}
11546#[doc = " \\brief External buffer descriptor for a DRM PRIME surface.\n\n For export, call vaExportSurfaceHandle() with mem_type set to\n VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and pass a pointer to an\n instance of this structure to fill.\n If VA_EXPORT_SURFACE_SEPARATE_LAYERS is specified on export, each\n layer will contain exactly one plane. For example, an NV12\n surface will be exported as two layers, one of DRM_FORMAT_R8 and\n one of DRM_FORMAT_GR88.\n If VA_EXPORT_SURFACE_COMPOSED_LAYERS is specified on export,\n there will be exactly one layer.\n\n For import, call vaCreateSurfaces() with the MemoryType attribute\n set to VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME_2 and the\n ExternalBufferDescriptor attribute set to point to an array of\n num_surfaces instances of this structure.\n The number of planes which need to be provided for a given layer\n is dependent on both the format and the format modifier used for\n the objects containing it. For example, the format DRM_FORMAT_RGBA\n normally requires one plane, but with the format modifier\n I915_FORMAT_MOD_Y_TILED_CCS it requires two planes - the first\n being the main data plane and the second containing the color\n control surface.\n Note that a given driver may only support a subset of possible\n representations of a particular format. For example, it may only\n support NV12 surfaces when they are contained within a single DRM\n object, and therefore fail to create such surfaces if the two\n planes are in different DRM objects.\n Note that backend driver will retrieve the resource represent by fd,\n and a valid surface ID is generated. Backend driver will not close\n the file descriptor. Application should handle the release of the fd.\n releasing the fd will not impact the existence of the surface."]
11547pub type VADRMPRIMESurfaceDescriptor = _VADRMPRIMESurfaceDescriptor;
11548pub struct Va {
11549 __library: ::libloading::Library,
11550 pub vaErrorStr:
11551 Result<unsafe extern "C" fn(error_status: VAStatus) -> *const ::std::os::raw::c_char, ::libloading::Error>,
11552 pub vaInitialize: Result<
11553 unsafe extern "C" fn(
11554 dpy: VADisplay,
11555 major_version: *mut ::std::os::raw::c_int,
11556 minor_version: *mut ::std::os::raw::c_int,
11557 ) -> VAStatus,
11558 ::libloading::Error,
11559 >,
11560 pub vaTerminate: Result<unsafe extern "C" fn(dpy: VADisplay) -> VAStatus, ::libloading::Error>,
11561 pub vaQueryVendorString:
11562 Result<unsafe extern "C" fn(dpy: VADisplay) -> *const ::std::os::raw::c_char, ::libloading::Error>,
11563 pub vaMaxNumProfiles: Result<unsafe extern "C" fn(dpy: VADisplay) -> ::std::os::raw::c_int, ::libloading::Error>,
11564 pub vaMaxNumEntrypoints: Result<unsafe extern "C" fn(dpy: VADisplay) -> ::std::os::raw::c_int, ::libloading::Error>,
11565 pub vaQueryConfigProfiles: Result<
11566 unsafe extern "C" fn(
11567 dpy: VADisplay,
11568 profile_list: *mut VAProfile::Type,
11569 num_profiles: *mut ::std::os::raw::c_int,
11570 ) -> VAStatus,
11571 ::libloading::Error,
11572 >,
11573 pub vaQueryConfigEntrypoints: Result<
11574 unsafe extern "C" fn(
11575 dpy: VADisplay,
11576 profile: VAProfile::Type,
11577 entrypoint_list: *mut VAEntrypoint::Type,
11578 num_entrypoints: *mut ::std::os::raw::c_int,
11579 ) -> VAStatus,
11580 ::libloading::Error,
11581 >,
11582 pub vaGetConfigAttributes: Result<
11583 unsafe extern "C" fn(
11584 dpy: VADisplay,
11585 profile: VAProfile::Type,
11586 entrypoint: VAEntrypoint::Type,
11587 attrib_list: *mut VAConfigAttrib,
11588 num_attribs: ::std::os::raw::c_int,
11589 ) -> VAStatus,
11590 ::libloading::Error,
11591 >,
11592 pub vaCreateConfig: Result<
11593 unsafe extern "C" fn(
11594 dpy: VADisplay,
11595 profile: VAProfile::Type,
11596 entrypoint: VAEntrypoint::Type,
11597 attrib_list: *mut VAConfigAttrib,
11598 num_attribs: ::std::os::raw::c_int,
11599 config_id: *mut VAConfigID,
11600 ) -> VAStatus,
11601 ::libloading::Error,
11602 >,
11603 pub vaDestroyConfig:
11604 Result<unsafe extern "C" fn(dpy: VADisplay, config_id: VAConfigID) -> VAStatus, ::libloading::Error>,
11605 pub vaQuerySurfaceAttributes: Result<
11606 unsafe extern "C" fn(
11607 dpy: VADisplay,
11608 config: VAConfigID,
11609 attrib_list: *mut VASurfaceAttrib,
11610 num_attribs: *mut ::std::os::raw::c_uint,
11611 ) -> VAStatus,
11612 ::libloading::Error,
11613 >,
11614 pub vaCreateSurfaces: Result<
11615 unsafe extern "C" fn(
11616 dpy: VADisplay,
11617 format: ::std::os::raw::c_uint,
11618 width: ::std::os::raw::c_uint,
11619 height: ::std::os::raw::c_uint,
11620 surfaces: *mut VASurfaceID,
11621 num_surfaces: ::std::os::raw::c_uint,
11622 attrib_list: *mut VASurfaceAttrib,
11623 num_attribs: ::std::os::raw::c_uint,
11624 ) -> VAStatus,
11625 ::libloading::Error,
11626 >,
11627 pub vaDestroySurfaces: Result<
11628 unsafe extern "C" fn(
11629 dpy: VADisplay,
11630 surfaces: *mut VASurfaceID,
11631 num_surfaces: ::std::os::raw::c_int,
11632 ) -> VAStatus,
11633 ::libloading::Error,
11634 >,
11635 pub vaCreateContext: Result<
11636 unsafe extern "C" fn(
11637 dpy: VADisplay,
11638 config_id: VAConfigID,
11639 picture_width: ::std::os::raw::c_int,
11640 picture_height: ::std::os::raw::c_int,
11641 flag: ::std::os::raw::c_int,
11642 render_targets: *mut VASurfaceID,
11643 num_render_targets: ::std::os::raw::c_int,
11644 context: *mut VAContextID,
11645 ) -> VAStatus,
11646 ::libloading::Error,
11647 >,
11648 pub vaDestroyContext:
11649 Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID) -> VAStatus, ::libloading::Error>,
11650 pub vaCreateBuffer: Result<
11651 unsafe extern "C" fn(
11652 dpy: VADisplay,
11653 context: VAContextID,
11654 type_: VABufferType::Type,
11655 size: ::std::os::raw::c_uint,
11656 num_elements: ::std::os::raw::c_uint,
11657 data: *mut ::std::os::raw::c_void,
11658 buf_id: *mut VABufferID,
11659 ) -> VAStatus,
11660 ::libloading::Error,
11661 >,
11662 pub vaMapBuffer: Result<
11663 unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID, pbuf: *mut *mut ::std::os::raw::c_void) -> VAStatus,
11664 ::libloading::Error,
11665 >,
11666 pub vaUnmapBuffer:
11667 Result<unsafe extern "C" fn(dpy: VADisplay, buf_id: VABufferID) -> VAStatus, ::libloading::Error>,
11668 pub vaDestroyBuffer:
11669 Result<unsafe extern "C" fn(dpy: VADisplay, buffer_id: VABufferID) -> VAStatus, ::libloading::Error>,
11670 pub vaExportSurfaceHandle: Result<
11671 unsafe extern "C" fn(
11672 dpy: VADisplay,
11673 surface_id: VASurfaceID,
11674 mem_type: u32,
11675 flags: u32,
11676 descriptor: *mut ::std::os::raw::c_void,
11677 ) -> VAStatus,
11678 ::libloading::Error,
11679 >,
11680 pub vaBeginPicture: Result<
11681 unsafe extern "C" fn(dpy: VADisplay, context: VAContextID, render_target: VASurfaceID) -> VAStatus,
11682 ::libloading::Error,
11683 >,
11684 pub vaRenderPicture: Result<
11685 unsafe extern "C" fn(
11686 dpy: VADisplay,
11687 context: VAContextID,
11688 buffers: *mut VABufferID,
11689 num_buffers: ::std::os::raw::c_int,
11690 ) -> VAStatus,
11691 ::libloading::Error,
11692 >,
11693 pub vaEndPicture:
11694 Result<unsafe extern "C" fn(dpy: VADisplay, context: VAContextID) -> VAStatus, ::libloading::Error>,
11695 pub vaSyncSurface:
11696 Result<unsafe extern "C" fn(dpy: VADisplay, render_target: VASurfaceID) -> VAStatus, ::libloading::Error>,
11697 pub vaQuerySurfaceStatus: Result<
11698 unsafe extern "C" fn(
11699 dpy: VADisplay,
11700 render_target: VASurfaceID,
11701 status: *mut VASurfaceStatus::Type,
11702 ) -> VAStatus,
11703 ::libloading::Error,
11704 >,
11705 pub vaQuerySurfaceError: Result<
11706 unsafe extern "C" fn(
11707 dpy: VADisplay,
11708 surface: VASurfaceID,
11709 error_status: VAStatus,
11710 error_info: *mut *mut ::std::os::raw::c_void,
11711 ) -> VAStatus,
11712 ::libloading::Error,
11713 >,
11714 pub vaMaxNumImageFormats:
11715 Result<unsafe extern "C" fn(dpy: VADisplay) -> ::std::os::raw::c_int, ::libloading::Error>,
11716 pub vaQueryImageFormats: Result<
11717 unsafe extern "C" fn(
11718 dpy: VADisplay,
11719 format_list: *mut VAImageFormat,
11720 num_formats: *mut ::std::os::raw::c_int,
11721 ) -> VAStatus,
11722 ::libloading::Error,
11723 >,
11724 pub vaCreateImage: Result<
11725 unsafe extern "C" fn(
11726 dpy: VADisplay,
11727 format: *mut VAImageFormat,
11728 width: ::std::os::raw::c_int,
11729 height: ::std::os::raw::c_int,
11730 image: *mut VAImage,
11731 ) -> VAStatus,
11732 ::libloading::Error,
11733 >,
11734 pub vaDestroyImage: Result<unsafe extern "C" fn(dpy: VADisplay, image: VAImageID) -> VAStatus, ::libloading::Error>,
11735 pub vaGetImage: Result<
11736 unsafe extern "C" fn(
11737 dpy: VADisplay,
11738 surface: VASurfaceID,
11739 x: ::std::os::raw::c_int,
11740 y: ::std::os::raw::c_int,
11741 width: ::std::os::raw::c_uint,
11742 height: ::std::os::raw::c_uint,
11743 image: VAImageID,
11744 ) -> VAStatus,
11745 ::libloading::Error,
11746 >,
11747 pub vaPutImage: Result<
11748 unsafe extern "C" fn(
11749 dpy: VADisplay,
11750 surface: VASurfaceID,
11751 image: VAImageID,
11752 src_x: ::std::os::raw::c_int,
11753 src_y: ::std::os::raw::c_int,
11754 src_width: ::std::os::raw::c_uint,
11755 src_height: ::std::os::raw::c_uint,
11756 dest_x: ::std::os::raw::c_int,
11757 dest_y: ::std::os::raw::c_int,
11758 dest_width: ::std::os::raw::c_uint,
11759 dest_height: ::std::os::raw::c_uint,
11760 ) -> VAStatus,
11761 ::libloading::Error,
11762 >,
11763 pub vaDeriveImage: Result<
11764 unsafe extern "C" fn(dpy: VADisplay, surface: VASurfaceID, image: *mut VAImage) -> VAStatus,
11765 ::libloading::Error,
11766 >,
11767 pub vaGetDisplayDRM: Result<unsafe extern "C" fn(fd: ::std::os::raw::c_int) -> VADisplay, ::libloading::Error>,
11768}
11769impl Va {
11770 pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
11771 where
11772 P: ::libloading::AsFilename,
11773 {
11774 let library = ::libloading::Library::new(path)?;
11775 Self::from_library(library)
11776 }
11777 pub unsafe fn from_library<L>(library: L) -> Result<Self, ::libloading::Error>
11778 where
11779 L: Into<::libloading::Library>,
11780 {
11781 let __library = library.into();
11782 let vaErrorStr = __library.get(b"vaErrorStr\0").map(|sym| *sym);
11783 let vaInitialize = __library.get(b"vaInitialize\0").map(|sym| *sym);
11784 let vaTerminate = __library.get(b"vaTerminate\0").map(|sym| *sym);
11785 let vaQueryVendorString = __library.get(b"vaQueryVendorString\0").map(|sym| *sym);
11786 let vaMaxNumProfiles = __library.get(b"vaMaxNumProfiles\0").map(|sym| *sym);
11787 let vaMaxNumEntrypoints = __library.get(b"vaMaxNumEntrypoints\0").map(|sym| *sym);
11788 let vaQueryConfigProfiles = __library.get(b"vaQueryConfigProfiles\0").map(|sym| *sym);
11789 let vaQueryConfigEntrypoints = __library.get(b"vaQueryConfigEntrypoints\0").map(|sym| *sym);
11790 let vaGetConfigAttributes = __library.get(b"vaGetConfigAttributes\0").map(|sym| *sym);
11791 let vaCreateConfig = __library.get(b"vaCreateConfig\0").map(|sym| *sym);
11792 let vaDestroyConfig = __library.get(b"vaDestroyConfig\0").map(|sym| *sym);
11793 let vaQuerySurfaceAttributes = __library.get(b"vaQuerySurfaceAttributes\0").map(|sym| *sym);
11794 let vaCreateSurfaces = __library.get(b"vaCreateSurfaces\0").map(|sym| *sym);
11795 let vaDestroySurfaces = __library.get(b"vaDestroySurfaces\0").map(|sym| *sym);
11796 let vaCreateContext = __library.get(b"vaCreateContext\0").map(|sym| *sym);
11797 let vaDestroyContext = __library.get(b"vaDestroyContext\0").map(|sym| *sym);
11798 let vaCreateBuffer = __library.get(b"vaCreateBuffer\0").map(|sym| *sym);
11799 let vaMapBuffer = __library.get(b"vaMapBuffer\0").map(|sym| *sym);
11800 let vaUnmapBuffer = __library.get(b"vaUnmapBuffer\0").map(|sym| *sym);
11801 let vaDestroyBuffer = __library.get(b"vaDestroyBuffer\0").map(|sym| *sym);
11802 let vaExportSurfaceHandle = __library.get(b"vaExportSurfaceHandle\0").map(|sym| *sym);
11803 let vaBeginPicture = __library.get(b"vaBeginPicture\0").map(|sym| *sym);
11804 let vaRenderPicture = __library.get(b"vaRenderPicture\0").map(|sym| *sym);
11805 let vaEndPicture = __library.get(b"vaEndPicture\0").map(|sym| *sym);
11806 let vaSyncSurface = __library.get(b"vaSyncSurface\0").map(|sym| *sym);
11807 let vaQuerySurfaceStatus = __library.get(b"vaQuerySurfaceStatus\0").map(|sym| *sym);
11808 let vaQuerySurfaceError = __library.get(b"vaQuerySurfaceError\0").map(|sym| *sym);
11809 let vaMaxNumImageFormats = __library.get(b"vaMaxNumImageFormats\0").map(|sym| *sym);
11810 let vaQueryImageFormats = __library.get(b"vaQueryImageFormats\0").map(|sym| *sym);
11811 let vaCreateImage = __library.get(b"vaCreateImage\0").map(|sym| *sym);
11812 let vaDestroyImage = __library.get(b"vaDestroyImage\0").map(|sym| *sym);
11813 let vaGetImage = __library.get(b"vaGetImage\0").map(|sym| *sym);
11814 let vaPutImage = __library.get(b"vaPutImage\0").map(|sym| *sym);
11815 let vaDeriveImage = __library.get(b"vaDeriveImage\0").map(|sym| *sym);
11816 let vaGetDisplayDRM = __library.get(b"vaGetDisplayDRM\0").map(|sym| *sym);
11817 Ok(Va {
11818 __library,
11819 vaErrorStr,
11820 vaInitialize,
11821 vaTerminate,
11822 vaQueryVendorString,
11823 vaMaxNumProfiles,
11824 vaMaxNumEntrypoints,
11825 vaQueryConfigProfiles,
11826 vaQueryConfigEntrypoints,
11827 vaGetConfigAttributes,
11828 vaCreateConfig,
11829 vaDestroyConfig,
11830 vaQuerySurfaceAttributes,
11831 vaCreateSurfaces,
11832 vaDestroySurfaces,
11833 vaCreateContext,
11834 vaDestroyContext,
11835 vaCreateBuffer,
11836 vaMapBuffer,
11837 vaUnmapBuffer,
11838 vaDestroyBuffer,
11839 vaExportSurfaceHandle,
11840 vaBeginPicture,
11841 vaRenderPicture,
11842 vaEndPicture,
11843 vaSyncSurface,
11844 vaQuerySurfaceStatus,
11845 vaQuerySurfaceError,
11846 vaMaxNumImageFormats,
11847 vaQueryImageFormats,
11848 vaCreateImage,
11849 vaDestroyImage,
11850 vaGetImage,
11851 vaPutImage,
11852 vaDeriveImage,
11853 vaGetDisplayDRM,
11854 })
11855 }
11856 #[doc = " Returns a short english description of error_status"]
11857 pub unsafe fn vaErrorStr(&self, error_status: VAStatus) -> *const ::std::os::raw::c_char {
11858 (self.vaErrorStr.as_ref().expect("Expected function, got error."))(error_status)
11859 }
11860 #[doc = " Initialize the library"]
11861 pub unsafe fn vaInitialize(
11862 &self,
11863 dpy: VADisplay,
11864 major_version: *mut ::std::os::raw::c_int,
11865 minor_version: *mut ::std::os::raw::c_int,
11866 ) -> VAStatus {
11867 (self.vaInitialize.as_ref().expect("Expected function, got error."))(dpy, major_version, minor_version)
11868 }
11869 #[doc = " After this call, all library internal resources will be cleaned up"]
11870 pub unsafe fn vaTerminate(&self, dpy: VADisplay) -> VAStatus {
11871 (self.vaTerminate.as_ref().expect("Expected function, got error."))(dpy)
11872 }
11873 #[doc = " vaQueryVendorString returns a pointer to a zero-terminated string\n describing some aspects of the VA implemenation on a specific\n hardware accelerator. The format of the returned string is vendor\n specific and at the discretion of the implementer.\n e.g. for the Intel GMA500 implementation, an example would be:\n \"Intel GMA500 - 2.0.0.32L.0005\""]
11874 pub unsafe fn vaQueryVendorString(&self, dpy: VADisplay) -> *const ::std::os::raw::c_char {
11875 (self
11876 .vaQueryVendorString
11877 .as_ref()
11878 .expect("Expected function, got error."))(dpy)
11879 }
11880 #[doc = " Get maximum number of profiles supported by the implementation"]
11881 pub unsafe fn vaMaxNumProfiles(&self, dpy: VADisplay) -> ::std::os::raw::c_int {
11882 (self.vaMaxNumProfiles.as_ref().expect("Expected function, got error."))(dpy)
11883 }
11884 #[doc = " Get maximum number of entrypoints supported by the implementation"]
11885 pub unsafe fn vaMaxNumEntrypoints(&self, dpy: VADisplay) -> ::std::os::raw::c_int {
11886 (self
11887 .vaMaxNumEntrypoints
11888 .as_ref()
11889 .expect("Expected function, got error."))(dpy)
11890 }
11891 #[doc = " Query supported profiles\n The caller must provide a \"profile_list\" array that can hold at\n least vaMaxNumProfile() entries. The actual number of profiles\n returned in \"profile_list\" is returned in \"num_profile\"."]
11892 pub unsafe fn vaQueryConfigProfiles(
11893 &self,
11894 dpy: VADisplay,
11895 profile_list: *mut VAProfile::Type,
11896 num_profiles: *mut ::std::os::raw::c_int,
11897 ) -> VAStatus {
11898 (self
11899 .vaQueryConfigProfiles
11900 .as_ref()
11901 .expect("Expected function, got error."))(dpy, profile_list, num_profiles)
11902 }
11903 #[doc = " Query supported entrypoints for a given profile\n The caller must provide an \"entrypoint_list\" array that can hold at\n least vaMaxNumEntrypoints() entries. The actual number of entrypoints\n returned in \"entrypoint_list\" is returned in \"num_entrypoints\"."]
11904 pub unsafe fn vaQueryConfigEntrypoints(
11905 &self,
11906 dpy: VADisplay,
11907 profile: VAProfile::Type,
11908 entrypoint_list: *mut VAEntrypoint::Type,
11909 num_entrypoints: *mut ::std::os::raw::c_int,
11910 ) -> VAStatus {
11911 (self
11912 .vaQueryConfigEntrypoints
11913 .as_ref()
11914 .expect("Expected function, got error."))(dpy, profile, entrypoint_list, num_entrypoints)
11915 }
11916 #[doc = " Get attributes for a given profile/entrypoint pair\n The caller must provide an \"attrib_list\" with all attributes to be\n retrieved. Upon return, the attributes in \"attrib_list\" have been\n updated with their value. Unknown attributes or attributes that are\n not supported for the given profile/entrypoint pair will have their\n value set to VA_ATTRIB_NOT_SUPPORTED"]
11917 pub unsafe fn vaGetConfigAttributes(
11918 &self,
11919 dpy: VADisplay,
11920 profile: VAProfile::Type,
11921 entrypoint: VAEntrypoint::Type,
11922 attrib_list: *mut VAConfigAttrib,
11923 num_attribs: ::std::os::raw::c_int,
11924 ) -> VAStatus {
11925 (self
11926 .vaGetConfigAttributes
11927 .as_ref()
11928 .expect("Expected function, got error."))(dpy, profile, entrypoint, attrib_list, num_attribs)
11929 }
11930 #[doc = " Create a configuration for the video decode/encode/processing pipeline\n it passes in the attribute list that specifies the attributes it cares\n about, with the rest taking default values."]
11931 pub unsafe fn vaCreateConfig(
11932 &self,
11933 dpy: VADisplay,
11934 profile: VAProfile::Type,
11935 entrypoint: VAEntrypoint::Type,
11936 attrib_list: *mut VAConfigAttrib,
11937 num_attribs: ::std::os::raw::c_int,
11938 config_id: *mut VAConfigID,
11939 ) -> VAStatus {
11940 (self.vaCreateConfig.as_ref().expect("Expected function, got error."))(
11941 dpy,
11942 profile,
11943 entrypoint,
11944 attrib_list,
11945 num_attribs,
11946 config_id,
11947 )
11948 }
11949 #[doc = " Free resources associdated with a given config"]
11950 pub unsafe fn vaDestroyConfig(&self, dpy: VADisplay, config_id: VAConfigID) -> VAStatus {
11951 (self.vaDestroyConfig.as_ref().expect("Expected function, got error."))(dpy, config_id)
11952 }
11953 #[doc = " \\brief Queries surface attributes for the supplied config.\n\n This function queries for all supported attributes for the\n supplied VA \\c config. In particular, if the underlying hardware\n supports the creation of VA surfaces in various formats, then\n this function will enumerate all pixel formats that are supported.\n\n The \\c attrib_list array is allocated by the user and \\c\n num_attribs shall be initialized to the number of allocated\n elements in that array. Upon successful return, the actual number\n of attributes will be overwritten into \\c num_attribs. Otherwise,\n \\c VA_STATUS_ERROR_MAX_NUM_EXCEEDED is returned and \\c num_attribs\n is adjusted to the number of elements that would be returned if\n enough space was available.\n\n Note: it is perfectly valid to pass NULL to the \\c attrib_list\n argument when vaQuerySurfaceAttributes() is used to determine the\n actual number of elements that need to be allocated.\n\n @param[in] dpy the VA display\n @param[in] config the config identifying a codec or a video\n processing pipeline\n @param[out] attrib_list the output array of #VASurfaceAttrib elements\n @param[in,out] num_attribs the number of elements allocated on\n input, the number of elements actually filled in output"]
11954 pub unsafe fn vaQuerySurfaceAttributes(
11955 &self,
11956 dpy: VADisplay,
11957 config: VAConfigID,
11958 attrib_list: *mut VASurfaceAttrib,
11959 num_attribs: *mut ::std::os::raw::c_uint,
11960 ) -> VAStatus {
11961 (self
11962 .vaQuerySurfaceAttributes
11963 .as_ref()
11964 .expect("Expected function, got error."))(dpy, config, attrib_list, num_attribs)
11965 }
11966 #[doc = " \\brief Creates an array of surfaces\n\n Creates an array of surfaces. The optional list of attributes shall\n be constructed based on what the underlying hardware could expose\n through vaQuerySurfaceAttributes().\n\n @param[in] dpy the VA display\n @param[in] format the desired surface format. See \\c VA_RT_FORMAT_*\n @param[in] width the surface width\n @param[in] height the surface height\n @param[out] surfaces the array of newly created surfaces\n @param[in] num_surfaces the number of surfaces to create\n @param[in] attrib_list the list of (optional) attributes, or \\c NULL\n @param[in] num_attribs the number of attributes supplied in\n \\c attrib_list, or zero"]
11967 pub unsafe fn vaCreateSurfaces(
11968 &self,
11969 dpy: VADisplay,
11970 format: ::std::os::raw::c_uint,
11971 width: ::std::os::raw::c_uint,
11972 height: ::std::os::raw::c_uint,
11973 surfaces: *mut VASurfaceID,
11974 num_surfaces: ::std::os::raw::c_uint,
11975 attrib_list: *mut VASurfaceAttrib,
11976 num_attribs: ::std::os::raw::c_uint,
11977 ) -> VAStatus {
11978 (self.vaCreateSurfaces.as_ref().expect("Expected function, got error."))(
11979 dpy,
11980 format,
11981 width,
11982 height,
11983 surfaces,
11984 num_surfaces,
11985 attrib_list,
11986 num_attribs,
11987 )
11988 }
11989 #[doc = " vaDestroySurfaces - Destroy resources associated with surfaces.\n Surfaces can only be destroyed after all contexts using these surfaces have been\n destroyed.\n dpy: display\n surfaces: array of surfaces to destroy\n num_surfaces: number of surfaces in the array to be destroyed."]
11990 pub unsafe fn vaDestroySurfaces(
11991 &self,
11992 dpy: VADisplay,
11993 surfaces: *mut VASurfaceID,
11994 num_surfaces: ::std::os::raw::c_int,
11995 ) -> VAStatus {
11996 (self.vaDestroySurfaces.as_ref().expect("Expected function, got error."))(dpy, surfaces, num_surfaces)
11997 }
11998 #[doc = " vaCreateContext - Create a context\n dpy: display\n config_id: configuration for the context\n picture_width: coded picture width\n picture_height: coded picture height\n flag: any combination of the following:\n VA_PROGRESSIVE (only progressive frame pictures in the sequence when set)\n render_targets: a hint for render targets (surfaces) tied to the context\n num_render_targets: number of render targets in the above array\n context: created context id upon return"]
11999 pub unsafe fn vaCreateContext(
12000 &self,
12001 dpy: VADisplay,
12002 config_id: VAConfigID,
12003 picture_width: ::std::os::raw::c_int,
12004 picture_height: ::std::os::raw::c_int,
12005 flag: ::std::os::raw::c_int,
12006 render_targets: *mut VASurfaceID,
12007 num_render_targets: ::std::os::raw::c_int,
12008 context: *mut VAContextID,
12009 ) -> VAStatus {
12010 (self.vaCreateContext.as_ref().expect("Expected function, got error."))(
12011 dpy,
12012 config_id,
12013 picture_width,
12014 picture_height,
12015 flag,
12016 render_targets,
12017 num_render_targets,
12018 context,
12019 )
12020 }
12021 #[doc = " vaDestroyContext - Destroy a context\n dpy: display\n context: context to be destroyed"]
12022 pub unsafe fn vaDestroyContext(&self, dpy: VADisplay, context: VAContextID) -> VAStatus {
12023 (self.vaDestroyContext.as_ref().expect("Expected function, got error."))(dpy, context)
12024 }
12025 #[doc = " Creates a buffer for \"num_elements\" elements of \"size\" bytes and\n initalize with \"data\".\n if \"data\" is null, then the contents of the buffer data store\n are undefined.\n Basically there are two ways to get buffer data to the server side. One is\n to call vaCreateBuffer() with a non-null \"data\", which results the data being\n copied to the data store on the server side. A different method that\n eliminates this copy is to pass null as \"data\" when calling vaCreateBuffer(),\n and then use vaMapBuffer() to map the data store from the server side to the\n client address space for access.\n The user must call vaDestroyBuffer() to destroy a buffer.\n Note: image buffers are created by the library, not the client. Please see\n vaCreateImage on how image buffers are managed."]
12026 pub unsafe fn vaCreateBuffer(
12027 &self,
12028 dpy: VADisplay,
12029 context: VAContextID,
12030 type_: VABufferType::Type,
12031 size: ::std::os::raw::c_uint,
12032 num_elements: ::std::os::raw::c_uint,
12033 data: *mut ::std::os::raw::c_void,
12034 buf_id: *mut VABufferID,
12035 ) -> VAStatus {
12036 (self.vaCreateBuffer.as_ref().expect("Expected function, got error."))(
12037 dpy,
12038 context,
12039 type_,
12040 size,
12041 num_elements,
12042 data,
12043 buf_id,
12044 )
12045 }
12046 #[doc = " Map data store of the buffer into the client's address space\n vaCreateBuffer() needs to be called with \"data\" set to NULL before\n calling vaMapBuffer()\n\n if buffer type is VAEncCodedBufferType, pbuf points to link-list of\n VACodedBufferSegment, and the list is terminated if \"next\" is NULL"]
12047 pub unsafe fn vaMapBuffer(
12048 &self,
12049 dpy: VADisplay,
12050 buf_id: VABufferID,
12051 pbuf: *mut *mut ::std::os::raw::c_void,
12052 ) -> VAStatus {
12053 (self.vaMapBuffer.as_ref().expect("Expected function, got error."))(dpy, buf_id, pbuf)
12054 }
12055 #[doc = " After client making changes to a mapped data store, it needs to\n \"Unmap\" it to let the server know that the data is ready to be\n consumed by the server"]
12056 pub unsafe fn vaUnmapBuffer(&self, dpy: VADisplay, buf_id: VABufferID) -> VAStatus {
12057 (self.vaUnmapBuffer.as_ref().expect("Expected function, got error."))(dpy, buf_id)
12058 }
12059 #[doc = " After this call, the buffer is deleted and this buffer_id is no longer valid\n\n A buffer can be re-used and sent to the server by another Begin/Render/End\n sequence if vaDestroyBuffer() is not called with this buffer.\n\n Note re-using a shared buffer (e.g. a slice data buffer) between the host and the\n hardware accelerator can result in performance dropping."]
12060 pub unsafe fn vaDestroyBuffer(&self, dpy: VADisplay, buffer_id: VABufferID) -> VAStatus {
12061 (self.vaDestroyBuffer.as_ref().expect("Expected function, got error."))(dpy, buffer_id)
12062 }
12063 #[doc = " \\brief Export a handle to a surface for use with an external API\n\n The exported handles are owned by the caller, and the caller is\n responsible for freeing them when no longer needed (e.g. by closing\n DRM PRIME file descriptors).\n\n This does not perform any synchronisation. If the contents of the\n surface will be read, vaSyncSurface() must be called before doing so.\n If the contents of the surface are written, then all operations must\n be completed externally before using the surface again by via VA-API\n functions.\n\n @param[in] dpy VA display.\n @param[in] surface_id Surface to export.\n @param[in] mem_type Memory type to export to.\n @param[in] flags Combination of flags to apply\n (VA_EXPORT_SURFACE_*).\n @param[out] descriptor Pointer to the descriptor structure to fill\n with the handle details. The type of this structure depends on\n the value of mem_type.\n\n @return Status code:\n - VA_STATUS_SUCCESS: Success.\n - VA_STATUS_ERROR_INVALID_DISPLAY: The display is not valid.\n - VA_STATUS_ERROR_UNIMPLEMENTED: The driver does not implement\n this interface.\n - VA_STATUS_ERROR_INVALID_SURFACE: The surface is not valid, or\n the surface is not exportable in the specified way.\n - VA_STATUS_ERROR_UNSUPPORTED_MEMORY_TYPE: The driver does not\n support exporting surfaces to the specified memory type."]
12064 pub unsafe fn vaExportSurfaceHandle(
12065 &self,
12066 dpy: VADisplay,
12067 surface_id: VASurfaceID,
12068 mem_type: u32,
12069 flags: u32,
12070 descriptor: *mut ::std::os::raw::c_void,
12071 ) -> VAStatus {
12072 (self
12073 .vaExportSurfaceHandle
12074 .as_ref()
12075 .expect("Expected function, got error."))(dpy, surface_id, mem_type, flags, descriptor)
12076 }
12077 #[doc = " Get ready for a video pipeline\n - decode a picture to a target surface\n - encode a picture from a target surface\n - process a picture to a target surface"]
12078 pub unsafe fn vaBeginPicture(&self, dpy: VADisplay, context: VAContextID, render_target: VASurfaceID) -> VAStatus {
12079 (self.vaBeginPicture.as_ref().expect("Expected function, got error."))(dpy, context, render_target)
12080 }
12081 #[doc = " Send video decode, encode or processing buffers to the server."]
12082 pub unsafe fn vaRenderPicture(
12083 &self,
12084 dpy: VADisplay,
12085 context: VAContextID,
12086 buffers: *mut VABufferID,
12087 num_buffers: ::std::os::raw::c_int,
12088 ) -> VAStatus {
12089 (self.vaRenderPicture.as_ref().expect("Expected function, got error."))(dpy, context, buffers, num_buffers)
12090 }
12091 #[doc = " Make the end of rendering for a picture.\n The server should start processing all pending operations for this\n surface. This call is non-blocking. The client can start another\n Begin/Render/End sequence on a different render target.\n if VAContextID used in this function previously successfully passed\n vaMFAddContext call, real processing will be started during vaMFSubmit"]
12092 pub unsafe fn vaEndPicture(&self, dpy: VADisplay, context: VAContextID) -> VAStatus {
12093 (self.vaEndPicture.as_ref().expect("Expected function, got error."))(dpy, context)
12094 }
12095 #[doc = " This function blocks until all pending operations on the render target\n have been completed. Upon return it is safe to use the render target for a\n different picture."]
12096 pub unsafe fn vaSyncSurface(&self, dpy: VADisplay, render_target: VASurfaceID) -> VAStatus {
12097 (self.vaSyncSurface.as_ref().expect("Expected function, got error."))(dpy, render_target)
12098 }
12099 #[doc = " Find out any pending ops on the render target"]
12100 pub unsafe fn vaQuerySurfaceStatus(
12101 &self,
12102 dpy: VADisplay,
12103 render_target: VASurfaceID,
12104 status: *mut VASurfaceStatus::Type,
12105 ) -> VAStatus {
12106 (self
12107 .vaQuerySurfaceStatus
12108 .as_ref()
12109 .expect("Expected function, got error."))(dpy, render_target, status)
12110 }
12111 #[doc = " After the application gets VA_STATUS_ERROR_DECODING_ERROR after calling vaSyncSurface(),\n it can call vaQuerySurfaceError to find out further details on the particular error.\n VA_STATUS_ERROR_DECODING_ERROR should be passed in as \"error_status\".\n\n After the applications get VA_STATUS_HW_BUSY or VA_STATUS_SUCCESSFULL from vaSyncSurface(),\n it still can call vaQuerySurfaceError to find out further details to know if has real hw reset\n happened on this surface since umd and kmd could recover the context from reset with success in sometimes.\n VA_STATUS_HW_BUSY or VA_STATUS_SUCCESSFULL also could be passed in as \"error_status\".\n\n Upon the return, error_info will point to an array of _VASurfaceDecodeMBErrors structure,\n which is allocated and filled by libVA with detailed information on the VADecodeErrorType.\n The array is terminated if \"status==-1\" is detected."]
12112 pub unsafe fn vaQuerySurfaceError(
12113 &self,
12114 dpy: VADisplay,
12115 surface: VASurfaceID,
12116 error_status: VAStatus,
12117 error_info: *mut *mut ::std::os::raw::c_void,
12118 ) -> VAStatus {
12119 (self
12120 .vaQuerySurfaceError
12121 .as_ref()
12122 .expect("Expected function, got error."))(dpy, surface, error_status, error_info)
12123 }
12124 #[doc = " Get maximum number of image formats supported by the implementation"]
12125 pub unsafe fn vaMaxNumImageFormats(&self, dpy: VADisplay) -> ::std::os::raw::c_int {
12126 (self
12127 .vaMaxNumImageFormats
12128 .as_ref()
12129 .expect("Expected function, got error."))(dpy)
12130 }
12131 #[doc = " Query supported image formats\n The caller must provide a \"format_list\" array that can hold at\n least vaMaxNumImageFormats() entries. The actual number of formats\n returned in \"format_list\" is returned in \"num_formats\"."]
12132 pub unsafe fn vaQueryImageFormats(
12133 &self,
12134 dpy: VADisplay,
12135 format_list: *mut VAImageFormat,
12136 num_formats: *mut ::std::os::raw::c_int,
12137 ) -> VAStatus {
12138 (self
12139 .vaQueryImageFormats
12140 .as_ref()
12141 .expect("Expected function, got error."))(dpy, format_list, num_formats)
12142 }
12143 #[doc = " Create a VAImage structure\n The width and height fields returned in the VAImage structure may get\n enlarged for some YUV formats. Upon return from this function,\n image->buf has been created and proper storage allocated by the library.\n The client can access the image through the Map/Unmap calls."]
12144 pub unsafe fn vaCreateImage(
12145 &self,
12146 dpy: VADisplay,
12147 format: *mut VAImageFormat,
12148 width: ::std::os::raw::c_int,
12149 height: ::std::os::raw::c_int,
12150 image: *mut VAImage,
12151 ) -> VAStatus {
12152 (self.vaCreateImage.as_ref().expect("Expected function, got error."))(dpy, format, width, height, image)
12153 }
12154 #[doc = " Should call DestroyImage before destroying the surface it is bound to"]
12155 pub unsafe fn vaDestroyImage(&self, dpy: VADisplay, image: VAImageID) -> VAStatus {
12156 (self.vaDestroyImage.as_ref().expect("Expected function, got error."))(dpy, image)
12157 }
12158 #[doc = " Retrive surface data into a VAImage\n Image must be in a format supported by the implementation"]
12159 pub unsafe fn vaGetImage(
12160 &self,
12161 dpy: VADisplay,
12162 surface: VASurfaceID,
12163 x: ::std::os::raw::c_int,
12164 y: ::std::os::raw::c_int,
12165 width: ::std::os::raw::c_uint,
12166 height: ::std::os::raw::c_uint,
12167 image: VAImageID,
12168 ) -> VAStatus {
12169 (self.vaGetImage.as_ref().expect("Expected function, got error."))(dpy, surface, x, y, width, height, image)
12170 }
12171 #[doc = " Copy data from a VAImage to a surface\n Image must be in a format supported by the implementation\n Returns a VA_STATUS_ERROR_SURFACE_BUSY if the surface\n shouldn't be rendered into when this is called"]
12172 pub unsafe fn vaPutImage(
12173 &self,
12174 dpy: VADisplay,
12175 surface: VASurfaceID,
12176 image: VAImageID,
12177 src_x: ::std::os::raw::c_int,
12178 src_y: ::std::os::raw::c_int,
12179 src_width: ::std::os::raw::c_uint,
12180 src_height: ::std::os::raw::c_uint,
12181 dest_x: ::std::os::raw::c_int,
12182 dest_y: ::std::os::raw::c_int,
12183 dest_width: ::std::os::raw::c_uint,
12184 dest_height: ::std::os::raw::c_uint,
12185 ) -> VAStatus {
12186 (self.vaPutImage.as_ref().expect("Expected function, got error."))(
12187 dpy,
12188 surface,
12189 image,
12190 src_x,
12191 src_y,
12192 src_width,
12193 src_height,
12194 dest_x,
12195 dest_y,
12196 dest_width,
12197 dest_height,
12198 )
12199 }
12200 #[doc = " Derive an VAImage from an existing surface.\n This interface will derive a VAImage and corresponding image buffer from\n an existing VA Surface. The image buffer can then be mapped/unmapped for\n direct CPU access. This operation is only possible on implementations with\n direct rendering capabilities and internal surface formats that can be\n represented with a VAImage. When the operation is not possible this interface\n will return VA_STATUS_ERROR_OPERATION_FAILED. Clients should then fall back\n to using vaCreateImage + vaPutImage to accomplish the same task in an\n indirect manner.\n\n Implementations should only return success when the resulting image buffer\n would be useable with vaMap/Unmap.\n\n When directly accessing a surface special care must be taken to insure\n proper synchronization with the graphics hardware. Clients should call\n vaQuerySurfaceStatus to insure that a surface is not the target of concurrent\n rendering or currently being displayed by an overlay.\n\n Additionally nothing about the contents of a surface should be assumed\n following a vaPutSurface. Implementations are free to modify the surface for\n scaling or subpicture blending within a call to vaPutImage.\n\n Calls to vaPutImage or vaGetImage using the same surface from which the image\n has been derived will return VA_STATUS_ERROR_SURFACE_BUSY. vaPutImage or\n vaGetImage with other surfaces is supported.\n\n An image created with vaDeriveImage should be freed with vaDestroyImage. The\n image and image buffer structures will be destroyed; however, the underlying\n surface will remain unchanged until freed with vaDestroySurfaces."]
12201 pub unsafe fn vaDeriveImage(&self, dpy: VADisplay, surface: VASurfaceID, image: *mut VAImage) -> VAStatus {
12202 (self.vaDeriveImage.as_ref().expect("Expected function, got error."))(dpy, surface, image)
12203 }
12204 #[doc = " \\brief Returns a VA display derived from the specified DRM connection.\n\n This function returns a (possibly cached) VA display from the\n specified DRM connection @fd.\n\n @param[in] fd the DRM connection descriptor\n @return the VA display"]
12205 pub unsafe fn vaGetDisplayDRM(&self, fd: ::std::os::raw::c_int) -> VADisplay {
12206 (self.vaGetDisplayDRM.as_ref().expect("Expected function, got error."))(fd)
12207 }
12208}