Replaced the Opus encoder/decoder binary wit custom binaries that support UTF-8 file names and flush the console output properly + expose more Opus encoder options in the GUI.

This commit is contained in:
LoRd_MuldeR 2012-07-21 19:16:12 +02:00
parent fcceeeaaac
commit 278f9091fb
40 changed files with 1894 additions and 910 deletions

View File

@ -17,7 +17,7 @@ a:visited { color: #0000EE; }
<h3>LameXP - Version History</h3><br>
<a name="4.05"></a>Changes between v4.04 and v4.05 [<font color="darkred">unreleased</font>]:<br><ul>
<li>Added support for Opus Audio Codec, based on Opus-Tools v0.1.3 (2012-07-10) by Xiph.org/Mozilla
<li>Added support for Opus Audio Codec, based on Opus-Tools v0.1.3+ (2012-07-21) by Xiph.org/Mozilla
<li>Added Swedish translation, thanks to Åke Engelbrektson &lt;eson57@gmail.com&gt;
<li>Updated Qt runtime libraries to v4.8.2 (2012-05-22), compiled with MSVC 10.0
<li>Updated mpg123 decoder to v1.14.3 (2012-07-01), compiled with GCC 4.6.1

View File

@ -72,10 +72,11 @@ if not "%LAMEXP_ERROR%"=="0" (
GOTO:EOF
)
REM ------------------------------------------
set "OUT_FILE=%OUT_PATH%\..\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%"
mkdir "%~dp0\..\..\out" 2> NUL
set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%"
for /L %%n in (1, 1, 99) do (
if exist "!OUT_FILE!.exe" set "OUT_FILE=%OUT_PATH%\..\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n"
if exist "!OUT_FILE!.zip" set "OUT_FILE=%OUT_PATH%\..\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n"
if exist "!OUT_FILE!.exe" set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n"
if exist "!OUT_FILE!.zip" set "OUT_FILE=%~dp0\..\..\out\%VER_LAMEXP_BASENAME%.%ISO_DATE%.%LAMEXP_CONFIG:_=-%.Build-%VER_LAMEXP_BUILD%.Update-%%n"
)
REM ------------------------------------------
REM :: DELETE OLD OUTPUT FILE ::

File diff suppressed because it is too large Load Diff

View File

@ -1836,31 +1836,79 @@
</message>
<message>
<source>MP3</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>Ogg/Vorbis</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>AAC/MP4</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>PCM/Wave</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>A/52</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>DCA</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source>Opus</source>
<translation type="unfinished"></translation>
<translation></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation>Opus Kodierer Optionen</translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation>Optimieren für Signaltyp:</translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation>Kodierer Komplexität:</translation>
</message>
<message>
<source>Music</source>
<translation>Musik</translation>
</message>
<message>
<source>(Undefined)</source>
<translation>(Undefiniert)</translation>
</message>
<message>
<source>Frame Size:</source>
<translation>Framegröße:</translation>
</message>
<message>
<source>2.5</source>
<translation>2,5</translation>
</message>
<message>
<source>5</source>
<translation></translation>
</message>
<message>
<source>10</source>
<translation></translation>
</message>
<message>
<source>20</source>
<translation></translation>
</message>
<message>
<source>40</source>
<translation></translation>
</message>
<message>
<source>60</source>
<translation></translation>
</message>
</context>
<context>
@ -2181,7 +2229,7 @@
<message>
<source>WARNING: Decoded file size exceeds 4 GB, problems might occur!
</source>
<translation type="unfinished"></translation>
<translation>WARNUNG: Dekodierte Dateigröße übersteigt 4 GB, Probleme sind vorprogrammiert!</translation>
</message>
</context>
<context>

View File

@ -1861,6 +1861,54 @@
<source>Opus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Undefined)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frame Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2.5</source>
<translation type="unfinished">2.5</translation>
</message>
<message>
<source>5</source>
<translation type="unfinished">5</translation>
</message>
<message>
<source>10</source>
<translation type="unfinished">10</translation>
</message>
<message>
<source>20</source>
<translation type="unfinished">20</translation>
</message>
<message>
<source>40</source>
<translation type="unfinished">40</translation>
</message>
<message>
<source>60</source>
<translation type="unfinished">60</translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1871,6 +1871,54 @@ Ouvrir le dossier récursivement...</translation>
<source>Opus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Undefined)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frame Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2.5</source>
<translation type="unfinished">2.5</translation>
</message>
<message>
<source>5</source>
<translation type="unfinished">5</translation>
</message>
<message>
<source>10</source>
<translation type="unfinished">10</translation>
</message>
<message>
<source>20</source>
<translation type="unfinished">20</translation>
</message>
<message>
<source>40</source>
<translation type="unfinished">40</translation>
</message>
<message>
<source>60</source>
<translation type="unfinished">60</translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1862,6 +1862,54 @@
<source>Opus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Undefined)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frame Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2.5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>10</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>20</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>40</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>60</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1861,6 +1861,54 @@
<source>Opus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Undefined)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frame Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2.5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>10</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>20</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>40</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>60</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

