Home
last modified time | relevance | path

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

123

/frameworks/rs/tests/java_api/ImageProcessing_jb/src/com/android/rs/image/
Dlevels.rsh26 float3 pixel = convert_float4(in).rgb;
27 pixel = rsMatrixMultiply(&colorMat, pixel);
28 pixel = clamp(pixel, 0.f, 255.f);
29 pixel = (pixel - inBlack) * overInWMinInB;
30 pixel = pixel * outWMinOutB + outBlack;
31 pixel = clamp(pixel, 0.f, 255.f);
32 out.xyz = convert_uchar3(pixel);
38 float4 pixel = convert_float4(in);
39 pixel.rgb = rsMatrixMultiply(&colorMat, pixel.rgb);
40 pixel = clamp(pixel, 0.f, 255.f);
[all …]
/frameworks/rs/tests/java_api/ImageProcessing/src/com/android/rs/image/
Dlevels.rsh26 float3 pixel = convert_float4(in).rgb;
27 pixel = rsMatrixMultiply(&colorMat, pixel);
28 pixel = clamp(pixel, 0.f, 255.f);
29 pixel = (pixel - inBlack) * overInWMinInB;
30 pixel = pixel * outWMinOutB + outBlack;
31 pixel = clamp(pixel, 0.f, 255.f);
32 out.xyz = convert_uchar3(pixel);
38 float4 pixel = convert_float4(in);
39 pixel.rgb = rsMatrixMultiply(&colorMat, pixel.rgb);
40 pixel = clamp(pixel, 0.f, 255.f);
[all …]
/frameworks/rs/tests/java_api/ImageProcessing2/src/com/android/rs/image/
Dlevels.rsh26 float3 pixel = convert_float4(in).rgb;
27 pixel = rsMatrixMultiply(&colorMat, pixel);
28 pixel = clamp(pixel, 0.f, 255.f);
29 pixel = (pixel - inBlack) * overInWMinInB;
30 pixel = pixel * outWMinOutB + outBlack;
31 pixel = clamp(pixel, 0.f, 255.f);
32 out.xyz = convert_uchar3(pixel);
38 float4 pixel = convert_float4(in);
39 pixel.rgb = rsMatrixMultiply(&colorMat, pixel.rgb);
40 pixel = clamp(pixel, 0.f, 255.f);
[all …]
/frameworks/rs/tests/java_api/ScriptGroupTest/src/com/android/rs/sgtest/
Dlevels_f.rsh26 float3 pixel = convert_float4(in).rgb;
27 pixel = rsMatrixMultiply(&colorMat, pixel);
28 pixel = clamp(pixel, 0.f, 255.f);
29 pixel = (pixel - inBlack) * overInWMinInB;
30 pixel = pixel * outWMinOutB + outBlack;
31 pixel = clamp(pixel, 0.f, 255.f);
32 out.xyz = convert_uchar3(pixel);
49 float4 pixel;
50 pixel.rgb = rsMatrixMultiply(&colorMat, in.rgb);
51 pixel = clamp(pixel, 0.f, 255.f);
[all …]
/frameworks/base/media/mca/filterpacks/native/imageproc/
Dbrightness.c82 Pixel pixel; in brightness_process() local
84 pixel.value = *(input_ptr++); in brightness_process()
86 const short r = (pixel.rgba[0] * factor) / 255; in brightness_process()
87 const short g = (pixel.rgba[1] * factor) / 255; in brightness_process()
88 const short b = (pixel.rgba[2] * factor) / 255; in brightness_process()
93 | (pixel.rgba[3] << 24); in brightness_process()
/frameworks/native/services/surfaceflinger/tests/utils/
DScreenshotUtils.h154 const uint8_t* pixel = mPixels + (4 * (y * mOutBuffer->getStride() + x)); in checkPixel() local
155 if (r != pixel[0] || g != pixel[1] || b != pixel[2]) { in checkPixel()
158 x, y, r, g, b, pixel[0], pixel[1], pixel[2])); in checkPixel()
168 const uint8_t* pixel = mPixels + (4 * (y * mOutBuffer->getStride() + x)); in getPixelColor() local
169 return {pixel[0], pixel[1], pixel[2], pixel[3]}; in getPixelColor()
DTransactionUtils.h153 uint8_t* pixel = img + (4 * (y * outBuffer.stride + x)); variable
154 pixel[0] = r;
155 pixel[1] = g;
156 pixel[2] = b;
157 pixel[3] = 255;
/frameworks/layoutlib/bridge/src/android/graphics/
DBlendComposite.java159 int pixel = srcPixels[x]; in compose() local
160 srcPixel[0] = (pixel >> 16) & 0xFF; in compose()
161 srcPixel[1] = (pixel >> 8) & 0xFF; in compose()
162 srcPixel[2] = (pixel ) & 0xFF; in compose()
163 srcPixel[3] = (pixel >> 24) & 0xFF; in compose()
165 pixel = dstPixels[x]; in compose()
166 dstPixel[0] = (pixel >> 16) & 0xFF; in compose()
167 dstPixel[1] = (pixel >> 8) & 0xFF; in compose()
168 dstPixel[2] = (pixel ) & 0xFF; in compose()
169 dstPixel[3] = (pixel >> 24) & 0xFF; in compose()
/frameworks/native/opengl/tests/hwc/
DhwcTestLib.cpp578 uint32_t pixel; in hwcTestColor2Pixel() local
579 pixel = htonl((uint32_t) round((((1 << attrib->c1Size) - 1) * color.c1())) in hwcTestColor2Pixel()
580 << ((sizeof(pixel) * BITSPERBYTE) in hwcTestColor2Pixel()
582 pixel |= htonl((uint32_t) round((((1 << attrib->c2Size) - 1) * color.c2())) in hwcTestColor2Pixel()
583 << ((sizeof(pixel) * BITSPERBYTE) in hwcTestColor2Pixel()
585 pixel |= htonl((uint32_t) round((((1 << attrib->c3Size) - 1) * color.c3())) in hwcTestColor2Pixel()
586 << ((sizeof(pixel) * BITSPERBYTE) in hwcTestColor2Pixel()
589 pixel |= htonl((uint32_t) round((((1 << attrib->aSize) - 1) * alpha)) in hwcTestColor2Pixel()
590 << ((sizeof(pixel) * BITSPERBYTE) in hwcTestColor2Pixel()
594 pixel = ntohl(pixel); in hwcTestColor2Pixel()
[all …]
/frameworks/rs/tests/java_api/Refocus/src/com/android/rs/test/
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 …]
Dlayered_filter_fast_d1new.rscript20 // @param in an input RGBD pixel with @in.a being quantized inverse depth.
122 // Marks this pixel as active.
129 // Next, tries to figure out whether or not this pixel is on the boundary
159 // Moves sharp_nbr to the top left corner of this pixel.
167 // needed for the pixel. Otherwise, the distance transform will be
184 // Marks this pixel as active.
188 // Next, tries to figure out whether or not this pixel is on the boundary
219 // Moves sharp_nbr to the top left corner of this pixel.
227 // needed for the pixel. Otherwise, the distance transform will be
250 // 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_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 …]
/frameworks/native/cmds/surfacereplayer/replayer/
DBufferQueueScheduler.cpp96 uint8_t* pixel = img + (4 * (y * outBuffer.stride + x)); in fillSurface() local
97 pixel[0] = color.r; in fillSurface()
98 pixel[1] = color.g; in fillSurface()
99 pixel[2] = color.b; in fillSurface()
100 pixel[3] = LAYER_ALPHA; in fillSurface()
/frameworks/base/services/core/java/com/android/server/wm/utils/
DRotationAnimationUtils.java101 int pixel = 0; in getPixelLuminance() local
102 pixel |= (buffer.get(offset) & 0xff) << 16; // R in getPixelLuminance()
103 pixel |= (buffer.get(offset + 1) & 0xff) << 8; // G in getPixelLuminance()
104 pixel |= (buffer.get(offset + 2) & 0xff); // B in getPixelLuminance()
105 pixel |= (buffer.get(offset + 3) & 0xff) << 24; // A in getPixelLuminance()
106 return Color.valueOf(pixel).luminance(); in getPixelLuminance()
/frameworks/native/libs/gui/tests/
DGLTest.cpp179 GLubyte pixel[4]; in checkPixel() local
181 glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); in checkPixel()
190 if (r >= 0 && abs(r - int(pixel[0])) > tolerance) { in checkPixel()
191 msg += String8::format("r(%d isn't %d)", pixel[0], r); in checkPixel()
193 if (g >= 0 && abs(g - int(pixel[1])) > tolerance) { in checkPixel()
197 msg += String8::format("g(%d isn't %d)", pixel[1], g); in checkPixel()
199 if (b >= 0 && abs(b - int(pixel[2])) > tolerance) { in checkPixel()
203 msg += String8::format("b(%d isn't %d)", pixel[2], b); in checkPixel()
205 if (a >= 0 && abs(a - int(pixel[3])) > tolerance) { in checkPixel()
209 msg += String8::format("a(%d isn't %d)", pixel[3], a); in checkPixel()
/frameworks/base/media/mca/filterfw/jni/
Djni_native_frame.cpp189 const Pixel pixel = *(src_ptr++); in Java_android_filterfw_core_NativeFrame_setNativeBitmap() local
190 *(dst_ptr++) = (pixel.rgba[0] + pixel.rgba[1] + pixel.rgba[2]) / 3; in Java_android_filterfw_core_NativeFrame_setNativeBitmap()
196 const Pixel pixel = *(src_ptr++); in Java_android_filterfw_core_NativeFrame_setNativeBitmap() local
197 *(dst_ptr++) = pixel.rgba[0]; in Java_android_filterfw_core_NativeFrame_setNativeBitmap()
198 *(dst_ptr++) = pixel.rgba[1]; in Java_android_filterfw_core_NativeFrame_setNativeBitmap()
199 *(dst_ptr++) = pixel.rgba[2]; in Java_android_filterfw_core_NativeFrame_setNativeBitmap()
/frameworks/base/core/tests/coretests/src/android/hardware/display/
DVirtualDisplayTest.java470 int pixel = 0; in scanImage() local
471 pixel |= (buffer.get(offset) & 0xff) << 16; // R in scanImage()
472 pixel |= (buffer.get(offset + 1) & 0xff) << 8; // G in scanImage()
473 pixel |= (buffer.get(offset + 2) & 0xff); // B in scanImage()
474 pixel |= (buffer.get(offset + 3) & 0xff) << 24; // A in scanImage()
475 if (pixel == Color.BLACK || pixel == 0) { in scanImage()
477 } else if (pixel == BLUEISH) { in scanImage()
479 } else if (pixel == GREENISH) { in scanImage()
484 Log.d(TAG, "- Found unexpected color: " + Integer.toHexString(pixel)); in scanImage()
/frameworks/base/core/java/com/android/internal/graphics/palette/
DQuantizerMap.java41 for (int pixel : pixels) { in quantize()
42 colorToCount.merge(pixel, 1, Integer::sum); in quantize()
DWSMeansQuantizer.java95 for (int pixel : mInputPixelToCount.keySet()) { in quantize()
96 mPixels[index] = pixel; in quantize()
97 mPoints[index] = mPointProvider.fromInt(pixel); in quantize()
238 int pixel = mPixels[i]; in recalculateClusterCenters() local
239 int count = mInputPixelToCount.get(pixel); in recalculateClusterCenters()
/frameworks/opt/setupwizard/library/gingerbread/test/instrumentation/src/com/android/setupwizardlib/items/
DButtonItemDrawingTest.java84 for (int pixel : pixels) { in countPixelsWithColor()
85 if (pixel == color) { in countPixelsWithColor()
/frameworks/native/opengl/libs/ETC1/
Detc1.cpp541 int pixel = (p[1] << 8) | p[0]; in etc1_encode_image() local
542 *q++ = convert5To8(pixel >> 11); in etc1_encode_image()
543 *q++ = convert6To8(pixel >> 5); in etc1_encode_image()
544 *q++ = convert5To8(pixel); in etc1_encode_image()
597 etc1_uint32 pixel = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); in etc1_decode_image() local
598 *p++ = (etc1_byte) pixel; in etc1_decode_image()
599 *p++ = (etc1_byte) (pixel >> 8); in etc1_decode_image()
/frameworks/native/services/surfaceflinger/sysprop/
DSurfaceFlingerProperties.sysprop211 # Returns the default data space and pixel format that SurfaceFlinger
213 # and pixel format for wide color gamut surfaces.
214 # To determine the data space and pixel format, there are a few things
218 # data space and pixel format efficiently;
221 # 3. For better blending, consider using pixel format where the alpha
224 # more bits in pixel format.
237 # pixelFormat is the default pixel format that SurfaceFlinger
238 # expects. If unspecified, the default pixel format is
263 # wcgPixelFormat is the pixel format that SurfaceFlinger expects for
264 # wide color gamut surfaces. If unspecified, the pixel format is

123