Skip to content

Commit

Permalink
fn *intra_pred_dsp_init*: Make nominally safe.
Browse files Browse the repository at this point in the history
  • Loading branch information
kkysen committed Nov 27, 2023
1 parent 2b28afb commit 4a60b90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ipred.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2049,7 +2049,7 @@ mod neon {

#[cfg(all(feature = "asm", any(target_arch = "x86", target_arch = "x86_64"),))]
#[inline(always)]
unsafe fn intra_pred_dsp_init_x86<BD: BitDepth>(c: &mut Rav1dIntraPredDSPContext) {
fn intra_pred_dsp_init_x86<BD: BitDepth>(c: &mut Rav1dIntraPredDSPContext) {
let flags = rav1d_get_cpu_flags();

if !flags.contains(CpuFlags::SSSE3) {
Expand Down Expand Up @@ -2161,7 +2161,7 @@ unsafe fn intra_pred_dsp_init_x86<BD: BitDepth>(c: &mut Rav1dIntraPredDSPContext

#[cfg(all(feature = "asm", any(target_arch = "arm", target_arch = "aarch64"),))]
#[inline(always)]
unsafe fn intra_pred_dsp_init_arm<BD: BitDepth>(c: &mut Rav1dIntraPredDSPContext) {
fn intra_pred_dsp_init_arm<BD: BitDepth>(c: &mut Rav1dIntraPredDSPContext) {
let flags = rav1d_get_cpu_flags();

if !flags.contains(CpuFlags::NEON) {
Expand Down Expand Up @@ -2204,7 +2204,7 @@ unsafe fn intra_pred_dsp_init_arm<BD: BitDepth>(c: &mut Rav1dIntraPredDSPContext
}

#[cold]
pub unsafe fn rav1d_intra_pred_dsp_init<BD: BitDepth>(c: &mut Rav1dIntraPredDSPContext) {
pub fn rav1d_intra_pred_dsp_init<BD: BitDepth>(c: &mut Rav1dIntraPredDSPContext) {
c.intra_pred[DC_PRED as usize] =
angular_ipred::Fn::new(ipred_dc_c_erased::<BD, { DcGen::TopLeft as u8 }>);
c.intra_pred[DC_128_PRED as usize] = angular_ipred::Fn::new(ipred_dc_128_c_erased::<BD>);
Expand Down

0 comments on commit 4a60b90

Please sign in to comment.