File diff suppressed because it is too large Load Diff

View File

@ -1867,6 +1867,54 @@
<source>Opus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Undefined)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frame Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2.5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>5</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>10</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>20</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>40</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>60</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MetaInfo</name>

File diff suppressed because it is too large Load Diff

View File

@ -1861,6 +1861,54 @@
<source>Opus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Undefined)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frame Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2.5</source>
<translation type="unfinished">2.5</translation>
</message>
<message>
<source>5</source>
<translation type="unfinished">5</translation>
</message>
<message>
<source>10</source>
<translation type="unfinished">10</translation>
</message>
<message>
<source>20</source>
<translation type="unfinished">20</translation>
</message>
<message>
<source>40</source>
<translation type="unfinished">40</translation>
</message>
<message>
<source>60</source>
<translation type="unfinished">60</translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1862,6 +1862,54 @@
<source>Opus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Undefined)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frame Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2.5</source>
<translation type="unfinished">2.5</translation>
</message>
<message>
<source>5</source>
<translation type="unfinished">5</translation>
</message>
<message>
<source>10</source>
<translation type="unfinished">10</translation>
</message>
<message>
<source>20</source>
<translation type="unfinished">20</translation>
</message>
<message>
<source>40</source>
<translation type="unfinished">40</translation>
</message>
<message>
<source>60</source>
<translation type="unfinished">60</translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -1861,6 +1861,54 @@
<source>Opus</source>
<translation type="unfinished"></translation>
</message>
<message>
<source> Opus Encoder Options </source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Optimize for Signal Type:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Encoding Complexity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Music</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>(Undefined)</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>Frame Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>2.5</source>
<translation type="unfinished">2.5</translation>
</message>
<message>
<source>5</source>
<translation type="unfinished">5</translation>
</message>
<message>
<source>10</source>
<translation type="unfinished">10</translation>
</message>
<message>
<source>20</source>
<translation type="unfinished">20</translation>
</message>
<message>
<source>40</source>
<translation type="unfinished">40</translation>
</message>
<message>
<source>60</source>
<translation type="unfinished">60</translation>
</message>
</context>
<context>
<name>MetaInfo</name>

View File

@ -17,6 +17,7 @@
..\..\src\Decoder_MAC.cpp
..\..\src\Decoder_MP3.cpp
..\..\src\Decoder_Musepack.cpp
..\..\src\Decoder_Opus.cpp
..\..\src\Decoder_Shorten.cpp
..\..\src\Decoder_Speex.cpp
..\..\src\Decoder_TTA.cpp
@ -42,6 +43,7 @@
..\..\src\Encoder_DCA.cpp
..\..\src\Encoder_FLAC.cpp
..\..\src\Encoder_MP3.cpp
..\..\src\Encoder_Opus.cpp
..\..\src\Encoder_Vorbis.cpp
..\..\src\Encoder_Wave.cpp
..\..\src\Filter_Abstract.cpp
@ -89,6 +91,7 @@
..\..\src\Decoder_MAC.h
..\..\src\Decoder_MP3.h
..\..\src\Decoder_Musepack.h
..\..\src\Decoder_Opus.h
..\..\src\Decoder_Shorten.h
..\..\src\Decoder_Speex.h
..\..\src\Decoder_TTA.h
@ -114,6 +117,7 @@
..\..\src\Encoder_DCA.h
..\..\src\Encoder_FLAC.h
..\..\src\Encoder_MP3.h
..\..\src\Encoder_Opus.h
..\..\src\Encoder_Vorbis.h
..\..\src\Encoder_Wave.h
..\..\src\Filter_Abstract.h

