# HG changeset patch
# User Bhavna Hariharan <bha...@multicorewareinc.com>
# Date 1521693438 -19800
#      Thu Mar 22 10:07:18 2018 +0530
# Branch stable
# Node ID e1280b17edf7b3ff22a8a45fed935896802909b4
# Parent  22c127ff05d593cbe420f1cb4a57c39d5a885957
Deprecate support for refine inter 0 for scaled encodes.

diff -r 22c127ff05d5 -r e1280b17edf7 source/common/cudata.cpp
--- a/source/common/cudata.cpp  Thu Mar 01 15:35:06 2018 +0530
+++ b/source/common/cudata.cpp  Thu Mar 22 10:07:18 2018 +0530
@@ -1626,11 +1626,6 @@
                 dir |= (1 << list);
                 candMvField[count][list].mv = colmv;
                 candMvField[count][list].refIdx = refIdx;
-                if (m_encData->m_param->scaleFactor && 
m_encData->m_param->analysisSave && m_log2CUSize[0] < 4)
-                {
-                    MV dist(MAX_MV, MAX_MV);
-                    candMvField[count][list].mv = dist;
-                }
             }
         }
 
@@ -1790,14 +1785,7 @@
 
             int curRefPOC = m_slice->m_refPOCList[picList][refIdx];
             int curPOC = m_slice->m_poc;
-
-            if (m_encData->m_param->scaleFactor && 
m_encData->m_param->analysisSave && (m_log2CUSize[0] < 4))
-            {
-                MV dist(MAX_MV, MAX_MV);
-                pmv[numMvc++] = amvpCand[num++] = dist;
-            }
-            else
-                pmv[numMvc++] = amvpCand[num++] = 
scaleMvByPOCDist(neighbours[MD_COLLOCATED].mv[picList], curPOC, curRefPOC, 
colPOC, colRefPOC);
+            pmv[numMvc++] = amvpCand[num++] = 
scaleMvByPOCDist(neighbours[MD_COLLOCATED].mv[picList], curPOC, curRefPOC, 
colPOC, colRefPOC);
         }
     }
 
diff -r 22c127ff05d5 -r e1280b17edf7 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp        Thu Mar 01 15:35:06 2018 +0530
+++ b/source/encoder/encoder.cpp        Thu Mar 22 10:07:18 2018 +0530
@@ -2685,6 +2685,12 @@
         }
     }
 
+    if (p->scaleFactor && p->analysisLoad && !p->interRefine)
+    {
+        x265_log(p, X265_LOG_WARNING, "Inter refinement 0 is not supported 
with scaling. Enabling refine-inter 1.\n");
+        p->interRefine = 1;
+    }
+
     if (p->limitTU && p->interRefine)
     {
         x265_log(p, X265_LOG_WARNING, "Inter refinement does not support 
limitTU. Disabling limitTU.\n");
# HG changeset patch
# User Bhavna Hariharan <bha...@multicorewareinc.com>
# Date 1521693438 -19800
#      Thu Mar 22 10:07:18 2018 +0530
# Branch stable
# Node ID e1280b17edf7b3ff22a8a45fed935896802909b4
# Parent  22c127ff05d593cbe420f1cb4a57c39d5a885957
Deprecate support for refine inter 0 for scaled encodes.

diff -r 22c127ff05d5 -r e1280b17edf7 source/common/cudata.cpp
--- a/source/common/cudata.cpp	Thu Mar 01 15:35:06 2018 +0530
+++ b/source/common/cudata.cpp	Thu Mar 22 10:07:18 2018 +0530
@@ -1626,11 +1626,6 @@
                 dir |= (1 << list);
                 candMvField[count][list].mv = colmv;
                 candMvField[count][list].refIdx = refIdx;
-                if (m_encData->m_param->scaleFactor && m_encData->m_param->analysisSave && m_log2CUSize[0] < 4)
-                {
-                    MV dist(MAX_MV, MAX_MV);
-                    candMvField[count][list].mv = dist;
-                }
             }
         }
 
@@ -1790,14 +1785,7 @@
 
             int curRefPOC = m_slice->m_refPOCList[picList][refIdx];
             int curPOC = m_slice->m_poc;
-
-            if (m_encData->m_param->scaleFactor && m_encData->m_param->analysisSave && (m_log2CUSize[0] < 4))
-            {
-                MV dist(MAX_MV, MAX_MV);
-                pmv[numMvc++] = amvpCand[num++] = dist;
-            }
-            else
-                pmv[numMvc++] = amvpCand[num++] = scaleMvByPOCDist(neighbours[MD_COLLOCATED].mv[picList], curPOC, curRefPOC, colPOC, colRefPOC);
+            pmv[numMvc++] = amvpCand[num++] = scaleMvByPOCDist(neighbours[MD_COLLOCATED].mv[picList], curPOC, curRefPOC, colPOC, colRefPOC);
         }
     }
 
diff -r 22c127ff05d5 -r e1280b17edf7 source/encoder/encoder.cpp
--- a/source/encoder/encoder.cpp	Thu Mar 01 15:35:06 2018 +0530
+++ b/source/encoder/encoder.cpp	Thu Mar 22 10:07:18 2018 +0530
@@ -2685,6 +2685,12 @@
         }
     }
 
+    if (p->scaleFactor && p->analysisLoad && !p->interRefine)
+    {
+        x265_log(p, X265_LOG_WARNING, "Inter refinement 0 is not supported with scaling. Enabling refine-inter 1.\n");
+        p->interRefine = 1;
+    }
+
     if (p->limitTU && p->interRefine)
     {
         x265_log(p, X265_LOG_WARNING, "Inter refinement does not support limitTU. Disabling limitTU.\n");
_______________________________________________
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel

Reply via email to