[x264-devel] commit: Basic sanity checking of qpmax/qpmin options (Jason Garrett-Glaser )

git version control git at videolan.org
Wed Jul 30 23:27:48 CEST 2008


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Wed Jul 30 15:28:21 2008 -0600| [e5eeedc50570a564c3bd00eeabd857feff324158]

Basic sanity checking of qpmax/qpmin options

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

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

diff --git a/encoder/encoder.c b/encoder/encoder.c
index cb2d0ce..76fd145 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -421,6 +421,8 @@ static int x264_validate_parameters( x264_t *h )
         h->param.rc.i_qp_max = x264_clip3( (int)(X264_MAX3( qp_p, qp_i, qp_b ) + .999), 0, 51 );
         h->param.rc.i_aq_mode = 0;
     }
+    h->param.rc.i_qp_max = x264_clip3( h->param.rc.i_qp_max, 0, 51 );
+    h->param.rc.i_qp_min = x264_clip3( h->param.rc.i_qp_min, 0, h->param.rc.i_qp_max );
 
     if( ( h->param.i_width % 16 || h->param.i_height % 16 )
         && h->param.i_height != 1080 && !h->mb.b_lossless )



More information about the x264-devel mailing list