Home
last modified time | relevance | path

Searched refs:width (Results 1 – 25 of 274) sorted by relevance

1234567891011

/cts/tests/tests/renderscript/src/android/renderscript/cts/
DAllocationCopyPaddedTest.java27 int width = random.nextInt(128);; in test_AllocationPadded_Byte3_1D() local
28 int arr_len = width * 3; in test_AllocationPadded_Byte3_1D()
35 typeBuilder.setX(width); in test_AllocationPadded_Byte3_1D()
54 int width = random.nextInt(128); in test_AllocationPadded_Byte3_2D() local
56 int arr_len = width * height * 3; in test_AllocationPadded_Byte3_2D()
63 typeBuilder.setX(width).setY(height); in test_AllocationPadded_Byte3_2D()
111 int width = random.nextInt(512); in test_AllocationPadded_Short3_1D_Helper() local
112 int arr_len = width * 3; in test_AllocationPadded_Short3_1D_Helper()
122 typeBuilder.setX(width); in test_AllocationPadded_Short3_1D_Helper()
146 int width = random.nextInt(128); in test_AllocationPadded_Short3_2D_Helper() local
[all …]
DrsAllocationCopyTest.java29 int width = random.nextInt(512); in test_rsAllocationCopy1D_Byte() local
30 int arr_len = width; in test_rsAllocationCopy1D_Byte()
39 typeBuilder.setX(width); in test_rsAllocationCopy1D_Byte()
74 int width = random.nextInt(512); in test_rsAllocationCopy1D_Short() local
75 int arr_len = width; in test_rsAllocationCopy1D_Short()
86 typeBuilder.setX(width); in test_rsAllocationCopy1D_Short()
121 int width = random.nextInt(512); in test_rsAllocationCopy1D_Int() local
122 int arr_len = width; in test_rsAllocationCopy1D_Int()
133 typeBuilder.setX(width); in test_rsAllocationCopy1D_Int()
168 int width = random.nextInt(512); in test_rsAllocationCopy1D_Float() local
[all …]
DAllocationCopyToTest.java29 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Byte() local
30 int arr_len = width; in test_Allocationcopy1DRangeTo_Byte()
37 typeBuilder.setX(width); in test_Allocationcopy1DRangeTo_Byte()
63 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Short_Helper() local
64 int arr_len = width; in test_Allocationcopy1DRangeTo_Short_Helper()
74 typeBuilder.setX(width); in test_Allocationcopy1DRangeTo_Short_Helper()
111 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Int() local
112 int arr_len = width; in test_Allocationcopy1DRangeTo_Int()
122 typeBuilder.setX(width); in test_Allocationcopy1DRangeTo_Int()
148 int width = random.nextInt(512); in test_Allocationcopy1DRangeTo_Float() local
[all …]
DAllocationCopy2DRangeTest.java32 int width = random.nextInt(512); in testAllocationCopy2DRange() local
35 int[] inArray = new int[width * height]; in testAllocationCopy2DRange()
36 int[] outArray = new int[width * height]; in testAllocationCopy2DRange()
38 for (int i = 0; i < width * height; i++) { in testAllocationCopy2DRange()
44 typeBuilder.setX(width).setY(height); in testAllocationCopy2DRange()
47 mInAllocation.copy2DRangeFrom(0, 0, width, height, inArray); in testAllocationCopy2DRange()
50 mScript.set_width(width); in testAllocationCopy2DRange()
57 compareTwoArrays(inArray, outArray, width*height)); in testAllocationCopy2DRange()
DYuvTest.java23 int width; field in YuvTest
36 return (width + 1) / 2; in getCWidth()
44 width = w; in makeYuvBuffer()
72 … return Allocation.createTyped(mRS, Type.createXY(mRS, Element.RGBA_8888(mRS), width, height)); in makeOutput()
76 return Allocation.createTyped(mRS, Type.createXY(mRS, Element.F32_4(mRS), width, height)); in makeOutput_f4()
87 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in testV17()
89 for (int j = 0; j < (width * height); j++) { in testV17()
128 tb.setX(width); in test_NV21()
133 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in test_NV21()
135 for (int j = 0; j < (width * height); j++) { in test_NV21()
[all …]
/cts/tests/tests/graphics/src/android/graphics/cts/
DYuvImageTest.java93 int width = 100; in testYuvImage() local
95 byte[] yuv = new byte[width * height * 2]; in testYuvImage()
101 image = new YuvImage(yuv, mFormats[i], width, height, null); in testYuvImage()
113 expected = new int[] {width, width}; in testYuvImage()
115 expected = new int[] {width * 2}; in testYuvImage()
119 image = new YuvImage(yuv, mFormats[i], width, height, null); in testYuvImage()
141 image = new YuvImage(yuv, format, width, -1, null); in testYuvImage()
149 image = new YuvImage(null, format, width, height, null); in testYuvImage()
200 int width = mTestBitmaps[0].getWidth(); in testGetYuvData() local
202 int stride = width; in testGetYuvData()
[all …]
DPorterDuffColorFilterTest.java32 int width = 100; in testPorterDuffColorFilter() local
34 Bitmap b1 = Bitmap.createBitmap(width / 2, height, Config.ARGB_8888); in testPorterDuffColorFilter()
36 Bitmap b2 = Bitmap.createBitmap(width, height / 2, Config.ARGB_8888); in testPorterDuffColorFilter()
39 Bitmap target = Bitmap.createBitmap(width, height, Config.ARGB_8888); in testPorterDuffColorFilter()
49 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
50 int lowerLeft = target.getPixel(width / 4, height * 3 / 4); in testPorterDuffColorFilter()
53 int lowerRight = target.getPixel(width * 3 / 4, height * 3 / 4); in testPorterDuffColorFilter()
62 assertEquals(Color.RED, target.getPixel(width / 4, height / 4)); in testPorterDuffColorFilter()
63 assertEquals(Color.BLUE, target.getPixel(width / 4, height * 3 / 4)); in testPorterDuffColorFilter()
64 assertEquals(Color.BLUE, target.getPixel(width * 3 / 4, height * 3 / 4)); in testPorterDuffColorFilter()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/
DResourceModifier.java98 final float width = bitmap.getWidth() / 8.0f; in ResourceModifier() local
102 0.0f, 0.0f, width, 0.0f, width * 2, 0.0f, width * 3, 0.0f, in ResourceModifier()
103 0.0f, height, width, height, width * 2, height, width * 4, height, in ResourceModifier()
104 0.0f, height * 2, width, height * 2, width * 2, height * 2, width * 3, height * 2, in ResourceModifier()
105 0.0f, height * 4, width, height * 4, width * 2, height * 4, width * 4, height * 4, in ResourceModifier()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/
DSelectableResolution.java24 public final int width; field in SelectableResolution
30 public SelectableResolution(int cameraId, int width, int height) { in SelectableResolution() argument
32 this.width = width; in SelectableResolution()
40 return "Cam " + cameraId + ": " + width + " x " + height + " - " in toString()
DSize.java23 public final int width; field in Size
26 public Size(int width, int height) { in Size() argument
27 this.width = width; in Size()
/cts/tests/tests/rscpp/src/android/cts/rscpp/
DRSYuvTest.java31 int width; field in RSYuvTest
41 return (width + 1) / 2; in getCWidth()
49 width = w; in makeYuvBuffer()
77 … return Allocation.createTyped(mRS, Type.createXY(mRS, Element.RGBA_8888(mRS), width, height)); in makeOutput()
88 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in testV17()
90 for (int j = 0; j < (width * height); j++) { in testV17()
105 byte[] nativeByteAlloc = new byte[width * height * 4]; in testV17()
106 yuvTest(this.getContext().getCacheDir().toString(), width, height, tmp, nativeByteAlloc, 0); in testV17() local
122 tb.setX(width); in test_YV12()
127 byte tmp[] = new byte[(width * height) + (getCWidth() * getCHeight() * 2)]; in test_YV12()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/
DShaderTests.java44 public void draw(Canvas canvas, int width, int height) { in testSinglePixelBitmapShader()
51 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelBitmapShader()
64 public void draw(Canvas canvas, int width, int height) { in testSinglePixelComposeShader()
82 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelComposeShader()
106 public void draw(Canvas canvas, int width, int height) { in testComplexShaderUsage()
108 mBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
111 final float radius = width / 2.0f; in testComplexShaderUsage()
112 bitmapCanvas.drawCircle(width / 2, height / 2, radius, mPaint); in testComplexShaderUsage()
116 width, height, Bitmap.Config.ALPHA_8); in testComplexShaderUsage()
118 bitmapCanvas.drawCircle(width / 2, 0, radius, mPaint); in testComplexShaderUsage()
[all …]
DExactCanvasTests.java41 .addCanvasClient((canvas, width, height) -> { in testBlueRect()
53 .addCanvasClient((canvas, width, height) -> { in testPoints()
68 .addCanvasClient((canvas, width, height) -> { in testBlackRectWithStroke()
83 .addCanvasClient((canvas, width, height) -> { in testBlackLineOnGreenBack()
96 .addCanvasClient((canvas, width, height) -> { in testDrawRedRectOnBlueBack()
108 .addCanvasClient((canvas, width, height) -> { in testDrawLine()
123 .addCanvasClient((canvas, width, height) -> canvas.drawColor(Color.WHITE)) in testDrawWhiteScreen()
131 .addCanvasClient((canvas, width, height) -> { in testBasicText()
144 .addCanvasClient((canvas, width, height) -> { in testBasicColorXfermode()
161 .addCanvasClient((canvas, width, height) -> { in testBluePaddedSquare()
[all …]
/cts/tests/tests/uirendering/src/android/uirendering/cts/util/
DBitmapDumper.java78 int width = idealBitmap.getWidth(); in dumpBitmaps() local
80 int[] testedArray = new int[width * height]; in dumpBitmaps()
81 int[] idealArray = new int[width * height]; in dumpBitmaps()
82 idealBitmap.getPixels(testedArray, 0, width, 0, 0, width, height); in dumpBitmaps()
83 testedBitmap.getPixels(idealArray, 0, width, 0, 0, width, height); in dumpBitmaps()
85 visualizerBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in dumpBitmaps()
86 visualizerBitmap.setPixels(visualizerArray, 0, width, 0, 0, width, height); in dumpBitmaps()
87 Bitmap croppedBitmap = Bitmap.createBitmap(testedBitmap, 0, 0, width, height); in dumpBitmaps()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapcomparers/
DMeanSquaredComparer.java44 public boolean verifySame(int[] ideal, int[] given, int offset, int stride, int width, in verifySame() argument
46 float totalError = getMSE(ideal, given, offset, stride, width, height); in verifySame()
53 Allocation given, int offset, int stride, int width, int height, in verifySameRowsRS() argument
58 mScript.set_WIDTH(width); in verifySameRowsRS()
68 error /= (height * width); in verifySameRowsRS()
78 public static float getMSE(int[] ideal, int[] given, int offset, int stride, int width, in getMSE() argument
83 for (int x = 0 ; x < width ; x++) { in getMSE()
92 totalError /= (width * height); in getMSE()
/cts/tests/tests/text/src/android/text/cts/
DStaticLayoutLineBreakingTest.java72 float width = getCharWidth(chars[index + i]); in getTextRunAdvances() local
73 advances[advancesIndex + i] = width; in getTextRunAdvances()
74 res += width; in getTextRunAdvances()
98 private static StaticLayout getStaticLayout(CharSequence source, int width) { in getStaticLayout() argument
99 return new StaticLayout(source, mTextPaint, width, ALIGN, SPACE_MULTI, SPACE_ADD, false); in getStaticLayout()
106 private static int[] getBreaks(CharSequence source, int width) { in getBreaks() argument
107 StaticLayout staticLayout = getStaticLayout(source, width); in getBreaks()
134 private static void layout(CharSequence source, int[] breaks, int width) { in layout() argument
135 StaticLayout staticLayout = getStaticLayout(source, width); in layout()
430 for (int width: widths) { in testNarrowWidth()
[all …]
/cts/tests/tests/media/src/android/media/cts/
DCodecUtils.java166 int width, height, rowStride, pixelStride, x, y; in getImageMD5Checksum() local
170 width = imageWidth; in getImageMD5Checksum()
173 width = imageWidth / 2; in getImageMD5Checksum()
177 byte[] bb = new byte[width * height]; in getImageMD5Checksum()
183 System.arraycopy(bb, y * width, b, y * rowStride + offs, width); in getImageMD5Checksum()
189 for (x = 0; x < width; ++x) { in getImageMD5Checksum()
190 bb[y * width + x] = b[lineOffset + x * pixelStride]; in getImageMD5Checksum()
199 buf.get(bb, y * width, width); in getImageMD5Checksum()
208 buf.get(lb, 0, pixelStride * (width - 1) + 1); in getImageMD5Checksum()
209 for (x = 0; x < width; ++x) { in getImageMD5Checksum()
[all …]
DIvfWriter.java52 int width, int height, in IvfWriter() argument
55 mWidth = width; in IvfWriter()
73 public IvfWriter(String filename, int width, int height) throws IOException { in IvfWriter() argument
74 this(filename, width, height, 1, 1000000); in IvfWriter()
110 private static byte[] makeIvfHeader(int frameCount, int width, int height, int scale, int rate){ in makeIvfHeader() argument
122 lay16Bits(ivfHeader, 12, width); in makeIvfHeader()
/cts/tests/camera/src/android/hardware/cts/
DCamera_SizeTest.java90 float jpegAspect = largestJpegDimen.width / (float) largestJpegDimen.height; in testMaxAspectRatios()
92 largestPreviewDimen.width / (float) largestPreviewDimen.height; in testMaxAspectRatios()
96 "Largest preview dimension (w=" + largestPreviewDimen.width + ", h=" + in testMaxAspectRatios()
98 "as the largest Jpeg dimension (w=" + largestJpegDimen.width + in testMaxAspectRatios()
108 private void checkSize(Parameters parameters, int width, int height) { in checkSize() argument
109 parameters.setPictureSize(width, height); in checkSize()
110 assertEquals(width, parameters.getPictureSize().width); in checkSize()
/cts/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/
DGoldenImageVerifier.java35 public boolean verify(int[] bitmap, int offset, int stride, int width, int height) { in verify() argument
37 width, height); in verify()
39 mDifferenceBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in verify()
41 mDifferenceBitmap.setPixels(differences, 0, width, 0, 0, width, height); in verify()
/cts/hostsidetests/sustainedperf/shadertoy_android/jni/
Dhooks_android.cpp19 extern void Init(int width, int height);
24 …ICALL Java_com_android_gputest_GLtestLib_init(JNIEnv * env, jobject obj, jint width, jint height);
28 …__attribute__((unused)) JNIEnv * env,__attribute__((unused)) jobject obj, jint width, jint height) in Java_com_android_gputest_GLtestLib_init() argument
30 Init(width, height); in Java_com_android_gputest_GLtestLib_init()
/cts/tests/tests/widget/src/android/widget/cts/
DTableLayout_LayoutParamsTest.java48 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
53 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
61 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
65 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, layoutParams.width); in testConstructor()
71 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
81 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
86 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
96 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
101 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
111 assertEquals(TableLayout.LayoutParams.MATCH_PARENT, mockLayoutParams.width); in testSetBaseAttributes()
[all …]
DRadioGroup_LayoutParamsTest.java52 assertEquals(Integer.MIN_VALUE, mLayoutParams.width); in testConstructor()
57 assertEquals(Integer.MAX_VALUE, mLayoutParams.width); in testConstructor()
63 assertEquals(Integer.MIN_VALUE, mLayoutParams.width); in testConstructor()
69 assertEquals(Integer.MIN_VALUE, mLayoutParams.width); in testConstructor()
74 assertEquals(40, mLayoutParams.width); in testConstructor()
86 assertEquals(100, mLayoutParams.width); in testConstructor()
101 assertEquals(10, mLayoutParams.width); in testConstructor()
125 assertEquals(LayoutParams.MATCH_PARENT, mLayoutParams.width); in testConstructor()
129 assertEquals(RadioGroup.LayoutParams.WRAP_CONTENT, mLayoutParams.width); in testConstructor()
143 assertEquals(LayoutParams.WRAP_CONTENT, layoutParams.width); in testSetBaseAttributes()
[all …]
/cts/libs/deviceutil/src/android/cts/util/
DBitmapUtils.java57 public static Bitmap generateRandomBitmap(int width, int height) { in generateRandomBitmap() argument
58 final Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in generateRandomBitmap()
60 for (int x = 0; x < width; x++) { in generateRandomBitmap()
68 public static Bitmap generateWhiteBitmap(int width, int height) { in generateWhiteBitmap() argument
69 final Bitmap bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); in generateWhiteBitmap()
70 for (int x = 0; x < width; x++) { in generateWhiteBitmap()
/cts/tests/tests/renderscript/src/android/renderscript/cts/refocus/
Dlayered_filter_fast_f32.rs102 const int index = y * g_image_size.width + x;
138 const int index = y * g_image_size.width + x; // index of this pixel
152 sharp_nbr = sharp - g_image_size.width;
157 sharp_nbr = sharp + g_image_size.width;
181 sharp_nbr = sharp - (kernel_center_y * g_image_size.width + kernel_center_x);
186 const int jump_to_next_row = g_image_size.width - kernel_dim_x;
210 const int index = y * g_image_size.width + x;
234 const int index = y * g_image_size.width + x;
263 const int index = y * g_image_size.width;
265 const SharpPixelF32_t *last_sharp = sharp + g_image_size.width;
[all …]

1234567891011