diff --git a/src/itx.rs b/src/itx.rs index 2a84d0e39..00c0a8603 100644 --- a/src/itx.rs +++ b/src/itx.rs @@ -26,7 +26,7 @@ pub unsafe extern "C" fn inv_txfm_add_rust( has_dconly: libc::c_int, bd: BD, ) { - let bitdepth_max: libc::c_int = bd.bitdepth_max().to_prim(); + let bitdepth_max: libc::c_int = bd.bitdepth_max().as_(); let stride = stride as usize; if !(w >= 4 && w <= 64) { unreachable!(); @@ -40,8 +40,8 @@ pub unsafe extern "C" fn inv_txfm_add_rust( let is_rect2: libc::c_int = (w * 2 == h || h * 2 == w) as libc::c_int; let rnd = (1 as libc::c_int) << shift >> 1; if eob < has_dconly { - let mut dc: libc::c_int = BD::Coef::to_prim(*coeff.offset(0)); - *coeff.offset(0) = BD::Coef::from_prim(0); + let mut dc: libc::c_int = (*coeff.offset(0)).as_(); + *coeff.offset(0) = 0.as_(); if is_rect2 != 0 { dc = dc * 181 + 128 >> 8; } @@ -89,7 +89,7 @@ pub unsafe extern "C" fn inv_txfm_add_rust( } else { let mut x_1 = 0; while x_1 < sw { - *c.offset(x_1 as isize) = (*coeff.offset((y_0 + x_1 * sh) as isize)).to_prim(); + *c.offset(x_1 as isize) = (*coeff.offset((y_0 + x_1 * sh) as isize)).as_(); x_1 += 1; } } diff --git a/src/itx_tmpl_16.rs b/src/itx_tmpl_16.rs index 3b2397bb8..ef2d21ffe 100644 --- a/src/itx_tmpl_16.rs +++ b/src/itx_tmpl_16.rs @@ -4977,7 +4977,7 @@ unsafe extern "C" fn inv_txfm_add_c( has_dconly: libc::c_int, bitdepth_max: libc::c_int, ) { - return inv_txfm_add_rust( + inv_txfm_add_rust( dst, stride, coeff, @@ -4989,7 +4989,7 @@ unsafe extern "C" fn inv_txfm_add_c( second_1d_fn, has_dconly, BitDepth16::from_c(bitdepth_max), - ); + ) } unsafe extern "C" fn inv_txfm_add_identity_identity_4x4_c( mut dst: *mut pixel, diff --git a/src/itx_tmpl_8.rs b/src/itx_tmpl_8.rs index 7db7a8078..752f69b60 100644 --- a/src/itx_tmpl_8.rs +++ b/src/itx_tmpl_8.rs @@ -3891,7 +3891,7 @@ unsafe extern "C" fn inv_txfm_add_c( second_1d_fn, has_dconly, BitDepth8::from_c(8), - ); + ) } unsafe extern "C" fn inv_txfm_add_flipadst_flipadst_4x4_c( mut dst: *mut pixel,