/* Left shifting a negative value became undefined behavior in C99 (downgraded frommerelyimplementation-definedinC89).Thisshouldstillcompiletothe
correct thing on any two's-complement machine, but avoid ubsan warnings.*/ #define AOM_SIGNED_SHL(x, shift) ((x) * (((x) * 0 + 1) << (shift)))
// These can be used to give a hint about branch outcomes. // This can have an effect, even if your target processor has a // good branch predictor, as these hints can affect basic block // ordering by the compiler. #ifdef __GNUC__ #define LIKELY(v) __builtin_expect(v, 1) #define UNLIKELY(v) __builtin_expect(v, 0) #else #define LIKELY(v) (v) #define UNLIKELY(v) (v) #endif
typedef uint8_t qm_val_t; #define AOM_QM_BITS 5
// Note: // tran_low_t is the datatype used for final transform coefficients. // tran_high_t is the datatype used for intermediate transform stages. typedef int64_t tran_high_t; typedef int32_t tran_low_t;
// The result of this branchless code is equivalent to (value < 0 ? 0 : value) // or max(0, value) and might be faster in some cases. // Care should be taken since the behavior of right shifting signed type // negative value is undefined by C standards and implementation defined, staticinlineunsignedint negative_to_zero(int value) { return value & ~(value >> (sizeof(value) * 8 - 1));
}
// Returns the saturating cast of a double value to int. staticinlineint saturate_cast_double_to_int(double d) { if (d > INT_MAX) return INT_MAX; return (int)d;
}
#ifdef __cplusplus
} // extern "C" #endif
#endif// AOM_AOM_DSP_AOM_DSP_COMMON_H_
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.15 Sekunden
(vorverarbeitet am 2026-08-24)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.