View File

@ -1324,7 +1324,7 @@
<x>0</x>
<y>0</y>
<width>604</width>
<height>1524</height>
<height>1639</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_22">
@ -2060,7 +2060,7 @@
</layout>
</widget>
</item>
<item row="5" column="0">
<item row="6" column="0">
<widget class="QGroupBox" name="groupBox_9">
<property name="font">
<font>
@ -2253,7 +2253,7 @@
</layout>
</widget>
</item>
<item row="6" column="0">
<item row="7" column="0">
<widget class="QGroupBox" name="groupBox_10">
<property name="font">
<font>
@ -2431,7 +2431,7 @@
</layout>
</widget>
</item>
<item row="8" column="0">
<item row="9" column="0">
<widget class="QGroupBox" name="groupBox_11">
<property name="font">
<font>
@ -2670,7 +2670,7 @@
</layout>
</widget>
</item>
<item row="9" column="0">
<item row="10" column="0">
<widget class="QGroupBox" name="groupBox_12">
<property name="font">
<font>
@ -2834,7 +2834,7 @@
</layout>
</widget>
</item>
<item row="10" column="0">
<item row="11" column="0">
<widget class="QGroupBox" name="groupBox_13">
<property name="font">
<font>
@ -3017,6 +3017,9 @@
</item>
<item row="1" column="2">
<widget class="QComboBox" name="comboBoxAftenCodingMode">
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Auto Select</string>
@ -3216,7 +3219,7 @@
</layout>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QGroupBox" name="groupBox_15">
<property name="font">
<font>
@ -3414,6 +3417,241 @@
</layout>
</widget>
</item>
<item row="5" column="0">
<widget class="QGroupBox" name="groupBox_16">
<property name="font">
<font>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="title">
<string> Opus Encoder Options </string>
</property>
<layout class="QGridLayout" name="gridLayout_40">
<item row="2" column="0">
<layout class="QGridLayout" name="gridLayout_39">
<item row="1" column="0">
<spacer name="horizontalSpacer_56">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="6" rowspan="2">
<spacer name="horizontalSpacer_57">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>10</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="1">
<widget class="QLabel" name="label_20">
<property name="text">
<string>Optimize for Signal Type:</string>
</property>
</widget>
</item>
<item row="0" column="1" colspan="5">
<spacer name="verticalSpacer_33">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1" colspan="5">
<spacer name="verticalSpacer_34">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>8</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="4" rowspan="2">
<spacer name="horizontalSpacer_58">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="2" rowspan="2">
<spacer name="horizontalSpacer_59">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="1" column="3">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Encoding Complexity:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QComboBox" name="comboBoxOpusOptimize">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>0</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>Music</string>
</property>
</item>
<item>
<property name="text">
<string>Speech</string>
</property>
</item>
<item>
<property name="text">
<string>(Undefined)</string>
</property>
</item>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="spinBoxOpusComplexity">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>0</height>
</size>
</property>
<property name="maximum">
<number>10</number>
</property>
<property name="value">
<number>10</number>
</property>
</widget>
</item>
<item row="1" column="5">
<widget class="QLabel" name="label_22">
<property name="text">
<string>Frame Size:</string>
</property>
</widget>
</item>
<item row="2" column="5">
<widget class="QComboBox" name="comboBoxOpusFramesize">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>128</width>
<height>0</height>
</size>
</property>
<property name="currentIndex">
<number>3</number>
</property>
<item>
<property name="text">
<string>2.5</string>
</property>
</item>
<item>
<property name="text">
<string>5</string>
</property>
</item>
<item>
<property name="text">
<string>10</string>
</property>
</item>
<item>
<property name="text">
<string>20</string>
</property>
</item>
<item>
<property name="text">
<string>40</string>
</property>
</item>
<item>
<property name="text">
<string>60</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item row="6" column="0">
@ -4124,6 +4362,8 @@
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
<include location="../res/Icons.qrc"/>
</resources>
<connections>
<connection>

Binary file not shown.

Binary file not shown.

Binary file not shown.

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

