diff options
-rw-r--r-- | libhb/encavcodec.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/libhb/encavcodec.c b/libhb/encavcodec.c index dbad69ca7..cb7693082 100644 --- a/libhb/encavcodec.c +++ b/libhb/encavcodec.c @@ -347,15 +347,20 @@ int encavcodecInit( hb_work_object_t * w, hb_job_t * job ) else if ( job->vcodec == HB_VCODEC_FFMPEG_VCE_H264 || job->vcodec == HB_VCODEC_FFMPEG_VCE_H265 ) { char quality[7]; + char qualityB[7]; + double adjustedQualityB = job->vquality + 2; + snprintf(quality, 7, "%.2f", job->vquality); + snprintf(qualityB, 7, "%.2f", adjustedQualityB); + av_dict_set( &av_opts, "rc", "cqp", 0 ); - + av_dict_set( &av_opts, "qp_i", quality, 0 ); av_dict_set( &av_opts, "qp_p", quality, 0 ); if ( job->vcodec != HB_VCODEC_FFMPEG_VCE_H265 ) { - av_dict_set( &av_opts, "qp_b", quality, 0 ); + av_dict_set( &av_opts, "qp_b", qualityB, 0 ); } hb_log( "encavcodec: encoding at CQ %.2f", job->vquality ); } |