X265_MIN 201 source/common/common.h #define X265_MIN3(a, b, c) X265_MIN((a), X265_MIN((b), (c))) X265_MIN 203 source/common/common.h #define X265_MIN4(a, b, c, d) X265_MIN((a), X265_MIN3((b), (c), (d))) X265_MIN 1674 source/common/cudata.cpp int numRefIdx = (isInterB) ? X265_MIN(m_slice->m_numRefIdx[0], m_slice->m_numRefIdx[1]) : m_slice->m_numRefIdx[0]; X265_MIN 1923 source/common/cudata.cpp outMV.x = X265_MIN(xmax, X265_MAX(xmin, outMV.x)); X265_MIN 1924 source/common/cudata.cpp outMV.y = X265_MIN(ymax, X265_MAX(ymin, outMV.y)); X265_MIN 490 source/common/deblock.cpp qp = chFmt == X265_CSP_I420 ? g_chromaScale[qp] : X265_MIN(qp, QP_MAX_SPEC); X265_MIN 1131 source/common/param.cpp uint32_t tuQTMaxLog2Size = X265_MIN(maxLog2CUSize, 5); X265_MIN 1341 source/common/param.cpp param->subpelRefine = X265_MIN(2, param->subpelRefine); X265_MIN 1343 source/common/param.cpp param->rdLevel = X265_MIN(2, param->rdLevel); X265_MIN 352 source/common/picyuv.cpp m_minLumaLevel = X265_MIN(yPic[c], m_minLumaLevel); X265_MIN 368 source/common/picyuv.cpp m_minChromaULevel = X265_MIN(uPic[c], m_minChromaULevel); X265_MIN 372 source/common/picyuv.cpp m_minChromaVLevel = X265_MIN(vPic[c], m_minChromaVLevel); X265_MIN 900 source/common/pixel.cpp int interCost = X265_MIN(intraCosts[i], interCosts[i] & LOWRES_COST_MASK); X265_MIN 800 source/common/predict.cpp int nextOrTop = X265_MIN(next, leftUnits); X265_MIN 241 source/common/quant.cpp qp = X265_MIN(qp, QP_MAX_SPEC); X265_MIN 146 source/common/scalinglist.cpp m_scalingListCoef[sizeId][listId] = X265_MALLOC(int32_t, X265_MIN(MAX_MATRIX_COEF_NUM, s_numCoefPerSize[sizeId])); X265_MIN 187 source/common/scalinglist.cpp sizeof(int32_t) * X265_MIN(MAX_MATRIX_COEF_NUM, s_numCoefPerSize[size]))) X265_MIN 203 source/common/scalinglist.cpp sizeof(int32_t) * X265_MIN(MAX_MATRIX_COEF_NUM, s_numCoefPerSize[s])) && X265_MIN 233 source/common/scalinglist.cpp memcpy(m_scalingListCoef[sizeId][listId], getScalingListDefaultAddress(sizeId, listId), sizeof(int) * X265_MIN(MAX_MATRIX_COEF_NUM, s_numCoefPerSize[sizeId])); X265_MIN 261 source/common/scalinglist.cpp int size = X265_MIN(MAX_MATRIX_COEF_NUM, s_numCoefPerSize[sizeIdc]); X265_MIN 347 source/common/scalinglist.cpp int ratio = width / X265_MIN(MAX_MATRIX_SIZE_NUM, width); X265_MIN 348 source/common/scalinglist.cpp int stride = X265_MIN(MAX_MATRIX_SIZE_NUM, width); X265_MIN 315 source/common/slice.h inputWeight = X265_MIN(inputWeight, 127); X265_MIN 262 source/common/threadpool.cpp int numNumaNodes = X265_MIN(getNumaNodeCount(), MAX_NODE_NUM); X265_MIN 351 source/common/threadpool.cpp threadsPerPool[i] = X265_MIN(count, cpusPerNode[i]); X265_MIN 356 source/common/threadpool.cpp threadsPerPool[numNumaNodes] = X265_MIN(count, numNumaNodes * MAX_POOL_THREADS); X265_MIN 428 source/common/threadpool.cpp int numThreads = X265_MIN(MAX_POOL_THREADS, threadsPerPool[node]); X265_MIN 621 source/common/threadpool.cpp int numNumaNodes = X265_MIN(getNumaNodeCount(), MAX_NODE_NUM); X265_MIN 2460 source/encoder/analysis.cpp if (X265_MIN(candMvField[i][0].mv.y, candMvField[i][1].mv.y) < m_sliceMinY) X265_MIN 2590 source/encoder/analysis.cpp if (X265_MIN(candMvField[i][0].mv.y, candMvField[i][1].mv.y) < m_sliceMinY) X265_MIN 3100 source/encoder/analysis.cpp minDepth0 = X265_MIN(d, minDepth0); X265_MIN 3113 source/encoder/analysis.cpp minDepth1 = X265_MIN(d, minDepth1); X265_MIN 3120 source/encoder/analysis.cpp uint32_t minDepth = X265_MIN(minDepth0, minDepth1); X265_MIN 54 source/encoder/bitcost.cpp s_costs[qp][i] = s_costs[qp][-i] = (uint16_t)X265_MIN(s_bitsizes[i] * lambda + 0.5f, (1 << 15) - 1); X265_MIN 184 source/encoder/dpb.cpp slice->m_numRefIdx[0] = X265_MIN(newFrame->m_param->maxNumReferences, slice->m_rps.numberOfNegativePictures); // Ensuring L0 contains just the -ve POC X265_MIN 185 source/encoder/dpb.cpp slice->m_numRefIdx[1] = X265_MIN(newFrame->m_param->bBPyramid ? 2 : 1, slice->m_rps.numberOfPositivePictures); X265_MIN 303 source/encoder/encoder.cpp nrOffset[i] = (uint16_t)X265_MIN(bias + 0.5, INT16_MAX); X265_MIN 533 source/encoder/encoder.cpp rc->m_bufferFill = X265_MIN(rc->m_bufferFill, rc->m_bufferSize); X265_MIN 2005 source/encoder/encoder.cpp sps->quadtreeTULog2MaxSize = X265_MIN((uint32_t)m_param->maxLog2CUSize, maxLog2TUSize); X265_MIN 2142 source/encoder/encoder.cpp p->keyframeMin = X265_MIN((int)fps, p->keyframeMax / 10); X265_MIN 2354 source/encoder/encoder.cpp p->bFrameBias = X265_MIN(X265_MAX(-90, p->bFrameBias), 100); X265_MIN 2637 source/encoder/encoder.cpp const uint32_t slicesLimit = X265_MIN(numRows, NALList::MAX_NAL_UNITS - 1); X265_MIN 519 source/encoder/entropy.cpp int coefNum = X265_MIN(ScalingList::MAX_MATRIX_COEF_NUM, (int)ScalingList::s_numCoefPerSize[sizeId]); X265_MIN 1224 source/encoder/entropy.cpp enum { OFFSET_THRESH = 1 << X265_MIN(X265_DEPTH - 5, 5) }; X265_MIN 1256 source/encoder/entropy.cpp enum { OFFSET_THRESH = 1 << X265_MIN(X265_DEPTH - 5, 5) }; X265_MIN 1274 source/encoder/entropy.cpp enum { OFFSET_THRESH = 1 << X265_MIN(X265_DEPTH - 5, 5) }; X265_MIN 1293 source/encoder/entropy.cpp int initState = X265_MIN(X265_MAX(1, (((slope * qp) >> 4) + offset)), 126); X265_MIN 1733 source/encoder/entropy.cpp uint32_t TUValue = X265_MIN((int)absDQp, CU_DQP_TU_CMAX); X265_MIN 2086 source/encoder/entropy.cpp uint32_t numC1Flag = X265_MIN(numNonZero, C1FLAG_NUMBER); X265_MIN 643 source/encoder/frameencoder.cpp sei->m_auCpbRemovalDelay = X265_MIN(X265_MAX(1, m_rce.encodeOrder - prevBPSEI), (1 << hrd->cpbRemovalDelayLength)); X265_MIN 728 source/encoder/frameencoder.cpp const int rowIdx = X265_MIN(sliceEndRow, (row + m_refLagRows)); X265_MIN 769 source/encoder/frameencoder.cpp const int rowIdx = X265_MIN(m_numRows - 1, (i + m_refLagRows)); X265_MIN 1443 source/encoder/frameencoder.cpp allowCol = X265_MIN(((col == numCols - 1) ? m_frameFilter.m_parallelFilter[row - 2].m_lastDeblocked.get() X265_MIN 1462 source/encoder/frameencoder.cpp allowCol = X265_MIN(((col == numCols - 1) ? m_frameFilter.m_parallelFilter[row - 1].m_lastDeblocked.get() X265_MIN 1715 source/encoder/frameencoder.cpp rowCount = X265_MIN((m_numRows + 1) / 2, m_numRows - 1); X265_MIN 1717 source/encoder/frameencoder.cpp rowCount = X265_MIN(m_refLagRows, m_numRows - 1); X265_MIN 705 source/encoder/framefilter.cpp uint32_t maxPixY = X265_MIN((row + 1) * m_param->maxCUSize - 4 * !bEnd, (uint32_t)m_param->sourceHeight); X265_MIN 987 source/encoder/framefilter.cpp ssim += primitives.ssim_end_4(sum0 + x, sum1 + x, X265_MIN(4, width - x - 1)); X265_MIN 161 source/encoder/level.cpp maxDpbSize = X265_MIN(4 * MaxDpbPicBuf, 16); X265_MIN 163 source/encoder/level.cpp maxDpbSize = X265_MIN(2 * MaxDpbPicBuf, 16); X265_MIN 165 source/encoder/level.cpp maxDpbSize = X265_MIN((4 * MaxDpbPicBuf) / 3, 16); X265_MIN 292 source/encoder/level.cpp vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF, X265_MAX(vps.numReorderPics + 2, (uint32_t)param.maxNumReferences) + 1); X265_MIN 385 source/encoder/level.cpp maxDpbSize = X265_MIN(4 * MaxDpbPicBuf, 16); X265_MIN 387 source/encoder/level.cpp maxDpbSize = X265_MIN(2 * MaxDpbPicBuf, 16); X265_MIN 389 source/encoder/level.cpp maxDpbSize = X265_MIN((4 * MaxDpbPicBuf) / 3, 16); X265_MIN 396 source/encoder/level.cpp vps.maxDecPicBuffering = X265_MIN(MAX_NUM_REF, X265_MAX(vps.numReorderPics + 1, (uint32_t)param.maxNumReferences) + 1); X265_MIN 335 source/encoder/motion.cpp if ((x_max) <= X265_MIN(mvmax.x - omv.x, omv.x - mvmin.x)) \ X265_MIN 346 source/encoder/motion.cpp if ((y_max) <= X265_MIN(mvmax.y - omv.y, omv.y - mvmin.y)) \ X265_MIN 788 source/encoder/motion.cpp bmv.y = X265_MAX(X265_MIN(0, mvmax.y), mvmin.y); X265_MIN 1240 source/encoder/motion.cpp const int16_t maxX = X265_MIN(omv.x + (int16_t)merange, mvmax.x); X265_MIN 1241 source/encoder/motion.cpp const int16_t maxY = X265_MIN(omv.y + (int16_t)merange, mvmax.y); X265_MIN 758 source/encoder/ratecontrol.cpp int maxCpbOutputDelay = (int)(X265_MIN(m_param->keyframeMax * MAX_DURATION * time->timeScale / time->numUnitsInTick, INT_MAX)); X265_MIN 954 source/encoder/ratecontrol.cpp int fps = X265_MIN(m_param->keyframeMax, (int)(m_fps + 0.5)); X265_MIN 1102 source/encoder/ratecontrol.cpp adjustment = X265_MAX(X265_MIN(expectedBits / allAvailableBits, 0.999), 0.9); X265_MIN 1761 source/encoder/ratecontrol.cpp rce->frameSizePlanned = X265_MIN(rce->frameSizePlanned, rce->frameSizeMaximum); X265_MIN 1820 source/encoder/ratecontrol.cpp q = X265_MIN(x265_qp2qScale(ABR_INIT_QP_GRAIN_MAX), q); X265_MIN 1842 source/encoder/ratecontrol.cpp qmax = X265_MIN(qmax, lmax); X265_MIN 1953 source/encoder/ratecontrol.cpp q = X265_MIN(lqmax, q); X265_MIN 1990 source/encoder/ratecontrol.cpp rce->frameSizePlanned = X265_MIN(rce->frameSizePlanned, rce->frameSizeMaximum); X265_MIN 2021 source/encoder/ratecontrol.cpp m_partialResidualFrames = X265_MIN((int)rce->amortizeFrames, m_param->keyframeMax); X265_MIN 2061 source/encoder/ratecontrol.cpp int64_t shrtTermWantedBits = (int64_t) (X265_MIN(pos, s_slidingWindowFrames) * m_bitrate * m_frameDuration); X265_MIN 2167 source/encoder/ratecontrol.cpp targetFill = X265_MIN(m_bufferFill + totalDuration * m_vbvMaxRate * 0.5 , m_bufferSize * (1 - 0.5 * finalDur)); X265_MIN 2234 source/encoder/ratecontrol.cpp double qmax = X265_MIN(lmax,x265_qp2qScale(qpNoVbv + m_rateFactorMaxIncrement)); X265_MIN 2366 source/encoder/ratecontrol.cpp qpAbsoluteMax = X265_MIN(qpAbsoluteMax, rce->qpNoVbv + m_rateFactorMaxIncrement); X265_MIN 2371 source/encoder/ratecontrol.cpp double qpMax = X265_MIN(prevRowQp + m_param->rc.qpStep, qpAbsoluteMax); X265_MIN 2562 source/encoder/ratecontrol.cpp bufferBits = X265_MIN(bits + filler + m_bufferExcess, m_bufferRate); X265_MIN 2568 source/encoder/ratecontrol.cpp m_bufferFillFinal = X265_MIN(m_bufferFillFinal, m_bufferSize); X265_MIN 2569 source/encoder/ratecontrol.cpp bufferBits = X265_MIN(bits + m_bufferExcess, m_bufferRate); X265_MIN 2572 source/encoder/ratecontrol.cpp m_bufferFillActual = X265_MIN(m_bufferFillActual, m_bufferSize); X265_MIN 2666 source/encoder/ratecontrol.cpp m_residualFrames = X265_MIN((int)rce->amortizeFrames, m_param->keyframeMax); X265_MIN 81 source/encoder/rdcost.h int chroma_offset_idx = X265_MIN(qp - qpCb + 12, MAX_CHROMA_LAMBDA_OFFSET); X265_MIN 85 source/encoder/rdcost.h chroma_offset_idx = X265_MIN(qp - qpCr + 12, MAX_CHROMA_LAMBDA_OFFSET); X265_MIN 122 source/encoder/reference.cpp finishedRows = X265_MIN(finishedRows, maxNumRowsInSlice); X265_MIN 1412 source/encoder/sao.cpp offsetOut = X265_MIN(offsetOut, 0); X265_MIN 54 source/encoder/sao.h enum { OFFSET_THRESH = 1 << X265_MIN(X265_DEPTH - 5, 5) }; X265_MIN 2602 source/encoder/search.cpp mvmax.x = X265_MIN(mvmax.x, maxSafeMv); X265_MIN 2603 source/encoder/search.cpp mvmin.x = X265_MIN(mvmin.x, maxSafeMv); X265_MIN 2610 source/encoder/search.cpp mvmax.y = X265_MIN(mvmax.y, m_sliceMaxY); X265_MIN 2618 source/encoder/search.cpp mvmax.x = X265_MIN(mvmax.x, maxMvLen); X265_MIN 2619 source/encoder/search.cpp mvmax.y = X265_MIN(mvmax.y, maxMvLen); X265_MIN 2625 source/encoder/search.cpp mvmin.y = X265_MIN(mvmin.y, (int16_t)m_refLagPixels); X265_MIN 2626 source/encoder/search.cpp mvmax.y = X265_MIN(mvmax.y, (int16_t)m_refLagPixels); X265_MIN 2722 source/encoder/search.cpp maxSize = X265_MIN(maxSize, cuGeom.log2CUSize - splitFlag); X265_MIN 397 source/encoder/slicetype.cpp fenc.lowresCosts[0][0][cuXY] = (uint16_t)(X265_MIN(icost, LOWRES_COST_MASK) | (0 << LOWRES_COST_SHIFT)); X265_MIN 452 source/encoder/slicetype.cpp cost += X265_MIN(satd, fenc.intraCost[mb]); X265_MIN 549 source/encoder/slicetype.cpp int shift = X265_MIN((int)idx, mindenom); X265_MIN 639 source/encoder/slicetype.cpp m_numRowsPerSlice = X265_MIN(m_numRowsPerSlice, m_8x8Height); // but no more than the full picture X265_MIN 993 source/encoder/slicetype.cpp int maxSearch = X265_MIN(m_param->lookaheadDepth, X265_LOOKAHEAD_MAX); X265_MIN 1322 source/encoder/slicetype.cpp int maxSearch = X265_MIN(m_param->lookaheadDepth, X265_LOOKAHEAD_MAX); X265_MIN 1345 source/encoder/slicetype.cpp origNumFrames = numFrames = m_param->bIntraRefresh ? framecnt : X265_MIN(framecnt, keyintLimit); X265_MIN 1492 source/encoder/slicetype.cpp for (j = i + 2; j <= X265_MIN(i + m_param->bframes, numFrames - 1); j++) X265_MIN 1511 source/encoder/slicetype.cpp numBFrames = X265_MIN(numFrames - 1, m_param->bframes); X265_MIN 1528 source/encoder/slicetype.cpp resetStart = bKeyframe ? 1 : X265_MIN(numBFrames + 2, numAnalyzed + 1); X265_MIN 1541 source/encoder/slicetype.cpp cuTree(frames, X265_MIN(numFrames, m_param->keyframeMax), bKeyframe); X265_MIN 1547 source/encoder/slicetype.cpp resetStart = X265_MIN(resetStart, j + 1); X265_MIN 1553 source/encoder/slicetype.cpp int maxp1 = X265_MIN(m_param->bframes + 1, origNumFrames); X265_MIN 1573 source/encoder/slicetype.cpp int maxp1 = X265_MIN(origmaxp1, numFrames); X265_MIN 1703 source/encoder/slicetype.cpp int num_paths = X265_MIN(m_param->bframes + 1, length); X265_MIN 2010 source/encoder/slicetype.cpp #define CLIP_ADD(s, x) (s) = (uint16_t)X265_MIN((s) + (x), (1 << 16) - 1) X265_MIN 2484 source/encoder/slicetype.cpp fenc->lowresCosts[b - p0][p1 - b][cuXY] = (uint16_t)(X265_MIN(bcost, LOWRES_COST_MASK) | (listused << LOWRES_COST_SHIFT)); X265_MIN 205 source/encoder/weightPrediction.cpp cost += X265_MIN(cmp, cache.intraCost[cu]); X265_MIN 464 source/encoder/weightPrediction.cpp int shift = X265_MIN((int)idx, mindenom);