[x264-devel] Fix reconfiguring to crf=0
Anton Mitrofanov
git at videolan.org
Thu Nov 8 00:55:02 CET 2012
x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Fri Oct 12 23:43:40 2012 +0400| [4dbfcd462ccdf065654d17c47e1d05d53f213bf1] | committer: Jason Garrett-Glaser
Fix reconfiguring to crf=0
Lossless mode can't currently be enabled mid-stream.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=4dbfcd462ccdf065654d17c47e1d05d53f213bf1
---
encoder/encoder.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/encoder/encoder.c b/encoder/encoder.c
index 095fef3..2e23d74 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -577,7 +577,7 @@ static int x264_validate_parameters( x264_t *h, int b_open )
h->param.rc.i_qp_constant = h->param.rc.f_rf_constant + QP_BD_OFFSET;
h->param.rc.i_bitrate = 0;
}
- if( (h->param.rc.i_rc_method == X264_RC_CQP || h->param.rc.i_rc_method == X264_RC_CRF)
+ if( b_open && (h->param.rc.i_rc_method == X264_RC_CQP || h->param.rc.i_rc_method == X264_RC_CRF)
&& h->param.rc.i_qp_constant == 0 )
{
h->mb.b_lossless = 1;
More information about the x264-devel
mailing list