Home
last modified time | relevance | path

Searched refs:sum (Results 1 – 25 of 85) sorted by relevance

1234

/frameworks/av/media/libstagefright/codecs/amrnb/enc/src/
Dautocorr.cpp314 Word32 sum; in Autocorr() local
338 sum = 0L; in Autocorr()
346 sum += ((Word32)temp * temp) << 1; in Autocorr()
347 if (sum < 0) in Autocorr()
392 sum = 0L; in Autocorr()
398 sum += ((Word32)temp * temp) << 1; in Autocorr()
401 sum += ((Word32)temp * temp) << 1; in Autocorr()
403 if (sum > 0) in Autocorr()
410 sum += 1L; /* Avoid the case of all zeros */ in Autocorr()
414 norm = norm_l(sum); in Autocorr()
[all …]
Dton_stab.cpp696 Word16 sum; in check_gp_clipping() local
698 sum = shr(g_pitch, 3, pOverflow); /* Division by 8 */ in check_gp_clipping()
701 sum = add(sum, st->gp[i], pOverflow); in check_gp_clipping()
704 if (sum > GP_CLIP) in check_gp_clipping()
/frameworks/base/services/net/java/android/net/util/
DIpUtils.java47 int sum = seed; in checksum() local
60 sum += intAbs(shortBuf.get(i)); in checksum()
73 sum += b * 256; in checksum()
76 sum = ((sum >> 16) & 0xFFFF) + (sum & 0xFFFF); in checksum()
77 sum = ((sum + ((sum >> 16) & 0xFFFF)) & 0xFFFF); in checksum()
78 int negated = ~sum; in checksum()
115 int sum; in transportChecksum() local
118 sum = pseudoChecksumIPv4(buf, ipOffset, protocol, transportLen); in transportChecksum()
120 sum = pseudoChecksumIPv6(buf, ipOffset, protocol, transportLen); in transportChecksum()
125 sum = checksum(buf, sum, transportOffset, transportOffset + transportLen); in transportChecksum()
[all …]
/frameworks/rs/java/tests/ImageProcessing_jb/src/com/android/rs/image/
Dconvolve3x3.rs32 float4 sum = convert_float4(rsGetElementAt_uchar4(gIn, x1, y1)) * gCoeffs[0];
33 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y1)) * gCoeffs[1];
34 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y1)) * gCoeffs[2];
35 sum += convert_float4(rsGetElementAt_uchar4(gIn, x1, y)) * gCoeffs[3];
36 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y)) * gCoeffs[4];
37 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y)) * gCoeffs[5];
38 sum += convert_float4(rsGetElementAt_uchar4(gIn, x1, y2)) * gCoeffs[6];
39 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y2)) * gCoeffs[7];
40 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y2)) * gCoeffs[8];
42 sum = clamp(sum, 0.f, 255.f);
[all …]
/frameworks/rs/java/tests/ImageProcessing2/src/com/android/rs/image/
Dconvolve3x3.rs32 float4 sum = convert_float4(rsGetElementAt_uchar4(gIn, x1, y1)) * gCoeffs[0];
33 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y1)) * gCoeffs[1];
34 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y1)) * gCoeffs[2];
35 sum += convert_float4(rsGetElementAt_uchar4(gIn, x1, y)) * gCoeffs[3];
36 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y)) * gCoeffs[4];
37 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y)) * gCoeffs[5];
38 sum += convert_float4(rsGetElementAt_uchar4(gIn, x1, y2)) * gCoeffs[6];
39 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y2)) * gCoeffs[7];
40 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y2)) * gCoeffs[8];
42 sum = clamp(sum, 0.f, 255.f);
[all …]
/frameworks/rs/java/tests/ImageProcessing/src/com/android/rs/image/
Dconvolve3x3.rs32 float4 sum = convert_float4(rsGetElementAt_uchar4(gIn, x1, y1)) * gCoeffs[0];
33 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y1)) * gCoeffs[1];
34 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y1)) * gCoeffs[2];
35 sum += convert_float4(rsGetElementAt_uchar4(gIn, x1, y)) * gCoeffs[3];
36 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y)) * gCoeffs[4];
37 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y)) * gCoeffs[5];
38 sum += convert_float4(rsGetElementAt_uchar4(gIn, x1, y2)) * gCoeffs[6];
39 sum += convert_float4(rsGetElementAt_uchar4(gIn, x, y2)) * gCoeffs[7];
40 sum += convert_float4(rsGetElementAt_uchar4(gIn, x2, y2)) * gCoeffs[8];
42 sum = clamp(sum, 0.f, 255.f);
[all …]
/frameworks/rs/java/tests/RsCameraDemo/src/com/android/example/rscamera/
Dfocus_peak.rs31 int sum = 0;
35 sum += tmp * tmp;
37 sum += tmp * tmp;
39 sum += tmp * tmp;
44 sum += tmp * tmp;
46 sum += tmp * tmp;
48 sum += tmp * tmp;
50 sum >>= 9;
51 sum *= sum * sum;
59 mergedPixel.b * 1436 / 1024 - 179 + sum;
[all …]
/frameworks/rs/java/tests/VrDemo/src/com/example/android/rs/vr/engine/
DMatrix.java99 double sum = 0; in mult4() local
101 sum += m[col + j] * src[j]; in mult4()
103 dest[i] = (float) sum; in mult4()
110 double sum = m[col + 3]; in mult3() local
112 sum += m[col + j] * src[j]; in mult3()
114 dest[i] = (float) sum; in mult3()
121 double sum = 0; in mult3v() local
123 sum += m[col + j] * src[j]; in mult3v()
125 dest[i] = (float) sum; in mult3v()
132 double sum = 0; in mult4() local
[all …]
/frameworks/av/media/libstagefright/codecs/amrnb/common/src/
Dadd.cpp181 Word32 sum; in add() local
182 sum = (Word32) var1 + var2; in add()
188 if (sum > 0X00007fffL) in add()
191 sum = MAX_16; in add()
193 else if (sum < (Word32) 0xffff8000L) in add()
196 sum = MIN_16; in add()
201 return ((Word16) sum); in add()
/frameworks/av/media/libstagefright/codecs/m4v_h263/dec/src/
Dadaptive_smooth_no_mmx.cpp236 int sum; in AdaptiveSmooth_NoMMX() local
322 sum = (*(sum_V_ptr - 2) + (*(sum_V_ptr - 1) << 1) + in AdaptiveSmooth_NoMMX()
329 if ((int)(*Rec_Y_ptr - sum) > max_diff) in AdaptiveSmooth_NoMMX()
331 sum = *Rec_Y_ptr - max_diff; in AdaptiveSmooth_NoMMX()
336 else if ((int)(*Rec_Y_ptr - sum) < -max_diff) in AdaptiveSmooth_NoMMX()
338 sum = *Rec_Y_ptr + max_diff; in AdaptiveSmooth_NoMMX()
340 *Rec_Y_ptr++ = sum; /* assign value of sum to pelc1 in AdaptiveSmooth_NoMMX()
396 sum = (*(sum_V_ptr - 2) + (*(sum_V_ptr - 1) << 1) + in AdaptiveSmooth_NoMMX()
400 if ((int)(*Rec_Y_ptr - sum) > max_diff) in AdaptiveSmooth_NoMMX()
402 sum = *Rec_Y_ptr - max_diff; in AdaptiveSmooth_NoMMX()
[all …]
Dderinging_chroma.cpp42 int sum, sum1, incr; in Deringing_Chroma() local
100 sum = (*(ptr2 - 2) + (*(ptr2 - 1) << 1) + *ptr2 + 8) >> 4; in Deringing_Chroma()
103 if (PV_ABS(*ptr - sum) > max_diff) in Deringing_Chroma()
105 if (sum > *ptr) in Deringing_Chroma()
106 sum = *ptr + max_diff; in Deringing_Chroma()
108 sum = *ptr - max_diff; in Deringing_Chroma()
110 *ptr++ = (uint8) sum; in Deringing_Chroma()
166 sum = (*(ptr2 - 2) + (*(ptr2 - 1) << 1) + *ptr2 + 8) >> 4; in Deringing_Chroma()
169 if (PV_ABS(*ptr - sum) > max_diff) in Deringing_Chroma()
171 if (sum > *ptr) in Deringing_Chroma()
[all …]
Dchvr_filter.cpp42 int sum, delta; in CombinedHorzVertRingFilter() local
138 sum = v[0] in CombinedHorzVertRingFilter()
146 … delta = (sum + *ptr_c + 4) >> 3; /* Average pixel values with rounding */ in CombinedHorzVertRingFilter()
156 sum = sum - v[counter] + *ptr_n; in CombinedHorzVertRingFilter()
158 delta = (sum + *ptr_c + 4) >> 3; in CombinedHorzVertRingFilter()
298 sum = v[0] in CombinedHorzVertRingFilter()
306 delta = (sum + *ptr_c + 4) >> 3; in CombinedHorzVertRingFilter()
314 sum = sum - v[counter] + *ptr_n; in CombinedHorzVertRingFilter()
316 delta = (sum + *ptr_c + 4) >> 3; in CombinedHorzVertRingFilter()
Dvlc_dequant.cpp75 int sum; in VlcDequantMpegIntraBlock() local
102 sum = 0; in VlcDequantMpegIntraBlock()
157 sum ^= temp; in VlcDequantMpegIntraBlock()
198 sum ^= temp; /* 7/5/01 */ in VlcDequantMpegIntraBlock()
214 sum ^= temp; /* 7/5/01 */ in VlcDequantMpegIntraBlock()
247 sum ^= temp; in VlcDequantMpegIntraBlock()
264 sum ^= temp; in VlcDequantMpegIntraBlock()
303 sum ^= temp; /* 7/5/01 */ in VlcDequantMpegIntraBlock()
319 sum ^= temp; in VlcDequantMpegIntraBlock()
336 sum ^= temp; in VlcDequantMpegIntraBlock()
[all …]
/frameworks/av/media/libstagefright/codecs/on2/h264dec/omxdl/arm11/vc/m4p10/src/
DomxVCM4P10_PredictIntra_16x16_s.s64 sum RN 6 label
242 UXTH sum, tVal2 ;// Extract the lower half for result
262 ADD sum, tVal7, tVal6 ;// sum = tVal8 + tVal10
272 ADD sum, sum, tVal7 ;// sum = sum + tVal7
282 ADD sum, sum, tVal7 ;// sum = sum + tVal7
286 ADD sum, sum, tVal7 ;// sum = sum + tVal7
290 MOVEQ sum, #128 ;// sum = 128 if(count == 0)
293 ADDEQ sum, sum, #8 ;// sum += 8 if(count == 1)
294 ADDNE sum, sum, tVal2 ;// sum = sumleft + sumupper
295 ADDNE sum, sum, #16 ;// sum += 16 if(count == 2)
[all …]
/frameworks/rs/java/tests/RsTest/src/com/android/rs/test/
Dforeach_multi.rs142 uint32_t sum = rsGetElementAt_uint(ain0, i) +
145 _RS_ASSERT(result->i0 == sum);
146 _RS_ASSERT(result->i1 == sum);
147 _RS_ASSERT(result->i2 == sum);
148 _RS_ASSERT(result->i3 == sum);
149 _RS_ASSERT(result->i4 == sum);
150 _RS_ASSERT(result->i5 == sum);
151 _RS_ASSERT(result->i6 == sum);
152 _RS_ASSERT(result->i7 == sum);
/frameworks/rs/cpu_ref/
DrsCpuIntrinsicColorMatrix.cpp819 float4 sum; in One() local
820 sum.x = f.x * coeff[0] + in One()
824 sum.y = f.x * coeff[1] + in One()
828 sum.z = f.x * coeff[2] + in One()
832 sum.w = f.x * coeff[3] + in One()
838 sum.x += add[0]; in One()
839 sum.y += add[1]; in One()
840 sum.z += add[2]; in One()
841 sum.w += add[3]; in One()
849 ((float4 *)out)[0] = sum; in One()
[all …]
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/jni/
Dstats_scorer.cpp29 float sum = 0.0; in Java_androidx_media_filterpacks_numeric_StatsFilter_score() local
34 sum += val; in Java_androidx_media_filterpacks_numeric_StatsFilter_score()
38 result[0] = sum / numPixels; // mean in Java_androidx_media_filterpacks_numeric_StatsFilter_score()
53 float sum = 0.0; in Java_androidx_media_filterpacks_numeric_StatsFilter_regionscore() local
60 sum += val; in Java_androidx_media_filterpacks_numeric_StatsFilter_regionscore()
65 result[0] = sum / numPixels; // mean in Java_androidx_media_filterpacks_numeric_StatsFilter_regionscore()
Dcontrast.cpp44 float sum = 0; in Java_androidx_media_filterfw_samples_simplecamera_ContrastRatioFilter_contrastOperator() local
47 sum += (lumArray[i] - avg) * (lumArray[i] - avg); in Java_androidx_media_filterfw_samples_simplecamera_ContrastRatioFilter_contrastOperator()
50 return ((float) sqrt(sum / numPixels)); in Java_androidx_media_filterfw_samples_simplecamera_ContrastRatioFilter_contrastOperator()
/frameworks/av/media/libstagefright/foundation/
DAAtomizer.cpp58 uint32_t sum = 0; in Hash() local
60 sum = (sum * 31) + *s; in Hash()
64 return sum; in Hash()
/frameworks/support/v17/tests/src/android/support/v17/leanback/widget/
DPagingIndicatorTest.java53 int sum = selectedX[0] + selectedX[pageCount - 1]; in assertSymmetry() local
55 assertEquals("Selected dots are not symmetric", sum, in assertSymmetry()
60 sum = leftX[0] + rightX[pageCount - 1]; in assertSymmetry()
62 assertEquals("Deselected dots are not symmetric", sum, in assertSymmetry()
/frameworks/av/media/libstagefright/codecs/on2/h264dec/omxdl/reference/vc/m4p2/src/
DomxVCM4P2_DCT8x8blk.c81 OMX_F64 sum = 0.0; in omxVCM4P2_DCT8x8blk() local
86 sum += pSrc[(x * 8) + y] * in omxVCM4P2_DCT8x8blk()
91 pDst[(u * 8) + v]= armRoundFloatToS16 (sum); in omxVCM4P2_DCT8x8blk()
DomxVCM4P2_IDCT8x8blk.c82 OMX_F64 sum = 0.0; in omxVCM4P2_IDCT8x8blk() local
87 sum += pSrc[(u * 8) + v] * in omxVCM4P2_IDCT8x8blk()
92 pDst[(x * 8) + y] = (OMX_S16) floor(sum + 0.5); in omxVCM4P2_IDCT8x8blk()
/frameworks/opt/net/voip/src/jni/rtp/
DEchoSuppressor.cpp104 uint32_t sum = 0; in run() local
108 sum += ((mLastX >= 0) ? mLastX : -mLastX) >> 15; in run()
111 mXs[i] = sum >> mShift; in run()
130 uint32_t sum = 0; in run() local
134 sum += ((mLastY >= 0) ? mLastY : -mLastY) >> 15; in run()
137 ys[i] = sum >> mShift; in run()
/frameworks/base/core/java/android/gesture/
DGestureUtils.java232 float sum = topLeft + topRight + btmLeft + btmRight; in plot()
234 float value = topLeft / sum; in plot()
240 value = topRight / sum; in plot()
246 value = btmLeft / sum; in plot()
252 value = btmRight / sum; in plot()
377 float sum = 0; in computeTotalLength() local
382 sum += Math.hypot(dx, dy); in computeTotalLength()
384 return sum; in computeTotalLength()
425 float sum = 0; in cosineDistance() local
428 sum += vector1[i] * vector2[i]; in cosineDistance()
[all …]
/frameworks/base/core/java/com/android/internal/content/
DNativeLibraryHelper.java158 long sum = 0; in sumNativeBinaries() local
160 sum += nativeSumNativeBinaries(apkHandle, abi); in sumNativeBinaries()
162 return sum; in sumNativeBinaries()
388 long sum = 0; in sumNativeBinariesWithOverride() local
398 sum += sumNativeBinariesForSupportedAbi(handle, Build.SUPPORTED_32_BIT_ABIS); in sumNativeBinariesWithOverride()
402 sum += sumNativeBinariesForSupportedAbi(handle, Build.SUPPORTED_64_BIT_ABIS); in sumNativeBinariesWithOverride()
419 sum += sumNativeBinariesForSupportedAbi(handle, abiList); in sumNativeBinariesWithOverride()
421 return sum; in sumNativeBinariesWithOverride()

1234