@ -29,8 +29,8 @@
#define VER_LAMEXP_MINOR_HI 0
#define VER_LAMEXP_MINOR_LO 5
#define VER_LAMEXP_TYPE Alpha
#define VER_LAMEXP_PATCH 8
#define VER_LAMEXP_BUILD 1052
#define VER_LAMEXP_PATCH 9
#define VER_LAMEXP_BUILD 1056
///////////////////////////////////////////////////////////////////////////////
// Tool versions (minimum expected versions!)

View File

@ -59,7 +59,7 @@ bool OpusDecoder::decode(const QString &sourceFile, const QString &outputFile, v
bool bAborted = false;
int prevProgress = -1;
//QRegExp regExp("\\s+Time:\\s+(\\d+):(\\d+)\\.(\\d+)\\s+\\[(\\d+):(\\d+)\\.(\\d+)\\],");
QRegExp regExp("\\[(-|\\\\|/|\\|)\\]");
//The ALAC Decoder doesn't actually send any status updates :-[
emit statusUpdated(20 + (QUuid::createUuid().data1 % 60));
@ -86,8 +86,10 @@ bool OpusDecoder::decode(const QString &sourceFile, const QString &outputFile, v
{
QByteArray line = process.readLine();
QString text = QString::fromUtf8(line.constData()).simplified();
/* if(regExp.lastIndexIn(text) >= 0)
if(regExp.lastIndexIn(text) >= 0)
{
__noop;
/*
int values[6];
for(int i = 0; i < 6; i++)
{
@ -106,8 +108,9 @@ bool OpusDecoder::decode(const QString &sourceFile, const QString &outputFile, v
prevProgress = qMin(newProgress + 2, 99);
}
}
} */
if(!text.isEmpty())
*/
}
else if(!text.isEmpty())
{
emit messageLogged(text);
}

View File

@ -260,12 +260,15 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
spinBoxToneAdjustBass->setValue(static_cast<double>(m_settings->toneAdjustBass()) / 100.0);
spinBoxToneAdjustTreble->setValue(static_cast<double>(m_settings->toneAdjustTreble()) / 100.0);
spinBoxAftenSearchSize->setValue(m_settings->aftenExponentSearchSize());
spinBoxOpusComplexity->setValue(m_settings->opusComplexity());
comboBoxMP3ChannelMode->setCurrentIndex(m_settings->lameChannelMode());
comboBoxSamplingRate->setCurrentIndex(m_settings->samplingRate());
comboBoxAACProfile->setCurrentIndex(m_settings->aacEncProfile());
comboBoxAftenCodingMode->setCurrentIndex(m_settings->aftenAudioCodingMode());
comboBoxAftenDRCMode->setCurrentIndex(m_settings->aftenDynamicRangeCompression());
comboBoxNormalizationMode->setCurrentIndex(m_settings->normalizationFilterEqualizationMode());
comboBoxOpusOptimize->setCurrentIndex(m_settings->opusOptimizeFor());
comboBoxOpusFramesize->setCurrentIndex(m_settings->opusFramesize());
while(checkBoxBitrateManagement->isChecked() != m_settings->bitrateManagementEnabled()) checkBoxBitrateManagement->click();
while(checkBoxNeroAAC2PassMode->isChecked() != m_settings->neroAACEnable2Pass()) checkBoxNeroAAC2PassMode->click();
while(checkBoxAftenFastAllocation->isChecked() != m_settings->aftenFastBitAllocation()) checkBoxAftenFastAllocation->click();
@ -316,6 +319,9 @@ MainWindow::MainWindow(FileListModel *fileListModel, AudioFileModel *metaInfo, S
connect(lineEditRenamePattern, SIGNAL(textChanged(QString)), this, SLOT(renameOutputPatternChanged(QString)));
connect(labelShowRenameMacros, SIGNAL(linkActivated(QString)), this, SLOT(showRenameMacros(QString)));
connect(checkBoxForceStereoDownmix, SIGNAL(clicked(bool)), this, SLOT(forceStereoDownmixEnabledChanged(bool)));
connect(comboBoxOpusOptimize, SIGNAL(currentIndexChanged(int)), SLOT(opusSettingsChanged()));
connect(comboBoxOpusFramesize, SIGNAL(currentIndexChanged(int)), this, SLOT(opusSettingsChanged()));
connect(spinBoxOpusComplexity, SIGNAL(valueChanged(int)), this, SLOT(opusSettingsChanged()));
updateLameAlgoQuality(sliderLameAlgoQuality->value());
updateMaximumInstances(sliderMaxInstances->value());
toneAdjustTrebleChanged(spinBoxToneAdjustTreble->value());
@ -773,7 +779,7 @@ void MainWindow::changeEvent(QEvent *e)
{
if(e->type() == QEvent::LanguageChange)
{
int comboBoxIndex[6];
int comboBoxIndex[8];
//Backup combobox indices, as retranslateUi() resets
comboBoxIndex[0] = comboBoxMP3ChannelMode->currentIndex();
@ -782,6 +788,8 @@ void MainWindow::changeEvent(QEvent *e)
comboBoxIndex[3] = comboBoxAftenCodingMode->currentIndex();
comboBoxIndex[4] = comboBoxAftenDRCMode->currentIndex();
comboBoxIndex[5] = comboBoxNormalizationMode->currentIndex();
comboBoxIndex[6] = comboBoxOpusOptimize->currentIndex();
comboBoxIndex[7] = comboBoxOpusFramesize->currentIndex();
//Re-translate from UIC
Ui::MainWindow::retranslateUi(this);
@ -793,6 +801,8 @@ void MainWindow::changeEvent(QEvent *e)
comboBoxAftenCodingMode->setCurrentIndex(comboBoxIndex[3]);
comboBoxAftenDRCMode->setCurrentIndex(comboBoxIndex[4]);
comboBoxNormalizationMode->setCurrentIndex(comboBoxIndex[5]);
comboBoxOpusOptimize->setCurrentIndex(comboBoxIndex[6]);
comboBoxOpusFramesize->setCurrentIndex(comboBoxIndex[7]);
//Update the window title
if(LAMEXP_DEBUG)
@ -3406,6 +3416,17 @@ void MainWindow::aftenFastAllocationChanged(bool checked)
m_settings->aftenFastBitAllocation(checked);
}
/*
* Opus encoder settings changed
*/
void MainWindow::opusSettingsChanged(void)
{
m_settings->opusOptimizeFor(comboBoxOpusOptimize->currentIndex());
m_settings->opusFramesize(comboBoxOpusFramesize->currentIndex());
m_settings->opusComplexity(spinBoxOpusComplexity->value());
}
/*
* Normalization filter enabled changed
*/
@ -3657,12 +3678,15 @@ void MainWindow::resetAdvancedOptionsButtonClicked(void)
spinBoxToneAdjustBass->setValue(static_cast<double>(m_settings->toneAdjustBassDefault()) / 100.0);
spinBoxToneAdjustTreble->setValue(static_cast<double>(m_settings->toneAdjustTrebleDefault()) / 100.0);
spinBoxAftenSearchSize->setValue(m_settings->aftenExponentSearchSizeDefault());
spinBoxOpusComplexity->setValue(m_settings->opusComplexityDefault());
comboBoxMP3ChannelMode->setCurrentIndex(m_settings->lameChannelModeDefault());
comboBoxSamplingRate->setCurrentIndex(m_settings->samplingRateDefault());
comboBoxAACProfile->setCurrentIndex(m_settings->aacEncProfileDefault());
comboBoxAftenCodingMode->setCurrentIndex(m_settings->aftenAudioCodingModeDefault());
comboBoxAftenDRCMode->setCurrentIndex(m_settings->aftenDynamicRangeCompressionDefault());
comboBoxNormalizationMode->setCurrentIndex(m_settings->normalizationFilterEqualizationModeDefault());
comboBoxOpusOptimize->setCurrentIndex(m_settings->opusOptimizeForDefault());
comboBoxOpusFramesize->setCurrentIndex(m_settings->opusFramesizeDefault());
while(checkBoxBitrateManagement->isChecked() != m_settings->bitrateManagementEnabledDefault()) checkBoxBitrateManagement->click();
while(checkBoxNeroAAC2PassMode->isChecked() != m_settings->neroAACEnable2PassDefault()) checkBoxNeroAAC2PassMode->click();
while(checkBoxNormalizationFilter->isChecked() != m_settings->normalizationFilterEnabledDefault()) checkBoxNormalizationFilter->click();

View File

@ -106,6 +106,7 @@ private slots:
void normalizationModeChanged(int mode);
void notifyOtherInstance(void);
void openFolderActionActivated(void);
void opusSettingsChanged(void);
void outputFolderContextMenu(const QPoint &pos);
void outputFolderDirectoryLoaded(const QString &path);
void outputFolderEditFinished(void);

View File

@ -841,6 +841,9 @@ AbstractEncoder *ProcessingDialog::makeEncoder(bool *nativeResampling)
OpusEncoder *opusEncoder = new OpusEncoder();
opusEncoder->setBitrate(m_settings->compressionBitrate());
opusEncoder->setRCMode(m_settings->compressionRCMode());
opusEncoder->setOptimizeFor(m_settings->opusOptimizeFor());
opusEncoder->setEncodeComplexity(m_settings->opusComplexity());
opusEncoder->setFrameSize(m_settings->opusFramesize());
//TODO: opusEncoder->setCustomParams(m_settings->customParametersOpus());
encoder = opusEncoder;
}

View File

@ -287,3 +287,8 @@ void AACEncoder::setEnable2Pass(bool enabled)
{
m_configEnable2Pass = enabled;
}
const bool AACEncoder::needsTimingInfo(void)
{
return true;
}

View File

@ -36,6 +36,7 @@ public:
virtual bool encode(const QString &sourceFile, const AudioFileModel &metaInfo, const QString &outputFile, volatile bool *abortFlag);
virtual bool isFormatSupported(const QString &containerType, const QString &containerProfile, const QString &formatType, const QString &formatProfile, const QString &formatVersion);
virtual QString extension(void);
virtual const bool needsTimingInfo(void);
//Advanced options
virtual void setProfile(int profile);

View File

@ -64,6 +64,12 @@ const unsigned int *AbstractEncoder::supportedBitdepths(void)
return NULL;
}
//Does the encoder need the exact duration of the source?
const bool AbstractEncoder::needsTimingInfo(void)
{
return false;
}
/*
* Helper functions
*/

View File

@ -43,6 +43,7 @@ public:
virtual const unsigned int *supportedSamplerates(void);
virtual const unsigned int *supportedChannelCount(void);
virtual const unsigned int *supportedBitdepths(void);
virtual const bool needsTimingInfo(void);
//Common setter methods
void setBitrate(int bitrate);

View File

@ -36,6 +36,10 @@ OpusEncoder::OpusEncoder(void)
{
throw "Error initializing Opus encoder. Tool 'opusenc.exe' is not registred!";
}
m_configOptimizeFor = 0;
m_configEncodeComplexity = 10;
m_configFrameSize = 3;
}
OpusEncoder::~OpusEncoder(void)
@ -44,11 +48,11 @@ OpusEncoder::~OpusEncoder(void)
bool OpusEncoder::encode(const QString &sourceFile, const AudioFileModel &metaInfo, const QString &outputFile, volatile bool *abortFlag)
{
const unsigned int fileDuration = metaInfo.fileDuration();
QProcess process;
QStringList args;
args << "--music"; //TODO: Make other optimizations available!
switch(m_configRCMode)
{
case SettingsModel::VBRMode:
@ -65,6 +69,40 @@ bool OpusEncoder::encode(const QString &sourceFile, const AudioFileModel &metaIn
break;
}
switch(m_configOptimizeFor)
{
case 0:
args << "--music";
break;
case 1:
args << "--speech";
break;
}
args << "--comp" << QString::number(m_configEncodeComplexity);
switch(m_configFrameSize)
{
case 0:
args << "--framesize" << "2.5";
break;
case 1:
args << "--framesize" << "5";
break;
case 2:
args << "--framesize" << "10";
break;
case 3:
args << "--framesize" << "20";
break;
case 4:
args << "--framesize" << "40";
break;
case 5:
args << "--framesize" << "60";
break;
}
args << QString("--bitrate") << QString::number(qMax(0, qMin(500, m_configBitrate * 8)));
if(!metaInfo.fileName().isEmpty()) args << "--title" << metaInfo.fileName();
@ -89,10 +127,7 @@ bool OpusEncoder::encode(const QString &sourceFile, const AudioFileModel &metaIn
bool bAborted = false;
int prevProgress = -1;
QRegExp regExp("\\[(-|\\\\|/|\\|)\\]");
//The Opus encoder doesn't flus it's status updates :-[
emit statusUpdated(20 + (QUuid::createUuid().data1 % 60));
QRegExp regExp("\\[(-|\\\\|/|\\|)\\]\\s*(\\d+):(\\d+):(\\d+)");
while(process.state() != QProcess::NotRunning)
{
@ -118,12 +153,19 @@ bool OpusEncoder::encode(const QString &sourceFile, const AudioFileModel &metaIn
QString text = QString::fromUtf8(line.constData()).simplified();
if(regExp.lastIndexIn(text) >= 0)
{
bool ok = false;
int progress = regExp.cap(1).toInt(&ok);
if(ok && (progress > prevProgress))
bool ok[3] = {false, false, false};
int h = regExp.cap(2).toInt(&ok[0]);
int m = regExp.cap(3).toInt(&ok[1]);
int s = regExp.cap(4).toInt(&ok[2]);
if(ok[0] && ok[1] && ok[2] && (fileDuration > 0))
{
emit statusUpdated(progress);
prevProgress = qMin(progress + 2, 99);
int filePosition = (h * 3600) + (m * 60) + s;
int newProgress = qRound((static_cast<double>(filePosition) / static_cast<double>(fileDuration)) * 100.0);
if(newProgress > prevProgress)
{
emit statusUpdated(newProgress);
prevProgress = qMin(newProgress + 2, 99);
}
}
}
else if(!text.isEmpty())
@ -151,6 +193,21 @@ bool OpusEncoder::encode(const QString &sourceFile, const AudioFileModel &metaIn
return true;
}
void OpusEncoder::setOptimizeFor(int optimizeFor)
{
m_configOptimizeFor = qBound(0, optimizeFor, 2);
}
void OpusEncoder::setEncodeComplexity(int complexity)
{
m_configEncodeComplexity = qBound(0, complexity, 10);
}
void OpusEncoder::setFrameSize(int frameSize)
{
m_configFrameSize = qBound(0, frameSize, 5);
}
QString OpusEncoder::extension(void)
{
return "opus";
@ -178,3 +235,8 @@ const unsigned int *OpusEncoder::supportedBitdepths(void)
{
return NULL;
}
const bool OpusEncoder::needsTimingInfo(void)
{
return true;
}

View File

@ -38,7 +38,16 @@ public:
virtual QString extension(void);
virtual const unsigned int *supportedChannelCount(void);
virtual const unsigned int *supportedBitdepths(void);
virtual const bool needsTimingInfo(void);
//Advanced options
virtual void setOptimizeFor(int optimizeFor);
virtual void setEncodeComplexity(int complexity);
virtual void setFrameSize(int frameSize);
private:
const QString m_binary;
int m_configOptimizeFor;
int m_configEncodeComplexity;
int m_configFrameSize;
};

View File

@ -101,6 +101,9 @@ LAMEXP_MAKE_ID(aftenExponentSearchSize, "AdvancedOptions/Aften/ExponentSearchSiz
LAMEXP_MAKE_ID(samplingRate, "AdvancedOptions/Common/Resampling");
LAMEXP_MAKE_ID(neroAACEnable2Pass, "AdvancedOptions/AACEnc/Enable2Pass");
LAMEXP_MAKE_ID(aacEncProfile, "AdvancedOptions/AACEnc/ForceProfile");
LAMEXP_MAKE_ID(opusOptimizeFor, "AdvancedOptions/Opus/OptimizeForSignalType");
LAMEXP_MAKE_ID(opusComplexity, "AdvancedOptions/Opus/EncodingComplexity");
LAMEXP_MAKE_ID(opusFramesize, "AdvancedOptions/Opus/FrameSize");
LAMEXP_MAKE_ID(normalizationFilterEnabled, "AdvancedOptions/VolumeNormalization/Enabled");
LAMEXP_MAKE_ID(normalizationFilterMaxVolume, "AdvancedOptions/VolumeNormalization/MaxVolume");
LAMEXP_MAKE_ID(normalizationFilterEqualizationMode, "AdvancedOptions/VolumeNormalization/EqualizationMode");
@ -378,6 +381,9 @@ LAMEXP_MAKE_OPTION_I(aftenAudioCodingMode, 0);
LAMEXP_MAKE_OPTION_I(aftenDynamicRangeCompression, 5);
LAMEXP_MAKE_OPTION_B(aftenFastBitAllocation, false);
LAMEXP_MAKE_OPTION_I(aftenExponentSearchSize, 8);
LAMEXP_MAKE_OPTION_I(opusOptimizeFor, 0);
LAMEXP_MAKE_OPTION_I(opusComplexity, 10);
LAMEXP_MAKE_OPTION_I(opusFramesize, 3);
LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled, false)
LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume, -50)
LAMEXP_MAKE_OPTION_I(normalizationFilterEqualizationMode, 0);

View File

@ -112,6 +112,9 @@ public:
LAMEXP_MAKE_OPTION_I(aftenDynamicRangeCompression);
LAMEXP_MAKE_OPTION_B(aftenFastBitAllocation);
LAMEXP_MAKE_OPTION_I(aftenExponentSearchSize);
LAMEXP_MAKE_OPTION_I(opusOptimizeFor);
LAMEXP_MAKE_OPTION_I(opusComplexity);
LAMEXP_MAKE_OPTION_I(opusFramesize);
LAMEXP_MAKE_OPTION_B(normalizationFilterEnabled);
LAMEXP_MAKE_OPTION_I(normalizationFilterMaxVolume);
LAMEXP_MAKE_OPTION_I(normalizationFilterEqualizationMode);

View File

@ -183,7 +183,7 @@ void ProcessThread::processFile()
//------------------------------------
if(bSuccess && !m_aborted && IS_WAVE(m_audioFile))
{
if(m_encoder->supportedSamplerates() || m_encoder->supportedBitdepths() || m_encoder->supportedChannelCount() || !m_filters.isEmpty())
if(m_encoder->supportedSamplerates() || m_encoder->supportedBitdepths() || m_encoder->supportedChannelCount() || m_encoder->needsTimingInfo() || !m_filters.isEmpty())
{
m_currentStep = AnalyzeStep;
bSuccess = m_propDetect->detect(sourceFile, &m_audioFile, &m_aborted);

View File

@ -73,8 +73,8 @@ g_lamexp_tools[] =
{"0c019e13450dc664987e21f4e5489d182be7d6d0d81efbbaaf1c78693dfe3e38e0355b93", CPU_TYPE_X86_GEN, "oggenc2.i386.exe", 287603},
{"693dd6f779df70a047c15c2c79350855db38d5b0cd7e529b6877b7c821cfe6addfdd50a4", CPU_TYPE_X86_SSE, "oggenc2.sse2.exe", 287603},
{"291cedb6a1b213330a9cb508f975ee7132a25aa26770ab91cade50109b4ffb81c9bdd09a", CPU_TYPE_X64_ALL, "oggenc2.x64.exe", 287603},
{"003b59fedf9f68a4b63402ee60031d878a323d9406dc535e612151170199490878142d85", CPU_TYPE_ALL_ALL, "opusdec.exe", 914},
{"187deb9e43bfd96a6510e1f27c0894f0e8c8fa00285976039d22364ebe633251a1dbd1f7", CPU_TYPE_ALL_ALL, "opusenc.exe", 914},
{"73379e0d0d99a0faf0b061aa782ca807b4e6c11ad759e0662c10e197fe79a03f3bc8cbe4", CPU_TYPE_ALL_ALL, "opusdec.exe", 20120721},
{"7573a9e4b3d9c9a7e774bc6b2dceb939e097f1175a3afa8f8fe8cd7ee33afdd51d020443", CPU_TYPE_ALL_ALL, "opusenc.exe", 20120721},
{"58c2b8bcff8f27bfa8fab8172b80f5da731221d072c7dba4dd3a3d7d6423490a25dc6760", CPU_TYPE_ALL_ALL, "shorten.exe", 361},
{"017a0f613a962af0620618019b015d5c54bb3c07cf1023e5fdb9502b652367ebbfaaebbc", CPU_TYPE_ALL_ALL, "sox.exe", 1440},
{"48e7f81c024cd17dac0eaeab253aad6b223e72dc80688f7576276b0563209514ff0bb9c8", CPU_TYPE_ALL_ALL, "speexdec.exe", 12},