Home
last modified time | relevance | path

Searched refs:stride (Results 1 – 25 of 56) sorted by relevance

123

/cts/tests/tests/rscpp/src/android/cts/rscpp/
DRSUtils.java37 int stride, int skip) { in genRandom() argument
39 for (int i = 0; i < array.length / stride; i++) { in genRandom()
40 for (int j = 0; j < stride; j++) { in genRandom()
41 if (j >= stride - skip) in genRandom()
42 array[i * stride + j] = 0; in genRandom()
44 array[i * stride + j] = r.nextFloat() * factor + offset; in genRandom()
57 int stride, int skip) { in genRandom() argument
59 for (int i = 0; i < array.length / stride; i++) { in genRandom()
60 for (int j = 0; j < stride; j++) { in genRandom()
61 if (j >= stride - skip) in genRandom()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/
DMSSIMComparer.java55 public boolean verifySame(int[] ideal, int[] given, int offset, int stride, int width, in verifySame() argument
64 int start = indexFromXAndY(currentWindowX, currentWindowY, stride, offset); in verifySame()
65 if (isWindowWhite(ideal, start, stride, windowWidth, windowHeight) in verifySame()
66 && isWindowWhite(given, start, stride, windowWidth, windowHeight)) { in verifySame()
70 double[] means = getMeans(ideal, given, start, stride, windowWidth, windowHeight); in verifySame()
73 double[] variances = getVariances(ideal, given, meanX, meanY, start, stride, in verifySame()
94 private boolean isWindowWhite(int[] colors, int start, int stride, in isWindowWhite() argument
98 if (colors[indexFromXAndY(x, y, stride, start)] != Color.WHITE) { in isWindowWhite()
120 private double[] getMeans(int[] pixels0, int[] pixels1, int start, int stride, in getMeans() argument
126 int index = indexFromXAndY(x, y, stride, start); in getMeans()
[all …]
DBitmapComparer.java30 public abstract boolean verifySame(int[] ideal, int[] given, int offset, int stride, int width, in verifySame() argument
36 protected static int indexFromXAndY(int x, int y, int stride, int offset) { in indexFromXAndY() argument
37 return x + (y * stride) + offset; in indexFromXAndY()
DExactComparer.java29 public boolean verifySame(int[] ideal, int[] given, int offset, int stride, int width, in verifySame() argument
35 int index = indexFromXAndY(x, y, stride, offset); in verifySame()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DRegionVerifier.java42 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
48 isVerified &= verifySubRect(bitmap, offset, stride, width, height, in verify()
54 isVerified &= verifySubRect(bitmap, offset, stride, width, height, in verify()
62 private boolean verifySubRect(int[] bitmap, int offset, int stride, int width, int height, in verifySubRect() argument
64 final int newOffset = rect.top * stride + rect.left + offset; in verifySubRect()
65 return subVerifier.verify(bitmap, newOffset, stride, rect.width(), rect.height()); in verifySubRect()
DBitmapVerifier.java41 public abstract boolean verify(int[] bitmap, int offset, int stride, int width, int height); in verify() argument
46 protected static int indexFromXAndY(int x, int y, int stride, int offset) { in indexFromXAndY() argument
47 return x + (y * stride) + offset; in indexFromXAndY()
DAntiAliasBitmapVerifier.java35 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
40 bitmap[indexFromXAndY(x, y, stride, offset)], mColor1, mColor2)) { in verify()
DPerPixelBitmapVerifier.java55 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
60 int index = indexFromXAndY(x, y, stride, offset); in verify()
80 mDifferenceBitmap.setPixels(differenceMap, offset, stride, 0, 0, width, height); in verify()
DColorCountVerifier.java37 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
42 bitmap[indexFromXAndY(x, y, stride, offset)], mColor, mThreshold)) { in verify()
DSamplePointVerifier.java47 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
54 int index = indexFromXAndY(x, y, stride, offset); in verify()
68 mDifferenceBitmap.setPixels(differenceMap, offset, stride, 0, 0, in verify()
DGoldenImageVerifier.java52 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
53 boolean success = mBitmapComparer.verifySame(mGoldenBitmapArray, bitmap, offset, stride, in verify()
DBlurPixelVerifier.java39 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
69 int pixelColor = bitmap[indexFromXAndY(x, y, stride, offset)]; in verify()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/bitmapcomparers/
DBitmapComparer.java30 public abstract boolean verifySame(int[] ideal, int[] given, int offset, int stride, int width, in verifySame() argument
36 protected static int indexFromXAndY(int x, int y, int stride, int offset) { in indexFromXAndY() argument
37 return x + (y * stride) + offset; in indexFromXAndY()
/cts/tests/tests/mediaediting/src/android/media/mediaediting/cts/
DMssimCalculator.java163 byte[] pixelBuffer, int bufferIndexOffset, int stride, int windowWidth, int windowHeight) { in getMean() argument
167 total += pixelBuffer[get1dIndex(x, y, stride, bufferIndexOffset)] & 0xFF; in getMean()
180 int stride, in getVariancesAndCovariance() argument
188 int index = get1dIndex(x, y, stride, bufferIndexOffset); in getVariancesAndCovariance()
215 private static int get1dIndex(int x, int y, int stride, int offset) { in get1dIndex() argument
216 return x + (y * stride) + offset; in get1dIndex()
/cts/tests/tests/uirendering27/src/android/uirendering/cts/bitmapverifiers/
DBitmapVerifier.java41 public abstract boolean verify(int[] bitmap, int offset, int stride, int width, int height); in verify() argument
46 protected static int indexFromXAndY(int x, int y, int stride, int offset) { in indexFromXAndY() argument
47 return x + (y * stride) + offset; in indexFromXAndY()
DPerPixelBitmapVerifier.java55 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
60 int index = indexFromXAndY(x, y, stride, offset); in verify()
80 mDifferenceBitmap.setPixels(differenceMap, offset, stride, 0, 0, width, height); in verify()
DSamplePointVerifier.java47 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
54 int index = indexFromXAndY(x, y, stride, offset); in verify()
68 mDifferenceBitmap.setPixels(differenceMap, offset, stride, 0, 0, in verify()
/cts/hostsidetests/adpf/app/hintsession/src/cpp/
DTextureAsset.cpp43 auto stride = AImageDecoder_getMinimumStride(pAndroidDecoder); in loadAsset() local
46 auto upAndroidImageData = std::make_unique<std::vector<uint8_t>>(height * stride); in loadAsset()
48 stride, upAndroidImageData->size()); in loadAsset()
/cts/tests/tests/graphics/src/android/graphics/cts/
DYuvImageTest.java239 int stride = width; in testGetYuvData() local
240 int[] argb = new int[stride * height]; in testGetYuvData()
241 mTestBitmaps[0].getPixels(argb, 0, stride, 0, 0, width, height); in testGetYuvData()
242 byte[] yuv = convertArgbsToYuvs(argb, stride, height, ImageFormat.NV21); in testGetYuvData()
244 stride, stride in testGetYuvData()
460 final int stride = 1280; in testCompressYuvToJpegRWithStrides() local
462 final int width = stride - padding; in testCompressYuvToJpegRWithStrides()
471 width, height, new int[] {stride * 2, stride * 2}, in testCompressYuvToJpegRWithStrides()
474 width, height, new int[] {stride, stride / 2, stride / 2}); in testCompressYuvToJpegRWithStrides()
504 int stride = width + paddings; in generateYuvImage() local
[all …]
/cts/hostsidetests/securitybulletin/securityPatch/CVE-2021-0689/
Dpoc.cpp59 size_t stride = AImageDecoder_getMinimumStride(decoder.get()); in main() local
60 size_t pixelSize = height * stride; in main()
64 int32_t result = AImageDecoder_decodeImage(decoder.get(), pixels.data(), stride, pixelSize); in main()
/cts/tests/tests/renderscript/src/android/renderscript/cts/
DAllocationByteBufferTest.java60 int stride = (int)alloc.getStride(); in testByteBufferHelper() local
65 byte byteInBuffer = bb.get(posY * stride + posX * vecWidth * byteSize); in testByteBufferHelper()
114 int stride = (int)alloc.getStride(); in test2DWrite() local
115 byte[] dataIn = new byte[stride * dimY]; in test2DWrite()
122 assertEquals(dataIn[j*stride + i], dataOut[j*dimX*vecWidth + i]); in test2DWrite()
DScriptGroupTest.java437 for (int stride = ARRAY_SIZE / 2; stride >= 1; stride >>= 1) { in testBuilder2GatherScatterAcrossKernelsViaGlobals()
439 stride); in testBuilder2GatherScatterAcrossKernelsViaGlobals()
441 Type.createX(mRS, Element.I32_4(mRS), stride), in testBuilder2GatherScatterAcrossKernelsViaGlobals()
497 for (int stride = ARRAY_SIZE / 2; stride >= 1; stride >>= 1) { in testBuilder2KernelOutputToGlobal()
499 stride); in testBuilder2KernelOutputToGlobal()
501 Type.createX(mRS, Element.I32_4(mRS), stride), in testBuilder2KernelOutputToGlobal()
/cts/tests/tests/graphics/jni/
Dandroid_graphics_cts_AImageDecoderTest.cpp131 auto stride = AImageDecoder_getMinimumStride(nullptr); in testNullDecoder() local
132 ASSERT_EQ(0, stride); in testNullDecoder()
412 size_t stride = AImageDecoder_getMinimumStride(decoder); in testGetMinimumStride() local
415 ASSERT_EQ(bytesPerPixel(ANDROID_BITMAP_FORMAT_RGBA_F16) * width, stride); in testGetMinimumStride()
417 ASSERT_EQ(bytesPerPixel(ANDROID_BITMAP_FORMAT_RGBA_8888) * width, stride); in testGetMinimumStride()
420 auto setFormatAndCheckStride = [env, decoder, width, &stride](AndroidBitmapFormat format) { in testGetMinimumStride()
424 stride = AImageDecoder_getMinimumStride(decoder); in testGetMinimumStride()
425 ASSERT_EQ(bytesPerPixel(format) * width, stride); in testGetMinimumStride()
446 ASSERT_EQ(stride, AImageDecoder_getMinimumStride(decoder)); in testGetMinimumStride()
498 EXPECT_GE("Stride too small", jInfo.stride, minStride); in bitmapsEqual()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DInfrastructureTests.java52 public boolean verifySame(int[] ideal, int[] given, int offset, int stride, int width, in testRenderSpecIsolation()
58 return !(new MSSIMComparer(threshold)).verifySame(ideal, given, offset, stride, in testRenderSpecIsolation()
DBitmapTests.java190 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in testChangeDuringUiAnimation() argument
192 int[] red = new int[offset + height * stride]; in testChangeDuringUiAnimation()
194 int[] blue = new int[offset + height * stride]; in testChangeDuringUiAnimation()
196 boolean isRed = comparer.verifySame(red, bitmap, offset, stride, width, in testChangeDuringUiAnimation()
198 boolean isBlue = comparer.verifySame(blue, bitmap, offset, stride, width, in testChangeDuringUiAnimation()

123