x265_clip3        106 source/common/cudata.cpp     int mvx = x265_clip3(-32768, 32767, (scale * mv.x + 127 + (scale * mv.x < 0)) >> 8);
x265_clip3        107 source/common/cudata.cpp     int mvy = x265_clip3(-32768, 32767, (scale * mv.y + 127 + (scale * mv.y < 0)) >> 8);
x265_clip3        965 source/common/cudata.cpp     tuDepthRange[0] = x265_clip3(tuDepthRange[0], tuDepthRange[1], log2CUSize - (m_slice->m_sps->quadtreeTUMaxDepthIntra - 1 + splitFlag));
x265_clip3        977 source/common/cudata.cpp     tuDepthRange[0] = x265_clip3(tuDepthRange[0], tuDepthRange[1], log2CUSize - (quadtreeTUMaxDepth - 1 + splitFlag));
x265_clip3       2036 source/common/cudata.cpp         int tdb   = x265_clip3(-128, 127, diffPocB);
x265_clip3       2037 source/common/cudata.cpp         int tdd   = x265_clip3(-128, 127, diffPocD);
x265_clip3       2039 source/common/cudata.cpp         int scale = x265_clip3(-4096, 4095, (tdb * x + 32) >> 6);
x265_clip3         76 source/common/dct.cpp         block[4 * i + 0] = (int16_t)x265_clip3(-32768, 32767, (29 * c[0] + 55 * c[1]     + c[3]               + rnd_factor) >> shift);
x265_clip3         77 source/common/dct.cpp         block[4 * i + 1] = (int16_t)x265_clip3(-32768, 32767, (55 * c[2] - 29 * c[1]     + c[3]               + rnd_factor) >> shift);
x265_clip3         78 source/common/dct.cpp         block[4 * i + 2] = (int16_t)x265_clip3(-32768, 32767, (74 * (tmp[i] - tmp[8 + i]  + tmp[12 + i])      + rnd_factor) >> shift);
x265_clip3         79 source/common/dct.cpp         block[4 * i + 3] = (int16_t)x265_clip3(-32768, 32767, (55 * c[0] + 29 * c[2]     - c[3]               + rnd_factor) >> shift);
x265_clip3        257 source/common/dct.cpp         dst[0] = (int16_t)(x265_clip3(-32768, 32767, (E[0] + O[0] + add) >> shift));
x265_clip3        258 source/common/dct.cpp         dst[1] = (int16_t)(x265_clip3(-32768, 32767, (E[1] + O[1] + add) >> shift));
x265_clip3        259 source/common/dct.cpp         dst[2] = (int16_t)(x265_clip3(-32768, 32767, (E[1] - O[1] + add) >> shift));
x265_clip3        260 source/common/dct.cpp         dst[3] = (int16_t)(x265_clip3(-32768, 32767, (E[0] - O[0] + add) >> shift));
x265_clip3        294 source/common/dct.cpp             dst[k] = (int16_t)x265_clip3(-32768, 32767, (E[k] + O[k] + add) >> shift);
x265_clip3        295 source/common/dct.cpp             dst[k + 4] = (int16_t)x265_clip3(-32768, 32767, (E[3 - k] - O[3 - k] + add) >> shift);
x265_clip3        345 source/common/dct.cpp             dst[k]   = (int16_t)x265_clip3(-32768, 32767, (E[k] + O[k] + add) >> shift);
x265_clip3        346 source/common/dct.cpp             dst[k + 8] = (int16_t)x265_clip3(-32768, 32767, (E[7 - k] - O[7 - k] + add) >> shift);
x265_clip3        409 source/common/dct.cpp             dst[k] = (int16_t)x265_clip3(-32768, 32767, (E[k] + O[k] + add) >> shift);
x265_clip3        410 source/common/dct.cpp             dst[k + 16] = (int16_t)x265_clip3(-32768, 32767, (E[15 - k] - O[15 - k] + add) >> shift);
x265_clip3        632 source/common/dct.cpp         coef[n] = (int16_t)x265_clip3(-32768, 32767, coeffQ);
x265_clip3        651 source/common/dct.cpp             coef[n] = (int16_t)x265_clip3(-32768, 32767, coeffQ);
x265_clip3        658 source/common/dct.cpp             coeffQ   = x265_clip3(-32768, 32767, quantCoef[n] * deQuantCoef[n]);
x265_clip3        659 source/common/dct.cpp             coef[n] = (int16_t)x265_clip3(-32768, 32767, coeffQ << (per - shift));
x265_clip3        682 source/common/dct.cpp         qCoef[blockpos] = (int16_t)x265_clip3(-32768, 32767, level);
x265_clip3        709 source/common/dct.cpp         qCoef[blockpos] = (int16_t)abs(x265_clip3(-32768, 32767, level));
x265_clip3        300 source/common/deblock.cpp             delta = x265_clip3(-tc, tc, delta);
x265_clip3        307 source/common/deblock.cpp                 int32_t delta1 = x265_clip3(-tc2, tc2, ((((m1 + m3 + 1) >> 1) - m2 + delta) >> 1));
x265_clip3        313 source/common/deblock.cpp                 int32_t delta2 = x265_clip3(-tc2, tc2, ((((m6 + m4 + 1) >> 1) - m5 - delta) >> 1));
x265_clip3        374 source/common/deblock.cpp         int32_t indexB = x265_clip3(0, QP_MAX_SPEC, qp + betaOffset);
x265_clip3        392 source/common/deblock.cpp         int32_t indexTC = x265_clip3(0, QP_MAX_SPEC + DEFAULT_INTRA_TC_OFFSET, int32_t(qp + DEFAULT_INTRA_TC_OFFSET * (bs - 1) + tcOffset));
x265_clip3        492 source/common/deblock.cpp             int32_t indexTC = x265_clip3(0, QP_MAX_SPEC + DEFAULT_INTRA_TC_OFFSET, int32_t(qp + DEFAULT_INTRA_TC_OFFSET + tcOffset));
x265_clip3        152 source/common/loopfilter.cpp         src[-offset * 3] = (pixel)(x265_clip3(-tcP, tcP, ((2 * m0 + 3 * m1 + m2 + m3 + m4 + 4) >> 3) - m1) + m1);
x265_clip3        153 source/common/loopfilter.cpp         src[-offset * 2] = (pixel)(x265_clip3(-tcP, tcP, ((m1 + m2 + m3 + m4 + 2) >> 2) - m2) + m2);
x265_clip3        154 source/common/loopfilter.cpp         src[-offset]     = (pixel)(x265_clip3(-tcP, tcP, ((m1 + 2 * m2 + 2 * m3 + 2 * m4 + m5 + 4) >> 3) - m3) + m3);
x265_clip3        155 source/common/loopfilter.cpp         src[0]           = (pixel)(x265_clip3(-tcQ, tcQ, ((m2 + 2 * m3 + 2 * m4 + 2 * m5 + m6 + 4) >> 3) - m4) + m4);
x265_clip3        156 source/common/loopfilter.cpp         src[offset]      = (pixel)(x265_clip3(-tcQ, tcQ, ((m3 + m4 + m5 + m6 + 2) >> 2) - m5) + m5);
x265_clip3        157 source/common/loopfilter.cpp         src[offset * 2]  = (pixel)(x265_clip3(-tcQ, tcQ, ((m3 + m4 + m5 + 3 * m6 + 2 * m7 + 4) >> 3) - m6) + m6);
x265_clip3        176 source/common/loopfilter.cpp         int32_t delta = x265_clip3(-tc, tc, ((((m4 - m3) * 4) + m2 - m5 + 4) >> 3));
x265_clip3        913 source/common/param.cpp         int pass = x265_clip3(0, 3, atoi(value));
x265_clip3        949 source/common/pixel.cpp             src[c] = x265_clip3((pixel)minPix, (pixel)maxPix, src[c]);
x265_clip3        235 source/common/quant.cpp     int qp = x265_clip3(-QP_BD_OFFSET, 57, qpin);
x265_clip3       3274 source/encoder/analysis.cpp     return x265_clip3(m_param->rc.qpMin, m_param->rc.qpMax, (int)(qp + 0.5));
x265_clip3       1289 source/encoder/entropy.cpp     qp = x265_clip3(QP_MIN, QP_MAX_SPEC, qp);
x265_clip3        524 source/encoder/frameencoder.cpp     slice->m_sliceQp = x265_clip3(-QP_BD_OFFSET, QP_MAX_SPEC, qp);
x265_clip3        527 source/encoder/frameencoder.cpp         int qpCb = x265_clip3(-12, 0, (int)floor((m_top->m_cB * ((-.46) * qp + 9.26)) + 0.5 ));
x265_clip3        528 source/encoder/frameencoder.cpp         int qpCr = x265_clip3(-12, 0, (int)floor((m_top->m_cR * ((-.46) * qp + 9.26)) + 0.5 ));
x265_clip3       1543 source/encoder/frameencoder.cpp                 qpBase = x265_clip3((double)m_param->rc.qpMin, (double)m_param->rc.qpMax, qpBase);
x265_clip3       1592 source/encoder/frameencoder.cpp                 qpBase = x265_clip3((double)m_param->rc.qpMin, (double)m_param->rc.qpMax, qpBase);
x265_clip3        218 source/encoder/ratecontrol.cpp     m_param->rc.vbvBufferSize = x265_clip3(0, 2000000, m_param->rc.vbvBufferSize);
x265_clip3        219 source/encoder/ratecontrol.cpp     m_param->rc.vbvMaxBitrate = x265_clip3(0, 2000000, m_param->rc.vbvMaxBitrate);
x265_clip3        220 source/encoder/ratecontrol.cpp     m_param->rc.vbvBufferInit = x265_clip3(0.0, 2000000.0, m_param->rc.vbvBufferInit);
x265_clip3        298 source/encoder/ratecontrol.cpp             m_qpConstant[I_SLICE] = x265_clip3(QP_MIN, QP_MAX_MAX, (int)(m_qp - m_ipOffset + 0.5));
x265_clip3        299 source/encoder/ratecontrol.cpp             m_qpConstant[B_SLICE] = x265_clip3(QP_MIN, QP_MAX_MAX, (int)(m_qp + m_pbOffset + 0.5));
x265_clip3        341 source/encoder/ratecontrol.cpp             m_param->rc.vbvBufferInit = x265_clip3(0.0, 1.0, m_param->rc.vbvBufferInit / m_param->rc.vbvBufferSize);
x265_clip3        342 source/encoder/ratecontrol.cpp         m_param->rc.vbvBufferInit = x265_clip3(0.0, 1.0, X265_MAX(m_param->rc.vbvBufferInit, m_bufferRate / m_bufferSize));
x265_clip3        690 source/encoder/ratecontrol.cpp         m_param->rc.vbvBufferSize = x265_clip3(0, 2000000, m_param->rc.vbvBufferSize);
x265_clip3        691 source/encoder/ratecontrol.cpp         m_param->rc.vbvMaxBitrate = x265_clip3(0, 2000000, m_param->rc.vbvMaxBitrate);
x265_clip3        746 source/encoder/ratecontrol.cpp     hrd->bitRateScale = x265_clip3(0, 15, calcScale(vbvMaxBitrate) - BR_SHIFT);
x265_clip3        749 source/encoder/ratecontrol.cpp     hrd->cpbSizeScale = x265_clip3(0, 15, calcScale(vbvBufferSize) - CPB_SHIFT);
x265_clip3        762 source/encoder/ratecontrol.cpp     hrd->initialCpbRemovalDelayLength = 2 + x265_clip3(4, 22, 32 - calcLength(maxDelay));
x265_clip3        763 source/encoder/ratecontrol.cpp     hrd->cpbRemovalDelayLength = x265_clip3(4, 31, 32 - calcLength(maxCpbOutputDelay));
x265_clip3        764 source/encoder/ratecontrol.cpp     hrd->dpbOutputDelayLength = x265_clip3(4, 31, 32 - calcLength(maxDpbOutputDelay));
x265_clip3       1147 source/encoder/ratecontrol.cpp             m_qpConstant[P_SLICE] = x265_clip3(QP_MIN, QP_MAX_MAX, m_param->rc.qp);
x265_clip3       1148 source/encoder/ratecontrol.cpp             m_qpConstant[I_SLICE] = x265_clip3(QP_MIN, QP_MAX_MAX, (int)(m_param->rc.qp - m_ipOffset + 0.5));
x265_clip3       1149 source/encoder/ratecontrol.cpp             m_qpConstant[B_SLICE] = x265_clip3(QP_MIN, QP_MAX_MAX, (int)(m_param->rc.qp + m_pbOffset + 0.5));
x265_clip3       1340 source/encoder/ratecontrol.cpp         q = x265_clip3((double)m_param->rc.qpMin, (double)m_param->rc.qpMax, q);
x265_clip3       1380 source/encoder/ratecontrol.cpp         m_qp = x265_clip3(m_param->rc.qpMin, m_param->rc.qpMax, m_qp);
x265_clip3       1455 source/encoder/ratecontrol.cpp         q = x265_clip3(minQscale, maxQscale, q);
x265_clip3       1501 source/encoder/ratecontrol.cpp         fill = x265_clip3(0.0, m_bufferSize, fill);
x265_clip3       1526 source/encoder/ratecontrol.cpp         qscaleOrig = x265_clip3(qscaleMin, qscaleMax, qscaleOrig);
x265_clip3       1528 source/encoder/ratecontrol.cpp         qscaleNew  = x265_clip3(qscaleMin, qscaleMax, qscaleNew);
x265_clip3       1597 source/encoder/ratecontrol.cpp             overflow = x265_clip3(.5, 2.0, 1.0 + (encodedBits - wantedBits) / abrBuffer);
x265_clip3       1722 source/encoder/ratecontrol.cpp                 qScale = x265_clip3(lmin, lmax, qScale);
x265_clip3       1740 source/encoder/ratecontrol.cpp                     qScale = x265_clip3(lmin, lmax, qScale);
x265_clip3       1749 source/encoder/ratecontrol.cpp                     qScale = x265_clip3(lmin, lmax, qScale);
x265_clip3       1810 source/encoder/ratecontrol.cpp             q /= x265_clip3(0.5, 2.0, (double)(abrBuffer - diff) / abrBuffer);
x265_clip3       1816 source/encoder/ratecontrol.cpp                 double w = x265_clip3(0.0, 1.0, curTime * 100);
x265_clip3       1851 source/encoder/ratecontrol.cpp             q = x265_clip3(lmin, lmax, q);
x265_clip3       1941 source/encoder/ratecontrol.cpp                     q = x265_clip3(lqmin, lqmax, q);
x265_clip3       1955 source/encoder/ratecontrol.cpp             q = x265_clip3(lqmin, lqmax, q);
x265_clip3       1974 source/encoder/ratecontrol.cpp                 q = x265_clip3(lqmin, lqmax, q);
x265_clip3       2165 source/encoder/ratecontrol.cpp                     finalDur = x265_clip3(0.4, 1.0, totalDuration);
x265_clip3       2175 source/encoder/ratecontrol.cpp                 targetFill = x265_clip3(m_bufferSize * (1 - 0.2 * finalDur), m_bufferSize, m_bufferFill - totalDuration * m_vbvMaxRate * 0.5);
x265_clip3       2193 source/encoder/ratecontrol.cpp                 q /= x265_clip3(0.5, 1.0, 2.0 * m_bufferFill / m_bufferSize);
x265_clip3       2209 source/encoder/ratecontrol.cpp                     qf = x265_clip3(0.2, 1.0, m_bufferFill / (maxFillFactor * bits));
x265_clip3       2235 source/encoder/ratecontrol.cpp             return x265_clip3(lmin, qmax, q);
x265_clip3       2247 source/encoder/ratecontrol.cpp     return x265_clip3(lmin, lmax, q);
x265_clip3       2458 source/encoder/ratecontrol.cpp             qpVbv = x265_clip3(prevRowQp + 1.0f, qpMax, (prevRowQp + qpVbv) * 0.5);
x265_clip3       2466 source/encoder/ratecontrol.cpp                 qpVbv = x265_clip3(qpMin, prevRowQp, (prevRowQp + qpVbv) * 0.5);
x265_clip3       2521 source/encoder/ratecontrol.cpp     double new_coeff_clipped = x265_clip3(old_coeff / range, old_coeff * range, new_coeff);
x265_clip3       2606 source/encoder/ratecontrol.cpp             curEncData.m_avgQpRc = x265_clip3((double)m_param->rc.qpMin, (double)m_param->rc.qpMax, avgQpRc);
x265_clip3         47 source/encoder/ratecontrol.h #define CLIP_DURATION(f) x265_clip3(MIN_FRAME_DURATION, MAX_FRAME_DURATION, f)
x265_clip3         70 source/encoder/rdcost.h             qpCb = (int)g_chromaScale[x265_clip3(QP_MIN, QP_MAX_MAX, qp + slice.m_pps->chromaQpOffset[0] + slice.m_chromaQpOffset[0])];
x265_clip3         71 source/encoder/rdcost.h             qpCr = (int)g_chromaScale[x265_clip3(QP_MIN, QP_MAX_MAX, qp + slice.m_pps->chromaQpOffset[1] + slice.m_chromaQpOffset[1])];
x265_clip3         75 source/encoder/rdcost.h             qpCb = x265_clip3(QP_MIN, QP_MAX_SPEC, qp + slice.m_pps->chromaQpOffset[0] + slice.m_chromaQpOffset[0]);
x265_clip3         76 source/encoder/rdcost.h             qpCr = x265_clip3(QP_MIN, QP_MAX_SPEC, qp + slice.m_pps->chromaQpOffset[1] + slice.m_chromaQpOffset[1]);
x265_clip3       1234 source/encoder/sao.cpp         qpCb = x265_clip3(m_param->rc.qpMin, m_param->rc.qpMax, (int)g_chromaScale[x265_clip3(QP_MIN, QP_MAX_MAX, qpCb)]);
x265_clip3       1236 source/encoder/sao.cpp         qpCb = x265_clip3(m_param->rc.qpMin, m_param->rc.qpMax, qpCb);
x265_clip3       1407 source/encoder/sao.cpp                     offsetOut = x265_clip3(-OFFSET_THRESH + 1, OFFSET_THRESH - 1, offsetOut);
x265_clip3       1429 source/encoder/sao.cpp                 offsetOut = x265_clip3(-OFFSET_THRESH + 1, OFFSET_THRESH - 1, offsetOut);
x265_clip3        212 source/encoder/search.cpp     int quantQP = x265_clip3(QP_MIN, QP_MAX_SPEC, qp);
x265_clip3       2723 source/encoder/search.cpp             m_maxTUDepth = x265_clip3(cuGeom.log2CUSize - maxSize, cuGeom.log2CUSize - minSize, (uint32_t)m_maxTUDepth);
x265_clip3        536 source/encoder/slicetype.cpp         curOffset = x265_clip3(-128, 127, curOffset);
x265_clip3        538 source/encoder/slicetype.cpp         curScale = x265_clip3(0, 127, curScale);
x265_clip3        310 source/encoder/weightPrediction.cpp                 int scale = x265_clip3(0, 255, (int)(guessScale[plane] * (1 << denom) + 0.5f));
x265_clip3        420 source/encoder/weightPrediction.cpp             int startScale = x265_clip3(0, 127, minscale - scaleDist);
x265_clip3        421 source/encoder/weightPrediction.cpp             int endScale   = x265_clip3(0, 127, minscale + scaleDist);
x265_clip3        436 source/encoder/weightPrediction.cpp                     curOffset = x265_clip3(-128, 127, curOffset);
x265_clip3        438 source/encoder/weightPrediction.cpp                     curScale = x265_clip3(0, 127, curScale);
x265_clip3        441 source/encoder/weightPrediction.cpp                 int startOffset = x265_clip3(-128, 127, curOffset - offsetDist);
x265_clip3        442 source/encoder/weightPrediction.cpp                 int endOffset   = x265_clip3(-128, 127, curOffset + offsetDist);
x265_clip3        384 source/x265-extras.cpp                 int tmpDst = x265_clip3(0, pixelMax, ((src[x] << 2) + err + half) >> rShift);
x265_clip3        398 source/x265-extras.cpp                 int tmpDst = x265_clip3(0, pixelMax, ((src[x] << 2) + err + half) >> rShift);