Home
last modified time | relevance | path

Searched refs:rgb (Results 1 – 25 of 74) sorted by relevance

123

/frameworks/base/core/res/res/raw/
Dcolor_fade_frag.frag10 vec3 rgb2hsl(vec3 rgb)
14 vec4 p = rgb.g < rgb.b ? vec4(rgb.bg, -1.0, 2.0 / 3.0) : vec4(rgb.gb, 0.0, -1.0 / 3.0);
15 vec4 q = rgb.r < p.x ? vec4(p.xyw, rgb.r) : vec4(rgb.r, p.yzx);
31 vec3 rgb = clamp(vec3(p.x - 1.0, q.yz), 0.0, 1.0);
33 return (rgb - vec3(0.5)) * c + hsl.z;
40 vec3 rgb = pow(hsl2rgb(vec3(hsl.x, hsl.y * saturation, hsl.z * opacity)), vec3(gamma));
41 gl_FragColor = vec4(rgb, 1.0);
/frameworks/support/v4/tests/java/android/support/v4/graphics/
DColorUtilsTest.java87 verifyColorToHSL(entry.rgb, entry.hsl); in testColorToHSL()
94 verifyHSLToColor(entry.hsl, entry.rgb); in testHSLToColor()
103 ColorUtils.colorToHSL(entry.rgb, hsl); in testColorToHslLimits()
114 verifyColorToXYZ(entry.rgb, entry.xyz); in testColorToXYZ()
121 verifyColorToLAB(entry.rgb, entry.lab); in testColorToLAB()
135 verifyXYZToColor(entry.xyz, entry.rgb); in testXYZToColor()
142 verifyLABToColor(entry.lab, entry.rgb); in testLABToColor()
149 verifyMinAlpha("Black title", entry.rgb, entry.blackMinAlpha30, in testMinAlphas()
150 ColorUtils.calculateMinimumAlpha(Color.BLACK, entry.rgb, 3.0f)); in testMinAlphas()
151 verifyMinAlpha("Black body", entry.rgb, entry.blackMinAlpha45, in testMinAlphas()
[all …]
/frameworks/rs/java/tests/RsCameraDemo/src/com/android/example/rscamera/
Dfocus_peak.rs57 int4 rgb;
58 rgb.r = mergedPixel.r +
60 rgb.g = mergedPixel.r -
63 rgb.b = mergedPixel.r +
65 rgb.a = 255;
68 uchar4 out = convert_uchar4(clamp(rgb, 0, 255));
/frameworks/rs/java/tests/ScriptGroupTest/src/com/android/rs/sgtest/
Dshadows_f.rs51 static ushort3 rgb2hsv( float4 rgb)
55 int ri = rgb.r;
56 int gi = rgb.g;
57 int bi = rgb.b;
170 float4 rgb;
172 rgb.r = rr;
173 rgb.g = rg;
174 rgb.b = rb;
176 return rgb;
Dlevels_f.rsh26 float3 pixel = convert_float4(in).rgb;
50 pixel.rgb = rsMatrixMultiply(&colorMat, in.rgb);
/frameworks/rs/java/tests/ImageProcessing/src/com/android/rs/image/
Dshadows.rs51 static ushort3 rgb2hsv( uchar4 rgb)
55 int ri = rgb.r;
56 int gi = rgb.g;
57 int bi = rgb.b;
170 uchar4 rgb;
172 rgb.r = rr;
173 rgb.g = rg;
174 rgb.b = rb;
176 return rgb;
Dexposure.rs29 float3 t = convert_float3(in.rgb);
30 out.rgb = convert_uchar3(clamp(convert_int3(t * bright), 0, 255));
Dlevels.rsh26 float3 pixel = convert_float4(in).rgb;
39 pixel.rgb = rsMatrixMultiply(&colorMat, pixel.rgb);
Dcontrast.rs29 float3 v = convert_float3(in.rgb) * brightM + brightC;
31 o.rgb = convert_uchar3(clamp(v, 0.f, 255.f));
Dgreyscale.rs25 float3 mono = dot(f4.rgb, gMonoMult);
31 return (uchar)dot(f4.rgb, gMonoMult);
/frameworks/rs/java/tests/ImageProcessing2/src/com/android/rs/image/
Dshadows.rs51 static ushort3 rgb2hsv( uchar4 rgb)
55 int ri = rgb.r;
56 int gi = rgb.g;
57 int bi = rgb.b;
170 uchar4 rgb;
172 rgb.r = rr;
173 rgb.g = rg;
174 rgb.b = rb;
176 return rgb;
Dlevels.rsh26 float3 pixel = convert_float4(in).rgb;
39 pixel.rgb = rsMatrixMultiply(&colorMat, pixel.rgb);
Dcontrast.rs29 float3 v = convert_float3(in.rgb) * brightM + brightC;
31 o.rgb = convert_uchar3(clamp(v, 0.f, 255.f));
Dgreyscale.rs25 float3 mono = dot(f4.rgb, gMonoMult);
31 return (uchar)dot(f4.rgb, gMonoMult);
/frameworks/rs/java/tests/ImageProcessing_jb/src/com/android/rs/image/
Dshadows.rs51 static ushort3 rgb2hsv( uchar4 rgb)
55 int ri = rgb.r;
56 int gi = rgb.g;
57 int bi = rgb.b;
170 uchar4 rgb;
172 rgb.r = rr;
173 rgb.g = rg;
174 rgb.b = rb;
176 return rgb;
Dexposure.rs29 float3 t = convert_float3(in.rgb);
30 out.rgb = convert_uchar3(clamp(convert_int3(t * bright), 0, 255));
Dlevels.rsh26 float3 pixel = convert_float4(in).rgb;
39 pixel.rgb = rsMatrixMultiply(&colorMat, pixel.rgb);
Dcontrast.rs29 float3 v = convert_float3(in.rgb) * brightM + brightC;
31 o.rgb = convert_uchar3(clamp(v, 0.f, 255.f));
Dgreyscale.rs25 float3 mono = dot(f4.rgb, gMonoMult);
31 return (uchar)dot(f4.rgb, gMonoMult);
/frameworks/rs/java/tests/VrDemo/src/com/example/android/rs/vr/engine/
DMaterial.java111 int rgb = Color.HSVToColor(new float[]{360 * h, s, f}); in setup() local
112 red[i] = (rgb >> 16) & 0xff; in setup()
113 green[i] = (rgb >> 8) & 0xff; in setup()
114 blue[i] = (rgb >> 0) & 0xff; in setup()
151 int rgb = material[i][1] & 0xFFFFFF; in setup() local
161 mMaterialProp[i].mRed = (rgb >> 16) & 0xff; in setup()
162 mMaterialProp[i].mGreen = (rgb >> 8) & 0xff; in setup()
163 mMaterialProp[i].mBlue = (rgb >> 0) & 0xff; in setup()
193 int rgb = (int) (Math.random() * 0xFFFFFF); in setup() local
194 mMaterialProp[i].mRed = (rgb >> 16) & 0xff; in setup()
[all …]
/frameworks/av/cmds/stagefright/filters/
Dsaturation.rs30 float3 rgb = {v_in->y * 0.003921569f, v_in->z * 0.003921569f,
34 float3 result = dot(rgb, gMonoMult);
35 result = mix(result, rgb, gSaturation);
/frameworks/av/media/libstagefright/filters/
DsaturationARGB.rs30 float3 rgb = {v_in->y * 0.003921569f, v_in->z * 0.003921569f,
34 float3 result = dot(rgb, gMonoMult);
35 result = mix(result, rgb, gSaturation);
/frameworks/base/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/
DImageUtils.java119 int rgb = image.getRGB(x, y); in assertImageSimilar() local
120 if (goldenRgb == rgb) { in assertImageSimilar()
126 if (((goldenRgb & 0xFF000000) == 0) && (rgb & 0xFF000000) == 0) { in assertImageSimilar()
131 int deltaR = ((rgb & 0xFF0000) >>> 16) - ((goldenRgb & 0xFF0000) >>> 16); in assertImageSimilar()
133 int deltaG = ((rgb & 0x00FF00) >>> 8) - ((goldenRgb & 0x00FF00) >>> 8); in assertImageSimilar()
135 int deltaB = (rgb & 0x0000FF) - (goldenRgb & 0x0000FF); in assertImageSimilar()
139 + ((rgb & 0xFF000000) >>> 24)) / 2) << 24; in assertImageSimilar()
/frameworks/native/services/surfaceflinger/Effects/
DDaltonizer.cpp81 const vec3& lms_r(rgb2lms[0].rgb); in update()
83 const vec3& lms_b(rgb2lms[2].rgb); in update()
85 const vec3 lms_w((rgb2lms * vec4(1)).rgb); in update()
/frameworks/support/v7/palette/src/main/java/android/support/v7/graphics/
DColorCutQuantizer.java429 final int rgb = approximateToRgb888(color565); in shouldIgnoreColor() local
430 ColorUtils.colorToHSL(rgb, mTempHsl); in shouldIgnoreColor()
431 return shouldIgnoreColor(rgb, mTempHsl); in shouldIgnoreColor()
438 private boolean shouldIgnoreColor(int rgb, float[] hsl) { in shouldIgnoreColor() argument
441 if (!mFilters[i].isAllowed(rgb, hsl)) { in shouldIgnoreColor()
473 return Color.rgb(modifyWordWidth(r, QUANTIZE_WORD_WIDTH, 8), in approximateToRgb888()

123