File i16_to_f32_core.h¶
File List > doppler > i16_to_f32 > i16_to_f32_core.h
Go to the documentation of this file
#ifndef DP_I16_TO_F32_CORE_H
#define DP_I16_TO_F32_CORE_H
#include "doppler/clib_common.h"
#include "doppler/jm_perf.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
float iscale; /* 1.0f / scale, pre-computed for single-multiply step */
} dp_i16_to_f32_state_t;
dp_i16_to_f32_state_t *dp_i16_to_f32_create(float scale);
void dp_i16_to_f32_destroy(dp_i16_to_f32_state_t *state);
void dp_i16_to_f32_reset(dp_i16_to_f32_state_t *state);
JM_FORCEINLINE JM_HOT float
dp_i16_to_f32_step(const dp_i16_to_f32_state_t *state, int16_t x)
{
return (float)x * state->iscale;
}
void dp_i16_to_f32_steps(
dp_i16_to_f32_state_t *state,
const int16_t *input,
float *output,
size_t n);
#ifdef __cplusplus
}
#endif
#endif /* I16_TO_F32_CORE_H */