Searched refs:clamp (Results 1 - 25 of 148) sorted by relevance

123456

/external/libvpx/libvpx/vp9/common/
H A Dvp9_quant_common.c233 return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
235 return dc_qlookup_10[clamp(qindex + delta, 0, MAXQ)];
237 return dc_qlookup_12[clamp(qindex + delta, 0, MAXQ)];
244 return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
252 return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];
254 return ac_qlookup_10[clamp(qindex + delta, 0, MAXQ)];
256 return ac_qlookup_12[clamp(qindex + delta, 0, MAXQ)];
263 return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];
273 return clamp(seg_qindex, 0, MAXQ);
H A Dvp9_mv.h47 mv->col = clamp(mv->col, min_col, max_col);
48 mv->row = clamp(mv->row, min_row, max_row);
/external/libvpx/libvpx/vpx_dsp/
H A Dvpx_dsp_common.h43 static INLINE int clamp(int value, int low, int high) { function
56 return (uint16_t)clamp(val, 0, 255);
58 return (uint16_t)clamp(val, 0, 1023);
60 return (uint16_t)clamp(val, 0, 4095);
/external/jmonkeyengine/engine/src/terrain/com/jme3/terrain/noise/
H A DColor.java60 this.rgba[0] = ShaderUtils.clamp(r, 0, 1);
61 this.rgba[1] = ShaderUtils.clamp(g, 0, 1);
62 this.rgba[2] = ShaderUtils.clamp(b, 0, 1);
63 this.rgba[3] = ShaderUtils.clamp(a, 0, 1);
129 float r = ShaderUtils.clamp(this.rgba[0] * 0.393f + this.rgba[1] * 0.769f + this.rgba[2] * 0.189f, 0, 1);
130 float g = ShaderUtils.clamp(this.rgba[0] * 0.349f + this.rgba[1] * 0.686f + this.rgba[2] * 0.168f, 0, 1);
131 float b = ShaderUtils.clamp(this.rgba[0] * 0.272f + this.rgba[1] * 0.534f + this.rgba[2] * 0.131f, 0, 1);
H A DShaderUtils.java65 return new Color((int) ShaderUtils.clamp(ShaderUtils.mix(a.getRed(), b.getRed(), f), 0, 255), (int) ShaderUtils.clamp(
66 ShaderUtils.mix(a.getGreen(), b.getGreen(), f), 0, 255), (int) ShaderUtils.clamp(
83 return ShaderUtils.clamp((x - a) / (b - a), 0, 1);
90 public static final float clamp(final float x, final float a, final float b) { method in class:ShaderUtils
158 x = ShaderUtils.clamp(x, 0, 1) * nspans;
194 float cutoff = ShaderUtils.clamp(0.5f / swidth, 0, maxFreq);
199 float fade = ShaderUtils.clamp(2 * (cutoff - f) / cutoff, 0, 1);
/external/replicaisland/src/com/replica/replicaisland/
H A DUtils.java39 public final static int clamp(int value, int min, int max) { method in class:Utils
52 result = clamp(value, max, min);
/external/mesa3d/src/gallium/auxiliary/draw/
H A Ddraw_pipe_offset.c46 float clamp; member in struct:offset_stage
94 if (offset->clamp)
95 zoffset = (offset->clamp < 0.0f) ? MAX2(zoffset, offset->clamp) :
96 MIN2(zoffset, offset->clamp);
133 offset->clamp = stage->draw->rasterizer->offset_clamp;
/external/jmonkeyengine/engine/src/test/jme3test/gui/
H A DTestSoftwareMouse.java66 x = FastMath.clamp(x, 0, settings.getWidth());
67 y = FastMath.clamp(y, 0, settings.getHeight());
/external/llvm/test/MC/R600/
H A Dvop3.s83 v_fract_f32 v1, v2 clamp
84 // CHECK: v_fract_f32_e64 v1, v2 clamp ; encoding: [0x01,0x08,0x40,0xd3,0x02,0x01,0x00,0x00]
89 v_fract_f32 v1, v2, div:2 clamp
90 // CHECK: v_fract_f32_e64 v1, v2 clamp div:2 ; encoding: [0x01,0x08,0x40,0xd3,0x02,0x01,0x00,0x18]
/external/mesa3d/src/gallium/drivers/r600/
H A Dr700_asm.c54 S_SQ_ALU_WORD1_CLAMP(alu->dst.clamp) |
65 S_SQ_ALU_WORD1_CLAMP(alu->dst.clamp) |
/external/deqp/framework/common/
H A DtcuTexLookupVerifier.cpp613 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f);
614 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f);
663 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f);
664 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f);
665 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f);
666 const float maxB = de::clamp((vBounds.y()-0.5f)-float(j), 0.0f, 1.0f);
726 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f);
727 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f);
728 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f);
729 const float maxB = de::clamp((vBound
[all...]
H A DtcuTexCompareVerifier.cpp66 const float cmpValue = (clampValues) ? (de::clamp(cmpValue_, 0.0f, 1.0f)) : (cmpValue_);
67 const float cmpReference = (clampValues) ? (de::clamp(cmpReference_, 0.0f, 1.0f)) : (cmpReference_);
607 const float minA = de::clamp((uBounds.x()-0.5f)-float(i), 0.0f, 1.0f);
608 const float maxA = de::clamp((uBounds.y()-0.5f)-float(i), 0.0f, 1.0f);
609 const float minB = de::clamp((vBounds.x()-0.5f)-float(j), 0.0f, 1.0f);
610 const float maxB = de::clamp((vBounds.y()-0.5f)-float(j), 0.0f, 1.0f);
733 const float minA0 = de::clamp((uBounds0.x()-0.5f)-float(i0), 0.0f, 1.0f);
734 const float maxA0 = de::clamp((uBounds0.y()-0.5f)-float(i0), 0.0f, 1.0f);
735 const float minB0 = de::clamp((vBounds0.x()-0.5f)-float(j0), 0.0f, 1.0f);
736 const float maxB0 = de::clamp((vBounds
[all...]
H A DtcuFuzzyImageCompare.cpp60 return (deUint8)de::clamp((int)(v + 0.5f), 0, 255);
132 int i0 = de::clamp(x0, 0, w-1);
133 int i1 = de::clamp(x1, 0, w-1);
134 int j0 = de::clamp(y0, 0, h-1);
135 int j1 = de::clamp(y1, 0, h-1);
181 deUint32 p = readUnorm8<SrcChannels>(src, de::clamp(i+kx-shiftX, 0, src.getWidth()-1), j);
200 deUint32 p = readUnorm8<DstChannels>(tmpAccess, de::clamp(j+ky-shiftY, 0, tmp.getWidth()-1), i);
/external/deqp/modules/gles31/functional/
H A Des31fShaderPackingFunctionTests.cpp213 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1);
214 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].y(), -1.0f, 1.0f) * 32767.0f), -(1<<15), (1<<15)-1);
303 const float ref0 = de::clamp(float(in0) / 32767.f, -1.0f, 1.0f);
304 const float ref1 = de::clamp(float(in1) / 32767.f, -1.0f, 1.0f);
404 const deUint16 ref0 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(inputs[valNdx].x(), 0.0f, 1.0f) * 65535.0f), 0, (1<<16)-1);
405 const deUint16 ref1 = (deUint16)de::clamp(deRoundFloatToInt32(de::clamp(input
[all...]
/external/jmonkeyengine/engine/src/blender/com/jme3/scene/plugins/blender/textures/
H A DTextureGeneratorClouds.java94 texres.intensity = FastMath.clamp(texres.intensity, 0.0f, 1.0f);
111 texres.green = FastMath.clamp(texres.green, 0.0f, 1.0f);
112 texres.blue = FastMath.clamp(texres.blue, 0.0f, 1.0f);
H A DTexturePixel.java277 public void clamp(float min, float max) { method in class:TexturePixel
278 this.red = FastMath.clamp(this.red, min, max);
279 this.green = FastMath.clamp(this.green, min, max);
280 this.blue = FastMath.clamp(this.blue, min, max);
281 this.alpha = FastMath.clamp(this.alpha, min, max);
282 this.intensity = FastMath.clamp(this.intensity, min, max);
/external/jmonkeyengine/engine/src/bullet-native/
H A Dcom_jme3_bullet_joints_Point2PointJoint.cpp65 (JNIEnv * env, jobject object, jlong jointId, jfloat clamp) {
72 joint->m_setting.m_impulseClamp = clamp;
64 Java_com_jme3_bullet_joints_Point2PointJoint_setImpulseClamp(JNIEnv * env, jobject object, jlong jointId, jfloat clamp) argument
/external/icu/icu4c/source/i18n/
H A DdecContext.c71 context->clamp=0; /* no clamping */
85 context->clamp=1; /* clamp exponents */
96 context->clamp=1; /* clamp exponents */
107 context->clamp=1; /* clamp exponents */
/external/jmonkeyengine/engine/src/core-effects/Common/MatDefs/Water/
H A Dsimple_water.frag79 projCoord = clamp(projCoord, 0.001, 0.999);
119 fresnelTerm=clamp(fresnelTerm,0.0,1.0);
/external/mesa3d/src/gallium/drivers/r300/
H A Dr300_state_inlines.h42 boolean clamp)
46 return clamp ? R300_COMB_FCN_ADD_CLAMP : R300_COMB_FCN_ADD_NOCLAMP;
48 return clamp ? R300_COMB_FCN_SUB_CLAMP : R300_COMB_FCN_SUB_NOCLAMP;
50 return clamp ? R300_COMB_FCN_RSUB_CLAMP : R300_COMB_FCN_RSUB_NOCLAMP;
41 r300_translate_blend_function(int blend_func, boolean clamp) argument
/external/mesa3d/src/mesa/main/
H A Dblend.h100 _mesa_ClampColorARB(GLenum target, GLenum clamp);
/external/mesa3d/src/gallium/drivers/llvmpipe/
H A Dlp_tile_soa.py133 value = conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=False)
144 value = conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=False)
202 value = conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=False)
275 value = conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=False)
286 value = conversion_expr(src_channel, dst_channel, dst_native_type, value, clamp=False)
/external/deqp/framework/referencerenderer/
H A DrrFragmentOperations.cpp35 using tcu::clamp;
38 using de::clamp;
110 int clampedStencilRef = de::clamp(stencilState.ref, 0, (1<<numStencilBits)-1);
145 int clampedStencilRef = de::clamp(stencilState.ref, 0, (1<<numStencilBits)-1);
152 case STENCILOP_INCR: SAMPLE_REGISTER_SFAIL(de::clamp(stencilBufferValue+1, 0, (1<<numStencilBits) - 1)) break;
153 case STENCILOP_DECR: SAMPLE_REGISTER_SFAIL(de::clamp(stencilBufferValue-1, 0, (1<<numStencilBits) - 1)) break;
175 float sampleDepth = de::clamp(sampleDepthFloat, 0.0f, 1.0f); \
258 const float clampedDepth = de::clamp(frag.sampleDepths[fragSampleNdx], 0.0f, 1.0f);
286 case STENCILOP_INCR: SAMPLE_REGISTER_DPFAIL_OR_DPPASS(CONDITION, de::clamp(stencilBufferValue+1, 0, (1<<numStencilBits) - 1)) break; \
287 case STENCILOP_DECR: SAMPLE_REGISTER_DPFAIL_OR_DPPASS(CONDITION, de::clamp(stencilBufferValu
[all...]
/external/deqp/modules/glshared/
H A DglsRasterizationTestUtil.cpp719 const tcu::Vec4 fragmentColorMax = de::clamp(weights.max.x(), 0.0f, 1.0f) * scene.triangles[triNdx].colors[0] +
720 de::clamp(weights.max.y(), 0.0f, 1.0f) * scene.triangles[triNdx].colors[1] +
721 de::clamp(weights.max.z(), 0.0f, 1.0f) * scene.triangles[triNdx].colors[2];
722 const tcu::Vec4 fragmentColorMin = de::clamp(weights.min.x(), 0.0f, 1.0f) * scene.triangles[triNdx].colors[0] +
723 de::clamp(weights.min.y(), 0.0f, 1.0f) * scene.triangles[triNdx].colors[1] +
724 de::clamp(weights.min.z(), 0.0f, 1.0f) * scene.triangles[triNdx].colors[2];
795 const tcu::Vec3 colorMinF (de::clamp(valueRangeMin.x() * formatLimit.x(), 0.0f, (float)formatLimit.x()),
796 de::clamp(valueRangeMin.y() * formatLimit.y(), 0.0f, (float)formatLimit.y()),
797 de::clamp(valueRangeMin.z() * formatLimit.z(), 0.0f, (float)formatLimit.z()));
798 const tcu::Vec3 colorMaxF (de::clamp(valueRangeMa
[all...]
/external/libvpx/libvpx/vp9/encoder/
H A Dvp9_picklpf.c79 int filt_mid = clamp(lf->filter_level, min_filter_level, max_filter_level);
187 lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level);

Completed in 1600 milliseconds

123456