Slightly improved FhgAacEnc integration.

This commit is contained in:
LoRd_MuldeR 2011-08-19 19:25:01 +02:00
parent 84883ab519
commit e811a64534
21 changed files with 106 additions and 89 deletions

View File

@ -203,7 +203,8 @@ del "$(TargetDir)imageformats\q???d4.dll"
<FloatingPointModel>Fast</FloatingPointModel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<DebugInformationFormat>
</DebugInformationFormat>
<CreateHotpatchableImage>false</CreateHotpatchableImage>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<OpenMPSupport>false</OpenMPSupport>
@ -216,10 +217,9 @@ del "$(TargetDir)imageformats\q???d4.dll"
<ShowProgress>LinkVerboseLib</ShowProgress>
<AdditionalLibraryDirectories>$(SolutionDir)\etc\Prerequisites\qt4_static\lib;$(SolutionDir)\etc\Prerequisites\qt4_static\plugins\imageformats;$(SolutionDir)\etc\Prerequisites\EncodePointer\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateDebugInformation>true</GenerateDebugInformation>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AssemblyDebug>
</AssemblyDebug>
<MapExports>true</MapExports>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
@ -228,10 +228,11 @@ del "$(TargetDir)imageformats\q???d4.dll"
<TargetMachine>MachineX86</TargetMachine>
<MinimumRequiredVersion>5.0</MinimumRequiredVersion>
<EntryPointSymbol>lamexp_crt_startup</EntryPointSymbol>
<GenerateMapFile>true</GenerateMapFile>
<GenerateMapFile>false</GenerateMapFile>
<MapFileName>
</MapFileName>
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
<MapExports>false</MapExports>
</Link>
<PostBuildEvent>
<Command>

View File

@ -808,7 +808,7 @@
</message>
<message>
<location filename="../../gui/MainWindow.ui" line="769"/>
<source>Nero AAC</source>
<source>MPEG-4 AAC</source>
<translation type="unfinished"></translation>
</message>
<message>
@ -1461,7 +1461,7 @@
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="487"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2848"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2855"/>
<source>Access Denied</source>
<translation type="unfinished"></translation>
</message>
@ -1615,7 +1615,7 @@
<location filename="../../src/Dialog_MainWindow.cpp" line="933"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="1003"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="1550"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2806"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2813"/>
<source>Discard</source>
<translation type="unfinished"></translation>
</message>
@ -2012,114 +2012,114 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2447"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2450"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2453"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2459"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2454"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2457"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2460"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2466"/>
<source>Quality Level %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2456"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2476"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2496"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2463"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2483"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2503"/>
<source>Compression %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2462"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2482"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2502"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2469"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2489"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2509"/>
<source>Uncompressed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2526"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2533"/>
<source>Best Quality (Very Slow)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2529"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2536"/>
<source>High Quality (Recommended)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2532"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2539"/>
<source>Average Quality (Default)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2535"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2542"/>
<source>Low Quality (Fast)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2538"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2545"/>
<source>Poor Quality (Very Fast)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2795"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2802"/>
<source>File name without extension</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2796"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2803"/>
<source>Track number with leading zero</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2797"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2804"/>
<source>Track title</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2798"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2805"/>
<source>Artist name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2799"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2806"/>
<source>Album name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2800"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2807"/>
<source>Year with (at least) four digits</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2801"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2808"/>
<source>Comment</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2803"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2810"/>
<source>Characters forbidden in file names:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2806"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2813"/>
<source>Rename Macros</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2819"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2826"/>
<source>%1 Instance(s)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2848"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2855"/>
<source>Cannot write to the selected directory. Please choose another directory!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2915"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2922"/>
<source>Already Running</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../src/Dialog_MainWindow.cpp" line="2915"/>
<location filename="../../src/Dialog_MainWindow.cpp" line="2922"/>
<source>LameXP is already running, please use the running instance!</source>
<translation type="unfinished"></translation>
</message>

View File

