summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-08-16 18:58:59 +0100
committersr55 <[email protected]>2018-08-16 18:58:59 +0100
commit1525ccad8037d9fdfa80cda8701f519da6830d00 (patch)
treefa8969c6bbc777c17105d13805b5f299ab943e30 /libhb
parent5a796f25aff1d161622c7fde8a2230ef1be2ba43 (diff)
VCE: Small Adjustment to the Quality settings passed to ffmpeg. B-Frames +2 #1408
Diffstat (limited to 'libhb')
-rw-r--r--libhb/encavcodec.c9
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 );
}