Searched refs:den (Results 1 - 7 of 7) sorted by relevance

/frameworks/av/include/media/stagefright/foundation/
H A DAUtils.h23 /* T must be integer type, den must not be 0 */
25 inline static const T divRound(const T &nom, const T &den) { argument
26 if ((nom >= 0) ^ (den >= 0)) {
27 return (nom - den / 2) / den;
29 return (nom + den / 2) / den;
33 /* == ceil(nom / den). T must be integer type, den must not be 0 */
35 inline static const T divUp(const T &nom, const T &den) { argument
45 align(const T &nom, const U &den) argument
[all...]
/frameworks/base/core/java/android/hardware/camera2/utils/
H A DParamsUtils.java139 int den = RATIONAL_DENOMINATOR;
142 numF = value * den;
144 if ((numF > Integer.MIN_VALUE && numF < Integer.MAX_VALUE) || (den == 1)) {
148 den /= 10;
157 return new Rational(num, den);
/frameworks/base/media/java/android/media/
H A DUtils.java151 private static Rational scaleRatio(Rational ratio, int num, int den) { argument
152 int common = gcd(num, den);
154 den /= common;
157 (int)(ratio.getDenominator() * (double)den)); // saturate to int
160 static Range<Rational> scaleRange(Range<Rational> range, int num, int den) { argument
161 if (num == den) {
165 scaleRatio(range.getLower(), num, den),
166 scaleRatio(range.getUpper(), num, den));
175 static int divUp(int num, int den) { argument
176 return (num + den
179 divUp(long num, long den) argument
[all...]
/frameworks/base/core/java/android/util/
H A DRational.java339 double den = mDenominator;
341 return num / den;
356 float den = mDenominator;
358 return num / den;
558 * "<i>num</i>{@code /}<i>den</i>" or
559 * "<i>num</i>{@code :}<i>den</i>" {@code => new Rational(num, den);},
560 * where <i>num</i> and <i>den</i> are string integers potentially
/frameworks/av/services/audioflinger/
H A DAudioResamplerFirGen.h330 double den = Poly4(-0.34598737196e8, 0.23852643181e6, local
332 return num / den;
345 double den = Poly3(0.103150763823e2, -0.14181687413e2, local
347 return exp(x) * sqrt(y) * num / den;
372 static inline double I0SqrRat(double x2, double num, double den) { argument
377 I0Term<6>::value, x2) * num / den; // e < 1.6e-7
385 den *= Poly4(-0.34598737196e8, 0.23852643181e6,
387 return num / den;
/frameworks/av/media/libstagefright/codecs/on2/enc/
H A DSoftVPXEncoder.cpp154 mCodecConfiguration->g_timebase.den = 1000000;
/frameworks/base/core/java/android/os/
H A DBatteryStats.java1752 public final String formatRatioLocked(long num, long den) { argument
1753 if (den == 0L) {
1756 float perc = ((float)num) / ((float)den) * 100;

Completed in 231 milliseconds