@ -630,10 +630,6 @@
<source>Ogg Vorbis</source>
<translation></translation>
</message>
<message>
<source>Nero AAC</source>
<translation></translation>
</message>
<message>
<source>Wave (PCM)</source>
<translation></translation>
@ -1642,6 +1638,10 @@
<source>Bookmark Current Output Folder</source>
<translation>Lesezeichen für aktuelles Verzeichnis hinzufügen</translation>
</message>
<message>
<source>MPEG-4 AAC</source>
<translation></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -629,10 +629,6 @@
<source>Ogg Vorbis</source>
<translation>Ogg Vorbis</translation>
</message>
<message>
<source>Nero AAC</source>
<translation>Nero AAC</translation>
</message>
<message>
<source>Wave (PCM)</source>
<translation>Wav (PCM)</translation>
@ -1641,6 +1637,10 @@
<source>Bookmark Current Output Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MPEG-4 AAC</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -634,10 +634,6 @@
<source>Ogg Vorbis</source>
<translation>Ogg Vorbis</translation>
</message>
<message>
<source>Nero AAC</source>
<translation>Nero AAC</translation>
</message>
<message>
<source>Wave (PCM)</source>
<translation>Wave (PCM)</translation>
@ -1651,6 +1647,10 @@ Ouvrir le dossier récursivement...</translation>
<source>Bookmark Current Output Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MPEG-4 AAC</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -630,10 +630,6 @@
<source>Ogg Vorbis</source>
<translation>Ogg Vorbis</translation>
</message>
<message>
<source>Nero AAC</source>
<translation>Nero AAC</translation>
</message>
<message>
<source>Wave (PCM)</source>
<translation>Wave (PCM)</translation>
@ -1642,6 +1638,10 @@
<source>Bookmark Current Output Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MPEG-4 AAC</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -629,10 +629,6 @@
<source>Ogg Vorbis</source>
<translation type="unfinished">Ogg Vorbis</translation>
</message>
<message>
<source>Nero AAC</source>
<translation type="unfinished">Nero AAC</translation>
</message>
<message>
<source>Wave (PCM)</source>
<translation type="unfinished">Wave (PCM)</translation>
@ -1641,6 +1637,10 @@
<source>Bookmark Current Output Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MPEG-4 AAC</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -632,10 +632,6 @@
<source>Ogg Vorbis</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Nero AAC</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Wave (PCM)</source>
<translation type="unfinished"></translation>
@ -1647,6 +1643,10 @@
<source>Bookmark Current Output Folder</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>MPEG-4 AAC</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -630,10 +630,6 @@
<source>Ogg Vorbis</source>
<translation>Ogg Vorbis</translation>
</message>
<message>
<source>Nero AAC</source>
<translation>Nero AAC</translation>
</message>
<message>
<source>Wave (PCM)</source>
<translation>Wave (PCM)</translation>
@ -1642,6 +1638,10 @@
<source>Bookmark Current Output Folder</source>
<translation>Додати поточну теку до закладок</translation>
</message>
<message>
<source>MPEG-4 AAC</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -35,6 +35,7 @@
..\..\src\Dialog_Update.cpp
..\..\src\Dialog_WorkingBanner.cpp
..\..\src\Encoder_AAC.cpp
..\..\src\Encoder_AAC_FHG.cpp
..\..\src\Encoder_Abstract.cpp
..\..\src\Encoder_AC3.cpp
..\..\src\Encoder_FLAC.cpp
@ -99,6 +100,7 @@
..\..\src\Dialog_Update.h
..\..\src\Dialog_WorkingBanner.h
..\..\src\Encoder_AAC.h
..\..\src\Encoder_AAC_FHG.h
..\..\src\Encoder_Abstract.h
..\..\src\Encoder_AC3.h
..\..\src\Encoder_FLAC.h

View File

