[x264-devel] Fix bug in intra-refresh ratecontrol

Michael Stuurman git at videolan.org
Wed Apr 13 04:04:27 CEST 2011


x264 | branch: master | Michael Stuurman <michael.stuurman at gmail.com> | Thu Mar 31 13:45:22 2011 -0700| [86d1963f69b192037373d69aea5ede7fd6c352db] | committer: Jason Garrett-Glaser

Fix bug in intra-refresh ratecontrol
Row SATDs were slightly incorrect.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=86d1963f69b192037373d69aea5ede7fd6c352db
---

 encoder/slicetype.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index 1e0c80a..df20fcf 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -1653,7 +1653,7 @@ int x264_rc_analyse_slice( x264_t *h )
         int ip_factor = 256 * h->param.rc.f_ip_factor; /* fix8 */
         for( int y = 0; y < h->mb.i_mb_height; y++ )
         {
-            int mb_xy = y * h->mb.i_mb_stride;
+            int mb_xy = y * h->mb.i_mb_stride + h->fdec->i_pir_start_col;
             for( int x = h->fdec->i_pir_start_col; x <= h->fdec->i_pir_end_col; x++, mb_xy++ )
             {
                 int intra_cost = (h->fenc->i_intra_cost[mb_xy] * ip_factor + 128) >> 8;



More information about the x264-devel mailing list