Home
last modified time | relevance | path

Searched refs:den (Results 1 – 9 of 9) sorted by relevance

/frameworks/av/media/libstagefright/foundation/include/media/stagefright/foundation/
DAUtils.h25 inline static const T divRound(const T &nom, const T &den) { in divRound() argument
26 if ((nom >= 0) ^ (den >= 0)) { in divRound()
27 return (nom - den / 2) / den; in divRound()
29 return (nom + den / 2) / den; in divRound()
35 inline static const T divUp(const T &nom, const T &den) { in divUp() argument
36 if (den < 0) { in divUp()
37 return (nom < 0 ? nom + den + 1 : nom) / den; in divUp()
39 return (nom < 0 ? nom : nom + den - 1) / den; in divUp()
45 inline static const T align(const T &nom, const U &den) { in align() argument
46 return (nom + (T)(den - 1)) & (T)~(den - 1); in align()
/frameworks/base/media/java/android/media/
DUtils.java158 private static Rational scaleRatio(Rational ratio, int num, int den) {
159 int common = gcd(num, den);
161 den /= common;
164 (int)(ratio.getDenominator() * (double)den)); // saturate to int
167 static Range<Rational> scaleRange(Range<Rational> range, int num, int den) {
168 if (num == den) {
172 scaleRatio(range.getLower(), num, den),
173 scaleRatio(range.getUpper(), num, den));
182 static int divUp(int num, int den) {
183 return (num + den - 1) / den;
[all …]
/frameworks/base/core/java/android/hardware/camera2/utils/
DParamsUtils.java139 int den = RATIONAL_DENOMINATOR; in createRational() local
142 numF = value * den; in createRational()
144 if ((numF > Integer.MIN_VALUE && numF < Integer.MAX_VALUE) || (den == 1)) { in createRational()
148 den /= 10; in createRational()
157 return new Rational(num, den); in createRational()
/frameworks/base/core/java/android/util/
DRational.java339 double den = mDenominator; in doubleValue() local
341 return num / den; in doubleValue()
356 float den = mDenominator; in floatValue() local
358 return num / den; in floatValue()
/frameworks/av/media/libaudioprocessing/
DAudioResamplerFirGen.h333 double den = Poly4(-0.34598737196e8, 0.23852643181e6,
335 return num / den;
348 double den = Poly3(0.103150763823e2, -0.14181687413e2,
350 return exp(x) * sqrt(y) * num / den;
375 static inline double I0SqrRat(double x2, double num, double den) {
380 I0Term<6>::value, x2) * num / den; // e < 1.6e-7
388 den *= Poly4(-0.34598737196e8, 0.23852643181e6,
390 return num / den;
/frameworks/av/media/libstagefright/codec2/include/
DC2Param.h1098 C2TypedFieldSupportedValues(T min, T max, T nom, T den) : in C2TypedFieldSupportedValues()
1100 range{min, max, (T)0, nom, den} { } in C2TypedFieldSupportedValues()
1143 C2FieldSupportedValues(T min, T max, T nom, T den) : in C2FieldSupportedValues()
1145 range{min, max, (T)0, nom, den} { } in C2FieldSupportedValues()
/frameworks/base/services/core/java/com/android/server/net/
DNetworkStatsCollection.java187 public static long multiplySafe(long value, long num, long den) { in multiplySafe() argument
202 return (long) (((double) num / den) * value); in multiplySafe()
205 return r / den; in multiplySafe()
/frameworks/av/media/libstagefright/codecs/on2/enc/
DSoftVPXEncoder.cpp134 mCodecConfiguration->g_timebase.den = 1000000; in initEncoder()
/frameworks/base/core/java/android/os/
DBatteryStats.java2750 public final String formatRatioLocked(long num, long den) { in formatRatioLocked() argument
2751 if (den == 0L) { in formatRatioLocked()
2754 float perc = ((float)num) / ((float)den) * 100; in formatRatioLocked()