From 660d1d8e3b1c605226a28c6d39a311e12698b6f6 Mon Sep 17 00:00:00 2001 From: Lynne Date: Fri, 21 May 2021 17:39:36 +0200 Subject: [PATCH] aacenc: make the twoloop coder the default This used to be the default, but was reverted as it was slower than the 'fast' coder by around 25%. Since our encoder is still not very good, change back to the twoloop coder by default. It has much better rate control management as well, making it closer to CBR, and it sounds much better. --- libavcodec/aacenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 219bf02163..aa223cf25f 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -1103,7 +1103,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) #define AACENC_FLAGS AV_OPT_FLAG_ENCODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM static const AVOption aacenc_options[] = { - {"aac_coder", "Coding algorithm", offsetof(AACEncContext, options.coder), AV_OPT_TYPE_INT, {.i64 = AAC_CODER_FAST}, 0, AAC_CODER_NB-1, AACENC_FLAGS, "coder"}, + {"aac_coder", "Coding algorithm", offsetof(AACEncContext, options.coder), AV_OPT_TYPE_INT, {.i64 = AAC_CODER_TWOLOOP}, 0, AAC_CODER_NB-1, AACENC_FLAGS, "coder"}, {"anmr", "ANMR method", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_ANMR}, INT_MIN, INT_MAX, AACENC_FLAGS, "coder"}, {"twoloop", "Two loop searching method", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_TWOLOOP}, INT_MIN, INT_MAX, AACENC_FLAGS, "coder"}, {"fast", "Default fast search", 0, AV_OPT_TYPE_CONST, {.i64 = AAC_CODER_FAST}, INT_MIN, INT_MAX, AACENC_FLAGS, "coder"},