diff options
author | jbrjake <[email protected]> | 2009-02-10 22:57:21 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2009-02-10 22:57:21 +0000 |
commit | ae6f965cd5438c9e9c09f3d6270ef811ecc94035 (patch) | |
tree | 9434d4da77809282400b7a5c2c84d981e938485d /libhb/encxvid.c | |
parent | a0ae27ea704a01f788c2137a45c5732081604d6a (diff) |
Allows direct setting of job->vquality from interfaces in the native QP scales used by XviD and Theora instead of requiring conversion to a percentage.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2136 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encxvid.c')
-rw-r--r-- | libhb/encxvid.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libhb/encxvid.c b/libhb/encxvid.c index 6feadb770..843d12adf 100644 --- a/libhb/encxvid.c +++ b/libhb/encxvid.c @@ -63,7 +63,7 @@ int encxvidInit( hb_work_object_t * w, hb_job_t * job ) case 0: memset( &single, 0, sizeof( single ) ); single.version = XVID_VERSION; - if( job->vquality < 0.0 || job->vquality > 1.0 ) + if( job->vquality < 0.0 ) { /* Rate control */ single.bitrate = 1000 * job->vbitrate; @@ -71,8 +71,16 @@ int encxvidInit( hb_work_object_t * w, hb_job_t * job ) } else { - /* Constant quantizer */ - pv->quant = 31 - job->vquality * 30; + if( job->vquality > 0 && job->vquality < 1 ) + { + /* Constant quantizer */ + pv->quant = 31 - job->vquality * 30; + } + else + { + pv->quant = job->vquality; + } + hb_log( "encxvid: encoding at constant quantizer %d", pv->quant ); } |