/* * Copyright (c) 2016, Alliance for Open Media. All rights reserved. * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at www.aomedia.org/license/software. If the Alliance for Open * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
#define CDF_SIZE(x) ((x) + 1) #define CDF_PROB_BITS 15 #define CDF_PROB_TOP (1 << CDF_PROB_BITS) /*The value stored in an iCDF is CDF_PROB_TOP minus the actual cumulative probability (an "inverse" CDF). This function converts from one representation to the other (and is its own
inverse).*/ #define AOM_ICDF(x) (CDF_PROB_TOP - (x))
// rate is computed in the spec as: // 3 + ( cdf[N] > 15 ) + ( cdf[N] > 31 ) + Min(FloorLog2(N), 2) // In this case cdf[N] is |count|. // Min(FloorLog2(N), 2) is 1 for nsymbs == {2, 3} and 2 for all // nsymbs > 3. So the equation becomes: // 4 + (count > 15) + (count > 31) + (nsymbs > 3). // Note that the largest value for count is 32 (it is not incremented beyond // 32). So using that information: // count >> 4 is 0 for count from 0 to 15. // count >> 4 is 1 for count from 16 to 31. // count >> 4 is 2 for count == 31. // Now, the equation becomes: // 4 + (count >> 4) + (nsymbs > 3). constint rate = 4 + (count >> 4) + (nsymbs > 3);
int i = 0; do { if (i < val) {
cdf[i] += (CDF_PROB_TOP - cdf[i]) >> rate;
} else {
cdf[i] -= cdf[i] >> rate;
}
} while (++i < nsymbs - 1);
cdf[nsymbs] += (count < 32);
}
#ifdef __cplusplus
} // extern "C" #endif
#endif// AOM_AOM_DSP_PROB_H_
Messung V0.5
¤ Dauer der Verarbeitung: 0.8 Sekunden
(vorverarbeitet)
¤
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.