[x264-devel] commit: Fix crash with intra-refresh + aq-mode 0 (Jason Garrett-Glaser )

git at videolan.org git at videolan.org
Sun Mar 28 04:44:18 CEST 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Sat Feb 27 14:26:02 2010 -0800| [7d533c57ee25a73c79b10ef7fb36324727e38582] | committer: Jason Garrett-Glaser 

Fix crash with intra-refresh + aq-mode 0

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

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

diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index bb2ed64..01b0de6 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -1397,7 +1397,10 @@ int x264_rc_analyse_slice( x264_t *h )
                 int intra_cost = (h->fenc->i_intra_cost[mb_xy] * ip_factor + 128) >> 8;
                 int inter_cost = h->fenc->lowres_costs[b-p0][p1-b][mb_xy];
                 int diff = intra_cost - inter_cost;
-                h->fdec->i_row_satd[y] += (diff * frames[b]->i_inv_qscale_factor[mb_xy] + 128) >> 8;
+                if( h->param.rc.i_aq_mode )
+                    h->fdec->i_row_satd[y] += (diff * frames[b]->i_inv_qscale_factor[mb_xy] + 128) >> 8;
+                else
+                    h->fdec->i_row_satd[y] += diff;
                 cost += diff;
             }
         }



More information about the x264-devel mailing list