[x264-devel] commit: Don't use 2 L1 refs with pyramid + ref=1 (Jason Garrett-Glaser )

git at videolan.org git at videolan.org
Tue Apr 6 21:48:27 CEST 2010


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Sun Mar 28 20:40:42 2010 -0700| [f9ff0031cbccf582faf3e9224f678926d70750b2] | committer: Jason Garrett-Glaser 

Don't use 2 L1 refs with pyramid + ref=1
Slightly faster encoding with ref=1.

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

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

diff --git a/encoder/encoder.c b/encoder/encoder.c
index 9f45e6a..0ef5017 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -957,7 +957,7 @@ x264_t *x264_encoder_open( x264_param_t *param )
     h->frames.i_bframe_delay = h->param.i_bframe ? (h->param.i_bframe_pyramid ? 2 : 1) : 0;
 
     h->frames.i_max_ref0 = h->param.i_frame_reference;
-    h->frames.i_max_ref1 = h->sps->vui.i_num_reorder_frames;
+    h->frames.i_max_ref1 = X264_MIN( h->sps->vui.i_num_reorder_frames, h->param.i_frame_reference );
     h->frames.i_max_dpb  = h->sps->vui.i_max_dec_frame_buffering;
     h->frames.b_have_lowres = !h->param.rc.b_stat_read
         && ( h->param.rc.i_rc_method == X264_RC_ABR



More information about the x264-devel mailing list