Go to the documentation of this file.
29 for (
int i = 0;
i <
size;
i++) {
36 int size,
int is_signed,
int maxval,
const float Q34,
39 for (
int i = 0;
i <
size;
i++) {
40 float qc = scaled[
i] * Q34;
41 int tmp = (int)
FFMIN((
float)(qc + rounding), (
float)maxval);
42 if (is_signed && in[
i] < 0.0
f) {
53 const float *node,
const float *lamsf,
54 int n_cur,
int n_prev,
int base,
int step,
int mdiff)
56 for (
int o = 0; o < n_cur; o++) {
58 float bestc = FLT_MAX;
59 for (
int op = 0;
op < n_prev;
op++) {
62 if (d < -mdiff || d > mdiff)
64 c = dpp[
op] + lamsf[d + mdiff];
70 bp[o] = best < 0 ? 0 : best;
71 dp[o] = best < 0 ? FLT_MAX : node[o] + bestc;
83 #elif ARCH_X86 && HAVE_X86ASM
void ff_aacenc_dsp_init_riscv(AACEncDSPContext *s)
trying all byte sequences megabyte in length and selecting the best looking sequence will yield cases to try But a word about which is also called distortion Distortion can be quantified by almost any quality measurement one chooses the sum of squared differences is used but more complex methods that consider psychovisual effects can be used as well It makes no difference in this discussion First step
static __device__ float fabsf(float a)
void ff_aacenc_dsp_init_x86(AACEncDSPContext *s)
static int op(uint8_t **dst, const uint8_t *dst_end, GetByteContext *gb, int pixel, int count, int *x, int width, int linesize)
Perform decode operation.
void ff_aacenc_dsp_init_aarch64(AACEncDSPContext *s)
static void abs_pow34_v(float *out, const float *in, const int size)
static __device__ float sqrtf(float a)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
#define i(width, name, range_min, range_max)
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
static void quantize_bands(int *out, const float *in, const float *scaled, int size, int is_signed, int maxval, const float Q34, const float rounding)
static void nmr_trellis_step_c(float *dp, uint8_t *bp, const float *dpp, const float *node, const float *lamsf, int n_cur, int n_prev, int base, int step, int mdiff)
void ff_aacenc_dsp_init(AACEncDSPContext *s)