diff options
Diffstat (limited to 'gfx/qcms/src/transform_avx.rs')
-rw-r--r-- | gfx/qcms/src/transform_avx.rs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/gfx/qcms/src/transform_avx.rs b/gfx/qcms/src/transform_avx.rs index 3a000e56ba..04ca752a83 100644 --- a/gfx/qcms/src/transform_avx.rs +++ b/gfx/qcms/src/transform_avx.rs @@ -24,33 +24,33 @@ unsafe extern "C" fn qcms_transform_data_template_lut_avx<F: Format>( mut dest: *mut u8, mut length: usize, ) { - let mat: *const [f32; 4] = (*transform).matrix.as_ptr(); + let mat: *const [f32; 4] = transform.matrix.as_ptr(); let mut input: Output = std::mem::zeroed(); /* share input and output locations to save having to keep the * locations in separate registers */ let output: *const u32 = &mut input as *mut Output as *mut u32; /* deref *transform now to avoid it in loop */ - let igtbl_r: *const f32 = (*transform).input_gamma_table_r.as_ref().unwrap().as_ptr(); - let igtbl_g: *const f32 = (*transform).input_gamma_table_g.as_ref().unwrap().as_ptr(); - let igtbl_b: *const f32 = (*transform).input_gamma_table_b.as_ref().unwrap().as_ptr(); + let igtbl_r: *const f32 = transform.input_gamma_table_r.as_ref().unwrap().as_ptr(); + let igtbl_g: *const f32 = transform.input_gamma_table_g.as_ref().unwrap().as_ptr(); + let igtbl_b: *const f32 = transform.input_gamma_table_b.as_ref().unwrap().as_ptr(); /* deref *transform now to avoid it in loop */ - let otdata_r: *const u8 = (*transform) - .output_table_r + let otdata_r: *const u8 = transform + .precache_output .as_deref() .unwrap() - .data + .lut_r .as_ptr(); let otdata_g: *const u8 = (*transform) - .output_table_g + .precache_output .as_deref() .unwrap() - .data + .lut_g .as_ptr(); let otdata_b: *const u8 = (*transform) - .output_table_b + .precache_output .as_deref() .unwrap() - .data + .lut_b .as_ptr(); /* input matrix values never change */ let mat0: __m256 = _mm256_broadcast_ps(&*((*mat.offset(0isize)).as_ptr() as *const __m128)); |