<div dir="ltr">Thanks Steve, will modify and resend the patches.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 9, 2015 at 1:32 AM, Steve Borho <span dir="ltr"><<a href="mailto:steve@borho.org" target="_blank">steve@borho.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On 09/07, <a href="mailto:santhoshini@multicorewareinc.com">santhoshini@multicorewareinc.com</a> wrote:<br>
> # HG changeset patch<br>
> # User Santhoshini Sekar<<a href="mailto:santhoshini@multicorewareinc.com">santhoshini@multicorewareinc.com</a>><br>
> # Date 1441625035 -19800<br>
> # Mon Sep 07 16:53:55 2015 +0530<br>
> # Node ID d91760d89cbd0e6f124fab60d7e4d684299b89a1<br>
> # Parent 2ba81f60f111c12a8f668ece13b23123702f2582<br>
> Implementation for Intra-refresh<br>
><br>
> diff -r 2ba81f60f111 -r d91760d89cbd source/common/cudata.cpp<br>
> --- a/source/common/cudata.cpp Mon Sep 07 15:20:53 2015 +0530<br>
> +++ b/source/common/cudata.cpp Mon Sep 07 16:53:55 2015 +0530<br>
> @@ -1813,6 +1813,14 @@<br>
> int16_t ymax = (int16_t)((m_slice->m_sps->picHeightInLumaSamples + offset - m_cuPelY - 1) << mvshift);<br>
> int16_t ymin = -(int16_t)((g_maxCUSize + offset + m_cuPelY - 1) << mvshift);<br>
><br>
> + if (m_encData->m_param->bIntraRefresh && m_slice->m_sliceType == P_SLICE)<br>
> + {<br>
> + int maxX = (m_slice->m_refFrameList[0][0]->m_encData->m_pir->pirEndPelX * 16 - 3) << mvshift;<br>
> + int maxMv = maxX - 4* 16 * outMV.x;<br>
> + if (maxMv > 0 && m_cuPelX < m_encData->m_pir->pirStartPelX)<br>
> + xmax = X265_MIN(xmax, (int16_t)maxX);<br>
> + }<br>
> +<br>
> outMV.x = X265_MIN(xmax, X265_MAX(xmin, outMV.x));<br>
> outMV.y = X265_MIN(ymax, X265_MAX(ymin, outMV.y));<br>
> }<br>
> diff -r 2ba81f60f111 -r d91760d89cbd source/common/cudata.h<br>
> --- a/source/common/cudata.h Mon Sep 07 15:20:53 2015 +0530<br>
> +++ b/source/common/cudata.h Mon Sep 07 16:53:55 2015 +0530<br>
> @@ -208,6 +208,7 @@<br>
> const CUData* m_cuAbove; // pointer to above neighbor CTU<br>
> const CUData* m_cuLeft; // pointer to left neighbor CTU<br>
><br>
> + int bForceIntra; // For Periodic Intra Refresh.Supported only in P-frames<br>
<br>
</div></div>this could be a member of Analysis instead of CUData<br>
<div><div class="h5"><br>
> CUData();<br>
><br>
> void initialize(const CUDataMemPool& dataPool, uint32_t depth, int csp, int instance);<br>
> diff -r 2ba81f60f111 -r d91760d89cbd source/encoder/analysis.cpp<br>
> --- a/source/encoder/analysis.cpp Mon Sep 07 15:20:53 2015 +0530<br>
> +++ b/source/encoder/analysis.cpp Mon Sep 07 16:53:55 2015 +0530<br>
> @@ -170,6 +170,9 @@<br>
> }<br>
> else<br>
> {<br>
> + ctu.bForceIntra = m_param->bIntraRefresh && m_slice->m_sliceType == P_SLICE &&<br>
> + ctu.m_cuPelX / g_maxCUSize >= frame.m_encData->m_pir->pirStartPelX && ctu.m_cuPelX / g_maxCUSize < frame.m_encData->m_pir->pirEndPelX;<br>
> +<br>
> if (!m_param->rdLevel)<br>
> {<br>
> /* In RD Level 0/1, copy source pixels into the reconstructed block so<br>
> @@ -828,7 +831,7 @@<br>
> bool splitIntra = true;<br>
> uint32_t splitRefs[4] = { 0, 0, 0, 0 };<br>
> /* Step 1. Evaluate Merge/Skip candidates for likely early-outs */<br>
> - if (mightNotSplit && depth >= minDepth)<br>
> + if (mightNotSplit && depth >= minDepth && !parentCTU.bForceIntra)<br>
> {<br>
> /* Compute Merge Cost */<br>
> md.pred[PRED_MERGE].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> @@ -909,7 +912,7 @@<br>
> if (m_slice->m_pps->bUseDQP && depth <= m_slice->m_pps->maxCuDQPDepth && m_slice->m_pps->maxCuDQPDepth != 0)<br>
> setLambdaFromQP(parentCTU, qp);<br>
><br>
> - if (!earlyskip)<br>
> + if (!earlyskip && !parentCTU.bForceIntra)<br>
> {<br>
> uint32_t refMasks[2];<br>
> refMasks[0] = allSplitRefs;<br>
> @@ -1119,7 +1122,21 @@<br>
> }<br>
> }<br>
> }<br>
> - } // !earlyskip<br>
> + }<br>
> + if (!earlyskip && parentCTU.bForceIntra)<br>
> + {<br>
> + ProfileCounter(parentCTU, totalIntraCU[cuGeom.depth]);<br>
> + md.pred[PRED_INTRA].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> + checkIntra(md.pred[PRED_INTRA], cuGeom, SIZE_2Nx2N, NULL, NULL);<br>
> + checkBestMode(md.pred[PRED_INTRA], depth);<br>
> +<br>
> + if (cuGeom.log2CUSize == 3 && m_slice->m_sps->quadtreeTULog2MinSize < 3)<br>
> + {<br>
> + md.pred[PRED_INTRA_NxN].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> + checkIntra(md.pred[PRED_INTRA_NxN], cuGeom, SIZE_NxN, NULL, NULL);<br>
> + checkBestMode(md.pred[PRED_INTRA_NxN], depth);<br>
> + }<br>
> + }// !earlyskip<br>
><br>
> if (m_bTryLossless)<br>
> tryLossless(cuGeom);<br>
> @@ -1189,23 +1206,36 @@<br>
> {<br>
> uint8_t* reuseDepth = &m_reuseInterDataCTU->depth[parentCTU.m_cuAddr * parentCTU.m_numPartitions];<br>
> uint8_t* reuseModes = &m_reuseInterDataCTU->modes[parentCTU.m_cuAddr * parentCTU.m_numPartitions];<br>
> - if (mightNotSplit && depth == reuseDepth[zOrder] && zOrder == cuGeom.absPartIdx && reuseModes[zOrder] == MODE_SKIP)<br>
> + if (!parentCTU.bForceIntra)<br>
> {<br>
> - md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> - md.pred[PRED_MERGE].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> - checkMerge2Nx2N_rd5_6(md.pred[PRED_SKIP], md.pred[PRED_MERGE], cuGeom, true);<br>
> + if (mightNotSplit && depth == reuseDepth[zOrder] && zOrder == cuGeom.absPartIdx && reuseModes[zOrder] == MODE_SKIP)<br>
> + {<br>
> + md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> + md.pred[PRED_MERGE].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> + checkMerge2Nx2N_rd5_6(md.pred[PRED_SKIP], md.pred[PRED_MERGE], cuGeom, true);<br>
><br>
> - if (m_bTryLossless)<br>
> - tryLossless(cuGeom);<br>
> + if (m_bTryLossless)<br>
> + tryLossless(cuGeom);<br>
><br>
> - if (mightSplit)<br>
> - addSplitFlagCost(*md.bestMode, cuGeom.depth);<br>
> + if (mightSplit)<br>
> + addSplitFlagCost(*md.bestMode, cuGeom.depth);<br>
><br>
> - // increment zOrder offset to point to next best depth in sharedDepth buffer<br>
> - zOrder += g_depthInc[g_maxCUDepth - 1][reuseDepth[zOrder]];<br>
> + // increment zOrder offset to point to next best depth in sharedDepth buffer<br>
> + zOrder += g_depthInc[g_maxCUDepth - 1][reuseDepth[zOrder]];<br>
><br>
> - mightSplit = false;<br>
> - mightNotSplit = false;<br>
> + mightSplit = false;<br>
> + mightNotSplit = false;<br>
> + }<br>
> + }<br>
> + else<br>
> + {<br>
> + char* reusePartSizes = &m_reuseIntraDataCTU->partSizes[parentCTU.m_cuAddr * parentCTU.m_numPartitions];<br>
> + uint8_t* reuseChromaModes = &m_reuseIntraDataCTU->chromaModes[parentCTU.m_cuAddr * parentCTU.m_numPartitions];<br>
> + PartSize size = (PartSize)reusePartSizes[zOrder];<br>
> + Mode& mode = size == SIZE_2Nx2N ? md.pred[PRED_INTRA] : md.pred[PRED_INTRA_NxN];<br>
> + int ipOffset = (int)(6.0 * X265_LOG2(m_param->rc.ipFactor) + 0.5);<br>
> + mode.cu.initSubCU(parentCTU, cuGeom, X265_MAX(mode.cu.m_qp[0] - ipOffset, QP_MIN));<br>
> + checkIntra(mode, cuGeom, size, &reuseModes[zOrder], &reuseChromaModes[zOrder]);<br>
> }<br>
> }<br>
><br>
> @@ -1213,7 +1243,7 @@<br>
> bool splitIntra = true;<br>
> uint32_t splitRefs[4] = { 0, 0, 0, 0 };<br>
> /* Step 1. Evaluate Merge/Skip candidates for likely early-outs */<br>
> - if (mightNotSplit)<br>
> + if (mightNotSplit && !parentCTU.bForceIntra)<br>
> {<br>
> md.pred[PRED_SKIP].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> md.pred[PRED_MERGE].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> @@ -1282,7 +1312,7 @@<br>
> if (m_slice->m_pps->bUseDQP && depth <= m_slice->m_pps->maxCuDQPDepth && m_slice->m_pps->maxCuDQPDepth != 0)<br>
> setLambdaFromQP(parentCTU, qp);<br>
><br>
> - if (!(foundSkip && m_param->bEnableEarlySkip))<br>
> + if (!(foundSkip && m_param->bEnableEarlySkip) && !parentCTU.bForceIntra)<br>
> {<br>
> uint32_t refMasks[2];<br>
> refMasks[0] = allSplitRefs;<br>
> @@ -1389,6 +1419,20 @@<br>
> }<br>
> }<br>
> }<br>
> + if (!(foundSkip && m_param->bEnableEarlySkip) && parentCTU.bForceIntra)<br>
> + {<br>
> + ProfileCounter(parentCTU, totalIntraCU[cuGeom.depth]);<br>
> + md.pred[PRED_INTRA].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> + checkIntra(md.pred[PRED_INTRA], cuGeom, SIZE_2Nx2N, NULL, NULL);<br>
> + checkBestMode(md.pred[PRED_INTRA], depth);<br>
> +<br>
> + if (cuGeom.log2CUSize == 3 && m_slice->m_sps->quadtreeTULog2MinSize < 3)<br>
> + {<br>
> + md.pred[PRED_INTRA_NxN].cu.initSubCU(parentCTU, cuGeom, qp);<br>
> + checkIntra(md.pred[PRED_INTRA_NxN], cuGeom, SIZE_NxN, NULL, NULL);<br>
> + checkBestMode(md.pred[PRED_INTRA_NxN], depth);<br>
> + }<br>
> + }<br>
><br>
> if (m_bTryLossless)<br>
> tryLossless(cuGeom);<br>
> @@ -1464,7 +1508,13 @@<br>
> (candMvField[i][0].mv.y >= (m_param->searchRange + 1) * 4 ||<br>
> candMvField[i][1].mv.y >= (m_param->searchRange + 1) * 4))<br>
> continue;<br>
> -<br>
> + if (m_param->bIntraRefresh && m_slice->m_sliceType == P_SLICE)<br>
> + {<br>
> + int maxX = (m_slice->m_refFrameList[0][0]->m_encData->m_pir->pirEndPelX * 16 - 3) * 4;<br>
> + int maxMv = maxX - 4 * 16 * candMvField[i][0].mv.x;<br>
> + if (maxMv > 0 && tempPred->cu.m_cuPelX < m_frame->m_encData->m_pir->pirEndPelX)<br>
> + continue;<br>
> + }<br>
> tempPred->cu.m_mvpIdx[0][0] = (uint8_t)i; // merge candidate ID is stored in L0 MVP idx<br>
> X265_CHECK(m_slice->m_sliceType == B_SLICE || !(candDir[i] & 0x10), " invalid merge for P slice\n");<br>
> tempPred->cu.m_interDir[0] = candDir[i];<br>
> @@ -1592,7 +1642,13 @@<br>
> continue;<br>
> triedBZero = true;<br>
> }<br>
> -<br>
> + if (m_param->bIntraRefresh && m_slice->m_sliceType == P_SLICE)<br>
> + {<br>
> + int maxX = (m_slice->m_refFrameList[0][0]->m_encData->m_pir->pirEndPelX * 16 - 3) * 4;<br>
> + int maxMv = maxX - 4 * 16 * candMvField[i][0].mv.x;<br>
> + if (maxMv > 0 && tempPred->cu.m_cuPelX < m_frame->m_encData->m_pir->pirEndPelX)<br>
> + continue;<br>
> + }<br>
> tempPred->cu.m_mvpIdx[0][0] = (uint8_t)i; /* merge candidate ID is stored in L0 MVP idx */<br>
> tempPred->cu.m_interDir[0] = candDir[i];<br>
> tempPred->cu.m_mv[0][0] = candMvField[i][0].mv;<br>
> diff -r 2ba81f60f111 -r d91760d89cbd source/encoder/api.cpp<br>
> --- a/source/encoder/api.cpp Mon Sep 07 15:20:53 2015 +0530<br>
> +++ b/source/encoder/api.cpp Mon Sep 07 16:53:55 2015 +0530<br>
> @@ -245,6 +245,12 @@<br>
> }<br>
> }<br>
><br>
> +void x265_encoder_intra_refresh(x265_encoder *enc)<br>
> +{<br>
> + Encoder *encoder = static_cast<Encoder*>(enc);<br>
<br>
</div></div>do not crash if enc is NULL<br>
<div><div class="h5"><br>
> + encoder->m_param->bQueuedIntraRefresh = 1;<br>
> +}<br>
> +<br>
> void x265_cleanup(void)<br>
> {<br>
> if (!g_ctuSizeConfigured)<br>
> diff -r 2ba81f60f111 -r d91760d89cbd source/encoder/encoder.cpp<br>
> --- a/source/encoder/encoder.cpp Mon Sep 07 15:20:53 2015 +0530<br>
> +++ b/source/encoder/encoder.cpp Mon Sep 07 16:53:55 2015 +0530<br>
> @@ -767,6 +767,43 @@<br>
> if (m_param->rc.rateControlMode != X265_RC_CQP)<br>
> m_lookahead->getEstimatedPictureCost(frameEnc);<br>
><br>
> + if (m_param->bIntraRefresh)<br>
> + {<br>
> + Slice* slice = frameEnc->m_encData->m_slice;<br>
> + if (slice->m_sliceType == I_SLICE)<br>
> + {<br>
> + frameEnc->m_encData->m_pir->framesSinceLastPir = 0;<br>
> + m_param->bQueuedIntraRefresh = 0;<br>
> + /* PIR is currently only supported with ref == 1, so any intra frame effectively refreshes<br>
> + * the whole frame and counts as an intra refresh. */<br>
> + frameEnc->m_encData->m_pir->position = frameEnc->m_lowres.maxBlocksInRow;<br>
> + }<br>
> + else if (slice->m_sliceType == P_SLICE)<br>
> + {<br>
> + Frame* ref = frameEnc->m_encData->m_slice->m_refFrameList[0][0];<br>
> + int pocdiff = (frameEnc->m_poc - ref->m_poc);<br>
> + float increment = X265_MAX(((float)frameEnc->m_lowres.maxBlocksInRow - 1) / m_param->keyframeMax, 1);<br>
> + frameEnc->m_encData->m_pir->position = ref->m_encData->m_pir->position;<br>
> + frameEnc->m_encData->m_pir->framesSinceLastPir = ref->m_encData->m_pir->framesSinceLastPir + pocdiff;<br>
> + if (frameEnc->m_encData->m_pir->framesSinceLastPir >= m_param->keyframeMax ||<br>
> + (m_param->bQueuedIntraRefresh && frameEnc->m_encData->m_pir->position + 0.5 >= frameEnc->m_lowres.maxBlocksInRow))<br>
> + {<br>
> + frameEnc->m_encData->m_pir->position = 0;<br>
> + frameEnc->m_encData->m_pir->framesSinceLastPir = 0;<br>
> + m_param->bQueuedIntraRefresh = 0;<br>
> + frameEnc->m_lowres.bKeyframe = 1;<br>
> + }<br>
> + frameEnc->m_encData->m_pir->pirStartPelX = (uint32_t)(frameEnc->m_encData->m_pir->position + 0.5);<br>
> + frameEnc->m_encData->m_pir->position += increment * pocdiff;<br>
> + frameEnc->m_encData->m_pir->pirEndPelX = (uint32_t)(frameEnc->m_encData->m_pir->position + 0.5);<br>
> + /* If our intra refresh has reached the right side of the frame, we're done. */<br>
> + if (frameEnc->m_encData->m_pir->pirEndPelX >= frameEnc->m_lowres.maxBlocksInRow - 1)<br>
> + {<br>
> + frameEnc->m_encData->m_pir->position = frameEnc->m_lowres.maxBlocksInRow;<br>
> + frameEnc->m_encData->m_pir->pirEndPelX = frameEnc->m_lowres.maxBlocksInRow - 1;<br>
> + }<br>
> + }<br>
> + }<br>
> /* Allow FrameEncoder::compressFrame() to start in the frame encoder thread */<br>
> if (!curEncoder->startCompressFrame(frameEnc))<br>
> m_aborted = true;<br>
> diff -r 2ba81f60f111 -r d91760d89cbd source/encoder/slicetype.cpp<br>
> --- a/source/encoder/slicetype.cpp Mon Sep 07 15:20:53 2015 +0530<br>
> +++ b/source/encoder/slicetype.cpp Mon Sep 07 16:53:55 2015 +0530<br>
> @@ -774,6 +774,7 @@<br>
> for (uint32_t cnt = 0; cnt < scale && lowresRow < heightInLowresCu; lowresRow++, cnt++)<br>
> {<br>
> sum = 0; intraSum = 0;<br>
> + int diff = 0;<br>
> lowresCuIdx = lowresRow * widthInLowresCu;<br>
> for (lowresCol = 0; lowresCol < widthInLowresCu; lowresCol++, lowresCuIdx++)<br>
> {<br>
> @@ -781,14 +782,18 @@<br>
> if (qp_offset)<br>
> {<br>
> lowresCuCost = (uint16_t)((lowresCuCost * x265_exp2fix8(qp_offset[lowresCuIdx]) + 128) >> 8);<br>
> - int32_t intraCuCost = curFrame->m_lowres.intraCost[lowresCuIdx];<br>
> + int32_t intraCuCost = curFrame->m_lowres.intraCost[lowresCuIdx];<br>
> curFrame->m_lowres.intraCost[lowresCuIdx] = (intraCuCost * x265_exp2fix8(qp_offset[lowresCuIdx]) + 128) >> 8;<br>
> }<br>
> + if (m_param->bIntraRefresh && slice->m_sliceType == X265_TYPE_P)<br>
> + for (uint32_t x = curFrame->m_encData->m_pir->pirStartPelX; x <= curFrame->m_encData->m_pir->pirEndPelX; x++)<br>
> + diff += curFrame->m_lowres.intraCost[lowresCuIdx] - lowresCuCost;<br>
> curFrame->m_lowres.lowresCostForRc[lowresCuIdx] = lowresCuCost;<br>
> sum += lowresCuCost;<br>
> intraSum += curFrame->m_lowres.intraCost[lowresCuIdx];<br>
> }<br>
> curFrame->m_encData->m_rowStat[row].satdForVbv += sum;<br>
> + curFrame->m_encData->m_rowStat[row].satdForVbv += diff;<br>
> curFrame->m_encData->m_rowStat[row].intraSatdForVbv += intraSum;<br>
> }<br>
> }<br>
> @@ -900,8 +905,7 @@<br>
> x265_log(m_param, X265_LOG_WARNING, "B-ref at frame %d incompatible with B-pyramid and %d reference frames\n",<br>
> frm.sliceType, m_param->maxNumReferences);<br>
> }<br>
> -<br>
> - if (/* (!param->intraRefresh || frm.frameNum == 0) && */ frm.frameNum - m_lastKeyframe >= m_param->keyframeMax)<br>
> + if ((!m_param->bIntraRefresh || frm.frameNum == 0) && frm.frameNum - m_lastKeyframe >= m_param->keyframeMax)<br>
> {<br>
> if (frm.sliceType == X265_TYPE_AUTO || frm.sliceType == X265_TYPE_I)<br>
> frm.sliceType = m_param->bOpenGOP && m_lastKeyframe >= 0 ? X265_TYPE_I : X265_TYPE_IDR;<br>
> @@ -1184,7 +1188,7 @@<br>
> frames[framecnt + 1] = NULL;<br>
><br>
> keyintLimit = m_param->keyframeMax - frames[0]->frameNum + m_lastKeyframe - 1;<br>
> - origNumFrames = numFrames = X265_MIN(framecnt, keyintLimit);<br>
> + origNumFrames = numFrames = m_param->bIntraRefresh ? framecnt : X265_MIN(framecnt, keyintLimit);<br>
><br>
> if (bIsVbvLookahead)<br>
> numFrames = framecnt;<br>
> @@ -1384,7 +1388,7 @@<br>
> if (m_param->rc.cuTree)<br>
> cuTree(frames, X265_MIN(numFrames, m_param->keyframeMax), bKeyframe);<br>
><br>
> - // if (!param->bIntraRefresh)<br>
> + if (!m_param->bIntraRefresh)<br>
<br>
</div></div>w/s<br>
<div><div class="h5"><br>
> for (int j = keyintLimit + 1; j <= numFrames; j += m_param->keyframeMax)<br>
> {<br>
> frames[j]->sliceType = X265_TYPE_I;<br>
> @@ -1504,7 +1508,7 @@<br>
> {<br>
> if (m_param->keyframeMin == m_param->keyframeMax)<br>
> threshMin = threshMax;<br>
> - if (gopSize <= m_param->keyframeMin / 4)<br>
> + if (gopSize <= m_param->keyframeMin / 4 || m_param->bIntraRefresh)<br>
> bias = threshMin / 4;<br>
> else if (gopSize <= m_param->keyframeMin)<br>
> bias = threshMin * gopSize / m_param->keyframeMin;<br>
> diff -r 2ba81f60f111 -r d91760d89cbd source/x265.h<br>
> --- a/source/x265.h Mon Sep 07 15:20:53 2015 +0530<br>
> +++ b/source/x265.h Mon Sep 07 16:53:55 2015 +0530<br>
> @@ -707,6 +707,8 @@<br>
> * big keyframe, the keyframe is "spread" over many frames. */<br>
> int bIntraRefresh;<br>
><br>
> + int bQueuedIntraRefresh;<br>
> +<br>
> /*== Coding Unit (CU) definitions ==*/<br>
><br>
> /* Maximum CU width and height in pixels. The size must be 64, 32, or 16.<br>
> @@ -1373,6 +1375,22 @@<br>
> * close an encoder handler */<br>
> void x265_encoder_close(x265_encoder *);<br>
><br>
> +/* x265_encoder_intra_refresh:<br>
> + * If an intra refresh is not in progress, begin one with the next P-frame.<br>
> + * If an intra refresh is in progress, begin one as soon as the current one finishes.<br>
> + * Requires bIntraRefresh to be set.<br>
> + *<br>
> + * Useful for interactive streaming where the client can tell the server that packet loss has<br>
> + * occurred. In this case, keyint can be set to an extremely high value so that intra refreshes<br>
> + * occur only when calling x265_encoder_intra_refresh.<br>
> + *<br>
> + * In multi-pass encoding, if x265_encoder_intra_refresh is called differently in each pass,<br>
> + * behavior is undefined.<br>
> + *<br>
> + * Should not be called during an x265_encoder_encode. */<br>
> +<br>
> +void x265_encoder_intra_refresh(x265_encoder *);<br>
> +<br>
> /* x265_cleanup:<br>
> * release library static allocations, reset configured CTU size */<br>
> void x265_cleanup(void);<br>
<br>
</div></div>New APIs must be added to .<a href="http://defs.in" rel="noreferrer" target="_blank">defs.in</a> and to the end of the API struct<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Steve Borho<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</font></span></blockquote></div><br></div>