From d2499ead93dc4298c0882fe98902acb1b5209f99 Mon Sep 17 00:00:00 2001 From: trav90 Date: Fri, 19 Oct 2018 23:05:00 -0500 Subject: Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591 --- third_party/aom/av1/encoder/ml.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'third_party/aom/av1/encoder/ml.h') diff --git a/third_party/aom/av1/encoder/ml.h b/third_party/aom/av1/encoder/ml.h index 614cb60bb..cb8ef2871 100644 --- a/third_party/aom/av1/encoder/ml.h +++ b/third_party/aom/av1/encoder/ml.h @@ -9,8 +9,8 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ -#ifndef AV1_ENCODER_ML_H_ -#define AV1_ENCODER_ML_H_ +#ifndef AOM_AV1_ENCODER_ML_H_ +#define AOM_AV1_ENCODER_ML_H_ #ifdef __cplusplus extern "C" { @@ -37,8 +37,13 @@ typedef struct { void av1_nn_predict(const float *features, const NN_CONFIG *nn_config, float *output); +// Applies the softmax normalization function to the input +// to get a valid probability distribution in the output: +// output[i] = exp(input[i]) / sum_{k \in [0,n)}(exp(input[k])) +void av1_nn_softmax(const float *input, float *output, int n); + #ifdef __cplusplus } // extern "C" #endif -#endif // AV1_ENCODER_RD_H_ +#endif // AOM_AV1_ENCODER_ML_H_ -- cgit v1.2.3