<div dir="ltr">This patch has been pushed to the master branch. <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><b>__________________________</b></div><div><b>Karam Singh</b></div><div><b>Ph.D. IIT Guwahati</b></div><div><font size="1">Senior Software (Video Coding) Engineer </font></div><div><font size="1">Mobile: +91 8011279030</font></div><div><font size="1">Block 9A, 6th floor, DLF Cyber City</font></div><div><font size="1">Manapakkam, Chennai 600 089</font></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Sep 12, 2024 at 5:55 PM Anusuya Kumarasamy <<a href="mailto:anusuya.kumarasamy@multicorewareinc.com">anusuya.kumarasamy@multicorewareinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">From b5d9bc355bb68cd789679f1f6c0c27286b4fa6e5 Mon Sep 17 00:00:00 2001<br>From: AnusuyaKumarasamy <<a href="mailto:anusuya.kumarasamy@multicorewareinc.com" target="_blank">anusuya.kumarasamy@multicorewareinc.com</a>><br>Date: Tue, 10 Sep 2024 16:37:51 +0530<br>Subject: [PATCH] Fix issue in default code flow & memory leak<br><br>---<br> source/encoder/dpb.cpp | 7 ++++++-<br> source/x265cli.cpp | 11 ++++++++++-<br> 2 files changed, 16 insertions(+), 2 deletions(-)<br><br>diff --git a/source/encoder/dpb.cpp b/source/encoder/dpb.cpp<br>index 19480d7ca..caf73ad6d 100644<br>--- a/source/encoder/dpb.cpp<br>+++ b/source/encoder/dpb.cpp<br>@@ -289,7 +289,12 @@ void DPB::prepareEncode(Frame *newFrame)<br> slice->m_numRefIdx[0] = x265_clip3(1, newFrame->m_param->maxNumReferences, numRef + newFrame->refPicSetInterLayer0.size() + newFrame->refPicSetInterLayer1.size());<br> else<br> slice->m_numRefIdx[0] = X265_MIN(newFrame->m_param->maxNumReferences, numRef); // Ensuring L0 contains just the -ve POC<br>- slice->m_numRefIdx[1] = X265_MIN(newFrame->m_param->bBPyramid ? 3 : 2, slice->m_rps.numberOfPositivePictures + newFrame->refPicSetInterLayer0.size() + newFrame->refPicSetInterLayer1.size());<br>+#if ENABLE_MULTIVIEW || ENABLE_SCC_EXT<br>+ if(slice->m_param->numViews > 1 || !!slice->m_param->bEnableSCC)<br>+ slice->m_numRefIdx[1] = X265_MIN(newFrame->m_param->bBPyramid ? 3 : 2, slice->m_rps.numberOfPositivePictures + newFrame->refPicSetInterLayer0.size() + newFrame->refPicSetInterLayer1.size());<br>+ else<br>+#endif<br>+ slice->m_numRefIdx[1] = X265_MIN(newFrame->m_param->bBPyramid ? 2 : 1, slice->m_rps.numberOfPositivePictures);<br> slice->setRefPicList(m_picList, newFrame->refPicSetInterLayer0, newFrame->refPicSetInterLayer1, layer);<br> <br> X265_CHECK(slice->m_sliceType != B_SLICE || slice->m_numRefIdx[1], "B slice without L1 references (non-fatal)\n");<br>diff --git a/source/x265cli.cpp b/source/x265cli.cpp<br>index 89852c701..ca7d9c973 100755<br>--- a/source/x265cli.cpp<br>+++ b/source/x265cli.cpp<br>@@ -738,7 +738,7 @@ namespace X265_NS {<br> OPT("frames") this->framesToBeEncoded = (uint32_t)x265_atoi(optarg, bError);<br> OPT("no-progress") this->bProgress = false;<br> OPT("output") outputfn = optarg;<br>- OPT("input") inputfn[0] = optarg;<br>+ OPT("input") strcpy(inputfn[0] , optarg);<br> OPT("recon") reconfn[0] = optarg;<br> OPT("input-depth") inputBitDepth = (uint32_t)x265_atoi(optarg, bError);<br> OPT("dither") this->bDither = true;<br>@@ -1034,6 +1034,15 @@ namespace X265_NS {<br> return true;<br> }<br> general_log_file(param, this->output->getName(), X265_LOG_INFO, "output file: %s\n", outputfn);<br>+<br>+ for (int view = 0; view < MAX_VIEWS; view++)<br>+ {<br>+ if (inputfn[view] != NULL)<br>+ {<br>+ X265_FREE(inputfn[view]);<br>+ inputfn[view] = NULL;<br>+ }<br>+ }<br> return false;<br> }<br> <br>-- <br>2.36.0.windows.1<br><br></div>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">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>
</blockquote></div>