Updated FAAD binary to v2.8.6 (2017-10-10), compiled with ICL 18.0 and MSVC 15.5.
This commit is contained in:
parent
fe5ff2996a
commit
d6b54169c2
@ -462,6 +462,11 @@ copy /Y "$(SolutionDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\i
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">false</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">false</ExcludedFromBuild>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="tmp\LameXP\QRC_Tools.faad-avx.cpp">
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="tmp\LameXP\QRC_Tools.faad-i686.cpp">
|
<ClCompile Include="tmp\LameXP\QRC_Tools.faad-i686.cpp">
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
@ -2397,6 +2402,21 @@ copy /Y "$(SolutionDir)\..\Prerequisites\Qt4\$(PlatformToolset)\Shared\plugins\i
|
|||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="res\Tools.faad-avx.qrc">
|
||||||
|
<FileType>Document</FileType>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp" -no-compress -name "%(Filename)" "%(FullPath)"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">"$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp" -no-compress -name "%(Filename)" "%(FullPath)"</Command>
|
||||||
|
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -o "$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp" -no-compress -name "%(Filename)" "%(FullPath)"</Command>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">RCC "$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp"</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">RCC "$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp"</Message>
|
||||||
|
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">RCC "$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp"</Message>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp;%(Outputs)</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp;%(Outputs)</Outputs>
|
||||||
|
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)tmp\$(ProjectName)\QRC_%(Filename).cpp;%(Outputs)</Outputs>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_Static|Win32'">false</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||||
|
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||||
|
</CustomBuild>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="LameXP.rc">
|
<ResourceCompile Include="LameXP.rc">
|
||||||
|
@ -574,6 +574,9 @@
|
|||||||
<ClCompile Include="tmp\LameXP\QRC_Tools.refalac-sse2.cpp">
|
<ClCompile Include="tmp\LameXP\QRC_Tools.refalac-sse2.cpp">
|
||||||
<Filter>Generated Files\QRC</Filter>
|
<Filter>Generated Files\QRC</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="tmp\LameXP\QRC_Tools.faad-avx.cpp">
|
||||||
|
<Filter>Generated Files\QRC</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="src\Config.h">
|
<ClInclude Include="src\Config.h">
|
||||||
@ -1079,13 +1082,14 @@
|
|||||||
<CustomBuild Include="res\_ALL.qrc">
|
<CustomBuild Include="res\_ALL.qrc">
|
||||||
<Filter>Resources</Filter>
|
<Filter>Resources</Filter>
|
||||||
</CustomBuild>
|
</CustomBuild>
|
||||||
|
<CustomBuild Include="res\Tools.refalac-sse2.qrc" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="ReadMe.txt" />
|
<None Include="ReadMe.txt" />
|
||||||
<None Include="res\MainIcon.ico">
|
<None Include="res\MainIcon.ico">
|
||||||
<Filter>Miscellaneous</Filter>
|
<Filter>Miscellaneous</Filter>
|
||||||
</None>
|
</None>
|
||||||
<None Include="res\Tools.refalac-sse2.qrc">
|
<None Include="res\Tools.faad-avx.qrc">
|
||||||
<Filter>Resources</Filter>
|
<Filter>Resources</Filter>
|
||||||
</None>
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
File diff suppressed because one or more lines are too long
@ -11,6 +11,7 @@ LameXP Audio-Encoder Front-End – Changelog
|
|||||||
* Updated mpg123 decoder to v1.25.8 (2017-12-02), compiled with GCC 7.2.0
|
* Updated mpg123 decoder to v1.25.8 (2017-12-02), compiled with GCC 7.2.0
|
||||||
* Updated Opus encoder/decoder libraries to v1.2.1-35 (2017-11-16) and Opus-Tools to v0.1.10-9 (2017-05-25)
|
* Updated Opus encoder/decoder libraries to v1.2.1-35 (2017-11-16) and Opus-Tools to v0.1.10-9 (2017-05-25)
|
||||||
* Updated Monkey's Audio binary to v4.33 (2017-12-01), compiled with ICL 18.0 and MSVC 15.5
|
* Updated Monkey's Audio binary to v4.33 (2017-12-01), compiled with ICL 18.0 and MSVC 15.5
|
||||||
|
* Updated FAAD decoder to v2.8.6 (2017-10-10), compiled with ICL 18.0 and MSVC 15.5
|
||||||
* Updated ALAC decoder to refalac v1.64 (2017-05-19), compiled with ICL 18.0 and MSVC 15.5
|
* Updated ALAC decoder to refalac v1.64 (2017-05-19), compiled with ICL 18.0 and MSVC 15.5
|
||||||
* Updated WavPack decoder to v5.1.0 (2017-01-20), compiled with ICL 18.0 and MSVC 15.5
|
* Updated WavPack decoder to v5.1.0 (2017-01-20), compiled with ICL 18.0 and MSVC 15.5
|
||||||
* Updated MediaInfo to v17.10 (2017-11-02), compiled with ICL 18.0 and MSVC 14.1
|
* Updated MediaInfo to v17.10 (2017-11-02), compiled with ICL 18.0 and MSVC 14.1
|
||||||
|
51
etc/Patches/FAAD-v2.8.6-Win32-BufferOverflow-Fix.diff
Normal file
51
etc/Patches/FAAD-v2.8.6-Win32-BufferOverflow-Fix.diff
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
frontend/main.c | 9 +++++----
|
||||||
|
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/frontend/main.c b/frontend/main.c
|
||||||
|
index 34d4eab..0453bbe 100644
|
||||||
|
--- a/frontend/main.c
|
||||||
|
+++ b/frontend/main.c
|
||||||
|
@@ -70,6 +70,7 @@
|
||||||
|
#define MAX_CHANNELS 6 /* make this higher to support files with
|
||||||
|
more channels */
|
||||||
|
|
||||||
|
+#define MAX_PERCENTS 384
|
||||||
|
|
||||||
|
static int quiet = 0;
|
||||||
|
|
||||||
|
@@ -469,7 +470,7 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std
|
||||||
|
NeAACDecFrameInfo frameInfo;
|
||||||
|
NeAACDecConfigurationPtr config;
|
||||||
|
|
||||||
|
- char percents[200];
|
||||||
|
+ char percents[MAX_PERCENTS];
|
||||||
|
int percent, old_percent = -1;
|
||||||
|
int bread, fileread;
|
||||||
|
int header_type = 0;
|
||||||
|
@@ -734,7 +735,7 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std
|
||||||
|
if (percent > old_percent)
|
||||||
|
{
|
||||||
|
old_percent = percent;
|
||||||
|
- sprintf(percents, "%d%% decoding %s.", percent, aacfile);
|
||||||
|
+ snprintf(percents, MAX_PERCENTS, "%d%% decoding %s.", percent, aacfile);
|
||||||
|
faad_fprintf(stderr, "%s\r", percents);
|
||||||
|
#ifdef _WIN32
|
||||||
|
SetConsoleTitle(percents);
|
||||||
|
@@ -802,7 +803,7 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std
|
||||||
|
NeAACDecFrameInfo frameInfo;
|
||||||
|
mp4AudioSpecificConfig mp4ASC;
|
||||||
|
|
||||||
|
- char percents[200];
|
||||||
|
+ char percents[MAX_PERCENTS];
|
||||||
|
int percent, old_percent = -1;
|
||||||
|
|
||||||
|
int first_time = 1;
|
||||||
|
@@ -979,7 +980,7 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std
|
||||||
|
if (percent > old_percent)
|
||||||
|
{
|
||||||
|
old_percent = percent;
|
||||||
|
- sprintf(percents, "%d%% decoding %s.", percent, mp4file);
|
||||||
|
+ snprintf(percents, MAX_PERCENTS, "%d%% decoding %s.", percent, mp4file);
|
||||||
|
faad_fprintf(stderr, "%s\r", percents);
|
||||||
|
#ifdef _WIN32
|
||||||
|
SetConsoleTitle(percents);
|
40
etc/Patches/FAAD-v2.8.6-Win32-ByteSwap-Fix.diff
Normal file
40
etc/Patches/FAAD-v2.8.6-Win32-ByteSwap-Fix.diff
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
frontend/mp4read.c | 18 +++++++++++++++---
|
||||||
|
1 file changed, 15 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/frontend/mp4read.c b/frontend/mp4read.c
|
||||||
|
index 9d92bf5..c8ca530 100644
|
||||||
|
--- a/frontend/mp4read.c
|
||||||
|
+++ b/frontend/mp4read.c
|
||||||
|
@@ -45,17 +45,29 @@ mp4config_t mp4config = { 0 };
|
||||||
|
|
||||||
|
static FILE *g_fin = NULL;
|
||||||
|
|
||||||
|
-static inline uint32_t bswap32(uint32_t u32)
|
||||||
|
+static inline uint32_t bswap32(const uint32_t u32)
|
||||||
|
{
|
||||||
|
#ifndef WORDS_BIGENDIAN
|
||||||
|
+#ifdef _MSC_VER
|
||||||
|
+ return _byteswap_ulong(u32);
|
||||||
|
+#else
|
||||||
|
return __builtin_bswap32(u32);
|
||||||
|
#endif
|
||||||
|
+#else
|
||||||
|
+ return u32;
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
-static inline uint16_t bswap16(uint16_t u16)
|
||||||
|
+static inline uint16_t bswap16(const uint16_t u16)
|
||||||
|
{
|
||||||
|
#ifndef WORDS_BIGENDIAN
|
||||||
|
- return __builtin_bswap16(u16);
|
||||||
|
+#ifdef _MSC_VER
|
||||||
|
+ return _byteswap_ushort(u16);
|
||||||
|
+#else
|
||||||
|
+ return __builtin_bswap16(u16);
|
||||||
|
+#endif
|
||||||
|
+#else
|
||||||
|
+ return u16;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
26
etc/Patches/FAAD-v2.8.6-Win32-Flush-Fix.diff
Normal file
26
etc/Patches/FAAD-v2.8.6-Win32-Flush-Fix.diff
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
frontend/main.c | 9 +++++++--
|
||||||
|
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/frontend/main.c b/frontend/main.c
|
||||||
|
index d433253..34d4eab 100644
|
||||||
|
--- a/frontend/main.c
|
||||||
|
+++ b/frontend/main.c
|
||||||
|
@@ -80,11 +80,16 @@ static void faad_fprintf(FILE *stream, const char *fmt, ...)
|
||||||
|
if (!quiet)
|
||||||
|
{
|
||||||
|
va_start(ap, fmt);
|
||||||
|
-
|
||||||
|
vfprintf(stream, fmt, ap);
|
||||||
|
-
|
||||||
|
va_end(ap);
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+#ifdef _WIN32
|
||||||
|
+ if (!_isatty(_fileno(stream)))
|
||||||
|
+ {
|
||||||
|
+ fflush(stream); /*ensure real-time progress output on Win32*/
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
/* FAAD file buffering routines */
|
408
etc/Patches/FAAD-v2.8.6-Win32-Unicode-Support.diff
Normal file
408
etc/Patches/FAAD-v2.8.6-Win32-Unicode-Support.diff
Normal file
@ -0,0 +1,408 @@
|
|||||||
|
frontend/audio.c | 7 +-
|
||||||
|
frontend/main.c | 34 ++++++---
|
||||||
|
frontend/mp4read.c | 7 +-
|
||||||
|
frontend/unicode_support.c | 172 +++++++++++++++++++++++++++++++++++++++++++++
|
||||||
|
frontend/unicode_support.h | 50 +++++++++++++
|
||||||
|
5 files changed, 258 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/frontend/audio.c b/frontend/audio.c
|
||||||
|
index 9ab7a2a..0d94c18 100644
|
||||||
|
--- a/frontend/audio.c
|
||||||
|
+++ b/frontend/audio.c
|
||||||
|
@@ -38,6 +38,9 @@
|
||||||
|
#include <neaacdec.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
+#ifdef _WIN32
|
||||||
|
+#include "unicode_support.h"
|
||||||
|
+#endif
|
||||||
|
#include "audio.h"
|
||||||
|
|
||||||
|
|
||||||
|
@@ -74,13 +77,13 @@ audio_file *open_audio_file(char *infile, int samplerate, int channels,
|
||||||
|
if(infile[0] == '-')
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
- setmode(fileno(stdout), O_BINARY);
|
||||||
|
+ _setmode(_fileno(stdout), O_BINARY);
|
||||||
|
#endif
|
||||||
|
aufile->sndfile = stdout;
|
||||||
|
aufile->toStdio = 1;
|
||||||
|
} else {
|
||||||
|
aufile->toStdio = 0;
|
||||||
|
- aufile->sndfile = fopen(infile, "wb");
|
||||||
|
+ aufile->sndfile = faad_fopen(infile, "wb");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (aufile->sndfile == NULL)
|
||||||
|
diff --git a/frontend/main.c b/frontend/main.c
|
||||||
|
index deaa039..d433253 100644
|
||||||
|
--- a/frontend/main.c
|
||||||
|
+++ b/frontend/main.c
|
||||||
|
@@ -35,9 +35,11 @@
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <windows.h>
|
||||||
|
+#include <io.h>
|
||||||
|
#ifndef __MINGW32__
|
||||||
|
#define off_t __int64
|
||||||
|
#endif
|
||||||
|
+#include "unicode_support.h"
|
||||||
|
#else
|
||||||
|
#include <time.h>
|
||||||
|
#endif
|
||||||
|
@@ -479,7 +481,7 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std
|
||||||
|
|
||||||
|
if (adts_out)
|
||||||
|
{
|
||||||
|
- adtsFile = fopen(adts_fn, "wb");
|
||||||
|
+ adtsFile = faad_fopen(adts_fn, "wb");
|
||||||
|
if (adtsFile == NULL)
|
||||||
|
{
|
||||||
|
faad_fprintf(stderr, "Error opening file: %s\n", adts_fn);
|
||||||
|
@@ -491,12 +493,12 @@ static int decodeAACfile(char *aacfile, char *sndfile, char *adts_fn, int to_std
|
||||||
|
{
|
||||||
|
b.infile = stdin;
|
||||||
|
#ifdef _WIN32
|
||||||
|
- setmode(fileno(stdin), O_BINARY);
|
||||||
|
+ _setmode(_fileno(stdin), O_BINARY);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
- b.infile = fopen(aacfile, "rb");
|
||||||
|
+ b.infile = faad_fopen(aacfile, "rb");
|
||||||
|
if (b.infile == NULL)
|
||||||
|
{
|
||||||
|
/* unable to open file */
|
||||||
|
@@ -833,7 +835,7 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std
|
||||||
|
|
||||||
|
if (adts_out)
|
||||||
|
{
|
||||||
|
- adtsFile = fopen(adts_fn, "wb");
|
||||||
|
+ adtsFile = faad_fopen(adts_fn, "wb");
|
||||||
|
if (adtsFile == NULL)
|
||||||
|
{
|
||||||
|
faad_fprintf(stderr, "Error opening file: %s\n", adts_fn);
|
||||||
|
@@ -953,7 +955,7 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std
|
||||||
|
outputFormat, fileType, aacChannelConfig2wavexChannelMask(&frameInfo));
|
||||||
|
} else {
|
||||||
|
#ifdef _WIN32
|
||||||
|
- setmode(fileno(stdout), O_BINARY);
|
||||||
|
+ _setmode(_fileno(stdout), O_BINARY);
|
||||||
|
#endif
|
||||||
|
aufile = open_audio_file("-", frameInfo.samplerate, frameInfo.channels,
|
||||||
|
outputFormat, fileType, aacChannelConfig2wavexChannelMask(&frameInfo));
|
||||||
|
@@ -1007,7 +1009,7 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std
|
||||||
|
return frameInfo.error;
|
||||||
|
}
|
||||||
|
|
||||||
|
-int main(int argc, char *argv[])
|
||||||
|
+static int faad_main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
int result;
|
||||||
|
int infoOnly = 0;
|
||||||
|
@@ -1265,13 +1267,13 @@ int main(int argc, char *argv[])
|
||||||
|
readFromStdin = 1;
|
||||||
|
hMP4File = stdin;
|
||||||
|
#ifdef _WIN32
|
||||||
|
- setmode(fileno(stdin), O_BINARY);
|
||||||
|
+ _setmode(_fileno(stdin), O_BINARY);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
mp4file = 0;
|
||||||
|
- hMP4File = fopen(aacFileName, "rb");
|
||||||
|
+ hMP4File = faad_fopen(aacFileName, "rb");
|
||||||
|
if (!hMP4File)
|
||||||
|
{
|
||||||
|
faad_fprintf(stderr, "Error opening file: %s\n", aacFileName);
|
||||||
|
@@ -1338,3 +1340,19 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+int main(int argc, char *argv[])
|
||||||
|
+{
|
||||||
|
+#ifdef _WIN32
|
||||||
|
+ int argc_utf8, exit_code;
|
||||||
|
+ char **argv_utf8;
|
||||||
|
+ init_console_utf8(stderr);
|
||||||
|
+ init_commandline_arguments_utf8(&argc_utf8, &argv_utf8);
|
||||||
|
+ exit_code = faad_main(argc_utf8, argv_utf8);
|
||||||
|
+ free_commandline_arguments_utf8(&argc_utf8, &argv_utf8);
|
||||||
|
+ uninit_console_utf8();
|
||||||
|
+ return exit_code;
|
||||||
|
+#else
|
||||||
|
+ return faad_main(argc, argv);
|
||||||
|
+#endif
|
||||||
|
+}
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/frontend/mp4read.c b/frontend/mp4read.c
|
||||||
|
index c8ca530..be8d591 100644
|
||||||
|
--- a/frontend/mp4read.c
|
||||||
|
+++ b/frontend/mp4read.c
|
||||||
|
@@ -24,6 +24,9 @@
|
||||||
|
#include <time.h>
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
|
+#ifdef _WIN32
|
||||||
|
+#include "unicode_support.h"
|
||||||
|
+#endif
|
||||||
|
#include "mp4read.h"
|
||||||
|
|
||||||
|
enum ATOM_TYPE
|
||||||
|
@@ -939,7 +942,7 @@ int mp4read_seek(int framenum)
|
||||||
|
|
||||||
|
static void mp4info(void)
|
||||||
|
{
|
||||||
|
- fprintf(stderr, "Modification Time:\t\%s", mp4time(mp4config.mtime));
|
||||||
|
+ fprintf(stderr, "Modification Time:\t\t%s", mp4time(mp4config.mtime));
|
||||||
|
fprintf(stderr, "Samplerate:\t\t%d\n", mp4config.samplerate);
|
||||||
|
fprintf(stderr, "Total samples:\t\t%d\n", mp4config.samples);
|
||||||
|
fprintf(stderr, "Total channels:\t\t%d\n", mp4config.channels);
|
||||||
|
@@ -970,7 +973,7 @@ int mp4read_open(char *name)
|
||||||
|
|
||||||
|
mp4read_close();
|
||||||
|
|
||||||
|
- g_fin = fopen(name, "rb");
|
||||||
|
+ g_fin = faad_fopen(name, "rb");
|
||||||
|
if (!g_fin)
|
||||||
|
return ERR_FAIL;
|
||||||
|
|
||||||
|
diff --git a/frontend/unicode_support.c b/frontend/unicode_support.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..96ea5a4
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/frontend/unicode_support.c
|
||||||
|
@@ -0,0 +1,172 @@
|
||||||
|
+/* Copyright (c) 2004-2012 LoRd_MuldeR <mulder2@gmx.de>
|
||||||
|
+ File: unicode_support.c
|
||||||
|
+
|
||||||
|
+ This file was originally part of a patch included with LameXP,
|
||||||
|
+ released under the same license as the original audio tools.
|
||||||
|
+
|
||||||
|
+ Redistribution and use in source and binary forms, with or without
|
||||||
|
+ modification, are permitted provided that the following conditions
|
||||||
|
+ are met:
|
||||||
|
+
|
||||||
|
+ - Redistributions of source code must retain the above copyright
|
||||||
|
+ notice, this list of conditions and the following disclaimer.
|
||||||
|
+
|
||||||
|
+ - Redistributions in binary form must reproduce the above copyright
|
||||||
|
+ notice, this list of conditions and the following disclaimer in the
|
||||||
|
+ documentation and/or other materials provided with the distribution.
|
||||||
|
+
|
||||||
|
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
+*/
|
||||||
|
+#if defined WIN32 || defined _WIN32 || defined WIN64 || defined _WIN64
|
||||||
|
+
|
||||||
|
+#include "unicode_support.h"
|
||||||
|
+
|
||||||
|
+#include <windows.h>
|
||||||
|
+#include <io.h>
|
||||||
|
+
|
||||||
|
+static UINT g_old_output_cp = ((UINT)-1);
|
||||||
|
+
|
||||||
|
+char *utf16_to_utf8(const wchar_t *input)
|
||||||
|
+{
|
||||||
|
+ char *Buffer;
|
||||||
|
+ int BuffSize = 0, Result = 0;
|
||||||
|
+
|
||||||
|
+ BuffSize = WideCharToMultiByte(CP_UTF8, 0, input, -1, NULL, 0, NULL, NULL);
|
||||||
|
+ Buffer = (char*) malloc(sizeof(char) * BuffSize);
|
||||||
|
+ if(Buffer)
|
||||||
|
+ {
|
||||||
|
+ Result = WideCharToMultiByte(CP_UTF8, 0, input, -1, Buffer, BuffSize, NULL, NULL);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return ((Result > 0) && (Result <= BuffSize)) ? Buffer : NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+char *utf16_to_ansi(const wchar_t *input)
|
||||||
|
+{
|
||||||
|
+ char *Buffer;
|
||||||
|
+ int BuffSize = 0, Result = 0;
|
||||||
|
+
|
||||||
|
+ BuffSize = WideCharToMultiByte(CP_ACP, 0, input, -1, NULL, 0, NULL, NULL);
|
||||||
|
+ Buffer = (char*) malloc(sizeof(char) * BuffSize);
|
||||||
|
+ if(Buffer)
|
||||||
|
+ {
|
||||||
|
+ Result = WideCharToMultiByte(CP_ACP, 0, input, -1, Buffer, BuffSize, NULL, NULL);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return ((Result > 0) && (Result <= BuffSize)) ? Buffer : NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+wchar_t *utf8_to_utf16(const char *input)
|
||||||
|
+{
|
||||||
|
+ wchar_t *Buffer;
|
||||||
|
+ int BuffSize = 0, Result = 0;
|
||||||
|
+
|
||||||
|
+ BuffSize = MultiByteToWideChar(CP_UTF8, 0, input, -1, NULL, 0);
|
||||||
|
+ Buffer = (wchar_t*) malloc(sizeof(wchar_t) * BuffSize);
|
||||||
|
+ if(Buffer)
|
||||||
|
+ {
|
||||||
|
+ Result = MultiByteToWideChar(CP_UTF8, 0, input, -1, Buffer, BuffSize);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return ((Result > 0) && (Result <= BuffSize)) ? Buffer : NULL;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void init_commandline_arguments_utf8(int *argc, char ***argv)
|
||||||
|
+{
|
||||||
|
+ int i, nArgs;
|
||||||
|
+ LPWSTR *szArglist;
|
||||||
|
+
|
||||||
|
+ szArglist = CommandLineToArgvW(GetCommandLineW(), &nArgs);
|
||||||
|
+
|
||||||
|
+ if(NULL == szArglist)
|
||||||
|
+ {
|
||||||
|
+ fprintf(stderr, "\nFATAL: CommandLineToArgvW failed\n\n");
|
||||||
|
+ exit(-1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ *argv = (char**) malloc(sizeof(char*) * nArgs);
|
||||||
|
+ *argc = nArgs;
|
||||||
|
+
|
||||||
|
+ if(NULL == *argv)
|
||||||
|
+ {
|
||||||
|
+ fprintf(stderr, "\nFATAL: Malloc failed\n\n");
|
||||||
|
+ exit(-1);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ for(i = 0; i < nArgs; i++)
|
||||||
|
+ {
|
||||||
|
+ (*argv)[i] = utf16_to_utf8(szArglist[i]);
|
||||||
|
+ if(NULL == (*argv)[i])
|
||||||
|
+ {
|
||||||
|
+ fprintf(stderr, "\nFATAL: utf16_to_utf8 failed\n\n");
|
||||||
|
+ exit(-1);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ LocalFree(szArglist);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void free_commandline_arguments_utf8(int *argc, char ***argv)
|
||||||
|
+{
|
||||||
|
+ int i = 0;
|
||||||
|
+
|
||||||
|
+ if(*argv != NULL)
|
||||||
|
+ {
|
||||||
|
+ for(i = 0; i < *argc; i++)
|
||||||
|
+ {
|
||||||
|
+ if((*argv)[i] != NULL)
|
||||||
|
+ {
|
||||||
|
+ free((*argv)[i]);
|
||||||
|
+ (*argv)[i] = NULL;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ free(*argv);
|
||||||
|
+ *argv = NULL;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+FILE *fopen_utf8(const char *filename_utf8, const char *mode_utf8)
|
||||||
|
+{
|
||||||
|
+ FILE *ret = NULL;
|
||||||
|
+ wchar_t *filename_utf16 = utf8_to_utf16(filename_utf8);
|
||||||
|
+ wchar_t *mode_utf16 = utf8_to_utf16(mode_utf8);
|
||||||
|
+
|
||||||
|
+ if(filename_utf16 && mode_utf16)
|
||||||
|
+ {
|
||||||
|
+ ret = _wfopen(filename_utf16, mode_utf16);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ if(filename_utf16) free(filename_utf16);
|
||||||
|
+ if(mode_utf16) free(mode_utf16);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void init_console_utf8(FILE *const stream)
|
||||||
|
+{
|
||||||
|
+ if (_isatty(_fileno(stream)))
|
||||||
|
+ {
|
||||||
|
+ g_old_output_cp = GetConsoleOutputCP();
|
||||||
|
+ SetConsoleOutputCP(CP_UTF8);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void uninit_console_utf8(void)
|
||||||
|
+{
|
||||||
|
+ if(g_old_output_cp != ((UINT)-1))
|
||||||
|
+ {
|
||||||
|
+ SetConsoleOutputCP(g_old_output_cp);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
\ No newline at end of file
|
||||||
|
diff --git a/frontend/unicode_support.h b/frontend/unicode_support.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..eb21877
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/frontend/unicode_support.h
|
||||||
|
@@ -0,0 +1,50 @@
|
||||||
|
+/* Copyright (c) 2004-2012 LoRd_MuldeR <mulder2@gmx.de>
|
||||||
|
+ File: unicode_support.h
|
||||||
|
+
|
||||||
|
+ This file was originally part of a patch included with LameXP,
|
||||||
|
+ released under the same license as the original audio tools.
|
||||||
|
+
|
||||||
|
+ Redistribution and use in source and binary forms, with or without
|
||||||
|
+ modification, are permitted provided that the following conditions
|
||||||
|
+ are met:
|
||||||
|
+
|
||||||
|
+ - Redistributions of source code must retain the above copyright
|
||||||
|
+ notice, this list of conditions and the following disclaimer.
|
||||||
|
+
|
||||||
|
+ - Redistributions in binary form must reproduce the above copyright
|
||||||
|
+ notice, this list of conditions and the following disclaimer in the
|
||||||
|
+ documentation and/or other materials provided with the distribution.
|
||||||
|
+
|
||||||
|
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
|
||||||
|
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||||
|
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||||
|
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
+*/
|
||||||
|
+#ifndef UNICODE_SUPPORT_H_INCLUDED
|
||||||
|
+#define UNICODE_SUPPORT_H_INCLUDED
|
||||||
|
+
|
||||||
|
+#include <stdio.h>
|
||||||
|
+
|
||||||
|
+char *utf16_to_utf8(const wchar_t *input);
|
||||||
|
+char *utf16_to_ansi(const wchar_t *input);
|
||||||
|
+wchar_t *utf8_to_utf16(const char *input);
|
||||||
|
+void init_commandline_arguments_utf8(int *argc, char ***argv);
|
||||||
|
+void free_commandline_arguments_utf8(int *argc, char ***argv);
|
||||||
|
+FILE *fopen_utf8(const char *filename_utf8, const char *mode_utf8);
|
||||||
|
+void init_console_utf8(FILE *const stream);
|
||||||
|
+void uninit_console_utf8(void);
|
||||||
|
+
|
||||||
|
+#ifdef _WIN32
|
||||||
|
+#define faad_fopen(X,Y) fopen_utf8((X),(Y))
|
||||||
|
+#else
|
||||||
|
+#define faad_fopen(X,Y) fopen((X),(Y))
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#endif //UNICODE_SUPPORT_H_INCLUDED
|
2
res/Tools.faad-avx.qrc
Normal file
2
res/Tools.faad-avx.qrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<!DOCTYPE RCC>
|
||||||
|
<RCC version="1.0"><qresource><file>tools/faad.avx.exe</file></qresource></RCC>
|
@ -217,6 +217,7 @@
|
|||||||
<file>tools/avs2wav.exe</file>
|
<file>tools/avs2wav.exe</file>
|
||||||
<file>tools/dcaenc.exe</file>
|
<file>tools/dcaenc.exe</file>
|
||||||
<file>tools/elevator.exe</file>
|
<file>tools/elevator.exe</file>
|
||||||
|
<file>tools/faad.avx.exe</file>
|
||||||
<file>tools/faad.i686.exe</file>
|
<file>tools/faad.i686.exe</file>
|
||||||
<file>tools/faad.sse2.exe</file>
|
<file>tools/faad.sse2.exe</file>
|
||||||
<file>tools/flac.x64-avx.exe</file>
|
<file>tools/flac.x64-avx.exe</file>
|
||||||
|
BIN
res/tools/faad.avx.exe
Normal file
BIN
res/tools/faad.avx.exe
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -35,7 +35,7 @@
|
|||||||
#define VER_LAMEXP_MINOR_LO 6
|
#define VER_LAMEXP_MINOR_LO 6
|
||||||
#define VER_LAMEXP_TYPE Beta
|
#define VER_LAMEXP_TYPE Beta
|
||||||
#define VER_LAMEXP_PATCH 2
|
#define VER_LAMEXP_PATCH 2
|
||||||
#define VER_LAMEXP_BUILD 2078
|
#define VER_LAMEXP_BUILD 2079
|
||||||
#define VER_LAMEXP_CONFG 2002
|
#define VER_LAMEXP_CONFG 2002
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -721,9 +721,9 @@ void AboutDialog::initSoftwareTab(void)
|
|||||||
moreAboutText += makeToolText
|
moreAboutText += makeToolText
|
||||||
(
|
(
|
||||||
tr("FAAD - OpenSource MPEG-4 and MPEG-2 AAC Decoder"),
|
tr("FAAD - OpenSource MPEG-4 and MPEG-2 AAC Decoder"),
|
||||||
"faad.exe", "v?.?",
|
"faad.exe", "v?.?.?",
|
||||||
tr("Released under the terms of the GNU General Public License."),
|
tr("Released under the terms of the GNU General Public License."),
|
||||||
"http://www.audiocoding.com/"
|
"https://sourceforge.net/projects/faac/" //"http://www.audiocoding.com/"
|
||||||
);
|
);
|
||||||
moreAboutText += makeToolText
|
moreAboutText += makeToolText
|
||||||
(
|
(
|
||||||
|
@ -71,8 +71,9 @@ g_lamexp_tools[] =
|
|||||||
{"4558728999a05f12fe88566e8308cba0ada200814c2a1bfe2507f49faf8f3994b0d52a829148f5c6321d24faa2718439", CPU_TYPE_ALL_ALL, "avs2wav.exe", 13, ""},
|
{"4558728999a05f12fe88566e8308cba0ada200814c2a1bfe2507f49faf8f3994b0d52a829148f5c6321d24faa2718439", CPU_TYPE_ALL_ALL, "avs2wav.exe", 13, ""},
|
||||||
{"07834b1b8ecac2f3db79ad048005eca3a284cb759e15d399eb1a560a403122e20db5f08e60319759b8463aeef2410d02", CPU_TYPE_ALL_ALL, "dcaenc.exe", 20120419, ""},
|
{"07834b1b8ecac2f3db79ad048005eca3a284cb759e15d399eb1a560a403122e20db5f08e60319759b8463aeef2410d02", CPU_TYPE_ALL_ALL, "dcaenc.exe", 20120419, ""},
|
||||||
{"7c249f507b96967bedabdd7e631638807a7595ebff58eaaadf63530783d515eda9660bc2b1a0457fddae7e3eaef8a074", CPU_TYPE_ALL_ALL, "elevator.exe", UINT_MAX, ""},
|
{"7c249f507b96967bedabdd7e631638807a7595ebff58eaaadf63530783d515eda9660bc2b1a0457fddae7e3eaef8a074", CPU_TYPE_ALL_ALL, "elevator.exe", UINT_MAX, ""},
|
||||||
{"5c4a5cdd708b5857bcb064558be81a2dfb16401e796b296f6eee7c63042acbeae12e1e2f1f3d0fd096eaf73201b54e10", CPU_TYPE_ALL_GEN, "faad.i686.exe", 27, ""},
|
{"bb3dd1f872dd5a3110ee1f8199a8318d54cd872b602fc2716e2acfb3eb803c241c7d39b0133462ac0534455309723869", CPU_TYPE_ALL_GEN, "faad.i686.exe", 286, ""},
|
||||||
{"72447794cf411e1e4ce71facf5f60023f001d203894cf40185a0ee13e144e93d72ac99f2ed30a9168450ce5bf882f99f", CPU_TYPE_ALL_SSX, "faad.sse2.exe", 27, ""},
|
{"86c8e6b8effe8325c14c9b3705494429a5bd1e39a2080bdfa8f0f6bf0a9ae1827c5c5c371b568dc788249ef82143ecd1", CPU_TYPE_ALL_SSE, "faad.sse2.exe", 286, ""},
|
||||||
|
{"5a45cd99ed8ee5df8b4914f5017b1345174c0e896f04ee9dd9aa78eaac712f1a9d807019f31a6138545ec8803d4f005c", CPU_TYPE_ALL_AVX, "faad.avx.exe", 286, ""},
|
||||||
{"735654150f5d123660aa8493d322a7181cfd6d6c3e584a53c94c27a5163659b6aab3dd84230f684f8cec3cb565223482", CPU_TYPE_X86_GEN, "flac.x86-i686.exe", 132, ""},
|
{"735654150f5d123660aa8493d322a7181cfd6d6c3e584a53c94c27a5163659b6aab3dd84230f684f8cec3cb565223482", CPU_TYPE_X86_GEN, "flac.x86-i686.exe", 132, ""},
|
||||||
{"2ee22f174131615cf342cb3031a4c93adfff0997d84eb1b6794c133c8f19d109c43e67a3f60638705c7afb93427a07f8", CPU_TYPE_X86_SSX, "flac.x86-sse2.exe", 132, ""},
|
{"2ee22f174131615cf342cb3031a4c93adfff0997d84eb1b6794c133c8f19d109c43e67a3f60638705c7afb93427a07f8", CPU_TYPE_X86_SSX, "flac.x86-sse2.exe", 132, ""},
|
||||||
{"323ba94d1d3a8f82f4e5a6adf859d0f11d7b0c69fa0254e620724f879edd9d7017e3d2fa78ffe0a615539d8798606a46", CPU_TYPE_X64_NVX, "flac.x64-sse2.exe", 132, ""},
|
{"323ba94d1d3a8f82f4e5a6adf859d0f11d7b0c69fa0254e620724f879edd9d7017e3d2fa78ffe0a615539d8798606a46", CPU_TYPE_X64_NVX, "flac.x64-sse2.exe", 132, ""},
|
||||||
|
Loading…
Reference in New Issue
Block a user