@@ -12,13 +12,8 @@ pub struct BlendState(bindings::VABlendState);
12
12
13
13
impl BlendState {
14
14
/// Creates the bindgen field
15
- pub fn new (
16
- flags : u32 ,
17
- global_alpha : f32 ,
18
- min_luma : f32 ,
19
- max_luma : f32 ,
20
- ) -> Self {
21
- Self ( bindings:: VABlendState {
15
+ pub fn new ( flags : u32 , global_alpha : f32 , min_luma : f32 , max_luma : f32 ) -> Self {
16
+ Self ( bindings:: VABlendState {
22
17
flags,
23
18
global_alpha,
24
19
min_luma,
@@ -39,7 +34,7 @@ impl ProcColorProperties {
39
34
transfer_characteristics : u8 ,
40
35
matrix_coefficients : u8 ,
41
36
) -> Self {
42
- Self ( bindings:: VAProcColorProperties {
37
+ Self ( bindings:: VAProcColorProperties {
43
38
chroma_sample_location,
44
39
color_range,
45
40
colour_primaries,
@@ -61,14 +56,10 @@ pub struct HdrMetaData(bindings::VAHdrMetaData);
61
56
62
57
impl < ' a > HdrMetaData {
63
58
/// Creates the bindgen field
64
- pub fn new (
65
- metadata_type : u32 ,
66
- metadata : Option < & ' a [ u8 ] > ,
67
- metadata_size : u32 ,
68
- ) -> Self {
69
- Self ( bindings:: VAHdrMetaData {
59
+ pub fn new ( metadata_type : u32 , metadata : Option < & ' a [ u8 ] > , metadata_size : u32 ) -> Self {
60
+ Self ( bindings:: VAHdrMetaData {
70
61
metadata_type : metadata_type as _ ,
71
- metadata : metadata. map_or ( ptr:: null_mut ( ) , |f| f. as_ptr ( ) as * mut _ ) ,
62
+ metadata : metadata. map_or ( ptr:: null_mut ( ) , |f| f. as_ptr ( ) as * mut _ ) ,
72
63
metadata_size,
73
64
reserved : Default :: default ( ) ,
74
65
} )
@@ -131,30 +122,65 @@ impl ProcPipelineParameterBuffer {
131
122
132
123
slf. c_params = Box :: new ( bindings:: VAProcPipelineParameterBuffer {
133
124
surface,
134
- surface_region : slf. surface_region . as_deref ( ) . map_or ( ptr:: null_mut ( ) , |r| r as * const _ as * mut _ ) ,
125
+ surface_region : slf
126
+ . surface_region
127
+ . as_deref ( )
128
+ . map_or ( ptr:: null_mut ( ) , |r| r as * const _ as * mut _ ) ,
135
129
surface_color_standard : surface_color_standard as _ ,
136
- output_region : slf. output_region . as_deref ( ) . map_or ( ptr:: null_mut ( ) , |r| r as * const _ as * mut _ ) ,
130
+ output_region : slf
131
+ . output_region
132
+ . as_deref ( )
133
+ . map_or ( ptr:: null_mut ( ) , |r| r as * const _ as * mut _ ) ,
137
134
output_background_color,
138
135
output_color_standard : output_color_standard as _ ,
139
136
pipeline_flags,
140
137
filter_flags,
141
- filters : slf. filters . as_deref ( ) . map_or ( ptr:: null_mut ( ) , |f| f. as_ptr ( ) as * mut _ ) ,
138
+ filters : slf
139
+ . filters
140
+ . as_deref ( )
141
+ . map_or ( ptr:: null_mut ( ) , |f| f. as_ptr ( ) as * mut _ ) ,
142
142
num_filters : slf. filters . as_ref ( ) . map_or ( 0 , |f| f. len ( ) as u32 ) ,
143
- forward_references : slf. forward_references . as_deref ( ) . map_or ( ptr:: null_mut ( ) , |r| r. as_ptr ( ) as * mut _ ) ,
144
- num_forward_references : slf. forward_references . as_ref ( ) . map_or ( 0 , |f| f. len ( ) as u32 ) ,
145
- backward_references : slf. backward_references . as_deref ( ) . map_or ( ptr:: null_mut ( ) , |r| r. as_ptr ( ) as * mut _ ) ,
146
- num_backward_references : slf. backward_references . as_ref ( ) . map_or ( 0 , |b| b. len ( ) as u32 ) ,
143
+ forward_references : slf
144
+ . forward_references
145
+ . as_deref ( )
146
+ . map_or ( ptr:: null_mut ( ) , |r| r. as_ptr ( ) as * mut _ ) ,
147
+ num_forward_references : slf
148
+ . forward_references
149
+ . as_ref ( )
150
+ . map_or ( 0 , |f| f. len ( ) as u32 ) ,
151
+ backward_references : slf
152
+ . backward_references
153
+ . as_deref ( )
154
+ . map_or ( ptr:: null_mut ( ) , |r| r. as_ptr ( ) as * mut _ ) ,
155
+ num_backward_references : slf
156
+ . backward_references
157
+ . as_ref ( )
158
+ . map_or ( 0 , |b| b. len ( ) as u32 ) ,
147
159
rotation_state,
148
- blend_state : slf. blend_state . as_deref ( ) . map_or ( ptr:: null ( ) , |b| b. as_ptr ( ) as * const bindings:: VABlendState ) ,
160
+ blend_state : slf
161
+ . blend_state
162
+ . as_deref ( )
163
+ . map_or ( ptr:: null ( ) , |b| b. as_ptr ( ) as * const bindings:: VABlendState ) ,
149
164
mirror_state,
150
- additional_outputs : slf. additional_outputs . as_deref ( ) . map_or ( ptr:: null_mut ( ) , |a| a. as_ptr ( ) as * mut _ ) ,
151
- num_additional_outputs : slf. additional_outputs . as_ref ( ) . map_or ( 0 , |a| a. len ( ) as u32 ) ,
165
+ additional_outputs : slf
166
+ . additional_outputs
167
+ . as_deref ( )
168
+ . map_or ( ptr:: null_mut ( ) , |a| a. as_ptr ( ) as * mut _ ) ,
169
+ num_additional_outputs : slf
170
+ . additional_outputs
171
+ . as_ref ( )
172
+ . map_or ( 0 , |a| a. len ( ) as u32 ) ,
152
173
input_surface_flag,
153
174
output_surface_flag,
154
175
input_color_properties : input_color_properties. 0 ,
155
176
output_color_properties : output_color_properties. 0 ,
156
177
processing_mode,
157
- output_hdr_metadata : slf. output_hdr_metadata . as_deref ( ) . map_or ( ptr:: null_mut ( ) , |o| o. as_ptr ( ) as * mut bindings:: VAHdrMetaData ) ,
178
+ output_hdr_metadata : slf
179
+ . output_hdr_metadata
180
+ . as_deref ( )
181
+ . map_or ( ptr:: null_mut ( ) , |o| {
182
+ o. as_ptr ( ) as * mut bindings:: VAHdrMetaData
183
+ } ) ,
158
184
va_reserved : Default :: default ( ) ,
159
185
} ) ;
160
186
@@ -169,4 +195,4 @@ impl ProcPipelineParameterBuffer {
169
195
pub fn inner ( & self ) -> & bindings:: VAProcPipelineParameterBuffer {
170
196
self . c_params . as_ref ( )
171
197
}
172
- }
198
+ }
0 commit comments