[x265] [x265 Patch] Fix bug in frame-dup + multi pass
Akil
akil at multicorewareinc.com
Mon May 4 06:59:02 CEST 2020
# HG changeset patch
# User Akil Ayyappan R <akil at multicorewareinc.com>
# Date 1588239069 -19800
# Thu Apr 30 15:01:09 2020 +0530
# Node ID 8518472465d80f9a6648375fa0733050df366c5c
# Parent 37916f420742078b8b1f5fe231d9e5d7d7449705
Fix bug in frame-dup + multi pass
diff -r 37916f420742 -r 8518472465d8 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp Mon Jan 06 12:06:48 2020 +0530
+++ b/source/encoder/encoder.cpp Thu Apr 30 15:01:09 2020 +0530
@@ -5037,6 +5037,7 @@
X265_PARAM_VALIDATE(saveParam->chunkStart, sizeof(int), 1,
&m_param->chunkStart, chunk-start);
X265_PARAM_VALIDATE(saveParam->chunkEnd, sizeof(int), 1,
&m_param->chunkEnd, chunk-end);
X265_PARAM_VALIDATE(saveParam->ctuDistortionRefine, sizeof(int), 1,
&m_param->ctuDistortionRefine, ctu - distortion);
+ X265_PARAM_VALIDATE(saveParam->frameDuplication, sizeof(int), 1,
&m_param->bEnableFrameDuplication, frame - dup);
int sourceHeight, sourceWidth;
if (writeFlag)
diff -r 37916f420742 -r 8518472465d8 source/encoder/ratecontrol.cpp
--- a/source/encoder/ratecontrol.cpp Mon Jan 06 12:06:48 2020 +0530
+++ b/source/encoder/ratecontrol.cpp Thu Apr 30 15:01:09 2020 +0530
@@ -509,6 +509,7 @@
CMP_OPT_FIRST_PASS(" keyint", m_param->keyframeMax);
CMP_OPT_FIRST_PASS("scenecut", m_param->scenecutThreshold);
CMP_OPT_FIRST_PASS("intra-refresh",
m_param->bIntraRefresh);
+ CMP_OPT_FIRST_PASS("frame-dup",
m_param->bEnableFrameDuplication);
if (m_param->bMultiPassOptRPS)
{
CMP_OPT_FIRST_PASS("multi-pass-opt-rps",
m_param->bMultiPassOptRPS);
@@ -546,7 +547,7 @@
x265_log(m_param, X265_LOG_WARNING, "2nd pass has fewer
frames than 1st pass (%d vs %d)\n",
m_param->totalFrames, m_numEntries);
}
- if (m_param->totalFrames > m_numEntries)
+ if (m_param->totalFrames > m_numEntries &&
!m_param->bEnableFrameDuplication)
{
x265_log(m_param, X265_LOG_ERROR, "2nd pass has more
frames than 1st pass (%d vs %d)\n",
m_param->totalFrames, m_numEntries);
diff -r 37916f420742 -r 8518472465d8 source/x265.h
--- a/source/x265.h Mon Jan 06 12:06:48 2020 +0530
+++ b/source/x265.h Thu Apr 30 15:01:09 2020 +0530
@@ -134,6 +134,7 @@
int ctuDistortionRefine;
int rightOffset;
int bottomOffset;
+ int frameDuplication;
}x265_analysis_validate;
/* Stores intra analysis data for a single frame. This struct needs better
packing */
Thanks & Regards
*Akil R*
Video Codec Engineer
Media & AI Analytics
<https://multicorewareinc.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200504/0abd2229/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FD_multipass_bugfix.patch
Type: application/octet-stream
Size: 2612 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20200504/0abd2229/attachment.obj>
More information about the x265-devel
mailing list