From 768561ada96cd0149ed115748c95a32357676b38 Mon Sep 17 00:00:00 2001 From: jstebbins Date: Sat, 15 Jun 2013 17:24:35 +0000 Subject: improve aac encoder build options and change some aac encoder defaults By default, faac is no longer built. Libav aac is now the default aac encoder on all platforms except osx where ca_aac is the default. fdk-aac is now built by default (except on osx). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5581 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- libhb/common.c | 9 ++++----- libhb/encfaac.c | 3 ++- libhb/hb.c | 2 ++ libhb/module.defs | 10 ++++++++++ 4 files changed, 18 insertions(+), 6 deletions(-) (limited to 'libhb') diff --git a/libhb/common.c b/libhb/common.c index bdfefa3f9..2a090e638 100644 --- a/libhb/common.c +++ b/libhb/common.c @@ -229,10 +229,10 @@ hb_encoder_internal_t hb_audio_encoders[] = // actual encoders { { "AAC (CoreAudio)", "ca_aac", HB_ACODEC_CA_AAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC, }, { { "HE-AAC (CoreAudio)", "ca_haac", HB_ACODEC_CA_HAAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC_HE, }, - { { "AAC (FDK)", "fdk_aac", HB_ACODEC_FDK_AAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC, }, - { { "HE-AAC (FDK)", "fdk_haac", HB_ACODEC_FDK_HAAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC_HE, }, { { "AAC (faac)", "faac", HB_ACODEC_FAAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC, }, { { "AAC (ffmpeg)", "ffaac", HB_ACODEC_FFAAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC, }, + { { "AAC (FDK)", "fdk_aac", HB_ACODEC_FDK_AAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC, }, + { { "HE-AAC (FDK)", "fdk_haac", HB_ACODEC_FDK_HAAC, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC_HE, }, { { "AAC Passthru", "copy:aac", HB_ACODEC_AAC_PASS, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AAC_PASS, }, { { "AC3 (ffmpeg)", "ffac3", HB_ACODEC_AC3, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AC3, }, { { "AC3 Passthru", "copy:ac3", HB_ACODEC_AC3_PASS, HB_MUX_MASK_MP4|HB_MUX_MASK_MKV, }, NULL, 1, HB_GID_ACODEC_AC3_PASS, }, @@ -261,12 +261,12 @@ static int hb_audio_encoder_is_enabled(int encoder) return 1; #endif -#if 1 //#ifdef USE_FAAC +#ifdef USE_FAAC case HB_ACODEC_FAAC: return 1; #endif -#if 1 //#ifdef USE_LIBAV_AAC +#ifdef USE_LIBAV_AAC case HB_ACODEC_FFAAC: return 1; #endif @@ -1314,7 +1314,6 @@ int hb_mixdown_has_codec_support(int mixdown, uint32_t codec) return (mixdown <= HB_AMIXDOWN_7POINT1); case HB_ACODEC_LAME: - case HB_ACODEC_FFAAC: return (mixdown <= HB_AMIXDOWN_DOLBYPLII); case HB_ACODEC_FAAC: diff --git a/libhb/encfaac.c b/libhb/encfaac.c index ffdddc8d4..3bdd7cee0 100644 --- a/libhb/encfaac.c +++ b/libhb/encfaac.c @@ -7,6 +7,7 @@ For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html */ +#ifdef USE_FAAC #include "hb.h" #include "audio_remap.h" @@ -286,4 +287,4 @@ int encfaacWork( hb_work_object_t * w, hb_buffer_t ** buf_in, return HB_WORK_OK; } - +#endif // USE_FAAC diff --git a/libhb/hb.c b/libhb/hb.c index a55575f8e..0c475abd2 100644 --- a/libhb/hb.c +++ b/libhb/hb.c @@ -1645,7 +1645,9 @@ int hb_global_init() hb_register(&hb_encca_aac); hb_register(&hb_encca_haac); #endif +#ifdef USE_FAAC hb_register(&hb_encfaac); +#endif hb_register(&hb_enclame); hb_register(&hb_enctheora); hb_register(&hb_encvorbis); diff --git a/libhb/module.defs b/libhb/module.defs index bb7ffccb5..bd300bafb 100644 --- a/libhb/module.defs +++ b/libhb/module.defs @@ -40,6 +40,12 @@ endif ifeq (1,$(FEATURE.fdk_aac)) LIBHB.GCC.D += USE_FDK_AAC endif +ifeq (1,$(FEATURE.libav_aac)) +LIBHB.GCC.D += USE_LIBAV_AAC +endif +ifeq (1,$(FEATURE.faac)) +LIBHB.GCC.D += USE_FAAC +endif LIBHB.GCC.D += __LIBHB__ USE_PTHREAD LIBHB.GCC.I += $(LIBHB.build/) $(CONTRIB.build/)include @@ -104,6 +110,10 @@ ifeq (1,$(FEATURE.fdk_aac)) LIBHB.dll.libs += $(CONTRIB.build/)lib/libfdk-aac.a endif +ifeq (1,$(FEATURE.faac)) +LIBHB.dll.libs += $(CONTRIB.build/)lib/libfaac.a +endif + ifneq ($(HAS.iconv),1) LIBHB.dll.libs += $(CONTRIB.build/)lib/libiconv.a else -- cgit v1.2.3