[x264-devel] commit: Fix bug in b-adapt 1 (Jason Garrett-Glaser )

git version control git at videolan.org
Mon Aug 17 20:30:35 CEST 2009


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Fri Aug 14 07:20:07 2009 -0700| [1febc6bd5dc4f625049273f4d86472ed770e3882] | committer: Jason Garrett-Glaser 

Fix bug in b-adapt 1
B-adapt 1 didn't use more than MAX(1,bframes-1) B-frames when MB-tree was off.

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

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

diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index 2d8c8fd..03431b2 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -739,7 +739,7 @@ static void x264_slicetype_analyse( x264_t *h, int keyframe )
                 frames[i+1]->i_type = X264_TYPE_B;
                 frames[i+2]->i_type = X264_TYPE_P;
 
-                for( j = i+2; j <= X264_MIN( h->param.i_bframe, num_frames-2 ); j++ )
+                for( j = i+2; j <= X264_MIN( h->param.i_bframe, num_frames-1 ); j++ )
                 {
                     int pthresh = X264_MAX(INTER_THRESH - P_SENS_BIAS * (j-i-1), INTER_THRESH/10);
                     int pcost = x264_slicetype_frame_cost( h, &a, frames, i+0, j+1, j+1, 1 );



More information about the x264-devel mailing list