summaryrefslogtreecommitdiffstats
path: root/libhb/encavcodec.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2011-03-21 02:20:48 +0000
committerjstebbins <[email protected]>2011-03-21 02:20:48 +0000
commit01372381e86f1f89ab40cdf8c2a08b9a71bbca23 (patch)
tree47baa6104b656865606323a82f514ef8b39ba79d /libhb/encavcodec.c
parentfdef4b5164b56403a2a6710ffb5a605d0e434924 (diff)
Remove legacy % to RF mapping.
Although the % option has been gone for a while in the cli and gui's, there were some mappings happening in libhb and for preset imports. This removes the last vestages of % quality mapping. Thanks to Rodeo for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3857 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/encavcodec.c')
-rw-r--r--libhb/encavcodec.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c
index b2cebee64..a9d567016 100644
--- a/libhb/encavcodec.c
+++ b/libhb/encavcodec.c
@@ -212,7 +212,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
// the user to override.
if( job->vquality < 0.0 )
{
- /* Rate control */
+ /* Average bitrate */
context->bit_rate = 1000 * job->vbitrate;
// ffmpeg's mpeg2 encoder requires that the bit_rate_tolerance be >=
// bitrate * fps
@@ -224,20 +224,7 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job )
// These settings produce better image quality than
// what was previously used
context->flags |= CODEC_FLAG_QSCALE;
- if (job->vquality < 1.0)
- {
- float vquality;
- vquality = 31 - job->vquality * 31;
- // A value of 0 has undefined behavior
- // and ffmpeg qp has integral increments
- if (vquality < 1.0)
- vquality = 1.0;
- context->global_quality = FF_QP2LAMBDA * vquality + 0.5;
- }
- else
- {
- context->global_quality = FF_QP2LAMBDA * job->vquality + 0.5;
- }
+ context->global_quality = FF_QP2LAMBDA * job->vquality + 0.5;
hb_log( "encavcodec: encoding at constant quantizer %d",
context->global_quality );
}