/frameworks/rs/tests/java_api/CannyLive/src/com/android/example/cannylive/ |
D | canny.rs | 270 int dir = (int)(4 * native_atan2pi((float)sum_v, (float)sum_h) + 8.5f); 368 float2 cs[] = {{1.0f,0.0f}, 369 … {0.9999619f,0.008726535f},{0.9998477f,0.017452406f},{0.99965733f,0.026176948f}, 370 … {0.99939084f,0.034899496f},{0.99904823f,0.043619387f},{0.9986295f,0.052335955f}, 371 … {0.9981348f,0.06104854f},{0.9975641f,0.06975647f},{0.9969173f,0.0784591f}, 372 … {0.9961947f,0.087155744f},{0.9953962f,0.09584575f},{0.9945219f,0.104528464f}, 373 … {0.9935719f,0.11320321f},{0.99254614f,0.12186934f},{0.9914449f,0.13052619f}, 374 … {0.99026805f,0.1391731f},{0.9890159f,0.14780942f},{0.98768836f,0.15643446f}, 375 … {0.9862856f,0.1650476f},{0.9848077f,0.17364818f},{0.9832549f,0.18223552f}, 376 … {0.98162717f,0.190809f},{0.9799247f,0.19936794f},{0.9781476f,0.20791169f}, [all …]
|
/frameworks/rs/ |
D | rsg_generator.c | 24 void printFileHeader(FILE *f) { in printFileHeader() argument 25 fprintf(f, "/*\n"); in printFileHeader() 26 fprintf(f, " * Copyright (C) 2015 The Android Open Source Project\n"); in printFileHeader() 27 fprintf(f, " *\n"); in printFileHeader() 28 fprintf(f, " * Licensed under the Apache License, Version 2.0 (the \"License\");\n"); in printFileHeader() 29 fprintf(f, " * you may not use this file except in compliance with the License.\n"); in printFileHeader() 30 fprintf(f, " * You may obtain a copy of the License at\n"); in printFileHeader() 31 fprintf(f, " *\n"); in printFileHeader() 32 fprintf(f, " * http://www.apache.org/licenses/LICENSE-2.0\n"); in printFileHeader() 33 fprintf(f, " *\n"); in printFileHeader() [all …]
|
/frameworks/rs/tests/java_api/ImageProcessing/src/com/android/rs/image/ |
D | Convolve5x5.java | 47 float f[] = new float[25]; in createTest() local 60 f[0] = -1.f; f[1] = -3.f; f[2] = -4.f; f[3] = -3.f; f[4] = -1.f; in createTest() 61 f[5] = -3.f; f[6] = 0.f; f[7] = 6.f; f[8] = 0.f; f[9] = -3.f; in createTest() 62 f[10]= -4.f; f[11]= 6.f; f[12]= 20.f; f[13]= 6.f; f[14]= -4.f; in createTest() 63 f[15]= -3.f; f[16]= 0.f; f[17]= 6.f; f[18]= 0.f; f[19]= -3.f; in createTest() 64 f[20]= -1.f; f[21]= -3.f; f[22]= -4.f; f[23]= -3.f; f[24]= -1.f; in createTest() 68 mIntrinsic.setCoefficients(f); in createTest() 72 mScript.set_gCoeffs(f); in createTest()
|
/frameworks/rs/tests/java_api/RSTest_CompatLibLegacy/src/com/android/rs/test/ |
D | clamp.rs | 6 float2 src2 = { 2.0f, 2.0f}; 7 float2 min2 = { 0.5f, -3.0f}; 8 float2 max2 = { 1.0f, 9.0f}; 11 _RS_ASSERT(res2.x == 1.0f); 12 _RS_ASSERT(res2.y == 2.0f); 15 float3 src3 = { 2.0f, 2.0f, 1.0f}; 16 float3 min3 = { 0.5f, -3.0f, 3.0f}; 17 float3 max3 = { 1.0f, 9.0f, 4.0f}; 20 _RS_ASSERT(res3.x == 1.0f); 21 _RS_ASSERT(res3.y == 2.0f); [all …]
|
D | fp_mad.rs | 14 data_f4[i] = (data_f4[i] * 0.02f + 15 data_f4[i+1] * 0.04f + 16 data_f4[i+2] * 0.05f + 17 data_f4[i+3] * 0.1f + 18 data_f4[i+4] * 0.2f + 19 data_f4[i+5] * 0.2f + 20 data_f4[i+6] * 0.1f + 21 data_f4[i+7] * 0.05f + 22 data_f4[i+8] * 0.04f + 23 data_f4[i+9] * 0.02f + 1.f); [all …]
|
D | apitest.rs | 64 volatile float f; 328 f = rsGetElementAt_float(aFloat, 0); 329 rsSetElementAt_float(aFloat, f, 0); 330 f = rsGetElementAt_float(aFloat, 0, 0); 331 rsSetElementAt_float(aFloat, f, 0, 0); 332 f = rsGetElementAt_float(aFloat, 0, 0, 0); 333 rsSetElementAt_float(aFloat, f, 0, 0, 0); 395 f4 += rsSample(allocDst, samplerNonNull, f); 396 f4 += rsSample(allocDst, samplerNonNull, f, f); 398 f4 += rsSample(allocDst, samplerNonNull, f2, f); [all …]
|
/frameworks/rs/tests/java_api/RsTest/src/com/android/rs/test/ |
D | clamp.rs | 6 float2 src2 = { 2.0f, 2.0f}; 7 float2 min2 = { 0.5f, -3.0f}; 8 float2 max2 = { 1.0f, 9.0f}; 11 _RS_ASSERT(res2.x == 1.0f); 12 _RS_ASSERT(res2.y == 2.0f); 15 float3 src3 = { 2.0f, 2.0f, 1.0f}; 16 float3 min3 = { 0.5f, -3.0f, 3.0f}; 17 float3 max3 = { 1.0f, 9.0f, 4.0f}; 20 _RS_ASSERT(res3.x == 1.0f); 21 _RS_ASSERT(res3.y == 2.0f); [all …]
|
D | fp_mad.rs | 14 data_f4[i] = (data_f4[i] * 0.02f + 15 data_f4[i+1] * 0.04f + 16 data_f4[i+2] * 0.05f + 17 data_f4[i+3] * 0.1f + 18 data_f4[i+4] * 0.2f + 19 data_f4[i+5] * 0.2f + 20 data_f4[i+6] * 0.1f + 21 data_f4[i+7] * 0.05f + 22 data_f4[i+8] * 0.04f + 23 data_f4[i+9] * 0.02f + 1.f); [all …]
|
/frameworks/rs/tests/java_api/RSTest_CompatLib/src/com/android/rs/test/ |
D | clamp.rs | 6 float2 src2 = { 2.0f, 2.0f}; 7 float2 min2 = { 0.5f, -3.0f}; 8 float2 max2 = { 1.0f, 9.0f}; 11 _RS_ASSERT(res2.x == 1.0f); 12 _RS_ASSERT(res2.y == 2.0f); 15 float3 src3 = { 2.0f, 2.0f, 1.0f}; 16 float3 min3 = { 0.5f, -3.0f, 3.0f}; 17 float3 max3 = { 1.0f, 9.0f, 4.0f}; 20 _RS_ASSERT(res3.x == 1.0f); 21 _RS_ASSERT(res3.y == 2.0f); [all …]
|
D | fp_mad.rs | 14 data_f4[i] = (data_f4[i] * 0.02f + 15 data_f4[i+1] * 0.04f + 16 data_f4[i+2] * 0.05f + 17 data_f4[i+3] * 0.1f + 18 data_f4[i+4] * 0.2f + 19 data_f4[i+5] * 0.2f + 20 data_f4[i+6] * 0.1f + 21 data_f4[i+7] * 0.05f + 22 data_f4[i+8] * 0.04f + 23 data_f4[i+9] * 0.02f + 1.f); [all …]
|
D | apitest.rs | 64 volatile float f; 330 f = rsGetElementAt_float(aFloat, 0); 331 rsSetElementAt_float(aFloat, f, 0); 332 f = rsGetElementAt_float(aFloat, 0, 0); 333 rsSetElementAt_float(aFloat, f, 0, 0); 334 f = rsGetElementAt_float(aFloat, 0, 0, 0); 335 rsSetElementAt_float(aFloat, f, 0, 0, 0); 397 f4 += rsSample(allocDst, samplerNonNull, f); 398 f4 += rsSample(allocDst, samplerNonNull, f, f); 400 f4 += rsSample(allocDst, samplerNonNull, f2, f); [all …]
|
/frameworks/rs/tests/java_api/VrDemo/src/com/example/android/rs/vr/engine/ |
D | bugdroid.rs | 25 static float sigmoid(float f) { 26 return (float) (1 / (1 + exp(f / 2))); 116 float3 p1 = { size * 0.5f, size * 0.5f, size * 0.3f }; 117 float3 p2 = { size * 0.5f, size * 0.5f, size * 0.65f }; 118 float radius = size * 0.22f; 120 p2.z = size * 0.4f; 122 float3 normal = { 0.0f, 0.0f, 1.0f }; 123 v -= circle(p1, radius*0.9f, normal, size * 0.05f, 144, img); 125 float armOffset = 0.27f; 127 float3 p1 = { size * (0.5f - armOffset), size * 0.5f, size * 0.4f }; [all …]
|
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/ |
D | Convolve5x5.java | 37 return (v2 * p) + (v1 * (1.f-p)); in blend() 41 float f[] = new float[25]; in updateMatrix() local 42 final float f125 = 1.f / 25.f; in updateMatrix() 43 float cf1 = blend(f125, -1.f, str); in updateMatrix() 44 float cf2 = blend(f125, -3.f, str); in updateMatrix() 45 float cf3 = blend(f125, -4.f, str); in updateMatrix() 46 float cf4 = blend(f125, 6.f, str); in updateMatrix() 47 float cf5 = blend(f125, 20.f, str); in updateMatrix() 48 float cf6 = blend(f125, 0.f, str); in updateMatrix() 49 f[0] = cf1; f[1] = cf2; f[2] = cf3; f[3] = cf2; f[4] = cf1; in updateMatrix() [all …]
|
D | Convolve3x3.java | 37 return (v2 * p) + (v1 * (1.f-p)); in blend() 41 float f[] = new float[9]; in updateMatrix() local 42 float cf1 = blend(1.f / 9.f, 0.f, str); in updateMatrix() 43 float cf2 = blend(1.f / 9.f, -1.f, str); in updateMatrix() 44 float cf3 = blend(1.f / 9.f, 5.f, str); in updateMatrix() 45 f[0] = cf1; f[1] = cf2; f[2] = cf1; in updateMatrix() 46 f[3] = cf2; f[4] = cf3; f[5] = cf2; in updateMatrix() 47 f[6] = cf1; f[7] = cf2; f[8] = cf1; in updateMatrix() 48 return f; in updateMatrix() 55 float f[] = updateMatrix(1.f); in createTest() local [all …]
|
/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/ |
D | Convolve5x5.java | 44 return (v2 * p) + (v1 * (1.f-p)); in blend() 48 float f[] = new float[25]; in updateMatrix() local 49 final float f125 = 1.f / 25.f; in updateMatrix() 50 float cf1 = blend(f125, -1.f, str); in updateMatrix() 51 float cf2 = blend(f125, -3.f, str); in updateMatrix() 52 float cf3 = blend(f125, -4.f, str); in updateMatrix() 53 float cf4 = blend(f125, 6.f, str); in updateMatrix() 54 float cf5 = blend(f125, 20.f, str); in updateMatrix() 55 float cf6 = blend(f125, 0.f, str); in updateMatrix() 56 f[0] = cf1; f[1] = cf2; f[2] = cf3; f[3] = cf2; f[4] = cf1; in updateMatrix() [all …]
|
D | Convolve3x3.java | 44 return (v2 * p) + (v1 * (1.f-p)); in blend() 48 float f[] = new float[9]; in updateMatrix() local 49 float cf1 = blend(1.f / 9.f, 0.f, str); in updateMatrix() 50 float cf2 = blend(1.f / 9.f, -1.f, str); in updateMatrix() 51 float cf3 = blend(1.f / 9.f, 5.f, str); in updateMatrix() 52 f[0] = cf1; f[1] = cf2; f[2] = cf1; in updateMatrix() 53 f[3] = cf2; f[4] = cf3; f[5] = cf2; in updateMatrix() 54 f[6] = cf1; f[7] = cf2; f[8] = cf1; in updateMatrix() 55 return f; in updateMatrix() 62 float f[] = updateMatrix(1.f); in createTest() local [all …]
|
/frameworks/base/core/tests/benchmarks/src/android/util/ |
D | FloatMathBenchmark.java | 24 float f = 0.0f; in timeFloatMathCeil() local 26 f += FloatMath.ceil(100.123f); in timeFloatMathCeil() 28 return f; in timeFloatMathCeil() 33 float f = 0.0f; in timeFloatMathCeil_math() local 35 f += (float) Math.ceil(100.123f); in timeFloatMathCeil_math() 37 return f; in timeFloatMathCeil_math() 42 float f = 0.0f; in timeFloatMathCos() local 44 f += FloatMath.cos(100.123f); in timeFloatMathCos() 46 return f; in timeFloatMathCos() 51 float f = 0.0f; in timeFloatMathExp() local [all …]
|
/frameworks/rs/tests/java_api/RsTest_14/src/com/android/rs/test/ |
D | fp_mad.rs | 14 data_f4[i] = (data_f4[i] * 0.02f + 15 data_f4[i+1] * 0.04f + 16 data_f4[i+2] * 0.05f + 17 data_f4[i+3] * 0.1f + 18 data_f4[i+4] * 0.2f + 19 data_f4[i+5] * 0.2f + 20 data_f4[i+6] * 0.1f + 21 data_f4[i+7] * 0.05f + 22 data_f4[i+8] * 0.04f + 23 data_f4[i+9] * 0.02f + 1.f); [all …]
|
D | rslist.rs | 33 gDY = 0.0f; 40 rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f); 41 rsgClearDepth(1.0f); 46 rsgFontColor(0.9f, 0.9f, 0.9f, 1.0f); 88 rsgFontColor(0.5f, 0.9f, 0.5f, 1.0f); 91 rsgFontColor(0.9f, 0.5f, 0.5f, 1.0f); 94 rsgFontColor(0.9f, 0.9f, 0.5f, 1.0f); 97 rsgFontColor(0.9f, 0.9f, 0.9f, 1.0f);
|
/frameworks/rs/tests/java_api/RsTest_16/src/com/android/rs/test/ |
D | fp_mad.rs | 14 data_f4[i] = (data_f4[i] * 0.02f + 15 data_f4[i+1] * 0.04f + 16 data_f4[i+2] * 0.05f + 17 data_f4[i+3] * 0.1f + 18 data_f4[i+4] * 0.2f + 19 data_f4[i+5] * 0.2f + 20 data_f4[i+6] * 0.1f + 21 data_f4[i+7] * 0.05f + 22 data_f4[i+8] * 0.04f + 23 data_f4[i+9] * 0.02f + 1.f); [all …]
|
D | rslist.rs | 33 gDY = 0.0f; 40 rsgClearColor(0.0f, 0.0f, 0.0f, 0.0f); 41 rsgClearDepth(1.0f); 46 rsgFontColor(0.9f, 0.9f, 0.9f, 1.0f); 88 rsgFontColor(0.5f, 0.9f, 0.5f, 1.0f); 91 rsgFontColor(0.9f, 0.5f, 0.5f, 1.0f); 94 rsgFontColor(0.9f, 0.9f, 0.5f, 1.0f); 97 rsgFontColor(0.9f, 0.9f, 0.9f, 1.0f);
|
/frameworks/rs/tests/java_api/RsTest_11/src/com/android/rs/test/ |
D | fp_mad.rs | 14 data_f4[i] = (data_f4[i] * 0.02f + 15 data_f4[i+1] * 0.04f + 16 data_f4[i+2] * 0.05f + 17 data_f4[i+3] * 0.1f + 18 data_f4[i+4] * 0.2f + 19 data_f4[i+5] * 0.2f + 20 data_f4[i+6] * 0.1f + 21 data_f4[i+7] * 0.05f + 22 data_f4[i+8] * 0.04f + 23 data_f4[i+9] * 0.02f + 1.f); [all …]
|
/frameworks/rs/tests/java_api/Balls/src/com/example/android/rs/balls/ |
D | ball_physics.rs | 6 float2 gGravityVector = {0.f, 9.8f}; 8 float2 gMinPos = {0.f, 0.f}; 9 float2 gMaxPos = {1280.f, 700.f}; 13 static const float gDT = 1.f / 30.f; 19 float gScale = 1.f; 37 gridPos[0] = convert_int2((ball->position / 100.f) /*- 0.4999f*/); 63 if ((len2 < 10000.f) && (len2 > 0.001f)) { 64 float len = rsqrt(len2 + 4.f); 65 float f = (len * len * len) * 20000.f; 66 fv -= vec * f; [all …]
|
/frameworks/av/cmds/stagefright/filters/ |
D | nightvision.rs | 21 const static float3 gMonoMult = {0.299f, 0.587f, 0.114f}; 22 const static float3 gNightVisionMult = {0.5f, 1.f, 0.5f}; 29 float3 rgb = {v_in->y * 0.003921569f, v_in->z * 0.003921569f, 30 v_in->w * 0.003921569f}; 35 v_out->y = (uchar)clamp((result.r * 255.f + 0.5f), 0.f, 255.f); 36 v_out->z = (uchar)clamp((result.g * 255.f + 0.5f), 0.f, 255.f); 37 v_out->w = (uchar)clamp((result.b * 255.f + 0.5f), 0.f, 255.f);
|
/frameworks/rs/tests/java_api/LivePreview/src/com/android/rs/livepreview/ |
D | yuv.rs | 15 float4 ncolor = 0.f; 18 if (color.r < 0.5f) { 20 ncolor.r = 4.0f * v * v * v; 22 v = 1.0f - color.r; 23 ncolor.r = 1.0f - (4.0f * v * v * v); 26 if (color.g < 0.5f) { 28 ncolor.g = 2.0f * v * v; 30 v = 1.0f - color.g; 31 ncolor.g = 1.0f - (2.0f * v * v); 34 ncolor.b = color.b * 0.5f + 0.25f; [all …]
|