pub use libsharpyuv_core::sharpyuv_dsp::{
sharp_yuv_filter_row_c, sharp_yuv_update_rgb_c, sharp_yuv_update_y_c,
};
pub fn sharp_yuv_update_y(
src: &[u16],
r#ref: &[u16],
dst: &mut [u16],
len: i32,
bit_depth: i32,
) -> u64 {
#[cfg(all(feature = "simd", any(target_arch = "x86", target_arch = "x86_64")))]
{
if crate::dsp::cpu::features().sse2 {
return crate::sharpyuv::sharpyuv_sse2::sharp_yuv_update_y(
src, r#ref, dst, len, bit_depth,
);
}
}
#[cfg(all(feature = "simd", target_arch = "aarch64"))]
{
return crate::sharpyuv::sharpyuv_neon::sharp_yuv_update_y(src, r#ref, dst, len, bit_depth);
}
#[allow(
unreachable_code,
reason = "the C path is reached only without a SIMD variant"
)]
sharp_yuv_update_y_c(src, r#ref, dst, len, bit_depth)
}
pub fn sharp_yuv_update_rgb(src: &[i16], r#ref: &[i16], dst: &mut [i16], len: i32) {
#[cfg(all(feature = "simd", any(target_arch = "x86", target_arch = "x86_64")))]
{
if crate::dsp::cpu::features().sse2 {
return crate::sharpyuv::sharpyuv_sse2::sharp_yuv_update_rgb(src, r#ref, dst, len);
}
}
#[cfg(all(feature = "simd", target_arch = "aarch64"))]
{
return crate::sharpyuv::sharpyuv_neon::sharp_yuv_update_rgb(src, r#ref, dst, len);
}
#[allow(
unreachable_code,
reason = "the C path is reached only without a SIMD variant"
)]
sharp_yuv_update_rgb_c(src, r#ref, dst, len);
}
pub fn sharp_yuv_filter_row(
a: &[i16],
b: &[i16],
len: i32,
best_y: &[u16],
out: &mut [u16],
bit_depth: i32,
) {
#[cfg(all(feature = "simd", any(target_arch = "x86", target_arch = "x86_64")))]
{
if crate::dsp::cpu::features().sse2 {
return crate::sharpyuv::sharpyuv_sse2::sharp_yuv_filter_row(
a, b, len, best_y, out, bit_depth,
);
}
}
#[cfg(all(feature = "simd", target_arch = "aarch64"))]
{
return crate::sharpyuv::sharpyuv_neon::sharp_yuv_filter_row(
a, b, len, best_y, out, bit_depth,
);
}
#[allow(
unreachable_code,
reason = "the C path is reached only without a SIMD variant"
)]
sharp_yuv_filter_row_c(a, b, len, best_y, out, bit_depth);
}