X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=libhb%2Fenctheora.c;h=29dfed1b57b0706be5653160f39ed8a53f900d96;hb=0e837e1066f170d64015a8e1385cea5b4a55d357;hp=c2df9d9a677766db97dd4026b0e86fa65f95acd2;hpb=5846d37d995f4b03815c58b736305d6e7f8c51ce;p=handbrake-jp%2Fhandbrake-jp-git.git diff --git a/libhb/enctheora.c b/libhb/enctheora.c index c2df9d9a..29dfed1b 100644 --- a/libhb/enctheora.c +++ b/libhb/enctheora.c @@ -42,10 +42,10 @@ int enctheoraInit( hb_work_object_t * w, hb_job_t * job ) ti.offset_x = ti.offset_y = 0; ti.fps_numerator = job->vrate; ti.fps_denominator = job->vrate_base; - if (job->pixel_ratio) + if( job->anamorphic.mode ) { - ti.aspect_numerator = job->pixel_aspect_width; - ti.aspect_denominator = job->pixel_aspect_height; + ti.aspect_numerator = job->anamorphic.par_width; + ti.aspect_denominator = job->anamorphic.par_height; } else { @@ -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 ); @@ -148,7 +156,7 @@ int enctheoraWork( hb_work_object_t * w, hb_buffer_t ** buf_in, yuv.y = in->data; yuv.u = in->data + job->width * job->height; - yuv.v = in->data + yuv.uv_width * yuv.uv_height; + yuv.v = in->data + ( job->width * job->height ) + ( yuv.uv_width * yuv.uv_height ); theora_encode_YUVin(&pv->theora, &yuv);