Re: [x265] [PATCH] vbv: clear row diagonal Satd costs, cu Satd costs when vbv row reset is triggered

2014-04-15 Thread Steve Borho
On Tue, Apr 15, 2014 at 11:34 AM,  aar...@multicorewareinc.com wrote:
 # HG changeset patch
 # User Aarthi Thirumalai
 # Date 1397579661 -19800
 #  Tue Apr 15 22:04:21 2014 +0530
 # Node ID bf48002755a3f5593732ca039ad38a3c799da808
 # Parent  0a95a6bb0f8e71d7a7d0f8e3803ec2878ad558fe
 vbv: clear row diagonal Satd costs, cu Satd costs when vbv row reset is 
 triggered.

 diff -r 0a95a6bb0f8e -r bf48002755a3 source/encoder/frameencoder.cpp
 --- a/source/encoder/frameencoder.cpp   Tue Apr 15 12:34:36 2014 +0900
 +++ b/source/encoder/frameencoder.cpp   Tue Apr 15 22:04:21 2014 +0530
 @@ -1192,6 +1192,8 @@
  m_pic-m_qpaRc[r] = 0;
  m_pic-m_rowEncodedBits[r] = 0;
  m_pic-m_numEncodedCusPerRow[r] = 0;
 +m_pic-m_rowDiagSatd[r] = 0;
 +m_pic-m_rowDiagIntraSatd[r] = 0;
  }

  m_bAllRowsStop = false;
 @@ -1248,6 +1250,13 @@
  x265_emms();
  double qp = baseQp;

 +/*clear cuCostsForVbv when vbv row reset is triggered. */
 +if (m_pic-m_cuCostsForVbv[cuAddr]  0 || 
 m_pic-m_intraCuCostsForVbv[cuAddr]  0)
 +{
 +m_pic-m_cuCostsForVbv[cuAddr] = 0;
 +m_pic-m_intraCuCostsForVbv[cuAddr] = 0;
 +}
 +

Can we just unconditionally clear these two values?

-- 
Steve Borho
___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel


Re: [x265] [PATCH] vbv: clear row diagonal Satd costs, cu Satd costs when vbv row reset is triggered

2014-04-15 Thread Aarthi Priya Thirumalai
On Tue, Apr 15, 2014 at 11:31 PM, Steve Borho st...@borho.org wrote:

 On Tue, Apr 15, 2014 at 11:34 AM,  aar...@multicorewareinc.com wrote:
  # HG changeset patch
  # User Aarthi Thirumalai
  # Date 1397579661 -19800
  #  Tue Apr 15 22:04:21 2014 +0530
  # Node ID bf48002755a3f5593732ca039ad38a3c799da808
  # Parent  0a95a6bb0f8e71d7a7d0f8e3803ec2878ad558fe
  vbv: clear row diagonal Satd costs, cu Satd costs when vbv row reset is
 triggered.
 
  diff -r 0a95a6bb0f8e -r bf48002755a3 source/encoder/frameencoder.cpp
  --- a/source/encoder/frameencoder.cpp   Tue Apr 15 12:34:36 2014 +0900
  +++ b/source/encoder/frameencoder.cpp   Tue Apr 15 22:04:21 2014 +0530
  @@ -1192,6 +1192,8 @@
   m_pic-m_qpaRc[r] = 0;
   m_pic-m_rowEncodedBits[r] = 0;
   m_pic-m_numEncodedCusPerRow[r] = 0;
  +m_pic-m_rowDiagSatd[r] = 0;
  +m_pic-m_rowDiagIntraSatd[r] = 0;
   }
 
   m_bAllRowsStop = false;
  @@ -1248,6 +1250,13 @@
   x265_emms();
   double qp = baseQp;
 
  +/*clear cuCostsForVbv when vbv row reset is triggered. */
  +if (m_pic-m_cuCostsForVbv[cuAddr]  0 ||
 m_pic-m_intraCuCostsForVbv[cuAddr]  0)
  +{
  +m_pic-m_cuCostsForVbv[cuAddr] = 0;
  +m_pic-m_intraCuCostsForVbv[cuAddr] = 0;
  +}
  +

 Can we just unconditionally clear these two values?

 yea, we can remove the if condition and clear them always.. they will be
normally be  0 at this point unless the cus are again encoded after vbv row
resets in which case, we need to clear them necessarily.


 --
 Steve Borho
 ___
 x265-devel mailing list
 x265-devel@videolan.org
 https://mailman.videolan.org/listinfo/x265-devel

___
x265-devel mailing list
x265-devel@videolan.org
https://mailman.videolan.org/listinfo/x265-devel