OSDN Git Service

CLI: Missed file from SubRip - a symptom of too many views and patches
[handbrake-jp/handbrake-jp-git.git] / libhb / enctheora.c
index e340bad..29dfed1 100644 (file)
@@ -63,7 +63,7 @@ int enctheoraInit( hb_work_object_t * w, hb_job_t * job )
     ti.keyframe_mindistance = 8;
     ti.noise_sensitivity = 1;
     ti.sharpness = 0;
-    if (job->vquality < 0.0 || job->vquality > 1.0)
+    if (job->vquality < 0.0)
     {
         ti.target_bitrate = job->vbitrate * 1000;
         ti.keyframe_data_target_bitrate = job->vbitrate * 1000 * 1.5;
@@ -72,7 +72,15 @@ int enctheoraInit( hb_work_object_t * w, hb_job_t * job )
     else
     {
         ti.target_bitrate = 0;
-        ti.quality = 63 * job->vquality;
+        
+        if( job->vquality > 0 && job->vquality < 1 )
+        {
+            ti.quality = 63 * job->vquality;            
+        }
+        else
+        {
+            ti.quality = job->vquality;
+        }
     }
 
     theora_encode_init( &pv->theora, &ti );