summaryrefslogtreecommitdiffstats
path: root/libhb
diff options
context:
space:
mode:
Diffstat (limited to 'libhb')
-rw-r--r--libhb/common.c22
-rw-r--r--libhb/encavcodecaudio.c7
2 files changed, 29 insertions, 0 deletions
diff --git a/libhb/common.c b/libhb/common.c
index bca6e6956..7bb3f2a56 100644
--- a/libhb/common.c
+++ b/libhb/common.c
@@ -1288,6 +1288,21 @@ void hb_audio_quality_get_limits(uint32_t codec, float *low, float *high,
{
switch (codec)
{
+ case HB_ACODEC_FFAAC:
+ *direction = 0;
+ *granularity = 1.;
+ *low = 1.;
+ *high = 10.;
+ break;
+
+ case HB_ACODEC_FDK_HAAC:
+ case HB_ACODEC_FDK_AAC:
+ *direction = 0;
+ *granularity = 1.;
+ *low = 1.;
+ *high = 5.;
+ break;
+
case HB_ACODEC_LAME:
*direction = 1;
*granularity = 0.5;
@@ -1333,6 +1348,13 @@ float hb_audio_quality_get_default(uint32_t codec)
{
switch (codec)
{
+ case HB_ACODEC_FFAAC:
+ return 5.;
+
+ case HB_ACODEC_FDK_HAAC:
+ case HB_ACODEC_FDK_AAC:
+ return 3.;
+
case HB_ACODEC_LAME:
return 2.;
diff --git a/libhb/encavcodecaudio.c b/libhb/encavcodecaudio.c
index 78c993286..2f302b348 100644
--- a/libhb/encavcodecaudio.c
+++ b/libhb/encavcodecaudio.c
@@ -163,6 +163,13 @@ static int encavcodecaInit(hb_work_object_t *w, hb_job_t *job)
{
context->global_quality = audio->config.out.quality * FF_QP2LAMBDA;
context->flags |= CODEC_FLAG_QSCALE;
+ if (audio->config.out.codec == HB_ACODEC_FDK_AAC ||
+ audio->config.out.codec == HB_ACODEC_FDK_HAAC)
+ {
+ char vbr[2];
+ snprintf(vbr, 2, "%.1g", audio->config.out.quality);
+ av_dict_set(&av_opts, "vbr", vbr, 0);
+ }
}
if (audio->config.out.compression_level >= 0)