@ -766,7 +766,7 @@
<item row="0" column="3">
<widget class="QRadioButton" name="radioButtonEncoderAAC">
<property name="text">
<string>Nero AAC</string>
<string>MPEG-4 AAC</string>
</property>
</widget>
</item>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 13
#define VER_LAMEXP_BUILD 652
#define VER_LAMEXP_BUILD 654
///////////////////////////////////////////////////////////////////////////////
// Tools versions

View File

@ -2341,6 +2341,13 @@ void MainWindow::updateEncoder(int id)
radioButtonConstBitrate->setEnabled(false);
sliderBitrate->setEnabled(false);
break;
case SettingsModel::AACEncoder:
radioButtonModeQuality->setEnabled(true);
radioButtonModeAverageBitrate->setEnabled(!m_fhgEncoderAvailable);
if(m_fhgEncoderAvailable && radioButtonModeAverageBitrate->isChecked()) radioButtonConstBitrate->setChecked(true);
radioButtonConstBitrate->setEnabled(true);
sliderBitrate->setEnabled(true);
break;
default:
radioButtonModeQuality->setEnabled(true);
radioButtonModeAverageBitrate->setEnabled(true);

View File

@ -30,6 +30,8 @@
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))
inline int round(double x) { return static_cast<int>(floor((x < 0.0) ? x - 0.5 : x + 0.5)); }
FHGAACEncoder::FHGAACEncoder(void)
:
m_binary_enc(lamexp_lookup_tool("fhgaacenc.exe")),
@ -51,37 +53,39 @@ bool FHGAACEncoder::encode(const QString &sourceFile, const AudioFileModel &meta
{
QProcess process;
QStringList args;
int maxBitrate = 500;
if(m_configRCMode == SettingsModel::CBRMode)
{
switch(m_configProfile)
{
case 1:
args << "--profile" << "lc"; //Forces use of LC AAC profile
break;
case 2:
maxBitrate = 128;
args << "--profile" << "he"; //Forces use of HE AAC profile
break;
case 3:
maxBitrate = 56;
args << "--profile" << "hev2"; //Forces use of HEv2 AAC profile
break;
}
}
switch(m_configRCMode)
{
case SettingsModel::VBRMode:
args << "--vbr" << QString::number(max(1, min(5, m_configBitrate)));
break;
case SettingsModel::CBRMode:
args << "--cbr" << QString::number(max(32, min(500, (m_configBitrate * 8))));
args << "--cbr" << QString::number(max(32, min(maxBitrate, (m_configBitrate * 8))));
break;
case SettingsModel::ABRMode:
qWarning("FhgAacEnc does not support ABR mode -> failure!");
emit messageLogged("\nTHIS ENCODER DOES NOT SUPPORT AN \"ABR\" MODE !!!");
return false;
case SettingsModel::VBRMode:
args << "--vbr" << QString::number(round(static_cast<double>(m_configBitrate) / 5.0) + 1);
break;
default:
throw "Bad rate-control mode!";
break;
}
switch(m_configProfile)
{
case 1:
args << "--profile" << "lc"; //Forces use of LC AAC profile
break;
case 2:
args << "--profile" << "he"; //Forces use of HE AAC profile
break;
case 3:
args << "--profile" << "hev2"; //Forces use of HEv2 AAC profile
break;
}
args << "--dll" << m_binary_dll;

View File

@ -201,10 +201,13 @@ void SettingsModel::validate(void)
if(!(lamexp_check_tool("neroAacEnc.exe") && lamexp_check_tool("neroAacDec.exe") && lamexp_check_tool("neroAacTag.exe")))
{
if(this->compressionEncoder() == SettingsModel::AACEncoder)
if(!(lamexp_check_tool("fhgaacenc.exe") && lamexp_check_tool("enc_fhgaac.dll")))
{
qWarning("Nero encoder selected, but not available any more. Reverting to MP3!");
this->compressionEncoder(SettingsModel::MP3Encoder);
if(this->compressionEncoder() == SettingsModel::AACEncoder)
{
qWarning("AAC encoder selected, but not available any more. Reverting to MP3!");
this->compressionEncoder(SettingsModel::MP3Encoder);
}
}
}