Home
last modified time | relevance | path

Searched refs:pixel (Results 1 – 25 of 37) sorted by relevance

12

/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
DImageCompare.java30 private static double luma(int pixel) { in luma() argument
31 final int R = Color.red(pixel); in luma()
32 final int G = Color.green(pixel); in luma()
33 final int B = Color.blue(pixel); in luma()
Dlayered_filter_fast_f32.rscript20 // @param in an input RGBD pixel with @in.a being quantized inverse depth.
138 const int index = y * g_image_size.width + x; // index of this pixel
141 // Marks this pixel as active.
146 // Next, tries to figure out whether or not this pixel is on the boundary
180 // Moves sharp_nbr to the top left corner of this pixel.
183 // Visits every pixel in the window of radius (center_x,center_y)
184 // surrounding this pixel.
192 // needed for the pixel. Otherwise, the distance transform will be
214 // This pixel is not active but within the dilation radius of the active
238 // This pixel is not active but within the dilation radius of the active
[all …]
Dpixel_format_f32.rsh4 // FocusPixel is the pixel format in the input image, which serves the
11 // whether or not a pixel is on the current target layer. For pixels that are
12 // active or not active but "close enough" to an active pixel, a matte value is
33 // active = 1: the pixel is on the target layer;
Dlayered_filter_fast_d1new.rscript20 // @param in an input RGBD pixel with @in.a being quantized inverse depth.
125 // Marks this pixel as active.
132 // Next, tries to figure out whether or not this pixel is on the boundary
162 // Moves sharp_nbr to the top left corner of this pixel.
170 // needed for the pixel. Otherwise, the distance transform will be
187 // Marks this pixel as active.
191 // Next, tries to figure out whether or not this pixel is on the boundary
222 // Moves sharp_nbr to the top left corner of this pixel.
230 // needed for the pixel. Otherwise, the distance transform will be
254 // This pixel is not active but within the dilation radius of the active
[all …]
Dlayered_filter_f32_helper.rsh12 // @param x x-coordinate of a pixel in a padded image.
13 // @param y y-coordinate of a pixel in a padded image.
16 // active pixel to (x,y). Sets the closest distance to sharp->matte and sets the
17 // depth of the closest pixel to sharp->dilated_depth.
29 // Initializes the minimum distance from this pixel to the active pixels on
44 // Whether or not this is an active pixel with a smaller distance.
79 // Locates the top left corner of the window surrounding this pixel.
127 // Locates the top left corner of the window surrounding this pixel.
164 // Locates the top left corner of the window surrounding this pixel.
Dlayered_filter_d1new_helper.rsh29 // @param x x-coordinate of a pixel in a padded image.
30 // @param y y-coordinate of a pixel in a padded image.
33 // active pixel to (x,y). Sets the closest distance to sharp->matte and sets the
34 // depth of the closest pixel to sharp->dilated_depth.
48 // Initializes the minimum distance from this pixel to the active pixels on
64 // Whether or not this is an active pixel with a smaller distance.
89 // Initializes the minimum distance from this pixel to the active pixels on
105 // Whether or not this is an active pixel with a smaller distance.
139 // Locates the top left corner of the window surrounding this pixel.
190 // Locates the top left corner index of the window surrounding this pixel.
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DComposeShaderTest.java67 int pixel = bitmap.getPixel(x, y); in testPorterDuff() local
69 assertEquals(0xFF, Color.alpha(pixel), TOLERANCE); in testPorterDuff()
70 assertEquals(y, Color.red(pixel), TOLERANCE); in testPorterDuff()
71 assertEquals(green, Color.green(pixel), TOLERANCE); in testPorterDuff()
72 assertEquals(x, Color.blue(pixel), TOLERANCE); in testPorterDuff()
100 int pixel = bitmap.getPixel(x, y); in testBlendMode() local
102 assertEquals(0xFF, Color.alpha(pixel), TOLERANCE); in testBlendMode()
103 assertEquals(y, Color.red(pixel), TOLERANCE); in testBlendMode()
104 assertEquals(green, Color.green(pixel), TOLERANCE); in testBlendMode()
105 assertEquals(x, Color.blue(pixel), TOLERANCE); in testBlendMode()
DDiscretePathEffectTest.java90 int pixel = bitmap.getPixel(x, y); in testDiscretePathEffect() local
91 if (Color.green(pixel) > 0) { in testDiscretePathEffect()
95 assertEquals(0xFF, Color.blue(pixel)); in testDiscretePathEffect()
96 if (Color.red(pixel) > 0) { in testDiscretePathEffect()
DEmbossMaskFilterTest.java95 int pixel = b.getPixel(x, y); in brightness() local
96 color += Color.red(pixel) + Color.green(pixel) + Color.blue(pixel); in brightness()
DVulkanPreTransformTest.java155 private static int pixelDiff(int pixel, int expectedR, int expectedG, int expectedB) { in pixelDiff() argument
156 int actualR = Color.red(pixel); in pixelDiff()
157 int actualG = Color.green(pixel); in pixelDiff()
158 int actualB = Color.blue(pixel); in pixelDiff()
DCornerPathEffectTest.java91 int pixel = bitmap.getPixel(x, y); in testCornerPathEffect() local
92 if (Color.green(pixel) > 0) { in testCornerPathEffect()
95 assertEquals(Color.YELLOW, pixel); in testCornerPathEffect()
DSweepGradientTest.java138 int pixel = mBitmap.getPixel(x, y); in verifyColors() local
141 assertEquals(Color.alpha(color), Color.alpha(pixel), tolerance); in verifyColors()
142 assertEquals(Color.red(color), Color.red(pixel), tolerance); in verifyColors()
143 assertEquals(Color.green(color), Color.green(pixel), tolerance); in verifyColors()
144 assertEquals(Color.blue(color), Color.blue(pixel), tolerance); in verifyColors()
147 + "pixel=" + Integer.toHexString(pixel) + ", color=" in verifyColors()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/offscreen/
DProjectionOffscreenActivity.java272 int pixel = 0; in scanImage() local
273 pixel |= (buffer.get(offset) & 0xff) << 16; // R in scanImage()
274 pixel |= (buffer.get(offset + 1) & 0xff) << 8; // G in scanImage()
275 pixel |= (buffer.get(offset + 2) & 0xff); // B in scanImage()
276 pixel |= (buffer.get(offset + 3) & 0xff) << 24; // A in scanImage()
277 if (pixel == Color.BLACK || pixel == 0) { in scanImage()
279 } else if (pixel == Color.BLUE) { in scanImage()
284 Log.d(TAG, "- Found unexpected color: " + Integer.toHexString(pixel)); in scanImage()
/cts/hostsidetests/securitybulletin/test-apps/CVE-2021-0523/src/android/security/cts/CVE_2021_0523/
DPocService.java107 int pixel = bitmap.getPixel(getScreenWidth() / 2, getScreenHeight() / 2); in onTouch() local
108 int red = Color.red(pixel); in onTouch()
109 int green = Color.green(pixel); in onTouch()
110 int blue = Color.blue(pixel); in onTouch()
/cts/tests/tests/opengl/src/android/opengl/cts/
DRendererOneColorBufferTest.java214 int pixel = pin[0]; in doOnDrawFrame() local
215 float a = (pixel >> 24) & 0xFF; in doOnDrawFrame()
216 float b = (pixel >> 16) & 0xFF; in doOnDrawFrame()
217 float g = (pixel >> 8) & 0xFF; in doOnDrawFrame()
218 float r = pixel & 0xFF; in doOnDrawFrame()
/cts/tests/tests/openglperf/src/android/openglperf/cts/
DTextureTestRenderer.java121 IntBuffer pixel = ByteBuffer.allocateDirect(4).asIntBuffer(); in onDrawFrame() local
123 GL10.GL_UNSIGNED_BYTE, pixel); in onDrawFrame()
124 pixel.position(0); in onDrawFrame()
125 Log.i(TAG, "pixel read " + Integer.toHexString(pixel.get(0))); in onDrawFrame()
127 Assert.assertEquals(0x0000ffff, pixel.get(0)); // BLUE in RGBA in onDrawFrame()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/
DMSSIMComparer.java169 private double getIntensity(int pixel) { in getIntensity() argument
172 l += (0.21f * Math.pow(Color.red(pixel) / 255f, gamma)); in getIntensity()
173 l += (0.72f * Math.pow(Color.green(pixel) / 255f, gamma)); in getIntensity()
174 l += (0.07f * Math.pow(Color.blue(pixel) / 255f, gamma)); in getIntensity()
/cts/tests/tests/display/src/android/display/cts/
DVirtualDisplayTest.java513 int pixel = 0; in scanImage() local
514 pixel |= (buffer.get(offset) & 0xff) << 16; // R in scanImage()
515 pixel |= (buffer.get(offset + 1) & 0xff) << 8; // G in scanImage()
516 pixel |= (buffer.get(offset + 2) & 0xff); // B in scanImage()
517 pixel |= (buffer.get(offset + 3) & 0xff) << 24; // A in scanImage()
518 if (pixel == Color.BLACK || pixel == 0) { in scanImage()
520 } else if (pixel == BLUEISH) { in scanImage()
522 } else if (pixel == GREENISH) { in scanImage()
527 Log.d(TAG, "- Found unexpected color: " + Integer.toHexString(pixel)); in scanImage()
/cts/tests/tests/nativehardware/jni/
DAHardwareBufferGLTest.cpp458 void CheckGoldenPixel(const GoldenPixel& golden, const std::array<uint8_t, 4>& pixel, in CheckGoldenPixel() argument
463 CheckGoldenPixel(golden.x, golden.y, golden_pixel, golden_max, pixel); in CheckGoldenPixel()
465 CheckGoldenPixel(golden.x, golden.y, golden_pixel, pixel); in CheckGoldenPixel()
470 void CheckGoldenPixel(const GoldenPixel& golden, const std::array<uint8_t, 4>& pixel, in CheckGoldenPixel() argument
472 CheckGoldenPixel(golden, pixel, format, 0); in CheckGoldenPixel()
476 void CheckGoldenPixel(const GoldenPixel& golden, const std::array<float, 4>& pixel) { in CheckGoldenPixel() argument
479 CheckGoldenPixel(golden.x, golden.y, golden_pixel, pixel); in CheckGoldenPixel()
503 std::array<float, 4> pixel = {0.5f, 0.5f, 0.5f, 0.5f}; in CheckGoldenPixels() local
504 glReadPixels(golden.x, golden.y, 1, 1, GL_RGBA, GL_FLOAT, pixel.data()); in CheckGoldenPixels()
506 CheckGoldenPixel(golden, pixel); in CheckGoldenPixels()
[all …]
/cts/tests/camera/src/android/hardware/camera2/cts/rs/
Draw_converter.rscript44 // Interpolate gain map to find per-channel gains at a given pixel
72 // Apply gamma correction to each color channel in RGB pixel
81 // Apply polynomial tonemapping curve to each color channel in RGB pixel.
82 // This attempts to apply tonemapping without changing the hue of each pixel,
93 // the RGB and RGB' value at this pixel before and after this tonemapping
208 // Blacklevel subtract, and normalize each pixel in the outputArray, and apply the
365 float pixel = *((ushort *) rsGetElementAt(inputRawBuffer, x, y));
374 pixel = clamp(g * (pixel - bl) / (whiteLevel - bl), 0.f, 1.f);
377 pRGB.x = pRGB.y = pRGB.z = pixel;
384 … // TODO: Once ScriptGroup and RS kernels have been updated to allow for iteration over 3x3 pixel
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DSplashscreenTests.java297 final int pixel = img.getPixel(x, y); in generateFailureImage() local
299 markDebugPixel(pixel, result, x, y, ignoredDebugColor, 0.95f); in generateFailureImage()
302 if (isSimilarColor(primaryColor, pixel)) { in generateFailureImage()
303 markDebugPixel(pixel, result, x, y, validDebugColor, 0.8f); in generateFailureImage()
304 } else if (isSimilarColor(secondaryColor, pixel)) { in generateFailureImage()
305 markDebugPixel(pixel, result, x, y, validDebugColor, 0.8f); in generateFailureImage()
307 markDebugPixel(pixel, result, x, y, Color.TRANSPARENT, 0.0f); in generateFailureImage()
324 private void markDebugPixel(int pixel, Bitmap result, int x, int y, int color, float ratio) { in markDebugPixel() argument
325 int debugPixel = ColorUtils.blendARGB(pixel, color, ratio); in markDebugPixel()
326 result.setPixel(x, y, pixel); in markDebugPixel()
/cts/tests/tests/assist/service/src/android/assist/service/
DMainInteractionSession.java219 for (int pixel : pixels) { in compareScreenshot()
222 if ((Color.red(pixel) - Color.red(color) < 5) in compareScreenshot()
223 && (Color.green(pixel) - Color.green(color) < 5) in compareScreenshot()
224 && (Color.blue(pixel) - Color.blue(color) < 5)) { in compareScreenshot()
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/
DAccessibilityTakeScreenshotTest.java247 for (int pixel : pixels) { in doesBitmapDisplaySecureContent()
248 if ((Color.red(pixel) == Color.red(color)) in doesBitmapDisplaySecureContent()
249 && (Color.green(pixel) == Color.green(color)) in doesBitmapDisplaySecureContent()
250 && (Color.blue(pixel) == Color.blue(color))) { in doesBitmapDisplaySecureContent()
/cts/tests/tests/transition/src/android/transition/cts/
DFadeTest.java301 private static double getIntensity(int pixel) { in getIntensity() argument
304 l += (0.21f * Math.pow(Color.red(pixel) / 255f, gamma)); in getIntensity()
305 l += (0.72f * Math.pow(Color.green(pixel) / 255f, gamma)); in getIntensity()
306 l += (0.07f * Math.pow(Color.blue(pixel) / 255f, gamma)); in getIntensity()
/cts/tests/tests/view/src/android/view/cts/
DTextureViewTest.java562 int pixel = screenshot.getPixel(point.x, point.y); in getPixel() local
564 return pixel; in getPixel()
570 int pixel = getPixel(window, point); in waitForColor() local
571 if (pixel == color) { in waitForColor()
582 int pixel = getPixel(window, point); in waitForChange() local
583 if (pixel != color) { in waitForChange()
584 return pixel; in waitForChange()

12