diff --git a/.clang-format b/.clang-format
index 8336369246..9a3f7e4208 100644
--- a/.clang-format
+++ b/.clang-format
@@ -1,4 +1,4 @@
----
+---
BasedOnStyle: Microsoft
Language: Cpp
Standard: Auto
diff --git a/addons/avisynthproxy/avsproxy.sln b/addons/avisynthproxy/avsproxy.sln
index 2f81e9c27f..cb36b9adba 100755
--- a/addons/avisynthproxy/avsproxy.sln
+++ b/addons/avisynthproxy/avsproxy.sln
@@ -1,22 +1,22 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 14
-VisualStudioVersion = 14.0.25420.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avsproxy", "avsproxy.vcxproj", "{FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}.Debug|Win32.ActiveCfg = Debug|Win32
- {FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}.Debug|Win32.Build.0 = Debug|Win32
- {FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}.Release|Win32.ActiveCfg = Release|Win32
- {FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "avsproxy", "avsproxy.vcxproj", "{FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}.Debug|Win32.ActiveCfg = Debug|Win32
+ {FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}.Debug|Win32.Build.0 = Debug|Win32
+ {FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}.Release|Win32.ActiveCfg = Release|Win32
+ {FDA95A7F-919C-4343-96C6-FB0F59FFE5B0}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/addons/avisynthproxy/avsproxy.vcproj b/addons/avisynthproxy/avsproxy.vcproj
index e3bb174c69..6092e1479d 100755
--- a/addons/avisynthproxy/avsproxy.vcproj
+++ b/addons/avisynthproxy/avsproxy.vcproj
@@ -1,263 +1,263 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/autononreg/js/audio/lame.js b/autononreg/js/audio/lame.js
index 34606ec5cd..e55a39ae7b 100644
--- a/autononreg/js/audio/lame.js
+++ b/autononreg/js/audio/lame.js
@@ -1,28 +1,28 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-var app = new Avidemux();
-var file="/work/samples/dual_avi.avi";
-var fps;
-/* Load file
-*/
-print("lamepreset Test Start");
-app.load(file);
-app.audio.codec("lame",128);
-//displayInfo("Changing preset");
-/* Test get fps
-*/
-if(!app.audio.lamePreset("CBR"))
-{
- displayError("CBR preset failed");
-}
-if(!app.audio.lamePreset("ABR"))
-{
- displayError("ABR preset failed");
-}
-if(!app.audio.lamePreset("EXtreme"))
-{
- displayError("Extreme preset failed");
-}
-print("lamepreset Test End");
-
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+var app = new Avidemux();
+var file="/work/samples/dual_avi.avi";
+var fps;
+/* Load file
+*/
+print("lamepreset Test Start");
+app.load(file);
+app.audio.codec("lame",128);
+//displayInfo("Changing preset");
+/* Test get fps
+*/
+if(!app.audio.lamePreset("CBR"))
+{
+ displayError("CBR preset failed");
+}
+if(!app.audio.lamePreset("ABR"))
+{
+ displayError("ABR preset failed");
+}
+if(!app.audio.lamePreset("EXtreme"))
+{
+ displayError("Extreme preset failed");
+}
+print("lamepreset Test End");
+
+/* End of test
+*/
diff --git a/autononreg/js/audio/stream.js b/autononreg/js/audio/stream.js
index d5c2ce83a5..233fda2b3c 100644
--- a/autononreg/js/audio/stream.js
+++ b/autononreg/js/audio/stream.js
@@ -1,17 +1,17 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-var app = new Avidemux();
-var file="/work/samples/dual_avi.avi";
-var fps;
-/* Load file
-*/
-print("Audio Test Start");
-app.load(file);
-/* Test get fps
-*/
-fps=app.audio.getNbTracks();
-displayInfo("# "+fps);
-app.audio.setTrack(1);
-print("Audio Test End");
-
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+var app = new Avidemux();
+var file="/work/samples/dual_avi.avi";
+var fps;
+/* Load file
+*/
+print("Audio Test Start");
+app.load(file);
+/* Test get fps
+*/
+fps=app.audio.getNbTracks();
+displayInfo("# "+fps);
+app.audio.setTrack(1);
+print("Audio Test End");
+
+/* End of test
+*/
diff --git a/autononreg/js/codecwrite/codecwrite.js b/autononreg/js/codecwrite/codecwrite.js
index 0fd337816e..851429d337 100644
--- a/autononreg/js/codecwrite/codecwrite.js
+++ b/autononreg/js/codecwrite/codecwrite.js
@@ -1,34 +1,34 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-var app = new Avidemux();
-var file="/work/samples/2mn.avi";
-var dir="/tmp/";
-/* Load file
-*/
-if(!app.load(file))
-{
- displayError("Failed to load "+file);
-}
-/*
- Save using all codec with their default settings
-*/
-app.setContainer("AVI");
-/*
-
-*/
-doit("XVID4","xvid4");
-doit("Mpeg4","xvid4");
-doit("H263","xvid4");
-doit("FFHUFF","xvid4");
-doit("HUFF","xvid4");
-doit("FFV1","xvid4");
-doit("Mjpeg","xvid4");
-doit("x264","xvid4");
-/* End of test
-*/
-function doit(codec,out)
-{
-app.video.codec(codec,"CQ=4","");
-app.save(dir+out+".avi");
-return true;
-
-}
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+var app = new Avidemux();
+var file="/work/samples/2mn.avi";
+var dir="/tmp/";
+/* Load file
+*/
+if(!app.load(file))
+{
+ displayError("Failed to load "+file);
+}
+/*
+ Save using all codec with their default settings
+*/
+app.setContainer("AVI");
+/*
+
+*/
+doit("XVID4","xvid4");
+doit("Mpeg4","xvid4");
+doit("H263","xvid4");
+doit("FFHUFF","xvid4");
+doit("HUFF","xvid4");
+doit("FFV1","xvid4");
+doit("Mjpeg","xvid4");
+doit("x264","xvid4");
+/* End of test
+*/
+function doit(codec,out)
+{
+app.video.codec(codec,"CQ=4","");
+app.save(dir+out+".avi");
+return true;
+
+}
diff --git a/autononreg/js/dialogFactory/integer.js b/autononreg/js/dialogFactory/integer.js
index 54e91ecc1c..34ac01cf3a 100644
--- a/autononreg/js/dialogFactory/integer.js
+++ b/autononreg/js/dialogFactory/integer.js
@@ -1,12 +1,12 @@
- var toggle = new DFInteger("Integer (5-10)",5,10);
- var dlgWizard = new DialogFactory("Dialog Factory toggle");
-
-
- toggle.value=7;
- dlgWizard.addControl(toggle);
-
- if (dlgWizard.show())
- {
- var out="toggle "+toggle.value;
- print(out);
- }
+ var toggle = new DFInteger("Integer (5-10)",5,10);
+ var dlgWizard = new DialogFactory("Dialog Factory toggle");
+
+
+ toggle.value=7;
+ dlgWizard.addControl(toggle);
+
+ if (dlgWizard.show())
+ {
+ var out="toggle "+toggle.value;
+ print(out);
+ }
diff --git a/autononreg/js/dialogFactory/menu.js b/autononreg/js/dialogFactory/menu.js
index a0647b83b7..4151980b0f 100644
--- a/autononreg/js/dialogFactory/menu.js
+++ b/autononreg/js/dialogFactory/menu.js
@@ -1,22 +1,22 @@
- var aspectRatios = [[1, 1], [4, 3], [16, 9]];
- var mnuResolution = new DFMenu("Resolution:");
- var mnuSourceRatio = new DFMenu("Source Aspect Ratio:");
- var mnuDestinationRatio = new DFMenu("Destination Aspect Ratio:");
- var dlgWizard = new DialogFactory("Dialog Factory menu");
- var i;
-
- for (i = 0; i < aspectRatios.length; i++)
- {
- mnuSourceRatio.addItem(aspectRatios[i][0].toString() + ":" + aspectRatios[i][1].toString());
- mnuDestinationRatio.addItem(aspectRatios[i][0].toString() + ":" + aspectRatios[i][1].toString());
- }
-
-
- dlgWizard.addControl(mnuSourceRatio);
- dlgWizard.addControl(mnuDestinationRatio);
-
- if (dlgWizard.show())
- {
- var out="source index"+mnuSourceRatio.index+", dest index="+mnuDestinationRatio.index;
- print(out);
- }
+ var aspectRatios = [[1, 1], [4, 3], [16, 9]];
+ var mnuResolution = new DFMenu("Resolution:");
+ var mnuSourceRatio = new DFMenu("Source Aspect Ratio:");
+ var mnuDestinationRatio = new DFMenu("Destination Aspect Ratio:");
+ var dlgWizard = new DialogFactory("Dialog Factory menu");
+ var i;
+
+ for (i = 0; i < aspectRatios.length; i++)
+ {
+ mnuSourceRatio.addItem(aspectRatios[i][0].toString() + ":" + aspectRatios[i][1].toString());
+ mnuDestinationRatio.addItem(aspectRatios[i][0].toString() + ":" + aspectRatios[i][1].toString());
+ }
+
+
+ dlgWizard.addControl(mnuSourceRatio);
+ dlgWizard.addControl(mnuDestinationRatio);
+
+ if (dlgWizard.show())
+ {
+ var out="source index"+mnuSourceRatio.index+", dest index="+mnuDestinationRatio.index;
+ print(out);
+ }
diff --git a/autononreg/js/dialogFactory/toggle.js b/autononreg/js/dialogFactory/toggle.js
index 07ee10f28d..70b91a75f9 100644
--- a/autononreg/js/dialogFactory/toggle.js
+++ b/autononreg/js/dialogFactory/toggle.js
@@ -1,12 +1,12 @@
- var toggle = new DFToggle("Toggle:");
- var dlgWizard = new DialogFactory("Dialog Factory toggle");
-
-
- toggle.value=0;
- dlgWizard.addControl(toggle);
-
- if (dlgWizard.show())
- {
- var out="toggle "+toggle.value;
- print(out);
- }
+ var toggle = new DFToggle("Toggle:");
+ var dlgWizard = new DialogFactory("Dialog Factory toggle");
+
+
+ toggle.value=0;
+ dlgWizard.addControl(toggle);
+
+ if (dlgWizard.show())
+ {
+ var out="toggle "+toggle.value;
+ print(out);
+ }
diff --git a/autononreg/js/dialogFactory/unit/bar.js b/autononreg/js/dialogFactory/unit/bar.js
index 7bbb7466bc..54baff7dad 100644
--- a/autononreg/js/dialogFactory/unit/bar.js
+++ b/autononreg/js/dialogFactory/unit/bar.js
@@ -1,7 +1,7 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory bar");
- admTestFacBar();
-print("/Testing factory bar");
-
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory bar");
+ admTestFacBar();
+print("/Testing factory bar");
+
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/binhex.js b/autononreg/js/dialogFactory/unit/binhex.js
index 6f8a13d86b..97b806f81c 100644
--- a/autononreg/js/dialogFactory/unit/binhex.js
+++ b/autononreg/js/dialogFactory/unit/binhex.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Hex");
- admTestFacHex();
-print("Testing factory Hex");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Hex");
+ admTestFacHex();
+print("Testing factory Hex");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/bitrate.js b/autononreg/js/dialogFactory/unit/bitrate.js
index fb2c66eb43..a1ded90984 100644
--- a/autononreg/js/dialogFactory/unit/bitrate.js
+++ b/autononreg/js/dialogFactory/unit/bitrate.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Bitrate");
- admTestFacBitrate();
-print("Testing factory Bitrate");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Bitrate");
+ admTestFacBitrate();
+print("Testing factory Bitrate");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/button.js b/autononreg/js/dialogFactory/unit/button.js
index 1e79ab1333..359bec1b11 100644
--- a/autononreg/js/dialogFactory/unit/button.js
+++ b/autononreg/js/dialogFactory/unit/button.js
@@ -1,4 +1,4 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Button");
- admTestFacButton();
-print("Testing factory Button");
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Button");
+ admTestFacButton();
+print("Testing factory Button");
diff --git a/autononreg/js/dialogFactory/unit/dirsel.js b/autononreg/js/dialogFactory/unit/dirsel.js
index a8e567bdaf..e6a41ac815 100644
--- a/autononreg/js/dialogFactory/unit/dirsel.js
+++ b/autononreg/js/dialogFactory/unit/dirsel.js
@@ -1,7 +1,7 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory DirSel");
- admTestFacDirSel();
-print("Testing factory DirSel");
-
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory DirSel");
+ admTestFacDirSel();
+print("Testing factory DirSel");
+
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/encoding.js b/autononreg/js/dialogFactory/unit/encoding.js
index 4a6e9de3b0..da47fea448 100644
--- a/autononreg/js/dialogFactory/unit/encoding.js
+++ b/autononreg/js/dialogFactory/unit/encoding.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory FileSel");
-admTestEncoding();
-print("Testing factory FileSel");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory FileSel");
+admTestEncoding();
+print("Testing factory FileSel");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/fileread.js b/autononreg/js/dialogFactory/unit/fileread.js
index 650aa726ef..50a431a48e 100644
--- a/autononreg/js/dialogFactory/unit/fileread.js
+++ b/autononreg/js/dialogFactory/unit/fileread.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory FileSel");
- admTestFacFile();
-print("Testing factory FileSel");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory FileSel");
+ admTestFacFile();
+print("Testing factory FileSel");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/float.js b/autononreg/js/dialogFactory/unit/float.js
index ff074a292f..6042b691a8 100644
--- a/autononreg/js/dialogFactory/unit/float.js
+++ b/autononreg/js/dialogFactory/unit/float.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Float");
- admTestFacFloat();
-print("Testing factory Float");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Float");
+ admTestFacFloat();
+print("Testing factory Float");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/frame.js b/autononreg/js/dialogFactory/unit/frame.js
index 8c17b55602..27a9fe7080 100644
--- a/autononreg/js/dialogFactory/unit/frame.js
+++ b/autononreg/js/dialogFactory/unit/frame.js
@@ -1,4 +1,4 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Frame");
- admTestFacFrame();
-print("Testing factory Frame");
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Frame");
+ admTestFacFrame();
+print("Testing factory Frame");
diff --git a/autononreg/js/dialogFactory/unit/hex.js b/autononreg/js/dialogFactory/unit/hex.js
index 6a0db63861..57e430edaf 100644
--- a/autononreg/js/dialogFactory/unit/hex.js
+++ b/autononreg/js/dialogFactory/unit/hex.js
@@ -1,4 +1,4 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory hex");
- admTestFacHex();
-print("Testing factory hex");
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory hex");
+ admTestFacHex();
+print("Testing factory hex");
diff --git a/autononreg/js/dialogFactory/unit/integer.js b/autononreg/js/dialogFactory/unit/integer.js
index 9af1a0ca19..7bda7c818a 100644
--- a/autononreg/js/dialogFactory/unit/integer.js
+++ b/autononreg/js/dialogFactory/unit/integer.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory int");
- admTestFacInt();
-print("Testing factory int");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory int");
+ admTestFacInt();
+print("Testing factory int");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/matrix.js b/autononreg/js/dialogFactory/unit/matrix.js
index 1347c8089b..cca1c8b2a7 100644
--- a/autononreg/js/dialogFactory/unit/matrix.js
+++ b/autononreg/js/dialogFactory/unit/matrix.js
@@ -1,4 +1,4 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Matrix");
- admTestFacMatrix();
-print("Testing factory Matrix");
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Matrix");
+ admTestFacMatrix();
+print("Testing factory Matrix");
diff --git a/autononreg/js/dialogFactory/unit/menu.js b/autononreg/js/dialogFactory/unit/menu.js
index 776a6afc19..ba33db4c7e 100644
--- a/autononreg/js/dialogFactory/unit/menu.js
+++ b/autononreg/js/dialogFactory/unit/menu.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Menu");
- admTestFacMenu();
-print("Testing factory Menu");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Menu");
+ admTestFacMenu();
+print("Testing factory Menu");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/notch.js b/autononreg/js/dialogFactory/unit/notch.js
index 3fe7e2084d..9dc9ce5e56 100644
--- a/autononreg/js/dialogFactory/unit/notch.js
+++ b/autononreg/js/dialogFactory/unit/notch.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Notch");
- admTestFacNotch();
-print("Testing factory Notch");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Notch");
+ admTestFacNotch();
+print("Testing factory Notch");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/readonlytext.js b/autononreg/js/dialogFactory/unit/readonlytext.js
index e24529cac2..a8600c027b 100644
--- a/autononreg/js/dialogFactory/unit/readonlytext.js
+++ b/autononreg/js/dialogFactory/unit/readonlytext.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory RoTexy");
- admTestFacRoText();
-print("Testing factory RoText");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory RoTexy");
+ admTestFacRoText();
+print("Testing factory RoText");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/slider.js b/autononreg/js/dialogFactory/unit/slider.js
index 62c5188be2..3d4a48651a 100644
--- a/autononreg/js/dialogFactory/unit/slider.js
+++ b/autononreg/js/dialogFactory/unit/slider.js
@@ -1,4 +1,4 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Slider");
- admTestFacSlider();
-print("Testing factory Slider");
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Slider");
+ admTestFacSlider();
+print("Testing factory Slider");
diff --git a/autononreg/js/dialogFactory/unit/tabs.js b/autononreg/js/dialogFactory/unit/tabs.js
index 38ea712075..ebe40d3d03 100644
--- a/autononreg/js/dialogFactory/unit/tabs.js
+++ b/autononreg/js/dialogFactory/unit/tabs.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Tabs");
- admTestFacTab();
-print("Testing factory Tabs");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Tabs");
+ admTestFacTab();
+print("Testing factory Tabs");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/text.js b/autononreg/js/dialogFactory/unit/text.js
index f4f1f671ca..e3771f25aa 100644
--- a/autononreg/js/dialogFactory/unit/text.js
+++ b/autononreg/js/dialogFactory/unit/text.js
@@ -1,6 +1,6 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Text");
- admTestFacText();
-print("Testing factory Text");
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Text");
+ admTestFacText();
+print("Testing factory Text");
+/* End of test
+*/
diff --git a/autononreg/js/dialogFactory/unit/threadcount.js b/autononreg/js/dialogFactory/unit/threadcount.js
index b1d1c2dede..0e2a0e0ebc 100644
--- a/autononreg/js/dialogFactory/unit/threadcount.js
+++ b/autononreg/js/dialogFactory/unit/threadcount.js
@@ -1,4 +1,4 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory ThreadCount");
- admTestFacThreadCount();
-print("Testing factory ThreadCount");
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory ThreadCount");
+ admTestFacThreadCount();
+print("Testing factory ThreadCount");
diff --git a/autononreg/js/dialogFactory/unit/toggle.js b/autononreg/js/dialogFactory/unit/toggle.js
index b1efc38050..00c006fb19 100644
--- a/autononreg/js/dialogFactory/unit/toggle.js
+++ b/autononreg/js/dialogFactory/unit/toggle.js
@@ -1,4 +1,4 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-print("Testing factory Toggle");
- admTestFacToggle();
-print("Testing factory Toggle");
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+print("Testing factory Toggle");
+ admTestFacToggle();
+print("Testing factory Toggle");
diff --git a/autononreg/js/fcctest.js b/autononreg/js/fcctest.js
index c863dc280c..59a089bc6d 100644
--- a/autononreg/js/fcctest.js
+++ b/autononreg/js/fcctest.js
@@ -1,23 +1,23 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-var app = new Avidemux();
-var file="/work/samples/2mn.avi";
-var goodfcc="DIV3";
-var fps;
-/* Load file
-*/
-app.load(file);
-/* Test get fps
-*/
-fps=app.video.getFCC();
-//app.displayInfo("FPS "+fps);
-if(fps==goodfcc)
-{
-}
-else
-{
- app.displayError("Good:"+goodfcc+"Bad:"+fps);
- app.displayError("Wrong fcc ");
-}
-
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+var app = new Avidemux();
+var file="/work/samples/2mn.avi";
+var goodfcc="DIV3";
+var fps;
+/* Load file
+*/
+app.load(file);
+/* Test get fps
+*/
+fps=app.video.getFCC();
+//app.displayInfo("FPS "+fps);
+if(fps==goodfcc)
+{
+}
+else
+{
+ app.displayError("Good:"+goodfcc+"Bad:"+fps);
+ app.displayError("Wrong fcc ");
+}
+
+/* End of test
+*/
diff --git a/autononreg/js/fpstest.js b/autononreg/js/fpstest.js
index a64fa4140c..4deff46825 100644
--- a/autononreg/js/fpstest.js
+++ b/autononreg/js/fpstest.js
@@ -1,31 +1,31 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-var app = new Avidemux();
-var file="/work/samples/2mn.avi";
-var goodfps=23976;
-var fps;
-/* Load file
-*/
-app.load(file);
-/* Test get fps
-*/
-fps=app.video.getFps1000();
-//app.displayInfo("FPS "+fps);
-if(fps==goodfps)
-{
-}
-else
-{
- app.displayError("Wrong fps ");
-}
-fps=10000;
-app.video.setFps1000(fps);
-fps=90;
-fps=app.video.getFps1000();
-//app.displayInfo("FPS "+fps);
-if(fps!=10000)
-{
- app.displayError("Testfps failed");
-}
-
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+var app = new Avidemux();
+var file="/work/samples/2mn.avi";
+var goodfps=23976;
+var fps;
+/* Load file
+*/
+app.load(file);
+/* Test get fps
+*/
+fps=app.video.getFps1000();
+//app.displayInfo("FPS "+fps);
+if(fps==goodfps)
+{
+}
+else
+{
+ app.displayError("Wrong fps ");
+}
+fps=10000;
+app.video.setFps1000(fps);
+fps=90;
+fps=app.video.getFps1000();
+//app.displayInfo("FPS "+fps);
+if(fps!=10000)
+{
+ app.displayError("Testfps failed");
+}
+
+/* End of test
+*/
diff --git a/autononreg/js/functiontest/assert.js b/autononreg/js/functiontest/assert.js
index acf766d7cd..d18354fd34 100644
--- a/autononreg/js/functiontest/assert.js
+++ b/autononreg/js/functiontest/assert.js
@@ -1,7 +1,7 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-var app = new Avidemux();
-
- assertTest();
-
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+var app = new Avidemux();
+
+ assertTest();
+
+/* End of test
+*/
diff --git a/autononreg/js/functiontest/crash.js b/autononreg/js/functiontest/crash.js
index 3e2786bb31..ac1bc3802e 100644
--- a/autononreg/js/functiontest/crash.js
+++ b/autononreg/js/functiontest/crash.js
@@ -1,7 +1,7 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-var app = new Avidemux();
-
- crashTest();
-
-/* End of test
-*/
+//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
+var app = new Avidemux();
+
+ crashTest();
+
+/* End of test
+*/
diff --git a/autononreg/js/functiontest/direread.js b/autononreg/js/functiontest/direread.js
index d2d2106cba..3fe9b517fe 100644
--- a/autononreg/js/functiontest/direread.js
+++ b/autononreg/js/functiontest/direread.js
@@ -1,17 +1,17 @@
-//AD <- These first 4 characters need to be the first 4 characters to identify the ECMAScript file to Avidemux
-var app = new Avidemux();
-var count;
-var file;
-/* Load file
-*/
-print("DirRead Test Start");
-count=allFilesFrom("/work/samples/");
-print("FPS "+count);
-for(i=0;i>>>>>>>>>>>>>>>>>>>>>output"+red+".\n")
+gui=Gui()
+red=gui.dirSelect("Select a directory ")
+print(">>>>>>>>>>>>>>>>>>>>>>output"+red+".\n")
diff --git a/autononreg/py/gui/pyDisplayError.py b/autononreg/py/gui/pyDisplayError.py
index d228f21dd2..f6826a4c5e 100644
--- a/autononreg/py/gui/pyDisplayError.py
+++ b/autononreg/py/gui/pyDisplayError.py
@@ -1,2 +1,2 @@
-gui=Gui()
-gui.displayError("oops","something went wrong!")
+gui=Gui()
+gui.displayError("oops","something went wrong!")
diff --git a/autononreg/py/gui/pyDisplayInfo.py b/autononreg/py/gui/pyDisplayInfo.py
index c5b5b9067f..fb7cc0382b 100644
--- a/autononreg/py/gui/pyDisplayInfo.py
+++ b/autononreg/py/gui/pyDisplayInfo.py
@@ -1,2 +1,2 @@
-gui=Gui()
-gui.displayInfo("Hey","Hello World")
+gui=Gui()
+gui.displayInfo("Hey","Hello World")
diff --git a/autononreg/py/gui/pyFileSel.py b/autononreg/py/gui/pyFileSel.py
index 543637ea2d..f5150c98ab 100644
--- a/autononreg/py/gui/pyFileSel.py
+++ b/autononreg/py/gui/pyFileSel.py
@@ -1,7 +1,7 @@
-gui=Gui()
-red=gui.fileReadSelect("Select a file read")
-mix=":::::::::: output = @"+red+"@\n"
-mix
-print(mix)
-red=gui.fileWriteSelect("Select a file write")
-print(">>>>>>>>>>>>>>>>>>>>>>output<"+str(red)+"@.\n")
+gui=Gui()
+red=gui.fileReadSelect("Select a file read")
+mix=":::::::::: output = @"+red+"@\n"
+mix
+print(mix)
+red=gui.fileWriteSelect("Select a file write")
+print(">>>>>>>>>>>>>>>>>>>>>>output<"+str(red)+"@.\n")
diff --git a/avidemux/cli/CMakeLists.txt b/avidemux/cli/CMakeLists.txt
index 5a4c6a92d3..52d0d0055b 100644
--- a/avidemux/cli/CMakeLists.txt
+++ b/avidemux/cli/CMakeLists.txt
@@ -1,163 +1,163 @@
-cmake_minimum_required(VERSION 3.7)
-
-PROJECT(Avidemux_CLI)
-
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake" "${CMAKE_MODULE_PATH}")
-include(avidemuxVersion)
-
-MESSAGE("")
-MESSAGE("#########################################")
-MESSAGE("Configure for avidemux Cli Started")
-MESSAGE("#########################################")
-MESSAGE("")
-
-MESSAGE(STATUS "Checking for avidemux development files ..")
-
-IF(NOT FAKEROOT)
- SET(AVIDEMUX_FAKEROOT "")
-else(NOT FAKEROOT)
- SET(AVIDEMUX_FAKEROOT "${FAKEROOT}")
-endif(NOT FAKEROOT)
-
-SET(ADM_HEADER_DIR ${AVIDEMUX_FAKEROOT}${CMAKE_INSTALL_PREFIX}/include/avidemux/${AVIDEMUX_API_VERSION})
-SET(ADM_CMAKE_DIR ${ADM_HEADER_DIR}/cmake)
-# Common definitions...
-SET(CMAKE_MODULE_PATH "${ADM_CMAKE_DIR}" "${CMAKE_MODULE_PATH}")
-MESSAGE(STATUS "Checking for avidemux include folder (i.e. CMAKE_INSTALL_PREFIX/include/avidemux/${AVIDEMUX_API_VERSION}")
-if(NOT EXISTS "${ADM_HEADER_DIR}")
- MESSAGE(STATUS "Make sure you installed all the files.\n i cannot find avidemux include folder.cmake .\nSet CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(FATAL_ERROR "Aborting")
-endif(NOT EXISTS "${ADM_HEADER_DIR}")
-
-MESSAGE(STATUS "Found avidemux include folder. good.")
-MESSAGE(STATUS "Checking for cmake subfolder")
-
-if(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
- MESSAGE(STATUS "Make sure you installed all the files.\n I cannot find content of the cmake subfolder .\n")
- MESSAGE(STATUS "Set CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(STATUS "I was looking for commonCmakeApplication.cmake in ${ADM_CMAKE_DIR}")
- MESSAGE(FATAL_ERROR "Aborting")
-endif(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
-MESSAGE(STATUS "Found cmake subfolder.good.")
-
-
-include(commonCmakeApplication)
-INCLUDE(admWindRes)
-
-# #########################################
-# Config
-# #########################################
-ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_CLI)
-SET(CONFIG_HEADER_TYPE ADM_BUILD_CLI)
-SET(UI_SUFFIX cli)
-
-CONFIGURE_FILE("${ADM_CMAKE_DIR}/config.h.cmake" "${CMAKE_BINARY_DIR}/config/cli/config.h")
-MESSAGE(STATUS "CLI config.h generated")
-
-INCLUDE_DIRECTORIES(BEFORE "${CMAKE_BINARY_DIR}/config/cli/")
-
-# #######################################
-# Add subdirectories
-# #######################################
-ADD_SUBDIRECTORY(../common ./common)
-ADD_SUBDIRECTORY(ADM_UIs ./ADM_UIsCli)
-ADD_SUBDIRECTORY(ADM_userInterfaces ./ADM_userInterfacesCli)
-
-SDLify(../common/main.cpp)
-if (ADM_SUBVERSION)
- ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_SUBVERSION=\"${ADM_SUBVERSION}\"")
-endif (ADM_SUBVERSION)
-ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_VERSION=\"${AVIDEMUX_VERSION}\"")
-
-# ##########################################
-# Version Info
-# ##########################################
-if (WIN32)
- WINDRESIFY(mainCLI "${CMAKE_CURRENT_SOURCE_DIR}/../common/xpm/adm.ico" src "avidemux_cli" "Avidemux Video Editor, CLI Version")
- SET(ADM_EXE_SRCS ${ADM_EXE_SRCS} ${src})
-endif (WIN32)
-
-# ##########################################
-# Executable
-# ##########################################
-include_directories("${PTHREAD_INCLUDE_DIR}")
-ADD_EXECUTABLE(avidemux3_cli ${ADM_EXE_SRCS})
-
-# ##########################################
-# Construct common libraries
-# ##########################################
-FOREACH (_libName ${commonLibs1})
- TARGET_LINK_LIBRARIES(avidemux3_cli ${_libName})
-ENDFOREACH (_libName ${commonLibs1})
-
-TARGET_LINK_LIBRARIES(avidemux3_cli ADM_filtersCli6)
-
-FOREACH (_libName ${commonLibs2})
- TARGET_LINK_LIBRARIES(avidemux3_cli ${_libName})
-ENDFOREACH (_libName ${commonLibs2})
-
-FOREACH (_libName ${coreLibs})
- TARGET_LINK_LIBRARIES(avidemux3_cli ${_libName})
-ENDFOREACH (_libName ${coreLibs})
-
-# ############################################
-# Add gtk specific libs
-# ############################################
-TARGET_LINK_LIBRARIES(avidemux3_cli
- ADM_UI_Cli6
- ADM_dialogCli6
- ADM_toolkit6
- ADM_coreAudio6
- ADM_coreUtils6
- ADM_gui2Cli6
- ADM_toolkitCli6
- ADM_shellCli
-)
-
-# ##########################################
-# External libs
-# ##########################################
-# gettext
-IF (GETTEXT_FOUND)
- TARGET_LINK_LIBRARIES(avidemux3_cli ${GETTEXT_LIBRARY_DIR})
-ENDIF (GETTEXT_FOUND)
-
-
-# SDL
-IF (USE_SDL)
- TARGET_LINK_LIBRARIES(avidemux3_cli ${SDL2_LIBRARY} ${SDL2_MAIN})
-ENDIF (USE_SDL)
-
-# ##########################################
-# OS Specific
-# ##########################################
-if (WIN32 OR APPLE)
- set_property(TARGET avidemux3_cli PROPERTY OUTPUT_NAME avidemux_cli)
-endif (WIN32 OR APPLE)
-
-IF (MINGW)
- target_link_libraries(avidemux3_cli winmm -mwindows -Wl,-subsystem,console -Wl,--export-all-symbols)
-ENDIF (MINGW)
-
-# Needed by RubberBand
-if (APPLE)
- #target_link_libraries(avidemux3_cli "-framework Accelerate")
- # Silence missing nullability specifier warnings on macOS
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nullability-completeness")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-completeness")
-endif (APPLE)
-
-# ##########################################
-# Install
-# ##########################################
-ADM_LINK_THREAD(avidemux3_cli)
-ADM_INSTALL_BIN(avidemux3_cli)
-
-DISPLAY_SUMMARY_LIST()
-
-include(admPackager)
-admPackager(cliPackage)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/config/cli/config.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/cli" COMPONENT dev)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/ADM_UIs/include/ADM_UI_Cli6_export.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/cli/ADM_UIs" COMPONENT dev)
-MESSAGE("")
-
+cmake_minimum_required(VERSION 3.7)
+
+PROJECT(Avidemux_CLI)
+
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake" "${CMAKE_MODULE_PATH}")
+include(avidemuxVersion)
+
+MESSAGE("")
+MESSAGE("#########################################")
+MESSAGE("Configure for avidemux Cli Started")
+MESSAGE("#########################################")
+MESSAGE("")
+
+MESSAGE(STATUS "Checking for avidemux development files ..")
+
+IF(NOT FAKEROOT)
+ SET(AVIDEMUX_FAKEROOT "")
+else(NOT FAKEROOT)
+ SET(AVIDEMUX_FAKEROOT "${FAKEROOT}")
+endif(NOT FAKEROOT)
+
+SET(ADM_HEADER_DIR ${AVIDEMUX_FAKEROOT}${CMAKE_INSTALL_PREFIX}/include/avidemux/${AVIDEMUX_API_VERSION})
+SET(ADM_CMAKE_DIR ${ADM_HEADER_DIR}/cmake)
+# Common definitions...
+SET(CMAKE_MODULE_PATH "${ADM_CMAKE_DIR}" "${CMAKE_MODULE_PATH}")
+MESSAGE(STATUS "Checking for avidemux include folder (i.e. CMAKE_INSTALL_PREFIX/include/avidemux/${AVIDEMUX_API_VERSION}")
+if(NOT EXISTS "${ADM_HEADER_DIR}")
+ MESSAGE(STATUS "Make sure you installed all the files.\n i cannot find avidemux include folder.cmake .\nSet CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
+ MESSAGE(FATAL_ERROR "Aborting")
+endif(NOT EXISTS "${ADM_HEADER_DIR}")
+
+MESSAGE(STATUS "Found avidemux include folder. good.")
+MESSAGE(STATUS "Checking for cmake subfolder")
+
+if(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
+ MESSAGE(STATUS "Make sure you installed all the files.\n I cannot find content of the cmake subfolder .\n")
+ MESSAGE(STATUS "Set CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
+ MESSAGE(STATUS "I was looking for commonCmakeApplication.cmake in ${ADM_CMAKE_DIR}")
+ MESSAGE(FATAL_ERROR "Aborting")
+endif(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
+MESSAGE(STATUS "Found cmake subfolder.good.")
+
+
+include(commonCmakeApplication)
+INCLUDE(admWindRes)
+
+# #########################################
+# Config
+# #########################################
+ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_CLI)
+SET(CONFIG_HEADER_TYPE ADM_BUILD_CLI)
+SET(UI_SUFFIX cli)
+
+CONFIGURE_FILE("${ADM_CMAKE_DIR}/config.h.cmake" "${CMAKE_BINARY_DIR}/config/cli/config.h")
+MESSAGE(STATUS "CLI config.h generated")
+
+INCLUDE_DIRECTORIES(BEFORE "${CMAKE_BINARY_DIR}/config/cli/")
+
+# #######################################
+# Add subdirectories
+# #######################################
+ADD_SUBDIRECTORY(../common ./common)
+ADD_SUBDIRECTORY(ADM_UIs ./ADM_UIsCli)
+ADD_SUBDIRECTORY(ADM_userInterfaces ./ADM_userInterfacesCli)
+
+SDLify(../common/main.cpp)
+if (ADM_SUBVERSION)
+ ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_SUBVERSION=\"${ADM_SUBVERSION}\"")
+endif (ADM_SUBVERSION)
+ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_VERSION=\"${AVIDEMUX_VERSION}\"")
+
+# ##########################################
+# Version Info
+# ##########################################
+if (WIN32)
+ WINDRESIFY(mainCLI "${CMAKE_CURRENT_SOURCE_DIR}/../common/xpm/adm.ico" src "avidemux_cli" "Avidemux Video Editor, CLI Version")
+ SET(ADM_EXE_SRCS ${ADM_EXE_SRCS} ${src})
+endif (WIN32)
+
+# ##########################################
+# Executable
+# ##########################################
+include_directories("${PTHREAD_INCLUDE_DIR}")
+ADD_EXECUTABLE(avidemux3_cli ${ADM_EXE_SRCS})
+
+# ##########################################
+# Construct common libraries
+# ##########################################
+FOREACH (_libName ${commonLibs1})
+ TARGET_LINK_LIBRARIES(avidemux3_cli ${_libName})
+ENDFOREACH (_libName ${commonLibs1})
+
+TARGET_LINK_LIBRARIES(avidemux3_cli ADM_filtersCli6)
+
+FOREACH (_libName ${commonLibs2})
+ TARGET_LINK_LIBRARIES(avidemux3_cli ${_libName})
+ENDFOREACH (_libName ${commonLibs2})
+
+FOREACH (_libName ${coreLibs})
+ TARGET_LINK_LIBRARIES(avidemux3_cli ${_libName})
+ENDFOREACH (_libName ${coreLibs})
+
+# ############################################
+# Add gtk specific libs
+# ############################################
+TARGET_LINK_LIBRARIES(avidemux3_cli
+ ADM_UI_Cli6
+ ADM_dialogCli6
+ ADM_toolkit6
+ ADM_coreAudio6
+ ADM_coreUtils6
+ ADM_gui2Cli6
+ ADM_toolkitCli6
+ ADM_shellCli
+)
+
+# ##########################################
+# External libs
+# ##########################################
+# gettext
+IF (GETTEXT_FOUND)
+ TARGET_LINK_LIBRARIES(avidemux3_cli ${GETTEXT_LIBRARY_DIR})
+ENDIF (GETTEXT_FOUND)
+
+
+# SDL
+IF (USE_SDL)
+ TARGET_LINK_LIBRARIES(avidemux3_cli ${SDL2_LIBRARY} ${SDL2_MAIN})
+ENDIF (USE_SDL)
+
+# ##########################################
+# OS Specific
+# ##########################################
+if (WIN32 OR APPLE)
+ set_property(TARGET avidemux3_cli PROPERTY OUTPUT_NAME avidemux_cli)
+endif (WIN32 OR APPLE)
+
+IF (MINGW)
+ target_link_libraries(avidemux3_cli winmm -mwindows -Wl,-subsystem,console -Wl,--export-all-symbols)
+ENDIF (MINGW)
+
+# Needed by RubberBand
+if (APPLE)
+ #target_link_libraries(avidemux3_cli "-framework Accelerate")
+ # Silence missing nullability specifier warnings on macOS
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nullability-completeness")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-completeness")
+endif (APPLE)
+
+# ##########################################
+# Install
+# ##########################################
+ADM_LINK_THREAD(avidemux3_cli)
+ADM_INSTALL_BIN(avidemux3_cli)
+
+DISPLAY_SUMMARY_LIST()
+
+include(admPackager)
+admPackager(cliPackage)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/config/cli/config.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/cli" COMPONENT dev)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/ADM_UIs/include/ADM_UI_Cli6_export.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/cli/ADM_UIs" COMPONENT dev)
+MESSAGE("")
+
diff --git a/avidemux/common/ADM_audioCodec/src/CMakeLists.txt b/avidemux/common/ADM_audioCodec/src/CMakeLists.txt
index 1d0c5391e4..40328dc2df 100644
--- a/avidemux/common/ADM_audioCodec/src/CMakeLists.txt
+++ b/avidemux/common/ADM_audioCodec/src/CMakeLists.txt
@@ -1,10 +1,10 @@
-INCLUDE_DIRECTORIES(../include)
-SET(ADM_audiocodec_SRCS
-ADM_8bits.cpp
-ADM_lpcm.cpp
-ADM_audiocodec.cpp
-ADM_codecpcm16.cpp
-ADM_codecpcmfloat.cpp
-ADM_pluginLoad.cpp)
-
-ADD_LIBRARY(ADM_audiocodec6 STATIC ${ADM_audiocodec_SRCS})
+INCLUDE_DIRECTORIES(../include)
+SET(ADM_audiocodec_SRCS
+ADM_8bits.cpp
+ADM_lpcm.cpp
+ADM_audiocodec.cpp
+ADM_codecpcm16.cpp
+ADM_codecpcmfloat.cpp
+ADM_pluginLoad.cpp)
+
+ADD_LIBRARY(ADM_audiocodec6 STATIC ${ADM_audiocodec_SRCS})
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/AAFilter.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/AAFilter.cpp
index 3f29fe571c..f6790a45ba 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/AAFilter.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/AAFilter.cpp
@@ -1,222 +1,222 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// FIR low-pass (anti-alias) filter with filter coefficient design routine and
-/// MMX optimization.
-///
-/// Anti-alias filter is used to prevent folding of high frequencies when
-/// transposing the sample rate with interpolation.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include
-#include "ADM_default.h"
-#include
-#include
-#include "AAFilter.h"
-#include "FIRFilter.h"
-
-using namespace soundtouch;
-
-#define PI 3.14159265358979323846
-#define TWOPI (2 * PI)
-
-// define this to save AA filter coefficients to a file
-// #define _DEBUG_SAVE_AAFILTER_COEFFICIENTS 1
-
-#ifdef _DEBUG_SAVE_AAFILTER_COEFFICIENTS
- #include
-
- static void _DEBUG_SAVE_AAFIR_COEFFS(SAMPLETYPE *coeffs, int len)
- {
- FILE *fptr = fopen("aa_filter_coeffs.txt", "wt");
- if (fptr == NULL) return;
-
- for (int i = 0; i < len; i ++)
- {
- double temp = coeffs[i];
- fprintf(fptr, "%lf\n", temp);
- }
- fclose(fptr);
- }
-
-#else
- #define _DEBUG_SAVE_AAFIR_COEFFS(x, y)
-#endif
-
-/*****************************************************************************
- *
- * Implementation of the class 'AAFilter'
- *
- *****************************************************************************/
-
-AAFilter::AAFilter(uint len)
-{
- pFIR = FIRFilter::newInstance();
- cutoffFreq = 0.5;
- setLength(len);
-}
-
-
-AAFilter::~AAFilter()
-{
- delete pFIR;
-}
-
-
-// Sets new anti-alias filter cut-off edge frequency, scaled to
-// sampling frequency (nyquist frequency = 0.5).
-// The filter will cut frequencies higher than the given frequency.
-void AAFilter::setCutoffFreq(double newCutoffFreq)
-{
- cutoffFreq = newCutoffFreq;
- calculateCoeffs();
-}
-
-
-// Sets number of FIR filter taps
-void AAFilter::setLength(uint newLength)
-{
- length = newLength;
- calculateCoeffs();
-}
-
-
-// Calculates coefficients for a low-pass FIR filter using Hamming window
-void AAFilter::calculateCoeffs()
-{
- uint i;
- double cntTemp, temp, tempCoeff,h, w;
- double wc;
- double scaleCoeff, sum;
- double *work;
- SAMPLETYPE *coeffs;
-
- ADM_assert(length >= 2);
- ADM_assert(length % 4 == 0);
- ADM_assert(cutoffFreq >= 0);
- ADM_assert(cutoffFreq <= 0.5);
-
- work = new double[length];
- coeffs = new SAMPLETYPE[length];
-
- wc = 2.0 * PI * cutoffFreq;
- tempCoeff = TWOPI / (double)length;
-
- sum = 0;
- for (i = 0; i < length; i ++)
- {
- cntTemp = (double)i - (double)(length / 2);
-
- temp = cntTemp * wc;
- if (temp != 0)
- {
- h = sin(temp) / temp; // sinc function
- }
- else
- {
- h = 1.0;
- }
- w = 0.54 + 0.46 * cos(tempCoeff * cntTemp); // hamming window
-
- temp = w * h;
- work[i] = temp;
-
- // calc net sum of coefficients
- sum += temp;
- }
-
- // ensure the sum of coefficients is larger than zero
- ADM_assert(sum > 0);
-
- // ensure we've really designed a lowpass filter...
- ADM_assert(work[length/2] > 0);
- ADM_assert(work[length/2 + 1] > -1e-6);
- ADM_assert(work[length/2 - 1] > -1e-6);
-
- // Calculate a scaling coefficient in such a way that the result can be
- // divided by 16384
- scaleCoeff = 16384.0f / sum;
-
- for (i = 0; i < length; i ++)
- {
- temp = work[i] * scaleCoeff;
- // scale & round to nearest integer
- temp += (temp >= 0) ? 0.5 : -0.5;
- // ensure no overfloods
- ADM_assert(temp >= -32768 && temp <= 32767);
- coeffs[i] = (SAMPLETYPE)temp;
- }
-
- // Set coefficients. Use divide factor 14 => divide result by 2^14 = 16384
- pFIR->setCoefficients(coeffs, length, 14);
-
- _DEBUG_SAVE_AAFIR_COEFFS(coeffs, length);
-
- delete[] work;
- delete[] coeffs;
-}
-
-
-// Applies the filter to the given sequence of samples.
-// Note : The amount of outputted samples is by value of 'filter length'
-// smaller than the amount of input samples.
-uint AAFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels) const
-{
- return pFIR->evaluate(dest, src, numSamples, numChannels);
-}
-
-
-/// Applies the filter to the given src & dest pipes, so that processed amount of
-/// samples get removed from src, and produced amount added to dest
-/// Note : The amount of outputted samples is by value of 'filter length'
-/// smaller than the amount of input samples.
-uint AAFilter::evaluate(FIFOSampleBuffer &dest, FIFOSampleBuffer &src) const
-{
- SAMPLETYPE *pdest;
- const SAMPLETYPE *psrc;
- uint numSrcSamples;
- uint result;
- int numChannels = src.getChannels();
-
- ADM_assert(numChannels == dest.getChannels());
-
- numSrcSamples = src.numSamples();
- psrc = src.ptrBegin();
- pdest = dest.ptrEnd(numSrcSamples);
- result = pFIR->evaluate(pdest, psrc, numSrcSamples, numChannels);
- src.receiveSamples(result);
- dest.putSamples(result);
-
- return result;
-}
-
-
-uint AAFilter::getLength() const
-{
- return pFIR->getLength();
-}
+////////////////////////////////////////////////////////////////////////////////
+///
+/// FIR low-pass (anti-alias) filter with filter coefficient design routine and
+/// MMX optimization.
+///
+/// Anti-alias filter is used to prevent folding of high frequencies when
+/// transposing the sample rate with interpolation.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include
+#include "ADM_default.h"
+#include
+#include
+#include "AAFilter.h"
+#include "FIRFilter.h"
+
+using namespace soundtouch;
+
+#define PI 3.14159265358979323846
+#define TWOPI (2 * PI)
+
+// define this to save AA filter coefficients to a file
+// #define _DEBUG_SAVE_AAFILTER_COEFFICIENTS 1
+
+#ifdef _DEBUG_SAVE_AAFILTER_COEFFICIENTS
+ #include
+
+ static void _DEBUG_SAVE_AAFIR_COEFFS(SAMPLETYPE *coeffs, int len)
+ {
+ FILE *fptr = fopen("aa_filter_coeffs.txt", "wt");
+ if (fptr == NULL) return;
+
+ for (int i = 0; i < len; i ++)
+ {
+ double temp = coeffs[i];
+ fprintf(fptr, "%lf\n", temp);
+ }
+ fclose(fptr);
+ }
+
+#else
+ #define _DEBUG_SAVE_AAFIR_COEFFS(x, y)
+#endif
+
+/*****************************************************************************
+ *
+ * Implementation of the class 'AAFilter'
+ *
+ *****************************************************************************/
+
+AAFilter::AAFilter(uint len)
+{
+ pFIR = FIRFilter::newInstance();
+ cutoffFreq = 0.5;
+ setLength(len);
+}
+
+
+AAFilter::~AAFilter()
+{
+ delete pFIR;
+}
+
+
+// Sets new anti-alias filter cut-off edge frequency, scaled to
+// sampling frequency (nyquist frequency = 0.5).
+// The filter will cut frequencies higher than the given frequency.
+void AAFilter::setCutoffFreq(double newCutoffFreq)
+{
+ cutoffFreq = newCutoffFreq;
+ calculateCoeffs();
+}
+
+
+// Sets number of FIR filter taps
+void AAFilter::setLength(uint newLength)
+{
+ length = newLength;
+ calculateCoeffs();
+}
+
+
+// Calculates coefficients for a low-pass FIR filter using Hamming window
+void AAFilter::calculateCoeffs()
+{
+ uint i;
+ double cntTemp, temp, tempCoeff,h, w;
+ double wc;
+ double scaleCoeff, sum;
+ double *work;
+ SAMPLETYPE *coeffs;
+
+ ADM_assert(length >= 2);
+ ADM_assert(length % 4 == 0);
+ ADM_assert(cutoffFreq >= 0);
+ ADM_assert(cutoffFreq <= 0.5);
+
+ work = new double[length];
+ coeffs = new SAMPLETYPE[length];
+
+ wc = 2.0 * PI * cutoffFreq;
+ tempCoeff = TWOPI / (double)length;
+
+ sum = 0;
+ for (i = 0; i < length; i ++)
+ {
+ cntTemp = (double)i - (double)(length / 2);
+
+ temp = cntTemp * wc;
+ if (temp != 0)
+ {
+ h = sin(temp) / temp; // sinc function
+ }
+ else
+ {
+ h = 1.0;
+ }
+ w = 0.54 + 0.46 * cos(tempCoeff * cntTemp); // hamming window
+
+ temp = w * h;
+ work[i] = temp;
+
+ // calc net sum of coefficients
+ sum += temp;
+ }
+
+ // ensure the sum of coefficients is larger than zero
+ ADM_assert(sum > 0);
+
+ // ensure we've really designed a lowpass filter...
+ ADM_assert(work[length/2] > 0);
+ ADM_assert(work[length/2 + 1] > -1e-6);
+ ADM_assert(work[length/2 - 1] > -1e-6);
+
+ // Calculate a scaling coefficient in such a way that the result can be
+ // divided by 16384
+ scaleCoeff = 16384.0f / sum;
+
+ for (i = 0; i < length; i ++)
+ {
+ temp = work[i] * scaleCoeff;
+ // scale & round to nearest integer
+ temp += (temp >= 0) ? 0.5 : -0.5;
+ // ensure no overfloods
+ ADM_assert(temp >= -32768 && temp <= 32767);
+ coeffs[i] = (SAMPLETYPE)temp;
+ }
+
+ // Set coefficients. Use divide factor 14 => divide result by 2^14 = 16384
+ pFIR->setCoefficients(coeffs, length, 14);
+
+ _DEBUG_SAVE_AAFIR_COEFFS(coeffs, length);
+
+ delete[] work;
+ delete[] coeffs;
+}
+
+
+// Applies the filter to the given sequence of samples.
+// Note : The amount of outputted samples is by value of 'filter length'
+// smaller than the amount of input samples.
+uint AAFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels) const
+{
+ return pFIR->evaluate(dest, src, numSamples, numChannels);
+}
+
+
+/// Applies the filter to the given src & dest pipes, so that processed amount of
+/// samples get removed from src, and produced amount added to dest
+/// Note : The amount of outputted samples is by value of 'filter length'
+/// smaller than the amount of input samples.
+uint AAFilter::evaluate(FIFOSampleBuffer &dest, FIFOSampleBuffer &src) const
+{
+ SAMPLETYPE *pdest;
+ const SAMPLETYPE *psrc;
+ uint numSrcSamples;
+ uint result;
+ int numChannels = src.getChannels();
+
+ ADM_assert(numChannels == dest.getChannels());
+
+ numSrcSamples = src.numSamples();
+ psrc = src.ptrBegin();
+ pdest = dest.ptrEnd(numSrcSamples);
+ result = pFIR->evaluate(pdest, psrc, numSrcSamples, numChannels);
+ src.receiveSamples(result);
+ dest.putSamples(result);
+
+ return result;
+}
+
+
+uint AAFilter::getLength() const
+{
+ return pFIR->getLength();
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/AAFilter.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/AAFilter.h
index 8e5697f796..81d836b750 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/AAFilter.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/AAFilter.h
@@ -1,93 +1,93 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
-/// while maintaining the original pitch by using a time domain WSOLA-like method
-/// with several performance-increasing tweaks.
-///
-/// Anti-alias filter is used to prevent folding of high frequencies when
-/// transposing the sample rate with interpolation.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef AAFilter_H
-#define AAFilter_H
-
-#include "STTypes.h"
-#include "FIFOSampleBuffer.h"
-
-namespace soundtouch
-{
-
-class AAFilter
-{
-protected:
- class FIRFilter *pFIR;
-
- /// Low-pass filter cut-off frequency, negative = invalid
- double cutoffFreq;
-
- /// num of filter taps
- uint length;
-
- /// Calculate the FIR coefficients realizing the given cutoff-frequency
- void calculateCoeffs();
-public:
- AAFilter(uint length);
-
- ~AAFilter();
-
- /// Sets new anti-alias filter cut-off edge frequency, scaled to sampling
- /// frequency (nyquist frequency = 0.5). The filter will cut off the
- /// frequencies than that.
- void setCutoffFreq(double newCutoffFreq);
-
- /// Sets number of FIR filter taps, i.e. ~filter complexity
- void setLength(uint newLength);
-
- uint getLength() const;
-
- /// Applies the filter to the given sequence of samples.
- /// Note : The amount of outputted samples is by value of 'filter length'
- /// smaller than the amount of input samples.
- uint evaluate(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- uint numSamples,
- uint numChannels) const;
-
- /// Applies the filter to the given src & dest pipes, so that processed amount of
- /// samples get removed from src, and produced amount added to dest
- /// Note : The amount of outputted samples is by value of 'filter length'
- /// smaller than the amount of input samples.
- uint evaluate(FIFOSampleBuffer &dest,
- FIFOSampleBuffer &src) const;
-
-};
-
-}
-
-#endif
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
+/// while maintaining the original pitch by using a time domain WSOLA-like method
+/// with several performance-increasing tweaks.
+///
+/// Anti-alias filter is used to prevent folding of high frequencies when
+/// transposing the sample rate with interpolation.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef AAFilter_H
+#define AAFilter_H
+
+#include "STTypes.h"
+#include "FIFOSampleBuffer.h"
+
+namespace soundtouch
+{
+
+class AAFilter
+{
+protected:
+ class FIRFilter *pFIR;
+
+ /// Low-pass filter cut-off frequency, negative = invalid
+ double cutoffFreq;
+
+ /// num of filter taps
+ uint length;
+
+ /// Calculate the FIR coefficients realizing the given cutoff-frequency
+ void calculateCoeffs();
+public:
+ AAFilter(uint length);
+
+ ~AAFilter();
+
+ /// Sets new anti-alias filter cut-off edge frequency, scaled to sampling
+ /// frequency (nyquist frequency = 0.5). The filter will cut off the
+ /// frequencies than that.
+ void setCutoffFreq(double newCutoffFreq);
+
+ /// Sets number of FIR filter taps, i.e. ~filter complexity
+ void setLength(uint newLength);
+
+ uint getLength() const;
+
+ /// Applies the filter to the given sequence of samples.
+ /// Note : The amount of outputted samples is by value of 'filter length'
+ /// smaller than the amount of input samples.
+ uint evaluate(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ uint numSamples,
+ uint numChannels) const;
+
+ /// Applies the filter to the given src & dest pipes, so that processed amount of
+ /// samples get removed from src, and produced amount added to dest
+ /// Note : The amount of outputted samples is by value of 'filter length'
+ /// smaller than the amount of input samples.
+ uint evaluate(FIFOSampleBuffer &dest,
+ FIFOSampleBuffer &src) const;
+
+};
+
+}
+
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSampleBuffer.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSampleBuffer.cpp
index 84ab7dd513..b13c9cbefe 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSampleBuffer.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSampleBuffer.cpp
@@ -1,275 +1,275 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// A buffer class for temporarily storaging sound samples, operates as a
-/// first-in-first-out pipe.
-///
-/// Samples are added to the end of the sample buffer with the 'putSamples'
-/// function, and are received from the beginning of the buffer by calling
-/// the 'receiveSamples' function. The class automatically removes the
-/// outputted samples from the buffer, as well as grows the buffer size
-/// whenever necessary.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include
-#include
-#include
-#include "ADM_default.h"
-
-#include "FIFOSampleBuffer.h"
-
-using namespace soundtouch;
-
-// Constructor
-FIFOSampleBuffer::FIFOSampleBuffer(int numChannels)
-{
- ADM_assert(numChannels > 0);
- sizeInBytes = 0; // reasonable initial value
- buffer = NULL;
- bufferUnaligned = NULL;
- samplesInBuffer = 0;
- bufferPos = 0;
- channels = (uint)numChannels;
- ensureCapacity(32); // allocate initial capacity
-}
-
-
-// destructor
-FIFOSampleBuffer::~FIFOSampleBuffer()
-{
- delete[] bufferUnaligned;
- bufferUnaligned = NULL;
- buffer = NULL;
-}
-
-
-// Sets number of channels, 1 = mono, 2 = stereo
-void FIFOSampleBuffer::setChannels(int numChannels)
-{
- uint usedBytes;
-
- if (!verifyNumberOfChannels(numChannels)) return;
-
- usedBytes = channels * samplesInBuffer;
- channels = (uint)numChannels;
- samplesInBuffer = usedBytes / channels;
-}
-
-
-// if output location pointer 'bufferPos' isn't zero, 'rewinds' the buffer and
-// zeroes this pointer by copying samples from the 'bufferPos' pointer
-// location on to the beginning of the buffer.
-void FIFOSampleBuffer::rewind()
-{
- if (buffer && bufferPos)
- {
- memmove(buffer, ptrBegin(), sizeof(SAMPLETYPE) * channels * samplesInBuffer);
- bufferPos = 0;
- }
-}
-
-
-// Adds 'numSamples' pcs of samples from the 'samples' memory position to
-// the sample buffer.
-void FIFOSampleBuffer::putSamples(const SAMPLETYPE *samples, uint nSamples)
-{
- memcpy(ptrEnd(nSamples), samples, sizeof(SAMPLETYPE) * nSamples * channels);
- samplesInBuffer += nSamples;
-}
-
-
-// Increases the number of samples in the buffer without copying any actual
-// samples.
-//
-// This function is used to update the number of samples in the sample buffer
-// when accessing the buffer directly with 'ptrEnd' function. Please be
-// careful though!
-void FIFOSampleBuffer::putSamples(uint nSamples)
-{
- uint req;
-
- req = samplesInBuffer + nSamples;
- ensureCapacity(req);
- samplesInBuffer += nSamples;
-}
-
-
-// Returns a pointer to the end of the used part of the sample buffer (i.e.
-// where the new samples are to be inserted). This function may be used for
-// inserting new samples into the sample buffer directly. Please be careful!
-//
-// Parameter 'slackCapacity' tells the function how much free capacity (in
-// terms of samples) there _at least_ should be, in order to the caller to
-// successfully insert all the required samples to the buffer. When necessary,
-// the function grows the buffer size to comply with this requirement.
-//
-// When using this function as means for inserting new samples, also remember
-// to increase the sample count afterwards, by calling the
-// 'putSamples(numSamples)' function.
-SAMPLETYPE *FIFOSampleBuffer::ptrEnd(uint slackCapacity)
-{
- ensureCapacity(samplesInBuffer + slackCapacity);
- return buffer + samplesInBuffer * channels;
-}
-
-
-// Returns a pointer to the beginning of the currently non-outputted samples.
-// This function is provided for accessing the output samples directly.
-// Please be careful!
-//
-// When using this function to output samples, also remember to 'remove' the
-// outputted samples from the buffer by calling the
-// 'receiveSamples(numSamples)' function
-SAMPLETYPE *FIFOSampleBuffer::ptrBegin()
-{
- ADM_assert(buffer);
- return buffer + bufferPos * channels;
-}
-
-
-// Ensures that the buffer has enough capacity, i.e. space for _at least_
-// 'capacityRequirement' number of samples. The buffer is grown in steps of
-// 4 kilobytes to eliminate the need for frequently growing up the buffer,
-// as well as to round the buffer size up to the virtual memory page size.
-void FIFOSampleBuffer::ensureCapacity(uint capacityRequirement)
-{
- SAMPLETYPE *tempUnaligned, *temp;
-
- if (capacityRequirement > getCapacity())
- {
- // enlarge the buffer in 4kbyte steps (round up to next 4k boundary)
- sizeInBytes = (capacityRequirement * channels * sizeof(SAMPLETYPE) + 4095) & (uint)-4096;
- ADM_assert(sizeInBytes % 2 == 0);
- tempUnaligned = new SAMPLETYPE[sizeInBytes / sizeof(SAMPLETYPE) + 16 / sizeof(SAMPLETYPE)];
- if (tempUnaligned == NULL)
- {
- ST_THROW_RT_ERROR("Couldn't allocate memory!\n");
- }
- // Align the buffer to begin at 16byte cache line boundary for optimal performance
- temp = (SAMPLETYPE *)SOUNDTOUCH_ALIGN_POINTER_16(tempUnaligned);
- if (samplesInBuffer)
- {
- memcpy(temp, ptrBegin(), samplesInBuffer * channels * sizeof(SAMPLETYPE));
- }
- delete[] bufferUnaligned;
- buffer = temp;
- bufferUnaligned = tempUnaligned;
- bufferPos = 0;
- }
- else
- {
- // simply rewind the buffer (if necessary)
- rewind();
- }
-}
-
-
-// Returns the current buffer capacity in terms of samples
-uint FIFOSampleBuffer::getCapacity() const
-{
- return sizeInBytes / (channels * sizeof(SAMPLETYPE));
-}
-
-
-// Returns the number of samples currently in the buffer
-uint FIFOSampleBuffer::numSamples() const
-{
- return samplesInBuffer;
-}
-
-
-// Output samples from beginning of the sample buffer. Copies demanded number
-// of samples to output and removes them from the sample buffer. If there
-// are less than 'numsample' samples in the buffer, returns all available.
-//
-// Returns number of samples copied.
-uint FIFOSampleBuffer::receiveSamples(SAMPLETYPE *output, uint maxSamples)
-{
- uint num;
-
- num = (maxSamples > samplesInBuffer) ? samplesInBuffer : maxSamples;
-
- memcpy(output, ptrBegin(), channels * sizeof(SAMPLETYPE) * num);
- return receiveSamples(num);
-}
-
-
-// Removes samples from the beginning of the sample buffer without copying them
-// anywhere. Used to reduce the number of samples in the buffer, when accessing
-// the sample buffer with the 'ptrBegin' function.
-uint FIFOSampleBuffer::receiveSamples(uint maxSamples)
-{
- if (maxSamples >= samplesInBuffer)
- {
- uint temp;
-
- temp = samplesInBuffer;
- samplesInBuffer = 0;
- return temp;
- }
-
- samplesInBuffer -= maxSamples;
- bufferPos += maxSamples;
-
- return maxSamples;
-}
-
-
-// Returns nonzero if the sample buffer is empty
-int FIFOSampleBuffer::isEmpty() const
-{
- return (samplesInBuffer == 0) ? 1 : 0;
-}
-
-
-// Clears the sample buffer
-void FIFOSampleBuffer::clear()
-{
- samplesInBuffer = 0;
- bufferPos = 0;
-}
-
-
-/// allow trimming (downwards) amount of samples in pipeline.
-/// Returns adjusted amount of samples
-uint FIFOSampleBuffer::adjustAmountOfSamples(uint numSamples)
-{
- if (numSamples < samplesInBuffer)
- {
- samplesInBuffer = numSamples;
- }
- return samplesInBuffer;
-}
-
-
-/// Add silence to end of buffer
-void FIFOSampleBuffer::addSilent(uint nSamples)
-{
- memset(ptrEnd(nSamples), 0, sizeof(SAMPLETYPE) * nSamples * channels);
- samplesInBuffer += nSamples;
-}
+////////////////////////////////////////////////////////////////////////////////
+///
+/// A buffer class for temporarily storaging sound samples, operates as a
+/// first-in-first-out pipe.
+///
+/// Samples are added to the end of the sample buffer with the 'putSamples'
+/// function, and are received from the beginning of the buffer by calling
+/// the 'receiveSamples' function. The class automatically removes the
+/// outputted samples from the buffer, as well as grows the buffer size
+/// whenever necessary.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include
+#include
+#include
+#include "ADM_default.h"
+
+#include "FIFOSampleBuffer.h"
+
+using namespace soundtouch;
+
+// Constructor
+FIFOSampleBuffer::FIFOSampleBuffer(int numChannels)
+{
+ ADM_assert(numChannels > 0);
+ sizeInBytes = 0; // reasonable initial value
+ buffer = NULL;
+ bufferUnaligned = NULL;
+ samplesInBuffer = 0;
+ bufferPos = 0;
+ channels = (uint)numChannels;
+ ensureCapacity(32); // allocate initial capacity
+}
+
+
+// destructor
+FIFOSampleBuffer::~FIFOSampleBuffer()
+{
+ delete[] bufferUnaligned;
+ bufferUnaligned = NULL;
+ buffer = NULL;
+}
+
+
+// Sets number of channels, 1 = mono, 2 = stereo
+void FIFOSampleBuffer::setChannels(int numChannels)
+{
+ uint usedBytes;
+
+ if (!verifyNumberOfChannels(numChannels)) return;
+
+ usedBytes = channels * samplesInBuffer;
+ channels = (uint)numChannels;
+ samplesInBuffer = usedBytes / channels;
+}
+
+
+// if output location pointer 'bufferPos' isn't zero, 'rewinds' the buffer and
+// zeroes this pointer by copying samples from the 'bufferPos' pointer
+// location on to the beginning of the buffer.
+void FIFOSampleBuffer::rewind()
+{
+ if (buffer && bufferPos)
+ {
+ memmove(buffer, ptrBegin(), sizeof(SAMPLETYPE) * channels * samplesInBuffer);
+ bufferPos = 0;
+ }
+}
+
+
+// Adds 'numSamples' pcs of samples from the 'samples' memory position to
+// the sample buffer.
+void FIFOSampleBuffer::putSamples(const SAMPLETYPE *samples, uint nSamples)
+{
+ memcpy(ptrEnd(nSamples), samples, sizeof(SAMPLETYPE) * nSamples * channels);
+ samplesInBuffer += nSamples;
+}
+
+
+// Increases the number of samples in the buffer without copying any actual
+// samples.
+//
+// This function is used to update the number of samples in the sample buffer
+// when accessing the buffer directly with 'ptrEnd' function. Please be
+// careful though!
+void FIFOSampleBuffer::putSamples(uint nSamples)
+{
+ uint req;
+
+ req = samplesInBuffer + nSamples;
+ ensureCapacity(req);
+ samplesInBuffer += nSamples;
+}
+
+
+// Returns a pointer to the end of the used part of the sample buffer (i.e.
+// where the new samples are to be inserted). This function may be used for
+// inserting new samples into the sample buffer directly. Please be careful!
+//
+// Parameter 'slackCapacity' tells the function how much free capacity (in
+// terms of samples) there _at least_ should be, in order to the caller to
+// successfully insert all the required samples to the buffer. When necessary,
+// the function grows the buffer size to comply with this requirement.
+//
+// When using this function as means for inserting new samples, also remember
+// to increase the sample count afterwards, by calling the
+// 'putSamples(numSamples)' function.
+SAMPLETYPE *FIFOSampleBuffer::ptrEnd(uint slackCapacity)
+{
+ ensureCapacity(samplesInBuffer + slackCapacity);
+ return buffer + samplesInBuffer * channels;
+}
+
+
+// Returns a pointer to the beginning of the currently non-outputted samples.
+// This function is provided for accessing the output samples directly.
+// Please be careful!
+//
+// When using this function to output samples, also remember to 'remove' the
+// outputted samples from the buffer by calling the
+// 'receiveSamples(numSamples)' function
+SAMPLETYPE *FIFOSampleBuffer::ptrBegin()
+{
+ ADM_assert(buffer);
+ return buffer + bufferPos * channels;
+}
+
+
+// Ensures that the buffer has enough capacity, i.e. space for _at least_
+// 'capacityRequirement' number of samples. The buffer is grown in steps of
+// 4 kilobytes to eliminate the need for frequently growing up the buffer,
+// as well as to round the buffer size up to the virtual memory page size.
+void FIFOSampleBuffer::ensureCapacity(uint capacityRequirement)
+{
+ SAMPLETYPE *tempUnaligned, *temp;
+
+ if (capacityRequirement > getCapacity())
+ {
+ // enlarge the buffer in 4kbyte steps (round up to next 4k boundary)
+ sizeInBytes = (capacityRequirement * channels * sizeof(SAMPLETYPE) + 4095) & (uint)-4096;
+ ADM_assert(sizeInBytes % 2 == 0);
+ tempUnaligned = new SAMPLETYPE[sizeInBytes / sizeof(SAMPLETYPE) + 16 / sizeof(SAMPLETYPE)];
+ if (tempUnaligned == NULL)
+ {
+ ST_THROW_RT_ERROR("Couldn't allocate memory!\n");
+ }
+ // Align the buffer to begin at 16byte cache line boundary for optimal performance
+ temp = (SAMPLETYPE *)SOUNDTOUCH_ALIGN_POINTER_16(tempUnaligned);
+ if (samplesInBuffer)
+ {
+ memcpy(temp, ptrBegin(), samplesInBuffer * channels * sizeof(SAMPLETYPE));
+ }
+ delete[] bufferUnaligned;
+ buffer = temp;
+ bufferUnaligned = tempUnaligned;
+ bufferPos = 0;
+ }
+ else
+ {
+ // simply rewind the buffer (if necessary)
+ rewind();
+ }
+}
+
+
+// Returns the current buffer capacity in terms of samples
+uint FIFOSampleBuffer::getCapacity() const
+{
+ return sizeInBytes / (channels * sizeof(SAMPLETYPE));
+}
+
+
+// Returns the number of samples currently in the buffer
+uint FIFOSampleBuffer::numSamples() const
+{
+ return samplesInBuffer;
+}
+
+
+// Output samples from beginning of the sample buffer. Copies demanded number
+// of samples to output and removes them from the sample buffer. If there
+// are less than 'numsample' samples in the buffer, returns all available.
+//
+// Returns number of samples copied.
+uint FIFOSampleBuffer::receiveSamples(SAMPLETYPE *output, uint maxSamples)
+{
+ uint num;
+
+ num = (maxSamples > samplesInBuffer) ? samplesInBuffer : maxSamples;
+
+ memcpy(output, ptrBegin(), channels * sizeof(SAMPLETYPE) * num);
+ return receiveSamples(num);
+}
+
+
+// Removes samples from the beginning of the sample buffer without copying them
+// anywhere. Used to reduce the number of samples in the buffer, when accessing
+// the sample buffer with the 'ptrBegin' function.
+uint FIFOSampleBuffer::receiveSamples(uint maxSamples)
+{
+ if (maxSamples >= samplesInBuffer)
+ {
+ uint temp;
+
+ temp = samplesInBuffer;
+ samplesInBuffer = 0;
+ return temp;
+ }
+
+ samplesInBuffer -= maxSamples;
+ bufferPos += maxSamples;
+
+ return maxSamples;
+}
+
+
+// Returns nonzero if the sample buffer is empty
+int FIFOSampleBuffer::isEmpty() const
+{
+ return (samplesInBuffer == 0) ? 1 : 0;
+}
+
+
+// Clears the sample buffer
+void FIFOSampleBuffer::clear()
+{
+ samplesInBuffer = 0;
+ bufferPos = 0;
+}
+
+
+/// allow trimming (downwards) amount of samples in pipeline.
+/// Returns adjusted amount of samples
+uint FIFOSampleBuffer::adjustAmountOfSamples(uint numSamples)
+{
+ if (numSamples < samplesInBuffer)
+ {
+ samplesInBuffer = numSamples;
+ }
+ return samplesInBuffer;
+}
+
+
+/// Add silence to end of buffer
+void FIFOSampleBuffer::addSilent(uint nSamples)
+{
+ memset(ptrEnd(nSamples), 0, sizeof(SAMPLETYPE) * nSamples * channels);
+ samplesInBuffer += nSamples;
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSampleBuffer.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSampleBuffer.h
index 6c5785a6e2..890570a99a 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSampleBuffer.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSampleBuffer.h
@@ -1,180 +1,180 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// A buffer class for temporarily storaging sound samples, operates as a
-/// first-in-first-out pipe.
-///
-/// Samples are added to the end of the sample buffer with the 'putSamples'
-/// function, and are received from the beginning of the buffer by calling
-/// the 'receiveSamples' function. The class automatically removes the
-/// output samples from the buffer as well as grows the storage size
-/// whenever necessary.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef FIFOSampleBuffer_H
-#define FIFOSampleBuffer_H
-
-#include "FIFOSamplePipe.h"
-
-namespace soundtouch
-{
-
-/// Sample buffer working in FIFO (first-in-first-out) principle. The class takes
-/// care of storage size adjustment and data moving during input/output operations.
-///
-/// Notice that in case of stereo audio, one sample is considered to consist of
-/// both channel data.
-class FIFOSampleBuffer : public FIFOSamplePipe
-{
-private:
- /// Sample buffer.
- SAMPLETYPE *buffer;
-
- // Raw unaligned buffer memory. 'buffer' is made aligned by pointing it to first
- // 16-byte aligned location of this buffer
- SAMPLETYPE *bufferUnaligned;
-
- /// Sample buffer size in bytes
- uint sizeInBytes;
-
- /// How many samples are currently in buffer.
- uint samplesInBuffer;
-
- /// Channels, 1=mono, 2=stereo.
- uint channels;
-
- /// Current position pointer to the buffer. This pointer is increased when samples are
- /// removed from the pipe so that it's necessary to actually rewind buffer (move data)
- /// only new data when is put to the pipe.
- uint bufferPos;
-
- /// Rewind the buffer by moving data from position pointed by 'bufferPos' to real
- /// beginning of the buffer.
- void rewind();
-
- /// Ensures that the buffer has capacity for at least this many samples.
- void ensureCapacity(uint capacityRequirement);
-
- /// Returns current capacity.
- uint getCapacity() const;
-
-public:
-
- /// Constructor
- FIFOSampleBuffer(int numChannels = 2 ///< Number of channels, 1=mono, 2=stereo.
- ///< Default is stereo.
- );
-
- /// destructor
- ~FIFOSampleBuffer() override;
-
- /// Returns a pointer to the beginning of the output samples.
- /// This function is provided for accessing the output samples directly.
- /// Please be careful for not to corrupt the book-keeping!
- ///
- /// When using this function to output samples, also remember to 'remove' the
- /// output samples from the buffer by calling the
- /// 'receiveSamples(numSamples)' function
- virtual SAMPLETYPE *ptrBegin() override;
-
- /// Returns a pointer to the end of the used part of the sample buffer (i.e.
- /// where the new samples are to be inserted). This function may be used for
- /// inserting new samples into the sample buffer directly. Please be careful
- /// not corrupt the book-keeping!
- ///
- /// When using this function as means for inserting new samples, also remember
- /// to increase the sample count afterwards, by calling the
- /// 'putSamples(numSamples)' function.
- SAMPLETYPE *ptrEnd(
- uint slackCapacity ///< How much free capacity (in samples) there _at least_
- ///< should be so that the caller can successfully insert the
- ///< desired samples to the buffer. If necessary, the function
- ///< grows the buffer size to comply with this requirement.
- );
-
- /// Adds 'numSamples' pcs of samples from the 'samples' memory position to
- /// the sample buffer.
- virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples.
- uint numSamples ///< Number of samples to insert.
- ) override;
-
- /// Adjusts the book-keeping to increase number of samples in the buffer without
- /// copying any actual samples.
- ///
- /// This function is used to update the number of samples in the sample buffer
- /// when accessing the buffer directly with 'ptrEnd' function. Please be
- /// careful though!
- virtual void putSamples(uint numSamples ///< Number of samples been inserted.
- );
-
- /// Output samples from beginning of the sample buffer. Copies requested samples to
- /// output buffer and removes them from the sample buffer. If there are less than
- /// 'numsample' samples in the buffer, returns all that available.
- ///
- /// \return Number of samples returned.
- virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
- uint maxSamples ///< How many samples to receive at max.
- ) override;
-
- /// Adjusts book-keeping so that given number of samples are removed from beginning of the
- /// sample buffer without copying them anywhere.
- ///
- /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
- /// with 'ptrBegin' function.
- virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
- ) override;
-
- /// Returns number of samples currently available.
- virtual uint numSamples() const override;
-
- /// Sets number of channels, 1 = mono, 2 = stereo.
- void setChannels(int numChannels);
-
- /// Get number of channels
- int getChannels()
- {
- return channels;
- }
-
- /// Returns nonzero if there aren't any samples available for outputting.
- virtual int isEmpty() const override;
-
- /// Clears all the samples.
- virtual void clear() override;
-
- /// allow trimming (downwards) amount of samples in pipeline.
- /// Returns adjusted amount of samples
- uint adjustAmountOfSamples(uint numSamples) override;
-
- /// Add silence to end of buffer
- void addSilent(uint nSamples);
-};
-
-}
-
-#endif
+////////////////////////////////////////////////////////////////////////////////
+///
+/// A buffer class for temporarily storaging sound samples, operates as a
+/// first-in-first-out pipe.
+///
+/// Samples are added to the end of the sample buffer with the 'putSamples'
+/// function, and are received from the beginning of the buffer by calling
+/// the 'receiveSamples' function. The class automatically removes the
+/// output samples from the buffer as well as grows the storage size
+/// whenever necessary.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef FIFOSampleBuffer_H
+#define FIFOSampleBuffer_H
+
+#include "FIFOSamplePipe.h"
+
+namespace soundtouch
+{
+
+/// Sample buffer working in FIFO (first-in-first-out) principle. The class takes
+/// care of storage size adjustment and data moving during input/output operations.
+///
+/// Notice that in case of stereo audio, one sample is considered to consist of
+/// both channel data.
+class FIFOSampleBuffer : public FIFOSamplePipe
+{
+private:
+ /// Sample buffer.
+ SAMPLETYPE *buffer;
+
+ // Raw unaligned buffer memory. 'buffer' is made aligned by pointing it to first
+ // 16-byte aligned location of this buffer
+ SAMPLETYPE *bufferUnaligned;
+
+ /// Sample buffer size in bytes
+ uint sizeInBytes;
+
+ /// How many samples are currently in buffer.
+ uint samplesInBuffer;
+
+ /// Channels, 1=mono, 2=stereo.
+ uint channels;
+
+ /// Current position pointer to the buffer. This pointer is increased when samples are
+ /// removed from the pipe so that it's necessary to actually rewind buffer (move data)
+ /// only new data when is put to the pipe.
+ uint bufferPos;
+
+ /// Rewind the buffer by moving data from position pointed by 'bufferPos' to real
+ /// beginning of the buffer.
+ void rewind();
+
+ /// Ensures that the buffer has capacity for at least this many samples.
+ void ensureCapacity(uint capacityRequirement);
+
+ /// Returns current capacity.
+ uint getCapacity() const;
+
+public:
+
+ /// Constructor
+ FIFOSampleBuffer(int numChannels = 2 ///< Number of channels, 1=mono, 2=stereo.
+ ///< Default is stereo.
+ );
+
+ /// destructor
+ ~FIFOSampleBuffer() override;
+
+ /// Returns a pointer to the beginning of the output samples.
+ /// This function is provided for accessing the output samples directly.
+ /// Please be careful for not to corrupt the book-keeping!
+ ///
+ /// When using this function to output samples, also remember to 'remove' the
+ /// output samples from the buffer by calling the
+ /// 'receiveSamples(numSamples)' function
+ virtual SAMPLETYPE *ptrBegin() override;
+
+ /// Returns a pointer to the end of the used part of the sample buffer (i.e.
+ /// where the new samples are to be inserted). This function may be used for
+ /// inserting new samples into the sample buffer directly. Please be careful
+ /// not corrupt the book-keeping!
+ ///
+ /// When using this function as means for inserting new samples, also remember
+ /// to increase the sample count afterwards, by calling the
+ /// 'putSamples(numSamples)' function.
+ SAMPLETYPE *ptrEnd(
+ uint slackCapacity ///< How much free capacity (in samples) there _at least_
+ ///< should be so that the caller can successfully insert the
+ ///< desired samples to the buffer. If necessary, the function
+ ///< grows the buffer size to comply with this requirement.
+ );
+
+ /// Adds 'numSamples' pcs of samples from the 'samples' memory position to
+ /// the sample buffer.
+ virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples.
+ uint numSamples ///< Number of samples to insert.
+ ) override;
+
+ /// Adjusts the book-keeping to increase number of samples in the buffer without
+ /// copying any actual samples.
+ ///
+ /// This function is used to update the number of samples in the sample buffer
+ /// when accessing the buffer directly with 'ptrEnd' function. Please be
+ /// careful though!
+ virtual void putSamples(uint numSamples ///< Number of samples been inserted.
+ );
+
+ /// Output samples from beginning of the sample buffer. Copies requested samples to
+ /// output buffer and removes them from the sample buffer. If there are less than
+ /// 'numsample' samples in the buffer, returns all that available.
+ ///
+ /// \return Number of samples returned.
+ virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
+ uint maxSamples ///< How many samples to receive at max.
+ ) override;
+
+ /// Adjusts book-keeping so that given number of samples are removed from beginning of the
+ /// sample buffer without copying them anywhere.
+ ///
+ /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
+ /// with 'ptrBegin' function.
+ virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
+ ) override;
+
+ /// Returns number of samples currently available.
+ virtual uint numSamples() const override;
+
+ /// Sets number of channels, 1 = mono, 2 = stereo.
+ void setChannels(int numChannels);
+
+ /// Get number of channels
+ int getChannels()
+ {
+ return channels;
+ }
+
+ /// Returns nonzero if there aren't any samples available for outputting.
+ virtual int isEmpty() const override;
+
+ /// Clears all the samples.
+ virtual void clear() override;
+
+ /// allow trimming (downwards) amount of samples in pipeline.
+ /// Returns adjusted amount of samples
+ uint adjustAmountOfSamples(uint numSamples) override;
+
+ /// Add silence to end of buffer
+ void addSilent(uint nSamples);
+};
+
+}
+
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSamplePipe.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSamplePipe.h
index 663c5c6131..8d415a00a7 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSamplePipe.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIFOSamplePipe.h
@@ -1,230 +1,230 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// 'FIFOSamplePipe' : An abstract base class for classes that manipulate sound
-/// samples by operating like a first-in-first-out pipe: New samples are fed
-/// into one end of the pipe with the 'putSamples' function, and the processed
-/// samples are received from the other end with the 'receiveSamples' function.
-///
-/// 'FIFOProcessor' : A base class for classes the do signal processing with
-/// the samples while operating like a first-in-first-out pipe. When samples
-/// are input with the 'putSamples' function, the class processes them
-/// and moves the processed samples to the given 'output' pipe object, which
-/// may be either another processing stage, or a fifo sample buffer object.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef FIFOSamplePipe_H
-#define FIFOSamplePipe_H
-
-#include
-#include
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-/// Abstract base class for FIFO (first-in-first-out) sample processing classes.
-class FIFOSamplePipe
-{
-protected:
-
- bool verifyNumberOfChannels(int nChannels) const
- {
- if ((nChannels > 0) && (nChannels <= SOUNDTOUCH_MAX_CHANNELS))
- {
- return true;
- }
- ST_THROW_RT_ERROR("Error: Illegal number of channels");
- return false;
- }
-
-public:
- // virtual default destructor
- virtual ~FIFOSamplePipe() {}
-
-
- /// Returns a pointer to the beginning of the output samples.
- /// This function is provided for accessing the output samples directly.
- /// Please be careful for not to corrupt the book-keeping!
- ///
- /// When using this function to output samples, also remember to 'remove' the
- /// output samples from the buffer by calling the
- /// 'receiveSamples(numSamples)' function
- virtual SAMPLETYPE *ptrBegin() = 0;
-
- /// Adds 'numSamples' pcs of samples from the 'samples' memory position to
- /// the sample buffer.
- virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples.
- uint numSamples ///< Number of samples to insert.
- ) = 0;
-
-
- // Moves samples from the 'other' pipe instance to this instance.
- void moveSamples(FIFOSamplePipe &other ///< Other pipe instance where from the receive the data.
- )
- {
- int oNumSamples = other.numSamples();
-
- putSamples(other.ptrBegin(), oNumSamples);
- other.receiveSamples(oNumSamples);
- };
-
- /// Output samples from beginning of the sample buffer. Copies requested samples to
- /// output buffer and removes them from the sample buffer. If there are less than
- /// 'numsample' samples in the buffer, returns all that available.
- ///
- /// \return Number of samples returned.
- virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
- uint maxSamples ///< How many samples to receive at max.
- ) = 0;
-
- /// Adjusts book-keeping so that given number of samples are removed from beginning of the
- /// sample buffer without copying them anywhere.
- ///
- /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
- /// with 'ptrBegin' function.
- virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
- ) = 0;
-
- /// Returns number of samples currently available.
- virtual uint numSamples() const = 0;
-
- // Returns nonzero if there aren't any samples available for outputting.
- virtual int isEmpty() const = 0;
-
- /// Clears all the samples.
- virtual void clear() = 0;
-
- /// allow trimming (downwards) amount of samples in pipeline.
- /// Returns adjusted amount of samples
- virtual uint adjustAmountOfSamples(uint numSamples) = 0;
-
-};
-
-
-/// Base-class for sound processing routines working in FIFO principle. With this base
-/// class it's easy to implement sound processing stages that can be chained together,
-/// so that samples that are fed into beginning of the pipe automatically go through
-/// all the processing stages.
-///
-/// When samples are input to this class, they're first processed and then put to
-/// the FIFO pipe that's defined as output of this class. This output pipe can be
-/// either other processing stage or a FIFO sample buffer.
-class FIFOProcessor :public FIFOSamplePipe
-{
-protected:
- /// Internal pipe where processed samples are put.
- FIFOSamplePipe *output;
-
- /// Sets output pipe.
- void setOutPipe(FIFOSamplePipe *pOutput)
- {
- assert(output == NULL);
- assert(pOutput != NULL);
- output = pOutput;
- }
-
- /// Constructor. Doesn't define output pipe; it has to be set be
- /// 'setOutPipe' function.
- FIFOProcessor()
- {
- output = NULL;
- }
-
- /// Constructor. Configures output pipe.
- FIFOProcessor(FIFOSamplePipe *pOutput ///< Output pipe.
- )
- {
- output = pOutput;
- }
-
- /// Destructor.
- virtual ~FIFOProcessor() override
- {
- }
-
- /// Returns a pointer to the beginning of the output samples.
- /// This function is provided for accessing the output samples directly.
- /// Please be careful for not to corrupt the book-keeping!
- ///
- /// When using this function to output samples, also remember to 'remove' the
- /// output samples from the buffer by calling the
- /// 'receiveSamples(numSamples)' function
- virtual SAMPLETYPE *ptrBegin() override
- {
- return output->ptrBegin();
- }
-
-public:
-
- /// Output samples from beginning of the sample buffer. Copies requested samples to
- /// output buffer and removes them from the sample buffer. If there are less than
- /// 'numsample' samples in the buffer, returns all that available.
- ///
- /// \return Number of samples returned.
- virtual uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples.
- uint maxSamples ///< How many samples to receive at max.
- ) override
- {
- return output->receiveSamples(outBuffer, maxSamples);
- }
-
- /// Adjusts book-keeping so that given number of samples are removed from beginning of the
- /// sample buffer without copying them anywhere.
- ///
- /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
- /// with 'ptrBegin' function.
- virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
- ) override
- {
- return output->receiveSamples(maxSamples);
- }
-
- /// Returns number of samples currently available.
- virtual uint numSamples() const override
- {
- return output->numSamples();
- }
-
- /// Returns nonzero if there aren't any samples available for outputting.
- virtual int isEmpty() const override
- {
- return output->isEmpty();
- }
-
- /// allow trimming (downwards) amount of samples in pipeline.
- /// Returns adjusted amount of samples
- virtual uint adjustAmountOfSamples(uint numSamples) override
- {
- return output->adjustAmountOfSamples(numSamples);
- }
-};
-
-}
-
-#endif
+////////////////////////////////////////////////////////////////////////////////
+///
+/// 'FIFOSamplePipe' : An abstract base class for classes that manipulate sound
+/// samples by operating like a first-in-first-out pipe: New samples are fed
+/// into one end of the pipe with the 'putSamples' function, and the processed
+/// samples are received from the other end with the 'receiveSamples' function.
+///
+/// 'FIFOProcessor' : A base class for classes the do signal processing with
+/// the samples while operating like a first-in-first-out pipe. When samples
+/// are input with the 'putSamples' function, the class processes them
+/// and moves the processed samples to the given 'output' pipe object, which
+/// may be either another processing stage, or a fifo sample buffer object.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef FIFOSamplePipe_H
+#define FIFOSamplePipe_H
+
+#include
+#include
+#include "STTypes.h"
+
+namespace soundtouch
+{
+
+/// Abstract base class for FIFO (first-in-first-out) sample processing classes.
+class FIFOSamplePipe
+{
+protected:
+
+ bool verifyNumberOfChannels(int nChannels) const
+ {
+ if ((nChannels > 0) && (nChannels <= SOUNDTOUCH_MAX_CHANNELS))
+ {
+ return true;
+ }
+ ST_THROW_RT_ERROR("Error: Illegal number of channels");
+ return false;
+ }
+
+public:
+ // virtual default destructor
+ virtual ~FIFOSamplePipe() {}
+
+
+ /// Returns a pointer to the beginning of the output samples.
+ /// This function is provided for accessing the output samples directly.
+ /// Please be careful for not to corrupt the book-keeping!
+ ///
+ /// When using this function to output samples, also remember to 'remove' the
+ /// output samples from the buffer by calling the
+ /// 'receiveSamples(numSamples)' function
+ virtual SAMPLETYPE *ptrBegin() = 0;
+
+ /// Adds 'numSamples' pcs of samples from the 'samples' memory position to
+ /// the sample buffer.
+ virtual void putSamples(const SAMPLETYPE *samples, ///< Pointer to samples.
+ uint numSamples ///< Number of samples to insert.
+ ) = 0;
+
+
+ // Moves samples from the 'other' pipe instance to this instance.
+ void moveSamples(FIFOSamplePipe &other ///< Other pipe instance where from the receive the data.
+ )
+ {
+ int oNumSamples = other.numSamples();
+
+ putSamples(other.ptrBegin(), oNumSamples);
+ other.receiveSamples(oNumSamples);
+ };
+
+ /// Output samples from beginning of the sample buffer. Copies requested samples to
+ /// output buffer and removes them from the sample buffer. If there are less than
+ /// 'numsample' samples in the buffer, returns all that available.
+ ///
+ /// \return Number of samples returned.
+ virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
+ uint maxSamples ///< How many samples to receive at max.
+ ) = 0;
+
+ /// Adjusts book-keeping so that given number of samples are removed from beginning of the
+ /// sample buffer without copying them anywhere.
+ ///
+ /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
+ /// with 'ptrBegin' function.
+ virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
+ ) = 0;
+
+ /// Returns number of samples currently available.
+ virtual uint numSamples() const = 0;
+
+ // Returns nonzero if there aren't any samples available for outputting.
+ virtual int isEmpty() const = 0;
+
+ /// Clears all the samples.
+ virtual void clear() = 0;
+
+ /// allow trimming (downwards) amount of samples in pipeline.
+ /// Returns adjusted amount of samples
+ virtual uint adjustAmountOfSamples(uint numSamples) = 0;
+
+};
+
+
+/// Base-class for sound processing routines working in FIFO principle. With this base
+/// class it's easy to implement sound processing stages that can be chained together,
+/// so that samples that are fed into beginning of the pipe automatically go through
+/// all the processing stages.
+///
+/// When samples are input to this class, they're first processed and then put to
+/// the FIFO pipe that's defined as output of this class. This output pipe can be
+/// either other processing stage or a FIFO sample buffer.
+class FIFOProcessor :public FIFOSamplePipe
+{
+protected:
+ /// Internal pipe where processed samples are put.
+ FIFOSamplePipe *output;
+
+ /// Sets output pipe.
+ void setOutPipe(FIFOSamplePipe *pOutput)
+ {
+ assert(output == NULL);
+ assert(pOutput != NULL);
+ output = pOutput;
+ }
+
+ /// Constructor. Doesn't define output pipe; it has to be set be
+ /// 'setOutPipe' function.
+ FIFOProcessor()
+ {
+ output = NULL;
+ }
+
+ /// Constructor. Configures output pipe.
+ FIFOProcessor(FIFOSamplePipe *pOutput ///< Output pipe.
+ )
+ {
+ output = pOutput;
+ }
+
+ /// Destructor.
+ virtual ~FIFOProcessor() override
+ {
+ }
+
+ /// Returns a pointer to the beginning of the output samples.
+ /// This function is provided for accessing the output samples directly.
+ /// Please be careful for not to corrupt the book-keeping!
+ ///
+ /// When using this function to output samples, also remember to 'remove' the
+ /// output samples from the buffer by calling the
+ /// 'receiveSamples(numSamples)' function
+ virtual SAMPLETYPE *ptrBegin() override
+ {
+ return output->ptrBegin();
+ }
+
+public:
+
+ /// Output samples from beginning of the sample buffer. Copies requested samples to
+ /// output buffer and removes them from the sample buffer. If there are less than
+ /// 'numsample' samples in the buffer, returns all that available.
+ ///
+ /// \return Number of samples returned.
+ virtual uint receiveSamples(SAMPLETYPE *outBuffer, ///< Buffer where to copy output samples.
+ uint maxSamples ///< How many samples to receive at max.
+ ) override
+ {
+ return output->receiveSamples(outBuffer, maxSamples);
+ }
+
+ /// Adjusts book-keeping so that given number of samples are removed from beginning of the
+ /// sample buffer without copying them anywhere.
+ ///
+ /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
+ /// with 'ptrBegin' function.
+ virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
+ ) override
+ {
+ return output->receiveSamples(maxSamples);
+ }
+
+ /// Returns number of samples currently available.
+ virtual uint numSamples() const override
+ {
+ return output->numSamples();
+ }
+
+ /// Returns nonzero if there aren't any samples available for outputting.
+ virtual int isEmpty() const override
+ {
+ return output->isEmpty();
+ }
+
+ /// allow trimming (downwards) amount of samples in pipeline.
+ /// Returns adjusted amount of samples
+ virtual uint adjustAmountOfSamples(uint numSamples) override
+ {
+ return output->adjustAmountOfSamples(numSamples);
+ }
+};
+
+}
+
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIRFilter.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIRFilter.cpp
index d303fb095e..3553c1ebe1 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIRFilter.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIRFilter.cpp
@@ -1,325 +1,325 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// General FIR digital filter routines with MMX optimization.
-///
-/// Notes : MMX optimized functions reside in a separate, platform-specific file,
-/// e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'
-///
-/// This source file contains OpenMP optimizations that allow speeding up the
-/// corss-correlation algorithm by executing it in several threads / CPU cores
-/// in parallel. See the following article link for more detailed discussion
-/// about SoundTouch OpenMP optimizations:
-/// http://www.softwarecoven.com/parallel-computing-in-embedded-mobile-devices
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include
-#include
-#include
-#include "FIRFilter.h"
-
-#include "ADM_default.h"
-
-using namespace soundtouch;
-
-/*****************************************************************************
- *
- * Implementation of the class 'FIRFilter'
- *
- *****************************************************************************/
-
-FIRFilter::FIRFilter()
-{
- resultDivFactor = 0;
- resultDivider = 0;
- length = 0;
- lengthDiv8 = 0;
- filterCoeffs = NULL;
- filterCoeffsStereo = NULL;
-}
-
-
-FIRFilter::~FIRFilter()
-{
- delete[] filterCoeffs;
- delete[] filterCoeffsStereo;
-}
-
-
-// Usual C-version of the filter routine for stereo sound
-uint FIRFilter::evaluateFilterStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const
-{
- int j, end;
-#ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // when using floating point samples, use a scaler instead of a divider
- // because division is much slower operation than multiplying.
- double dScaler = 1.0 / (double)resultDivider;
-#endif
- // hint compiler autovectorization that loop length is divisible by 8
- int ilength = length & -8;
-
- ADM_assert((length != 0) && (length == ilength) && (src != NULL) && (dest != NULL) && (filterCoeffs != NULL));
-
- end = 2 * (numSamples - ilength);
-
- #pragma omp parallel for
- for (j = 0; j < end; j += 2)
- {
- const SAMPLETYPE *ptr;
- LONG_SAMPLETYPE suml, sumr;
-
- suml = sumr = 0;
- ptr = src + j;
-
- for (int i = 0; i < ilength; i ++)
- {
- suml += ptr[2 * i] * filterCoeffsStereo[2 * i];
- sumr += ptr[2 * i + 1] * filterCoeffsStereo[2 * i + 1];
- }
-
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- suml >>= resultDivFactor;
- sumr >>= resultDivFactor;
- // saturate to 16 bit integer limits
- suml = (suml < -32768) ? -32768 : (suml > 32767) ? 32767 : suml;
- // saturate to 16 bit integer limits
- sumr = (sumr < -32768) ? -32768 : (sumr > 32767) ? 32767 : sumr;
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
- dest[j] = (SAMPLETYPE)suml;
- dest[j + 1] = (SAMPLETYPE)sumr;
- }
- return numSamples - ilength;
-}
-
-
-// Usual C-version of the filter routine for mono sound
-uint FIRFilter::evaluateFilterMono(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const
-{
- int j, end;
-#ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // when using floating point samples, use a scaler instead of a divider
- // because division is much slower operation than multiplying.
- double dScaler = 1.0 / (double)resultDivider;
-#endif
-
- // hint compiler autovectorization that loop length is divisible by 8
- int ilength = length & -8;
-
- ADM_assert(ilength != 0);
-
- end = numSamples - ilength;
- #pragma omp parallel for
- for (j = 0; j < end; j ++)
- {
- const SAMPLETYPE *pSrc = src + j;
- LONG_SAMPLETYPE sum;
- int i;
-
- sum = 0;
- for (i = 0; i < ilength; i ++)
- {
- sum += pSrc[i] * filterCoeffs[i];
- }
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- sum >>= resultDivFactor;
- // saturate to 16 bit integer limits
- sum = (sum < -32768) ? -32768 : (sum > 32767) ? 32767 : sum;
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
- dest[j] = (SAMPLETYPE)sum;
- }
- return end;
-}
-
-
-uint FIRFilter::evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels)
-{
- int j, end;
-
-#ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // when using floating point samples, use a scaler instead of a divider
- // because division is much slower operation than multiplying.
- double dScaler = 1.0 / (double)resultDivider;
-#endif
-
- ADM_assert(length != 0);
- ADM_assert(src != NULL);
- ADM_assert(dest != NULL);
- ADM_assert(filterCoeffs != NULL);
- ADM_assert(numChannels < 16);
-
- // hint compiler autovectorization that loop length is divisible by 8
- int ilength = length & -8;
-
- end = numChannels * (numSamples - ilength);
-
- #pragma omp parallel for
- for (j = 0; j < end; j += numChannels)
- {
- const SAMPLETYPE *ptr;
- LONG_SAMPLETYPE sums[16];
- uint c;
- int i;
-
- for (c = 0; c < numChannels; c ++)
- {
- sums[c] = 0;
- }
-
- ptr = src + j;
-
- for (i = 0; i < ilength; i ++)
- {
- SAMPLETYPE coef=filterCoeffs[i];
- for (c = 0; c < numChannels; c ++)
- {
- sums[c] += ptr[0] * coef;
- ptr ++;
- }
- }
-
- for (c = 0; c < numChannels; c ++)
- {
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- sums[c] >>= resultDivFactor;
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
- dest[j+c] = (SAMPLETYPE)sums[c];
- }
- }
- return numSamples - ilength;
-}
-
-
-// Set filter coeffiecients and length.
-//
-// Throws an exception if filter length isn't divisible by 8
-void FIRFilter::setCoefficients(const SAMPLETYPE *coeffs, uint newLength, uint uResultDivFactor)
-{
- ADM_assert(newLength > 0);
- if (newLength % 8) ST_THROW_RT_ERROR("FIR filter length not divisible by 8");
-
- #ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // scale coefficients already here if using floating samples
- double scale = 1.0 / resultDivider;
- #else
- short scale = 1;
- #endif
-
- lengthDiv8 = newLength / 8;
- length = lengthDiv8 * 8;
- ADM_assert(length == newLength);
-
- resultDivFactor = uResultDivFactor;
- resultDivider = (SAMPLETYPE)::pow(2.0, (int)resultDivFactor);
-
- delete[] filterCoeffs;
- filterCoeffs = new SAMPLETYPE[length];
- delete[] filterCoeffsStereo;
- filterCoeffsStereo = new SAMPLETYPE[length*2];
- for (uint i = 0; i < length; i ++)
- {
- filterCoeffs[i] = (SAMPLETYPE)(coeffs[i] * scale);
- // create also stereo set of filter coefficients: this allows compiler
- // to autovectorize filter evaluation much more efficiently
- filterCoeffsStereo[2 * i] = (SAMPLETYPE)(coeffs[i] * scale);
- filterCoeffsStereo[2 * i + 1] = (SAMPLETYPE)(coeffs[i] * scale);
- }
-}
-
-
-uint FIRFilter::getLength() const
-{
- return length;
-}
-
-
-// Applies the filter to the given sequence of samples.
-//
-// Note : The amount of outputted samples is by value of 'filter_length'
-// smaller than the amount of input samples.
-uint FIRFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels)
-{
- ADM_assert(length > 0);
- ADM_assert(lengthDiv8 * 8 == length);
-
- if (numSamples < length) return 0;
-
-#ifndef USE_MULTICH_ALWAYS
- if (numChannels == 1)
- {
- return evaluateFilterMono(dest, src, numSamples);
- }
- else if (numChannels == 2)
- {
- return evaluateFilterStereo(dest, src, numSamples);
- }
- else
-#endif // USE_MULTICH_ALWAYS
- {
- ADM_assert(numChannels > 0);
- return evaluateFilterMulti(dest, src, numSamples, numChannels);
- }
-}
-
-
-// Operator 'new' is overloaded so that it automatically creates a suitable instance
-// depending on if we've a MMX-capable CPU available or not.
-void * FIRFilter::operator new(size_t s)
-{
- // Notice! don't use "new FIRFilter" directly, use "newInstance" to create a new instance instead!
- ST_THROW_RT_ERROR("Error in FIRFilter::new: Don't use 'new FIRFilter', use 'newInstance' member instead!");
- return newInstance();
-}
-
-
-FIRFilter * FIRFilter::newInstance()
-{
- // Check if MMX/SSE instruction set extensions supported by CPU
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
- // MMX routines available only with integer sample types
- if (CpuCaps::hasMMX())
- {
- return ::new FIRFilterMMX;
- }
- else
-#endif // SOUNDTOUCH_ALLOW_MMX
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
- if (CpuCaps::hasSSE())
- {
- // SSE support
- return ::new FIRFilterSSE;
- }
- else
-#endif // SOUNDTOUCH_ALLOW_SSE
-
- {
- // ISA optimizations not supported, use plain C version
- return ::new FIRFilter;
- }
-}
+////////////////////////////////////////////////////////////////////////////////
+///
+/// General FIR digital filter routines with MMX optimization.
+///
+/// Notes : MMX optimized functions reside in a separate, platform-specific file,
+/// e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'
+///
+/// This source file contains OpenMP optimizations that allow speeding up the
+/// corss-correlation algorithm by executing it in several threads / CPU cores
+/// in parallel. See the following article link for more detailed discussion
+/// about SoundTouch OpenMP optimizations:
+/// http://www.softwarecoven.com/parallel-computing-in-embedded-mobile-devices
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include
+#include
+#include
+#include "FIRFilter.h"
+
+#include "ADM_default.h"
+
+using namespace soundtouch;
+
+/*****************************************************************************
+ *
+ * Implementation of the class 'FIRFilter'
+ *
+ *****************************************************************************/
+
+FIRFilter::FIRFilter()
+{
+ resultDivFactor = 0;
+ resultDivider = 0;
+ length = 0;
+ lengthDiv8 = 0;
+ filterCoeffs = NULL;
+ filterCoeffsStereo = NULL;
+}
+
+
+FIRFilter::~FIRFilter()
+{
+ delete[] filterCoeffs;
+ delete[] filterCoeffsStereo;
+}
+
+
+// Usual C-version of the filter routine for stereo sound
+uint FIRFilter::evaluateFilterStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const
+{
+ int j, end;
+#ifdef SOUNDTOUCH_FLOAT_SAMPLES
+ // when using floating point samples, use a scaler instead of a divider
+ // because division is much slower operation than multiplying.
+ double dScaler = 1.0 / (double)resultDivider;
+#endif
+ // hint compiler autovectorization that loop length is divisible by 8
+ int ilength = length & -8;
+
+ ADM_assert((length != 0) && (length == ilength) && (src != NULL) && (dest != NULL) && (filterCoeffs != NULL));
+
+ end = 2 * (numSamples - ilength);
+
+ #pragma omp parallel for
+ for (j = 0; j < end; j += 2)
+ {
+ const SAMPLETYPE *ptr;
+ LONG_SAMPLETYPE suml, sumr;
+
+ suml = sumr = 0;
+ ptr = src + j;
+
+ for (int i = 0; i < ilength; i ++)
+ {
+ suml += ptr[2 * i] * filterCoeffsStereo[2 * i];
+ sumr += ptr[2 * i + 1] * filterCoeffsStereo[2 * i + 1];
+ }
+
+#ifdef SOUNDTOUCH_INTEGER_SAMPLES
+ suml >>= resultDivFactor;
+ sumr >>= resultDivFactor;
+ // saturate to 16 bit integer limits
+ suml = (suml < -32768) ? -32768 : (suml > 32767) ? 32767 : suml;
+ // saturate to 16 bit integer limits
+ sumr = (sumr < -32768) ? -32768 : (sumr > 32767) ? 32767 : sumr;
+#endif // SOUNDTOUCH_INTEGER_SAMPLES
+ dest[j] = (SAMPLETYPE)suml;
+ dest[j + 1] = (SAMPLETYPE)sumr;
+ }
+ return numSamples - ilength;
+}
+
+
+// Usual C-version of the filter routine for mono sound
+uint FIRFilter::evaluateFilterMono(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples) const
+{
+ int j, end;
+#ifdef SOUNDTOUCH_FLOAT_SAMPLES
+ // when using floating point samples, use a scaler instead of a divider
+ // because division is much slower operation than multiplying.
+ double dScaler = 1.0 / (double)resultDivider;
+#endif
+
+ // hint compiler autovectorization that loop length is divisible by 8
+ int ilength = length & -8;
+
+ ADM_assert(ilength != 0);
+
+ end = numSamples - ilength;
+ #pragma omp parallel for
+ for (j = 0; j < end; j ++)
+ {
+ const SAMPLETYPE *pSrc = src + j;
+ LONG_SAMPLETYPE sum;
+ int i;
+
+ sum = 0;
+ for (i = 0; i < ilength; i ++)
+ {
+ sum += pSrc[i] * filterCoeffs[i];
+ }
+#ifdef SOUNDTOUCH_INTEGER_SAMPLES
+ sum >>= resultDivFactor;
+ // saturate to 16 bit integer limits
+ sum = (sum < -32768) ? -32768 : (sum > 32767) ? 32767 : sum;
+#endif // SOUNDTOUCH_INTEGER_SAMPLES
+ dest[j] = (SAMPLETYPE)sum;
+ }
+ return end;
+}
+
+
+uint FIRFilter::evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels)
+{
+ int j, end;
+
+#ifdef SOUNDTOUCH_FLOAT_SAMPLES
+ // when using floating point samples, use a scaler instead of a divider
+ // because division is much slower operation than multiplying.
+ double dScaler = 1.0 / (double)resultDivider;
+#endif
+
+ ADM_assert(length != 0);
+ ADM_assert(src != NULL);
+ ADM_assert(dest != NULL);
+ ADM_assert(filterCoeffs != NULL);
+ ADM_assert(numChannels < 16);
+
+ // hint compiler autovectorization that loop length is divisible by 8
+ int ilength = length & -8;
+
+ end = numChannels * (numSamples - ilength);
+
+ #pragma omp parallel for
+ for (j = 0; j < end; j += numChannels)
+ {
+ const SAMPLETYPE *ptr;
+ LONG_SAMPLETYPE sums[16];
+ uint c;
+ int i;
+
+ for (c = 0; c < numChannels; c ++)
+ {
+ sums[c] = 0;
+ }
+
+ ptr = src + j;
+
+ for (i = 0; i < ilength; i ++)
+ {
+ SAMPLETYPE coef=filterCoeffs[i];
+ for (c = 0; c < numChannels; c ++)
+ {
+ sums[c] += ptr[0] * coef;
+ ptr ++;
+ }
+ }
+
+ for (c = 0; c < numChannels; c ++)
+ {
+#ifdef SOUNDTOUCH_INTEGER_SAMPLES
+ sums[c] >>= resultDivFactor;
+#endif // SOUNDTOUCH_INTEGER_SAMPLES
+ dest[j+c] = (SAMPLETYPE)sums[c];
+ }
+ }
+ return numSamples - ilength;
+}
+
+
+// Set filter coeffiecients and length.
+//
+// Throws an exception if filter length isn't divisible by 8
+void FIRFilter::setCoefficients(const SAMPLETYPE *coeffs, uint newLength, uint uResultDivFactor)
+{
+ ADM_assert(newLength > 0);
+ if (newLength % 8) ST_THROW_RT_ERROR("FIR filter length not divisible by 8");
+
+ #ifdef SOUNDTOUCH_FLOAT_SAMPLES
+ // scale coefficients already here if using floating samples
+ double scale = 1.0 / resultDivider;
+ #else
+ short scale = 1;
+ #endif
+
+ lengthDiv8 = newLength / 8;
+ length = lengthDiv8 * 8;
+ ADM_assert(length == newLength);
+
+ resultDivFactor = uResultDivFactor;
+ resultDivider = (SAMPLETYPE)::pow(2.0, (int)resultDivFactor);
+
+ delete[] filterCoeffs;
+ filterCoeffs = new SAMPLETYPE[length];
+ delete[] filterCoeffsStereo;
+ filterCoeffsStereo = new SAMPLETYPE[length*2];
+ for (uint i = 0; i < length; i ++)
+ {
+ filterCoeffs[i] = (SAMPLETYPE)(coeffs[i] * scale);
+ // create also stereo set of filter coefficients: this allows compiler
+ // to autovectorize filter evaluation much more efficiently
+ filterCoeffsStereo[2 * i] = (SAMPLETYPE)(coeffs[i] * scale);
+ filterCoeffsStereo[2 * i + 1] = (SAMPLETYPE)(coeffs[i] * scale);
+ }
+}
+
+
+uint FIRFilter::getLength() const
+{
+ return length;
+}
+
+
+// Applies the filter to the given sequence of samples.
+//
+// Note : The amount of outputted samples is by value of 'filter_length'
+// smaller than the amount of input samples.
+uint FIRFilter::evaluate(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels)
+{
+ ADM_assert(length > 0);
+ ADM_assert(lengthDiv8 * 8 == length);
+
+ if (numSamples < length) return 0;
+
+#ifndef USE_MULTICH_ALWAYS
+ if (numChannels == 1)
+ {
+ return evaluateFilterMono(dest, src, numSamples);
+ }
+ else if (numChannels == 2)
+ {
+ return evaluateFilterStereo(dest, src, numSamples);
+ }
+ else
+#endif // USE_MULTICH_ALWAYS
+ {
+ ADM_assert(numChannels > 0);
+ return evaluateFilterMulti(dest, src, numSamples, numChannels);
+ }
+}
+
+
+// Operator 'new' is overloaded so that it automatically creates a suitable instance
+// depending on if we've a MMX-capable CPU available or not.
+void * FIRFilter::operator new(size_t s)
+{
+ // Notice! don't use "new FIRFilter" directly, use "newInstance" to create a new instance instead!
+ ST_THROW_RT_ERROR("Error in FIRFilter::new: Don't use 'new FIRFilter', use 'newInstance' member instead!");
+ return newInstance();
+}
+
+
+FIRFilter * FIRFilter::newInstance()
+{
+ // Check if MMX/SSE instruction set extensions supported by CPU
+
+#ifdef SOUNDTOUCH_ALLOW_MMX
+ // MMX routines available only with integer sample types
+ if (CpuCaps::hasMMX())
+ {
+ return ::new FIRFilterMMX;
+ }
+ else
+#endif // SOUNDTOUCH_ALLOW_MMX
+
+#ifdef SOUNDTOUCH_ALLOW_SSE
+ if (CpuCaps::hasSSE())
+ {
+ // SSE support
+ return ::new FIRFilterSSE;
+ }
+ else
+#endif // SOUNDTOUCH_ALLOW_SSE
+
+ {
+ // ISA optimizations not supported, use plain C version
+ return ::new FIRFilter;
+ }
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIRFilter.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIRFilter.h
index 90b730fcb5..cc90feb4f3 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIRFilter.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/FIRFilter.h
@@ -1,140 +1,140 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// General FIR digital filter routines with MMX optimization.
-///
-/// Note : MMX optimized functions reside in a separate, platform-specific file,
-/// e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef FIRFilter_H
-#define FIRFilter_H
-
-#include
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-class FIRFilter
-{
-protected:
- // Number of FIR filter taps
- uint length;
- // Number of FIR filter taps divided by 8
- uint lengthDiv8;
-
- // Result divider factor in 2^k format
- uint resultDivFactor;
-
- // Result divider value.
- SAMPLETYPE resultDivider;
-
- // Memory for filter coefficients
- SAMPLETYPE *filterCoeffs;
- SAMPLETYPE *filterCoeffsStereo;
-
- virtual uint evaluateFilterStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- uint numSamples) const;
- virtual uint evaluateFilterMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- uint numSamples) const;
- virtual uint evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels);
-
-public:
- FIRFilter();
- virtual ~FIRFilter();
-
- /// Operator 'new' is overloaded so that it automatically creates a suitable instance
- /// depending on if we've a MMX-capable CPU available or not.
- static void * operator new(size_t s);
-
- static FIRFilter *newInstance();
-
- /// Applies the filter to the given sequence of samples.
- /// Note : The amount of outputted samples is by value of 'filter_length'
- /// smaller than the amount of input samples.
- ///
- /// \return Number of samples copied to 'dest'.
- uint evaluate(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- uint numSamples,
- uint numChannels);
-
- uint getLength() const;
-
- virtual void setCoefficients(const SAMPLETYPE *coeffs,
- uint newLength,
- uint uResultDivFactor);
-};
-
-
-// Optional subclasses that implement CPU-specific optimizations:
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
-
-/// Class that implements MMX optimized functions exclusive for 16bit integer samples type.
- class FIRFilterMMX : public FIRFilter
- {
- protected:
- short *filterCoeffsUnalign;
- short *filterCoeffsAlign;
-
- virtual uint evaluateFilterStereo(short *dest, const short *src, uint numSamples) const override;
- public:
- FIRFilterMMX();
- ~FIRFilterMMX();
-
- virtual void setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor) override;
- };
-
-#endif // SOUNDTOUCH_ALLOW_MMX
-
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
- /// Class that implements SSE optimized functions exclusive for floating point samples type.
- class FIRFilterSSE : public FIRFilter
- {
- protected:
- float *filterCoeffsUnalign;
- float *filterCoeffsAlign;
-
- virtual uint evaluateFilterStereo(float *dest, const float *src, uint numSamples) const override;
- public:
- FIRFilterSSE();
- ~FIRFilterSSE();
-
- virtual void setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor) override;
- };
-
-#endif // SOUNDTOUCH_ALLOW_SSE
-
-}
-
-#endif // FIRFilter_H
+////////////////////////////////////////////////////////////////////////////////
+///
+/// General FIR digital filter routines with MMX optimization.
+///
+/// Note : MMX optimized functions reside in a separate, platform-specific file,
+/// e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef FIRFilter_H
+#define FIRFilter_H
+
+#include
+#include "STTypes.h"
+
+namespace soundtouch
+{
+
+class FIRFilter
+{
+protected:
+ // Number of FIR filter taps
+ uint length;
+ // Number of FIR filter taps divided by 8
+ uint lengthDiv8;
+
+ // Result divider factor in 2^k format
+ uint resultDivFactor;
+
+ // Result divider value.
+ SAMPLETYPE resultDivider;
+
+ // Memory for filter coefficients
+ SAMPLETYPE *filterCoeffs;
+ SAMPLETYPE *filterCoeffsStereo;
+
+ virtual uint evaluateFilterStereo(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ uint numSamples) const;
+ virtual uint evaluateFilterMono(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ uint numSamples) const;
+ virtual uint evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels);
+
+public:
+ FIRFilter();
+ virtual ~FIRFilter();
+
+ /// Operator 'new' is overloaded so that it automatically creates a suitable instance
+ /// depending on if we've a MMX-capable CPU available or not.
+ static void * operator new(size_t s);
+
+ static FIRFilter *newInstance();
+
+ /// Applies the filter to the given sequence of samples.
+ /// Note : The amount of outputted samples is by value of 'filter_length'
+ /// smaller than the amount of input samples.
+ ///
+ /// \return Number of samples copied to 'dest'.
+ uint evaluate(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ uint numSamples,
+ uint numChannels);
+
+ uint getLength() const;
+
+ virtual void setCoefficients(const SAMPLETYPE *coeffs,
+ uint newLength,
+ uint uResultDivFactor);
+};
+
+
+// Optional subclasses that implement CPU-specific optimizations:
+
+#ifdef SOUNDTOUCH_ALLOW_MMX
+
+/// Class that implements MMX optimized functions exclusive for 16bit integer samples type.
+ class FIRFilterMMX : public FIRFilter
+ {
+ protected:
+ short *filterCoeffsUnalign;
+ short *filterCoeffsAlign;
+
+ virtual uint evaluateFilterStereo(short *dest, const short *src, uint numSamples) const override;
+ public:
+ FIRFilterMMX();
+ ~FIRFilterMMX();
+
+ virtual void setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor) override;
+ };
+
+#endif // SOUNDTOUCH_ALLOW_MMX
+
+
+#ifdef SOUNDTOUCH_ALLOW_SSE
+ /// Class that implements SSE optimized functions exclusive for floating point samples type.
+ class FIRFilterSSE : public FIRFilter
+ {
+ protected:
+ float *filterCoeffsUnalign;
+ float *filterCoeffsAlign;
+
+ virtual uint evaluateFilterStereo(float *dest, const float *src, uint numSamples) const override;
+ public:
+ FIRFilterSSE();
+ ~FIRFilterSSE();
+
+ virtual void setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor) override;
+ };
+
+#endif // SOUNDTOUCH_ALLOW_SSE
+
+}
+
+#endif // FIRFilter_H
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateCubic.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateCubic.cpp
index 10597f9261..2575db0c5f 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateCubic.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateCubic.cpp
@@ -1,197 +1,197 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Cubic interpolation routine.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include
-#include
-#include "InterpolateCubic.h"
-#include "STTypes.h"
-#include "ADM_default.h"
-
-using namespace soundtouch;
-
-// cubic interpolation coefficients
-static const float _coeffs[]=
-{ -0.5f, 1.0f, -0.5f, 0.0f,
- 1.5f, -2.5f, 0.0f, 1.0f,
- -1.5f, 2.0f, 0.5f, 0.0f,
- 0.5f, -0.5f, 0.0f, 0.0f};
-
-
-InterpolateCubic::InterpolateCubic()
-{
- fract = 0;
-}
-
-
-void InterpolateCubic::resetRegisters()
-{
- fract = 0;
-}
-
-
-/// Transpose mono audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateCubic::transposeMono(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 4;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- float out;
- const float x3 = 1.0f;
- const float x2 = (float)fract; // x
- const float x1 = x2*x2; // x^2
- const float x0 = x1*x2; // x^3
- float y0, y1, y2, y3;
-
- ADM_assert(fract < 1.0);
-
- y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
- y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
- y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
- y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
-
- out = y0 * psrc[0] + y1 * psrc[1] + y2 * psrc[2] + y3 * psrc[3];
-
- pdest[i] = (SAMPLETYPE)out;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-/// Transpose stereo audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateCubic::transposeStereo(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 4;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- const float x3 = 1.0f;
- const float x2 = (float)fract; // x
- const float x1 = x2*x2; // x^2
- const float x0 = x1*x2; // x^3
- float y0, y1, y2, y3;
- float out0, out1;
-
- ADM_assert(fract < 1.0);
-
- y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
- y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
- y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
- y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
-
- out0 = y0 * psrc[0] + y1 * psrc[2] + y2 * psrc[4] + y3 * psrc[6];
- out1 = y0 * psrc[1] + y1 * psrc[3] + y2 * psrc[5] + y3 * psrc[7];
-
- pdest[2*i] = (SAMPLETYPE)out0;
- pdest[2*i+1] = (SAMPLETYPE)out1;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += 2*whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-/// Transpose multi-channel audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateCubic::transposeMulti(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 4;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- const float x3 = 1.0f;
- const float x2 = (float)fract; // x
- const float x1 = x2*x2; // x^2
- const float x0 = x1*x2; // x^3
- float y0, y1, y2, y3;
-
- ADM_assert(fract < 1.0);
-
- y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
- y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
- y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
- y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
-
- for (int c = 0; c < numChannels; c ++)
- {
- float out;
- out = y0 * psrc[c] + y1 * psrc[c + numChannels] + y2 * psrc[c + 2 * numChannels] + y3 * psrc[c + 3 * numChannels];
- pdest[0] = (SAMPLETYPE)out;
- pdest ++;
- }
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += numChannels*whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Cubic interpolation routine.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include
+#include
+#include "InterpolateCubic.h"
+#include "STTypes.h"
+#include "ADM_default.h"
+
+using namespace soundtouch;
+
+// cubic interpolation coefficients
+static const float _coeffs[]=
+{ -0.5f, 1.0f, -0.5f, 0.0f,
+ 1.5f, -2.5f, 0.0f, 1.0f,
+ -1.5f, 2.0f, 0.5f, 0.0f,
+ 0.5f, -0.5f, 0.0f, 0.0f};
+
+
+InterpolateCubic::InterpolateCubic()
+{
+ fract = 0;
+}
+
+
+void InterpolateCubic::resetRegisters()
+{
+ fract = 0;
+}
+
+
+/// Transpose mono audio. Returns number of produced output samples, and
+/// updates "srcSamples" to amount of consumed source samples
+int InterpolateCubic::transposeMono(SAMPLETYPE *pdest,
+ const SAMPLETYPE *psrc,
+ int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 4;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ float out;
+ const float x3 = 1.0f;
+ const float x2 = (float)fract; // x
+ const float x1 = x2*x2; // x^2
+ const float x0 = x1*x2; // x^3
+ float y0, y1, y2, y3;
+
+ ADM_assert(fract < 1.0);
+
+ y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
+ y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
+ y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
+ y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
+
+ out = y0 * psrc[0] + y1 * psrc[1] + y2 * psrc[2] + y3 * psrc[3];
+
+ pdest[i] = (SAMPLETYPE)out;
+ i ++;
+
+ // update position fraction
+ fract += rate;
+ // update whole positions
+ int whole = (int)fract;
+ fract -= whole;
+ psrc += whole;
+ srcCount += whole;
+ }
+ srcSamples = srcCount;
+ return i;
+}
+
+
+/// Transpose stereo audio. Returns number of produced output samples, and
+/// updates "srcSamples" to amount of consumed source samples
+int InterpolateCubic::transposeStereo(SAMPLETYPE *pdest,
+ const SAMPLETYPE *psrc,
+ int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 4;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ const float x3 = 1.0f;
+ const float x2 = (float)fract; // x
+ const float x1 = x2*x2; // x^2
+ const float x0 = x1*x2; // x^3
+ float y0, y1, y2, y3;
+ float out0, out1;
+
+ ADM_assert(fract < 1.0);
+
+ y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
+ y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
+ y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
+ y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
+
+ out0 = y0 * psrc[0] + y1 * psrc[2] + y2 * psrc[4] + y3 * psrc[6];
+ out1 = y0 * psrc[1] + y1 * psrc[3] + y2 * psrc[5] + y3 * psrc[7];
+
+ pdest[2*i] = (SAMPLETYPE)out0;
+ pdest[2*i+1] = (SAMPLETYPE)out1;
+ i ++;
+
+ // update position fraction
+ fract += rate;
+ // update whole positions
+ int whole = (int)fract;
+ fract -= whole;
+ psrc += 2*whole;
+ srcCount += whole;
+ }
+ srcSamples = srcCount;
+ return i;
+}
+
+
+/// Transpose multi-channel audio. Returns number of produced output samples, and
+/// updates "srcSamples" to amount of consumed source samples
+int InterpolateCubic::transposeMulti(SAMPLETYPE *pdest,
+ const SAMPLETYPE *psrc,
+ int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 4;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ const float x3 = 1.0f;
+ const float x2 = (float)fract; // x
+ const float x1 = x2*x2; // x^2
+ const float x0 = x1*x2; // x^3
+ float y0, y1, y2, y3;
+
+ ADM_assert(fract < 1.0);
+
+ y0 = _coeffs[0] * x0 + _coeffs[1] * x1 + _coeffs[2] * x2 + _coeffs[3] * x3;
+ y1 = _coeffs[4] * x0 + _coeffs[5] * x1 + _coeffs[6] * x2 + _coeffs[7] * x3;
+ y2 = _coeffs[8] * x0 + _coeffs[9] * x1 + _coeffs[10] * x2 + _coeffs[11] * x3;
+ y3 = _coeffs[12] * x0 + _coeffs[13] * x1 + _coeffs[14] * x2 + _coeffs[15] * x3;
+
+ for (int c = 0; c < numChannels; c ++)
+ {
+ float out;
+ out = y0 * psrc[c] + y1 * psrc[c + numChannels] + y2 * psrc[c + 2 * numChannels] + y3 * psrc[c + 3 * numChannels];
+ pdest[0] = (SAMPLETYPE)out;
+ pdest ++;
+ }
+ i ++;
+
+ // update position fraction
+ fract += rate;
+ // update whole positions
+ int whole = (int)fract;
+ fract -= whole;
+ psrc += numChannels*whole;
+ srcCount += whole;
+ }
+ srcSamples = srcCount;
+ return i;
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateCubic.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateCubic.h
index 251c23f14e..d7e9db6498 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateCubic.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateCubic.h
@@ -1,69 +1,69 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Cubic interpolation routine.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _InterpolateCubic_H_
-#define _InterpolateCubic_H_
-
-#include "RateTransposer.h"
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-class InterpolateCubic : public TransposerBase
-{
-protected:
- virtual int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) override;
- virtual int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) override;
- virtual int transposeMulti(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) override;
-
- double fract;
-
-public:
- InterpolateCubic();
-
- virtual void resetRegisters() override;
-
- int getLatency() const
- {
- return 1;
- }
-};
-
-}
-
-#endif
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Cubic interpolation routine.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef _InterpolateCubic_H_
+#define _InterpolateCubic_H_
+
+#include "RateTransposer.h"
+#include "STTypes.h"
+
+namespace soundtouch
+{
+
+class InterpolateCubic : public TransposerBase
+{
+protected:
+ virtual int transposeMono(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) override;
+ virtual int transposeStereo(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) override;
+ virtual int transposeMulti(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) override;
+
+ double fract;
+
+public:
+ InterpolateCubic();
+
+ virtual void resetRegisters() override;
+
+ int getLatency() const
+ {
+ return 1;
+ }
+};
+
+}
+
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateLinear.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateLinear.cpp
index e727f9f987..d6ba01770d 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateLinear.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateLinear.cpp
@@ -1,296 +1,296 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Linear interpolation algorithm.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "ADM_default.h"
-#include
-#include "InterpolateLinear.h"
-
-using namespace soundtouch;
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// InterpolateLinearInteger - integer arithmetic implementation
-//
-
-/// fixed-point interpolation routine precision
-#define SCALE 65536
-
-
-// Constructor
-InterpolateLinearInteger::InterpolateLinearInteger() : TransposerBase()
-{
- // Notice: use local function calling syntax for sake of clarity,
- // to indicate the fact that C++ constructor can't call virtual functions.
- resetRegisters();
- setRate(1.0f);
-}
-
-
-void InterpolateLinearInteger::resetRegisters()
-{
- iFract = 0;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// 'Mono' version of the routine. Returns the number of samples returned in
-// the "dest" buffer
-int InterpolateLinearInteger::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- LONG_SAMPLETYPE temp;
-
- ADM_assert(iFract < SCALE);
-
- temp = (SCALE - iFract) * src[0] + iFract * src[1];
- dest[i] = (SAMPLETYPE)(temp / SCALE);
- i++;
-
- iFract += iRate;
-
- int iWhole = iFract / SCALE;
- iFract -= iWhole * SCALE;
- srcCount += iWhole;
- src += iWhole;
- }
- srcSamples = srcCount;
-
- return i;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// 'Stereo' version of the routine. Returns the number of samples returned in
-// the "dest" buffer
-int InterpolateLinearInteger::transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- LONG_SAMPLETYPE temp0;
- LONG_SAMPLETYPE temp1;
-
- ADM_assert(iFract < SCALE);
-
- temp0 = (SCALE - iFract) * src[0] + iFract * src[2];
- temp1 = (SCALE - iFract) * src[1] + iFract * src[3];
- dest[0] = (SAMPLETYPE)(temp0 / SCALE);
- dest[1] = (SAMPLETYPE)(temp1 / SCALE);
- dest += 2;
- i++;
-
- iFract += iRate;
-
- int iWhole = iFract / SCALE;
- iFract -= iWhole * SCALE;
- srcCount += iWhole;
- src += 2*iWhole;
- }
- srcSamples = srcCount;
-
- return i;
-}
-
-
-int InterpolateLinearInteger::transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- LONG_SAMPLETYPE temp, vol1;
-
- ADM_assert(iFract < SCALE);
- vol1 = (LONG_SAMPLETYPE)(SCALE - iFract);
- for (int c = 0; c < numChannels; c ++)
- {
- temp = vol1 * src[c] + iFract * src[c + numChannels];
- dest[0] = (SAMPLETYPE)(temp / SCALE);
- dest ++;
- }
- i++;
-
- iFract += iRate;
-
- int iWhole = iFract / SCALE;
- iFract -= iWhole * SCALE;
- srcCount += iWhole;
- src += iWhole * numChannels;
- }
- srcSamples = srcCount;
-
- return i;
-}
-
-
-// Sets new target iRate. Normal iRate = 1.0, smaller values represent slower
-// iRate, larger faster iRates.
-void InterpolateLinearInteger::setRate(double newRate)
-{
- iRate = (int)(newRate * SCALE + 0.5);
- TransposerBase::setRate(newRate);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// InterpolateLinearFloat - floating point arithmetic implementation
-//
-//////////////////////////////////////////////////////////////////////////////
-
-
-// Constructor
-InterpolateLinearFloat::InterpolateLinearFloat() : TransposerBase()
-{
- // Notice: use local function calling syntax for sake of clarity,
- // to indicate the fact that C++ constructor can't call virtual functions.
- resetRegisters();
- setRate(1.0);
-}
-
-
-void InterpolateLinearFloat::resetRegisters()
-{
- fract = 0;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// 'Mono' version of the routine. Returns the number of samples returned in
-// the "dest" buffer
-int InterpolateLinearFloat::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- double out;
- ADM_assert(fract < 1.0);
-
- out = (1.0 - fract) * src[0] + fract * src[1];
- dest[i] = (SAMPLETYPE)out;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- src += whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// 'Mono' version of the routine. Returns the number of samples returned in
-// the "dest" buffer
-int InterpolateLinearFloat::transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- double out0, out1;
- ADM_assert(fract < 1.0);
-
- out0 = (1.0 - fract) * src[0] + fract * src[2];
- out1 = (1.0 - fract) * src[1] + fract * src[3];
- dest[2*i] = (SAMPLETYPE)out0;
- dest[2*i+1] = (SAMPLETYPE)out1;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- src += 2*whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-int InterpolateLinearFloat::transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 1;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- float temp, vol1, fract_float;
-
- vol1 = (float)(1.0 - fract);
- fract_float = (float)fract;
- for (int c = 0; c < numChannels; c ++)
- {
- temp = vol1 * src[c] + fract_float * src[c + numChannels];
- *dest = (SAMPLETYPE)temp;
- dest ++;
- }
- i++;
-
- fract += rate;
-
- int iWhole = (int)fract;
- fract -= iWhole;
- srcCount += iWhole;
- src += iWhole * numChannels;
- }
- srcSamples = srcCount;
-
- return i;
-}
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Linear interpolation algorithm.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "ADM_default.h"
+#include
+#include "InterpolateLinear.h"
+
+using namespace soundtouch;
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// InterpolateLinearInteger - integer arithmetic implementation
+//
+
+/// fixed-point interpolation routine precision
+#define SCALE 65536
+
+
+// Constructor
+InterpolateLinearInteger::InterpolateLinearInteger() : TransposerBase()
+{
+ // Notice: use local function calling syntax for sake of clarity,
+ // to indicate the fact that C++ constructor can't call virtual functions.
+ resetRegisters();
+ setRate(1.0f);
+}
+
+
+void InterpolateLinearInteger::resetRegisters()
+{
+ iFract = 0;
+}
+
+
+// Transposes the sample rate of the given samples using linear interpolation.
+// 'Mono' version of the routine. Returns the number of samples returned in
+// the "dest" buffer
+int InterpolateLinearInteger::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 1;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ LONG_SAMPLETYPE temp;
+
+ ADM_assert(iFract < SCALE);
+
+ temp = (SCALE - iFract) * src[0] + iFract * src[1];
+ dest[i] = (SAMPLETYPE)(temp / SCALE);
+ i++;
+
+ iFract += iRate;
+
+ int iWhole = iFract / SCALE;
+ iFract -= iWhole * SCALE;
+ srcCount += iWhole;
+ src += iWhole;
+ }
+ srcSamples = srcCount;
+
+ return i;
+}
+
+
+// Transposes the sample rate of the given samples using linear interpolation.
+// 'Stereo' version of the routine. Returns the number of samples returned in
+// the "dest" buffer
+int InterpolateLinearInteger::transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 1;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ LONG_SAMPLETYPE temp0;
+ LONG_SAMPLETYPE temp1;
+
+ ADM_assert(iFract < SCALE);
+
+ temp0 = (SCALE - iFract) * src[0] + iFract * src[2];
+ temp1 = (SCALE - iFract) * src[1] + iFract * src[3];
+ dest[0] = (SAMPLETYPE)(temp0 / SCALE);
+ dest[1] = (SAMPLETYPE)(temp1 / SCALE);
+ dest += 2;
+ i++;
+
+ iFract += iRate;
+
+ int iWhole = iFract / SCALE;
+ iFract -= iWhole * SCALE;
+ srcCount += iWhole;
+ src += 2*iWhole;
+ }
+ srcSamples = srcCount;
+
+ return i;
+}
+
+
+int InterpolateLinearInteger::transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 1;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ LONG_SAMPLETYPE temp, vol1;
+
+ ADM_assert(iFract < SCALE);
+ vol1 = (LONG_SAMPLETYPE)(SCALE - iFract);
+ for (int c = 0; c < numChannels; c ++)
+ {
+ temp = vol1 * src[c] + iFract * src[c + numChannels];
+ dest[0] = (SAMPLETYPE)(temp / SCALE);
+ dest ++;
+ }
+ i++;
+
+ iFract += iRate;
+
+ int iWhole = iFract / SCALE;
+ iFract -= iWhole * SCALE;
+ srcCount += iWhole;
+ src += iWhole * numChannels;
+ }
+ srcSamples = srcCount;
+
+ return i;
+}
+
+
+// Sets new target iRate. Normal iRate = 1.0, smaller values represent slower
+// iRate, larger faster iRates.
+void InterpolateLinearInteger::setRate(double newRate)
+{
+ iRate = (int)(newRate * SCALE + 0.5);
+ TransposerBase::setRate(newRate);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// InterpolateLinearFloat - floating point arithmetic implementation
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+// Constructor
+InterpolateLinearFloat::InterpolateLinearFloat() : TransposerBase()
+{
+ // Notice: use local function calling syntax for sake of clarity,
+ // to indicate the fact that C++ constructor can't call virtual functions.
+ resetRegisters();
+ setRate(1.0);
+}
+
+
+void InterpolateLinearFloat::resetRegisters()
+{
+ fract = 0;
+}
+
+
+// Transposes the sample rate of the given samples using linear interpolation.
+// 'Mono' version of the routine. Returns the number of samples returned in
+// the "dest" buffer
+int InterpolateLinearFloat::transposeMono(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 1;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ double out;
+ ADM_assert(fract < 1.0);
+
+ out = (1.0 - fract) * src[0] + fract * src[1];
+ dest[i] = (SAMPLETYPE)out;
+ i ++;
+
+ // update position fraction
+ fract += rate;
+ // update whole positions
+ int whole = (int)fract;
+ fract -= whole;
+ src += whole;
+ srcCount += whole;
+ }
+ srcSamples = srcCount;
+ return i;
+}
+
+
+// Transposes the sample rate of the given samples using linear interpolation.
+// 'Mono' version of the routine. Returns the number of samples returned in
+// the "dest" buffer
+int InterpolateLinearFloat::transposeStereo(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 1;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ double out0, out1;
+ ADM_assert(fract < 1.0);
+
+ out0 = (1.0 - fract) * src[0] + fract * src[2];
+ out1 = (1.0 - fract) * src[1] + fract * src[3];
+ dest[2*i] = (SAMPLETYPE)out0;
+ dest[2*i+1] = (SAMPLETYPE)out1;
+ i ++;
+
+ // update position fraction
+ fract += rate;
+ // update whole positions
+ int whole = (int)fract;
+ fract -= whole;
+ src += 2*whole;
+ srcCount += whole;
+ }
+ srcSamples = srcCount;
+ return i;
+}
+
+
+int InterpolateLinearFloat::transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 1;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ float temp, vol1, fract_float;
+
+ vol1 = (float)(1.0 - fract);
+ fract_float = (float)fract;
+ for (int c = 0; c < numChannels; c ++)
+ {
+ temp = vol1 * src[c] + fract_float * src[c + numChannels];
+ *dest = (SAMPLETYPE)temp;
+ dest ++;
+ }
+ i++;
+
+ fract += rate;
+
+ int iWhole = (int)fract;
+ fract -= iWhole;
+ srcCount += iWhole;
+ src += iWhole * numChannels;
+ }
+ srcSamples = srcCount;
+
+ return i;
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateLinear.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateLinear.h
index 6104faeab5..e31340ce33 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateLinear.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateLinear.h
@@ -1,98 +1,98 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Linear interpolation routine.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _InterpolateLinear_H_
-#define _InterpolateLinear_H_
-
-#include "RateTransposer.h"
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-/// Linear transposer class that uses integer arithmetic
-class InterpolateLinearInteger : public TransposerBase
-{
-protected:
- int iFract;
- int iRate;
-
- virtual int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) override;
- virtual int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) override;
- virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples) override;
-public:
- InterpolateLinearInteger();
-
- /// Sets new target rate. Normal rate = 1.0, smaller values represent slower
- /// rate, larger faster rates.
- virtual void setRate(double newRate) override;
-
- virtual void resetRegisters() override;
-
- int getLatency() const
- {
- return 0;
- }
-};
-
-
-/// Linear transposer class that uses floating point arithmetic
-class InterpolateLinearFloat : public TransposerBase
-{
-protected:
- double fract;
-
- virtual int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- virtual int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples);
- virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples);
-
-public:
- InterpolateLinearFloat();
-
- virtual void resetRegisters();
-
- int getLatency() const
- {
- return 0;
- }
-};
-
-}
-
-#endif
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Linear interpolation routine.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef _InterpolateLinear_H_
+#define _InterpolateLinear_H_
+
+#include "RateTransposer.h"
+#include "STTypes.h"
+
+namespace soundtouch
+{
+
+/// Linear transposer class that uses integer arithmetic
+class InterpolateLinearInteger : public TransposerBase
+{
+protected:
+ int iFract;
+ int iRate;
+
+ virtual int transposeMono(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) override;
+ virtual int transposeStereo(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) override;
+ virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples) override;
+public:
+ InterpolateLinearInteger();
+
+ /// Sets new target rate. Normal rate = 1.0, smaller values represent slower
+ /// rate, larger faster rates.
+ virtual void setRate(double newRate) override;
+
+ virtual void resetRegisters() override;
+
+ int getLatency() const
+ {
+ return 0;
+ }
+};
+
+
+/// Linear transposer class that uses floating point arithmetic
+class InterpolateLinearFloat : public TransposerBase
+{
+protected:
+ double fract;
+
+ virtual int transposeMono(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples);
+ virtual int transposeStereo(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples);
+ virtual int transposeMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, int &srcSamples);
+
+public:
+ InterpolateLinearFloat();
+
+ virtual void resetRegisters();
+
+ int getLatency() const
+ {
+ return 0;
+ }
+};
+
+}
+
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateShannon.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateShannon.cpp
index fa253f8ad5..d7e80993ed 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateShannon.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateShannon.cpp
@@ -1,182 +1,182 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sample interpolation routine using 8-tap band-limited Shannon interpolation
-/// with kaiser window.
-///
-/// Notice. This algorithm is remarkably much heavier than linear or cubic
-/// interpolation, and not remarkably better than cubic algorithm. Thus mostly
-/// for experimental purposes
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include
-#include "InterpolateShannon.h"
-#include "STTypes.h"
-#include "ADM_default.h"
-
-using namespace soundtouch;
-
-
-/// Kaiser window with beta = 2.0
-/// Values scaled down by 5% to avoid overflows
-static const double _kaiser8[8] =
-{
- 0.41778693317814,
- 0.64888025049173,
- 0.83508562409944,
- 0.93887857733412,
- 0.93887857733412,
- 0.83508562409944,
- 0.64888025049173,
- 0.41778693317814
-};
-
-
-InterpolateShannon::InterpolateShannon()
-{
- fract = 0;
-}
-
-
-void InterpolateShannon::resetRegisters()
-{
- fract = 0;
-}
-
-
-#define PI 3.1415926536
-#define sinc(x) (sin(PI * (x)) / (PI * (x)))
-
-/// Transpose mono audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateShannon::transposeMono(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 8;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- double out;
- ADM_assert(fract < 1.0);
-
- out = psrc[0] * sinc(-3.0 - fract) * _kaiser8[0];
- out += psrc[1] * sinc(-2.0 - fract) * _kaiser8[1];
- out += psrc[2] * sinc(-1.0 - fract) * _kaiser8[2];
- if (fract < 1e-6)
- {
- out += psrc[3] * _kaiser8[3]; // sinc(0) = 1
- }
- else
- {
- out += psrc[3] * sinc(- fract) * _kaiser8[3];
- }
- out += psrc[4] * sinc( 1.0 - fract) * _kaiser8[4];
- out += psrc[5] * sinc( 2.0 - fract) * _kaiser8[5];
- out += psrc[6] * sinc( 3.0 - fract) * _kaiser8[6];
- out += psrc[7] * sinc( 4.0 - fract) * _kaiser8[7];
-
- pdest[i] = (SAMPLETYPE)out;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-/// Transpose stereo audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateShannon::transposeStereo(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- int i;
- int srcSampleEnd = srcSamples - 8;
- int srcCount = 0;
-
- i = 0;
- while (srcCount < srcSampleEnd)
- {
- double out0, out1, w;
- ADM_assert(fract < 1.0);
-
- w = sinc(-3.0 - fract) * _kaiser8[0];
- out0 = psrc[0] * w; out1 = psrc[1] * w;
- w = sinc(-2.0 - fract) * _kaiser8[1];
- out0 += psrc[2] * w; out1 += psrc[3] * w;
- w = sinc(-1.0 - fract) * _kaiser8[2];
- out0 += psrc[4] * w; out1 += psrc[5] * w;
- w = _kaiser8[3] * ((fract < 1e-5) ? 1.0 : sinc(- fract)); // sinc(0) = 1
- out0 += psrc[6] * w; out1 += psrc[7] * w;
- w = sinc( 1.0 - fract) * _kaiser8[4];
- out0 += psrc[8] * w; out1 += psrc[9] * w;
- w = sinc( 2.0 - fract) * _kaiser8[5];
- out0 += psrc[10] * w; out1 += psrc[11] * w;
- w = sinc( 3.0 - fract) * _kaiser8[6];
- out0 += psrc[12] * w; out1 += psrc[13] * w;
- w = sinc( 4.0 - fract) * _kaiser8[7];
- out0 += psrc[14] * w; out1 += psrc[15] * w;
-
- pdest[2*i] = (SAMPLETYPE)out0;
- pdest[2*i+1] = (SAMPLETYPE)out1;
- i ++;
-
- // update position fraction
- fract += rate;
- // update whole positions
- int whole = (int)fract;
- fract -= whole;
- psrc += 2*whole;
- srcCount += whole;
- }
- srcSamples = srcCount;
- return i;
-}
-
-
-/// Transpose stereo audio. Returns number of produced output samples, and
-/// updates "srcSamples" to amount of consumed source samples
-int InterpolateShannon::transposeMulti(SAMPLETYPE *pdest,
- const SAMPLETYPE *psrc,
- int &srcSamples)
-{
- // not implemented
- ADM_assert(false);
- return 0;
-}
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Sample interpolation routine using 8-tap band-limited Shannon interpolation
+/// with kaiser window.
+///
+/// Notice. This algorithm is remarkably much heavier than linear or cubic
+/// interpolation, and not remarkably better than cubic algorithm. Thus mostly
+/// for experimental purposes
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include
+#include "InterpolateShannon.h"
+#include "STTypes.h"
+#include "ADM_default.h"
+
+using namespace soundtouch;
+
+
+/// Kaiser window with beta = 2.0
+/// Values scaled down by 5% to avoid overflows
+static const double _kaiser8[8] =
+{
+ 0.41778693317814,
+ 0.64888025049173,
+ 0.83508562409944,
+ 0.93887857733412,
+ 0.93887857733412,
+ 0.83508562409944,
+ 0.64888025049173,
+ 0.41778693317814
+};
+
+
+InterpolateShannon::InterpolateShannon()
+{
+ fract = 0;
+}
+
+
+void InterpolateShannon::resetRegisters()
+{
+ fract = 0;
+}
+
+
+#define PI 3.1415926536
+#define sinc(x) (sin(PI * (x)) / (PI * (x)))
+
+/// Transpose mono audio. Returns number of produced output samples, and
+/// updates "srcSamples" to amount of consumed source samples
+int InterpolateShannon::transposeMono(SAMPLETYPE *pdest,
+ const SAMPLETYPE *psrc,
+ int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 8;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ double out;
+ ADM_assert(fract < 1.0);
+
+ out = psrc[0] * sinc(-3.0 - fract) * _kaiser8[0];
+ out += psrc[1] * sinc(-2.0 - fract) * _kaiser8[1];
+ out += psrc[2] * sinc(-1.0 - fract) * _kaiser8[2];
+ if (fract < 1e-6)
+ {
+ out += psrc[3] * _kaiser8[3]; // sinc(0) = 1
+ }
+ else
+ {
+ out += psrc[3] * sinc(- fract) * _kaiser8[3];
+ }
+ out += psrc[4] * sinc( 1.0 - fract) * _kaiser8[4];
+ out += psrc[5] * sinc( 2.0 - fract) * _kaiser8[5];
+ out += psrc[6] * sinc( 3.0 - fract) * _kaiser8[6];
+ out += psrc[7] * sinc( 4.0 - fract) * _kaiser8[7];
+
+ pdest[i] = (SAMPLETYPE)out;
+ i ++;
+
+ // update position fraction
+ fract += rate;
+ // update whole positions
+ int whole = (int)fract;
+ fract -= whole;
+ psrc += whole;
+ srcCount += whole;
+ }
+ srcSamples = srcCount;
+ return i;
+}
+
+
+/// Transpose stereo audio. Returns number of produced output samples, and
+/// updates "srcSamples" to amount of consumed source samples
+int InterpolateShannon::transposeStereo(SAMPLETYPE *pdest,
+ const SAMPLETYPE *psrc,
+ int &srcSamples)
+{
+ int i;
+ int srcSampleEnd = srcSamples - 8;
+ int srcCount = 0;
+
+ i = 0;
+ while (srcCount < srcSampleEnd)
+ {
+ double out0, out1, w;
+ ADM_assert(fract < 1.0);
+
+ w = sinc(-3.0 - fract) * _kaiser8[0];
+ out0 = psrc[0] * w; out1 = psrc[1] * w;
+ w = sinc(-2.0 - fract) * _kaiser8[1];
+ out0 += psrc[2] * w; out1 += psrc[3] * w;
+ w = sinc(-1.0 - fract) * _kaiser8[2];
+ out0 += psrc[4] * w; out1 += psrc[5] * w;
+ w = _kaiser8[3] * ((fract < 1e-5) ? 1.0 : sinc(- fract)); // sinc(0) = 1
+ out0 += psrc[6] * w; out1 += psrc[7] * w;
+ w = sinc( 1.0 - fract) * _kaiser8[4];
+ out0 += psrc[8] * w; out1 += psrc[9] * w;
+ w = sinc( 2.0 - fract) * _kaiser8[5];
+ out0 += psrc[10] * w; out1 += psrc[11] * w;
+ w = sinc( 3.0 - fract) * _kaiser8[6];
+ out0 += psrc[12] * w; out1 += psrc[13] * w;
+ w = sinc( 4.0 - fract) * _kaiser8[7];
+ out0 += psrc[14] * w; out1 += psrc[15] * w;
+
+ pdest[2*i] = (SAMPLETYPE)out0;
+ pdest[2*i+1] = (SAMPLETYPE)out1;
+ i ++;
+
+ // update position fraction
+ fract += rate;
+ // update whole positions
+ int whole = (int)fract;
+ fract -= whole;
+ psrc += 2*whole;
+ srcCount += whole;
+ }
+ srcSamples = srcCount;
+ return i;
+}
+
+
+/// Transpose stereo audio. Returns number of produced output samples, and
+/// updates "srcSamples" to amount of consumed source samples
+int InterpolateShannon::transposeMulti(SAMPLETYPE *pdest,
+ const SAMPLETYPE *psrc,
+ int &srcSamples)
+{
+ // not implemented
+ ADM_assert(false);
+ return 0;
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateShannon.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateShannon.h
index 75876e127c..332059df42 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateShannon.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/InterpolateShannon.h
@@ -1,74 +1,74 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sample interpolation routine using 8-tap band-limited Shannon interpolation
-/// with kaiser window.
-///
-/// Notice. This algorithm is remarkably much heavier than linear or cubic
-/// interpolation, and not remarkably better than cubic algorithm. Thus mostly
-/// for experimental purposes
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _InterpolateShannon_H_
-#define _InterpolateShannon_H_
-
-#include "RateTransposer.h"
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-class InterpolateShannon : public TransposerBase
-{
-protected:
- int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) override;
- int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) override;
- int transposeMulti(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) override;
-
- double fract;
-
-public:
- InterpolateShannon();
-
- void resetRegisters() override;
-
- int getLatency() const
- {
- return 3;
- }
-};
-
-}
-
-#endif
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Sample interpolation routine using 8-tap band-limited Shannon interpolation
+/// with kaiser window.
+///
+/// Notice. This algorithm is remarkably much heavier than linear or cubic
+/// interpolation, and not remarkably better than cubic algorithm. Thus mostly
+/// for experimental purposes
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef _InterpolateShannon_H_
+#define _InterpolateShannon_H_
+
+#include "RateTransposer.h"
+#include "STTypes.h"
+
+namespace soundtouch
+{
+
+class InterpolateShannon : public TransposerBase
+{
+protected:
+ int transposeMono(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) override;
+ int transposeStereo(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) override;
+ int transposeMulti(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) override;
+
+ double fract;
+
+public:
+ InterpolateShannon();
+
+ void resetRegisters() override;
+
+ int getLatency() const
+ {
+ return 3;
+ }
+};
+
+}
+
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/PeakFinder.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/PeakFinder.cpp
index a3a81602fe..66f2f3eeaa 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/PeakFinder.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/PeakFinder.cpp
@@ -1,277 +1,277 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Peak detection routine.
-///
-/// The routine detects highest value on an array of values and calculates the
-/// precise peak location as a mass-center of the 'hump' around the peak value.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include
-#include "ADM_default.h"
-
-#include "PeakFinder.h"
-
-using namespace soundtouch;
-
-#define max(x, y) (((x) > (y)) ? (x) : (y))
-
-
-PeakFinder::PeakFinder()
-{
- minPos = maxPos = 0;
-}
-
-
-// Finds real 'top' of a peak hump from neighnourhood of the given 'peakpos'.
-int PeakFinder::findTop(const float *data, int peakpos) const
-{
- int i;
- int start, end;
- float refvalue;
-
- refvalue = data[peakpos];
-
- // seek within ±10 points
- start = peakpos - 10;
- if (start < minPos) start = minPos;
- end = peakpos + 10;
- if (end > maxPos) end = maxPos;
-
- for (i = start; i <= end; i ++)
- {
- if (data[i] > refvalue)
- {
- peakpos = i;
- refvalue = data[i];
- }
- }
-
- // failure if max value is at edges of seek range => it's not peak, it's at slope.
- if ((peakpos == start) || (peakpos == end)) return 0;
-
- return peakpos;
-}
-
-
-// Finds 'ground level' of a peak hump by starting from 'peakpos' and proceeding
-// to direction defined by 'direction' until next 'hump' after minimum value will
-// begin
-int PeakFinder::findGround(const float *data, int peakpos, int direction) const
-{
- int lowpos;
- int pos;
- int climb_count;
- float refvalue;
- float delta;
-
- climb_count = 0;
- refvalue = data[peakpos];
- lowpos = peakpos;
-
- pos = peakpos;
-
- while ((pos > minPos+1) && (pos < maxPos-1))
- {
- int prevpos;
-
- prevpos = pos;
- pos += direction;
-
- // calculate derivate
- delta = data[pos] - data[prevpos];
- if (delta <= 0)
- {
- // going downhill, ok
- if (climb_count)
- {
- climb_count --; // decrease climb count
- }
-
- // check if new minimum found
- if (data[pos] < refvalue)
- {
- // new minimum found
- lowpos = pos;
- refvalue = data[pos];
- }
- }
- else
- {
- // going uphill, increase climbing counter
- climb_count ++;
- if (climb_count > 5) break; // we've been climbing too long => it's next uphill => quit
- }
- }
- return lowpos;
-}
-
-
-// Find offset where the value crosses the given level, when starting from 'peakpos' and
-// proceeds to direction defined in 'direction'
-int PeakFinder::findCrossingLevel(const float *data, float level, int peakpos, int direction) const
-{
- float peaklevel;
- int pos;
-
- peaklevel = data[peakpos];
- ADM_assert(peaklevel >= level);
- pos = peakpos;
- while ((pos >= minPos) && (pos + direction < maxPos))
- {
- if (data[pos + direction] < level) return pos; // crossing found
- pos += direction;
- }
- return -1; // not found
-}
-
-
-// Calculates the center of mass location of 'data' array items between 'firstPos' and 'lastPos'
-double PeakFinder::calcMassCenter(const float *data, int firstPos, int lastPos) const
-{
- int i;
- float sum;
- float wsum;
-
- sum = 0;
- wsum = 0;
- for (i = firstPos; i <= lastPos; i ++)
- {
- sum += (float)i * data[i];
- wsum += data[i];
- }
-
- if (wsum < 1e-6) return 0;
- return sum / wsum;
-}
-
-
-/// get exact center of peak near given position by calculating local mass of center
-double PeakFinder::getPeakCenter(const float *data, int peakpos) const
-{
- float peakLevel; // peak level
- int crosspos1, crosspos2; // position where the peak 'hump' crosses cutting level
- float cutLevel; // cutting value
- float groundLevel; // ground level of the peak
- int gp1, gp2; // bottom positions of the peak 'hump'
-
- // find ground positions.
- gp1 = findGround(data, peakpos, -1);
- gp2 = findGround(data, peakpos, 1);
-
- peakLevel = data[peakpos];
-
- if (gp1 == gp2)
- {
- // avoid rounding errors when all are equal
- ADM_assert(gp1 == peakpos);
- cutLevel = groundLevel = peakLevel;
- } else {
- // get average of the ground levels
- groundLevel = 0.5f * (data[gp1] + data[gp2]);
-
- // calculate 70%-level of the peak
- cutLevel = 0.70f * peakLevel + 0.30f * groundLevel;
- }
-
- // find mid-level crossings
- crosspos1 = findCrossingLevel(data, cutLevel, peakpos, -1);
- crosspos2 = findCrossingLevel(data, cutLevel, peakpos, 1);
-
- if ((crosspos1 < 0) || (crosspos2 < 0)) return 0; // no crossing, no peak..
-
- // calculate mass center of the peak surroundings
- return calcMassCenter(data, crosspos1, crosspos2);
-}
-
-
-double PeakFinder::detectPeak(const float *data, int aminPos, int amaxPos)
-{
-
- int i;
- int peakpos; // position of peak level
- double highPeak, peak;
-
- this->minPos = aminPos;
- this->maxPos = amaxPos;
-
- // find absolute peak
- peakpos = minPos;
- peak = data[minPos];
- for (i = minPos + 1; i < maxPos; i ++)
- {
- if (data[i] > peak)
- {
- peak = data[i];
- peakpos = i;
- }
- }
-
- // Calculate exact location of the highest peak mass center
- highPeak = getPeakCenter(data, peakpos);
- peak = highPeak;
-
- // Now check if the highest peak were in fact harmonic of the true base beat peak
- // - sometimes the highest peak can be Nth harmonic of the true base peak yet
- // just a slightly higher than the true base
-
- for (i = 1; i < 3; i ++)
- {
- double peaktmp, harmonic;
- int i1,i2;
-
- harmonic = (double)pow(2.0, i);
- peakpos = (int)(highPeak / harmonic + 0.5f);
- if (peakpos < minPos) break;
- peakpos = findTop(data, peakpos); // seek true local maximum index
- if (peakpos == 0) continue; // no local max here
-
- // calculate mass-center of possible harmonic peak
- peaktmp = getPeakCenter(data, peakpos);
-
- // accept harmonic peak if
- // (a) it is found
- // (b) is within ±4% of the expected harmonic interval
- // (c) has at least half x-corr value of the max. peak
-
- double diff = harmonic * peaktmp / highPeak;
- if ((diff < 0.96) || (diff > 1.04)) continue; // peak too afar from expected
-
- // now compare to highest detected peak
- i1 = (int)(highPeak + 0.5);
- i2 = (int)(peaktmp + 0.5);
- if (data[i2] >= 0.4*data[i1])
- {
- // The harmonic is at least half as high primary peak,
- // thus use the harmonic peak instead
- peak = peaktmp;
- }
- }
-
- return peak;
-}
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Peak detection routine.
+///
+/// The routine detects highest value on an array of values and calculates the
+/// precise peak location as a mass-center of the 'hump' around the peak value.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include
+#include "ADM_default.h"
+
+#include "PeakFinder.h"
+
+using namespace soundtouch;
+
+#define max(x, y) (((x) > (y)) ? (x) : (y))
+
+
+PeakFinder::PeakFinder()
+{
+ minPos = maxPos = 0;
+}
+
+
+// Finds real 'top' of a peak hump from neighnourhood of the given 'peakpos'.
+int PeakFinder::findTop(const float *data, int peakpos) const
+{
+ int i;
+ int start, end;
+ float refvalue;
+
+ refvalue = data[peakpos];
+
+ // seek within ±10 points
+ start = peakpos - 10;
+ if (start < minPos) start = minPos;
+ end = peakpos + 10;
+ if (end > maxPos) end = maxPos;
+
+ for (i = start; i <= end; i ++)
+ {
+ if (data[i] > refvalue)
+ {
+ peakpos = i;
+ refvalue = data[i];
+ }
+ }
+
+ // failure if max value is at edges of seek range => it's not peak, it's at slope.
+ if ((peakpos == start) || (peakpos == end)) return 0;
+
+ return peakpos;
+}
+
+
+// Finds 'ground level' of a peak hump by starting from 'peakpos' and proceeding
+// to direction defined by 'direction' until next 'hump' after minimum value will
+// begin
+int PeakFinder::findGround(const float *data, int peakpos, int direction) const
+{
+ int lowpos;
+ int pos;
+ int climb_count;
+ float refvalue;
+ float delta;
+
+ climb_count = 0;
+ refvalue = data[peakpos];
+ lowpos = peakpos;
+
+ pos = peakpos;
+
+ while ((pos > minPos+1) && (pos < maxPos-1))
+ {
+ int prevpos;
+
+ prevpos = pos;
+ pos += direction;
+
+ // calculate derivate
+ delta = data[pos] - data[prevpos];
+ if (delta <= 0)
+ {
+ // going downhill, ok
+ if (climb_count)
+ {
+ climb_count --; // decrease climb count
+ }
+
+ // check if new minimum found
+ if (data[pos] < refvalue)
+ {
+ // new minimum found
+ lowpos = pos;
+ refvalue = data[pos];
+ }
+ }
+ else
+ {
+ // going uphill, increase climbing counter
+ climb_count ++;
+ if (climb_count > 5) break; // we've been climbing too long => it's next uphill => quit
+ }
+ }
+ return lowpos;
+}
+
+
+// Find offset where the value crosses the given level, when starting from 'peakpos' and
+// proceeds to direction defined in 'direction'
+int PeakFinder::findCrossingLevel(const float *data, float level, int peakpos, int direction) const
+{
+ float peaklevel;
+ int pos;
+
+ peaklevel = data[peakpos];
+ ADM_assert(peaklevel >= level);
+ pos = peakpos;
+ while ((pos >= minPos) && (pos + direction < maxPos))
+ {
+ if (data[pos + direction] < level) return pos; // crossing found
+ pos += direction;
+ }
+ return -1; // not found
+}
+
+
+// Calculates the center of mass location of 'data' array items between 'firstPos' and 'lastPos'
+double PeakFinder::calcMassCenter(const float *data, int firstPos, int lastPos) const
+{
+ int i;
+ float sum;
+ float wsum;
+
+ sum = 0;
+ wsum = 0;
+ for (i = firstPos; i <= lastPos; i ++)
+ {
+ sum += (float)i * data[i];
+ wsum += data[i];
+ }
+
+ if (wsum < 1e-6) return 0;
+ return sum / wsum;
+}
+
+
+/// get exact center of peak near given position by calculating local mass of center
+double PeakFinder::getPeakCenter(const float *data, int peakpos) const
+{
+ float peakLevel; // peak level
+ int crosspos1, crosspos2; // position where the peak 'hump' crosses cutting level
+ float cutLevel; // cutting value
+ float groundLevel; // ground level of the peak
+ int gp1, gp2; // bottom positions of the peak 'hump'
+
+ // find ground positions.
+ gp1 = findGround(data, peakpos, -1);
+ gp2 = findGround(data, peakpos, 1);
+
+ peakLevel = data[peakpos];
+
+ if (gp1 == gp2)
+ {
+ // avoid rounding errors when all are equal
+ ADM_assert(gp1 == peakpos);
+ cutLevel = groundLevel = peakLevel;
+ } else {
+ // get average of the ground levels
+ groundLevel = 0.5f * (data[gp1] + data[gp2]);
+
+ // calculate 70%-level of the peak
+ cutLevel = 0.70f * peakLevel + 0.30f * groundLevel;
+ }
+
+ // find mid-level crossings
+ crosspos1 = findCrossingLevel(data, cutLevel, peakpos, -1);
+ crosspos2 = findCrossingLevel(data, cutLevel, peakpos, 1);
+
+ if ((crosspos1 < 0) || (crosspos2 < 0)) return 0; // no crossing, no peak..
+
+ // calculate mass center of the peak surroundings
+ return calcMassCenter(data, crosspos1, crosspos2);
+}
+
+
+double PeakFinder::detectPeak(const float *data, int aminPos, int amaxPos)
+{
+
+ int i;
+ int peakpos; // position of peak level
+ double highPeak, peak;
+
+ this->minPos = aminPos;
+ this->maxPos = amaxPos;
+
+ // find absolute peak
+ peakpos = minPos;
+ peak = data[minPos];
+ for (i = minPos + 1; i < maxPos; i ++)
+ {
+ if (data[i] > peak)
+ {
+ peak = data[i];
+ peakpos = i;
+ }
+ }
+
+ // Calculate exact location of the highest peak mass center
+ highPeak = getPeakCenter(data, peakpos);
+ peak = highPeak;
+
+ // Now check if the highest peak were in fact harmonic of the true base beat peak
+ // - sometimes the highest peak can be Nth harmonic of the true base peak yet
+ // just a slightly higher than the true base
+
+ for (i = 1; i < 3; i ++)
+ {
+ double peaktmp, harmonic;
+ int i1,i2;
+
+ harmonic = (double)pow(2.0, i);
+ peakpos = (int)(highPeak / harmonic + 0.5f);
+ if (peakpos < minPos) break;
+ peakpos = findTop(data, peakpos); // seek true local maximum index
+ if (peakpos == 0) continue; // no local max here
+
+ // calculate mass-center of possible harmonic peak
+ peaktmp = getPeakCenter(data, peakpos);
+
+ // accept harmonic peak if
+ // (a) it is found
+ // (b) is within ±4% of the expected harmonic interval
+ // (c) has at least half x-corr value of the max. peak
+
+ double diff = harmonic * peaktmp / highPeak;
+ if ((diff < 0.96) || (diff > 1.04)) continue; // peak too afar from expected
+
+ // now compare to highest detected peak
+ i1 = (int)(highPeak + 0.5);
+ i2 = (int)(peaktmp + 0.5);
+ if (data[i2] >= 0.4*data[i1])
+ {
+ // The harmonic is at least half as high primary peak,
+ // thus use the harmonic peak instead
+ peak = peaktmp;
+ }
+ }
+
+ return peak;
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/PeakFinder.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/PeakFinder.h
index 9fe66adac5..bf46daa17b 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/PeakFinder.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/PeakFinder.h
@@ -1,90 +1,90 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// The routine detects highest value on an array of values and calculates the
-/// precise peak location as a mass-center of the 'hump' around the peak value.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef _PeakFinder_H_
-#define _PeakFinder_H_
-
-namespace soundtouch
-{
-
-class PeakFinder
-{
-protected:
- /// Min, max allowed peak positions within the data vector
- int minPos, maxPos;
-
- /// Calculates the mass center between given vector items.
- double calcMassCenter(const float *data, ///< Data vector.
- int firstPos, ///< Index of first vector item belonging to the peak.
- int lastPos ///< Index of last vector item belonging to the peak.
- ) const;
-
- /// Finds the data vector index where the monotoniously decreasing signal crosses the
- /// given level.
- int findCrossingLevel(const float *data, ///< Data vector.
- float level, ///< Goal crossing level.
- int peakpos, ///< Peak position index within the data vector.
- int direction /// Direction where to proceed from the peak: 1 = right, -1 = left.
- ) const;
-
- // Finds real 'top' of a peak hump from neighnourhood of the given 'peakpos'.
- int findTop(const float *data, int peakpos) const;
-
-
- /// Finds the 'ground' level, i.e. smallest level between two neighbouring peaks, to right-
- /// or left-hand side of the given peak position.
- int findGround(const float *data, /// Data vector.
- int peakpos, /// Peak position index within the data vector.
- int direction /// Direction where to proceed from the peak: 1 = right, -1 = left.
- ) const;
-
- /// get exact center of peak near given position by calculating local mass of center
- double getPeakCenter(const float *data, int peakpos) const;
-
-public:
- /// Constructor.
- PeakFinder();
-
- /// Detect exact peak position of the data vector by finding the largest peak 'hump'
- /// and calculating the mass-center location of the peak hump.
- ///
- /// \return The location of the largest base harmonic peak hump.
- double detectPeak(const float *data, /// Data vector to be analyzed. The data vector has
- /// to be at least 'maxPos' items long.
- int minPos, ///< Min allowed peak location within the vector data.
- int maxPos ///< Max allowed peak location within the vector data.
- );
-};
-
-}
-
-#endif // _PeakFinder_H_
+////////////////////////////////////////////////////////////////////////////////
+///
+/// The routine detects highest value on an array of values and calculates the
+/// precise peak location as a mass-center of the 'hump' around the peak value.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef _PeakFinder_H_
+#define _PeakFinder_H_
+
+namespace soundtouch
+{
+
+class PeakFinder
+{
+protected:
+ /// Min, max allowed peak positions within the data vector
+ int minPos, maxPos;
+
+ /// Calculates the mass center between given vector items.
+ double calcMassCenter(const float *data, ///< Data vector.
+ int firstPos, ///< Index of first vector item belonging to the peak.
+ int lastPos ///< Index of last vector item belonging to the peak.
+ ) const;
+
+ /// Finds the data vector index where the monotoniously decreasing signal crosses the
+ /// given level.
+ int findCrossingLevel(const float *data, ///< Data vector.
+ float level, ///< Goal crossing level.
+ int peakpos, ///< Peak position index within the data vector.
+ int direction /// Direction where to proceed from the peak: 1 = right, -1 = left.
+ ) const;
+
+ // Finds real 'top' of a peak hump from neighnourhood of the given 'peakpos'.
+ int findTop(const float *data, int peakpos) const;
+
+
+ /// Finds the 'ground' level, i.e. smallest level between two neighbouring peaks, to right-
+ /// or left-hand side of the given peak position.
+ int findGround(const float *data, /// Data vector.
+ int peakpos, /// Peak position index within the data vector.
+ int direction /// Direction where to proceed from the peak: 1 = right, -1 = left.
+ ) const;
+
+ /// get exact center of peak near given position by calculating local mass of center
+ double getPeakCenter(const float *data, int peakpos) const;
+
+public:
+ /// Constructor.
+ PeakFinder();
+
+ /// Detect exact peak position of the data vector by finding the largest peak 'hump'
+ /// and calculating the mass-center location of the peak hump.
+ ///
+ /// \return The location of the largest base harmonic peak hump.
+ double detectPeak(const float *data, /// Data vector to be analyzed. The data vector has
+ /// to be at least 'maxPos' items long.
+ int minPos, ///< Min allowed peak location within the vector data.
+ int maxPos ///< Max allowed peak location within the vector data.
+ );
+};
+
+}
+
+#endif // _PeakFinder_H_
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/RateTransposer.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/RateTransposer.cpp
index 0e2348d20d..bdd208edee 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/RateTransposer.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/RateTransposer.cpp
@@ -1,315 +1,315 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sample rate transposer. Changes sample rate by using linear interpolation
-/// together with anti-alias filtering (first order interpolation with anti-
-/// alias filtering should be quite adequate for this application)
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include
-#include "ADM_default.h"
-#include
-#include
-#include "RateTransposer.h"
-#include "InterpolateLinear.h"
-#include "InterpolateCubic.h"
-#include "InterpolateShannon.h"
-#include "AAFilter.h"
-
-using namespace soundtouch;
-
-// Define default interpolation algorithm here
-TransposerBase::ALGORITHM TransposerBase::algorithm = TransposerBase::CUBIC;
-
-
-// Constructor
-RateTransposer::RateTransposer() : FIFOProcessor(&outputBuffer)
-{
- bUseAAFilter =
-#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
- true;
-#else
- // Disable Anti-alias filter if desirable to avoid click at rate change zero value crossover
- false;
-#endif
-
- // Instantiates the anti-alias filter
- pAAFilter = new AAFilter(64);
- pTransposer = TransposerBase::newInstance();
- clear();
-}
-
-
-RateTransposer::~RateTransposer()
-{
- delete pAAFilter;
- delete pTransposer;
-}
-
-
-/// Enables/disables the anti-alias filter. Zero to disable, nonzero to enable
-void RateTransposer::enableAAFilter(bool newMode)
-{
-#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
- // Disable Anti-alias filter if desirable to avoid click at rate change zero value crossover
- bUseAAFilter = newMode;
- clear();
-#endif
-}
-
-
-/// Returns nonzero if anti-alias filter is enabled.
-bool RateTransposer::isAAFilterEnabled() const
-{
- return bUseAAFilter;
-}
-
-
-AAFilter *RateTransposer::getAAFilter()
-{
- return pAAFilter;
-}
-
-
-// Sets new target iRate. Normal iRate = 1.0, smaller values represent slower
-// iRate, larger faster iRates.
-void RateTransposer::setRate(double newRate)
-{
- double fCutoff;
-
- pTransposer->setRate(newRate);
-
- // design a new anti-alias filter
- if (newRate > 1.0)
- {
- fCutoff = 0.5 / newRate;
- }
- else
- {
- fCutoff = 0.5 * newRate;
- }
- pAAFilter->setCutoffFreq(fCutoff);
-}
-
-
-// Adds 'nSamples' pcs of samples from the 'samples' memory position into
-// the input of the object.
-void RateTransposer::putSamples(const SAMPLETYPE *samples, uint nSamples)
-{
- processSamples(samples, nSamples);
-}
-
-
-// Transposes sample rate by applying anti-alias filter to prevent folding.
-// Returns amount of samples returned in the "dest" buffer.
-// The maximum amount of samples that can be returned at a time is set by
-// the 'set_returnBuffer_size' function.
-void RateTransposer::processSamples(const SAMPLETYPE *src, uint nSamples)
-{
- uint count;
-
- if (nSamples == 0) return;
-
- // Store samples to input buffer
- inputBuffer.putSamples(src, nSamples);
-
- // If anti-alias filter is turned off, simply transpose without applying
- // the filter
- if (bUseAAFilter == false)
- {
- count = pTransposer->transpose(outputBuffer, inputBuffer);
- return;
- }
-
- ADM_assert(pAAFilter);
-
- // Transpose with anti-alias filter
- if (pTransposer->rate < 1.0f)
- {
- // If the parameter 'Rate' value is smaller than 1, first transpose
- // the samples and then apply the anti-alias filter to remove aliasing.
-
- // Transpose the samples, store the result to end of "midBuffer"
- pTransposer->transpose(midBuffer, inputBuffer);
-
- // Apply the anti-alias filter for transposed samples in midBuffer
- pAAFilter->evaluate(outputBuffer, midBuffer);
- }
- else
- {
- // If the parameter 'Rate' value is larger than 1, first apply the
- // anti-alias filter to remove high frequencies (prevent them from folding
- // over the lover frequencies), then transpose.
-
- // Apply the anti-alias filter for samples in inputBuffer
- pAAFilter->evaluate(midBuffer, inputBuffer);
-
- // Transpose the AA-filtered samples in "midBuffer"
- pTransposer->transpose(outputBuffer, midBuffer);
- }
-}
-
-
-// Sets the number of channels, 1 = mono, 2 = stereo
-void RateTransposer::setChannels(int nChannels)
-{
- if (!verifyNumberOfChannels(nChannels) ||
- (pTransposer->numChannels == nChannels)) return;
-
- pTransposer->setChannels(nChannels);
- inputBuffer.setChannels(nChannels);
- midBuffer.setChannels(nChannels);
- outputBuffer.setChannels(nChannels);
-}
-
-
-// Clears all the samples in the object
-void RateTransposer::clear()
-{
- outputBuffer.clear();
- midBuffer.clear();
- inputBuffer.clear();
- pTransposer->resetRegisters();
-
- // prefill buffer to avoid losing first samples at beginning of stream
- int prefill = getLatency();
- inputBuffer.addSilent(prefill);
-}
-
-
-// Returns nonzero if there aren't any samples available for outputting.
-int RateTransposer::isEmpty() const
-{
- int res;
-
- res = FIFOProcessor::isEmpty();
- if (res == 0) return 0;
- return inputBuffer.isEmpty();
-}
-
-
-/// Return approximate initial input-output latency
-int RateTransposer::getLatency() const
-{
- return pTransposer->getLatency() +
- ((bUseAAFilter) ? (pAAFilter->getLength() / 2) : 0);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// TransposerBase - Base class for interpolation
-//
-
-// static function to set interpolation algorithm
-void TransposerBase::setAlgorithm(TransposerBase::ALGORITHM a)
-{
- TransposerBase::algorithm = a;
-}
-
-
-// Transposes the sample rate of the given samples using linear interpolation.
-// Returns the number of samples returned in the "dest" buffer
-int TransposerBase::transpose(FIFOSampleBuffer &dest, FIFOSampleBuffer &src)
-{
- int numSrcSamples = src.numSamples();
- int sizeDemand = (int)((double)numSrcSamples / rate) + 8;
- int numOutput;
- SAMPLETYPE *psrc = src.ptrBegin();
- SAMPLETYPE *pdest = dest.ptrEnd(sizeDemand);
-
-#ifndef USE_MULTICH_ALWAYS
- if (numChannels == 1)
- {
- numOutput = transposeMono(pdest, psrc, numSrcSamples);
- }
- else if (numChannels == 2)
- {
- numOutput = transposeStereo(pdest, psrc, numSrcSamples);
- }
- else
-#endif // USE_MULTICH_ALWAYS
- {
- ADM_assert(numChannels > 0);
- numOutput = transposeMulti(pdest, psrc, numSrcSamples);
- }
- dest.putSamples(numOutput);
- src.receiveSamples(numSrcSamples);
- return numOutput;
-}
-
-
-TransposerBase::TransposerBase()
-{
- numChannels = 0;
- rate = 1.0f;
-}
-
-
-TransposerBase::~TransposerBase()
-{
-}
-
-
-void TransposerBase::setChannels(int channels)
-{
- numChannels = channels;
- resetRegisters();
-}
-
-
-void TransposerBase::setRate(double newRate)
-{
- rate = newRate;
-}
-
-
-// static factory function
-TransposerBase *TransposerBase::newInstance()
-{
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- // Notice: For integer arithmetic support only linear algorithm (due to simplest calculus)
- return ::new InterpolateLinearInteger;
-#else
- switch (algorithm)
- {
- case LINEAR:
- return new InterpolateLinearFloat;
-
- case CUBIC:
- return new InterpolateCubic;
-
- case SHANNON:
- return new InterpolateShannon;
-
- default:
- ADM_assert(false);
- return NULL;
- }
-#endif
-}
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Sample rate transposer. Changes sample rate by using linear interpolation
+/// together with anti-alias filtering (first order interpolation with anti-
+/// alias filtering should be quite adequate for this application)
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include
+#include "ADM_default.h"
+#include
+#include
+#include "RateTransposer.h"
+#include "InterpolateLinear.h"
+#include "InterpolateCubic.h"
+#include "InterpolateShannon.h"
+#include "AAFilter.h"
+
+using namespace soundtouch;
+
+// Define default interpolation algorithm here
+TransposerBase::ALGORITHM TransposerBase::algorithm = TransposerBase::CUBIC;
+
+
+// Constructor
+RateTransposer::RateTransposer() : FIFOProcessor(&outputBuffer)
+{
+ bUseAAFilter =
+#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
+ true;
+#else
+ // Disable Anti-alias filter if desirable to avoid click at rate change zero value crossover
+ false;
+#endif
+
+ // Instantiates the anti-alias filter
+ pAAFilter = new AAFilter(64);
+ pTransposer = TransposerBase::newInstance();
+ clear();
+}
+
+
+RateTransposer::~RateTransposer()
+{
+ delete pAAFilter;
+ delete pTransposer;
+}
+
+
+/// Enables/disables the anti-alias filter. Zero to disable, nonzero to enable
+void RateTransposer::enableAAFilter(bool newMode)
+{
+#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
+ // Disable Anti-alias filter if desirable to avoid click at rate change zero value crossover
+ bUseAAFilter = newMode;
+ clear();
+#endif
+}
+
+
+/// Returns nonzero if anti-alias filter is enabled.
+bool RateTransposer::isAAFilterEnabled() const
+{
+ return bUseAAFilter;
+}
+
+
+AAFilter *RateTransposer::getAAFilter()
+{
+ return pAAFilter;
+}
+
+
+// Sets new target iRate. Normal iRate = 1.0, smaller values represent slower
+// iRate, larger faster iRates.
+void RateTransposer::setRate(double newRate)
+{
+ double fCutoff;
+
+ pTransposer->setRate(newRate);
+
+ // design a new anti-alias filter
+ if (newRate > 1.0)
+ {
+ fCutoff = 0.5 / newRate;
+ }
+ else
+ {
+ fCutoff = 0.5 * newRate;
+ }
+ pAAFilter->setCutoffFreq(fCutoff);
+}
+
+
+// Adds 'nSamples' pcs of samples from the 'samples' memory position into
+// the input of the object.
+void RateTransposer::putSamples(const SAMPLETYPE *samples, uint nSamples)
+{
+ processSamples(samples, nSamples);
+}
+
+
+// Transposes sample rate by applying anti-alias filter to prevent folding.
+// Returns amount of samples returned in the "dest" buffer.
+// The maximum amount of samples that can be returned at a time is set by
+// the 'set_returnBuffer_size' function.
+void RateTransposer::processSamples(const SAMPLETYPE *src, uint nSamples)
+{
+ uint count;
+
+ if (nSamples == 0) return;
+
+ // Store samples to input buffer
+ inputBuffer.putSamples(src, nSamples);
+
+ // If anti-alias filter is turned off, simply transpose without applying
+ // the filter
+ if (bUseAAFilter == false)
+ {
+ count = pTransposer->transpose(outputBuffer, inputBuffer);
+ return;
+ }
+
+ ADM_assert(pAAFilter);
+
+ // Transpose with anti-alias filter
+ if (pTransposer->rate < 1.0f)
+ {
+ // If the parameter 'Rate' value is smaller than 1, first transpose
+ // the samples and then apply the anti-alias filter to remove aliasing.
+
+ // Transpose the samples, store the result to end of "midBuffer"
+ pTransposer->transpose(midBuffer, inputBuffer);
+
+ // Apply the anti-alias filter for transposed samples in midBuffer
+ pAAFilter->evaluate(outputBuffer, midBuffer);
+ }
+ else
+ {
+ // If the parameter 'Rate' value is larger than 1, first apply the
+ // anti-alias filter to remove high frequencies (prevent them from folding
+ // over the lover frequencies), then transpose.
+
+ // Apply the anti-alias filter for samples in inputBuffer
+ pAAFilter->evaluate(midBuffer, inputBuffer);
+
+ // Transpose the AA-filtered samples in "midBuffer"
+ pTransposer->transpose(outputBuffer, midBuffer);
+ }
+}
+
+
+// Sets the number of channels, 1 = mono, 2 = stereo
+void RateTransposer::setChannels(int nChannels)
+{
+ if (!verifyNumberOfChannels(nChannels) ||
+ (pTransposer->numChannels == nChannels)) return;
+
+ pTransposer->setChannels(nChannels);
+ inputBuffer.setChannels(nChannels);
+ midBuffer.setChannels(nChannels);
+ outputBuffer.setChannels(nChannels);
+}
+
+
+// Clears all the samples in the object
+void RateTransposer::clear()
+{
+ outputBuffer.clear();
+ midBuffer.clear();
+ inputBuffer.clear();
+ pTransposer->resetRegisters();
+
+ // prefill buffer to avoid losing first samples at beginning of stream
+ int prefill = getLatency();
+ inputBuffer.addSilent(prefill);
+}
+
+
+// Returns nonzero if there aren't any samples available for outputting.
+int RateTransposer::isEmpty() const
+{
+ int res;
+
+ res = FIFOProcessor::isEmpty();
+ if (res == 0) return 0;
+ return inputBuffer.isEmpty();
+}
+
+
+/// Return approximate initial input-output latency
+int RateTransposer::getLatency() const
+{
+ return pTransposer->getLatency() +
+ ((bUseAAFilter) ? (pAAFilter->getLength() / 2) : 0);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// TransposerBase - Base class for interpolation
+//
+
+// static function to set interpolation algorithm
+void TransposerBase::setAlgorithm(TransposerBase::ALGORITHM a)
+{
+ TransposerBase::algorithm = a;
+}
+
+
+// Transposes the sample rate of the given samples using linear interpolation.
+// Returns the number of samples returned in the "dest" buffer
+int TransposerBase::transpose(FIFOSampleBuffer &dest, FIFOSampleBuffer &src)
+{
+ int numSrcSamples = src.numSamples();
+ int sizeDemand = (int)((double)numSrcSamples / rate) + 8;
+ int numOutput;
+ SAMPLETYPE *psrc = src.ptrBegin();
+ SAMPLETYPE *pdest = dest.ptrEnd(sizeDemand);
+
+#ifndef USE_MULTICH_ALWAYS
+ if (numChannels == 1)
+ {
+ numOutput = transposeMono(pdest, psrc, numSrcSamples);
+ }
+ else if (numChannels == 2)
+ {
+ numOutput = transposeStereo(pdest, psrc, numSrcSamples);
+ }
+ else
+#endif // USE_MULTICH_ALWAYS
+ {
+ ADM_assert(numChannels > 0);
+ numOutput = transposeMulti(pdest, psrc, numSrcSamples);
+ }
+ dest.putSamples(numOutput);
+ src.receiveSamples(numSrcSamples);
+ return numOutput;
+}
+
+
+TransposerBase::TransposerBase()
+{
+ numChannels = 0;
+ rate = 1.0f;
+}
+
+
+TransposerBase::~TransposerBase()
+{
+}
+
+
+void TransposerBase::setChannels(int channels)
+{
+ numChannels = channels;
+ resetRegisters();
+}
+
+
+void TransposerBase::setRate(double newRate)
+{
+ rate = newRate;
+}
+
+
+// static factory function
+TransposerBase *TransposerBase::newInstance()
+{
+#ifdef SOUNDTOUCH_INTEGER_SAMPLES
+ // Notice: For integer arithmetic support only linear algorithm (due to simplest calculus)
+ return ::new InterpolateLinearInteger;
+#else
+ switch (algorithm)
+ {
+ case LINEAR:
+ return new InterpolateLinearFloat;
+
+ case CUBIC:
+ return new InterpolateCubic;
+
+ case SHANNON:
+ return new InterpolateShannon;
+
+ default:
+ ADM_assert(false);
+ return NULL;
+ }
+#endif
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/RateTransposer.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/RateTransposer.h
index 411f4e897d..bd02eff13f 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/RateTransposer.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/RateTransposer.h
@@ -1,164 +1,164 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sample rate transposer. Changes sample rate by using linear interpolation
-/// together with anti-alias filtering (first order interpolation with anti-
-/// alias filtering should be quite adequate for this application).
-///
-/// Use either of the derived classes of 'RateTransposerInteger' or
-/// 'RateTransposerFloat' for corresponding integer/floating point tranposing
-/// algorithm implementation.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef RateTransposer_H
-#define RateTransposer_H
-
-#include
-#include "AAFilter.h"
-#include "FIFOSamplePipe.h"
-#include "FIFOSampleBuffer.h"
-
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-/// Abstract base class for transposer implementations (linear, advanced vs integer, float etc)
-class TransposerBase
-{
-public:
- enum ALGORITHM {
- LINEAR = 0,
- CUBIC,
- SHANNON
- };
-
-protected:
- virtual int transposeMono(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) = 0;
- virtual int transposeStereo(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) = 0;
- virtual int transposeMulti(SAMPLETYPE *dest,
- const SAMPLETYPE *src,
- int &srcSamples) = 0;
-
- static ALGORITHM algorithm;
-
-public:
- double rate;
- int numChannels;
-
- TransposerBase();
- virtual ~TransposerBase();
-
- virtual int transpose(FIFOSampleBuffer &dest, FIFOSampleBuffer &src);
- virtual void setRate(double newRate);
- virtual void setChannels(int channels);
- virtual int getLatency() const = 0;
-
- virtual void resetRegisters() = 0;
-
- // static factory function
- static TransposerBase *newInstance();
-
- // static function to set interpolation algorithm
- static void setAlgorithm(ALGORITHM a);
-};
-
-
-/// A common linear samplerate transposer class.
-///
-class RateTransposer : public FIFOProcessor
-{
-protected:
- /// Anti-alias filter object
- AAFilter *pAAFilter;
- TransposerBase *pTransposer;
-
- /// Buffer for collecting samples to feed the anti-alias filter between
- /// two batches
- FIFOSampleBuffer inputBuffer;
-
- /// Buffer for keeping samples between transposing & anti-alias filter
- FIFOSampleBuffer midBuffer;
-
- /// Output sample buffer
- FIFOSampleBuffer outputBuffer;
-
- bool bUseAAFilter;
-
-
- /// Transposes sample rate by applying anti-alias filter to prevent folding.
- /// Returns amount of samples returned in the "dest" buffer.
- /// The maximum amount of samples that can be returned at a time is set by
- /// the 'set_returnBuffer_size' function.
- void processSamples(const SAMPLETYPE *src,
- uint numSamples);
-
-public:
- RateTransposer();
- virtual ~RateTransposer() override;
-
- /// Returns the output buffer object
- FIFOSamplePipe *getOutput() { return &outputBuffer; };
-
- /// Return anti-alias filter object
- AAFilter *getAAFilter();
-
- /// Enables/disables the anti-alias filter. Zero to disable, nonzero to enable
- void enableAAFilter(bool newMode);
-
- /// Returns nonzero if anti-alias filter is enabled.
- bool isAAFilterEnabled() const;
-
- /// Sets new target rate. Normal rate = 1.0, smaller values represent slower
- /// rate, larger faster rates.
- virtual void setRate(double newRate);
-
- /// Sets the number of channels, 1 = mono, 2 = stereo
- void setChannels(int channels);
-
- /// Adds 'numSamples' pcs of samples from the 'samples' memory position into
- /// the input of the object.
- void putSamples(const SAMPLETYPE *samples, uint numSamples) override;
-
- /// Clears all the samples in the object
- void clear() override;
-
- /// Returns nonzero if there aren't any samples available for outputting.
- int isEmpty() const override;
-
- /// Return approximate initial input-output latency
- int getLatency() const;
-};
-
-}
-
-#endif
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Sample rate transposer. Changes sample rate by using linear interpolation
+/// together with anti-alias filtering (first order interpolation with anti-
+/// alias filtering should be quite adequate for this application).
+///
+/// Use either of the derived classes of 'RateTransposerInteger' or
+/// 'RateTransposerFloat' for corresponding integer/floating point tranposing
+/// algorithm implementation.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef RateTransposer_H
+#define RateTransposer_H
+
+#include
+#include "AAFilter.h"
+#include "FIFOSamplePipe.h"
+#include "FIFOSampleBuffer.h"
+
+#include "STTypes.h"
+
+namespace soundtouch
+{
+
+/// Abstract base class for transposer implementations (linear, advanced vs integer, float etc)
+class TransposerBase
+{
+public:
+ enum ALGORITHM {
+ LINEAR = 0,
+ CUBIC,
+ SHANNON
+ };
+
+protected:
+ virtual int transposeMono(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) = 0;
+ virtual int transposeStereo(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) = 0;
+ virtual int transposeMulti(SAMPLETYPE *dest,
+ const SAMPLETYPE *src,
+ int &srcSamples) = 0;
+
+ static ALGORITHM algorithm;
+
+public:
+ double rate;
+ int numChannels;
+
+ TransposerBase();
+ virtual ~TransposerBase();
+
+ virtual int transpose(FIFOSampleBuffer &dest, FIFOSampleBuffer &src);
+ virtual void setRate(double newRate);
+ virtual void setChannels(int channels);
+ virtual int getLatency() const = 0;
+
+ virtual void resetRegisters() = 0;
+
+ // static factory function
+ static TransposerBase *newInstance();
+
+ // static function to set interpolation algorithm
+ static void setAlgorithm(ALGORITHM a);
+};
+
+
+/// A common linear samplerate transposer class.
+///
+class RateTransposer : public FIFOProcessor
+{
+protected:
+ /// Anti-alias filter object
+ AAFilter *pAAFilter;
+ TransposerBase *pTransposer;
+
+ /// Buffer for collecting samples to feed the anti-alias filter between
+ /// two batches
+ FIFOSampleBuffer inputBuffer;
+
+ /// Buffer for keeping samples between transposing & anti-alias filter
+ FIFOSampleBuffer midBuffer;
+
+ /// Output sample buffer
+ FIFOSampleBuffer outputBuffer;
+
+ bool bUseAAFilter;
+
+
+ /// Transposes sample rate by applying anti-alias filter to prevent folding.
+ /// Returns amount of samples returned in the "dest" buffer.
+ /// The maximum amount of samples that can be returned at a time is set by
+ /// the 'set_returnBuffer_size' function.
+ void processSamples(const SAMPLETYPE *src,
+ uint numSamples);
+
+public:
+ RateTransposer();
+ virtual ~RateTransposer() override;
+
+ /// Returns the output buffer object
+ FIFOSamplePipe *getOutput() { return &outputBuffer; };
+
+ /// Return anti-alias filter object
+ AAFilter *getAAFilter();
+
+ /// Enables/disables the anti-alias filter. Zero to disable, nonzero to enable
+ void enableAAFilter(bool newMode);
+
+ /// Returns nonzero if anti-alias filter is enabled.
+ bool isAAFilterEnabled() const;
+
+ /// Sets new target rate. Normal rate = 1.0, smaller values represent slower
+ /// rate, larger faster rates.
+ virtual void setRate(double newRate);
+
+ /// Sets the number of channels, 1 = mono, 2 = stereo
+ void setChannels(int channels);
+
+ /// Adds 'numSamples' pcs of samples from the 'samples' memory position into
+ /// the input of the object.
+ void putSamples(const SAMPLETYPE *samples, uint numSamples) override;
+
+ /// Clears all the samples in the object
+ void clear() override;
+
+ /// Returns nonzero if there aren't any samples available for outputting.
+ int isEmpty() const override;
+
+ /// Return approximate initial input-output latency
+ int getLatency() const;
+};
+
+}
+
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h
index fa7bf7c2d5..b14cddd6aa 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/STTypes.h
@@ -1,191 +1,191 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Common type definitions for SoundTouch audio processing library.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef STTypes_H
-#define STTypes_H
-
-typedef unsigned int uint;
-typedef unsigned long ulong;
-
-// Patch for MinGW: on Win64 long is 32-bit
-#ifdef _WIN64
- typedef unsigned long long ulongptr;
-#else
- typedef ulong ulongptr;
-#endif
-
-
-// Helper macro for aligning pointer up to next 16-byte boundary
-#define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 )
-
-
-#if (defined(__GNUC__) && !defined(ANDROID))
- // In GCC, include soundtouch_config.h made by config scritps.
- // Skip this in Android compilation that uses GCC but without configure scripts.
- #include "soundtouch_config.h"
-#endif
-
-
-namespace soundtouch
-{
- /// Max allowed number of channels
- #define SOUNDTOUCH_MAX_CHANNELS 16
-
- /// Activate these undef's to overrule the possible sampletype
- /// setting inherited from some other header file:
- #undef SOUNDTOUCH_INTEGER_SAMPLES
- #undef SOUNDTOUCH_FLOAT_SAMPLES
-
- /// If following flag is defined, always uses multichannel processing
- /// routines also for mono and stero sound. This is for routine testing
- /// purposes; output should be same with either routines, yet disabling
- /// the dedicated mono/stereo processing routines will result in slower
- /// runtime performance so recommendation is to keep this off.
- // #define USE_MULTICH_ALWAYS
-
- #if (defined(__SOFTFP__) && defined(ANDROID))
- // For Android compilation: Force use of Integer samples in case that
- // compilation uses soft-floating point emulation - soft-fp is way too slow
- #undef SOUNDTOUCH_FLOAT_SAMPLES
- #define SOUNDTOUCH_INTEGER_SAMPLES 1
- #endif
-
- #if !(SOUNDTOUCH_INTEGER_SAMPLES || SOUNDTOUCH_FLOAT_SAMPLES)
-
- /// Choose either 32bit floating point or 16bit integer sampletype
- /// by choosing one of the following defines, unless this selection
- /// has already been done in some other file.
- ////
- /// Notes:
- /// - In Windows environment, choose the sample format with the
- /// following defines.
- /// - In GNU environment, the floating point samples are used by
- /// default, but integer samples can be chosen by giving the
- /// following switch to the configure script:
- /// ./configure --enable-integer-samples
- /// However, if you still prefer to select the sample format here
- /// also in GNU environment, then please #undef the INTEGER_SAMPLE
- /// and FLOAT_SAMPLE defines first as in comments above.
- //#define SOUNDTOUCH_INTEGER_SAMPLES 1 //< 16bit integer samples
- #define SOUNDTOUCH_FLOAT_SAMPLES 1 //< 32bit float samples
-
- #endif
-
- #if (_M_IX86 || __i386__ || __x86_64__ || _M_X64)
- /// Define this to allow X86-specific assembler/intrinsic optimizations.
- /// Notice that library contains also usual C++ versions of each of these
- /// these routines, so if you're having difficulties getting the optimized
- /// routines compiled for whatever reason, you may disable these optimizations
- /// to make the library compile.
-
- #define SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS 1
-
- /// In GNU environment, allow the user to override this setting by
- /// giving the following switch to the configure script:
- /// ./configure --disable-x86-optimizations
- /// ./configure --enable-x86-optimizations=no
- #ifdef SOUNDTOUCH_DISABLE_X86_OPTIMIZATIONS
- #undef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
- #endif
- #else
- /// Always disable optimizations when not using a x86 systems.
- #undef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
-
- #endif
-
- // If defined, allows the SIMD-optimized routines to skip unevenly aligned
- // memory offsets that can cause performance penalty in some SIMD implementations.
- // Causes slight compromise in sound quality.
- // #define SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION 1
-
-
- #ifdef SOUNDTOUCH_INTEGER_SAMPLES
- // 16bit integer sample type
- typedef short SAMPLETYPE;
- // data type for sample accumulation: Use 32bit integer to prevent overflows
- typedef long LONG_SAMPLETYPE;
-
- #ifdef SOUNDTOUCH_FLOAT_SAMPLES
- // check that only one sample type is defined
- #error "conflicting sample types defined"
- #endif // SOUNDTOUCH_FLOAT_SAMPLES
-
- #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
- // Allow MMX optimizations (not available in X64 mode)
- #if (!_M_X64)
- #define SOUNDTOUCH_ALLOW_MMX 1
- #endif
- #endif
-
- #else
-
- // floating point samples
- typedef float SAMPLETYPE;
- // data type for sample accumulation: Use float also here to enable
- // efficient autovectorization
- typedef float LONG_SAMPLETYPE;
-
- #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
- // Allow SSE optimizations
- #define SOUNDTOUCH_ALLOW_SSE 1
- #endif
-
- #endif // SOUNDTOUCH_INTEGER_SAMPLES
-
- #if ((SOUNDTOUCH_ALLOW_SSE) || (__SSE__) || (SOUNDTOUCH_USE_NEON))
- #if SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION
- #define ST_SIMD_AVOID_UNALIGNED
- #endif
- #endif
-
-}
-
-// define ST_NO_EXCEPTION_HANDLING switch to disable throwing std exceptions:
-#define ST_NO_EXCEPTION_HANDLING 1
-#ifdef ST_NO_EXCEPTION_HANDLING
- // Exceptions disabled. Throw asserts instead if enabled.
- #include "ADM_default.h"
- #define ST_THROW_RT_ERROR(x) {ADM_assert((x) && 0);}
-#else
- #error only ADM_assert can be used
- // use c++ standard exceptions
- #include
- #include
- #define ST_THROW_RT_ERROR(x) {throw std::runtime_error(x);}
-#endif
-
-// When this #define is active, eliminates a clicking sound when the "rate" or "pitch"
-// parameter setting crosses from value <1 to >=1 or vice versa during processing.
-// Default is off as such crossover is untypical case and involves a slight sound
-// quality compromise.
-//#define SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER 1
-
-#endif
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Common type definitions for SoundTouch audio processing library.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef STTypes_H
+#define STTypes_H
+
+typedef unsigned int uint;
+typedef unsigned long ulong;
+
+// Patch for MinGW: on Win64 long is 32-bit
+#ifdef _WIN64
+ typedef unsigned long long ulongptr;
+#else
+ typedef ulong ulongptr;
+#endif
+
+
+// Helper macro for aligning pointer up to next 16-byte boundary
+#define SOUNDTOUCH_ALIGN_POINTER_16(x) ( ( (ulongptr)(x) + 15 ) & ~(ulongptr)15 )
+
+
+#if (defined(__GNUC__) && !defined(ANDROID))
+ // In GCC, include soundtouch_config.h made by config scritps.
+ // Skip this in Android compilation that uses GCC but without configure scripts.
+ #include "soundtouch_config.h"
+#endif
+
+
+namespace soundtouch
+{
+ /// Max allowed number of channels
+ #define SOUNDTOUCH_MAX_CHANNELS 16
+
+ /// Activate these undef's to overrule the possible sampletype
+ /// setting inherited from some other header file:
+ #undef SOUNDTOUCH_INTEGER_SAMPLES
+ #undef SOUNDTOUCH_FLOAT_SAMPLES
+
+ /// If following flag is defined, always uses multichannel processing
+ /// routines also for mono and stero sound. This is for routine testing
+ /// purposes; output should be same with either routines, yet disabling
+ /// the dedicated mono/stereo processing routines will result in slower
+ /// runtime performance so recommendation is to keep this off.
+ // #define USE_MULTICH_ALWAYS
+
+ #if (defined(__SOFTFP__) && defined(ANDROID))
+ // For Android compilation: Force use of Integer samples in case that
+ // compilation uses soft-floating point emulation - soft-fp is way too slow
+ #undef SOUNDTOUCH_FLOAT_SAMPLES
+ #define SOUNDTOUCH_INTEGER_SAMPLES 1
+ #endif
+
+ #if !(SOUNDTOUCH_INTEGER_SAMPLES || SOUNDTOUCH_FLOAT_SAMPLES)
+
+ /// Choose either 32bit floating point or 16bit integer sampletype
+ /// by choosing one of the following defines, unless this selection
+ /// has already been done in some other file.
+ ////
+ /// Notes:
+ /// - In Windows environment, choose the sample format with the
+ /// following defines.
+ /// - In GNU environment, the floating point samples are used by
+ /// default, but integer samples can be chosen by giving the
+ /// following switch to the configure script:
+ /// ./configure --enable-integer-samples
+ /// However, if you still prefer to select the sample format here
+ /// also in GNU environment, then please #undef the INTEGER_SAMPLE
+ /// and FLOAT_SAMPLE defines first as in comments above.
+ //#define SOUNDTOUCH_INTEGER_SAMPLES 1 //< 16bit integer samples
+ #define SOUNDTOUCH_FLOAT_SAMPLES 1 //< 32bit float samples
+
+ #endif
+
+ #if (_M_IX86 || __i386__ || __x86_64__ || _M_X64)
+ /// Define this to allow X86-specific assembler/intrinsic optimizations.
+ /// Notice that library contains also usual C++ versions of each of these
+ /// these routines, so if you're having difficulties getting the optimized
+ /// routines compiled for whatever reason, you may disable these optimizations
+ /// to make the library compile.
+
+ #define SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS 1
+
+ /// In GNU environment, allow the user to override this setting by
+ /// giving the following switch to the configure script:
+ /// ./configure --disable-x86-optimizations
+ /// ./configure --enable-x86-optimizations=no
+ #ifdef SOUNDTOUCH_DISABLE_X86_OPTIMIZATIONS
+ #undef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
+ #endif
+ #else
+ /// Always disable optimizations when not using a x86 systems.
+ #undef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
+
+ #endif
+
+ // If defined, allows the SIMD-optimized routines to skip unevenly aligned
+ // memory offsets that can cause performance penalty in some SIMD implementations.
+ // Causes slight compromise in sound quality.
+ // #define SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION 1
+
+
+ #ifdef SOUNDTOUCH_INTEGER_SAMPLES
+ // 16bit integer sample type
+ typedef short SAMPLETYPE;
+ // data type for sample accumulation: Use 32bit integer to prevent overflows
+ typedef long LONG_SAMPLETYPE;
+
+ #ifdef SOUNDTOUCH_FLOAT_SAMPLES
+ // check that only one sample type is defined
+ #error "conflicting sample types defined"
+ #endif // SOUNDTOUCH_FLOAT_SAMPLES
+
+ #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
+ // Allow MMX optimizations (not available in X64 mode)
+ #if (!_M_X64)
+ #define SOUNDTOUCH_ALLOW_MMX 1
+ #endif
+ #endif
+
+ #else
+
+ // floating point samples
+ typedef float SAMPLETYPE;
+ // data type for sample accumulation: Use float also here to enable
+ // efficient autovectorization
+ typedef float LONG_SAMPLETYPE;
+
+ #ifdef SOUNDTOUCH_ALLOW_X86_OPTIMIZATIONS
+ // Allow SSE optimizations
+ #define SOUNDTOUCH_ALLOW_SSE 1
+ #endif
+
+ #endif // SOUNDTOUCH_INTEGER_SAMPLES
+
+ #if ((SOUNDTOUCH_ALLOW_SSE) || (__SSE__) || (SOUNDTOUCH_USE_NEON))
+ #if SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION
+ #define ST_SIMD_AVOID_UNALIGNED
+ #endif
+ #endif
+
+}
+
+// define ST_NO_EXCEPTION_HANDLING switch to disable throwing std exceptions:
+#define ST_NO_EXCEPTION_HANDLING 1
+#ifdef ST_NO_EXCEPTION_HANDLING
+ // Exceptions disabled. Throw asserts instead if enabled.
+ #include "ADM_default.h"
+ #define ST_THROW_RT_ERROR(x) {ADM_assert((x) && 0);}
+#else
+ #error only ADM_assert can be used
+ // use c++ standard exceptions
+ #include
+ #include
+ #define ST_THROW_RT_ERROR(x) {throw std::runtime_error(x);}
+#endif
+
+// When this #define is active, eliminates a clicking sound when the "rate" or "pitch"
+// parameter setting crosses from value <1 to >=1 or vice versa during processing.
+// Default is off as such crossover is untypical case and involves a slight sound
+// quality compromise.
+//#define SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER 1
+
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/SoundTouch.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/SoundTouch.cpp
index af84c3b879..cd2ff22385 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/SoundTouch.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/SoundTouch.cpp
@@ -1,537 +1,537 @@
-//////////////////////////////////////////////////////////////////////////////
-///
-/// SoundTouch - main class for tempo/pitch/rate adjusting routines.
-///
-/// Notes:
-/// - Initialize the SoundTouch object instance by setting up the sound stream
-/// parameters with functions 'setSampleRate' and 'setChannels', then set
-/// desired tempo/pitch/rate settings with the corresponding functions.
-///
-/// - The SoundTouch class behaves like a first-in-first-out pipeline: The
-/// samples that are to be processed are fed into one of the pipe by calling
-/// function 'putSamples', while the ready processed samples can be read
-/// from the other end of the pipeline with function 'receiveSamples'.
-///
-/// - The SoundTouch processing classes require certain sized 'batches' of
-/// samples in order to process the sound. For this reason the classes buffer
-/// incoming samples until there are enough of samples available for
-/// processing, then they carry out the processing step and consequently
-/// make the processed samples available for outputting.
-///
-/// - For the above reason, the processing routines introduce a certain
-/// 'latency' between the input and output, so that the samples input to
-/// SoundTouch may not be immediately available in the output, and neither
-/// the amount of outputtable samples may not immediately be in direct
-/// relationship with the amount of previously input samples.
-///
-/// - The tempo/pitch/rate control parameters can be altered during processing.
-/// Please notice though that they aren't currently protected by semaphores,
-/// so in multi-thread application external semaphore protection may be
-/// required.
-///
-/// - This class utilizes classes 'TDStretch' for tempo change (without modifying
-/// pitch) and 'RateTransposer' for changing the playback rate (that is, both
-/// tempo and pitch in the same ratio) of the sound. The third available control
-/// 'pitch' (change pitch but maintain tempo) is produced by a combination of
-/// combining the two other controls.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "ADM_default.h"
-#include
-#include
-#include
-#include
-
-#include "SoundTouch.h"
-#include "TDStretch.h"
-#include "RateTransposer.h"
-
-using namespace soundtouch;
-
-/// test if two floating point numbers are equal
-#define TEST_FLOAT_EQUAL(a, b) (fabs(a - b) < 1e-10)
-
-
-/// Print library version string for autoconf
-extern "C" void soundtouch_ac_test()
-{
- printf("SoundTouch Version: %s\n",SOUNDTOUCH_VERSION);
-}
-
-
-SoundTouch::SoundTouch()
-{
- // Initialize rate transposer and tempo changer instances
-
- pRateTransposer = new RateTransposer();
- pTDStretch = TDStretch::newInstance();
-
- setOutPipe(pTDStretch);
-
- rate = tempo = 0;
-
- virtualPitch =
- virtualRate =
- virtualTempo = 1.0;
-
- calcEffectiveRateAndTempo();
-
- samplesExpectedOut = 0;
- samplesOutput = 0;
-
- channels = 0;
- bSrateSet = false;
-}
-
-
-SoundTouch::~SoundTouch()
-{
- delete pRateTransposer;
- delete pTDStretch;
-}
-
-
-/// Get SoundTouch library version string
-const char *SoundTouch::getVersionString()
-{
- static const char *_version = SOUNDTOUCH_VERSION;
-
- return _version;
-}
-
-
-/// Get SoundTouch library version Id
-uint SoundTouch::getVersionId()
-{
- return SOUNDTOUCH_VERSION_ID;
-}
-
-
-// Sets the number of channels, 1 = mono, 2 = stereo
-void SoundTouch::setChannels(uint numChannels)
-{
- if (!verifyNumberOfChannels(numChannels)) return;
-
- channels = numChannels;
- pRateTransposer->setChannels((int)numChannels);
- pTDStretch->setChannels((int)numChannels);
-}
-
-
-// Sets new rate control value. Normal rate = 1.0, smaller values
-// represent slower rate, larger faster rates.
-void SoundTouch::setRate(double newRate)
-{
- virtualRate = newRate;
- calcEffectiveRateAndTempo();
-}
-
-
-// Sets new rate control value as a difference in percents compared
-// to the original rate (-50 .. +100 %)
-void SoundTouch::setRateChange(double newRate)
-{
- virtualRate = 1.0 + 0.01 * newRate;
- calcEffectiveRateAndTempo();
-}
-
-
-// Sets new tempo control value. Normal tempo = 1.0, smaller values
-// represent slower tempo, larger faster tempo.
-void SoundTouch::setTempo(double newTempo)
-{
- virtualTempo = newTempo;
- calcEffectiveRateAndTempo();
-}
-
-
-// Sets new tempo control value as a difference in percents compared
-// to the original tempo (-50 .. +100 %)
-void SoundTouch::setTempoChange(double newTempo)
-{
- virtualTempo = 1.0 + 0.01 * newTempo;
- calcEffectiveRateAndTempo();
-}
-
-
-// Sets new pitch control value. Original pitch = 1.0, smaller values
-// represent lower pitches, larger values higher pitch.
-void SoundTouch::setPitch(double newPitch)
-{
- virtualPitch = newPitch;
- calcEffectiveRateAndTempo();
-}
-
-
-// Sets pitch change in octaves compared to the original pitch
-// (-1.00 .. +1.00)
-void SoundTouch::setPitchOctaves(double newPitch)
-{
- virtualPitch = exp(0.69314718056 * newPitch);
- calcEffectiveRateAndTempo();
-}
-
-
-// Sets pitch change in semi-tones compared to the original pitch
-// (-12 .. +12)
-void SoundTouch::setPitchSemiTones(int newPitch)
-{
- setPitchOctaves((double)newPitch / 12.0);
-}
-
-
-void SoundTouch::setPitchSemiTones(double newPitch)
-{
- setPitchOctaves(newPitch / 12.0);
-}
-
-
-// Calculates 'effective' rate and tempo values from the
-// nominal control values.
-void SoundTouch::calcEffectiveRateAndTempo()
-{
- double oldTempo = tempo;
- double oldRate = rate;
-
- tempo = virtualTempo / virtualPitch;
- rate = virtualPitch * virtualRate;
-
- if (!TEST_FLOAT_EQUAL(rate,oldRate)) pRateTransposer->setRate(rate);
- if (!TEST_FLOAT_EQUAL(tempo, oldTempo)) pTDStretch->setTempo(tempo);
-
-#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
- if (rate <= 1.0f)
- {
- if (output != pTDStretch)
- {
- FIFOSamplePipe *tempoOut;
-
- ADM_assert(output == pRateTransposer);
- // move samples in the current output buffer to the output of pTDStretch
- tempoOut = pTDStretch->getOutput();
- tempoOut->moveSamples(*output);
- // move samples in pitch transposer's store buffer to tempo changer's input
- // deprecated : pTDStretch->moveSamples(*pRateTransposer->getStore());
-
- output = pTDStretch;
- }
- }
- else
-#endif
- {
- if (output != pRateTransposer)
- {
- FIFOSamplePipe *transOut;
-
- ADM_assert(output == pTDStretch);
- // move samples in the current output buffer to the output of pRateTransposer
- transOut = pRateTransposer->getOutput();
- transOut->moveSamples(*output);
- // move samples in tempo changer's input to pitch transposer's input
- pRateTransposer->moveSamples(*pTDStretch->getInput());
-
- output = pRateTransposer;
- }
- }
-}
-
-
-// Sets sample rate.
-void SoundTouch::setSampleRate(uint srate)
-{
- // set sample rate, leave other tempo changer parameters as they are.
- pTDStretch->setParameters((int)srate);
- bSrateSet = true;
-}
-
-
-// Adds 'numSamples' pcs of samples from the 'samples' memory position into
-// the input of the object.
-void SoundTouch::putSamples(const SAMPLETYPE *samples, uint nSamples)
-{
- if (bSrateSet == false)
- {
- ST_THROW_RT_ERROR("SoundTouch : Sample rate not defined");
- }
- else if (channels == 0)
- {
- ST_THROW_RT_ERROR("SoundTouch : Number of channels not defined");
- }
-
- // accumulate how many samples are expected out from processing, given the current
- // processing setting
- samplesExpectedOut += (double)nSamples / ((double)rate * (double)tempo);
-
-#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
- if (rate <= 1.0f)
- {
- // transpose the rate down, output the transposed sound to tempo changer buffer
- ADM_assert(output == pTDStretch);
- pRateTransposer->putSamples(samples, nSamples);
- pTDStretch->moveSamples(*pRateTransposer);
- }
- else
-#endif
- {
- // evaluate the tempo changer, then transpose the rate up,
- ADM_assert(output == pRateTransposer);
- pTDStretch->putSamples(samples, nSamples);
- pRateTransposer->moveSamples(*pTDStretch);
- }
-}
-
-
-// Flushes the last samples from the processing pipeline to the output.
-// Clears also the internal processing buffers.
-//
-// Note: This function is meant for extracting the last samples of a sound
-// stream. This function may introduce additional blank samples in the end
-// of the sound stream, and thus it's not recommended to call this function
-// in the middle of a sound stream.
-void SoundTouch::flush()
-{
- int i;
- int numStillExpected;
- SAMPLETYPE *buff = new SAMPLETYPE[128 * channels];
-
- // how many samples are still expected to output
- numStillExpected = (int)((long)(samplesExpectedOut + 0.5) - samplesOutput);
- if (numStillExpected < 0) numStillExpected = 0;
-
- memset(buff, 0, 128 * channels * sizeof(SAMPLETYPE));
- // "Push" the last active samples out from the processing pipeline by
- // feeding blank samples into the processing pipeline until new,
- // processed samples appear in the output (not however, more than
- // 24ksamples in any case)
- for (i = 0; (numStillExpected > (int)numSamples()) && (i < 200); i ++)
- {
- putSamples(buff, 128);
- }
-
- adjustAmountOfSamples(numStillExpected);
-
- delete[] buff;
-
- // Clear input buffers
- pTDStretch->clearInput();
- // yet leave the output intouched as that's where the
- // flushed samples are!
-}
-
-
-// Changes a setting controlling the processing system behaviour. See the
-// 'SETTING_...' defines for available setting ID's.
-bool SoundTouch::setSetting(int settingId, int value)
-{
- int sampleRate, sequenceMs, seekWindowMs, overlapMs;
-
- // read current tdstretch routine parameters
- pTDStretch->getParameters(&sampleRate, &sequenceMs, &seekWindowMs, &overlapMs);
-
- switch (settingId)
- {
- case SETTING_USE_AA_FILTER :
- // enables / disabless anti-alias filter
- pRateTransposer->enableAAFilter((value != 0) ? true : false);
- return true;
-
- case SETTING_AA_FILTER_LENGTH :
- // sets anti-alias filter length
- pRateTransposer->getAAFilter()->setLength(value);
- return true;
-
- case SETTING_USE_QUICKSEEK :
- // enables / disables tempo routine quick seeking algorithm
- pTDStretch->enableQuickSeek((value != 0) ? true : false);
- return true;
-
- case SETTING_SEQUENCE_MS:
- // change time-stretch sequence duration parameter
- pTDStretch->setParameters(sampleRate, value, seekWindowMs, overlapMs);
- return true;
-
- case SETTING_SEEKWINDOW_MS:
- // change time-stretch seek window length parameter
- pTDStretch->setParameters(sampleRate, sequenceMs, value, overlapMs);
- return true;
-
- case SETTING_OVERLAP_MS:
- // change time-stretch overlap length parameter
- pTDStretch->setParameters(sampleRate, sequenceMs, seekWindowMs, value);
- return true;
-
- default :
- return false;
- }
-}
-
-
-// Reads a setting controlling the processing system behaviour. See the
-// 'SETTING_...' defines for available setting ID's.
-//
-// Returns the setting value.
-int SoundTouch::getSetting(int settingId) const
-{
- int temp;
-
- switch (settingId)
- {
- case SETTING_USE_AA_FILTER :
- return (uint)pRateTransposer->isAAFilterEnabled();
-
- case SETTING_AA_FILTER_LENGTH :
- return pRateTransposer->getAAFilter()->getLength();
-
- case SETTING_USE_QUICKSEEK :
- return (uint)pTDStretch->isQuickSeekEnabled();
-
- case SETTING_SEQUENCE_MS:
- pTDStretch->getParameters(NULL, &temp, NULL, NULL);
- return temp;
-
- case SETTING_SEEKWINDOW_MS:
- pTDStretch->getParameters(NULL, NULL, &temp, NULL);
- return temp;
-
- case SETTING_OVERLAP_MS:
- pTDStretch->getParameters(NULL, NULL, NULL, &temp);
- return temp;
-
- case SETTING_NOMINAL_INPUT_SEQUENCE :
- {
- int size = pTDStretch->getInputSampleReq();
-
-#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
- if (rate <= 1.0)
- {
- // transposing done before timestretch, which impacts latency
- return (int)(size * rate + 0.5);
- }
-#endif
- return size;
- }
-
- case SETTING_NOMINAL_OUTPUT_SEQUENCE :
- {
- int size = pTDStretch->getOutputBatchSize();
-
- if (rate > 1.0)
- {
- // transposing done after timestretch, which impacts latency
- return (int)(size / rate + 0.5);
- }
- return size;
- }
-
- case SETTING_INITIAL_LATENCY:
- {
- double latency = pTDStretch->getLatency();
- int latency_tr = pRateTransposer->getLatency();
-
-#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
- if (rate <= 1.0)
- {
- // transposing done before timestretch, which impacts latency
- latency = (latency + latency_tr) * rate;
- }
- else
-#endif
- {
- latency += (double)latency_tr / rate;
- }
-
- return (int)(latency + 0.5);
- }
-
- default :
- return 0;
- }
-}
-
-
-// Clears all the samples in the object's output and internal processing
-// buffers.
-void SoundTouch::clear()
-{
- samplesExpectedOut = 0;
- samplesOutput = 0;
- pRateTransposer->clear();
- pTDStretch->clear();
-}
-
-
-/// Returns number of samples currently unprocessed.
-uint SoundTouch::numUnprocessedSamples() const
-{
- FIFOSamplePipe * psp;
- if (pTDStretch)
- {
- psp = pTDStretch->getInput();
- if (psp)
- {
- return psp->numSamples();
- }
- }
- return 0;
-}
-
-
-/// Output samples from beginning of the sample buffer. Copies requested samples to
-/// output buffer and removes them from the sample buffer. If there are less than
-/// 'numsample' samples in the buffer, returns all that available.
-///
-/// \return Number of samples returned.
-uint SoundTouch::receiveSamples(SAMPLETYPE *output, uint maxSamples)
-{
- uint ret = FIFOProcessor::receiveSamples(output, maxSamples);
- samplesOutput += (long)ret;
- return ret;
-}
-
-
-/// Adjusts book-keeping so that given number of samples are removed from beginning of the
-/// sample buffer without copying them anywhere.
-///
-/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
-/// with 'ptrBegin' function.
-uint SoundTouch::receiveSamples(uint maxSamples)
-{
- uint ret = FIFOProcessor::receiveSamples(maxSamples);
- samplesOutput += (long)ret;
- return ret;
-}
-
-
-/// Get ratio between input and output audio durations, useful for calculating
-/// processed output duration: if you'll process a stream of N samples, then
-/// you can expect to get out N * getInputOutputSampleRatio() samples.
-double SoundTouch::getInputOutputSampleRatio()
-{
- return 1.0 / (tempo * rate);
-}
+//////////////////////////////////////////////////////////////////////////////
+///
+/// SoundTouch - main class for tempo/pitch/rate adjusting routines.
+///
+/// Notes:
+/// - Initialize the SoundTouch object instance by setting up the sound stream
+/// parameters with functions 'setSampleRate' and 'setChannels', then set
+/// desired tempo/pitch/rate settings with the corresponding functions.
+///
+/// - The SoundTouch class behaves like a first-in-first-out pipeline: The
+/// samples that are to be processed are fed into one of the pipe by calling
+/// function 'putSamples', while the ready processed samples can be read
+/// from the other end of the pipeline with function 'receiveSamples'.
+///
+/// - The SoundTouch processing classes require certain sized 'batches' of
+/// samples in order to process the sound. For this reason the classes buffer
+/// incoming samples until there are enough of samples available for
+/// processing, then they carry out the processing step and consequently
+/// make the processed samples available for outputting.
+///
+/// - For the above reason, the processing routines introduce a certain
+/// 'latency' between the input and output, so that the samples input to
+/// SoundTouch may not be immediately available in the output, and neither
+/// the amount of outputtable samples may not immediately be in direct
+/// relationship with the amount of previously input samples.
+///
+/// - The tempo/pitch/rate control parameters can be altered during processing.
+/// Please notice though that they aren't currently protected by semaphores,
+/// so in multi-thread application external semaphore protection may be
+/// required.
+///
+/// - This class utilizes classes 'TDStretch' for tempo change (without modifying
+/// pitch) and 'RateTransposer' for changing the playback rate (that is, both
+/// tempo and pitch in the same ratio) of the sound. The third available control
+/// 'pitch' (change pitch but maintain tempo) is produced by a combination of
+/// combining the two other controls.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "ADM_default.h"
+#include
+#include
+#include
+#include
+
+#include "SoundTouch.h"
+#include "TDStretch.h"
+#include "RateTransposer.h"
+
+using namespace soundtouch;
+
+/// test if two floating point numbers are equal
+#define TEST_FLOAT_EQUAL(a, b) (fabs(a - b) < 1e-10)
+
+
+/// Print library version string for autoconf
+extern "C" void soundtouch_ac_test()
+{
+ printf("SoundTouch Version: %s\n",SOUNDTOUCH_VERSION);
+}
+
+
+SoundTouch::SoundTouch()
+{
+ // Initialize rate transposer and tempo changer instances
+
+ pRateTransposer = new RateTransposer();
+ pTDStretch = TDStretch::newInstance();
+
+ setOutPipe(pTDStretch);
+
+ rate = tempo = 0;
+
+ virtualPitch =
+ virtualRate =
+ virtualTempo = 1.0;
+
+ calcEffectiveRateAndTempo();
+
+ samplesExpectedOut = 0;
+ samplesOutput = 0;
+
+ channels = 0;
+ bSrateSet = false;
+}
+
+
+SoundTouch::~SoundTouch()
+{
+ delete pRateTransposer;
+ delete pTDStretch;
+}
+
+
+/// Get SoundTouch library version string
+const char *SoundTouch::getVersionString()
+{
+ static const char *_version = SOUNDTOUCH_VERSION;
+
+ return _version;
+}
+
+
+/// Get SoundTouch library version Id
+uint SoundTouch::getVersionId()
+{
+ return SOUNDTOUCH_VERSION_ID;
+}
+
+
+// Sets the number of channels, 1 = mono, 2 = stereo
+void SoundTouch::setChannels(uint numChannels)
+{
+ if (!verifyNumberOfChannels(numChannels)) return;
+
+ channels = numChannels;
+ pRateTransposer->setChannels((int)numChannels);
+ pTDStretch->setChannels((int)numChannels);
+}
+
+
+// Sets new rate control value. Normal rate = 1.0, smaller values
+// represent slower rate, larger faster rates.
+void SoundTouch::setRate(double newRate)
+{
+ virtualRate = newRate;
+ calcEffectiveRateAndTempo();
+}
+
+
+// Sets new rate control value as a difference in percents compared
+// to the original rate (-50 .. +100 %)
+void SoundTouch::setRateChange(double newRate)
+{
+ virtualRate = 1.0 + 0.01 * newRate;
+ calcEffectiveRateAndTempo();
+}
+
+
+// Sets new tempo control value. Normal tempo = 1.0, smaller values
+// represent slower tempo, larger faster tempo.
+void SoundTouch::setTempo(double newTempo)
+{
+ virtualTempo = newTempo;
+ calcEffectiveRateAndTempo();
+}
+
+
+// Sets new tempo control value as a difference in percents compared
+// to the original tempo (-50 .. +100 %)
+void SoundTouch::setTempoChange(double newTempo)
+{
+ virtualTempo = 1.0 + 0.01 * newTempo;
+ calcEffectiveRateAndTempo();
+}
+
+
+// Sets new pitch control value. Original pitch = 1.0, smaller values
+// represent lower pitches, larger values higher pitch.
+void SoundTouch::setPitch(double newPitch)
+{
+ virtualPitch = newPitch;
+ calcEffectiveRateAndTempo();
+}
+
+
+// Sets pitch change in octaves compared to the original pitch
+// (-1.00 .. +1.00)
+void SoundTouch::setPitchOctaves(double newPitch)
+{
+ virtualPitch = exp(0.69314718056 * newPitch);
+ calcEffectiveRateAndTempo();
+}
+
+
+// Sets pitch change in semi-tones compared to the original pitch
+// (-12 .. +12)
+void SoundTouch::setPitchSemiTones(int newPitch)
+{
+ setPitchOctaves((double)newPitch / 12.0);
+}
+
+
+void SoundTouch::setPitchSemiTones(double newPitch)
+{
+ setPitchOctaves(newPitch / 12.0);
+}
+
+
+// Calculates 'effective' rate and tempo values from the
+// nominal control values.
+void SoundTouch::calcEffectiveRateAndTempo()
+{
+ double oldTempo = tempo;
+ double oldRate = rate;
+
+ tempo = virtualTempo / virtualPitch;
+ rate = virtualPitch * virtualRate;
+
+ if (!TEST_FLOAT_EQUAL(rate,oldRate)) pRateTransposer->setRate(rate);
+ if (!TEST_FLOAT_EQUAL(tempo, oldTempo)) pTDStretch->setTempo(tempo);
+
+#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
+ if (rate <= 1.0f)
+ {
+ if (output != pTDStretch)
+ {
+ FIFOSamplePipe *tempoOut;
+
+ ADM_assert(output == pRateTransposer);
+ // move samples in the current output buffer to the output of pTDStretch
+ tempoOut = pTDStretch->getOutput();
+ tempoOut->moveSamples(*output);
+ // move samples in pitch transposer's store buffer to tempo changer's input
+ // deprecated : pTDStretch->moveSamples(*pRateTransposer->getStore());
+
+ output = pTDStretch;
+ }
+ }
+ else
+#endif
+ {
+ if (output != pRateTransposer)
+ {
+ FIFOSamplePipe *transOut;
+
+ ADM_assert(output == pTDStretch);
+ // move samples in the current output buffer to the output of pRateTransposer
+ transOut = pRateTransposer->getOutput();
+ transOut->moveSamples(*output);
+ // move samples in tempo changer's input to pitch transposer's input
+ pRateTransposer->moveSamples(*pTDStretch->getInput());
+
+ output = pRateTransposer;
+ }
+ }
+}
+
+
+// Sets sample rate.
+void SoundTouch::setSampleRate(uint srate)
+{
+ // set sample rate, leave other tempo changer parameters as they are.
+ pTDStretch->setParameters((int)srate);
+ bSrateSet = true;
+}
+
+
+// Adds 'numSamples' pcs of samples from the 'samples' memory position into
+// the input of the object.
+void SoundTouch::putSamples(const SAMPLETYPE *samples, uint nSamples)
+{
+ if (bSrateSet == false)
+ {
+ ST_THROW_RT_ERROR("SoundTouch : Sample rate not defined");
+ }
+ else if (channels == 0)
+ {
+ ST_THROW_RT_ERROR("SoundTouch : Number of channels not defined");
+ }
+
+ // accumulate how many samples are expected out from processing, given the current
+ // processing setting
+ samplesExpectedOut += (double)nSamples / ((double)rate * (double)tempo);
+
+#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
+ if (rate <= 1.0f)
+ {
+ // transpose the rate down, output the transposed sound to tempo changer buffer
+ ADM_assert(output == pTDStretch);
+ pRateTransposer->putSamples(samples, nSamples);
+ pTDStretch->moveSamples(*pRateTransposer);
+ }
+ else
+#endif
+ {
+ // evaluate the tempo changer, then transpose the rate up,
+ ADM_assert(output == pRateTransposer);
+ pTDStretch->putSamples(samples, nSamples);
+ pRateTransposer->moveSamples(*pTDStretch);
+ }
+}
+
+
+// Flushes the last samples from the processing pipeline to the output.
+// Clears also the internal processing buffers.
+//
+// Note: This function is meant for extracting the last samples of a sound
+// stream. This function may introduce additional blank samples in the end
+// of the sound stream, and thus it's not recommended to call this function
+// in the middle of a sound stream.
+void SoundTouch::flush()
+{
+ int i;
+ int numStillExpected;
+ SAMPLETYPE *buff = new SAMPLETYPE[128 * channels];
+
+ // how many samples are still expected to output
+ numStillExpected = (int)((long)(samplesExpectedOut + 0.5) - samplesOutput);
+ if (numStillExpected < 0) numStillExpected = 0;
+
+ memset(buff, 0, 128 * channels * sizeof(SAMPLETYPE));
+ // "Push" the last active samples out from the processing pipeline by
+ // feeding blank samples into the processing pipeline until new,
+ // processed samples appear in the output (not however, more than
+ // 24ksamples in any case)
+ for (i = 0; (numStillExpected > (int)numSamples()) && (i < 200); i ++)
+ {
+ putSamples(buff, 128);
+ }
+
+ adjustAmountOfSamples(numStillExpected);
+
+ delete[] buff;
+
+ // Clear input buffers
+ pTDStretch->clearInput();
+ // yet leave the output intouched as that's where the
+ // flushed samples are!
+}
+
+
+// Changes a setting controlling the processing system behaviour. See the
+// 'SETTING_...' defines for available setting ID's.
+bool SoundTouch::setSetting(int settingId, int value)
+{
+ int sampleRate, sequenceMs, seekWindowMs, overlapMs;
+
+ // read current tdstretch routine parameters
+ pTDStretch->getParameters(&sampleRate, &sequenceMs, &seekWindowMs, &overlapMs);
+
+ switch (settingId)
+ {
+ case SETTING_USE_AA_FILTER :
+ // enables / disabless anti-alias filter
+ pRateTransposer->enableAAFilter((value != 0) ? true : false);
+ return true;
+
+ case SETTING_AA_FILTER_LENGTH :
+ // sets anti-alias filter length
+ pRateTransposer->getAAFilter()->setLength(value);
+ return true;
+
+ case SETTING_USE_QUICKSEEK :
+ // enables / disables tempo routine quick seeking algorithm
+ pTDStretch->enableQuickSeek((value != 0) ? true : false);
+ return true;
+
+ case SETTING_SEQUENCE_MS:
+ // change time-stretch sequence duration parameter
+ pTDStretch->setParameters(sampleRate, value, seekWindowMs, overlapMs);
+ return true;
+
+ case SETTING_SEEKWINDOW_MS:
+ // change time-stretch seek window length parameter
+ pTDStretch->setParameters(sampleRate, sequenceMs, value, overlapMs);
+ return true;
+
+ case SETTING_OVERLAP_MS:
+ // change time-stretch overlap length parameter
+ pTDStretch->setParameters(sampleRate, sequenceMs, seekWindowMs, value);
+ return true;
+
+ default :
+ return false;
+ }
+}
+
+
+// Reads a setting controlling the processing system behaviour. See the
+// 'SETTING_...' defines for available setting ID's.
+//
+// Returns the setting value.
+int SoundTouch::getSetting(int settingId) const
+{
+ int temp;
+
+ switch (settingId)
+ {
+ case SETTING_USE_AA_FILTER :
+ return (uint)pRateTransposer->isAAFilterEnabled();
+
+ case SETTING_AA_FILTER_LENGTH :
+ return pRateTransposer->getAAFilter()->getLength();
+
+ case SETTING_USE_QUICKSEEK :
+ return (uint)pTDStretch->isQuickSeekEnabled();
+
+ case SETTING_SEQUENCE_MS:
+ pTDStretch->getParameters(NULL, &temp, NULL, NULL);
+ return temp;
+
+ case SETTING_SEEKWINDOW_MS:
+ pTDStretch->getParameters(NULL, NULL, &temp, NULL);
+ return temp;
+
+ case SETTING_OVERLAP_MS:
+ pTDStretch->getParameters(NULL, NULL, NULL, &temp);
+ return temp;
+
+ case SETTING_NOMINAL_INPUT_SEQUENCE :
+ {
+ int size = pTDStretch->getInputSampleReq();
+
+#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
+ if (rate <= 1.0)
+ {
+ // transposing done before timestretch, which impacts latency
+ return (int)(size * rate + 0.5);
+ }
+#endif
+ return size;
+ }
+
+ case SETTING_NOMINAL_OUTPUT_SEQUENCE :
+ {
+ int size = pTDStretch->getOutputBatchSize();
+
+ if (rate > 1.0)
+ {
+ // transposing done after timestretch, which impacts latency
+ return (int)(size / rate + 0.5);
+ }
+ return size;
+ }
+
+ case SETTING_INITIAL_LATENCY:
+ {
+ double latency = pTDStretch->getLatency();
+ int latency_tr = pRateTransposer->getLatency();
+
+#ifndef SOUNDTOUCH_PREVENT_CLICK_AT_RATE_CROSSOVER
+ if (rate <= 1.0)
+ {
+ // transposing done before timestretch, which impacts latency
+ latency = (latency + latency_tr) * rate;
+ }
+ else
+#endif
+ {
+ latency += (double)latency_tr / rate;
+ }
+
+ return (int)(latency + 0.5);
+ }
+
+ default :
+ return 0;
+ }
+}
+
+
+// Clears all the samples in the object's output and internal processing
+// buffers.
+void SoundTouch::clear()
+{
+ samplesExpectedOut = 0;
+ samplesOutput = 0;
+ pRateTransposer->clear();
+ pTDStretch->clear();
+}
+
+
+/// Returns number of samples currently unprocessed.
+uint SoundTouch::numUnprocessedSamples() const
+{
+ FIFOSamplePipe * psp;
+ if (pTDStretch)
+ {
+ psp = pTDStretch->getInput();
+ if (psp)
+ {
+ return psp->numSamples();
+ }
+ }
+ return 0;
+}
+
+
+/// Output samples from beginning of the sample buffer. Copies requested samples to
+/// output buffer and removes them from the sample buffer. If there are less than
+/// 'numsample' samples in the buffer, returns all that available.
+///
+/// \return Number of samples returned.
+uint SoundTouch::receiveSamples(SAMPLETYPE *output, uint maxSamples)
+{
+ uint ret = FIFOProcessor::receiveSamples(output, maxSamples);
+ samplesOutput += (long)ret;
+ return ret;
+}
+
+
+/// Adjusts book-keeping so that given number of samples are removed from beginning of the
+/// sample buffer without copying them anywhere.
+///
+/// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
+/// with 'ptrBegin' function.
+uint SoundTouch::receiveSamples(uint maxSamples)
+{
+ uint ret = FIFOProcessor::receiveSamples(maxSamples);
+ samplesOutput += (long)ret;
+ return ret;
+}
+
+
+/// Get ratio between input and output audio durations, useful for calculating
+/// processed output duration: if you'll process a stream of N samples, then
+/// you can expect to get out N * getInputOutputSampleRatio() samples.
+double SoundTouch::getInputOutputSampleRatio()
+{
+ return 1.0 / (tempo * rate);
+}
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/SoundTouch.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/SoundTouch.h
index 49b03069fe..850b9c7591 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/SoundTouch.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/SoundTouch.h
@@ -1,348 +1,348 @@
-//////////////////////////////////////////////////////////////////////////////
-///
-/// SoundTouch - main class for tempo/pitch/rate adjusting routines.
-///
-/// Notes:
-/// - Initialize the SoundTouch object instance by setting up the sound stream
-/// parameters with functions 'setSampleRate' and 'setChannels', then set
-/// desired tempo/pitch/rate settings with the corresponding functions.
-///
-/// - The SoundTouch class behaves like a first-in-first-out pipeline: The
-/// samples that are to be processed are fed into one of the pipe by calling
-/// function 'putSamples', while the ready processed samples can be read
-/// from the other end of the pipeline with function 'receiveSamples'.
-///
-/// - The SoundTouch processing classes require certain sized 'batches' of
-/// samples in order to process the sound. For this reason the classes buffer
-/// incoming samples until there are enough of samples available for
-/// processing, then they carry out the processing step and consequently
-/// make the processed samples available for outputting.
-///
-/// - For the above reason, the processing routines introduce a certain
-/// 'latency' between the input and output, so that the samples input to
-/// SoundTouch may not be immediately available in the output, and neither
-/// the amount of outputtable samples may not immediately be in direct
-/// relationship with the amount of previously input samples.
-///
-/// - The tempo/pitch/rate control parameters can be altered during processing.
-/// Please notice though that they aren't currently protected by semaphores,
-/// so in multi-thread application external semaphore protection may be
-/// required.
-///
-/// - This class utilizes classes 'TDStretch' for tempo change (without modifying
-/// pitch) and 'RateTransposer' for changing the playback rate (that is, both
-/// tempo and pitch in the same ratio) of the sound. The third available control
-/// 'pitch' (change pitch but maintain tempo) is produced by a combination of
-/// combining the two other controls.
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef SoundTouch_H
-#define SoundTouch_H
-
-#include "FIFOSamplePipe.h"
-#include "STTypes.h"
-
-namespace soundtouch
-{
-
-/// Soundtouch library version string
-#define SOUNDTOUCH_VERSION "2.3.1"
-
-/// SoundTouch library version id
-#define SOUNDTOUCH_VERSION_ID (20301)
-
-//
-// Available setting IDs for the 'setSetting' & 'get_setting' functions:
-
-/// Enable/disable anti-alias filter in pitch transposer (0 = disable)
-#define SETTING_USE_AA_FILTER 0
-
-/// Pitch transposer anti-alias filter length (8 .. 128 taps, default = 32)
-#define SETTING_AA_FILTER_LENGTH 1
-
-/// Enable/disable quick seeking algorithm in tempo changer routine
-/// (enabling quick seeking lowers CPU utilization but causes a minor sound
-/// quality compromising)
-#define SETTING_USE_QUICKSEEK 2
-
-/// Time-stretch algorithm single processing sequence length in milliseconds. This determines
-/// to how long sequences the original sound is chopped in the time-stretch algorithm.
-/// See "STTypes.h" or README for more information.
-#define SETTING_SEQUENCE_MS 3
-
-/// Time-stretch algorithm seeking window length in milliseconds for algorithm that finds the
-/// best possible overlapping location. This determines from how wide window the algorithm
-/// may look for an optimal joining location when mixing the sound sequences back together.
-/// See "STTypes.h" or README for more information.
-#define SETTING_SEEKWINDOW_MS 4
-
-/// Time-stretch algorithm overlap length in milliseconds. When the chopped sound sequences
-/// are mixed back together, to form a continuous sound stream, this parameter defines over
-/// how long period the two consecutive sequences are let to overlap each other.
-/// See "STTypes.h" or README for more information.
-#define SETTING_OVERLAP_MS 5
-
-
-/// Call "getSetting" with this ID to query processing sequence size in samples.
-/// This value gives approximate value of how many input samples you'll need to
-/// feed into SoundTouch after initial buffering to get out a new batch of
-/// output samples.
-///
-/// This value does not include initial buffering at beginning of a new processing
-/// stream, use SETTING_INITIAL_LATENCY to get the initial buffering size.
-///
-/// Notices:
-/// - This is read-only parameter, i.e. setSetting ignores this parameter
-/// - This parameter value is not constant but change depending on
-/// tempo/pitch/rate/samplerate settings.
-#define SETTING_NOMINAL_INPUT_SEQUENCE 6
-
-
-/// Call "getSetting" with this ID to query nominal average processing output
-/// size in samples. This value tells approcimate value how many output samples
-/// SoundTouch outputs once it does DSP processing run for a batch of input samples.
-///
-/// Notices:
-/// - This is read-only parameter, i.e. setSetting ignores this parameter
-/// - This parameter value is not constant but change depending on
-/// tempo/pitch/rate/samplerate settings.
-#define SETTING_NOMINAL_OUTPUT_SEQUENCE 7
-
-
-/// Call "getSetting" with this ID to query initial processing latency, i.e.
-/// approx. how many samples you'll need to enter to SoundTouch pipeline before
-/// you can expect to get first batch of ready output samples out.
-///
-/// After the first output batch, you can then expect to get approx.
-/// SETTING_NOMINAL_OUTPUT_SEQUENCE ready samples out for every
-/// SETTING_NOMINAL_INPUT_SEQUENCE samples that you enter into SoundTouch.
-///
-/// Example:
-/// processing with parameter -tempo=5
-/// => initial latency = 5509 samples
-/// input sequence = 4167 samples
-/// output sequence = 3969 samples
-///
-/// Accordingly, you can expect to feed in approx. 5509 samples at beginning of
-/// the stream, and then you'll get out the first 3969 samples. After that, for
-/// every approx. 4167 samples that you'll put in, you'll receive again approx.
-/// 3969 samples out.
-///
-/// This also means that average latency during stream processing is
-/// INITIAL_LATENCY-OUTPUT_SEQUENCE/2, in the above example case 5509-3969/2
-/// = 3524 samples
-///
-/// Notices:
-/// - This is read-only parameter, i.e. setSetting ignores this parameter
-/// - This parameter value is not constant but change depending on
-/// tempo/pitch/rate/samplerate settings.
-#define SETTING_INITIAL_LATENCY 8
-
-
-class SoundTouch : public FIFOProcessor
-{
-private:
- /// Rate transposer class instance
- class RateTransposer *pRateTransposer;
-
- /// Time-stretch class instance
- class TDStretch *pTDStretch;
-
- /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
- double virtualRate;
-
- /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
- double virtualTempo;
-
- /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
- double virtualPitch;
-
- /// Flag: Has sample rate been set?
- bool bSrateSet;
-
- /// Accumulator for how many samples in total will be expected as output vs. samples put in,
- /// considering current processing settings.
- double samplesExpectedOut;
-
- /// Accumulator for how many samples in total have been read out from the processing so far
- long samplesOutput;
-
- /// Calculates effective rate & tempo valuescfrom 'virtualRate', 'virtualTempo' and
- /// 'virtualPitch' parameters.
- void calcEffectiveRateAndTempo();
-
-protected :
- /// Number of channels
- uint channels;
-
- /// Effective 'rate' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'
- double rate;
-
- /// Effective 'tempo' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'
- double tempo;
-
-public:
- SoundTouch();
- virtual ~SoundTouch() override;
-
- /// Get SoundTouch library version string
- static const char *getVersionString();
-
- /// Get SoundTouch library version Id
- static uint getVersionId();
-
- /// Sets new rate control value. Normal rate = 1.0, smaller values
- /// represent slower rate, larger faster rates.
- void setRate(double newRate);
-
- /// Sets new tempo control value. Normal tempo = 1.0, smaller values
- /// represent slower tempo, larger faster tempo.
- void setTempo(double newTempo);
-
- /// Sets new rate control value as a difference in percents compared
- /// to the original rate (-50 .. +100 %)
- void setRateChange(double newRate);
-
- /// Sets new tempo control value as a difference in percents compared
- /// to the original tempo (-50 .. +100 %)
- void setTempoChange(double newTempo);
-
- /// Sets new pitch control value. Original pitch = 1.0, smaller values
- /// represent lower pitches, larger values higher pitch.
- void setPitch(double newPitch);
-
- /// Sets pitch change in octaves compared to the original pitch
- /// (-1.00 .. +1.00)
- void setPitchOctaves(double newPitch);
-
- /// Sets pitch change in semi-tones compared to the original pitch
- /// (-12 .. +12)
- void setPitchSemiTones(int newPitch);
- void setPitchSemiTones(double newPitch);
-
- /// Sets the number of channels, 1 = mono, 2 = stereo
- void setChannels(uint numChannels);
-
- /// Sets sample rate.
- void setSampleRate(uint srate);
-
- /// Get ratio between input and output audio durations, useful for calculating
- /// processed output duration: if you'll process a stream of N samples, then
- /// you can expect to get out N * getInputOutputSampleRatio() samples.
- ///
- /// This ratio will give accurate target duration ratio for a full audio track,
- /// given that the the whole track is processed with same processing parameters.
- ///
- /// If this ratio is applied to calculate intermediate offsets inside a processing
- /// stream, then this ratio is approximate and can deviate +- some tens of milliseconds
- /// from ideal offset, yet by end of the audio stream the duration ratio will become
- /// exact.
- ///
- /// Example: if processing with parameters "-tempo=15 -pitch=-3", the function
- /// will return value 0.8695652... Now, if processing an audio stream whose duration
- /// is exactly one million audio samples, then you can expect the processed
- /// output duration be 0.869565 * 1000000 = 869565 samples.
- double getInputOutputSampleRatio();
-
- /// Flushes the last samples from the processing pipeline to the output.
- /// Clears also the internal processing buffers.
- //
- /// Note: This function is meant for extracting the last samples of a sound
- /// stream. This function may introduce additional blank samples in the end
- /// of the sound stream, and thus it's not recommended to call this function
- /// in the middle of a sound stream.
- void flush();
-
- /// Adds 'numSamples' pcs of samples from the 'samples' memory position into
- /// the input of the object. Notice that sample rate _has_to_ be set before
- /// calling this function, otherwise throws a runtime_error exception.
- virtual void putSamples(
- const SAMPLETYPE *samples, ///< Pointer to sample buffer.
- uint numSamples ///< Number of samples in buffer. Notice
- ///< that in case of stereo-sound a single sample
- ///< contains data for both channels.
- ) override;
-
- /// Output samples from beginning of the sample buffer. Copies requested samples to
- /// output buffer and removes them from the sample buffer. If there are less than
- /// 'numsample' samples in the buffer, returns all that available.
- ///
- /// \return Number of samples returned.
- virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
- uint maxSamples ///< How many samples to receive at max.
- ) override;
-
- /// Adjusts book-keeping so that given number of samples are removed from beginning of the
- /// sample buffer without copying them anywhere.
- ///
- /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
- /// with 'ptrBegin' function.
- virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
- ) override;
-
- /// Clears all the samples in the object's output and internal processing
- /// buffers.
- virtual void clear() override;
-
- /// Changes a setting controlling the processing system behaviour. See the
- /// 'SETTING_...' defines for available setting ID's.
- ///
- /// \return 'true' if the setting was successfully changed
- bool setSetting(int settingId, ///< Setting ID number. see SETTING_... defines.
- int value ///< New setting value.
- );
-
- /// Reads a setting controlling the processing system behaviour. See the
- /// 'SETTING_...' defines for available setting ID's.
- ///
- /// \return the setting value.
- int getSetting(int settingId ///< Setting ID number, see SETTING_... defines.
- ) const;
-
- /// Returns number of samples currently unprocessed.
- virtual uint numUnprocessedSamples() const;
-
- /// Return number of channels
- uint numChannels() const
- {
- return channels;
- }
-
- /// Other handy functions that are implemented in the ancestor classes (see
- /// classes 'FIFOProcessor' and 'FIFOSamplePipe')
- ///
- /// - receiveSamples() : Use this function to receive 'ready' processed samples from SoundTouch.
- /// - numSamples() : Get number of 'ready' samples that can be received with
- /// function 'receiveSamples()'
- /// - isEmpty() : Returns nonzero if there aren't any 'ready' samples.
- /// - clear() : Clears all samples from ready/processing buffers.
-};
-
-}
-#endif
+//////////////////////////////////////////////////////////////////////////////
+///
+/// SoundTouch - main class for tempo/pitch/rate adjusting routines.
+///
+/// Notes:
+/// - Initialize the SoundTouch object instance by setting up the sound stream
+/// parameters with functions 'setSampleRate' and 'setChannels', then set
+/// desired tempo/pitch/rate settings with the corresponding functions.
+///
+/// - The SoundTouch class behaves like a first-in-first-out pipeline: The
+/// samples that are to be processed are fed into one of the pipe by calling
+/// function 'putSamples', while the ready processed samples can be read
+/// from the other end of the pipeline with function 'receiveSamples'.
+///
+/// - The SoundTouch processing classes require certain sized 'batches' of
+/// samples in order to process the sound. For this reason the classes buffer
+/// incoming samples until there are enough of samples available for
+/// processing, then they carry out the processing step and consequently
+/// make the processed samples available for outputting.
+///
+/// - For the above reason, the processing routines introduce a certain
+/// 'latency' between the input and output, so that the samples input to
+/// SoundTouch may not be immediately available in the output, and neither
+/// the amount of outputtable samples may not immediately be in direct
+/// relationship with the amount of previously input samples.
+///
+/// - The tempo/pitch/rate control parameters can be altered during processing.
+/// Please notice though that they aren't currently protected by semaphores,
+/// so in multi-thread application external semaphore protection may be
+/// required.
+///
+/// - This class utilizes classes 'TDStretch' for tempo change (without modifying
+/// pitch) and 'RateTransposer' for changing the playback rate (that is, both
+/// tempo and pitch in the same ratio) of the sound. The third available control
+/// 'pitch' (change pitch but maintain tempo) is produced by a combination of
+/// combining the two other controls.
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef SoundTouch_H
+#define SoundTouch_H
+
+#include "FIFOSamplePipe.h"
+#include "STTypes.h"
+
+namespace soundtouch
+{
+
+/// Soundtouch library version string
+#define SOUNDTOUCH_VERSION "2.3.1"
+
+/// SoundTouch library version id
+#define SOUNDTOUCH_VERSION_ID (20301)
+
+//
+// Available setting IDs for the 'setSetting' & 'get_setting' functions:
+
+/// Enable/disable anti-alias filter in pitch transposer (0 = disable)
+#define SETTING_USE_AA_FILTER 0
+
+/// Pitch transposer anti-alias filter length (8 .. 128 taps, default = 32)
+#define SETTING_AA_FILTER_LENGTH 1
+
+/// Enable/disable quick seeking algorithm in tempo changer routine
+/// (enabling quick seeking lowers CPU utilization but causes a minor sound
+/// quality compromising)
+#define SETTING_USE_QUICKSEEK 2
+
+/// Time-stretch algorithm single processing sequence length in milliseconds. This determines
+/// to how long sequences the original sound is chopped in the time-stretch algorithm.
+/// See "STTypes.h" or README for more information.
+#define SETTING_SEQUENCE_MS 3
+
+/// Time-stretch algorithm seeking window length in milliseconds for algorithm that finds the
+/// best possible overlapping location. This determines from how wide window the algorithm
+/// may look for an optimal joining location when mixing the sound sequences back together.
+/// See "STTypes.h" or README for more information.
+#define SETTING_SEEKWINDOW_MS 4
+
+/// Time-stretch algorithm overlap length in milliseconds. When the chopped sound sequences
+/// are mixed back together, to form a continuous sound stream, this parameter defines over
+/// how long period the two consecutive sequences are let to overlap each other.
+/// See "STTypes.h" or README for more information.
+#define SETTING_OVERLAP_MS 5
+
+
+/// Call "getSetting" with this ID to query processing sequence size in samples.
+/// This value gives approximate value of how many input samples you'll need to
+/// feed into SoundTouch after initial buffering to get out a new batch of
+/// output samples.
+///
+/// This value does not include initial buffering at beginning of a new processing
+/// stream, use SETTING_INITIAL_LATENCY to get the initial buffering size.
+///
+/// Notices:
+/// - This is read-only parameter, i.e. setSetting ignores this parameter
+/// - This parameter value is not constant but change depending on
+/// tempo/pitch/rate/samplerate settings.
+#define SETTING_NOMINAL_INPUT_SEQUENCE 6
+
+
+/// Call "getSetting" with this ID to query nominal average processing output
+/// size in samples. This value tells approcimate value how many output samples
+/// SoundTouch outputs once it does DSP processing run for a batch of input samples.
+///
+/// Notices:
+/// - This is read-only parameter, i.e. setSetting ignores this parameter
+/// - This parameter value is not constant but change depending on
+/// tempo/pitch/rate/samplerate settings.
+#define SETTING_NOMINAL_OUTPUT_SEQUENCE 7
+
+
+/// Call "getSetting" with this ID to query initial processing latency, i.e.
+/// approx. how many samples you'll need to enter to SoundTouch pipeline before
+/// you can expect to get first batch of ready output samples out.
+///
+/// After the first output batch, you can then expect to get approx.
+/// SETTING_NOMINAL_OUTPUT_SEQUENCE ready samples out for every
+/// SETTING_NOMINAL_INPUT_SEQUENCE samples that you enter into SoundTouch.
+///
+/// Example:
+/// processing with parameter -tempo=5
+/// => initial latency = 5509 samples
+/// input sequence = 4167 samples
+/// output sequence = 3969 samples
+///
+/// Accordingly, you can expect to feed in approx. 5509 samples at beginning of
+/// the stream, and then you'll get out the first 3969 samples. After that, for
+/// every approx. 4167 samples that you'll put in, you'll receive again approx.
+/// 3969 samples out.
+///
+/// This also means that average latency during stream processing is
+/// INITIAL_LATENCY-OUTPUT_SEQUENCE/2, in the above example case 5509-3969/2
+/// = 3524 samples
+///
+/// Notices:
+/// - This is read-only parameter, i.e. setSetting ignores this parameter
+/// - This parameter value is not constant but change depending on
+/// tempo/pitch/rate/samplerate settings.
+#define SETTING_INITIAL_LATENCY 8
+
+
+class SoundTouch : public FIFOProcessor
+{
+private:
+ /// Rate transposer class instance
+ class RateTransposer *pRateTransposer;
+
+ /// Time-stretch class instance
+ class TDStretch *pTDStretch;
+
+ /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
+ double virtualRate;
+
+ /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
+ double virtualTempo;
+
+ /// Virtual pitch parameter. Effective rate & tempo are calculated from these parameters.
+ double virtualPitch;
+
+ /// Flag: Has sample rate been set?
+ bool bSrateSet;
+
+ /// Accumulator for how many samples in total will be expected as output vs. samples put in,
+ /// considering current processing settings.
+ double samplesExpectedOut;
+
+ /// Accumulator for how many samples in total have been read out from the processing so far
+ long samplesOutput;
+
+ /// Calculates effective rate & tempo valuescfrom 'virtualRate', 'virtualTempo' and
+ /// 'virtualPitch' parameters.
+ void calcEffectiveRateAndTempo();
+
+protected :
+ /// Number of channels
+ uint channels;
+
+ /// Effective 'rate' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'
+ double rate;
+
+ /// Effective 'tempo' value calculated from 'virtualRate', 'virtualTempo' and 'virtualPitch'
+ double tempo;
+
+public:
+ SoundTouch();
+ virtual ~SoundTouch() override;
+
+ /// Get SoundTouch library version string
+ static const char *getVersionString();
+
+ /// Get SoundTouch library version Id
+ static uint getVersionId();
+
+ /// Sets new rate control value. Normal rate = 1.0, smaller values
+ /// represent slower rate, larger faster rates.
+ void setRate(double newRate);
+
+ /// Sets new tempo control value. Normal tempo = 1.0, smaller values
+ /// represent slower tempo, larger faster tempo.
+ void setTempo(double newTempo);
+
+ /// Sets new rate control value as a difference in percents compared
+ /// to the original rate (-50 .. +100 %)
+ void setRateChange(double newRate);
+
+ /// Sets new tempo control value as a difference in percents compared
+ /// to the original tempo (-50 .. +100 %)
+ void setTempoChange(double newTempo);
+
+ /// Sets new pitch control value. Original pitch = 1.0, smaller values
+ /// represent lower pitches, larger values higher pitch.
+ void setPitch(double newPitch);
+
+ /// Sets pitch change in octaves compared to the original pitch
+ /// (-1.00 .. +1.00)
+ void setPitchOctaves(double newPitch);
+
+ /// Sets pitch change in semi-tones compared to the original pitch
+ /// (-12 .. +12)
+ void setPitchSemiTones(int newPitch);
+ void setPitchSemiTones(double newPitch);
+
+ /// Sets the number of channels, 1 = mono, 2 = stereo
+ void setChannels(uint numChannels);
+
+ /// Sets sample rate.
+ void setSampleRate(uint srate);
+
+ /// Get ratio between input and output audio durations, useful for calculating
+ /// processed output duration: if you'll process a stream of N samples, then
+ /// you can expect to get out N * getInputOutputSampleRatio() samples.
+ ///
+ /// This ratio will give accurate target duration ratio for a full audio track,
+ /// given that the the whole track is processed with same processing parameters.
+ ///
+ /// If this ratio is applied to calculate intermediate offsets inside a processing
+ /// stream, then this ratio is approximate and can deviate +- some tens of milliseconds
+ /// from ideal offset, yet by end of the audio stream the duration ratio will become
+ /// exact.
+ ///
+ /// Example: if processing with parameters "-tempo=15 -pitch=-3", the function
+ /// will return value 0.8695652... Now, if processing an audio stream whose duration
+ /// is exactly one million audio samples, then you can expect the processed
+ /// output duration be 0.869565 * 1000000 = 869565 samples.
+ double getInputOutputSampleRatio();
+
+ /// Flushes the last samples from the processing pipeline to the output.
+ /// Clears also the internal processing buffers.
+ //
+ /// Note: This function is meant for extracting the last samples of a sound
+ /// stream. This function may introduce additional blank samples in the end
+ /// of the sound stream, and thus it's not recommended to call this function
+ /// in the middle of a sound stream.
+ void flush();
+
+ /// Adds 'numSamples' pcs of samples from the 'samples' memory position into
+ /// the input of the object. Notice that sample rate _has_to_ be set before
+ /// calling this function, otherwise throws a runtime_error exception.
+ virtual void putSamples(
+ const SAMPLETYPE *samples, ///< Pointer to sample buffer.
+ uint numSamples ///< Number of samples in buffer. Notice
+ ///< that in case of stereo-sound a single sample
+ ///< contains data for both channels.
+ ) override;
+
+ /// Output samples from beginning of the sample buffer. Copies requested samples to
+ /// output buffer and removes them from the sample buffer. If there are less than
+ /// 'numsample' samples in the buffer, returns all that available.
+ ///
+ /// \return Number of samples returned.
+ virtual uint receiveSamples(SAMPLETYPE *output, ///< Buffer where to copy output samples.
+ uint maxSamples ///< How many samples to receive at max.
+ ) override;
+
+ /// Adjusts book-keeping so that given number of samples are removed from beginning of the
+ /// sample buffer without copying them anywhere.
+ ///
+ /// Used to reduce the number of samples in the buffer when accessing the sample buffer directly
+ /// with 'ptrBegin' function.
+ virtual uint receiveSamples(uint maxSamples ///< Remove this many samples from the beginning of pipe.
+ ) override;
+
+ /// Clears all the samples in the object's output and internal processing
+ /// buffers.
+ virtual void clear() override;
+
+ /// Changes a setting controlling the processing system behaviour. See the
+ /// 'SETTING_...' defines for available setting ID's.
+ ///
+ /// \return 'true' if the setting was successfully changed
+ bool setSetting(int settingId, ///< Setting ID number. see SETTING_... defines.
+ int value ///< New setting value.
+ );
+
+ /// Reads a setting controlling the processing system behaviour. See the
+ /// 'SETTING_...' defines for available setting ID's.
+ ///
+ /// \return the setting value.
+ int getSetting(int settingId ///< Setting ID number, see SETTING_... defines.
+ ) const;
+
+ /// Returns number of samples currently unprocessed.
+ virtual uint numUnprocessedSamples() const;
+
+ /// Return number of channels
+ uint numChannels() const
+ {
+ return channels;
+ }
+
+ /// Other handy functions that are implemented in the ancestor classes (see
+ /// classes 'FIFOProcessor' and 'FIFOSamplePipe')
+ ///
+ /// - receiveSamples() : Use this function to receive 'ready' processed samples from SoundTouch.
+ /// - numSamples() : Get number of 'ready' samples that can be received with
+ /// function 'receiveSamples()'
+ /// - isEmpty() : Returns nonzero if there aren't any 'ready' samples.
+ /// - clear() : Clears all samples from ready/processing buffers.
+};
+
+}
+#endif
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/TDStretch.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/TDStretch.cpp
index d394b99bfa..fdfff9a527 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/TDStretch.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/TDStretch.cpp
@@ -1,1101 +1,1101 @@
-///////////////////////////////////////////////////////////////////////////////
-///
-/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
-/// while maintaining the original pitch by using a time domain WSOLA-like
-/// method with several performance-increasing tweaks.
-///
-/// Notes : MMX optimized functions reside in a separate, platform-specific
-/// file, e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'.
-///
-/// This source file contains OpenMP optimizations that allow speeding up the
-/// corss-correlation algorithm by executing it in several threads / CPU cores
-/// in parallel. See the following article link for more detailed discussion
-/// about SoundTouch OpenMP optimizations:
-/// http://www.softwarecoven.com/parallel-computing-in-embedded-mobile-devices
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include
-#include
-#include
-#include
-
-#include "STTypes.h"
-#include "TDStretch.h"
-
-#include "ADM_default.h"
-
-using namespace soundtouch;
-
-#define max(x, y) (((x) > (y)) ? (x) : (y))
-
-/*****************************************************************************
- *
- * Constant definitions
- *
- *****************************************************************************/
-
-// Table for the hierarchical mixing position seeking algorithm
-const short _scanOffsets[5][24]={
- { 124, 186, 248, 310, 372, 434, 496, 558, 620, 682, 744, 806,
- 868, 930, 992, 1054, 1116, 1178, 1240, 1302, 1364, 1426, 1488, 0},
- {-100, -75, -50, -25, 25, 50, 75, 100, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { -20, -15, -10, -5, 5, 10, 15, 20, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { -4, -3, -2, -1, 1, 2, 3, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 121, 114, 97, 114, 98, 105, 108, 32, 104, 99, 117, 111,
- 116, 100, 110, 117, 111, 115, 0, 0, 0, 0, 0, 0}};
-
-/*****************************************************************************
- *
- * Implementation of the class 'TDStretch'
- *
- *****************************************************************************/
-
-
-TDStretch::TDStretch() : FIFOProcessor(&outputBuffer)
-{
- bQuickSeek = false;
- channels = 2;
-
- pMidBuffer = NULL;
- pMidBufferUnaligned = NULL;
- overlapLength = 0;
-
- bAutoSeqSetting = true;
- bAutoSeekSetting = true;
-
- tempo = 1.0f;
- setParameters(44100, DEFAULT_SEQUENCE_MS, DEFAULT_SEEKWINDOW_MS, DEFAULT_OVERLAP_MS);
- setTempo(1.0f);
-
- clear();
-}
-
-
-
-TDStretch::~TDStretch()
-{
- delete[] pMidBufferUnaligned;
-}
-
-
-
-// Sets routine control parameters. These control are certain time constants
-// defining how the sound is stretched to the desired duration.
-//
-// 'sampleRate' = sample rate of the sound
-// 'sequenceMS' = one processing sequence length in milliseconds (default = 82 ms)
-// 'seekwindowMS' = seeking window length for scanning the best overlapping
-// position (default = 28 ms)
-// 'overlapMS' = overlapping length (default = 12 ms)
-
-void TDStretch::setParameters(int aSampleRate, int aSequenceMS,
- int aSeekWindowMS, int aOverlapMS)
-{
- // accept only positive parameter values - if zero or negative, use old values instead
- if (aSampleRate > 0)
- {
- if (aSampleRate > 192000) ST_THROW_RT_ERROR("Error: Excessive samplerate");
- this->sampleRate = aSampleRate;
- }
-
- if (aOverlapMS > 0) this->overlapMs = aOverlapMS;
-
- if (aSequenceMS > 0)
- {
- this->sequenceMs = aSequenceMS;
- bAutoSeqSetting = false;
- }
- else if (aSequenceMS == 0)
- {
- // if zero, use automatic setting
- bAutoSeqSetting = true;
- }
-
- if (aSeekWindowMS > 0)
- {
- this->seekWindowMs = aSeekWindowMS;
- bAutoSeekSetting = false;
- }
- else if (aSeekWindowMS == 0)
- {
- // if zero, use automatic setting
- bAutoSeekSetting = true;
- }
-
- calcSeqParameters();
-
- calculateOverlapLength(overlapMs);
-
- // set tempo to recalculate 'sampleReq'
- setTempo(tempo);
-}
-
-
-
-/// Get routine control parameters, see setParameters() function.
-/// Any of the parameters to this function can be NULL, in such case corresponding parameter
-/// value isn't returned.
-void TDStretch::getParameters(int *pSampleRate, int *pSequenceMs, int *pSeekWindowMs, int *pOverlapMs) const
-{
- if (pSampleRate)
- {
- *pSampleRate = sampleRate;
- }
-
- if (pSequenceMs)
- {
- *pSequenceMs = (bAutoSeqSetting) ? (USE_AUTO_SEQUENCE_LEN) : sequenceMs;
- }
-
- if (pSeekWindowMs)
- {
- *pSeekWindowMs = (bAutoSeekSetting) ? (USE_AUTO_SEEKWINDOW_LEN) : seekWindowMs;
- }
-
- if (pOverlapMs)
- {
- *pOverlapMs = overlapMs;
- }
-}
-
-
-// Overlaps samples in 'midBuffer' with the samples in 'pInput'
-void TDStretch::overlapMono(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput) const
-{
- int i;
- SAMPLETYPE m1, m2;
-
- m1 = (SAMPLETYPE)0;
- m2 = (SAMPLETYPE)overlapLength;
-
- for (i = 0; i < overlapLength ; i ++)
- {
- pOutput[i] = (pInput[i] * m1 + pMidBuffer[i] * m2 ) / overlapLength;
- m1 += 1;
- m2 -= 1;
- }
-}
-
-
-
-void TDStretch::clearMidBuffer()
-{
- memset(pMidBuffer, 0, channels * sizeof(SAMPLETYPE) * overlapLength);
-}
-
-
-void TDStretch::clearInput()
-{
- inputBuffer.clear();
- clearMidBuffer();
- isBeginning = true;
- maxnorm = 0;
- maxnormf = 1e8;
- skipFract = 0;
-}
-
-
-// Clears the sample buffers
-void TDStretch::clear()
-{
- outputBuffer.clear();
- clearInput();
-}
-
-
-
-// Enables/disables the quick position seeking algorithm. Zero to disable, nonzero
-// to enable
-void TDStretch::enableQuickSeek(bool enable)
-{
- bQuickSeek = enable;
-}
-
-
-// Returns nonzero if the quick seeking algorithm is enabled.
-bool TDStretch::isQuickSeekEnabled() const
-{
- return bQuickSeek;
-}
-
-
-// Seeks for the optimal overlap-mixing position.
-int TDStretch::seekBestOverlapPosition(const SAMPLETYPE *refPos)
-{
- if (bQuickSeek)
- {
- return seekBestOverlapPositionQuick(refPos);
- }
- else
- {
- return seekBestOverlapPositionFull(refPos);
- }
-}
-
-
-// Overlaps samples in 'midBuffer' with the samples in 'pInputBuffer' at position
-// of 'ovlPos'.
-inline void TDStretch::overlap(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput, uint ovlPos) const
-{
-#ifndef USE_MULTICH_ALWAYS
- if (channels == 1)
- {
- // mono sound.
- overlapMono(pOutput, pInput + ovlPos);
- }
- else if (channels == 2)
- {
- // stereo sound
- overlapStereo(pOutput, pInput + 2 * ovlPos);
- }
- else
-#endif // USE_MULTICH_ALWAYS
- {
- ADM_assert(channels > 0);
- overlapMulti(pOutput, pInput + channels * ovlPos);
- }
-}
-
-
-// Seeks for the optimal overlap-mixing position. The 'stereo' version of the
-// routine
-//
-// The best position is determined as the position where the two overlapped
-// sample sequences are 'most alike', in terms of the highest cross-correlation
-// value over the overlapping period
-int TDStretch::seekBestOverlapPositionFull(const SAMPLETYPE *refPos)
-{
- int bestOffs;
- double bestCorr;
- int i;
- double norm;
-
- bestCorr = -FLT_MAX;
- bestOffs = 0;
-
- // Scans for the best correlation value by testing each possible position
- // over the permitted range.
- bestCorr = calcCrossCorr(refPos, pMidBuffer, norm);
- bestCorr = (bestCorr + 0.1) * 0.75;
-
- #pragma omp parallel for
- for (i = 1; i < seekLength; i ++)
- {
- double corr;
- // Calculates correlation value for the mixing position corresponding to 'i'
-#if defined(_OPENMP) || defined(ST_SIMD_AVOID_UNALIGNED)
- // in parallel OpenMP mode, can't use norm accumulator version as parallel executor won't
- // iterate the loop in sequential order
- // in SIMD mode, avoid accumulator version to allow avoiding unaligned positions
- corr = calcCrossCorr(refPos + channels * i, pMidBuffer, norm);
-#else
- // In non-parallel version call "calcCrossCorrAccumulate" that is otherwise same
- // as "calcCrossCorr", but saves time by reusing & updating previously stored
- // "norm" value
- corr = calcCrossCorrAccumulate(refPos + channels * i, pMidBuffer, norm);
-#endif
- // heuristic rule to slightly favour values close to mid of the range
- double tmp = (double)(2 * i - seekLength) / (double)seekLength;
- corr = ((corr + 0.1) * (1.0 - 0.25 * tmp * tmp));
-
- // Checks for the highest correlation value
- if (corr > bestCorr)
- {
- // For optimal performance, enter critical section only in case that best value found.
- // in such case repeat 'if' condition as it's possible that parallel execution may have
- // updated the bestCorr value in the mean time
- #pragma omp critical
- if (corr > bestCorr)
- {
- bestCorr = corr;
- bestOffs = i;
- }
- }
- }
-
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- adaptNormalizer();
-#endif
-
- // clear cross correlation routine state if necessary (is so e.g. in MMX routines).
- clearCrossCorrState();
-
- return bestOffs;
-}
-
-
-// Quick seek algorithm for improved runtime-performance: First roughly scans through the
-// correlation area, and then scan surroundings of two best preliminary correlation candidates
-// with improved precision
-//
-// Based on testing:
-// - This algorithm gives on average 99% as good match as the full algorithm
-// - this quick seek algorithm finds the best match on ~90% of cases
-// - on those 10% of cases when this algorithm doesn't find best match,
-// it still finds on average ~90% match vs. the best possible match
-int TDStretch::seekBestOverlapPositionQuick(const SAMPLETYPE *refPos)
-{
-#define _MIN(a, b) (((a) < (b)) ? (a) : (b))
-#define SCANSTEP 16
-#define SCANWIND 8
-
- int bestOffs;
- int i;
- int bestOffs2;
- float bestCorr, corr;
- float bestCorr2;
- double norm;
-
- // note: 'float' types used in this function in case that the platform would need to use software-fp
-
- bestCorr =
- bestCorr2 = -FLT_MAX;
- bestOffs =
- bestOffs2 = SCANWIND;
-
- // Scans for the best correlation value by testing each possible position
- // over the permitted range. Look for two best matches on the first pass to
- // increase possibility of ideal match.
- //
- // Begin from "SCANSTEP" instead of SCANWIND to make the calculation
- // catch the 'middlepoint' of seekLength vector as that's the a-priori
- // expected best match position
- //
- // Roughly:
- // - 15% of cases find best result directly on the first round,
- // - 75% cases find better match on 2nd round around the best match from 1st round
- // - 10% cases find better match on 2nd round around the 2nd-best-match from 1st round
- for (i = SCANSTEP; i < seekLength - SCANWIND - 1; i += SCANSTEP)
- {
- // Calculates correlation value for the mixing position corresponding
- // to 'i'
- corr = (float)calcCrossCorr(refPos + channels*i, pMidBuffer, norm);
- // heuristic rule to slightly favour values close to mid of the seek range
- float tmp = (float)(2 * i - seekLength - 1) / (float)seekLength;
- corr = ((corr + 0.1f) * (1.0f - 0.25f * tmp * tmp));
-
- // Checks for the highest correlation value
- if (corr > bestCorr)
- {
- // found new best match. keep the previous best as 2nd best match
- bestCorr2 = bestCorr;
- bestOffs2 = bestOffs;
- bestCorr = corr;
- bestOffs = i;
- }
- else if (corr > bestCorr2)
- {
- // not new best, but still new 2nd best match
- bestCorr2 = corr;
- bestOffs2 = i;
- }
- }
-
- // Scans surroundings of the found best match with small stepping
- int end = _MIN(bestOffs + SCANWIND + 1, seekLength);
- for (i = bestOffs - SCANWIND; i < end; i++)
- {
- if (i == bestOffs) continue; // this offset already calculated, thus skip
-
- // Calculates correlation value for the mixing position corresponding
- // to 'i'
- corr = (float)calcCrossCorr(refPos + channels*i, pMidBuffer, norm);
- // heuristic rule to slightly favour values close to mid of the range
- float tmp = (float)(2 * i - seekLength - 1) / (float)seekLength;
- corr = ((corr + 0.1f) * (1.0f - 0.25f * tmp * tmp));
-
- // Checks for the highest correlation value
- if (corr > bestCorr)
- {
- bestCorr = corr;
- bestOffs = i;
- }
- }
-
- // Scans surroundings of the 2nd best match with small stepping
- end = _MIN(bestOffs2 + SCANWIND + 1, seekLength);
- for (i = bestOffs2 - SCANWIND; i < end; i++)
- {
- if (i == bestOffs2) continue; // this offset already calculated, thus skip
-
- // Calculates correlation value for the mixing position corresponding
- // to 'i'
- corr = (float)calcCrossCorr(refPos + channels*i, pMidBuffer, norm);
- // heuristic rule to slightly favour values close to mid of the range
- float tmp = (float)(2 * i - seekLength - 1) / (float)seekLength;
- corr = ((corr + 0.1f) * (1.0f - 0.25f * tmp * tmp));
-
- // Checks for the highest correlation value
- if (corr > bestCorr)
- {
- bestCorr = corr;
- bestOffs = i;
- }
- }
-
- // clear cross correlation routine state if necessary (is so e.g. in MMX routines).
- clearCrossCorrState();
-
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
- adaptNormalizer();
-#endif
-
- return bestOffs;
-}
-
-
-
-
-/// For integer algorithm: adapt normalization factor divider with music so that
-/// it'll not be pessimistically restrictive that can degrade quality on quieter sections
-/// yet won't cause integer overflows either
-void TDStretch::adaptNormalizer()
-{
- // Do not adapt normalizer over too silent sequences to avoid averaging filter depleting to
- // too low values during pauses in music
- if ((maxnorm > 1000) || (maxnormf > 40000000))
- {
- //norm averaging filter
- maxnormf = 0.9f * maxnormf + 0.1f * (float)maxnorm;
-
- if ((maxnorm > 800000000) && (overlapDividerBitsNorm < 16))
- {
- // large values, so increase divider
- overlapDividerBitsNorm++;
- if (maxnorm > 1600000000) overlapDividerBitsNorm++; // extra large value => extra increase
- }
- else if ((maxnormf < 1000000) && (overlapDividerBitsNorm > 0))
- {
- // extra small values, decrease divider
- overlapDividerBitsNorm--;
- }
- }
-
- maxnorm = 0;
-}
-
-
-/// clear cross correlation routine state if necessary
-void TDStretch::clearCrossCorrState()
-{
- // default implementation is empty.
-}
-
-
-/// Calculates processing sequence length according to tempo setting
-void TDStretch::calcSeqParameters()
-{
- // Adjust tempo param according to tempo, so that variating processing sequence length is used
- // at various tempo settings, between the given low...top limits
- #define AUTOSEQ_TEMPO_LOW 0.5 // auto setting low tempo range (-50%)
- #define AUTOSEQ_TEMPO_TOP 2.0 // auto setting top tempo range (+100%)
-
- // sequence-ms setting values at above low & top tempo
- #define AUTOSEQ_AT_MIN 90.0
- #define AUTOSEQ_AT_MAX 40.0
- #define AUTOSEQ_K ((AUTOSEQ_AT_MAX - AUTOSEQ_AT_MIN) / (AUTOSEQ_TEMPO_TOP - AUTOSEQ_TEMPO_LOW))
- #define AUTOSEQ_C (AUTOSEQ_AT_MIN - (AUTOSEQ_K) * (AUTOSEQ_TEMPO_LOW))
-
- // seek-window-ms setting values at above low & top tempoq
- #define AUTOSEEK_AT_MIN 20.0
- #define AUTOSEEK_AT_MAX 15.0
- #define AUTOSEEK_K ((AUTOSEEK_AT_MAX - AUTOSEEK_AT_MIN) / (AUTOSEQ_TEMPO_TOP - AUTOSEQ_TEMPO_LOW))
- #define AUTOSEEK_C (AUTOSEEK_AT_MIN - (AUTOSEEK_K) * (AUTOSEQ_TEMPO_LOW))
-
- #define CHECK_LIMITS(x, mi, ma) (((x) < (mi)) ? (mi) : (((x) > (ma)) ? (ma) : (x)))
-
- double seq, seek;
-
- if (bAutoSeqSetting)
- {
- seq = AUTOSEQ_C + AUTOSEQ_K * tempo;
- seq = CHECK_LIMITS(seq, AUTOSEQ_AT_MAX, AUTOSEQ_AT_MIN);
- sequenceMs = (int)(seq + 0.5);
- }
-
- if (bAutoSeekSetting)
- {
- seek = AUTOSEEK_C + AUTOSEEK_K * tempo;
- seek = CHECK_LIMITS(seek, AUTOSEEK_AT_MAX, AUTOSEEK_AT_MIN);
- seekWindowMs = (int)(seek + 0.5);
- }
-
- // Update seek window lengths
- seekWindowLength = (sampleRate * sequenceMs) / 1000;
- if (seekWindowLength < 2 * overlapLength)
- {
- seekWindowLength = 2 * overlapLength;
- }
- seekLength = (sampleRate * seekWindowMs) / 1000;
-}
-
-
-
-// Sets new target tempo. Normal tempo = 'SCALE', smaller values represent slower
-// tempo, larger faster tempo.
-void TDStretch::setTempo(double newTempo)
-{
- int intskip;
-
- tempo = newTempo;
-
- // Calculate new sequence duration
- calcSeqParameters();
-
- // Calculate ideal skip length (according to tempo value)
- nominalSkip = tempo * (seekWindowLength - overlapLength);
- intskip = (int)(nominalSkip + 0.5);
-
- // Calculate how many samples are needed in the 'inputBuffer' to
- // process another batch of samples
- //sampleReq = max(intskip + overlapLength, seekWindowLength) + seekLength / 2;
- sampleReq = max(intskip + overlapLength, seekWindowLength) + seekLength;
-}
-
-
-
-// Sets the number of channels, 1 = mono, 2 = stereo
-void TDStretch::setChannels(int numChannels)
-{
- if (!verifyNumberOfChannels(numChannels) ||
- (channels == numChannels)) return;
-
- channels = numChannels;
- inputBuffer.setChannels(channels);
- outputBuffer.setChannels(channels);
-
- // re-init overlap/buffer
- overlapLength=0;
- setParameters(sampleRate);
-}
-
-
-// nominal tempo, no need for processing, just pass the samples through
-// to outputBuffer
-/*
-void TDStretch::processNominalTempo()
-{
- ADM_assert(tempo == 1.0f);
-
- if (bMidBufferDirty)
- {
- // If there are samples in pMidBuffer waiting for overlapping,
- // do a single sliding overlapping with them in order to prevent a
- // clicking distortion in the output sound
- if (inputBuffer.numSamples() < overlapLength)
- {
- // wait until we've got overlapLength input samples
- return;
- }
- // Mix the samples in the beginning of 'inputBuffer' with the
- // samples in 'midBuffer' using sliding overlapping
- overlap(outputBuffer.ptrEnd(overlapLength), inputBuffer.ptrBegin(), 0);
- outputBuffer.putSamples(overlapLength);
- inputBuffer.receiveSamples(overlapLength);
- clearMidBuffer();
- // now we've caught the nominal sample flow and may switch to
- // bypass mode
- }
-
- // Simply bypass samples from input to output
- outputBuffer.moveSamples(inputBuffer);
-}
-*/
-
-
-// Processes as many processing frames of the samples 'inputBuffer', store
-// the result into 'outputBuffer'
-void TDStretch::processSamples()
-{
- int ovlSkip;
- int offset = 0;
- int temp;
-
- /* Removed this small optimization - can introduce a click to sound when tempo setting
- crosses the nominal value
- if (tempo == 1.0f)
- {
- // tempo not changed from the original, so bypass the processing
- processNominalTempo();
- return;
- }
- */
-
- // Process samples as long as there are enough samples in 'inputBuffer'
- // to form a processing frame.
- while ((int)inputBuffer.numSamples() >= sampleReq)
- {
- if (isBeginning == false)
- {
- // apart from the very beginning of the track,
- // scan for the best overlapping position & do overlap-add
- offset = seekBestOverlapPosition(inputBuffer.ptrBegin());
-
- // Mix the samples in the 'inputBuffer' at position of 'offset' with the
- // samples in 'midBuffer' using sliding overlapping
- // ... first partially overlap with the end of the previous sequence
- // (that's in 'midBuffer')
- overlap(outputBuffer.ptrEnd((uint)overlapLength), inputBuffer.ptrBegin(), (uint)offset);
- outputBuffer.putSamples((uint)overlapLength);
- offset += overlapLength;
- }
- else
- {
- // Adjust processing offset at beginning of track by not perform initial overlapping
- // and compensating that in the 'input buffer skip' calculation
- isBeginning = false;
- int skip = (int)(tempo * overlapLength + 0.5 * seekLength + 0.5);
-
- #ifdef ST_SIMD_AVOID_UNALIGNED
- // in SIMD mode, round the skip amount to value corresponding to aligned memory address
- if (channels == 1)
- {
- skip &= -4;
- }
- else if (channels == 2)
- {
- skip &= -2;
- }
- #endif
- skipFract -= skip;
- if (skipFract <= -nominalSkip)
- {
- skipFract = -nominalSkip;
- }
- }
-
- // ... then copy sequence samples from 'inputBuffer' to output:
-
- // crosscheck that we don't have buffer overflow...
- if ((int)inputBuffer.numSamples() < (offset + seekWindowLength - overlapLength))
- {
- continue; // just in case, shouldn't really happen
- }
-
- // length of sequence
- temp = (seekWindowLength - 2 * overlapLength);
- outputBuffer.putSamples(inputBuffer.ptrBegin() + channels * offset, (uint)temp);
-
- // Copies the end of the current sequence from 'inputBuffer' to
- // 'midBuffer' for being mixed with the beginning of the next
- // processing sequence and so on
- ADM_assert((offset + temp + overlapLength) <= (int)inputBuffer.numSamples());
- memcpy(pMidBuffer, inputBuffer.ptrBegin() + channels * (offset + temp),
- channels * sizeof(SAMPLETYPE) * overlapLength);
-
- // Remove the processed samples from the input buffer. Update
- // the difference between integer & nominal skip step to 'skipFract'
- // in order to prevent the error from accumulating over time.
- skipFract += nominalSkip; // real skip size
- ovlSkip = (int)skipFract; // rounded to integer skip
- skipFract -= ovlSkip; // maintain the fraction part, i.e. real vs. integer skip
- inputBuffer.receiveSamples((uint)ovlSkip);
- }
-}
-
-
-// Adds 'numsamples' pcs of samples from the 'samples' memory position into
-// the input of the object.
-void TDStretch::putSamples(const SAMPLETYPE *samples, uint nSamples)
-{
- // Add the samples into the input buffer
- inputBuffer.putSamples(samples, nSamples);
- // Process the samples in input buffer
- processSamples();
-}
-
-
-
-/// Set new overlap length parameter & reallocate RefMidBuffer if necessary.
-void TDStretch::acceptNewOverlapLength(int newOverlapLength)
-{
- int prevOvl;
-
- ADM_assert(newOverlapLength >= 0);
- prevOvl = overlapLength;
- overlapLength = newOverlapLength;
-
- if (overlapLength > prevOvl)
- {
- delete[] pMidBufferUnaligned;
-
- pMidBufferUnaligned = new SAMPLETYPE[overlapLength * channels + 16 / sizeof(SAMPLETYPE)];
- // ensure that 'pMidBuffer' is aligned to 16 byte boundary for efficiency
- pMidBuffer = (SAMPLETYPE *)SOUNDTOUCH_ALIGN_POINTER_16(pMidBufferUnaligned);
-
- clearMidBuffer();
- }
-}
-
-
-// Operator 'new' is overloaded so that it automatically creates a suitable instance
-// depending on if we've a MMX/SSE/etc-capable CPU available or not.
-void * TDStretch::operator new(size_t s)
-{
- // Notice! don't use "new TDStretch" directly, use "newInstance" to create a new instance instead!
- ST_THROW_RT_ERROR("Error in TDStretch::new: Don't use 'new TDStretch' directly, use 'newInstance' member instead!");
- return newInstance();
-}
-
-
-TDStretch * TDStretch::newInstance()
-{
- // Check if MMX/SSE instruction set extensions supported by CPU
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
- // MMX routines available only with integer sample types
- if (CpuCaps::hasMMX())
- {
- return ::new TDStretchMMX;
- }
- else
-#endif // SOUNDTOUCH_ALLOW_MMX
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
- if (CpuCaps::hasSSE())
- {
- // SSE support
- return ::new TDStretchSSE;
- }
- else
-#endif // SOUNDTOUCH_ALLOW_SSE
-
- {
- // ISA optimizations not supported, use plain C version
- return ::new TDStretch;
- }
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Integer arithmetic specific algorithm implementations.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifdef SOUNDTOUCH_INTEGER_SAMPLES
-
-// Overlaps samples in 'midBuffer' with the samples in 'input'. The 'Stereo'
-// version of the routine.
-void TDStretch::overlapStereo(short *poutput, const short *input) const
-{
- int i;
- short temp;
- int cnt2;
-
- for (i = 0; i < overlapLength ; i ++)
- {
- temp = (short)(overlapLength - i);
- cnt2 = 2 * i;
- poutput[cnt2] = (input[cnt2] * i + pMidBuffer[cnt2] * temp ) / overlapLength;
- poutput[cnt2 + 1] = (input[cnt2 + 1] * i + pMidBuffer[cnt2 + 1] * temp ) / overlapLength;
- }
-}
-
-
-// Overlaps samples in 'midBuffer' with the samples in 'input'. The 'Multi'
-// version of the routine.
-void TDStretch::overlapMulti(short *poutput, const short *input) const
-{
- short m1;
- int i = 0;
-
- for (m1 = 0; m1 < overlapLength; m1 ++)
- {
- short m2 = (short)(overlapLength - m1);
- for (int c = 0; c < channels; c ++)
- {
- poutput[i] = (input[i] * m1 + pMidBuffer[i] * m2) / overlapLength;
- i++;
- }
- }
-}
-
-// Calculates the x having the closest 2^x value for the given value
-static int _getClosest2Power(double value)
-{
- return (int)(log(value) / log(2.0) + 0.5);
-}
-
-
-/// Calculates overlap period length in samples.
-/// Integer version rounds overlap length to closest power of 2
-/// for a divide scaling operation.
-void TDStretch::calculateOverlapLength(int aoverlapMs)
-{
- int newOvl;
-
- ADM_assert(aoverlapMs >= 0);
-
- // calculate overlap length so that it's power of 2 - thus it's easy to do
- // integer division by right-shifting. Term "-1" at end is to account for
- // the extra most significatnt bit left unused in result by signed multiplication
- overlapDividerBitsPure = _getClosest2Power((sampleRate * aoverlapMs) / 1000.0) - 1;
- if (overlapDividerBitsPure > 9) overlapDividerBitsPure = 9;
- if (overlapDividerBitsPure < 3) overlapDividerBitsPure = 3;
- newOvl = (int)pow(2.0, (int)overlapDividerBitsPure + 1); // +1 => account for -1 above
-
- acceptNewOverlapLength(newOvl);
-
- overlapDividerBitsNorm = overlapDividerBitsPure;
-
- // calculate sloping divider so that crosscorrelation operation won't
- // overflow 32-bit register. Max. sum of the crosscorrelation sum without
- // divider would be 2^30*(N^3-N)/3, where N = overlap length
- slopingDivider = (newOvl * newOvl - 1) / 3;
-}
-
-
-double TDStretch::calcCrossCorr(const short *mixingPos, const short *compare, double &norm)
-{
- long corr;
- unsigned long lnorm;
- int i;
-
- #ifdef ST_SIMD_AVOID_UNALIGNED
- // in SIMD mode skip 'mixingPos' positions that aren't aligned to 16-byte boundary
- if (((ulongptr)mixingPos) & 15) return -1e50;
- #endif
-
- // hint compiler autovectorization that loop length is divisible by 8
- int ilength = (channels * overlapLength) & -8;
-
- corr = lnorm = 0;
- // Same routine for stereo and mono
- for (i = 0; i < ilength; i += 2)
- {
- corr += (mixingPos[i] * compare[i] +
- mixingPos[i + 1] * compare[i + 1]) >> overlapDividerBitsNorm;
- lnorm += (mixingPos[i] * mixingPos[i] +
- mixingPos[i + 1] * mixingPos[i + 1]) >> overlapDividerBitsNorm;
- // do intermediate scalings to avoid integer overflow
- }
-
- if (lnorm > maxnorm)
- {
- // modify 'maxnorm' inside critical section to avoid multi-access conflict if in OpenMP mode
- #pragma omp critical
- if (lnorm > maxnorm)
- {
- maxnorm = lnorm;
- }
- }
- // Normalize result by dividing by sqrt(norm) - this step is easiest
- // done using floating point operation
- norm = (double)lnorm;
- return (double)corr / sqrt((norm < 1e-9) ? 1.0 : norm);
-}
-
-
-/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
-double TDStretch::calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm)
-{
- long corr;
- long lnorm;
- int i;
-
- // hint compiler autovectorization that loop length is divisible by 8
- int ilength = (channels * overlapLength) & -8;
-
- // cancel first normalizer tap from previous round
- lnorm = 0;
- for (i = 1; i <= channels; i ++)
- {
- lnorm -= (mixingPos[-i] * mixingPos[-i]) >> overlapDividerBitsNorm;
- }
-
- corr = 0;
- // Same routine for stereo and mono.
- for (i = 0; i < ilength; i += 2)
- {
- corr += (mixingPos[i] * compare[i] +
- mixingPos[i + 1] * compare[i + 1]) >> overlapDividerBitsNorm;
- }
-
- // update normalizer with last samples of this round
- for (int j = 0; j < channels; j ++)
- {
- i --;
- lnorm += (mixingPos[i] * mixingPos[i]) >> overlapDividerBitsNorm;
- }
-
- norm += (double)lnorm;
- if (norm > maxnorm)
- {
- maxnorm = (unsigned long)norm;
- }
-
- // Normalize result by dividing by sqrt(norm) - this step is easiest
- // done using floating point operation
- return (double)corr / sqrt((norm < 1e-9) ? 1.0 : norm);
-}
-
-#endif // SOUNDTOUCH_INTEGER_SAMPLES
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Floating point arithmetic specific algorithm implementations.
-//
-
-#ifdef SOUNDTOUCH_FLOAT_SAMPLES
-
-// Overlaps samples in 'midBuffer' with the samples in 'pInput'
-void TDStretch::overlapStereo(float *pOutput, const float *pInput) const
-{
- int i;
- float fScale;
- float f1;
- float f2;
-
- fScale = 1.0f / (float)overlapLength;
-
- f1 = 0;
- f2 = 1.0f;
-
- for (i = 0; i < 2 * (int)overlapLength ; i += 2)
- {
- pOutput[i + 0] = pInput[i + 0] * f1 + pMidBuffer[i + 0] * f2;
- pOutput[i + 1] = pInput[i + 1] * f1 + pMidBuffer[i + 1] * f2;
-
- f1 += fScale;
- f2 -= fScale;
- }
-}
-
-
-// Overlaps samples in 'midBuffer' with the samples in 'input'.
-void TDStretch::overlapMulti(float *pOutput, const float *pInput) const
-{
- int i;
- float fScale;
- float f1;
- float f2;
-
- fScale = 1.0f / (float)overlapLength;
-
- f1 = 0;
- f2 = 1.0f;
-
- i=0;
- for (int i2 = 0; i2 < overlapLength; i2 ++)
- {
- // note: Could optimize this slightly by taking into account that always channels > 2
- for (int c = 0; c < channels; c ++)
- {
- pOutput[i] = pInput[i] * f1 + pMidBuffer[i] * f2;
- i++;
- }
- f1 += fScale;
- f2 -= fScale;
- }
-}
-
-
-/// Calculates overlapInMsec period length in samples.
-void TDStretch::calculateOverlapLength(int overlapInMsec)
-{
- int newOvl;
-
- ADM_assert(overlapInMsec >= 0);
- newOvl = (sampleRate * overlapInMsec) / 1000;
- if (newOvl < 16) newOvl = 16;
-
- // must be divisible by 8
- newOvl -= newOvl % 8;
-
- acceptNewOverlapLength(newOvl);
-}
-
-
-/// Calculate cross-correlation
-double TDStretch::calcCrossCorr(const float *mixingPos, const float *compare, double &anorm)
-{
- float corr;
- float norm;
- int i;
-
- #ifdef ST_SIMD_AVOID_UNALIGNED
- // in SIMD mode skip 'mixingPos' positions that aren't aligned to 16-byte boundary
- if (((ulongptr)mixingPos) & 15) return -1e50;
- #endif
-
- // hint compiler autovectorization that loop length is divisible by 8
- int ilength = (channels * overlapLength) & -8;
-
- corr = norm = 0;
- // Same routine for stereo and mono
- for (i = 0; i < ilength; i ++)
- {
- corr += mixingPos[i] * compare[i];
- norm += mixingPos[i] * mixingPos[i];
- }
-
- anorm = norm;
- return corr / sqrt((norm < 1e-9 ? 1.0 : norm));
-}
-
-
-/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
-double TDStretch::calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm)
-{
- float corr;
- int i;
-
- corr = 0;
-
- // cancel first normalizer tap from previous round
- for (i = 1; i <= channels; i ++)
- {
- norm -= mixingPos[-i] * mixingPos[-i];
- }
-
- // hint compiler autovectorization that loop length is divisible by 8
- int ilength = (channels * overlapLength) & -8;
-
- // Same routine for stereo and mono
- for (i = 0; i < ilength; i ++)
- {
- corr += mixingPos[i] * compare[i];
- }
-
- // update normalizer with last samples of this round
- for (int j = 0; j < channels; j ++)
- {
- i --;
- norm += mixingPos[i] * mixingPos[i];
- }
-
- return corr / sqrt((norm < 1e-9 ? 1.0 : norm));
-}
-
-
-#endif // SOUNDTOUCH_FLOAT_SAMPLES
+///////////////////////////////////////////////////////////////////////////////
+///
+/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
+/// while maintaining the original pitch by using a time domain WSOLA-like
+/// method with several performance-increasing tweaks.
+///
+/// Notes : MMX optimized functions reside in a separate, platform-specific
+/// file, e.g. 'mmx_win.cpp' or 'mmx_gcc.cpp'.
+///
+/// This source file contains OpenMP optimizations that allow speeding up the
+/// corss-correlation algorithm by executing it in several threads / CPU cores
+/// in parallel. See the following article link for more detailed discussion
+/// about SoundTouch OpenMP optimizations:
+/// http://www.softwarecoven.com/parallel-computing-in-embedded-mobile-devices
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include
+#include
+#include
+#include
+
+#include "STTypes.h"
+#include "TDStretch.h"
+
+#include "ADM_default.h"
+
+using namespace soundtouch;
+
+#define max(x, y) (((x) > (y)) ? (x) : (y))
+
+/*****************************************************************************
+ *
+ * Constant definitions
+ *
+ *****************************************************************************/
+
+// Table for the hierarchical mixing position seeking algorithm
+const short _scanOffsets[5][24]={
+ { 124, 186, 248, 310, 372, 434, 496, 558, 620, 682, 744, 806,
+ 868, 930, 992, 1054, 1116, 1178, 1240, 1302, 1364, 1426, 1488, 0},
+ {-100, -75, -50, -25, 25, 50, 75, 100, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { -20, -15, -10, -5, 5, 10, 15, 20, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { -4, -3, -2, -1, 1, 2, 3, 4, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 121, 114, 97, 114, 98, 105, 108, 32, 104, 99, 117, 111,
+ 116, 100, 110, 117, 111, 115, 0, 0, 0, 0, 0, 0}};
+
+/*****************************************************************************
+ *
+ * Implementation of the class 'TDStretch'
+ *
+ *****************************************************************************/
+
+
+TDStretch::TDStretch() : FIFOProcessor(&outputBuffer)
+{
+ bQuickSeek = false;
+ channels = 2;
+
+ pMidBuffer = NULL;
+ pMidBufferUnaligned = NULL;
+ overlapLength = 0;
+
+ bAutoSeqSetting = true;
+ bAutoSeekSetting = true;
+
+ tempo = 1.0f;
+ setParameters(44100, DEFAULT_SEQUENCE_MS, DEFAULT_SEEKWINDOW_MS, DEFAULT_OVERLAP_MS);
+ setTempo(1.0f);
+
+ clear();
+}
+
+
+
+TDStretch::~TDStretch()
+{
+ delete[] pMidBufferUnaligned;
+}
+
+
+
+// Sets routine control parameters. These control are certain time constants
+// defining how the sound is stretched to the desired duration.
+//
+// 'sampleRate' = sample rate of the sound
+// 'sequenceMS' = one processing sequence length in milliseconds (default = 82 ms)
+// 'seekwindowMS' = seeking window length for scanning the best overlapping
+// position (default = 28 ms)
+// 'overlapMS' = overlapping length (default = 12 ms)
+
+void TDStretch::setParameters(int aSampleRate, int aSequenceMS,
+ int aSeekWindowMS, int aOverlapMS)
+{
+ // accept only positive parameter values - if zero or negative, use old values instead
+ if (aSampleRate > 0)
+ {
+ if (aSampleRate > 192000) ST_THROW_RT_ERROR("Error: Excessive samplerate");
+ this->sampleRate = aSampleRate;
+ }
+
+ if (aOverlapMS > 0) this->overlapMs = aOverlapMS;
+
+ if (aSequenceMS > 0)
+ {
+ this->sequenceMs = aSequenceMS;
+ bAutoSeqSetting = false;
+ }
+ else if (aSequenceMS == 0)
+ {
+ // if zero, use automatic setting
+ bAutoSeqSetting = true;
+ }
+
+ if (aSeekWindowMS > 0)
+ {
+ this->seekWindowMs = aSeekWindowMS;
+ bAutoSeekSetting = false;
+ }
+ else if (aSeekWindowMS == 0)
+ {
+ // if zero, use automatic setting
+ bAutoSeekSetting = true;
+ }
+
+ calcSeqParameters();
+
+ calculateOverlapLength(overlapMs);
+
+ // set tempo to recalculate 'sampleReq'
+ setTempo(tempo);
+}
+
+
+
+/// Get routine control parameters, see setParameters() function.
+/// Any of the parameters to this function can be NULL, in such case corresponding parameter
+/// value isn't returned.
+void TDStretch::getParameters(int *pSampleRate, int *pSequenceMs, int *pSeekWindowMs, int *pOverlapMs) const
+{
+ if (pSampleRate)
+ {
+ *pSampleRate = sampleRate;
+ }
+
+ if (pSequenceMs)
+ {
+ *pSequenceMs = (bAutoSeqSetting) ? (USE_AUTO_SEQUENCE_LEN) : sequenceMs;
+ }
+
+ if (pSeekWindowMs)
+ {
+ *pSeekWindowMs = (bAutoSeekSetting) ? (USE_AUTO_SEEKWINDOW_LEN) : seekWindowMs;
+ }
+
+ if (pOverlapMs)
+ {
+ *pOverlapMs = overlapMs;
+ }
+}
+
+
+// Overlaps samples in 'midBuffer' with the samples in 'pInput'
+void TDStretch::overlapMono(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput) const
+{
+ int i;
+ SAMPLETYPE m1, m2;
+
+ m1 = (SAMPLETYPE)0;
+ m2 = (SAMPLETYPE)overlapLength;
+
+ for (i = 0; i < overlapLength ; i ++)
+ {
+ pOutput[i] = (pInput[i] * m1 + pMidBuffer[i] * m2 ) / overlapLength;
+ m1 += 1;
+ m2 -= 1;
+ }
+}
+
+
+
+void TDStretch::clearMidBuffer()
+{
+ memset(pMidBuffer, 0, channels * sizeof(SAMPLETYPE) * overlapLength);
+}
+
+
+void TDStretch::clearInput()
+{
+ inputBuffer.clear();
+ clearMidBuffer();
+ isBeginning = true;
+ maxnorm = 0;
+ maxnormf = 1e8;
+ skipFract = 0;
+}
+
+
+// Clears the sample buffers
+void TDStretch::clear()
+{
+ outputBuffer.clear();
+ clearInput();
+}
+
+
+
+// Enables/disables the quick position seeking algorithm. Zero to disable, nonzero
+// to enable
+void TDStretch::enableQuickSeek(bool enable)
+{
+ bQuickSeek = enable;
+}
+
+
+// Returns nonzero if the quick seeking algorithm is enabled.
+bool TDStretch::isQuickSeekEnabled() const
+{
+ return bQuickSeek;
+}
+
+
+// Seeks for the optimal overlap-mixing position.
+int TDStretch::seekBestOverlapPosition(const SAMPLETYPE *refPos)
+{
+ if (bQuickSeek)
+ {
+ return seekBestOverlapPositionQuick(refPos);
+ }
+ else
+ {
+ return seekBestOverlapPositionFull(refPos);
+ }
+}
+
+
+// Overlaps samples in 'midBuffer' with the samples in 'pInputBuffer' at position
+// of 'ovlPos'.
+inline void TDStretch::overlap(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput, uint ovlPos) const
+{
+#ifndef USE_MULTICH_ALWAYS
+ if (channels == 1)
+ {
+ // mono sound.
+ overlapMono(pOutput, pInput + ovlPos);
+ }
+ else if (channels == 2)
+ {
+ // stereo sound
+ overlapStereo(pOutput, pInput + 2 * ovlPos);
+ }
+ else
+#endif // USE_MULTICH_ALWAYS
+ {
+ ADM_assert(channels > 0);
+ overlapMulti(pOutput, pInput + channels * ovlPos);
+ }
+}
+
+
+// Seeks for the optimal overlap-mixing position. The 'stereo' version of the
+// routine
+//
+// The best position is determined as the position where the two overlapped
+// sample sequences are 'most alike', in terms of the highest cross-correlation
+// value over the overlapping period
+int TDStretch::seekBestOverlapPositionFull(const SAMPLETYPE *refPos)
+{
+ int bestOffs;
+ double bestCorr;
+ int i;
+ double norm;
+
+ bestCorr = -FLT_MAX;
+ bestOffs = 0;
+
+ // Scans for the best correlation value by testing each possible position
+ // over the permitted range.
+ bestCorr = calcCrossCorr(refPos, pMidBuffer, norm);
+ bestCorr = (bestCorr + 0.1) * 0.75;
+
+ #pragma omp parallel for
+ for (i = 1; i < seekLength; i ++)
+ {
+ double corr;
+ // Calculates correlation value for the mixing position corresponding to 'i'
+#if defined(_OPENMP) || defined(ST_SIMD_AVOID_UNALIGNED)
+ // in parallel OpenMP mode, can't use norm accumulator version as parallel executor won't
+ // iterate the loop in sequential order
+ // in SIMD mode, avoid accumulator version to allow avoiding unaligned positions
+ corr = calcCrossCorr(refPos + channels * i, pMidBuffer, norm);
+#else
+ // In non-parallel version call "calcCrossCorrAccumulate" that is otherwise same
+ // as "calcCrossCorr", but saves time by reusing & updating previously stored
+ // "norm" value
+ corr = calcCrossCorrAccumulate(refPos + channels * i, pMidBuffer, norm);
+#endif
+ // heuristic rule to slightly favour values close to mid of the range
+ double tmp = (double)(2 * i - seekLength) / (double)seekLength;
+ corr = ((corr + 0.1) * (1.0 - 0.25 * tmp * tmp));
+
+ // Checks for the highest correlation value
+ if (corr > bestCorr)
+ {
+ // For optimal performance, enter critical section only in case that best value found.
+ // in such case repeat 'if' condition as it's possible that parallel execution may have
+ // updated the bestCorr value in the mean time
+ #pragma omp critical
+ if (corr > bestCorr)
+ {
+ bestCorr = corr;
+ bestOffs = i;
+ }
+ }
+ }
+
+#ifdef SOUNDTOUCH_INTEGER_SAMPLES
+ adaptNormalizer();
+#endif
+
+ // clear cross correlation routine state if necessary (is so e.g. in MMX routines).
+ clearCrossCorrState();
+
+ return bestOffs;
+}
+
+
+// Quick seek algorithm for improved runtime-performance: First roughly scans through the
+// correlation area, and then scan surroundings of two best preliminary correlation candidates
+// with improved precision
+//
+// Based on testing:
+// - This algorithm gives on average 99% as good match as the full algorithm
+// - this quick seek algorithm finds the best match on ~90% of cases
+// - on those 10% of cases when this algorithm doesn't find best match,
+// it still finds on average ~90% match vs. the best possible match
+int TDStretch::seekBestOverlapPositionQuick(const SAMPLETYPE *refPos)
+{
+#define _MIN(a, b) (((a) < (b)) ? (a) : (b))
+#define SCANSTEP 16
+#define SCANWIND 8
+
+ int bestOffs;
+ int i;
+ int bestOffs2;
+ float bestCorr, corr;
+ float bestCorr2;
+ double norm;
+
+ // note: 'float' types used in this function in case that the platform would need to use software-fp
+
+ bestCorr =
+ bestCorr2 = -FLT_MAX;
+ bestOffs =
+ bestOffs2 = SCANWIND;
+
+ // Scans for the best correlation value by testing each possible position
+ // over the permitted range. Look for two best matches on the first pass to
+ // increase possibility of ideal match.
+ //
+ // Begin from "SCANSTEP" instead of SCANWIND to make the calculation
+ // catch the 'middlepoint' of seekLength vector as that's the a-priori
+ // expected best match position
+ //
+ // Roughly:
+ // - 15% of cases find best result directly on the first round,
+ // - 75% cases find better match on 2nd round around the best match from 1st round
+ // - 10% cases find better match on 2nd round around the 2nd-best-match from 1st round
+ for (i = SCANSTEP; i < seekLength - SCANWIND - 1; i += SCANSTEP)
+ {
+ // Calculates correlation value for the mixing position corresponding
+ // to 'i'
+ corr = (float)calcCrossCorr(refPos + channels*i, pMidBuffer, norm);
+ // heuristic rule to slightly favour values close to mid of the seek range
+ float tmp = (float)(2 * i - seekLength - 1) / (float)seekLength;
+ corr = ((corr + 0.1f) * (1.0f - 0.25f * tmp * tmp));
+
+ // Checks for the highest correlation value
+ if (corr > bestCorr)
+ {
+ // found new best match. keep the previous best as 2nd best match
+ bestCorr2 = bestCorr;
+ bestOffs2 = bestOffs;
+ bestCorr = corr;
+ bestOffs = i;
+ }
+ else if (corr > bestCorr2)
+ {
+ // not new best, but still new 2nd best match
+ bestCorr2 = corr;
+ bestOffs2 = i;
+ }
+ }
+
+ // Scans surroundings of the found best match with small stepping
+ int end = _MIN(bestOffs + SCANWIND + 1, seekLength);
+ for (i = bestOffs - SCANWIND; i < end; i++)
+ {
+ if (i == bestOffs) continue; // this offset already calculated, thus skip
+
+ // Calculates correlation value for the mixing position corresponding
+ // to 'i'
+ corr = (float)calcCrossCorr(refPos + channels*i, pMidBuffer, norm);
+ // heuristic rule to slightly favour values close to mid of the range
+ float tmp = (float)(2 * i - seekLength - 1) / (float)seekLength;
+ corr = ((corr + 0.1f) * (1.0f - 0.25f * tmp * tmp));
+
+ // Checks for the highest correlation value
+ if (corr > bestCorr)
+ {
+ bestCorr = corr;
+ bestOffs = i;
+ }
+ }
+
+ // Scans surroundings of the 2nd best match with small stepping
+ end = _MIN(bestOffs2 + SCANWIND + 1, seekLength);
+ for (i = bestOffs2 - SCANWIND; i < end; i++)
+ {
+ if (i == bestOffs2) continue; // this offset already calculated, thus skip
+
+ // Calculates correlation value for the mixing position corresponding
+ // to 'i'
+ corr = (float)calcCrossCorr(refPos + channels*i, pMidBuffer, norm);
+ // heuristic rule to slightly favour values close to mid of the range
+ float tmp = (float)(2 * i - seekLength - 1) / (float)seekLength;
+ corr = ((corr + 0.1f) * (1.0f - 0.25f * tmp * tmp));
+
+ // Checks for the highest correlation value
+ if (corr > bestCorr)
+ {
+ bestCorr = corr;
+ bestOffs = i;
+ }
+ }
+
+ // clear cross correlation routine state if necessary (is so e.g. in MMX routines).
+ clearCrossCorrState();
+
+#ifdef SOUNDTOUCH_INTEGER_SAMPLES
+ adaptNormalizer();
+#endif
+
+ return bestOffs;
+}
+
+
+
+
+/// For integer algorithm: adapt normalization factor divider with music so that
+/// it'll not be pessimistically restrictive that can degrade quality on quieter sections
+/// yet won't cause integer overflows either
+void TDStretch::adaptNormalizer()
+{
+ // Do not adapt normalizer over too silent sequences to avoid averaging filter depleting to
+ // too low values during pauses in music
+ if ((maxnorm > 1000) || (maxnormf > 40000000))
+ {
+ //norm averaging filter
+ maxnormf = 0.9f * maxnormf + 0.1f * (float)maxnorm;
+
+ if ((maxnorm > 800000000) && (overlapDividerBitsNorm < 16))
+ {
+ // large values, so increase divider
+ overlapDividerBitsNorm++;
+ if (maxnorm > 1600000000) overlapDividerBitsNorm++; // extra large value => extra increase
+ }
+ else if ((maxnormf < 1000000) && (overlapDividerBitsNorm > 0))
+ {
+ // extra small values, decrease divider
+ overlapDividerBitsNorm--;
+ }
+ }
+
+ maxnorm = 0;
+}
+
+
+/// clear cross correlation routine state if necessary
+void TDStretch::clearCrossCorrState()
+{
+ // default implementation is empty.
+}
+
+
+/// Calculates processing sequence length according to tempo setting
+void TDStretch::calcSeqParameters()
+{
+ // Adjust tempo param according to tempo, so that variating processing sequence length is used
+ // at various tempo settings, between the given low...top limits
+ #define AUTOSEQ_TEMPO_LOW 0.5 // auto setting low tempo range (-50%)
+ #define AUTOSEQ_TEMPO_TOP 2.0 // auto setting top tempo range (+100%)
+
+ // sequence-ms setting values at above low & top tempo
+ #define AUTOSEQ_AT_MIN 90.0
+ #define AUTOSEQ_AT_MAX 40.0
+ #define AUTOSEQ_K ((AUTOSEQ_AT_MAX - AUTOSEQ_AT_MIN) / (AUTOSEQ_TEMPO_TOP - AUTOSEQ_TEMPO_LOW))
+ #define AUTOSEQ_C (AUTOSEQ_AT_MIN - (AUTOSEQ_K) * (AUTOSEQ_TEMPO_LOW))
+
+ // seek-window-ms setting values at above low & top tempoq
+ #define AUTOSEEK_AT_MIN 20.0
+ #define AUTOSEEK_AT_MAX 15.0
+ #define AUTOSEEK_K ((AUTOSEEK_AT_MAX - AUTOSEEK_AT_MIN) / (AUTOSEQ_TEMPO_TOP - AUTOSEQ_TEMPO_LOW))
+ #define AUTOSEEK_C (AUTOSEEK_AT_MIN - (AUTOSEEK_K) * (AUTOSEQ_TEMPO_LOW))
+
+ #define CHECK_LIMITS(x, mi, ma) (((x) < (mi)) ? (mi) : (((x) > (ma)) ? (ma) : (x)))
+
+ double seq, seek;
+
+ if (bAutoSeqSetting)
+ {
+ seq = AUTOSEQ_C + AUTOSEQ_K * tempo;
+ seq = CHECK_LIMITS(seq, AUTOSEQ_AT_MAX, AUTOSEQ_AT_MIN);
+ sequenceMs = (int)(seq + 0.5);
+ }
+
+ if (bAutoSeekSetting)
+ {
+ seek = AUTOSEEK_C + AUTOSEEK_K * tempo;
+ seek = CHECK_LIMITS(seek, AUTOSEEK_AT_MAX, AUTOSEEK_AT_MIN);
+ seekWindowMs = (int)(seek + 0.5);
+ }
+
+ // Update seek window lengths
+ seekWindowLength = (sampleRate * sequenceMs) / 1000;
+ if (seekWindowLength < 2 * overlapLength)
+ {
+ seekWindowLength = 2 * overlapLength;
+ }
+ seekLength = (sampleRate * seekWindowMs) / 1000;
+}
+
+
+
+// Sets new target tempo. Normal tempo = 'SCALE', smaller values represent slower
+// tempo, larger faster tempo.
+void TDStretch::setTempo(double newTempo)
+{
+ int intskip;
+
+ tempo = newTempo;
+
+ // Calculate new sequence duration
+ calcSeqParameters();
+
+ // Calculate ideal skip length (according to tempo value)
+ nominalSkip = tempo * (seekWindowLength - overlapLength);
+ intskip = (int)(nominalSkip + 0.5);
+
+ // Calculate how many samples are needed in the 'inputBuffer' to
+ // process another batch of samples
+ //sampleReq = max(intskip + overlapLength, seekWindowLength) + seekLength / 2;
+ sampleReq = max(intskip + overlapLength, seekWindowLength) + seekLength;
+}
+
+
+
+// Sets the number of channels, 1 = mono, 2 = stereo
+void TDStretch::setChannels(int numChannels)
+{
+ if (!verifyNumberOfChannels(numChannels) ||
+ (channels == numChannels)) return;
+
+ channels = numChannels;
+ inputBuffer.setChannels(channels);
+ outputBuffer.setChannels(channels);
+
+ // re-init overlap/buffer
+ overlapLength=0;
+ setParameters(sampleRate);
+}
+
+
+// nominal tempo, no need for processing, just pass the samples through
+// to outputBuffer
+/*
+void TDStretch::processNominalTempo()
+{
+ ADM_assert(tempo == 1.0f);
+
+ if (bMidBufferDirty)
+ {
+ // If there are samples in pMidBuffer waiting for overlapping,
+ // do a single sliding overlapping with them in order to prevent a
+ // clicking distortion in the output sound
+ if (inputBuffer.numSamples() < overlapLength)
+ {
+ // wait until we've got overlapLength input samples
+ return;
+ }
+ // Mix the samples in the beginning of 'inputBuffer' with the
+ // samples in 'midBuffer' using sliding overlapping
+ overlap(outputBuffer.ptrEnd(overlapLength), inputBuffer.ptrBegin(), 0);
+ outputBuffer.putSamples(overlapLength);
+ inputBuffer.receiveSamples(overlapLength);
+ clearMidBuffer();
+ // now we've caught the nominal sample flow and may switch to
+ // bypass mode
+ }
+
+ // Simply bypass samples from input to output
+ outputBuffer.moveSamples(inputBuffer);
+}
+*/
+
+
+// Processes as many processing frames of the samples 'inputBuffer', store
+// the result into 'outputBuffer'
+void TDStretch::processSamples()
+{
+ int ovlSkip;
+ int offset = 0;
+ int temp;
+
+ /* Removed this small optimization - can introduce a click to sound when tempo setting
+ crosses the nominal value
+ if (tempo == 1.0f)
+ {
+ // tempo not changed from the original, so bypass the processing
+ processNominalTempo();
+ return;
+ }
+ */
+
+ // Process samples as long as there are enough samples in 'inputBuffer'
+ // to form a processing frame.
+ while ((int)inputBuffer.numSamples() >= sampleReq)
+ {
+ if (isBeginning == false)
+ {
+ // apart from the very beginning of the track,
+ // scan for the best overlapping position & do overlap-add
+ offset = seekBestOverlapPosition(inputBuffer.ptrBegin());
+
+ // Mix the samples in the 'inputBuffer' at position of 'offset' with the
+ // samples in 'midBuffer' using sliding overlapping
+ // ... first partially overlap with the end of the previous sequence
+ // (that's in 'midBuffer')
+ overlap(outputBuffer.ptrEnd((uint)overlapLength), inputBuffer.ptrBegin(), (uint)offset);
+ outputBuffer.putSamples((uint)overlapLength);
+ offset += overlapLength;
+ }
+ else
+ {
+ // Adjust processing offset at beginning of track by not perform initial overlapping
+ // and compensating that in the 'input buffer skip' calculation
+ isBeginning = false;
+ int skip = (int)(tempo * overlapLength + 0.5 * seekLength + 0.5);
+
+ #ifdef ST_SIMD_AVOID_UNALIGNED
+ // in SIMD mode, round the skip amount to value corresponding to aligned memory address
+ if (channels == 1)
+ {
+ skip &= -4;
+ }
+ else if (channels == 2)
+ {
+ skip &= -2;
+ }
+ #endif
+ skipFract -= skip;
+ if (skipFract <= -nominalSkip)
+ {
+ skipFract = -nominalSkip;
+ }
+ }
+
+ // ... then copy sequence samples from 'inputBuffer' to output:
+
+ // crosscheck that we don't have buffer overflow...
+ if ((int)inputBuffer.numSamples() < (offset + seekWindowLength - overlapLength))
+ {
+ continue; // just in case, shouldn't really happen
+ }
+
+ // length of sequence
+ temp = (seekWindowLength - 2 * overlapLength);
+ outputBuffer.putSamples(inputBuffer.ptrBegin() + channels * offset, (uint)temp);
+
+ // Copies the end of the current sequence from 'inputBuffer' to
+ // 'midBuffer' for being mixed with the beginning of the next
+ // processing sequence and so on
+ ADM_assert((offset + temp + overlapLength) <= (int)inputBuffer.numSamples());
+ memcpy(pMidBuffer, inputBuffer.ptrBegin() + channels * (offset + temp),
+ channels * sizeof(SAMPLETYPE) * overlapLength);
+
+ // Remove the processed samples from the input buffer. Update
+ // the difference between integer & nominal skip step to 'skipFract'
+ // in order to prevent the error from accumulating over time.
+ skipFract += nominalSkip; // real skip size
+ ovlSkip = (int)skipFract; // rounded to integer skip
+ skipFract -= ovlSkip; // maintain the fraction part, i.e. real vs. integer skip
+ inputBuffer.receiveSamples((uint)ovlSkip);
+ }
+}
+
+
+// Adds 'numsamples' pcs of samples from the 'samples' memory position into
+// the input of the object.
+void TDStretch::putSamples(const SAMPLETYPE *samples, uint nSamples)
+{
+ // Add the samples into the input buffer
+ inputBuffer.putSamples(samples, nSamples);
+ // Process the samples in input buffer
+ processSamples();
+}
+
+
+
+/// Set new overlap length parameter & reallocate RefMidBuffer if necessary.
+void TDStretch::acceptNewOverlapLength(int newOverlapLength)
+{
+ int prevOvl;
+
+ ADM_assert(newOverlapLength >= 0);
+ prevOvl = overlapLength;
+ overlapLength = newOverlapLength;
+
+ if (overlapLength > prevOvl)
+ {
+ delete[] pMidBufferUnaligned;
+
+ pMidBufferUnaligned = new SAMPLETYPE[overlapLength * channels + 16 / sizeof(SAMPLETYPE)];
+ // ensure that 'pMidBuffer' is aligned to 16 byte boundary for efficiency
+ pMidBuffer = (SAMPLETYPE *)SOUNDTOUCH_ALIGN_POINTER_16(pMidBufferUnaligned);
+
+ clearMidBuffer();
+ }
+}
+
+
+// Operator 'new' is overloaded so that it automatically creates a suitable instance
+// depending on if we've a MMX/SSE/etc-capable CPU available or not.
+void * TDStretch::operator new(size_t s)
+{
+ // Notice! don't use "new TDStretch" directly, use "newInstance" to create a new instance instead!
+ ST_THROW_RT_ERROR("Error in TDStretch::new: Don't use 'new TDStretch' directly, use 'newInstance' member instead!");
+ return newInstance();
+}
+
+
+TDStretch * TDStretch::newInstance()
+{
+ // Check if MMX/SSE instruction set extensions supported by CPU
+
+#ifdef SOUNDTOUCH_ALLOW_MMX
+ // MMX routines available only with integer sample types
+ if (CpuCaps::hasMMX())
+ {
+ return ::new TDStretchMMX;
+ }
+ else
+#endif // SOUNDTOUCH_ALLOW_MMX
+
+#ifdef SOUNDTOUCH_ALLOW_SSE
+ if (CpuCaps::hasSSE())
+ {
+ // SSE support
+ return ::new TDStretchSSE;
+ }
+ else
+#endif // SOUNDTOUCH_ALLOW_SSE
+
+ {
+ // ISA optimizations not supported, use plain C version
+ return ::new TDStretch;
+ }
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Integer arithmetic specific algorithm implementations.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifdef SOUNDTOUCH_INTEGER_SAMPLES
+
+// Overlaps samples in 'midBuffer' with the samples in 'input'. The 'Stereo'
+// version of the routine.
+void TDStretch::overlapStereo(short *poutput, const short *input) const
+{
+ int i;
+ short temp;
+ int cnt2;
+
+ for (i = 0; i < overlapLength ; i ++)
+ {
+ temp = (short)(overlapLength - i);
+ cnt2 = 2 * i;
+ poutput[cnt2] = (input[cnt2] * i + pMidBuffer[cnt2] * temp ) / overlapLength;
+ poutput[cnt2 + 1] = (input[cnt2 + 1] * i + pMidBuffer[cnt2 + 1] * temp ) / overlapLength;
+ }
+}
+
+
+// Overlaps samples in 'midBuffer' with the samples in 'input'. The 'Multi'
+// version of the routine.
+void TDStretch::overlapMulti(short *poutput, const short *input) const
+{
+ short m1;
+ int i = 0;
+
+ for (m1 = 0; m1 < overlapLength; m1 ++)
+ {
+ short m2 = (short)(overlapLength - m1);
+ for (int c = 0; c < channels; c ++)
+ {
+ poutput[i] = (input[i] * m1 + pMidBuffer[i] * m2) / overlapLength;
+ i++;
+ }
+ }
+}
+
+// Calculates the x having the closest 2^x value for the given value
+static int _getClosest2Power(double value)
+{
+ return (int)(log(value) / log(2.0) + 0.5);
+}
+
+
+/// Calculates overlap period length in samples.
+/// Integer version rounds overlap length to closest power of 2
+/// for a divide scaling operation.
+void TDStretch::calculateOverlapLength(int aoverlapMs)
+{
+ int newOvl;
+
+ ADM_assert(aoverlapMs >= 0);
+
+ // calculate overlap length so that it's power of 2 - thus it's easy to do
+ // integer division by right-shifting. Term "-1" at end is to account for
+ // the extra most significatnt bit left unused in result by signed multiplication
+ overlapDividerBitsPure = _getClosest2Power((sampleRate * aoverlapMs) / 1000.0) - 1;
+ if (overlapDividerBitsPure > 9) overlapDividerBitsPure = 9;
+ if (overlapDividerBitsPure < 3) overlapDividerBitsPure = 3;
+ newOvl = (int)pow(2.0, (int)overlapDividerBitsPure + 1); // +1 => account for -1 above
+
+ acceptNewOverlapLength(newOvl);
+
+ overlapDividerBitsNorm = overlapDividerBitsPure;
+
+ // calculate sloping divider so that crosscorrelation operation won't
+ // overflow 32-bit register. Max. sum of the crosscorrelation sum without
+ // divider would be 2^30*(N^3-N)/3, where N = overlap length
+ slopingDivider = (newOvl * newOvl - 1) / 3;
+}
+
+
+double TDStretch::calcCrossCorr(const short *mixingPos, const short *compare, double &norm)
+{
+ long corr;
+ unsigned long lnorm;
+ int i;
+
+ #ifdef ST_SIMD_AVOID_UNALIGNED
+ // in SIMD mode skip 'mixingPos' positions that aren't aligned to 16-byte boundary
+ if (((ulongptr)mixingPos) & 15) return -1e50;
+ #endif
+
+ // hint compiler autovectorization that loop length is divisible by 8
+ int ilength = (channels * overlapLength) & -8;
+
+ corr = lnorm = 0;
+ // Same routine for stereo and mono
+ for (i = 0; i < ilength; i += 2)
+ {
+ corr += (mixingPos[i] * compare[i] +
+ mixingPos[i + 1] * compare[i + 1]) >> overlapDividerBitsNorm;
+ lnorm += (mixingPos[i] * mixingPos[i] +
+ mixingPos[i + 1] * mixingPos[i + 1]) >> overlapDividerBitsNorm;
+ // do intermediate scalings to avoid integer overflow
+ }
+
+ if (lnorm > maxnorm)
+ {
+ // modify 'maxnorm' inside critical section to avoid multi-access conflict if in OpenMP mode
+ #pragma omp critical
+ if (lnorm > maxnorm)
+ {
+ maxnorm = lnorm;
+ }
+ }
+ // Normalize result by dividing by sqrt(norm) - this step is easiest
+ // done using floating point operation
+ norm = (double)lnorm;
+ return (double)corr / sqrt((norm < 1e-9) ? 1.0 : norm);
+}
+
+
+/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
+double TDStretch::calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm)
+{
+ long corr;
+ long lnorm;
+ int i;
+
+ // hint compiler autovectorization that loop length is divisible by 8
+ int ilength = (channels * overlapLength) & -8;
+
+ // cancel first normalizer tap from previous round
+ lnorm = 0;
+ for (i = 1; i <= channels; i ++)
+ {
+ lnorm -= (mixingPos[-i] * mixingPos[-i]) >> overlapDividerBitsNorm;
+ }
+
+ corr = 0;
+ // Same routine for stereo and mono.
+ for (i = 0; i < ilength; i += 2)
+ {
+ corr += (mixingPos[i] * compare[i] +
+ mixingPos[i + 1] * compare[i + 1]) >> overlapDividerBitsNorm;
+ }
+
+ // update normalizer with last samples of this round
+ for (int j = 0; j < channels; j ++)
+ {
+ i --;
+ lnorm += (mixingPos[i] * mixingPos[i]) >> overlapDividerBitsNorm;
+ }
+
+ norm += (double)lnorm;
+ if (norm > maxnorm)
+ {
+ maxnorm = (unsigned long)norm;
+ }
+
+ // Normalize result by dividing by sqrt(norm) - this step is easiest
+ // done using floating point operation
+ return (double)corr / sqrt((norm < 1e-9) ? 1.0 : norm);
+}
+
+#endif // SOUNDTOUCH_INTEGER_SAMPLES
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Floating point arithmetic specific algorithm implementations.
+//
+
+#ifdef SOUNDTOUCH_FLOAT_SAMPLES
+
+// Overlaps samples in 'midBuffer' with the samples in 'pInput'
+void TDStretch::overlapStereo(float *pOutput, const float *pInput) const
+{
+ int i;
+ float fScale;
+ float f1;
+ float f2;
+
+ fScale = 1.0f / (float)overlapLength;
+
+ f1 = 0;
+ f2 = 1.0f;
+
+ for (i = 0; i < 2 * (int)overlapLength ; i += 2)
+ {
+ pOutput[i + 0] = pInput[i + 0] * f1 + pMidBuffer[i + 0] * f2;
+ pOutput[i + 1] = pInput[i + 1] * f1 + pMidBuffer[i + 1] * f2;
+
+ f1 += fScale;
+ f2 -= fScale;
+ }
+}
+
+
+// Overlaps samples in 'midBuffer' with the samples in 'input'.
+void TDStretch::overlapMulti(float *pOutput, const float *pInput) const
+{
+ int i;
+ float fScale;
+ float f1;
+ float f2;
+
+ fScale = 1.0f / (float)overlapLength;
+
+ f1 = 0;
+ f2 = 1.0f;
+
+ i=0;
+ for (int i2 = 0; i2 < overlapLength; i2 ++)
+ {
+ // note: Could optimize this slightly by taking into account that always channels > 2
+ for (int c = 0; c < channels; c ++)
+ {
+ pOutput[i] = pInput[i] * f1 + pMidBuffer[i] * f2;
+ i++;
+ }
+ f1 += fScale;
+ f2 -= fScale;
+ }
+}
+
+
+/// Calculates overlapInMsec period length in samples.
+void TDStretch::calculateOverlapLength(int overlapInMsec)
+{
+ int newOvl;
+
+ ADM_assert(overlapInMsec >= 0);
+ newOvl = (sampleRate * overlapInMsec) / 1000;
+ if (newOvl < 16) newOvl = 16;
+
+ // must be divisible by 8
+ newOvl -= newOvl % 8;
+
+ acceptNewOverlapLength(newOvl);
+}
+
+
+/// Calculate cross-correlation
+double TDStretch::calcCrossCorr(const float *mixingPos, const float *compare, double &anorm)
+{
+ float corr;
+ float norm;
+ int i;
+
+ #ifdef ST_SIMD_AVOID_UNALIGNED
+ // in SIMD mode skip 'mixingPos' positions that aren't aligned to 16-byte boundary
+ if (((ulongptr)mixingPos) & 15) return -1e50;
+ #endif
+
+ // hint compiler autovectorization that loop length is divisible by 8
+ int ilength = (channels * overlapLength) & -8;
+
+ corr = norm = 0;
+ // Same routine for stereo and mono
+ for (i = 0; i < ilength; i ++)
+ {
+ corr += mixingPos[i] * compare[i];
+ norm += mixingPos[i] * mixingPos[i];
+ }
+
+ anorm = norm;
+ return corr / sqrt((norm < 1e-9 ? 1.0 : norm));
+}
+
+
+/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
+double TDStretch::calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm)
+{
+ float corr;
+ int i;
+
+ corr = 0;
+
+ // cancel first normalizer tap from previous round
+ for (i = 1; i <= channels; i ++)
+ {
+ norm -= mixingPos[-i] * mixingPos[-i];
+ }
+
+ // hint compiler autovectorization that loop length is divisible by 8
+ int ilength = (channels * overlapLength) & -8;
+
+ // Same routine for stereo and mono
+ for (i = 0; i < ilength; i ++)
+ {
+ corr += mixingPos[i] * compare[i];
+ }
+
+ // update normalizer with last samples of this round
+ for (int j = 0; j < channels; j ++)
+ {
+ i --;
+ norm += mixingPos[i] * mixingPos[i];
+ }
+
+ return corr / sqrt((norm < 1e-9 ? 1.0 : norm));
+}
+
+
+#endif // SOUNDTOUCH_FLOAT_SAMPLES
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/TDStretch.h b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/TDStretch.h
index 71c0853ffd..9062d3deb3 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/TDStretch.h
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/TDStretch.h
@@ -1,279 +1,279 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
-/// while maintaining the original pitch by using a time domain WSOLA-like method
-/// with several performance-increasing tweaks.
-///
-/// Note : MMX/SSE optimized functions reside in separate, platform-specific files
-/// 'mmx_optimized.cpp' and 'sse_optimized.cpp'
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef TDStretch_H
-#define TDStretch_H
-
-#include
-#include "STTypes.h"
-#include "RateTransposer.h"
-#include "FIFOSamplePipe.h"
-
-namespace soundtouch
-{
-
-/// Default values for sound processing parameters:
-/// Notice that the default parameters are tuned for contemporary popular music
-/// processing. For speech processing applications these parameters suit better:
-/// #define DEFAULT_SEQUENCE_MS 40
-/// #define DEFAULT_SEEKWINDOW_MS 15
-/// #define DEFAULT_OVERLAP_MS 8
-///
-
-/// Default length of a single processing sequence, in milliseconds. This determines to how
-/// long sequences the original sound is chopped in the time-stretch algorithm.
-///
-/// The larger this value is, the lesser sequences are used in processing. In principle
-/// a bigger value sounds better when slowing down tempo, but worse when increasing tempo
-/// and vice versa.
-///
-/// Increasing this value reduces computational burden & vice versa.
-//#define DEFAULT_SEQUENCE_MS 40
-#define DEFAULT_SEQUENCE_MS USE_AUTO_SEQUENCE_LEN
-
-/// Giving this value for the sequence length sets automatic parameter value
-/// according to tempo setting (recommended)
-#define USE_AUTO_SEQUENCE_LEN 0
-
-/// Seeking window default length in milliseconds for algorithm that finds the best possible
-/// overlapping location. This determines from how wide window the algorithm may look for an
-/// optimal joining location when mixing the sound sequences back together.
-///
-/// The bigger this window setting is, the higher the possibility to find a better mixing
-/// position will become, but at the same time large values may cause a "drifting" artifact
-/// because consequent sequences will be taken at more uneven intervals.
-///
-/// If there's a disturbing artifact that sounds as if a constant frequency was drifting
-/// around, try reducing this setting.
-///
-/// Increasing this value increases computational burden & vice versa.
-//#define DEFAULT_SEEKWINDOW_MS 15
-#define DEFAULT_SEEKWINDOW_MS USE_AUTO_SEEKWINDOW_LEN
-
-/// Giving this value for the seek window length sets automatic parameter value
-/// according to tempo setting (recommended)
-#define USE_AUTO_SEEKWINDOW_LEN 0
-
-/// Overlap length in milliseconds. When the chopped sound sequences are mixed back together,
-/// to form a continuous sound stream, this parameter defines over how long period the two
-/// consecutive sequences are let to overlap each other.
-///
-/// This shouldn't be that critical parameter. If you reduce the DEFAULT_SEQUENCE_MS setting
-/// by a large amount, you might wish to try a smaller value on this.
-///
-/// Increasing this value increases computational burden & vice versa.
-#define DEFAULT_OVERLAP_MS 8
-
-
-/// Class that does the time-stretch (tempo change) effect for the processed
-/// sound.
-class TDStretch : public FIFOProcessor
-{
-protected:
- int channels;
- int sampleReq;
-
- int overlapLength;
- int seekLength;
- int seekWindowLength;
- int overlapDividerBitsNorm;
- int overlapDividerBitsPure;
- int slopingDivider;
- int sampleRate;
- int sequenceMs;
- int seekWindowMs;
- int overlapMs;
-
- unsigned long maxnorm;
- float maxnormf;
-
- double tempo;
- double nominalSkip;
- double skipFract;
-
- bool bQuickSeek;
- bool bAutoSeqSetting;
- bool bAutoSeekSetting;
- bool isBeginning;
-
- SAMPLETYPE *pMidBuffer;
- SAMPLETYPE *pMidBufferUnaligned;
-
- FIFOSampleBuffer outputBuffer;
- FIFOSampleBuffer inputBuffer;
-
- void acceptNewOverlapLength(int newOverlapLength);
-
- virtual void clearCrossCorrState();
- void calculateOverlapLength(int overlapMs);
-
- virtual double calcCrossCorr(const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare, double &norm);
- virtual double calcCrossCorrAccumulate(const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare, double &norm);
-
- virtual int seekBestOverlapPositionFull(const SAMPLETYPE *refPos);
- virtual int seekBestOverlapPositionQuick(const SAMPLETYPE *refPos);
- virtual int seekBestOverlapPosition(const SAMPLETYPE *refPos);
-
- virtual void overlapStereo(SAMPLETYPE *output, const SAMPLETYPE *input) const;
- virtual void overlapMono(SAMPLETYPE *output, const SAMPLETYPE *input) const;
- virtual void overlapMulti(SAMPLETYPE *output, const SAMPLETYPE *input) const;
-
- void clearMidBuffer();
- void overlap(SAMPLETYPE *output, const SAMPLETYPE *input, uint ovlPos) const;
-
- void calcSeqParameters();
- void adaptNormalizer();
-
- /// Changes the tempo of the given sound samples.
- /// Returns amount of samples returned in the "output" buffer.
- /// The maximum amount of samples that can be returned at a time is set by
- /// the 'set_returnBuffer_size' function.
- void processSamples();
-
-public:
- TDStretch();
- virtual ~TDStretch() override;
-
- /// Operator 'new' is overloaded so that it automatically creates a suitable instance
- /// depending on if we've a MMX/SSE/etc-capable CPU available or not.
- static void *operator new(size_t s);
-
- /// Use this function instead of "new" operator to create a new instance of this class.
- /// This function automatically chooses a correct feature set depending on if the CPU
- /// supports MMX/SSE/etc extensions.
- static TDStretch *newInstance();
-
- /// Returns the output buffer object
- FIFOSamplePipe *getOutput() { return &outputBuffer; };
-
- /// Returns the input buffer object
- FIFOSamplePipe *getInput() { return &inputBuffer; };
-
- /// Sets new target tempo. Normal tempo = 'SCALE', smaller values represent slower
- /// tempo, larger faster tempo.
- void setTempo(double newTempo);
-
- /// Returns nonzero if there aren't any samples available for outputting.
- virtual void clear() override;
-
- /// Clears the input buffer
- void clearInput();
-
- /// Sets the number of channels, 1 = mono, 2 = stereo
- void setChannels(int numChannels);
-
- /// Enables/disables the quick position seeking algorithm. Zero to disable,
- /// nonzero to enable
- void enableQuickSeek(bool enable);
-
- /// Returns nonzero if the quick seeking algorithm is enabled.
- bool isQuickSeekEnabled() const;
-
- /// Sets routine control parameters. These control are certain time constants
- /// defining how the sound is stretched to the desired duration.
- //
- /// 'sampleRate' = sample rate of the sound
- /// 'sequenceMS' = one processing sequence length in milliseconds
- /// 'seekwindowMS' = seeking window length for scanning the best overlapping
- /// position
- /// 'overlapMS' = overlapping length
- void setParameters(int sampleRate, ///< Samplerate of sound being processed (Hz)
- int sequenceMS = -1, ///< Single processing sequence length (ms)
- int seekwindowMS = -1, ///< Offset seeking window length (ms)
- int overlapMS = -1 ///< Sequence overlapping length (ms)
- );
-
- /// Get routine control parameters, see setParameters() function.
- /// Any of the parameters to this function can be NULL, in such case corresponding parameter
- /// value isn't returned.
- void getParameters(int *pSampleRate, int *pSequenceMs, int *pSeekWindowMs, int *pOverlapMs) const;
-
- /// Adds 'numsamples' pcs of samples from the 'samples' memory position into
- /// the input of the object.
- virtual void putSamples(
- const SAMPLETYPE *samples, ///< Input sample data
- uint numSamples ///< Number of samples in 'samples' so that one sample
- ///< contains both channels if stereo
- ) override;
-
- /// return nominal input sample requirement for triggering a processing batch
- int getInputSampleReq() const
- {
- return (int)(nominalSkip + 0.5);
- }
-
- /// return nominal output sample amount when running a processing batch
- int getOutputBatchSize() const
- {
- return seekWindowLength - overlapLength;
- }
-
- /// return approximate initial input-output latency
- int getLatency() const
- {
- return sampleReq;
- }
-};
-
-
-// Implementation-specific class declarations:
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
- /// Class that implements MMX optimized routines for 16bit integer samples type.
- class TDStretchMMX : public TDStretch
- {
- protected:
- double calcCrossCorr(const short *mixingPos, const short *compare, double &norm) override;
- double calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm) override;
- virtual void overlapStereo(short *output, const short *input) const override;
- virtual void clearCrossCorrState() override;
- };
-#endif /// SOUNDTOUCH_ALLOW_MMX
-
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
- /// Class that implements SSE optimized routines for floating point samples type.
- class TDStretchSSE : public TDStretch
- {
- protected:
- double calcCrossCorr(const float *mixingPos, const float *compare, double &norm) override;
- double calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm) override;
- };
-
-#endif /// SOUNDTOUCH_ALLOW_SSE
-
-}
-#endif /// TDStretch_H
+////////////////////////////////////////////////////////////////////////////////
+///
+/// Sampled sound tempo changer/time stretch algorithm. Changes the sound tempo
+/// while maintaining the original pitch by using a time domain WSOLA-like method
+/// with several performance-increasing tweaks.
+///
+/// Note : MMX/SSE optimized functions reside in separate, platform-specific files
+/// 'mmx_optimized.cpp' and 'sse_optimized.cpp'
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef TDStretch_H
+#define TDStretch_H
+
+#include
+#include "STTypes.h"
+#include "RateTransposer.h"
+#include "FIFOSamplePipe.h"
+
+namespace soundtouch
+{
+
+/// Default values for sound processing parameters:
+/// Notice that the default parameters are tuned for contemporary popular music
+/// processing. For speech processing applications these parameters suit better:
+/// #define DEFAULT_SEQUENCE_MS 40
+/// #define DEFAULT_SEEKWINDOW_MS 15
+/// #define DEFAULT_OVERLAP_MS 8
+///
+
+/// Default length of a single processing sequence, in milliseconds. This determines to how
+/// long sequences the original sound is chopped in the time-stretch algorithm.
+///
+/// The larger this value is, the lesser sequences are used in processing. In principle
+/// a bigger value sounds better when slowing down tempo, but worse when increasing tempo
+/// and vice versa.
+///
+/// Increasing this value reduces computational burden & vice versa.
+//#define DEFAULT_SEQUENCE_MS 40
+#define DEFAULT_SEQUENCE_MS USE_AUTO_SEQUENCE_LEN
+
+/// Giving this value for the sequence length sets automatic parameter value
+/// according to tempo setting (recommended)
+#define USE_AUTO_SEQUENCE_LEN 0
+
+/// Seeking window default length in milliseconds for algorithm that finds the best possible
+/// overlapping location. This determines from how wide window the algorithm may look for an
+/// optimal joining location when mixing the sound sequences back together.
+///
+/// The bigger this window setting is, the higher the possibility to find a better mixing
+/// position will become, but at the same time large values may cause a "drifting" artifact
+/// because consequent sequences will be taken at more uneven intervals.
+///
+/// If there's a disturbing artifact that sounds as if a constant frequency was drifting
+/// around, try reducing this setting.
+///
+/// Increasing this value increases computational burden & vice versa.
+//#define DEFAULT_SEEKWINDOW_MS 15
+#define DEFAULT_SEEKWINDOW_MS USE_AUTO_SEEKWINDOW_LEN
+
+/// Giving this value for the seek window length sets automatic parameter value
+/// according to tempo setting (recommended)
+#define USE_AUTO_SEEKWINDOW_LEN 0
+
+/// Overlap length in milliseconds. When the chopped sound sequences are mixed back together,
+/// to form a continuous sound stream, this parameter defines over how long period the two
+/// consecutive sequences are let to overlap each other.
+///
+/// This shouldn't be that critical parameter. If you reduce the DEFAULT_SEQUENCE_MS setting
+/// by a large amount, you might wish to try a smaller value on this.
+///
+/// Increasing this value increases computational burden & vice versa.
+#define DEFAULT_OVERLAP_MS 8
+
+
+/// Class that does the time-stretch (tempo change) effect for the processed
+/// sound.
+class TDStretch : public FIFOProcessor
+{
+protected:
+ int channels;
+ int sampleReq;
+
+ int overlapLength;
+ int seekLength;
+ int seekWindowLength;
+ int overlapDividerBitsNorm;
+ int overlapDividerBitsPure;
+ int slopingDivider;
+ int sampleRate;
+ int sequenceMs;
+ int seekWindowMs;
+ int overlapMs;
+
+ unsigned long maxnorm;
+ float maxnormf;
+
+ double tempo;
+ double nominalSkip;
+ double skipFract;
+
+ bool bQuickSeek;
+ bool bAutoSeqSetting;
+ bool bAutoSeekSetting;
+ bool isBeginning;
+
+ SAMPLETYPE *pMidBuffer;
+ SAMPLETYPE *pMidBufferUnaligned;
+
+ FIFOSampleBuffer outputBuffer;
+ FIFOSampleBuffer inputBuffer;
+
+ void acceptNewOverlapLength(int newOverlapLength);
+
+ virtual void clearCrossCorrState();
+ void calculateOverlapLength(int overlapMs);
+
+ virtual double calcCrossCorr(const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare, double &norm);
+ virtual double calcCrossCorrAccumulate(const SAMPLETYPE *mixingPos, const SAMPLETYPE *compare, double &norm);
+
+ virtual int seekBestOverlapPositionFull(const SAMPLETYPE *refPos);
+ virtual int seekBestOverlapPositionQuick(const SAMPLETYPE *refPos);
+ virtual int seekBestOverlapPosition(const SAMPLETYPE *refPos);
+
+ virtual void overlapStereo(SAMPLETYPE *output, const SAMPLETYPE *input) const;
+ virtual void overlapMono(SAMPLETYPE *output, const SAMPLETYPE *input) const;
+ virtual void overlapMulti(SAMPLETYPE *output, const SAMPLETYPE *input) const;
+
+ void clearMidBuffer();
+ void overlap(SAMPLETYPE *output, const SAMPLETYPE *input, uint ovlPos) const;
+
+ void calcSeqParameters();
+ void adaptNormalizer();
+
+ /// Changes the tempo of the given sound samples.
+ /// Returns amount of samples returned in the "output" buffer.
+ /// The maximum amount of samples that can be returned at a time is set by
+ /// the 'set_returnBuffer_size' function.
+ void processSamples();
+
+public:
+ TDStretch();
+ virtual ~TDStretch() override;
+
+ /// Operator 'new' is overloaded so that it automatically creates a suitable instance
+ /// depending on if we've a MMX/SSE/etc-capable CPU available or not.
+ static void *operator new(size_t s);
+
+ /// Use this function instead of "new" operator to create a new instance of this class.
+ /// This function automatically chooses a correct feature set depending on if the CPU
+ /// supports MMX/SSE/etc extensions.
+ static TDStretch *newInstance();
+
+ /// Returns the output buffer object
+ FIFOSamplePipe *getOutput() { return &outputBuffer; };
+
+ /// Returns the input buffer object
+ FIFOSamplePipe *getInput() { return &inputBuffer; };
+
+ /// Sets new target tempo. Normal tempo = 'SCALE', smaller values represent slower
+ /// tempo, larger faster tempo.
+ void setTempo(double newTempo);
+
+ /// Returns nonzero if there aren't any samples available for outputting.
+ virtual void clear() override;
+
+ /// Clears the input buffer
+ void clearInput();
+
+ /// Sets the number of channels, 1 = mono, 2 = stereo
+ void setChannels(int numChannels);
+
+ /// Enables/disables the quick position seeking algorithm. Zero to disable,
+ /// nonzero to enable
+ void enableQuickSeek(bool enable);
+
+ /// Returns nonzero if the quick seeking algorithm is enabled.
+ bool isQuickSeekEnabled() const;
+
+ /// Sets routine control parameters. These control are certain time constants
+ /// defining how the sound is stretched to the desired duration.
+ //
+ /// 'sampleRate' = sample rate of the sound
+ /// 'sequenceMS' = one processing sequence length in milliseconds
+ /// 'seekwindowMS' = seeking window length for scanning the best overlapping
+ /// position
+ /// 'overlapMS' = overlapping length
+ void setParameters(int sampleRate, ///< Samplerate of sound being processed (Hz)
+ int sequenceMS = -1, ///< Single processing sequence length (ms)
+ int seekwindowMS = -1, ///< Offset seeking window length (ms)
+ int overlapMS = -1 ///< Sequence overlapping length (ms)
+ );
+
+ /// Get routine control parameters, see setParameters() function.
+ /// Any of the parameters to this function can be NULL, in such case corresponding parameter
+ /// value isn't returned.
+ void getParameters(int *pSampleRate, int *pSequenceMs, int *pSeekWindowMs, int *pOverlapMs) const;
+
+ /// Adds 'numsamples' pcs of samples from the 'samples' memory position into
+ /// the input of the object.
+ virtual void putSamples(
+ const SAMPLETYPE *samples, ///< Input sample data
+ uint numSamples ///< Number of samples in 'samples' so that one sample
+ ///< contains both channels if stereo
+ ) override;
+
+ /// return nominal input sample requirement for triggering a processing batch
+ int getInputSampleReq() const
+ {
+ return (int)(nominalSkip + 0.5);
+ }
+
+ /// return nominal output sample amount when running a processing batch
+ int getOutputBatchSize() const
+ {
+ return seekWindowLength - overlapLength;
+ }
+
+ /// return approximate initial input-output latency
+ int getLatency() const
+ {
+ return sampleReq;
+ }
+};
+
+
+// Implementation-specific class declarations:
+
+#ifdef SOUNDTOUCH_ALLOW_MMX
+ /// Class that implements MMX optimized routines for 16bit integer samples type.
+ class TDStretchMMX : public TDStretch
+ {
+ protected:
+ double calcCrossCorr(const short *mixingPos, const short *compare, double &norm) override;
+ double calcCrossCorrAccumulate(const short *mixingPos, const short *compare, double &norm) override;
+ virtual void overlapStereo(short *output, const short *input) const override;
+ virtual void clearCrossCorrState() override;
+ };
+#endif /// SOUNDTOUCH_ALLOW_MMX
+
+
+#ifdef SOUNDTOUCH_ALLOW_SSE
+ /// Class that implements SSE optimized routines for floating point samples type.
+ class TDStretchSSE : public TDStretch
+ {
+ protected:
+ double calcCrossCorr(const float *mixingPos, const float *compare, double &norm) override;
+ double calcCrossCorrAccumulate(const float *mixingPos, const float *compare, double &norm) override;
+ };
+
+#endif /// SOUNDTOUCH_ALLOW_SSE
+
+}
+#endif /// TDStretch_H
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/mmx_optimized.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/mmx_optimized.cpp
index 741ba4f22e..0bc7fe86f7 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/mmx_optimized.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/mmx_optimized.cpp
@@ -1,396 +1,396 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// MMX optimized routines. All MMX optimized functions have been gathered into
-/// this single source code file, regardless to their class or original source
-/// code file, in order to ease porting the library to other compiler and
-/// processor platforms.
-///
-/// The MMX-optimizations are programmed using MMX compiler intrinsics that
-/// are supported both by Microsoft Visual C++ and GCC compilers, so this file
-/// should compile with both toolsets.
-///
-/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++
-/// 6.0 processor pack" update to support compiler intrinsic syntax. The update
-/// is available for download at Microsoft Developers Network, see here:
-/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "STTypes.h"
-
-#ifdef SOUNDTOUCH_ALLOW_MMX
-// MMX routines available only with integer sample type
-
-using namespace soundtouch;
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// implementation of MMX optimized functions of class 'TDStretchMMX'
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include "TDStretch.h"
-#include
-#include
-#include
-
-
-// Calculates cross correlation of two buffers
-double TDStretchMMX::calcCrossCorr(const short *pV1, const short *pV2, double &dnorm)
-{
- const __m64 *pVec1, *pVec2;
- __m64 shifter;
- __m64 accu, normaccu;
- long corr, norm;
- int i;
-
- pVec1 = (__m64*)pV1;
- pVec2 = (__m64*)pV2;
-
- shifter = _m_from_int(overlapDividerBitsNorm);
- normaccu = accu = _mm_setzero_si64();
-
- // Process 4 parallel sets of 2 * stereo samples or 4 * mono samples
- // during each round for improved CPU-level parallellization.
- for (i = 0; i < channels * overlapLength / 16; i ++)
- {
- __m64 temp, temp2;
-
- // dictionary of instructions:
- // _m_pmaddwd : 4*16bit multiply-add, resulting two 32bits = [a0*b0+a1*b1 ; a2*b2+a3*b3]
- // _mm_add_pi32 : 2*32bit add
- // _m_psrad : 32bit right-shift
-
- temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec2[0]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec2[1]), shifter));
- temp2 = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec1[0]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec1[1]), shifter));
- accu = _mm_add_pi32(accu, temp);
- normaccu = _mm_add_pi32(normaccu, temp2);
-
- temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec2[2]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec2[3]), shifter));
- temp2 = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec1[2]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec1[3]), shifter));
- accu = _mm_add_pi32(accu, temp);
- normaccu = _mm_add_pi32(normaccu, temp2);
-
- pVec1 += 4;
- pVec2 += 4;
- }
-
- // copy hi-dword of mm0 to lo-dword of mm1, then sum mmo+mm1
- // and finally store the result into the variable "corr"
-
- accu = _mm_add_pi32(accu, _mm_srli_si64(accu, 32));
- corr = _m_to_int(accu);
-
- normaccu = _mm_add_pi32(normaccu, _mm_srli_si64(normaccu, 32));
- norm = _m_to_int(normaccu);
-
- // Clear MMS state
- _m_empty();
-
- if (norm > (long)maxnorm)
- {
- // modify 'maxnorm' inside critical section to avoid multi-access conflict if in OpenMP mode
- #pragma omp critical
- if (norm > (long)maxnorm)
- {
- maxnorm = norm;
- }
- }
-
- // Normalize result by dividing by sqrt(norm) - this step is easiest
- // done using floating point operation
- dnorm = (double)norm;
-
- return (double)corr / sqrt(dnorm < 1e-9 ? 1.0 : dnorm);
- // Note: Warning about the missing EMMS instruction is harmless
- // as it'll be called elsewhere.
-}
-
-
-/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
-double TDStretchMMX::calcCrossCorrAccumulate(const short *pV1, const short *pV2, double &dnorm)
-{
- const __m64 *pVec1, *pVec2;
- __m64 shifter;
- __m64 accu;
- long corr, lnorm;
- int i;
-
- // cancel first normalizer tap from previous round
- lnorm = 0;
- for (i = 1; i <= channels; i ++)
- {
- lnorm -= (pV1[-i] * pV1[-i]) >> overlapDividerBitsNorm;
- }
-
- pVec1 = (__m64*)pV1;
- pVec2 = (__m64*)pV2;
-
- shifter = _m_from_int(overlapDividerBitsNorm);
- accu = _mm_setzero_si64();
-
- // Process 4 parallel sets of 2 * stereo samples or 4 * mono samples
- // during each round for improved CPU-level parallellization.
- for (i = 0; i < channels * overlapLength / 16; i ++)
- {
- __m64 temp;
-
- // dictionary of instructions:
- // _m_pmaddwd : 4*16bit multiply-add, resulting two 32bits = [a0*b0+a1*b1 ; a2*b2+a3*b3]
- // _mm_add_pi32 : 2*32bit add
- // _m_psrad : 32bit right-shift
-
- temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec2[0]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec2[1]), shifter));
- accu = _mm_add_pi32(accu, temp);
-
- temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec2[2]), shifter),
- _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec2[3]), shifter));
- accu = _mm_add_pi32(accu, temp);
-
- pVec1 += 4;
- pVec2 += 4;
- }
-
- // copy hi-dword of mm0 to lo-dword of mm1, then sum mmo+mm1
- // and finally store the result into the variable "corr"
-
- accu = _mm_add_pi32(accu, _mm_srli_si64(accu, 32));
- corr = _m_to_int(accu);
-
- // Clear MMS state
- _m_empty();
-
- // update normalizer with last samples of this round
- pV1 = (short *)pVec1;
- for (int j = 1; j <= channels; j ++)
- {
- lnorm += (pV1[-j] * pV1[-j]) >> overlapDividerBitsNorm;
- }
- dnorm += (double)lnorm;
-
- if (lnorm > (long)maxnorm)
- {
- maxnorm = lnorm;
- }
-
- // Normalize result by dividing by sqrt(norm) - this step is easiest
- // done using floating point operation
- return (double)corr / sqrt((dnorm < 1e-9) ? 1.0 : dnorm);
-}
-
-
-void TDStretchMMX::clearCrossCorrState()
-{
- // Clear MMS state
- _m_empty();
- //_asm EMMS;
-}
-
-
-// MMX-optimized version of the function overlapStereo
-void TDStretchMMX::overlapStereo(short *output, const short *input) const
-{
- const __m64 *pVinput, *pVMidBuf;
- __m64 *pVdest;
- __m64 mix1, mix2, adder, shifter;
- int i;
-
- pVinput = (const __m64*)input;
- pVMidBuf = (const __m64*)pMidBuffer;
- pVdest = (__m64*)output;
-
- // mix1 = mixer values for 1st stereo sample
- // mix1 = mixer values for 2nd stereo sample
- // adder = adder for updating mixer values after each round
-
- mix1 = _mm_set_pi16(0, overlapLength, 0, overlapLength);
- adder = _mm_set_pi16(1, -1, 1, -1);
- mix2 = _mm_add_pi16(mix1, adder);
- adder = _mm_add_pi16(adder, adder);
-
- // Overlaplength-division by shifter. "+1" is to account for "-1" deduced in
- // overlapDividerBits calculation earlier.
- shifter = _m_from_int(overlapDividerBitsPure + 1);
-
- for (i = 0; i < overlapLength / 4; i ++)
- {
- __m64 temp1, temp2;
-
- // load & shuffle data so that input & mixbuffer data samples are paired
- temp1 = _mm_unpacklo_pi16(pVMidBuf[0], pVinput[0]); // = i0l m0l i0r m0r
- temp2 = _mm_unpackhi_pi16(pVMidBuf[0], pVinput[0]); // = i1l m1l i1r m1r
-
- // temp = (temp .* mix) >> shifter
- temp1 = _mm_sra_pi32(_mm_madd_pi16(temp1, mix1), shifter);
- temp2 = _mm_sra_pi32(_mm_madd_pi16(temp2, mix2), shifter);
- pVdest[0] = _mm_packs_pi32(temp1, temp2); // pack 2*2*32bit => 4*16bit
-
- // update mix += adder
- mix1 = _mm_add_pi16(mix1, adder);
- mix2 = _mm_add_pi16(mix2, adder);
-
- // --- second round begins here ---
-
- // load & shuffle data so that input & mixbuffer data samples are paired
- temp1 = _mm_unpacklo_pi16(pVMidBuf[1], pVinput[1]); // = i2l m2l i2r m2r
- temp2 = _mm_unpackhi_pi16(pVMidBuf[1], pVinput[1]); // = i3l m3l i3r m3r
-
- // temp = (temp .* mix) >> shifter
- temp1 = _mm_sra_pi32(_mm_madd_pi16(temp1, mix1), shifter);
- temp2 = _mm_sra_pi32(_mm_madd_pi16(temp2, mix2), shifter);
- pVdest[1] = _mm_packs_pi32(temp1, temp2); // pack 2*2*32bit => 4*16bit
-
- // update mix += adder
- mix1 = _mm_add_pi16(mix1, adder);
- mix2 = _mm_add_pi16(mix2, adder);
-
- pVinput += 2;
- pVMidBuf += 2;
- pVdest += 2;
- }
-
- _m_empty(); // clear MMS state
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// implementation of MMX optimized functions of class 'FIRFilter'
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include "FIRFilter.h"
-
-
-FIRFilterMMX::FIRFilterMMX() : FIRFilter()
-{
- filterCoeffsAlign = NULL;
- filterCoeffsUnalign = NULL;
-}
-
-
-FIRFilterMMX::~FIRFilterMMX()
-{
- delete[] filterCoeffsUnalign;
-}
-
-
-// (overloaded) Calculates filter coefficients for MMX routine
-void FIRFilterMMX::setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor)
-{
- uint i;
- FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor);
-
- // Ensure that filter coeffs array is aligned to 16-byte boundary
- delete[] filterCoeffsUnalign;
- filterCoeffsUnalign = new short[2 * newLength + 8];
- filterCoeffsAlign = (short *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
-
- // rearrange the filter coefficients for mmx routines
- for (i = 0;i < length; i += 4)
- {
- filterCoeffsAlign[2 * i + 0] = coeffs[i + 0];
- filterCoeffsAlign[2 * i + 1] = coeffs[i + 2];
- filterCoeffsAlign[2 * i + 2] = coeffs[i + 0];
- filterCoeffsAlign[2 * i + 3] = coeffs[i + 2];
-
- filterCoeffsAlign[2 * i + 4] = coeffs[i + 1];
- filterCoeffsAlign[2 * i + 5] = coeffs[i + 3];
- filterCoeffsAlign[2 * i + 6] = coeffs[i + 1];
- filterCoeffsAlign[2 * i + 7] = coeffs[i + 3];
- }
-}
-
-
-// mmx-optimized version of the filter routine for stereo sound
-uint FIRFilterMMX::evaluateFilterStereo(short *dest, const short *src, uint numSamples) const
-{
- // Create stack copies of the needed member variables for asm routines :
- uint i, j;
- __m64 *pVdest = (__m64*)dest;
-
- if (length < 2) return 0;
-
- for (i = 0; i < (numSamples - length) / 2; i ++)
- {
- __m64 accu1;
- __m64 accu2;
- const __m64 *pVsrc = (const __m64*)src;
- const __m64 *pVfilter = (const __m64*)filterCoeffsAlign;
-
- accu1 = accu2 = _mm_setzero_si64();
- for (j = 0; j < lengthDiv8 * 2; j ++)
- {
- __m64 temp1, temp2;
-
- temp1 = _mm_unpacklo_pi16(pVsrc[0], pVsrc[1]); // = l2 l0 r2 r0
- temp2 = _mm_unpackhi_pi16(pVsrc[0], pVsrc[1]); // = l3 l1 r3 r1
-
- accu1 = _mm_add_pi32(accu1, _mm_madd_pi16(temp1, pVfilter[0])); // += l2*f2+l0*f0 r2*f2+r0*f0
- accu1 = _mm_add_pi32(accu1, _mm_madd_pi16(temp2, pVfilter[1])); // += l3*f3+l1*f1 r3*f3+r1*f1
-
- temp1 = _mm_unpacklo_pi16(pVsrc[1], pVsrc[2]); // = l4 l2 r4 r2
-
- accu2 = _mm_add_pi32(accu2, _mm_madd_pi16(temp2, pVfilter[0])); // += l3*f2+l1*f0 r3*f2+r1*f0
- accu2 = _mm_add_pi32(accu2, _mm_madd_pi16(temp1, pVfilter[1])); // += l4*f3+l2*f1 r4*f3+r2*f1
-
- // accu1 += l2*f2+l0*f0 r2*f2+r0*f0
- // += l3*f3+l1*f1 r3*f3+r1*f1
-
- // accu2 += l3*f2+l1*f0 r3*f2+r1*f0
- // l4*f3+l2*f1 r4*f3+r2*f1
-
- pVfilter += 2;
- pVsrc += 2;
- }
- // accu >>= resultDivFactor
- accu1 = _mm_srai_pi32(accu1, resultDivFactor);
- accu2 = _mm_srai_pi32(accu2, resultDivFactor);
-
- // pack 2*2*32bits => 4*16 bits
- pVdest[0] = _mm_packs_pi32(accu1, accu2);
- src += 4;
- pVdest ++;
- }
-
- _m_empty(); // clear emms state
-
- return (numSamples & 0xfffffffe) - length;
-}
-
-#else
-
-// workaround to not complain about empty module
-bool _dontcomplain_mmx_empty;
-
-#endif // SOUNDTOUCH_ALLOW_MMX
+////////////////////////////////////////////////////////////////////////////////
+///
+/// MMX optimized routines. All MMX optimized functions have been gathered into
+/// this single source code file, regardless to their class or original source
+/// code file, in order to ease porting the library to other compiler and
+/// processor platforms.
+///
+/// The MMX-optimizations are programmed using MMX compiler intrinsics that
+/// are supported both by Microsoft Visual C++ and GCC compilers, so this file
+/// should compile with both toolsets.
+///
+/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++
+/// 6.0 processor pack" update to support compiler intrinsic syntax. The update
+/// is available for download at Microsoft Developers Network, see here:
+/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "STTypes.h"
+
+#ifdef SOUNDTOUCH_ALLOW_MMX
+// MMX routines available only with integer sample type
+
+using namespace soundtouch;
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// implementation of MMX optimized functions of class 'TDStretchMMX'
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include "TDStretch.h"
+#include
+#include
+#include
+
+
+// Calculates cross correlation of two buffers
+double TDStretchMMX::calcCrossCorr(const short *pV1, const short *pV2, double &dnorm)
+{
+ const __m64 *pVec1, *pVec2;
+ __m64 shifter;
+ __m64 accu, normaccu;
+ long corr, norm;
+ int i;
+
+ pVec1 = (__m64*)pV1;
+ pVec2 = (__m64*)pV2;
+
+ shifter = _m_from_int(overlapDividerBitsNorm);
+ normaccu = accu = _mm_setzero_si64();
+
+ // Process 4 parallel sets of 2 * stereo samples or 4 * mono samples
+ // during each round for improved CPU-level parallellization.
+ for (i = 0; i < channels * overlapLength / 16; i ++)
+ {
+ __m64 temp, temp2;
+
+ // dictionary of instructions:
+ // _m_pmaddwd : 4*16bit multiply-add, resulting two 32bits = [a0*b0+a1*b1 ; a2*b2+a3*b3]
+ // _mm_add_pi32 : 2*32bit add
+ // _m_psrad : 32bit right-shift
+
+ temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec2[0]), shifter),
+ _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec2[1]), shifter));
+ temp2 = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec1[0]), shifter),
+ _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec1[1]), shifter));
+ accu = _mm_add_pi32(accu, temp);
+ normaccu = _mm_add_pi32(normaccu, temp2);
+
+ temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec2[2]), shifter),
+ _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec2[3]), shifter));
+ temp2 = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec1[2]), shifter),
+ _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec1[3]), shifter));
+ accu = _mm_add_pi32(accu, temp);
+ normaccu = _mm_add_pi32(normaccu, temp2);
+
+ pVec1 += 4;
+ pVec2 += 4;
+ }
+
+ // copy hi-dword of mm0 to lo-dword of mm1, then sum mmo+mm1
+ // and finally store the result into the variable "corr"
+
+ accu = _mm_add_pi32(accu, _mm_srli_si64(accu, 32));
+ corr = _m_to_int(accu);
+
+ normaccu = _mm_add_pi32(normaccu, _mm_srli_si64(normaccu, 32));
+ norm = _m_to_int(normaccu);
+
+ // Clear MMS state
+ _m_empty();
+
+ if (norm > (long)maxnorm)
+ {
+ // modify 'maxnorm' inside critical section to avoid multi-access conflict if in OpenMP mode
+ #pragma omp critical
+ if (norm > (long)maxnorm)
+ {
+ maxnorm = norm;
+ }
+ }
+
+ // Normalize result by dividing by sqrt(norm) - this step is easiest
+ // done using floating point operation
+ dnorm = (double)norm;
+
+ return (double)corr / sqrt(dnorm < 1e-9 ? 1.0 : dnorm);
+ // Note: Warning about the missing EMMS instruction is harmless
+ // as it'll be called elsewhere.
+}
+
+
+/// Update cross-correlation by accumulating "norm" coefficient by previously calculated value
+double TDStretchMMX::calcCrossCorrAccumulate(const short *pV1, const short *pV2, double &dnorm)
+{
+ const __m64 *pVec1, *pVec2;
+ __m64 shifter;
+ __m64 accu;
+ long corr, lnorm;
+ int i;
+
+ // cancel first normalizer tap from previous round
+ lnorm = 0;
+ for (i = 1; i <= channels; i ++)
+ {
+ lnorm -= (pV1[-i] * pV1[-i]) >> overlapDividerBitsNorm;
+ }
+
+ pVec1 = (__m64*)pV1;
+ pVec2 = (__m64*)pV2;
+
+ shifter = _m_from_int(overlapDividerBitsNorm);
+ accu = _mm_setzero_si64();
+
+ // Process 4 parallel sets of 2 * stereo samples or 4 * mono samples
+ // during each round for improved CPU-level parallellization.
+ for (i = 0; i < channels * overlapLength / 16; i ++)
+ {
+ __m64 temp;
+
+ // dictionary of instructions:
+ // _m_pmaddwd : 4*16bit multiply-add, resulting two 32bits = [a0*b0+a1*b1 ; a2*b2+a3*b3]
+ // _mm_add_pi32 : 2*32bit add
+ // _m_psrad : 32bit right-shift
+
+ temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[0], pVec2[0]), shifter),
+ _mm_sra_pi32(_mm_madd_pi16(pVec1[1], pVec2[1]), shifter));
+ accu = _mm_add_pi32(accu, temp);
+
+ temp = _mm_add_pi32(_mm_sra_pi32(_mm_madd_pi16(pVec1[2], pVec2[2]), shifter),
+ _mm_sra_pi32(_mm_madd_pi16(pVec1[3], pVec2[3]), shifter));
+ accu = _mm_add_pi32(accu, temp);
+
+ pVec1 += 4;
+ pVec2 += 4;
+ }
+
+ // copy hi-dword of mm0 to lo-dword of mm1, then sum mmo+mm1
+ // and finally store the result into the variable "corr"
+
+ accu = _mm_add_pi32(accu, _mm_srli_si64(accu, 32));
+ corr = _m_to_int(accu);
+
+ // Clear MMS state
+ _m_empty();
+
+ // update normalizer with last samples of this round
+ pV1 = (short *)pVec1;
+ for (int j = 1; j <= channels; j ++)
+ {
+ lnorm += (pV1[-j] * pV1[-j]) >> overlapDividerBitsNorm;
+ }
+ dnorm += (double)lnorm;
+
+ if (lnorm > (long)maxnorm)
+ {
+ maxnorm = lnorm;
+ }
+
+ // Normalize result by dividing by sqrt(norm) - this step is easiest
+ // done using floating point operation
+ return (double)corr / sqrt((dnorm < 1e-9) ? 1.0 : dnorm);
+}
+
+
+void TDStretchMMX::clearCrossCorrState()
+{
+ // Clear MMS state
+ _m_empty();
+ //_asm EMMS;
+}
+
+
+// MMX-optimized version of the function overlapStereo
+void TDStretchMMX::overlapStereo(short *output, const short *input) const
+{
+ const __m64 *pVinput, *pVMidBuf;
+ __m64 *pVdest;
+ __m64 mix1, mix2, adder, shifter;
+ int i;
+
+ pVinput = (const __m64*)input;
+ pVMidBuf = (const __m64*)pMidBuffer;
+ pVdest = (__m64*)output;
+
+ // mix1 = mixer values for 1st stereo sample
+ // mix1 = mixer values for 2nd stereo sample
+ // adder = adder for updating mixer values after each round
+
+ mix1 = _mm_set_pi16(0, overlapLength, 0, overlapLength);
+ adder = _mm_set_pi16(1, -1, 1, -1);
+ mix2 = _mm_add_pi16(mix1, adder);
+ adder = _mm_add_pi16(adder, adder);
+
+ // Overlaplength-division by shifter. "+1" is to account for "-1" deduced in
+ // overlapDividerBits calculation earlier.
+ shifter = _m_from_int(overlapDividerBitsPure + 1);
+
+ for (i = 0; i < overlapLength / 4; i ++)
+ {
+ __m64 temp1, temp2;
+
+ // load & shuffle data so that input & mixbuffer data samples are paired
+ temp1 = _mm_unpacklo_pi16(pVMidBuf[0], pVinput[0]); // = i0l m0l i0r m0r
+ temp2 = _mm_unpackhi_pi16(pVMidBuf[0], pVinput[0]); // = i1l m1l i1r m1r
+
+ // temp = (temp .* mix) >> shifter
+ temp1 = _mm_sra_pi32(_mm_madd_pi16(temp1, mix1), shifter);
+ temp2 = _mm_sra_pi32(_mm_madd_pi16(temp2, mix2), shifter);
+ pVdest[0] = _mm_packs_pi32(temp1, temp2); // pack 2*2*32bit => 4*16bit
+
+ // update mix += adder
+ mix1 = _mm_add_pi16(mix1, adder);
+ mix2 = _mm_add_pi16(mix2, adder);
+
+ // --- second round begins here ---
+
+ // load & shuffle data so that input & mixbuffer data samples are paired
+ temp1 = _mm_unpacklo_pi16(pVMidBuf[1], pVinput[1]); // = i2l m2l i2r m2r
+ temp2 = _mm_unpackhi_pi16(pVMidBuf[1], pVinput[1]); // = i3l m3l i3r m3r
+
+ // temp = (temp .* mix) >> shifter
+ temp1 = _mm_sra_pi32(_mm_madd_pi16(temp1, mix1), shifter);
+ temp2 = _mm_sra_pi32(_mm_madd_pi16(temp2, mix2), shifter);
+ pVdest[1] = _mm_packs_pi32(temp1, temp2); // pack 2*2*32bit => 4*16bit
+
+ // update mix += adder
+ mix1 = _mm_add_pi16(mix1, adder);
+ mix2 = _mm_add_pi16(mix2, adder);
+
+ pVinput += 2;
+ pVMidBuf += 2;
+ pVdest += 2;
+ }
+
+ _m_empty(); // clear MMS state
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// implementation of MMX optimized functions of class 'FIRFilter'
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include "FIRFilter.h"
+
+
+FIRFilterMMX::FIRFilterMMX() : FIRFilter()
+{
+ filterCoeffsAlign = NULL;
+ filterCoeffsUnalign = NULL;
+}
+
+
+FIRFilterMMX::~FIRFilterMMX()
+{
+ delete[] filterCoeffsUnalign;
+}
+
+
+// (overloaded) Calculates filter coefficients for MMX routine
+void FIRFilterMMX::setCoefficients(const short *coeffs, uint newLength, uint uResultDivFactor)
+{
+ uint i;
+ FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor);
+
+ // Ensure that filter coeffs array is aligned to 16-byte boundary
+ delete[] filterCoeffsUnalign;
+ filterCoeffsUnalign = new short[2 * newLength + 8];
+ filterCoeffsAlign = (short *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
+
+ // rearrange the filter coefficients for mmx routines
+ for (i = 0;i < length; i += 4)
+ {
+ filterCoeffsAlign[2 * i + 0] = coeffs[i + 0];
+ filterCoeffsAlign[2 * i + 1] = coeffs[i + 2];
+ filterCoeffsAlign[2 * i + 2] = coeffs[i + 0];
+ filterCoeffsAlign[2 * i + 3] = coeffs[i + 2];
+
+ filterCoeffsAlign[2 * i + 4] = coeffs[i + 1];
+ filterCoeffsAlign[2 * i + 5] = coeffs[i + 3];
+ filterCoeffsAlign[2 * i + 6] = coeffs[i + 1];
+ filterCoeffsAlign[2 * i + 7] = coeffs[i + 3];
+ }
+}
+
+
+// mmx-optimized version of the filter routine for stereo sound
+uint FIRFilterMMX::evaluateFilterStereo(short *dest, const short *src, uint numSamples) const
+{
+ // Create stack copies of the needed member variables for asm routines :
+ uint i, j;
+ __m64 *pVdest = (__m64*)dest;
+
+ if (length < 2) return 0;
+
+ for (i = 0; i < (numSamples - length) / 2; i ++)
+ {
+ __m64 accu1;
+ __m64 accu2;
+ const __m64 *pVsrc = (const __m64*)src;
+ const __m64 *pVfilter = (const __m64*)filterCoeffsAlign;
+
+ accu1 = accu2 = _mm_setzero_si64();
+ for (j = 0; j < lengthDiv8 * 2; j ++)
+ {
+ __m64 temp1, temp2;
+
+ temp1 = _mm_unpacklo_pi16(pVsrc[0], pVsrc[1]); // = l2 l0 r2 r0
+ temp2 = _mm_unpackhi_pi16(pVsrc[0], pVsrc[1]); // = l3 l1 r3 r1
+
+ accu1 = _mm_add_pi32(accu1, _mm_madd_pi16(temp1, pVfilter[0])); // += l2*f2+l0*f0 r2*f2+r0*f0
+ accu1 = _mm_add_pi32(accu1, _mm_madd_pi16(temp2, pVfilter[1])); // += l3*f3+l1*f1 r3*f3+r1*f1
+
+ temp1 = _mm_unpacklo_pi16(pVsrc[1], pVsrc[2]); // = l4 l2 r4 r2
+
+ accu2 = _mm_add_pi32(accu2, _mm_madd_pi16(temp2, pVfilter[0])); // += l3*f2+l1*f0 r3*f2+r1*f0
+ accu2 = _mm_add_pi32(accu2, _mm_madd_pi16(temp1, pVfilter[1])); // += l4*f3+l2*f1 r4*f3+r2*f1
+
+ // accu1 += l2*f2+l0*f0 r2*f2+r0*f0
+ // += l3*f3+l1*f1 r3*f3+r1*f1
+
+ // accu2 += l3*f2+l1*f0 r3*f2+r1*f0
+ // l4*f3+l2*f1 r4*f3+r2*f1
+
+ pVfilter += 2;
+ pVsrc += 2;
+ }
+ // accu >>= resultDivFactor
+ accu1 = _mm_srai_pi32(accu1, resultDivFactor);
+ accu2 = _mm_srai_pi32(accu2, resultDivFactor);
+
+ // pack 2*2*32bits => 4*16 bits
+ pVdest[0] = _mm_packs_pi32(accu1, accu2);
+ src += 4;
+ pVdest ++;
+ }
+
+ _m_empty(); // clear emms state
+
+ return (numSamples & 0xfffffffe) - length;
+}
+
+#else
+
+// workaround to not complain about empty module
+bool _dontcomplain_mmx_empty;
+
+#endif // SOUNDTOUCH_ALLOW_MMX
diff --git a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/sse_optimized.cpp b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/sse_optimized.cpp
index cbfa96c55e..b130c52007 100644
--- a/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/sse_optimized.cpp
+++ b/avidemux/common/ADM_audioFilter/src/ADM_soundtouch/sse_optimized.cpp
@@ -1,365 +1,365 @@
-////////////////////////////////////////////////////////////////////////////////
-///
-/// SSE optimized routines for Pentium-III, Athlon-XP and later CPUs. All SSE
-/// optimized functions have been gathered into this single source
-/// code file, regardless to their class or original source code file, in order
-/// to ease porting the library to other compiler and processor platforms.
-///
-/// The SSE-optimizations are programmed using SSE compiler intrinsics that
-/// are supported both by Microsoft Visual C++ and GCC compilers, so this file
-/// should compile with both toolsets.
-///
-/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++
-/// 6.0 processor pack" update to support SSE instruction set. The update is
-/// available for download at Microsoft Developers Network, see here:
-/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx
-///
-/// If the above URL is expired or removed, go to "http://msdn.microsoft.com" and
-/// perform a search with keywords "processor pack".
-///
-/// Author : Copyright (c) Olli Parviainen
-/// Author e-mail : oparviai 'at' iki.fi
-/// SoundTouch WWW: http://www.surina.net/soundtouch
-///
-////////////////////////////////////////////////////////////////////////////////
-//
-// License :
-//
-// SoundTouch audio processing library
-// Copyright (c) Olli Parviainen
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#include "STTypes.h"
-#include "ADM_default.h"
-
-using namespace soundtouch;
-
-#ifdef SOUNDTOUCH_ALLOW_SSE
-
-// SSE routines available only with float sample type
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// implementation of SSE optimized functions of class 'TDStretchSSE'
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include "TDStretch.h"
-#include
-#include
-
-// Calculates cross correlation of two buffers
-double TDStretchSSE::calcCrossCorr(const float *pV1, const float *pV2, double &anorm)
-{
- int i;
- const float *pVec1;
- const __m128 *pVec2;
- __m128 vSum, vNorm;
-
- // Note. It means a major slow-down if the routine needs to tolerate
- // unaligned __m128 memory accesses. It's way faster if we can skip
- // unaligned slots and use _mm_load_ps instruction instead of _mm_loadu_ps.
- // This can mean up to ~ 10-fold difference (incl. part of which is
- // due to skipping every second round for stereo sound though).
- //
- // Compile-time define SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION is provided
- // for choosing if this little cheating is allowed.
-
-#ifdef ST_SIMD_AVOID_UNALIGNED
- // Little cheating allowed, return valid correlation only for
- // aligned locations, meaning every second round for stereo sound.
-
- #define _MM_LOAD _mm_load_ps
-
- if (((ulongptr)pV1) & 15) return -1e50; // skip unaligned locations
-
-#else
- // No cheating allowed, use unaligned load & take the resulting
- // performance hit.
- #define _MM_LOAD _mm_loadu_ps
-#endif
-
- // ensure overlapLength is divisible by 8
- ADM_assert((overlapLength % 8) == 0);
-
- // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
- // Note: pV2 _must_ be aligned to 16-bit boundary, pV1 need not.
- pVec1 = (const float*)pV1;
- pVec2 = (const __m128*)pV2;
- vSum = vNorm = _mm_setzero_ps();
-
- // Unroll the loop by factor of 4 * 4 operations. Use same routine for
- // stereo & mono, for mono it just means twice the amount of unrolling.
- for (i = 0; i < channels * overlapLength / 16; i ++)
- {
- __m128 vTemp;
- // vSum += pV1[0..3] * pV2[0..3]
- vTemp = _MM_LOAD(pVec1);
- vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp ,pVec2[0]));
- vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
-
- // vSum += pV1[4..7] * pV2[4..7]
- vTemp = _MM_LOAD(pVec1 + 4);
- vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[1]));
- vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
-
- // vSum += pV1[8..11] * pV2[8..11]
- vTemp = _MM_LOAD(pVec1 + 8);
- vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[2]));
- vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
-
- // vSum += pV1[12..15] * pV2[12..15]
- vTemp = _MM_LOAD(pVec1 + 12);
- vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[3]));
- vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
-
- pVec1 += 16;
- pVec2 += 4;
- }
-
- // return value = vSum[0] + vSum[1] + vSum[2] + vSum[3]
- float *pvNorm = (float*)&vNorm;
- float norm = (pvNorm[0] + pvNorm[1] + pvNorm[2] + pvNorm[3]);
- anorm = norm;
-
- float *pvSum = (float*)&vSum;
- return (double)(pvSum[0] + pvSum[1] + pvSum[2] + pvSum[3]) / sqrt(norm < 1e-9 ? 1.0 : norm);
-
- /* This is approximately corresponding routine in C-language yet without normalization:
- double corr, norm;
- uint i;
-
- // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
- corr = norm = 0.0;
- for (i = 0; i < channels * overlapLength / 16; i ++)
- {
- corr += pV1[0] * pV2[0] +
- pV1[1] * pV2[1] +
- pV1[2] * pV2[2] +
- pV1[3] * pV2[3] +
- pV1[4] * pV2[4] +
- pV1[5] * pV2[5] +
- pV1[6] * pV2[6] +
- pV1[7] * pV2[7] +
- pV1[8] * pV2[8] +
- pV1[9] * pV2[9] +
- pV1[10] * pV2[10] +
- pV1[11] * pV2[11] +
- pV1[12] * pV2[12] +
- pV1[13] * pV2[13] +
- pV1[14] * pV2[14] +
- pV1[15] * pV2[15];
-
- for (j = 0; j < 15; j ++) norm += pV1[j] * pV1[j];
-
- pV1 += 16;
- pV2 += 16;
- }
- return corr / sqrt(norm);
- */
-}
-
-
-
-double TDStretchSSE::calcCrossCorrAccumulate(const float *pV1, const float *pV2, double &norm)
-{
- // call usual calcCrossCorr function because SSE does not show big benefit of
- // accumulating "norm" value, and also the "norm" rolling algorithm would get
- // complicated due to SSE-specific alignment-vs-nonexact correlation rules.
- return calcCrossCorr(pV1, pV2, norm);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// implementation of SSE optimized functions of class 'FIRFilter'
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include "FIRFilter.h"
-
-FIRFilterSSE::FIRFilterSSE() : FIRFilter()
-{
- filterCoeffsAlign = NULL;
- filterCoeffsUnalign = NULL;
-}
-
-
-FIRFilterSSE::~FIRFilterSSE()
-{
- delete[] filterCoeffsUnalign;
- filterCoeffsAlign = NULL;
- filterCoeffsUnalign = NULL;
-}
-
-
-// (overloaded) Calculates filter coefficients for SSE routine
-void FIRFilterSSE::setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor)
-{
- uint i;
- float fDivider;
-
- FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor);
-
- // Scale the filter coefficients so that it won't be necessary to scale the filtering result
- // also rearrange coefficients suitably for SSE
- // Ensure that filter coeffs array is aligned to 16-byte boundary
- delete[] filterCoeffsUnalign;
- filterCoeffsUnalign = new float[2 * newLength + 4];
- filterCoeffsAlign = (float *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
-
- fDivider = (float)resultDivider;
-
- // rearrange the filter coefficients for mmx routines
- for (i = 0; i < newLength; i ++)
- {
- filterCoeffsAlign[2 * i + 0] =
- filterCoeffsAlign[2 * i + 1] = coeffs[i + 0] / fDivider;
- }
-}
-
-
-
-// SSE-optimized version of the filter routine for stereo sound
-uint FIRFilterSSE::evaluateFilterStereo(float *dest, const float *source, uint numSamples) const
-{
- int count = (int)((numSamples - length) & (uint)-2);
- int j;
-
- ADM_assert(count % 2 == 0);
-
- if (count < 2) return 0;
-
- ADM_assert(source != NULL);
- ADM_assert(dest != NULL);
- ADM_assert((length % 8) == 0);
- ADM_assert(filterCoeffsAlign != NULL);
- ADM_assert(((ulongptr)filterCoeffsAlign) % 16 == 0);
-
- // filter is evaluated for two stereo samples with each iteration, thus use of 'j += 2'
- #pragma omp parallel for
- for (j = 0; j < count; j += 2)
- {
- const float *pSrc;
- float *pDest;
- const __m128 *pFil;
- __m128 sum1, sum2;
- uint i;
-
- pSrc = (const float*)source + j * 2; // source audio data
- pDest = dest + j * 2; // destination audio data
- pFil = (const __m128*)filterCoeffsAlign; // filter coefficients. NOTE: Assumes coefficients
- // are aligned to 16-byte boundary
- sum1 = sum2 = _mm_setzero_ps();
-
- for (i = 0; i < length / 8; i ++)
- {
- // Unroll loop for efficiency & calculate filter for 2*2 stereo samples
- // at each pass
-
- // sum1 is accu for 2*2 filtered stereo sound data at the primary sound data offset
- // sum2 is accu for 2*2 filtered stereo sound data for the next sound sample offset.
-
- sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc) , pFil[0]));
- sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 2), pFil[0]));
-
- sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 4), pFil[1]));
- sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 6), pFil[1]));
-
- sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 8) , pFil[2]));
- sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 10), pFil[2]));
-
- sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 12), pFil[3]));
- sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 14), pFil[3]));
-
- pSrc += 16;
- pFil += 4;
- }
-
- // Now sum1 and sum2 both have a filtered 2-channel sample each, but we still need
- // to sum the two hi- and lo-floats of these registers together.
-
- // post-shuffle & add the filtered values and store to dest.
- _mm_storeu_ps(pDest, _mm_add_ps(
- _mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(1,0,3,2)), // s2_1 s2_0 s1_3 s1_2
- _mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(3,2,1,0)) // s2_3 s2_2 s1_1 s1_0
- ));
- }
-
- // Ideas for further improvement:
- // 1. If it could be guaranteed that 'source' were always aligned to 16-byte
- // boundary, a faster aligned '_mm_load_ps' instruction could be used.
- // 2. If it could be guaranteed that 'dest' were always aligned to 16-byte
- // boundary, a faster '_mm_store_ps' instruction could be used.
-
- return (uint)count;
-
- /* original routine in C-language. please notice the C-version has differently
- organized coefficients though.
- double suml1, suml2;
- double sumr1, sumr2;
- uint i, j;
-
- for (j = 0; j < count; j += 2)
- {
- const float *ptr;
- const float *pFil;
-
- suml1 = sumr1 = 0.0;
- suml2 = sumr2 = 0.0;
- ptr = src;
- pFil = filterCoeffs;
- for (i = 0; i < lengthLocal; i ++)
- {
- // unroll loop for efficiency.
-
- suml1 += ptr[0] * pFil[0] +
- ptr[2] * pFil[2] +
- ptr[4] * pFil[4] +
- ptr[6] * pFil[6];
-
- sumr1 += ptr[1] * pFil[1] +
- ptr[3] * pFil[3] +
- ptr[5] * pFil[5] +
- ptr[7] * pFil[7];
-
- suml2 += ptr[8] * pFil[0] +
- ptr[10] * pFil[2] +
- ptr[12] * pFil[4] +
- ptr[14] * pFil[6];
-
- sumr2 += ptr[9] * pFil[1] +
- ptr[11] * pFil[3] +
- ptr[13] * pFil[5] +
- ptr[15] * pFil[7];
-
- ptr += 16;
- pFil += 8;
- }
- dest[0] = (float)suml1;
- dest[1] = (float)sumr1;
- dest[2] = (float)suml2;
- dest[3] = (float)sumr2;
-
- src += 4;
- dest += 4;
- }
- */
-}
-
-#endif // SOUNDTOUCH_ALLOW_SSE
+////////////////////////////////////////////////////////////////////////////////
+///
+/// SSE optimized routines for Pentium-III, Athlon-XP and later CPUs. All SSE
+/// optimized functions have been gathered into this single source
+/// code file, regardless to their class or original source code file, in order
+/// to ease porting the library to other compiler and processor platforms.
+///
+/// The SSE-optimizations are programmed using SSE compiler intrinsics that
+/// are supported both by Microsoft Visual C++ and GCC compilers, so this file
+/// should compile with both toolsets.
+///
+/// NOTICE: If using Visual Studio 6.0, you'll need to install the "Visual C++
+/// 6.0 processor pack" update to support SSE instruction set. The update is
+/// available for download at Microsoft Developers Network, see here:
+/// http://msdn.microsoft.com/en-us/vstudio/aa718349.aspx
+///
+/// If the above URL is expired or removed, go to "http://msdn.microsoft.com" and
+/// perform a search with keywords "processor pack".
+///
+/// Author : Copyright (c) Olli Parviainen
+/// Author e-mail : oparviai 'at' iki.fi
+/// SoundTouch WWW: http://www.surina.net/soundtouch
+///
+////////////////////////////////////////////////////////////////////////////////
+//
+// License :
+//
+// SoundTouch audio processing library
+// Copyright (c) Olli Parviainen
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#include "STTypes.h"
+#include "ADM_default.h"
+
+using namespace soundtouch;
+
+#ifdef SOUNDTOUCH_ALLOW_SSE
+
+// SSE routines available only with float sample type
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// implementation of SSE optimized functions of class 'TDStretchSSE'
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include "TDStretch.h"
+#include
+#include
+
+// Calculates cross correlation of two buffers
+double TDStretchSSE::calcCrossCorr(const float *pV1, const float *pV2, double &anorm)
+{
+ int i;
+ const float *pVec1;
+ const __m128 *pVec2;
+ __m128 vSum, vNorm;
+
+ // Note. It means a major slow-down if the routine needs to tolerate
+ // unaligned __m128 memory accesses. It's way faster if we can skip
+ // unaligned slots and use _mm_load_ps instruction instead of _mm_loadu_ps.
+ // This can mean up to ~ 10-fold difference (incl. part of which is
+ // due to skipping every second round for stereo sound though).
+ //
+ // Compile-time define SOUNDTOUCH_ALLOW_NONEXACT_SIMD_OPTIMIZATION is provided
+ // for choosing if this little cheating is allowed.
+
+#ifdef ST_SIMD_AVOID_UNALIGNED
+ // Little cheating allowed, return valid correlation only for
+ // aligned locations, meaning every second round for stereo sound.
+
+ #define _MM_LOAD _mm_load_ps
+
+ if (((ulongptr)pV1) & 15) return -1e50; // skip unaligned locations
+
+#else
+ // No cheating allowed, use unaligned load & take the resulting
+ // performance hit.
+ #define _MM_LOAD _mm_loadu_ps
+#endif
+
+ // ensure overlapLength is divisible by 8
+ ADM_assert((overlapLength % 8) == 0);
+
+ // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
+ // Note: pV2 _must_ be aligned to 16-bit boundary, pV1 need not.
+ pVec1 = (const float*)pV1;
+ pVec2 = (const __m128*)pV2;
+ vSum = vNorm = _mm_setzero_ps();
+
+ // Unroll the loop by factor of 4 * 4 operations. Use same routine for
+ // stereo & mono, for mono it just means twice the amount of unrolling.
+ for (i = 0; i < channels * overlapLength / 16; i ++)
+ {
+ __m128 vTemp;
+ // vSum += pV1[0..3] * pV2[0..3]
+ vTemp = _MM_LOAD(pVec1);
+ vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp ,pVec2[0]));
+ vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
+
+ // vSum += pV1[4..7] * pV2[4..7]
+ vTemp = _MM_LOAD(pVec1 + 4);
+ vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[1]));
+ vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
+
+ // vSum += pV1[8..11] * pV2[8..11]
+ vTemp = _MM_LOAD(pVec1 + 8);
+ vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[2]));
+ vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
+
+ // vSum += pV1[12..15] * pV2[12..15]
+ vTemp = _MM_LOAD(pVec1 + 12);
+ vSum = _mm_add_ps(vSum, _mm_mul_ps(vTemp, pVec2[3]));
+ vNorm = _mm_add_ps(vNorm, _mm_mul_ps(vTemp ,vTemp));
+
+ pVec1 += 16;
+ pVec2 += 4;
+ }
+
+ // return value = vSum[0] + vSum[1] + vSum[2] + vSum[3]
+ float *pvNorm = (float*)&vNorm;
+ float norm = (pvNorm[0] + pvNorm[1] + pvNorm[2] + pvNorm[3]);
+ anorm = norm;
+
+ float *pvSum = (float*)&vSum;
+ return (double)(pvSum[0] + pvSum[1] + pvSum[2] + pvSum[3]) / sqrt(norm < 1e-9 ? 1.0 : norm);
+
+ /* This is approximately corresponding routine in C-language yet without normalization:
+ double corr, norm;
+ uint i;
+
+ // Calculates the cross-correlation value between 'pV1' and 'pV2' vectors
+ corr = norm = 0.0;
+ for (i = 0; i < channels * overlapLength / 16; i ++)
+ {
+ corr += pV1[0] * pV2[0] +
+ pV1[1] * pV2[1] +
+ pV1[2] * pV2[2] +
+ pV1[3] * pV2[3] +
+ pV1[4] * pV2[4] +
+ pV1[5] * pV2[5] +
+ pV1[6] * pV2[6] +
+ pV1[7] * pV2[7] +
+ pV1[8] * pV2[8] +
+ pV1[9] * pV2[9] +
+ pV1[10] * pV2[10] +
+ pV1[11] * pV2[11] +
+ pV1[12] * pV2[12] +
+ pV1[13] * pV2[13] +
+ pV1[14] * pV2[14] +
+ pV1[15] * pV2[15];
+
+ for (j = 0; j < 15; j ++) norm += pV1[j] * pV1[j];
+
+ pV1 += 16;
+ pV2 += 16;
+ }
+ return corr / sqrt(norm);
+ */
+}
+
+
+
+double TDStretchSSE::calcCrossCorrAccumulate(const float *pV1, const float *pV2, double &norm)
+{
+ // call usual calcCrossCorr function because SSE does not show big benefit of
+ // accumulating "norm" value, and also the "norm" rolling algorithm would get
+ // complicated due to SSE-specific alignment-vs-nonexact correlation rules.
+ return calcCrossCorr(pV1, pV2, norm);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// implementation of SSE optimized functions of class 'FIRFilter'
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include "FIRFilter.h"
+
+FIRFilterSSE::FIRFilterSSE() : FIRFilter()
+{
+ filterCoeffsAlign = NULL;
+ filterCoeffsUnalign = NULL;
+}
+
+
+FIRFilterSSE::~FIRFilterSSE()
+{
+ delete[] filterCoeffsUnalign;
+ filterCoeffsAlign = NULL;
+ filterCoeffsUnalign = NULL;
+}
+
+
+// (overloaded) Calculates filter coefficients for SSE routine
+void FIRFilterSSE::setCoefficients(const float *coeffs, uint newLength, uint uResultDivFactor)
+{
+ uint i;
+ float fDivider;
+
+ FIRFilter::setCoefficients(coeffs, newLength, uResultDivFactor);
+
+ // Scale the filter coefficients so that it won't be necessary to scale the filtering result
+ // also rearrange coefficients suitably for SSE
+ // Ensure that filter coeffs array is aligned to 16-byte boundary
+ delete[] filterCoeffsUnalign;
+ filterCoeffsUnalign = new float[2 * newLength + 4];
+ filterCoeffsAlign = (float *)SOUNDTOUCH_ALIGN_POINTER_16(filterCoeffsUnalign);
+
+ fDivider = (float)resultDivider;
+
+ // rearrange the filter coefficients for mmx routines
+ for (i = 0; i < newLength; i ++)
+ {
+ filterCoeffsAlign[2 * i + 0] =
+ filterCoeffsAlign[2 * i + 1] = coeffs[i + 0] / fDivider;
+ }
+}
+
+
+
+// SSE-optimized version of the filter routine for stereo sound
+uint FIRFilterSSE::evaluateFilterStereo(float *dest, const float *source, uint numSamples) const
+{
+ int count = (int)((numSamples - length) & (uint)-2);
+ int j;
+
+ ADM_assert(count % 2 == 0);
+
+ if (count < 2) return 0;
+
+ ADM_assert(source != NULL);
+ ADM_assert(dest != NULL);
+ ADM_assert((length % 8) == 0);
+ ADM_assert(filterCoeffsAlign != NULL);
+ ADM_assert(((ulongptr)filterCoeffsAlign) % 16 == 0);
+
+ // filter is evaluated for two stereo samples with each iteration, thus use of 'j += 2'
+ #pragma omp parallel for
+ for (j = 0; j < count; j += 2)
+ {
+ const float *pSrc;
+ float *pDest;
+ const __m128 *pFil;
+ __m128 sum1, sum2;
+ uint i;
+
+ pSrc = (const float*)source + j * 2; // source audio data
+ pDest = dest + j * 2; // destination audio data
+ pFil = (const __m128*)filterCoeffsAlign; // filter coefficients. NOTE: Assumes coefficients
+ // are aligned to 16-byte boundary
+ sum1 = sum2 = _mm_setzero_ps();
+
+ for (i = 0; i < length / 8; i ++)
+ {
+ // Unroll loop for efficiency & calculate filter for 2*2 stereo samples
+ // at each pass
+
+ // sum1 is accu for 2*2 filtered stereo sound data at the primary sound data offset
+ // sum2 is accu for 2*2 filtered stereo sound data for the next sound sample offset.
+
+ sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc) , pFil[0]));
+ sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 2), pFil[0]));
+
+ sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 4), pFil[1]));
+ sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 6), pFil[1]));
+
+ sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 8) , pFil[2]));
+ sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 10), pFil[2]));
+
+ sum1 = _mm_add_ps(sum1, _mm_mul_ps(_mm_loadu_ps(pSrc + 12), pFil[3]));
+ sum2 = _mm_add_ps(sum2, _mm_mul_ps(_mm_loadu_ps(pSrc + 14), pFil[3]));
+
+ pSrc += 16;
+ pFil += 4;
+ }
+
+ // Now sum1 and sum2 both have a filtered 2-channel sample each, but we still need
+ // to sum the two hi- and lo-floats of these registers together.
+
+ // post-shuffle & add the filtered values and store to dest.
+ _mm_storeu_ps(pDest, _mm_add_ps(
+ _mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(1,0,3,2)), // s2_1 s2_0 s1_3 s1_2
+ _mm_shuffle_ps(sum1, sum2, _MM_SHUFFLE(3,2,1,0)) // s2_3 s2_2 s1_1 s1_0
+ ));
+ }
+
+ // Ideas for further improvement:
+ // 1. If it could be guaranteed that 'source' were always aligned to 16-byte
+ // boundary, a faster aligned '_mm_load_ps' instruction could be used.
+ // 2. If it could be guaranteed that 'dest' were always aligned to 16-byte
+ // boundary, a faster '_mm_store_ps' instruction could be used.
+
+ return (uint)count;
+
+ /* original routine in C-language. please notice the C-version has differently
+ organized coefficients though.
+ double suml1, suml2;
+ double sumr1, sumr2;
+ uint i, j;
+
+ for (j = 0; j < count; j += 2)
+ {
+ const float *ptr;
+ const float *pFil;
+
+ suml1 = sumr1 = 0.0;
+ suml2 = sumr2 = 0.0;
+ ptr = src;
+ pFil = filterCoeffs;
+ for (i = 0; i < lengthLocal; i ++)
+ {
+ // unroll loop for efficiency.
+
+ suml1 += ptr[0] * pFil[0] +
+ ptr[2] * pFil[2] +
+ ptr[4] * pFil[4] +
+ ptr[6] * pFil[6];
+
+ sumr1 += ptr[1] * pFil[1] +
+ ptr[3] * pFil[3] +
+ ptr[5] * pFil[5] +
+ ptr[7] * pFil[7];
+
+ suml2 += ptr[8] * pFil[0] +
+ ptr[10] * pFil[2] +
+ ptr[12] * pFil[4] +
+ ptr[14] * pFil[6];
+
+ sumr2 += ptr[9] * pFil[1] +
+ ptr[11] * pFil[3] +
+ ptr[13] * pFil[5] +
+ ptr[15] * pFil[7];
+
+ ptr += 16;
+ pFil += 8;
+ }
+ dest[0] = (float)suml1;
+ dest[1] = (float)sumr1;
+ dest[2] = (float)suml2;
+ dest[3] = (float)sumr2;
+
+ src += 4;
+ dest += 4;
+ }
+ */
+}
+
+#endif // SOUNDTOUCH_ALLOW_SSE
diff --git a/avidemux/common/ADM_icons/tray/film1.xpm b/avidemux/common/ADM_icons/tray/film1.xpm
index 5fd26a9b27..aa26e6ebf9 100644
--- a/avidemux/common/ADM_icons/tray/film1.xpm
+++ b/avidemux/common/ADM_icons/tray/film1.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film1[] = {
-"24 24 256 3",
-"000 c black",
-"001 c transparent",
-"002 c #000008",
-"003 c #070A18",
-"004 c #202432",
-"005 c #202434",
-"006 c #242837",
-"007 c #262837",
-"008 c #262A39",
-"009 c #2A2E3B",
-"010 c #2E323F",
-"011 c #2E3240",
-"012 c #313544",
-"013 c #3C3F4E",
-"014 c #3E414F",
-"015 c #404251",
-"016 c #484C57",
-"017 c #4A4959",
-"018 c #4A4C5B",
-"019 c #50535B",
-"020 c #4C5161",
-"021 c #5A5E66",
-"022 c #5B5F67",
-"023 c #5A5E6B",
-"024 c #5E6271",
-"025 c #757987",
-"026 c #767989",
-"027 c #7A7E85",
-"028 c #B9954A",
-"029 c #C5B434",
-"030 c #E69400",
-"031 c #FFA500",
-"032 c #EABA56",
-"033 c #FFC600",
-"034 c #FFCE00",
-"035 c #FDCA15",
-"036 c #FFD900",
-"037 c #FFD422",
-"038 c #FFE100",
-"039 c #FFE601",
-"040 c #FFE608",
-"041 c #FFF200",
-"042 c #FFF600",
-"043 c #FFFB00",
-"044 c #FFFE00",
-"045 c #FFF237",
-"046 c #FFF63A",
-"047 c #EEC143",
-"048 c #F2C743",
-"049 c #FFDB48",
-"050 c #FFDC61",
-"051 c #FFE17A",
-"052 c #FFFB6B",
-"053 c #82858D",
-"054 c #818292",
-"055 c #828695",
-"056 c #87809C",
-"057 c #878B99",
-"058 c #878B9A",
-"059 c #8A8D95",
-"060 c #9397A6",
-"061 c #9495A5",
-"062 c #9599A1",
-"063 c #969AA9",
-"064 c #9B9FAF",
-"065 c #9C9FAE",
-"066 c #9FA2B0",
-"067 c #A1A2AD",
-"068 c #A6A5B4",
-"069 c #A5A8B7",
-"070 c #A9ADBB",
-"071 c #B5AFB3",
-"072 c #AEB2C0",
-"073 c #B0B4C2",
-"074 c #B3B6C4",
-"075 c #B6BACA",
-"076 c #B9BCCB",
-"077 c #BDBFCA",
-"078 c #E6C18B",
-"079 c #ECD09C",
-"080 c #F6CC82",
-"081 c #F6CE8B",
-"082 c #FAD08F",
-"083 c #FBD391",
-"084 c #FDD39D",
-"085 c #C0C4D2",
-"086 c #C3C5D5",
-"087 c #C3C8D7",
-"088 c #C5C8D6",
-"089 c #C7CCDB",
-"090 c #CDCCD5",
-"091 c #CCCFD7",
-"092 c #D7D8E3",
-"093 c #D7DBE9",
-"094 c #D9DCEE",
-"095 c #DFE1F2",
-"096 c #DFE5F2",
-"097 c #E7D9CF",
-"098 c #E6E6EA",
-"099 c #E0E4F3",
-"100 c #E1E5F2",
-"101 c #E2E6F4",
-"102 c #E5E9F9",
-"103 c #E7EBF8",
-"104 c #E9EDFC",
-"105 c #EAEFFF",
-"106 c #EDEAFF",
-"107 c #ECEFFD",
-"108 c #EDEFFE",
-"109 c #EDF0FF",
-"110 c #EDF2FF",
-"111 c #F7F2E5",
-"112 c #FFF4E3",
-"113 c #F0F1FF",
-"114 c #F0F5FF",
-"115 c #F2F5FF",
-"116 c #F3F6FF",
-"117 c #F4F7FF",
-"118 c #F5F8FF",
-"119 c #F6F9FF",
-"120 c #F6FAFF",
-"121 c #FFFFF4",
-"122 c #F9FCFF",
-"123 c #FBFFFF",
-"124 c #FCFFFF",
-"125 c #FDFFFF",
-"126 c Gray100",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000126126126126126126067027059053022019021091126126126126126126000000",
-"000000126126126126126068024060057008012004005009099126126126126126000000",
-"000000126126126126113006069118063015055010001001013126126126126126000000",
-"000000126126126126061000072064016062076025014000000086126126126126000000",
-"000000126126126126018000007089029048077070003000000023126126126126000000",
-"000000126126126102002000065126039030071115085000000000075126126126000000",
-"000000126126126020000026126126050028126126123074000000058126126126000000",
-"000000126126119056017108126126111098126124116104011000073126126126000000",
-"000000126126126126106126126126126126125118107101066054126126126126000000",
-"000000126126126126126117120122122120115104100093088114126126126126000000",
-"000000126126126126126117105110109107103096092090087126126126126126000000",
-"000000126126126126126112082081097095094079083080084126126126126126000000",
-"000000126126126126126033040052049078047045046036031121126126126126000000",
-"000000126126126126126037041043034032035042044038051126126126126126000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film1[] = {
+"24 24 256 3",
+"000 c black",
+"001 c transparent",
+"002 c #000008",
+"003 c #070A18",
+"004 c #202432",
+"005 c #202434",
+"006 c #242837",
+"007 c #262837",
+"008 c #262A39",
+"009 c #2A2E3B",
+"010 c #2E323F",
+"011 c #2E3240",
+"012 c #313544",
+"013 c #3C3F4E",
+"014 c #3E414F",
+"015 c #404251",
+"016 c #484C57",
+"017 c #4A4959",
+"018 c #4A4C5B",
+"019 c #50535B",
+"020 c #4C5161",
+"021 c #5A5E66",
+"022 c #5B5F67",
+"023 c #5A5E6B",
+"024 c #5E6271",
+"025 c #757987",
+"026 c #767989",
+"027 c #7A7E85",
+"028 c #B9954A",
+"029 c #C5B434",
+"030 c #E69400",
+"031 c #FFA500",
+"032 c #EABA56",
+"033 c #FFC600",
+"034 c #FFCE00",
+"035 c #FDCA15",
+"036 c #FFD900",
+"037 c #FFD422",
+"038 c #FFE100",
+"039 c #FFE601",
+"040 c #FFE608",
+"041 c #FFF200",
+"042 c #FFF600",
+"043 c #FFFB00",
+"044 c #FFFE00",
+"045 c #FFF237",
+"046 c #FFF63A",
+"047 c #EEC143",
+"048 c #F2C743",
+"049 c #FFDB48",
+"050 c #FFDC61",
+"051 c #FFE17A",
+"052 c #FFFB6B",
+"053 c #82858D",
+"054 c #818292",
+"055 c #828695",
+"056 c #87809C",
+"057 c #878B99",
+"058 c #878B9A",
+"059 c #8A8D95",
+"060 c #9397A6",
+"061 c #9495A5",
+"062 c #9599A1",
+"063 c #969AA9",
+"064 c #9B9FAF",
+"065 c #9C9FAE",
+"066 c #9FA2B0",
+"067 c #A1A2AD",
+"068 c #A6A5B4",
+"069 c #A5A8B7",
+"070 c #A9ADBB",
+"071 c #B5AFB3",
+"072 c #AEB2C0",
+"073 c #B0B4C2",
+"074 c #B3B6C4",
+"075 c #B6BACA",
+"076 c #B9BCCB",
+"077 c #BDBFCA",
+"078 c #E6C18B",
+"079 c #ECD09C",
+"080 c #F6CC82",
+"081 c #F6CE8B",
+"082 c #FAD08F",
+"083 c #FBD391",
+"084 c #FDD39D",
+"085 c #C0C4D2",
+"086 c #C3C5D5",
+"087 c #C3C8D7",
+"088 c #C5C8D6",
+"089 c #C7CCDB",
+"090 c #CDCCD5",
+"091 c #CCCFD7",
+"092 c #D7D8E3",
+"093 c #D7DBE9",
+"094 c #D9DCEE",
+"095 c #DFE1F2",
+"096 c #DFE5F2",
+"097 c #E7D9CF",
+"098 c #E6E6EA",
+"099 c #E0E4F3",
+"100 c #E1E5F2",
+"101 c #E2E6F4",
+"102 c #E5E9F9",
+"103 c #E7EBF8",
+"104 c #E9EDFC",
+"105 c #EAEFFF",
+"106 c #EDEAFF",
+"107 c #ECEFFD",
+"108 c #EDEFFE",
+"109 c #EDF0FF",
+"110 c #EDF2FF",
+"111 c #F7F2E5",
+"112 c #FFF4E3",
+"113 c #F0F1FF",
+"114 c #F0F5FF",
+"115 c #F2F5FF",
+"116 c #F3F6FF",
+"117 c #F4F7FF",
+"118 c #F5F8FF",
+"119 c #F6F9FF",
+"120 c #F6FAFF",
+"121 c #FFFFF4",
+"122 c #F9FCFF",
+"123 c #FBFFFF",
+"124 c #FCFFFF",
+"125 c #FDFFFF",
+"126 c Gray100",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000126126126126126126067027059053022019021091126126126126126126000000",
+"000000126126126126126068024060057008012004005009099126126126126126000000",
+"000000126126126126113006069118063015055010001001013126126126126126000000",
+"000000126126126126061000072064016062076025014000000086126126126126000000",
+"000000126126126126018000007089029048077070003000000023126126126126000000",
+"000000126126126102002000065126039030071115085000000000075126126126000000",
+"000000126126126020000026126126050028126126123074000000058126126126000000",
+"000000126126119056017108126126111098126124116104011000073126126126000000",
+"000000126126126126106126126126126126125118107101066054126126126126000000",
+"000000126126126126126117120122122120115104100093088114126126126126000000",
+"000000126126126126126117105110109107103096092090087126126126126126000000",
+"000000126126126126126112082081097095094079083080084126126126126126000000",
+"000000126126126126126033040052049078047045046036031121126126126126000000",
+"000000126126126126126037041043034032035042044038051126126126126126000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film11.xpm b/avidemux/common/ADM_icons/tray/film11.xpm
index 2da9ea2ea6..d3ce803802 100644
--- a/avidemux/common/ADM_icons/tray/film11.xpm
+++ b/avidemux/common/ADM_icons/tray/film11.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film11[] = {
-"24 24 256 3",
-"000 c black",
-"001 c #010000",
-"002 c #020100",
-"003 c #030200",
-"004 c #070601",
-"005 c #070801",
-"006 c #0B0A05",
-"007 c #0D0C06",
-"008 c #0E0D07",
-"009 c #0F0D08",
-"010 c #0F0E08",
-"011 c #100F0A",
-"012 c #11100B",
-"013 c #12110B",
-"014 c #13120C",
-"015 c #14120D",
-"016 c #14130D",
-"017 c #15130F",
-"018 c #151410",
-"019 c #161710",
-"020 c #181711",
-"021 c #191812",
-"022 c #1A1914",
-"023 c #1B1A15",
-"024 c #1C1B16",
-"025 c #1D1C16",
-"026 c #1E1D17",
-"027 c #1F1E19",
-"028 c #201E19",
-"029 c #201F1A",
-"030 c #20201A",
-"031 c #23221C",
-"032 c #23231C",
-"033 c #23231D",
-"034 c #24221C",
-"035 c #24231D",
-"036 c #24231F",
-"037 c #25231F",
-"038 c #25241E",
-"039 c #25251F",
-"040 c #282722",
-"041 c #2A2925",
-"042 c #2B2925",
-"043 c #2E2D27",
-"044 c #322F2B",
-"045 c #32312B",
-"046 c #33312C",
-"047 c #32322E",
-"048 c #37332F",
-"049 c #383731",
-"050 c #3A3934",
-"051 c #3C3C35",
-"052 c #483F3C",
-"053 c #43423C",
-"054 c #474640",
-"055 c #4C4B46",
-"056 c #4D4C48",
-"057 c #4F4E49",
-"058 c #53524E",
-"059 c #53534F",
-"060 c #555450",
-"061 c #575650",
-"062 c #585752",
-"063 c #5D5353",
-"064 c #5A5954",
-"065 c #625E5D",
-"066 c #63625D",
-"067 c #64625E",
-"068 c #676660",
-"069 c #6B6A64",
-"070 c #6E6E6C",
-"071 c #71706C",
-"072 c #72726F",
-"073 c #757573",
-"074 c #777776",
-"075 c #7C7C78",
-"076 c #807D7D",
-"077 c #81817A",
-"078 c #82817F",
-"079 c #878784",
-"080 c #8D8C89",
-"081 c #949391",
-"082 c #969593",
-"083 c #9B9B98",
-"084 c #A2A39D",
-"085 c #A6A3A2",
-"086 c #A7A8A5",
-"087 c #A9A9A5",
-"088 c #AAA9A7",
-"089 c #ABAAA5",
-"090 c #B4B3B1",
-"091 c #B6B5B0",
-"092 c Gray71",
-"093 c #B5B4B6",
-"094 c #BAB9BA",
-"095 c #BBBAB9",
-"096 c #BCBBBB",
-"097 c #BCBDBD",
-"098 c #BDBCBF",
-"099 c #BFBFC1",
-"100 c #C3C3C3",
-"101 c Gray78",
-"102 c Gray81",
-"103 c #D4D3CE",
-"104 c #D4D3D1",
-"105 c #D8D5D0",
-"106 c #DAD8D4",
-"107 c #DADAD8",
-"108 c #E2E2DE",
-"109 c #E4E4E3",
-"110 c #E7E7E8",
-"111 c #EBE9E3",
-"112 c #EAE9EA",
-"113 c #EEEDEB",
-"114 c #F8F7F3",
-"115 c #FEFFFF",
-"116 c Gray100",
-"117 c black",
-"118 c black",
-"119 c black",
-"120 c black",
-"121 c black",
-"122 c black",
-"123 c black",
-"124 c black",
-"125 c black",
-"126 c black",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"116116000000000000116116000000000000116116000000000000116116000000000000",
-"116116000000000000116116000000000000116116000000000000116116000000000000",
-"116116000000000000116116000000000000116116000000000000116116000000000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"116116000000000000116116116116116116116116116116083024022034090116116116",
-"116116000000000000116116116116116116116116107060116111055038079116116116",
-"116116000000000000116116116116116116116096084049028057033016059116116116",
-"116116000000000000116116116116116092041054089056033030072112116116116116",
-"116116000000000000116116116116082110113029025021075115116116116116116116",
-"116116000000000000116116116116109018027008073116116116116116116116116116",
-"116116000000000000116116116116102047068071074088078076085080104116116116",
-"116116000000000000116116116116101087108061105114077103106043053081116116",
-"116116000000000000116116116116116065019046069066067091058045062086116116",
-"116116000000000000116116116116116063023032043051050044040036042093116116",
-"116116000000000000116116116116116052015020026035039031037023012097116116",
-"116116000000000000116116116116116048005010014019016020017009003099116116",
-"116116000000000000116116116116116095064007003007007006011002000098116116",
-"116116000000000000116116116116116116116116100070013001004000000094116116",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"116116000000000000116116000000000000116116000000000000116116000000000000",
-"116116000000000000116116000000000000116116000000000000116116000000000000",
-"116116000000000000116116000000000000116116000000000000116116000000000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film11[] = {
+"24 24 256 3",
+"000 c black",
+"001 c #010000",
+"002 c #020100",
+"003 c #030200",
+"004 c #070601",
+"005 c #070801",
+"006 c #0B0A05",
+"007 c #0D0C06",
+"008 c #0E0D07",
+"009 c #0F0D08",
+"010 c #0F0E08",
+"011 c #100F0A",
+"012 c #11100B",
+"013 c #12110B",
+"014 c #13120C",
+"015 c #14120D",
+"016 c #14130D",
+"017 c #15130F",
+"018 c #151410",
+"019 c #161710",
+"020 c #181711",
+"021 c #191812",
+"022 c #1A1914",
+"023 c #1B1A15",
+"024 c #1C1B16",
+"025 c #1D1C16",
+"026 c #1E1D17",
+"027 c #1F1E19",
+"028 c #201E19",
+"029 c #201F1A",
+"030 c #20201A",
+"031 c #23221C",
+"032 c #23231C",
+"033 c #23231D",
+"034 c #24221C",
+"035 c #24231D",
+"036 c #24231F",
+"037 c #25231F",
+"038 c #25241E",
+"039 c #25251F",
+"040 c #282722",
+"041 c #2A2925",
+"042 c #2B2925",
+"043 c #2E2D27",
+"044 c #322F2B",
+"045 c #32312B",
+"046 c #33312C",
+"047 c #32322E",
+"048 c #37332F",
+"049 c #383731",
+"050 c #3A3934",
+"051 c #3C3C35",
+"052 c #483F3C",
+"053 c #43423C",
+"054 c #474640",
+"055 c #4C4B46",
+"056 c #4D4C48",
+"057 c #4F4E49",
+"058 c #53524E",
+"059 c #53534F",
+"060 c #555450",
+"061 c #575650",
+"062 c #585752",
+"063 c #5D5353",
+"064 c #5A5954",
+"065 c #625E5D",
+"066 c #63625D",
+"067 c #64625E",
+"068 c #676660",
+"069 c #6B6A64",
+"070 c #6E6E6C",
+"071 c #71706C",
+"072 c #72726F",
+"073 c #757573",
+"074 c #777776",
+"075 c #7C7C78",
+"076 c #807D7D",
+"077 c #81817A",
+"078 c #82817F",
+"079 c #878784",
+"080 c #8D8C89",
+"081 c #949391",
+"082 c #969593",
+"083 c #9B9B98",
+"084 c #A2A39D",
+"085 c #A6A3A2",
+"086 c #A7A8A5",
+"087 c #A9A9A5",
+"088 c #AAA9A7",
+"089 c #ABAAA5",
+"090 c #B4B3B1",
+"091 c #B6B5B0",
+"092 c Gray71",
+"093 c #B5B4B6",
+"094 c #BAB9BA",
+"095 c #BBBAB9",
+"096 c #BCBBBB",
+"097 c #BCBDBD",
+"098 c #BDBCBF",
+"099 c #BFBFC1",
+"100 c #C3C3C3",
+"101 c Gray78",
+"102 c Gray81",
+"103 c #D4D3CE",
+"104 c #D4D3D1",
+"105 c #D8D5D0",
+"106 c #DAD8D4",
+"107 c #DADAD8",
+"108 c #E2E2DE",
+"109 c #E4E4E3",
+"110 c #E7E7E8",
+"111 c #EBE9E3",
+"112 c #EAE9EA",
+"113 c #EEEDEB",
+"114 c #F8F7F3",
+"115 c #FEFFFF",
+"116 c Gray100",
+"117 c black",
+"118 c black",
+"119 c black",
+"120 c black",
+"121 c black",
+"122 c black",
+"123 c black",
+"124 c black",
+"125 c black",
+"126 c black",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"116116000000000000116116000000000000116116000000000000116116000000000000",
+"116116000000000000116116000000000000116116000000000000116116000000000000",
+"116116000000000000116116000000000000116116000000000000116116000000000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"116116000000000000116116116116116116116116116116083024022034090116116116",
+"116116000000000000116116116116116116116116107060116111055038079116116116",
+"116116000000000000116116116116116116116096084049028057033016059116116116",
+"116116000000000000116116116116116092041054089056033030072112116116116116",
+"116116000000000000116116116116082110113029025021075115116116116116116116",
+"116116000000000000116116116116109018027008073116116116116116116116116116",
+"116116000000000000116116116116102047068071074088078076085080104116116116",
+"116116000000000000116116116116101087108061105114077103106043053081116116",
+"116116000000000000116116116116116065019046069066067091058045062086116116",
+"116116000000000000116116116116116063023032043051050044040036042093116116",
+"116116000000000000116116116116116052015020026035039031037023012097116116",
+"116116000000000000116116116116116048005010014019016020017009003099116116",
+"116116000000000000116116116116116095064007003007007006011002000098116116",
+"116116000000000000116116116116116116116116100070013001004000000094116116",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"116116000000000000116116000000000000116116000000000000116116000000000000",
+"116116000000000000116116000000000000116116000000000000116116000000000000",
+"116116000000000000116116000000000000116116000000000000116116000000000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film13.xpm b/avidemux/common/ADM_icons/tray/film13.xpm
index 5c9b0fff05..ec79f50158 100644
--- a/avidemux/common/ADM_icons/tray/film13.xpm
+++ b/avidemux/common/ADM_icons/tray/film13.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film13[] = {
-"24 24 256 3",
-"000 c black",
-"001 c #010000",
-"002 c #020100",
-"003 c #030200",
-"004 c #070601",
-"005 c #070801",
-"006 c #0B0A05",
-"007 c #0D0C06",
-"008 c #0E0D07",
-"009 c #0F0D08",
-"010 c #0F0E08",
-"011 c #100F0A",
-"012 c #11100B",
-"013 c #12110B",
-"014 c #13120C",
-"015 c #14120D",
-"016 c #14130D",
-"017 c #15130F",
-"018 c #151410",
-"019 c #161710",
-"020 c #181711",
-"021 c #191812",
-"022 c #1A1914",
-"023 c #1B1A15",
-"024 c #1C1B16",
-"025 c #1D1C16",
-"026 c #1E1D17",
-"027 c #1F1E19",
-"028 c #201E19",
-"029 c #201F1A",
-"030 c #20201A",
-"031 c #23221C",
-"032 c #23231C",
-"033 c #23231D",
-"034 c #24221C",
-"035 c #24231D",
-"036 c #24231F",
-"037 c #25231F",
-"038 c #25241E",
-"039 c #25251F",
-"040 c #282722",
-"041 c #2A2925",
-"042 c #2B2925",
-"043 c #2E2D27",
-"044 c #322F2B",
-"045 c #32312B",
-"046 c #33312C",
-"047 c #32322E",
-"048 c #37332F",
-"049 c #383731",
-"050 c #3A3934",
-"051 c #3C3C35",
-"052 c #483F3C",
-"053 c #43423C",
-"054 c #474640",
-"055 c #4C4B46",
-"056 c #4D4C48",
-"057 c #4F4E49",
-"058 c #53524E",
-"059 c #53534F",
-"060 c #555450",
-"061 c #575650",
-"062 c #585752",
-"063 c #5D5353",
-"064 c #5A5954",
-"065 c #625E5D",
-"066 c #63625D",
-"067 c #64625E",
-"068 c #676660",
-"069 c #6B6A64",
-"070 c #6E6E6C",
-"071 c #71706C",
-"072 c #72726F",
-"073 c #757573",
-"074 c #777776",
-"075 c #7C7C78",
-"076 c #807D7D",
-"077 c #81817A",
-"078 c #82817F",
-"079 c #878784",
-"080 c #8D8C89",
-"081 c #949391",
-"082 c #969593",
-"083 c #9B9B98",
-"084 c #A2A39D",
-"085 c #A6A3A2",
-"086 c #A7A8A5",
-"087 c #A9A9A5",
-"088 c #AAA9A7",
-"089 c #ABAAA5",
-"090 c #B4B3B1",
-"091 c #B6B5B0",
-"092 c Gray71",
-"093 c #B5B4B6",
-"094 c #BAB9BA",
-"095 c #BBBAB9",
-"096 c #BCBBBB",
-"097 c #BCBDBD",
-"098 c #BDBCBF",
-"099 c #BFBFC1",
-"100 c #C3C3C3",
-"101 c Gray78",
-"102 c Gray81",
-"103 c #D4D3CE",
-"104 c #D4D3D1",
-"105 c #D8D5D0",
-"106 c #DAD8D4",
-"107 c #DADAD8",
-"108 c #E2E2DE",
-"109 c #E4E4E3",
-"110 c #E7E7E8",
-"111 c #EBE9E3",
-"112 c #EAE9EA",
-"113 c #EEEDEB",
-"114 c #F8F7F3",
-"115 c #FEFFFF",
-"116 c Gray100",
-"117 c black",
-"118 c black",
-"119 c black",
-"120 c black",
-"121 c black",
-"122 c black",
-"123 c black",
-"124 c black",
-"125 c black",
-"126 c black",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000116116000000000000116116000000000000116116000000000000116116000000",
-"000000116116000000000000116116000000000000116116000000000000116116000000",
-"000000116116000000000000116116000000000000116116000000000000116116000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000116116116116116116116116116116083024022034090116116116116116000000",
-"000000116116116116116116116116107060116111055038079116116116116116000000",
-"000000116116116116116116116096084049028057033016059116116116116116000000",
-"000000116116116116116092041054089056033030072112116116116116116116000000",
-"000000116116116116082110113029025021075115116116116116116116116116000000",
-"000000116116116116109018027008073116116116116116116116116116116116000000",
-"000000116116116116102047068071074088078076085080104116116116116116000000",
-"000000116116116116101087108061105114077103106043053081116116116116000000",
-"000000116116116116116065019046069066067091058045062086116116116116000000",
-"000000116116116116116063023032043051050044040036042093116116116116000000",
-"000000116116116116116052015020026035039031037023012097116116116116000000",
-"000000116116116116116048005010014019016020017009003099116116116116000000",
-"000000116116116116116095064007003007007006011002000098116116116116000000",
-"000000116116116116116116116116100070013001004000000094116116116116000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000116116000000000000116116000000000000116116000000000000116116000000",
-"000000116116000000000000116116000000000000116116000000000000116116000000",
-"000000116116000000000000116116000000000000116116000000000000116116000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film13[] = {
+"24 24 256 3",
+"000 c black",
+"001 c #010000",
+"002 c #020100",
+"003 c #030200",
+"004 c #070601",
+"005 c #070801",
+"006 c #0B0A05",
+"007 c #0D0C06",
+"008 c #0E0D07",
+"009 c #0F0D08",
+"010 c #0F0E08",
+"011 c #100F0A",
+"012 c #11100B",
+"013 c #12110B",
+"014 c #13120C",
+"015 c #14120D",
+"016 c #14130D",
+"017 c #15130F",
+"018 c #151410",
+"019 c #161710",
+"020 c #181711",
+"021 c #191812",
+"022 c #1A1914",
+"023 c #1B1A15",
+"024 c #1C1B16",
+"025 c #1D1C16",
+"026 c #1E1D17",
+"027 c #1F1E19",
+"028 c #201E19",
+"029 c #201F1A",
+"030 c #20201A",
+"031 c #23221C",
+"032 c #23231C",
+"033 c #23231D",
+"034 c #24221C",
+"035 c #24231D",
+"036 c #24231F",
+"037 c #25231F",
+"038 c #25241E",
+"039 c #25251F",
+"040 c #282722",
+"041 c #2A2925",
+"042 c #2B2925",
+"043 c #2E2D27",
+"044 c #322F2B",
+"045 c #32312B",
+"046 c #33312C",
+"047 c #32322E",
+"048 c #37332F",
+"049 c #383731",
+"050 c #3A3934",
+"051 c #3C3C35",
+"052 c #483F3C",
+"053 c #43423C",
+"054 c #474640",
+"055 c #4C4B46",
+"056 c #4D4C48",
+"057 c #4F4E49",
+"058 c #53524E",
+"059 c #53534F",
+"060 c #555450",
+"061 c #575650",
+"062 c #585752",
+"063 c #5D5353",
+"064 c #5A5954",
+"065 c #625E5D",
+"066 c #63625D",
+"067 c #64625E",
+"068 c #676660",
+"069 c #6B6A64",
+"070 c #6E6E6C",
+"071 c #71706C",
+"072 c #72726F",
+"073 c #757573",
+"074 c #777776",
+"075 c #7C7C78",
+"076 c #807D7D",
+"077 c #81817A",
+"078 c #82817F",
+"079 c #878784",
+"080 c #8D8C89",
+"081 c #949391",
+"082 c #969593",
+"083 c #9B9B98",
+"084 c #A2A39D",
+"085 c #A6A3A2",
+"086 c #A7A8A5",
+"087 c #A9A9A5",
+"088 c #AAA9A7",
+"089 c #ABAAA5",
+"090 c #B4B3B1",
+"091 c #B6B5B0",
+"092 c Gray71",
+"093 c #B5B4B6",
+"094 c #BAB9BA",
+"095 c #BBBAB9",
+"096 c #BCBBBB",
+"097 c #BCBDBD",
+"098 c #BDBCBF",
+"099 c #BFBFC1",
+"100 c #C3C3C3",
+"101 c Gray78",
+"102 c Gray81",
+"103 c #D4D3CE",
+"104 c #D4D3D1",
+"105 c #D8D5D0",
+"106 c #DAD8D4",
+"107 c #DADAD8",
+"108 c #E2E2DE",
+"109 c #E4E4E3",
+"110 c #E7E7E8",
+"111 c #EBE9E3",
+"112 c #EAE9EA",
+"113 c #EEEDEB",
+"114 c #F8F7F3",
+"115 c #FEFFFF",
+"116 c Gray100",
+"117 c black",
+"118 c black",
+"119 c black",
+"120 c black",
+"121 c black",
+"122 c black",
+"123 c black",
+"124 c black",
+"125 c black",
+"126 c black",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000116116000000000000116116000000000000116116000000000000116116000000",
+"000000116116000000000000116116000000000000116116000000000000116116000000",
+"000000116116000000000000116116000000000000116116000000000000116116000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000116116116116116116116116116116083024022034090116116116116116000000",
+"000000116116116116116116116116107060116111055038079116116116116116000000",
+"000000116116116116116116116096084049028057033016059116116116116116000000",
+"000000116116116116116092041054089056033030072112116116116116116116000000",
+"000000116116116116082110113029025021075115116116116116116116116116000000",
+"000000116116116116109018027008073116116116116116116116116116116116000000",
+"000000116116116116102047068071074088078076085080104116116116116116000000",
+"000000116116116116101087108061105114077103106043053081116116116116000000",
+"000000116116116116116065019046069066067091058045062086116116116116000000",
+"000000116116116116116063023032043051050044040036042093116116116116000000",
+"000000116116116116116052015020026035039031037023012097116116116116000000",
+"000000116116116116116048005010014019016020017009003099116116116116000000",
+"000000116116116116116095064007003007007006011002000098116116116116000000",
+"000000116116116116116116116116100070013001004000000094116116116116000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000116116000000000000116116000000000000116116000000000000116116000000",
+"000000116116000000000000116116000000000000116116000000000000116116000000",
+"000000116116000000000000116116000000000000116116000000000000116116000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film15.xpm b/avidemux/common/ADM_icons/tray/film15.xpm
index 03c039b6cb..a1b7668be2 100644
--- a/avidemux/common/ADM_icons/tray/film15.xpm
+++ b/avidemux/common/ADM_icons/tray/film15.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film15[] = {
-"24 24 256 3",
-"000 c black",
-"001 c #010000",
-"002 c #020100",
-"003 c #030200",
-"004 c #070601",
-"005 c #070801",
-"006 c #0B0A05",
-"007 c #0D0C06",
-"008 c #0E0D07",
-"009 c #0F0D08",
-"010 c #0F0E08",
-"011 c #100F0A",
-"012 c #11100B",
-"013 c #12110B",
-"014 c #13120C",
-"015 c #14120D",
-"016 c #14130D",
-"017 c #15130F",
-"018 c #151410",
-"019 c #161710",
-"020 c #181711",
-"021 c #191812",
-"022 c #1A1914",
-"023 c #1B1A15",
-"024 c #1C1B16",
-"025 c #1D1C16",
-"026 c #1E1D17",
-"027 c #1F1E19",
-"028 c #201E19",
-"029 c #201F1A",
-"030 c #20201A",
-"031 c #23221C",
-"032 c #23231C",
-"033 c #23231D",
-"034 c #24221C",
-"035 c #24231D",
-"036 c #24231F",
-"037 c #25231F",
-"038 c #25241E",
-"039 c #25251F",
-"040 c #282722",
-"041 c #2A2925",
-"042 c #2B2925",
-"043 c #2E2D27",
-"044 c #322F2B",
-"045 c #32312B",
-"046 c #33312C",
-"047 c #32322E",
-"048 c #37332F",
-"049 c #383731",
-"050 c #3A3934",
-"051 c #3C3C35",
-"052 c #483F3C",
-"053 c #43423C",
-"054 c #474640",
-"055 c #4C4B46",
-"056 c #4D4C48",
-"057 c #4F4E49",
-"058 c #53524E",
-"059 c #53534F",
-"060 c #555450",
-"061 c #575650",
-"062 c #585752",
-"063 c #5D5353",
-"064 c #5A5954",
-"065 c #625E5D",
-"066 c #63625D",
-"067 c #64625E",
-"068 c #676660",
-"069 c #6B6A64",
-"070 c #6E6E6C",
-"071 c #71706C",
-"072 c #72726F",
-"073 c #757573",
-"074 c #777776",
-"075 c #7C7C78",
-"076 c #807D7D",
-"077 c #81817A",
-"078 c #82817F",
-"079 c #878784",
-"080 c #8D8C89",
-"081 c #949391",
-"082 c #969593",
-"083 c #9B9B98",
-"084 c #A2A39D",
-"085 c #A6A3A2",
-"086 c #A7A8A5",
-"087 c #A9A9A5",
-"088 c #AAA9A7",
-"089 c #ABAAA5",
-"090 c #B4B3B1",
-"091 c #B6B5B0",
-"092 c Gray71",
-"093 c #B5B4B6",
-"094 c #BAB9BA",
-"095 c #BBBAB9",
-"096 c #BCBBBB",
-"097 c #BCBDBD",
-"098 c #BDBCBF",
-"099 c #BFBFC1",
-"100 c #C3C3C3",
-"101 c Gray78",
-"102 c Gray81",
-"103 c #D4D3CE",
-"104 c #D4D3D1",
-"105 c #D8D5D0",
-"106 c #DAD8D4",
-"107 c #DADAD8",
-"108 c #E2E2DE",
-"109 c #E4E4E3",
-"110 c #E7E7E8",
-"111 c #EBE9E3",
-"112 c #EAE9EA",
-"113 c #EEEDEB",
-"114 c #F8F7F3",
-"115 c #FEFFFF",
-"116 c Gray100",
-"117 c black",
-"118 c black",
-"119 c black",
-"120 c black",
-"121 c black",
-"122 c black",
-"123 c black",
-"124 c black",
-"125 c black",
-"126 c black",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000000000116116000000000000116116000000000000116116000000000000116116",
-"000000000000116116000000000000116116000000000000116116000000000000116116",
-"000000000000116116000000000000116116000000000000116116000000000000116116",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"116116116116116116116116083024022034090116116116116116000000000000116116",
-"116116116116116116107060116111055038079116116116116116000000000000116116",
-"116116116116116096084049028057033016059116116116116116000000000000116116",
-"116116116092041054089056033030072112116116116116116116000000000000116116",
-"116116082110113029025021075115116116116116116116116116000000000000116116",
-"116116109018027008073116116116116116116116116116116116000000000000116116",
-"116116102047068071074088078076085080104116116116116116000000000000116116",
-"116116101087108061105114077103106043053081116116116116000000000000116116",
-"116116116065019046069066067091058045062086116116116116000000000000116116",
-"116116116063023032043051050044040036042093116116116116000000000000116116",
-"116116116052015020026035039031037023012097116116116116000000000000116116",
-"116116116048005010014019016020017009003099116116116116000000000000116116",
-"116116116095064007003007007006011002000098116116116116000000000000116116",
-"116116116116116116100070013001004000000094116116116116000000000000116116",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000000000116116000000000000116116000000000000116116000000000000116116",
-"000000000000116116000000000000116116000000000000116116000000000000116116",
-"000000000000116116000000000000116116000000000000116116000000000000116116",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film15[] = {
+"24 24 256 3",
+"000 c black",
+"001 c #010000",
+"002 c #020100",
+"003 c #030200",
+"004 c #070601",
+"005 c #070801",
+"006 c #0B0A05",
+"007 c #0D0C06",
+"008 c #0E0D07",
+"009 c #0F0D08",
+"010 c #0F0E08",
+"011 c #100F0A",
+"012 c #11100B",
+"013 c #12110B",
+"014 c #13120C",
+"015 c #14120D",
+"016 c #14130D",
+"017 c #15130F",
+"018 c #151410",
+"019 c #161710",
+"020 c #181711",
+"021 c #191812",
+"022 c #1A1914",
+"023 c #1B1A15",
+"024 c #1C1B16",
+"025 c #1D1C16",
+"026 c #1E1D17",
+"027 c #1F1E19",
+"028 c #201E19",
+"029 c #201F1A",
+"030 c #20201A",
+"031 c #23221C",
+"032 c #23231C",
+"033 c #23231D",
+"034 c #24221C",
+"035 c #24231D",
+"036 c #24231F",
+"037 c #25231F",
+"038 c #25241E",
+"039 c #25251F",
+"040 c #282722",
+"041 c #2A2925",
+"042 c #2B2925",
+"043 c #2E2D27",
+"044 c #322F2B",
+"045 c #32312B",
+"046 c #33312C",
+"047 c #32322E",
+"048 c #37332F",
+"049 c #383731",
+"050 c #3A3934",
+"051 c #3C3C35",
+"052 c #483F3C",
+"053 c #43423C",
+"054 c #474640",
+"055 c #4C4B46",
+"056 c #4D4C48",
+"057 c #4F4E49",
+"058 c #53524E",
+"059 c #53534F",
+"060 c #555450",
+"061 c #575650",
+"062 c #585752",
+"063 c #5D5353",
+"064 c #5A5954",
+"065 c #625E5D",
+"066 c #63625D",
+"067 c #64625E",
+"068 c #676660",
+"069 c #6B6A64",
+"070 c #6E6E6C",
+"071 c #71706C",
+"072 c #72726F",
+"073 c #757573",
+"074 c #777776",
+"075 c #7C7C78",
+"076 c #807D7D",
+"077 c #81817A",
+"078 c #82817F",
+"079 c #878784",
+"080 c #8D8C89",
+"081 c #949391",
+"082 c #969593",
+"083 c #9B9B98",
+"084 c #A2A39D",
+"085 c #A6A3A2",
+"086 c #A7A8A5",
+"087 c #A9A9A5",
+"088 c #AAA9A7",
+"089 c #ABAAA5",
+"090 c #B4B3B1",
+"091 c #B6B5B0",
+"092 c Gray71",
+"093 c #B5B4B6",
+"094 c #BAB9BA",
+"095 c #BBBAB9",
+"096 c #BCBBBB",
+"097 c #BCBDBD",
+"098 c #BDBCBF",
+"099 c #BFBFC1",
+"100 c #C3C3C3",
+"101 c Gray78",
+"102 c Gray81",
+"103 c #D4D3CE",
+"104 c #D4D3D1",
+"105 c #D8D5D0",
+"106 c #DAD8D4",
+"107 c #DADAD8",
+"108 c #E2E2DE",
+"109 c #E4E4E3",
+"110 c #E7E7E8",
+"111 c #EBE9E3",
+"112 c #EAE9EA",
+"113 c #EEEDEB",
+"114 c #F8F7F3",
+"115 c #FEFFFF",
+"116 c Gray100",
+"117 c black",
+"118 c black",
+"119 c black",
+"120 c black",
+"121 c black",
+"122 c black",
+"123 c black",
+"124 c black",
+"125 c black",
+"126 c black",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000000000116116000000000000116116000000000000116116000000000000116116",
+"000000000000116116000000000000116116000000000000116116000000000000116116",
+"000000000000116116000000000000116116000000000000116116000000000000116116",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"116116116116116116116116083024022034090116116116116116000000000000116116",
+"116116116116116116107060116111055038079116116116116116000000000000116116",
+"116116116116116096084049028057033016059116116116116116000000000000116116",
+"116116116092041054089056033030072112116116116116116116000000000000116116",
+"116116082110113029025021075115116116116116116116116116000000000000116116",
+"116116109018027008073116116116116116116116116116116116000000000000116116",
+"116116102047068071074088078076085080104116116116116116000000000000116116",
+"116116101087108061105114077103106043053081116116116116000000000000116116",
+"116116116065019046069066067091058045062086116116116116000000000000116116",
+"116116116063023032043051050044040036042093116116116116000000000000116116",
+"116116116052015020026035039031037023012097116116116116000000000000116116",
+"116116116048005010014019016020017009003099116116116116000000000000116116",
+"116116116095064007003007007006011002000098116116116116000000000000116116",
+"116116116116116116100070013001004000000094116116116116000000000000116116",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000000000116116000000000000116116000000000000116116000000000000116116",
+"000000000000116116000000000000116116000000000000116116000000000000116116",
+"000000000000116116000000000000116116000000000000116116000000000000116116",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film17.xpm b/avidemux/common/ADM_icons/tray/film17.xpm
index 129ae54770..048af6e14f 100644
--- a/avidemux/common/ADM_icons/tray/film17.xpm
+++ b/avidemux/common/ADM_icons/tray/film17.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film17[] = {
-"24 24 256 3",
-"000 c black",
-"001 c #010000",
-"002 c #020100",
-"003 c #030200",
-"004 c #070601",
-"005 c #000008",
-"006 c #070801",
-"007 c #0B0A05",
-"008 c #0D0C06",
-"009 c #0E0D07",
-"010 c #0F0D08",
-"011 c #0F0E08",
-"012 c #100F0A",
-"013 c #11100B",
-"014 c #12110B",
-"015 c #13120C",
-"016 c #14120D",
-"017 c #14130D",
-"018 c #15130F",
-"019 c #161710",
-"020 c #181711",
-"021 c #191812",
-"022 c #1A1914",
-"023 c #1B1A15",
-"024 c #1C1B16",
-"025 c #1D1C16",
-"026 c #1E1D17",
-"027 c #1F1E19",
-"028 c #201E19",
-"029 c #201F1A",
-"030 c #20201A",
-"031 c #23221C",
-"032 c #23231C",
-"033 c #23231D",
-"034 c #24221C",
-"035 c #24231D",
-"036 c #24231F",
-"037 c #25231F",
-"038 c #25241E",
-"039 c #25251F",
-"040 c #282722",
-"041 c #2A2925",
-"042 c #2B2925",
-"043 c #2E2D27",
-"044 c #242837",
-"045 c #322F2B",
-"046 c #32312B",
-"047 c #33312C",
-"048 c #383731",
-"049 c #3A3934",
-"050 c #3C3C35",
-"051 c #43423C",
-"052 c #474640",
-"053 c #4C4B46",
-"054 c #4D4C48",
-"055 c #4F4E49",
-"056 c #4A4959",
-"057 c #4A4C5B",
-"058 c #53524E",
-"059 c #53534F",
-"060 c #555450",
-"061 c #575650",
-"062 c #585752",
-"063 c #5A5954",
-"064 c #4C5161",
-"065 c #63625D",
-"066 c #64625E",
-"067 c #676660",
-"068 c #6B6A64",
-"069 c #6E6E6C",
-"070 c #71706C",
-"071 c #72726F",
-"072 c #757573",
-"073 c #777776",
-"074 c #7C7C78",
-"075 c #767989",
-"076 c #807D7D",
-"077 c #81817A",
-"078 c #82817F",
-"079 c #FFC600",
-"080 c #FFD422",
-"081 c #878784",
-"082 c #8D8C89",
-"083 c #87809C",
-"084 c #949391",
-"085 c #9B9B98",
-"086 c #9495A5",
-"087 c #A2A39D",
-"088 c #A6A3A2",
-"089 c #A7A8A5",
-"090 c #AAA9A7",
-"091 c #ABAAA5",
-"092 c #A6A5B4",
-"093 c #B4B3B1",
-"094 c #B6B5B0",
-"095 c #B5B4B6",
-"096 c #BAB9BA",
-"097 c #BCBBBB",
-"098 c #BCBDBD",
-"099 c #BDBCBF",
-"100 c #BFBFC1",
-"101 c #C3C3C3",
-"102 c #D4D3CE",
-"103 c #D4D3D1",
-"104 c #D8D5D0",
-"105 c #DAD8D4",
-"106 c #DADAD8",
-"107 c #E2E2DE",
-"108 c #EBE9E3",
-"109 c #EAE9EA",
-"110 c #EEEDEB",
-"111 c #E5E9F9",
-"112 c #EDEAFF",
-"113 c #EDEFFE",
-"114 c #FFF4E3",
-"115 c #F0F1FF",
-"116 c #F4F7FF",
-"117 c #F6F9FF",
-"118 c #F8F7F3",
-"119 c #FEFFFF",
-"120 c Gray100",
-"121 c black",
-"122 c black",
-"123 c black",
-"124 c black",
-"125 c black",
-"126 c black",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"120120000000000000120120000000000000120120000000000000120120000000000000",
-"120120000000000000120120000000000000120120000000000000120120000000000000",
-"120120000000000000120120000000000000120120000000000000120120000000000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"120120120120085024022034093120120120120120000000000000120120120120120120",
-"120120106060120108053038081120120120120120000000000000120120120120120092",
-"120097087048028055033017059120120120120120000000000000120120120120115044",
-"041052091054033030071109120120120120120120000000000000120120120120086000",
-"110029025021074119120120120120120120120120000000000000120120120120057000",
-"027009072120120120120120120120120120120120000000000000120120120111005000",
-"067070073090078076088082103120120120120120000000000000120120120064000075",
-"107061104118077102105043051084120120120120000000000000120120117083056113",
-"019047068065066094058046062089120120120120000000000000120120120120112120",
-"023032043050049045040036042095120120120120000000000000120120120120120116",
-"016020026035039031037023013098120120120120000000000000120120120120120116",
-"006011015019017020018010003100120120120120000000000000120120120120120114",
-"063008003008008007012002000099120120120120000000000000120120120120120079",
-"120120101069014001004000000096120120120120000000000000120120120120120080",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"120120000000000000120120000000000000120120000000000000120120000000000000",
-"120120000000000000120120000000000000120120000000000000120120000000000000",
-"120120000000000000120120000000000000120120000000000000120120000000000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film17[] = {
+"24 24 256 3",
+"000 c black",
+"001 c #010000",
+"002 c #020100",
+"003 c #030200",
+"004 c #070601",
+"005 c #000008",
+"006 c #070801",
+"007 c #0B0A05",
+"008 c #0D0C06",
+"009 c #0E0D07",
+"010 c #0F0D08",
+"011 c #0F0E08",
+"012 c #100F0A",
+"013 c #11100B",
+"014 c #12110B",
+"015 c #13120C",
+"016 c #14120D",
+"017 c #14130D",
+"018 c #15130F",
+"019 c #161710",
+"020 c #181711",
+"021 c #191812",
+"022 c #1A1914",
+"023 c #1B1A15",
+"024 c #1C1B16",
+"025 c #1D1C16",
+"026 c #1E1D17",
+"027 c #1F1E19",
+"028 c #201E19",
+"029 c #201F1A",
+"030 c #20201A",
+"031 c #23221C",
+"032 c #23231C",
+"033 c #23231D",
+"034 c #24221C",
+"035 c #24231D",
+"036 c #24231F",
+"037 c #25231F",
+"038 c #25241E",
+"039 c #25251F",
+"040 c #282722",
+"041 c #2A2925",
+"042 c #2B2925",
+"043 c #2E2D27",
+"044 c #242837",
+"045 c #322F2B",
+"046 c #32312B",
+"047 c #33312C",
+"048 c #383731",
+"049 c #3A3934",
+"050 c #3C3C35",
+"051 c #43423C",
+"052 c #474640",
+"053 c #4C4B46",
+"054 c #4D4C48",
+"055 c #4F4E49",
+"056 c #4A4959",
+"057 c #4A4C5B",
+"058 c #53524E",
+"059 c #53534F",
+"060 c #555450",
+"061 c #575650",
+"062 c #585752",
+"063 c #5A5954",
+"064 c #4C5161",
+"065 c #63625D",
+"066 c #64625E",
+"067 c #676660",
+"068 c #6B6A64",
+"069 c #6E6E6C",
+"070 c #71706C",
+"071 c #72726F",
+"072 c #757573",
+"073 c #777776",
+"074 c #7C7C78",
+"075 c #767989",
+"076 c #807D7D",
+"077 c #81817A",
+"078 c #82817F",
+"079 c #FFC600",
+"080 c #FFD422",
+"081 c #878784",
+"082 c #8D8C89",
+"083 c #87809C",
+"084 c #949391",
+"085 c #9B9B98",
+"086 c #9495A5",
+"087 c #A2A39D",
+"088 c #A6A3A2",
+"089 c #A7A8A5",
+"090 c #AAA9A7",
+"091 c #ABAAA5",
+"092 c #A6A5B4",
+"093 c #B4B3B1",
+"094 c #B6B5B0",
+"095 c #B5B4B6",
+"096 c #BAB9BA",
+"097 c #BCBBBB",
+"098 c #BCBDBD",
+"099 c #BDBCBF",
+"100 c #BFBFC1",
+"101 c #C3C3C3",
+"102 c #D4D3CE",
+"103 c #D4D3D1",
+"104 c #D8D5D0",
+"105 c #DAD8D4",
+"106 c #DADAD8",
+"107 c #E2E2DE",
+"108 c #EBE9E3",
+"109 c #EAE9EA",
+"110 c #EEEDEB",
+"111 c #E5E9F9",
+"112 c #EDEAFF",
+"113 c #EDEFFE",
+"114 c #FFF4E3",
+"115 c #F0F1FF",
+"116 c #F4F7FF",
+"117 c #F6F9FF",
+"118 c #F8F7F3",
+"119 c #FEFFFF",
+"120 c Gray100",
+"121 c black",
+"122 c black",
+"123 c black",
+"124 c black",
+"125 c black",
+"126 c black",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"120120000000000000120120000000000000120120000000000000120120000000000000",
+"120120000000000000120120000000000000120120000000000000120120000000000000",
+"120120000000000000120120000000000000120120000000000000120120000000000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"120120120120085024022034093120120120120120000000000000120120120120120120",
+"120120106060120108053038081120120120120120000000000000120120120120120092",
+"120097087048028055033017059120120120120120000000000000120120120120115044",
+"041052091054033030071109120120120120120120000000000000120120120120086000",
+"110029025021074119120120120120120120120120000000000000120120120120057000",
+"027009072120120120120120120120120120120120000000000000120120120111005000",
+"067070073090078076088082103120120120120120000000000000120120120064000075",
+"107061104118077102105043051084120120120120000000000000120120117083056113",
+"019047068065066094058046062089120120120120000000000000120120120120112120",
+"023032043050049045040036042095120120120120000000000000120120120120120116",
+"016020026035039031037023013098120120120120000000000000120120120120120116",
+"006011015019017020018010003100120120120120000000000000120120120120120114",
+"063008003008008007012002000099120120120120000000000000120120120120120079",
+"120120101069014001004000000096120120120120000000000000120120120120120080",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"120120000000000000120120000000000000120120000000000000120120000000000000",
+"120120000000000000120120000000000000120120000000000000120120000000000000",
+"120120000000000000120120000000000000120120000000000000120120000000000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film19.xpm b/avidemux/common/ADM_icons/tray/film19.xpm
index ff3f5f2336..3b58432756 100644
--- a/avidemux/common/ADM_icons/tray/film19.xpm
+++ b/avidemux/common/ADM_icons/tray/film19.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film19[] = {
-"24 24 256 3",
-"000 c black",
-"001 c #010000",
-"002 c #020100",
-"003 c #030200",
-"004 c #070601",
-"005 c #000008",
-"006 c #0B0A05",
-"007 c #0D0C06",
-"008 c #0F0D08",
-"009 c #100F0A",
-"010 c #11100B",
-"011 c #12110B",
-"012 c #14130D",
-"013 c #15130F",
-"014 c #181711",
-"015 c #1A1914",
-"016 c #1B1A15",
-"017 c #1C1B16",
-"018 c #201E19",
-"019 c #20201A",
-"020 c #23221C",
-"021 c #23231D",
-"022 c #24221C",
-"023 c #24231F",
-"024 c #25231F",
-"025 c #25241E",
-"026 c #25251F",
-"027 c #282722",
-"028 c #2B2925",
-"029 c #2E2D27",
-"030 c #242837",
-"031 c #262837",
-"032 c #262A39",
-"033 c #322F2B",
-"034 c #32312B",
-"035 c #3A3934",
-"036 c #43423C",
-"037 c #4C4B46",
-"038 c #4F4E49",
-"039 c #404251",
-"040 c #484C57",
-"041 c #4A4959",
-"042 c #4A4C5B",
-"043 c #53524E",
-"044 c #53534F",
-"045 c #585752",
-"046 c #4C5161",
-"047 c #5E6271",
-"048 c #64625E",
-"049 c #72726F",
-"050 c #7C7C78",
-"051 c #767989",
-"052 c #7A7E85",
-"053 c #807D7D",
-"054 c #81817A",
-"055 c #82817F",
-"056 c #B9954A",
-"057 c #C5B434",
-"058 c #E69400",
-"059 c #EABA56",
-"060 c #FFC600",
-"061 c #FFCE00",
-"062 c #FFD422",
-"063 c #FFE601",
-"064 c #FFE608",
-"065 c #FFF200",
-"066 c #FFFB00",
-"067 c #F2C743",
-"068 c #FFDB48",
-"069 c #FFDC61",
-"070 c #FFFB6B",
-"071 c #878784",
-"072 c #82858D",
-"073 c #8D8C89",
-"074 c #87809C",
-"075 c #878B99",
-"076 c #8A8D95",
-"077 c #949391",
-"078 c #9B9B98",
-"079 c #9397A6",
-"080 c #9495A5",
-"081 c #9599A1",
-"082 c #969AA9",
-"083 c #9B9FAF",
-"084 c #9C9FAE",
-"085 c #A6A3A2",
-"086 c #A1A2AD",
-"087 c #A7A8A5",
-"088 c #A6A5B4",
-"089 c #A5A8B7",
-"090 c #B4B3B1",
-"091 c #B6B5B0",
-"092 c #B5B4B6",
-"093 c #BAB9BA",
-"094 c #BCBDBD",
-"095 c #BDBCBF",
-"096 c #AEB2C0",
-"097 c #BFBFC1",
-"098 c #E6C18B",
-"099 c #F6CE8B",
-"100 c #FAD08F",
-"101 c #C7CCDB",
-"102 c #D4D3CE",
-"103 c #D4D3D1",
-"104 c #DAD8D4",
-"105 c #DFE1F2",
-"106 c #E7D9CF",
-"107 c #E6E6EA",
-"108 c #EBE9E3",
-"109 c #EAE9EA",
-"110 c #E5E9F9",
-"111 c #EAEFFF",
-"112 c #EDEAFF",
-"113 c #ECEFFD",
-"114 c #EDEFFE",
-"115 c #EDF0FF",
-"116 c #EDF2FF",
-"117 c #F7F2E5",
-"118 c #FFF4E3",
-"119 c #F0F1FF",
-"120 c #F4F7FF",
-"121 c #F5F8FF",
-"122 c #F6F9FF",
-"123 c #F6FAFF",
-"124 c #F9FCFF",
-"125 c #FEFFFF",
-"126 c Gray100",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"078017015022090126126126126126000000000000126126126126126126086052076072",
-"126108037025071126126126126126000000000000126126126126126088047079075032",
-"018038021012044126126126126126000000000000126126126126119030089121082039",
-"021019049109126126126126126126000000000000126126126126080000096083040081",
-"050125126126126126126126126126000000000000126126126126042000031101057067",
-"126126126126126126126126126126000000000000126126126110005000084126063058",
-"055053085073103126126126126126000000000000126126126046000051126126069056",
-"054102104029036077126126126126000000000000126126122074041114126126117107",
-"048091043034045087126126126126000000000000126126126126112126126126126126",
-"035033027023028092126126126126000000000000126126126126126120123124124123",
-"026020024016010094126126126126000000000000126126126126126120111116115113",
-"012014013008003097126126126126000000000000126126126126126118100099106105",
-"007006009002000095126126126126000000000000126126126126126060064070068098",
-"011001004000000093126126126126000000000000126126126126126062065066061059",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000126126000000000000126126000000000000126126000000000000126126000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film19[] = {
+"24 24 256 3",
+"000 c black",
+"001 c #010000",
+"002 c #020100",
+"003 c #030200",
+"004 c #070601",
+"005 c #000008",
+"006 c #0B0A05",
+"007 c #0D0C06",
+"008 c #0F0D08",
+"009 c #100F0A",
+"010 c #11100B",
+"011 c #12110B",
+"012 c #14130D",
+"013 c #15130F",
+"014 c #181711",
+"015 c #1A1914",
+"016 c #1B1A15",
+"017 c #1C1B16",
+"018 c #201E19",
+"019 c #20201A",
+"020 c #23221C",
+"021 c #23231D",
+"022 c #24221C",
+"023 c #24231F",
+"024 c #25231F",
+"025 c #25241E",
+"026 c #25251F",
+"027 c #282722",
+"028 c #2B2925",
+"029 c #2E2D27",
+"030 c #242837",
+"031 c #262837",
+"032 c #262A39",
+"033 c #322F2B",
+"034 c #32312B",
+"035 c #3A3934",
+"036 c #43423C",
+"037 c #4C4B46",
+"038 c #4F4E49",
+"039 c #404251",
+"040 c #484C57",
+"041 c #4A4959",
+"042 c #4A4C5B",
+"043 c #53524E",
+"044 c #53534F",
+"045 c #585752",
+"046 c #4C5161",
+"047 c #5E6271",
+"048 c #64625E",
+"049 c #72726F",
+"050 c #7C7C78",
+"051 c #767989",
+"052 c #7A7E85",
+"053 c #807D7D",
+"054 c #81817A",
+"055 c #82817F",
+"056 c #B9954A",
+"057 c #C5B434",
+"058 c #E69400",
+"059 c #EABA56",
+"060 c #FFC600",
+"061 c #FFCE00",
+"062 c #FFD422",
+"063 c #FFE601",
+"064 c #FFE608",
+"065 c #FFF200",
+"066 c #FFFB00",
+"067 c #F2C743",
+"068 c #FFDB48",
+"069 c #FFDC61",
+"070 c #FFFB6B",
+"071 c #878784",
+"072 c #82858D",
+"073 c #8D8C89",
+"074 c #87809C",
+"075 c #878B99",
+"076 c #8A8D95",
+"077 c #949391",
+"078 c #9B9B98",
+"079 c #9397A6",
+"080 c #9495A5",
+"081 c #9599A1",
+"082 c #969AA9",
+"083 c #9B9FAF",
+"084 c #9C9FAE",
+"085 c #A6A3A2",
+"086 c #A1A2AD",
+"087 c #A7A8A5",
+"088 c #A6A5B4",
+"089 c #A5A8B7",
+"090 c #B4B3B1",
+"091 c #B6B5B0",
+"092 c #B5B4B6",
+"093 c #BAB9BA",
+"094 c #BCBDBD",
+"095 c #BDBCBF",
+"096 c #AEB2C0",
+"097 c #BFBFC1",
+"098 c #E6C18B",
+"099 c #F6CE8B",
+"100 c #FAD08F",
+"101 c #C7CCDB",
+"102 c #D4D3CE",
+"103 c #D4D3D1",
+"104 c #DAD8D4",
+"105 c #DFE1F2",
+"106 c #E7D9CF",
+"107 c #E6E6EA",
+"108 c #EBE9E3",
+"109 c #EAE9EA",
+"110 c #E5E9F9",
+"111 c #EAEFFF",
+"112 c #EDEAFF",
+"113 c #ECEFFD",
+"114 c #EDEFFE",
+"115 c #EDF0FF",
+"116 c #EDF2FF",
+"117 c #F7F2E5",
+"118 c #FFF4E3",
+"119 c #F0F1FF",
+"120 c #F4F7FF",
+"121 c #F5F8FF",
+"122 c #F6F9FF",
+"123 c #F6FAFF",
+"124 c #F9FCFF",
+"125 c #FEFFFF",
+"126 c Gray100",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"078017015022090126126126126126000000000000126126126126126126086052076072",
+"126108037025071126126126126126000000000000126126126126126088047079075032",
+"018038021012044126126126126126000000000000126126126126119030089121082039",
+"021019049109126126126126126126000000000000126126126126080000096083040081",
+"050125126126126126126126126126000000000000126126126126042000031101057067",
+"126126126126126126126126126126000000000000126126126110005000084126063058",
+"055053085073103126126126126126000000000000126126126046000051126126069056",
+"054102104029036077126126126126000000000000126126122074041114126126117107",
+"048091043034045087126126126126000000000000126126126126112126126126126126",
+"035033027023028092126126126126000000000000126126126126126120123124124123",
+"026020024016010094126126126126000000000000126126126126126120111116115113",
+"012014013008003097126126126126000000000000126126126126126118100099106105",
+"007006009002000095126126126126000000000000126126126126126060064070068098",
+"011001004000000093126126126126000000000000126126126126126062065066061059",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000126126000000000000126126000000000000126126000000000000126126000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film21.xpm b/avidemux/common/ADM_icons/tray/film21.xpm
index 2990cea975..901ff1d608 100644
--- a/avidemux/common/ADM_icons/tray/film21.xpm
+++ b/avidemux/common/ADM_icons/tray/film21.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film21[] = {
-"24 24 256 3",
-"000 c black",
-"001 c transparent",
-"002 c #030200",
-"003 c #000008",
-"004 c #070A18",
-"005 c #11100B",
-"006 c #2B2925",
-"007 c #202432",
-"008 c #202434",
-"009 c #242837",
-"010 c #262837",
-"011 c #262A39",
-"012 c #2A2E3B",
-"013 c #2E323F",
-"014 c #313544",
-"015 c #3E414F",
-"016 c #43423C",
-"017 c #404251",
-"018 c #484C57",
-"019 c #4A4959",
-"020 c #4A4C5B",
-"021 c #53534F",
-"022 c #50535B",
-"023 c #585752",
-"024 c #4C5161",
-"025 c #5A5E66",
-"026 c #5B5F67",
-"027 c #5E6271",
-"028 c #757987",
-"029 c #767989",
-"030 c #7A7E85",
-"031 c #B9954A",
-"032 c #C5B434",
-"033 c #E69400",
-"034 c #EABA56",
-"035 c #FFC600",
-"036 c #FFCE00",
-"037 c #FDCA15",
-"038 c #FFD900",
-"039 c #FFD422",
-"040 c #FFE100",
-"041 c #FFE601",
-"042 c #FFE608",
-"043 c #FFF200",
-"044 c #FFF600",
-"045 c #FFFB00",
-"046 c #FFFE00",
-"047 c #FFF237",
-"048 c #FFF63A",
-"049 c #EEC143",
-"050 c #F2C743",
-"051 c #FFDB48",
-"052 c #FFDC61",
-"053 c #FFFB6B",
-"054 c #878784",
-"055 c #82858D",
-"056 c #828695",
-"057 c #87809C",
-"058 c #878B99",
-"059 c #8A8D95",
-"060 c #949391",
-"061 c #9397A6",
-"062 c #9495A5",
-"063 c #9599A1",
-"064 c #969AA9",
-"065 c #9B9FAF",
-"066 c #9C9FAE",
-"067 c #A1A2AD",
-"068 c #A7A8A5",
-"069 c #A6A5B4",
-"070 c #A5A8B7",
-"071 c #A9ADBB",
-"072 c #B5AFB3",
-"073 c #B4B3B1",
-"074 c #B5B4B6",
-"075 c #BAB9BA",
-"076 c #BCBDBD",
-"077 c #BDBCBF",
-"078 c #AEB2C0",
-"079 c #B3B6C4",
-"080 c #BFBFC1",
-"081 c #B9BCCB",
-"082 c #BDBFCA",
-"083 c #E6C18B",
-"084 c #ECD09C",
-"085 c #F6CC82",
-"086 c #F6CE8B",
-"087 c #FAD08F",
-"088 c #FBD391",
-"089 c #C0C4D2",
-"090 c #C7CCDB",
-"091 c #CDCCD5",
-"092 c #CCCFD7",
-"093 c #D4D3D1",
-"094 c #D7D8E3",
-"095 c #D7DBE9",
-"096 c #D9DCEE",
-"097 c #DFE1F2",
-"098 c #DFE5F2",
-"099 c #E7D9CF",
-"100 c #E6E6EA",
-"101 c #E1E5F2",
-"102 c #E2E6F4",
-"103 c #E5E9F9",
-"104 c #E7EBF8",
-"105 c #E9EDFC",
-"106 c #EAEFFF",
-"107 c #EDEAFF",
-"108 c #ECEFFD",
-"109 c #EDEFFE",
-"110 c #EDF0FF",
-"111 c #EDF2FF",
-"112 c #F7F2E5",
-"113 c #FFF4E3",
-"114 c #F0F1FF",
-"115 c #F2F5FF",
-"116 c #F3F6FF",
-"117 c #F4F7FF",
-"118 c #F5F8FF",
-"119 c #F6F9FF",
-"120 c #F6FAFF",
-"121 c #F9FCFF",
-"122 c #FBFFFF",
-"123 c #FCFFFF",
-"124 c #FDFFFF",
-"125 c Gray100",
-"126 c black",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000000000125125000000000000125125000000000000125125000000000000125125",
-"000000000000125125000000000000125125000000000000125125000000000000125125",
-"000000000000125125000000000000125125000000000000125125000000000000125125",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"073125125125125125000000000000125125125125125125067030059055026022025092",
-"054125125125125125000000000000125125125125125069027061058011014007008012",
-"021125125125125125000000000000125125125125114009070118064017056013001001",
-"125125125125125125000000000000125125125125062000078065018063081028015000",
-"125125125125125125000000000000125125125125020000010090032050082071004000",
-"125125125125125125000000000000125125125103003000066125041033072115089000",
-"093125125125125125000000000000125125125024000029125125052031125125122079",
-"016060125125125125000000000000125125119057019109125125112100125123116105",
-"023068125125125125000000000000125125125125107125125125125125124118108102",
-"006074125125125125000000000000125125125125125117120121121120115105101095",
-"005076125125125125000000000000125125125125125117106111110108104098094091",
-"002080125125125125000000000000125125125125125113087086099097096084088085",
-"000077125125125125000000000000125125125125125035042053051083049047048038",
-"000075125125125125000000000000125125125125125039043045036034037044046040",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000000000125125000000000000125125000000000000125125000000000000125125",
-"000000000000125125000000000000125125000000000000125125000000000000125125",
-"000000000000125125000000000000125125000000000000125125000000000000125125",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film21[] = {
+"24 24 256 3",
+"000 c black",
+"001 c transparent",
+"002 c #030200",
+"003 c #000008",
+"004 c #070A18",
+"005 c #11100B",
+"006 c #2B2925",
+"007 c #202432",
+"008 c #202434",
+"009 c #242837",
+"010 c #262837",
+"011 c #262A39",
+"012 c #2A2E3B",
+"013 c #2E323F",
+"014 c #313544",
+"015 c #3E414F",
+"016 c #43423C",
+"017 c #404251",
+"018 c #484C57",
+"019 c #4A4959",
+"020 c #4A4C5B",
+"021 c #53534F",
+"022 c #50535B",
+"023 c #585752",
+"024 c #4C5161",
+"025 c #5A5E66",
+"026 c #5B5F67",
+"027 c #5E6271",
+"028 c #757987",
+"029 c #767989",
+"030 c #7A7E85",
+"031 c #B9954A",
+"032 c #C5B434",
+"033 c #E69400",
+"034 c #EABA56",
+"035 c #FFC600",
+"036 c #FFCE00",
+"037 c #FDCA15",
+"038 c #FFD900",
+"039 c #FFD422",
+"040 c #FFE100",
+"041 c #FFE601",
+"042 c #FFE608",
+"043 c #FFF200",
+"044 c #FFF600",
+"045 c #FFFB00",
+"046 c #FFFE00",
+"047 c #FFF237",
+"048 c #FFF63A",
+"049 c #EEC143",
+"050 c #F2C743",
+"051 c #FFDB48",
+"052 c #FFDC61",
+"053 c #FFFB6B",
+"054 c #878784",
+"055 c #82858D",
+"056 c #828695",
+"057 c #87809C",
+"058 c #878B99",
+"059 c #8A8D95",
+"060 c #949391",
+"061 c #9397A6",
+"062 c #9495A5",
+"063 c #9599A1",
+"064 c #969AA9",
+"065 c #9B9FAF",
+"066 c #9C9FAE",
+"067 c #A1A2AD",
+"068 c #A7A8A5",
+"069 c #A6A5B4",
+"070 c #A5A8B7",
+"071 c #A9ADBB",
+"072 c #B5AFB3",
+"073 c #B4B3B1",
+"074 c #B5B4B6",
+"075 c #BAB9BA",
+"076 c #BCBDBD",
+"077 c #BDBCBF",
+"078 c #AEB2C0",
+"079 c #B3B6C4",
+"080 c #BFBFC1",
+"081 c #B9BCCB",
+"082 c #BDBFCA",
+"083 c #E6C18B",
+"084 c #ECD09C",
+"085 c #F6CC82",
+"086 c #F6CE8B",
+"087 c #FAD08F",
+"088 c #FBD391",
+"089 c #C0C4D2",
+"090 c #C7CCDB",
+"091 c #CDCCD5",
+"092 c #CCCFD7",
+"093 c #D4D3D1",
+"094 c #D7D8E3",
+"095 c #D7DBE9",
+"096 c #D9DCEE",
+"097 c #DFE1F2",
+"098 c #DFE5F2",
+"099 c #E7D9CF",
+"100 c #E6E6EA",
+"101 c #E1E5F2",
+"102 c #E2E6F4",
+"103 c #E5E9F9",
+"104 c #E7EBF8",
+"105 c #E9EDFC",
+"106 c #EAEFFF",
+"107 c #EDEAFF",
+"108 c #ECEFFD",
+"109 c #EDEFFE",
+"110 c #EDF0FF",
+"111 c #EDF2FF",
+"112 c #F7F2E5",
+"113 c #FFF4E3",
+"114 c #F0F1FF",
+"115 c #F2F5FF",
+"116 c #F3F6FF",
+"117 c #F4F7FF",
+"118 c #F5F8FF",
+"119 c #F6F9FF",
+"120 c #F6FAFF",
+"121 c #F9FCFF",
+"122 c #FBFFFF",
+"123 c #FCFFFF",
+"124 c #FDFFFF",
+"125 c Gray100",
+"126 c black",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000000000125125000000000000125125000000000000125125000000000000125125",
+"000000000000125125000000000000125125000000000000125125000000000000125125",
+"000000000000125125000000000000125125000000000000125125000000000000125125",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"073125125125125125000000000000125125125125125125067030059055026022025092",
+"054125125125125125000000000000125125125125125069027061058011014007008012",
+"021125125125125125000000000000125125125125114009070118064017056013001001",
+"125125125125125125000000000000125125125125062000078065018063081028015000",
+"125125125125125125000000000000125125125125020000010090032050082071004000",
+"125125125125125125000000000000125125125103003000066125041033072115089000",
+"093125125125125125000000000000125125125024000029125125052031125125122079",
+"016060125125125125000000000000125125119057019109125125112100125123116105",
+"023068125125125125000000000000125125125125107125125125125125124118108102",
+"006074125125125125000000000000125125125125125117120121121120115105101095",
+"005076125125125125000000000000125125125125125117106111110108104098094091",
+"002080125125125125000000000000125125125125125113087086099097096084088085",
+"000077125125125125000000000000125125125125125035042053051083049047048038",
+"000075125125125125000000000000125125125125125039043045036034037044046040",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000000000125125000000000000125125000000000000125125000000000000125125",
+"000000000000125125000000000000125125000000000000125125000000000000125125",
+"000000000000125125000000000000125125000000000000125125000000000000125125",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film23.xpm b/avidemux/common/ADM_icons/tray/film23.xpm
index 4f31ebceb8..e22206ce24 100644
--- a/avidemux/common/ADM_icons/tray/film23.xpm
+++ b/avidemux/common/ADM_icons/tray/film23.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film23[] = {
-"24 24 256 3",
-"000 c black",
-"001 c transparent",
-"002 c #000008",
-"003 c #070A18",
-"004 c #202432",
-"005 c #202434",
-"006 c #242837",
-"007 c #262837",
-"008 c #262A39",
-"009 c #2A2E3B",
-"010 c #2E323F",
-"011 c #2E3240",
-"012 c #313544",
-"013 c #3C3F4E",
-"014 c #3E414F",
-"015 c #404251",
-"016 c #484C57",
-"017 c #4A4959",
-"018 c #4A4C5B",
-"019 c #50535B",
-"020 c #4C5161",
-"021 c #5A5E66",
-"022 c #5B5F67",
-"023 c #5A5E6B",
-"024 c #5E6271",
-"025 c #757987",
-"026 c #767989",
-"027 c #7A7E85",
-"028 c #B9954A",
-"029 c #C5B434",
-"030 c #E69400",
-"031 c #FFA500",
-"032 c #EABA56",
-"033 c #FFC600",
-"034 c #FFCE00",
-"035 c #FDCA15",
-"036 c #FFD900",
-"037 c #FFD422",
-"038 c #FFE100",
-"039 c #FFE601",
-"040 c #FFE608",
-"041 c #FFF200",
-"042 c #FFF600",
-"043 c #FFFB00",
-"044 c #FFFE00",
-"045 c #FFF237",
-"046 c #FFF63A",
-"047 c #EEC143",
-"048 c #F2C743",
-"049 c #FFDB48",
-"050 c #FFDC61",
-"051 c #FFE17A",
-"052 c #FFFB6B",
-"053 c #82858D",
-"054 c #818292",
-"055 c #828695",
-"056 c #87809C",
-"057 c #878B99",
-"058 c #878B9A",
-"059 c #8A8D95",
-"060 c #9397A6",
-"061 c #9495A5",
-"062 c #9599A1",
-"063 c #969AA9",
-"064 c #9B9FAF",
-"065 c #9C9FAE",
-"066 c #9FA2B0",
-"067 c #A1A2AD",
-"068 c #A6A5B4",
-"069 c #A5A8B7",
-"070 c #A9ADBB",
-"071 c #B5AFB3",
-"072 c #AEB2C0",
-"073 c #B0B4C2",
-"074 c #B3B6C4",
-"075 c #B6BACA",
-"076 c #B9BCCB",
-"077 c #BDBFCA",
-"078 c #E6C18B",
-"079 c #ECD09C",
-"080 c #F6CC82",
-"081 c #F6CE8B",
-"082 c #FAD08F",
-"083 c #FBD391",
-"084 c #FDD39D",
-"085 c #C0C4D2",
-"086 c #C3C5D5",
-"087 c #C3C8D7",
-"088 c #C5C8D6",
-"089 c #C7CCDB",
-"090 c #CDCCD5",
-"091 c #CCCFD7",
-"092 c #D7D8E3",
-"093 c #D7DBE9",
-"094 c #D9DCEE",
-"095 c #DFE1F2",
-"096 c #DFE5F2",
-"097 c #E7D9CF",
-"098 c #E6E6EA",
-"099 c #E0E4F3",
-"100 c #E1E5F2",
-"101 c #E2E6F4",
-"102 c #E5E9F9",
-"103 c #E7EBF8",
-"104 c #E9EDFC",
-"105 c #EAEFFF",
-"106 c #EDEAFF",
-"107 c #ECEFFD",
-"108 c #EDEFFE",
-"109 c #EDF0FF",
-"110 c #EDF2FF",
-"111 c #F7F2E5",
-"112 c #FFF4E3",
-"113 c #F0F1FF",
-"114 c #F0F5FF",
-"115 c #F2F5FF",
-"116 c #F3F6FF",
-"117 c #F4F7FF",
-"118 c #F5F8FF",
-"119 c #F6F9FF",
-"120 c #F6FAFF",
-"121 c #FFFFF4",
-"122 c #F9FCFF",
-"123 c #FBFFFF",
-"124 c #FCFFFF",
-"125 c #FDFFFF",
-"126 c Gray100",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"126126000000000000126126000000000000126126000000000000126126000000000000",
-"126126000000000000126126000000000000126126000000000000126126000000000000",
-"126126000000000000126126000000000000126126000000000000126126000000000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"126126000000000000126126126126126126067027059053022019021091126126126126",
-"126126000000000000126126126126126068024060057008012004005009099126126126",
-"126126000000000000126126126126113006069118063015055010001001013126126126",
-"126126000000000000126126126126061000072064016062076025014000000086126126",
-"126126000000000000126126126126018000007089029048077070003000000023126126",
-"126126000000000000126126126102002000065126039030071115085000000000075126",
-"126126000000000000126126126020000026126126050028126126123074000000058126",
-"126126000000000000126126119056017108126126111098126124116104011000073126",
-"126126000000000000126126126126106126126126126126125118107101066054126126",
-"126126000000000000126126126126126117120122122120115104100093088114126126",
-"126126000000000000126126126126126117105110109107103096092090087126126126",
-"126126000000000000126126126126126112082081097095094079083080084126126126",
-"126126000000000000126126126126126033040052049078047045046036031121126126",
-"126126000000000000126126126126126037041043034032035042044038051126126126",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"126126000000000000126126000000000000126126000000000000126126000000000000",
-"126126000000000000126126000000000000126126000000000000126126000000000000",
-"126126000000000000126126000000000000126126000000000000126126000000000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film23[] = {
+"24 24 256 3",
+"000 c black",
+"001 c transparent",
+"002 c #000008",
+"003 c #070A18",
+"004 c #202432",
+"005 c #202434",
+"006 c #242837",
+"007 c #262837",
+"008 c #262A39",
+"009 c #2A2E3B",
+"010 c #2E323F",
+"011 c #2E3240",
+"012 c #313544",
+"013 c #3C3F4E",
+"014 c #3E414F",
+"015 c #404251",
+"016 c #484C57",
+"017 c #4A4959",
+"018 c #4A4C5B",
+"019 c #50535B",
+"020 c #4C5161",
+"021 c #5A5E66",
+"022 c #5B5F67",
+"023 c #5A5E6B",
+"024 c #5E6271",
+"025 c #757987",
+"026 c #767989",
+"027 c #7A7E85",
+"028 c #B9954A",
+"029 c #C5B434",
+"030 c #E69400",
+"031 c #FFA500",
+"032 c #EABA56",
+"033 c #FFC600",
+"034 c #FFCE00",
+"035 c #FDCA15",
+"036 c #FFD900",
+"037 c #FFD422",
+"038 c #FFE100",
+"039 c #FFE601",
+"040 c #FFE608",
+"041 c #FFF200",
+"042 c #FFF600",
+"043 c #FFFB00",
+"044 c #FFFE00",
+"045 c #FFF237",
+"046 c #FFF63A",
+"047 c #EEC143",
+"048 c #F2C743",
+"049 c #FFDB48",
+"050 c #FFDC61",
+"051 c #FFE17A",
+"052 c #FFFB6B",
+"053 c #82858D",
+"054 c #818292",
+"055 c #828695",
+"056 c #87809C",
+"057 c #878B99",
+"058 c #878B9A",
+"059 c #8A8D95",
+"060 c #9397A6",
+"061 c #9495A5",
+"062 c #9599A1",
+"063 c #969AA9",
+"064 c #9B9FAF",
+"065 c #9C9FAE",
+"066 c #9FA2B0",
+"067 c #A1A2AD",
+"068 c #A6A5B4",
+"069 c #A5A8B7",
+"070 c #A9ADBB",
+"071 c #B5AFB3",
+"072 c #AEB2C0",
+"073 c #B0B4C2",
+"074 c #B3B6C4",
+"075 c #B6BACA",
+"076 c #B9BCCB",
+"077 c #BDBFCA",
+"078 c #E6C18B",
+"079 c #ECD09C",
+"080 c #F6CC82",
+"081 c #F6CE8B",
+"082 c #FAD08F",
+"083 c #FBD391",
+"084 c #FDD39D",
+"085 c #C0C4D2",
+"086 c #C3C5D5",
+"087 c #C3C8D7",
+"088 c #C5C8D6",
+"089 c #C7CCDB",
+"090 c #CDCCD5",
+"091 c #CCCFD7",
+"092 c #D7D8E3",
+"093 c #D7DBE9",
+"094 c #D9DCEE",
+"095 c #DFE1F2",
+"096 c #DFE5F2",
+"097 c #E7D9CF",
+"098 c #E6E6EA",
+"099 c #E0E4F3",
+"100 c #E1E5F2",
+"101 c #E2E6F4",
+"102 c #E5E9F9",
+"103 c #E7EBF8",
+"104 c #E9EDFC",
+"105 c #EAEFFF",
+"106 c #EDEAFF",
+"107 c #ECEFFD",
+"108 c #EDEFFE",
+"109 c #EDF0FF",
+"110 c #EDF2FF",
+"111 c #F7F2E5",
+"112 c #FFF4E3",
+"113 c #F0F1FF",
+"114 c #F0F5FF",
+"115 c #F2F5FF",
+"116 c #F3F6FF",
+"117 c #F4F7FF",
+"118 c #F5F8FF",
+"119 c #F6F9FF",
+"120 c #F6FAFF",
+"121 c #FFFFF4",
+"122 c #F9FCFF",
+"123 c #FBFFFF",
+"124 c #FCFFFF",
+"125 c #FDFFFF",
+"126 c Gray100",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"126126000000000000126126000000000000126126000000000000126126000000000000",
+"126126000000000000126126000000000000126126000000000000126126000000000000",
+"126126000000000000126126000000000000126126000000000000126126000000000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"126126000000000000126126126126126126067027059053022019021091126126126126",
+"126126000000000000126126126126126068024060057008012004005009099126126126",
+"126126000000000000126126126126113006069118063015055010001001013126126126",
+"126126000000000000126126126126061000072064016062076025014000000086126126",
+"126126000000000000126126126126018000007089029048077070003000000023126126",
+"126126000000000000126126126102002000065126039030071115085000000000075126",
+"126126000000000000126126126020000026126126050028126126123074000000058126",
+"126126000000000000126126119056017108126126111098126124116104011000073126",
+"126126000000000000126126126126106126126126126126125118107101066054126126",
+"126126000000000000126126126126126117120122122120115104100093088114126126",
+"126126000000000000126126126126126117105110109107103096092090087126126126",
+"126126000000000000126126126126126112082081097095094079083080084126126126",
+"126126000000000000126126126126126033040052049078047045046036031121126126",
+"126126000000000000126126126126126037041043034032035042044038051126126126",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"126126000000000000126126000000000000126126000000000000126126000000000000",
+"126126000000000000126126000000000000126126000000000000126126000000000000",
+"126126000000000000126126000000000000126126000000000000126126000000000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film3.xpm b/avidemux/common/ADM_icons/tray/film3.xpm
index 24f68b7e9f..acf85253c3 100644
--- a/avidemux/common/ADM_icons/tray/film3.xpm
+++ b/avidemux/common/ADM_icons/tray/film3.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film3[] = {
-"24 24 256 3",
-"000 c black",
-"001 c transparent",
-"002 c #000008",
-"003 c #070A18",
-"004 c #202432",
-"005 c #202434",
-"006 c #242837",
-"007 c #262837",
-"008 c #262A39",
-"009 c #2A2E3B",
-"010 c #2E323F",
-"011 c #2E3240",
-"012 c #313544",
-"013 c #3C3F4E",
-"014 c #3E414F",
-"015 c #404251",
-"016 c #484C57",
-"017 c #4A4959",
-"018 c #4A4C5B",
-"019 c #50535B",
-"020 c #4C5161",
-"021 c #5A5E66",
-"022 c #5B5F67",
-"023 c #5A5E6B",
-"024 c #5E6271",
-"025 c #757987",
-"026 c #767989",
-"027 c #7A7E85",
-"028 c #B9954A",
-"029 c #C5B434",
-"030 c #E69400",
-"031 c #FFA500",
-"032 c #EABA56",
-"033 c #FFC600",
-"034 c #FFCE00",
-"035 c #FDCA15",
-"036 c #FFD900",
-"037 c #FFD422",
-"038 c #FFE100",
-"039 c #FFE601",
-"040 c #FFE608",
-"041 c #FFF200",
-"042 c #FFF600",
-"043 c #FFFB00",
-"044 c #FFFE00",
-"045 c #FFF237",
-"046 c #FFF63A",
-"047 c #EEC143",
-"048 c #F2C743",
-"049 c #FFDB48",
-"050 c #FFDC61",
-"051 c #FFE17A",
-"052 c #FFFB6B",
-"053 c #82858D",
-"054 c #818292",
-"055 c #828695",
-"056 c #87809C",
-"057 c #878B99",
-"058 c #878B9A",
-"059 c #8A8D95",
-"060 c #9397A6",
-"061 c #9495A5",
-"062 c #9599A1",
-"063 c #969AA9",
-"064 c #9B9FAF",
-"065 c #9C9FAE",
-"066 c #9FA2B0",
-"067 c #A1A2AD",
-"068 c #A6A5B4",
-"069 c #A5A8B7",
-"070 c #A9ADBB",
-"071 c #B5AFB3",
-"072 c #AEB2C0",
-"073 c #B0B4C2",
-"074 c #B3B6C4",
-"075 c #B6BACA",
-"076 c #B9BCCB",
-"077 c #BDBFCA",
-"078 c #E6C18B",
-"079 c #ECD09C",
-"080 c #F6CC82",
-"081 c #F6CE8B",
-"082 c #FAD08F",
-"083 c #FBD391",
-"084 c #FDD39D",
-"085 c #C0C4D2",
-"086 c #C3C5D5",
-"087 c #C3C8D7",
-"088 c #C5C8D6",
-"089 c #C7CCDB",
-"090 c #CDCCD5",
-"091 c #CCCFD7",
-"092 c #D7D8E3",
-"093 c #D7DBE9",
-"094 c #D9DCEE",
-"095 c #DFE1F2",
-"096 c #DFE5F2",
-"097 c #E7D9CF",
-"098 c #E6E6EA",
-"099 c #E0E4F3",
-"100 c #E1E5F2",
-"101 c #E2E6F4",
-"102 c #E5E9F9",
-"103 c #E7EBF8",
-"104 c #E9EDFC",
-"105 c #EAEFFF",
-"106 c #EDEAFF",
-"107 c #ECEFFD",
-"108 c #EDEFFE",
-"109 c #EDF0FF",
-"110 c #EDF2FF",
-"111 c #F7F2E5",
-"112 c #FFF4E3",
-"113 c #F0F1FF",
-"114 c #F0F5FF",
-"115 c #F2F5FF",
-"116 c #F3F6FF",
-"117 c #F4F7FF",
-"118 c #F5F8FF",
-"119 c #F6F9FF",
-"120 c #F6FAFF",
-"121 c #FFFFF4",
-"122 c #F9FCFF",
-"123 c #FBFFFF",
-"124 c #FCFFFF",
-"125 c #FDFFFF",
-"126 c Gray100",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000000000126126000000000000126126000000000000126126000000000000126126",
-"000000000000126126000000000000126126000000000000126126000000000000126126",
-"000000000000126126000000000000126126000000000000126126000000000000126126",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"126126126126067027059053022019021091126126126126126126000000000000126126",
-"126126126068024060057008012004005009099126126126126126000000000000126126",
-"126126113006069118063015055010001001013126126126126126000000000000126126",
-"126126061000072064016062076025014000000086126126126126000000000000126126",
-"126126018000007089029048077070003000000023126126126126000000000000126126",
-"126102002000065126039030071115085000000000075126126126000000000000126126",
-"126020000026126126050028126126123074000000058126126126000000000000126126",
-"119056017108126126111098126124116104011000073126126126000000000000126126",
-"126126106126126126126126125118107101066054126126126126000000000000126126",
-"126126126117120122122120115104100093088114126126126126000000000000126126",
-"126126126117105110109107103096092090087126126126126126000000000000126126",
-"126126126112082081097095094079083080084126126126126126000000000000126126",
-"126126126033040052049078047045046036031121126126126126000000000000126126",
-"126126126037041043034032035042044038051126126126126126000000000000126126",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000000000126126000000000000126126000000000000126126000000000000126126",
-"000000000000126126000000000000126126000000000000126126000000000000126126",
-"000000000000126126000000000000126126000000000000126126000000000000126126",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film3[] = {
+"24 24 256 3",
+"000 c black",
+"001 c transparent",
+"002 c #000008",
+"003 c #070A18",
+"004 c #202432",
+"005 c #202434",
+"006 c #242837",
+"007 c #262837",
+"008 c #262A39",
+"009 c #2A2E3B",
+"010 c #2E323F",
+"011 c #2E3240",
+"012 c #313544",
+"013 c #3C3F4E",
+"014 c #3E414F",
+"015 c #404251",
+"016 c #484C57",
+"017 c #4A4959",
+"018 c #4A4C5B",
+"019 c #50535B",
+"020 c #4C5161",
+"021 c #5A5E66",
+"022 c #5B5F67",
+"023 c #5A5E6B",
+"024 c #5E6271",
+"025 c #757987",
+"026 c #767989",
+"027 c #7A7E85",
+"028 c #B9954A",
+"029 c #C5B434",
+"030 c #E69400",
+"031 c #FFA500",
+"032 c #EABA56",
+"033 c #FFC600",
+"034 c #FFCE00",
+"035 c #FDCA15",
+"036 c #FFD900",
+"037 c #FFD422",
+"038 c #FFE100",
+"039 c #FFE601",
+"040 c #FFE608",
+"041 c #FFF200",
+"042 c #FFF600",
+"043 c #FFFB00",
+"044 c #FFFE00",
+"045 c #FFF237",
+"046 c #FFF63A",
+"047 c #EEC143",
+"048 c #F2C743",
+"049 c #FFDB48",
+"050 c #FFDC61",
+"051 c #FFE17A",
+"052 c #FFFB6B",
+"053 c #82858D",
+"054 c #818292",
+"055 c #828695",
+"056 c #87809C",
+"057 c #878B99",
+"058 c #878B9A",
+"059 c #8A8D95",
+"060 c #9397A6",
+"061 c #9495A5",
+"062 c #9599A1",
+"063 c #969AA9",
+"064 c #9B9FAF",
+"065 c #9C9FAE",
+"066 c #9FA2B0",
+"067 c #A1A2AD",
+"068 c #A6A5B4",
+"069 c #A5A8B7",
+"070 c #A9ADBB",
+"071 c #B5AFB3",
+"072 c #AEB2C0",
+"073 c #B0B4C2",
+"074 c #B3B6C4",
+"075 c #B6BACA",
+"076 c #B9BCCB",
+"077 c #BDBFCA",
+"078 c #E6C18B",
+"079 c #ECD09C",
+"080 c #F6CC82",
+"081 c #F6CE8B",
+"082 c #FAD08F",
+"083 c #FBD391",
+"084 c #FDD39D",
+"085 c #C0C4D2",
+"086 c #C3C5D5",
+"087 c #C3C8D7",
+"088 c #C5C8D6",
+"089 c #C7CCDB",
+"090 c #CDCCD5",
+"091 c #CCCFD7",
+"092 c #D7D8E3",
+"093 c #D7DBE9",
+"094 c #D9DCEE",
+"095 c #DFE1F2",
+"096 c #DFE5F2",
+"097 c #E7D9CF",
+"098 c #E6E6EA",
+"099 c #E0E4F3",
+"100 c #E1E5F2",
+"101 c #E2E6F4",
+"102 c #E5E9F9",
+"103 c #E7EBF8",
+"104 c #E9EDFC",
+"105 c #EAEFFF",
+"106 c #EDEAFF",
+"107 c #ECEFFD",
+"108 c #EDEFFE",
+"109 c #EDF0FF",
+"110 c #EDF2FF",
+"111 c #F7F2E5",
+"112 c #FFF4E3",
+"113 c #F0F1FF",
+"114 c #F0F5FF",
+"115 c #F2F5FF",
+"116 c #F3F6FF",
+"117 c #F4F7FF",
+"118 c #F5F8FF",
+"119 c #F6F9FF",
+"120 c #F6FAFF",
+"121 c #FFFFF4",
+"122 c #F9FCFF",
+"123 c #FBFFFF",
+"124 c #FCFFFF",
+"125 c #FDFFFF",
+"126 c Gray100",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000000000126126000000000000126126000000000000126126000000000000126126",
+"000000000000126126000000000000126126000000000000126126000000000000126126",
+"000000000000126126000000000000126126000000000000126126000000000000126126",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"126126126126067027059053022019021091126126126126126126000000000000126126",
+"126126126068024060057008012004005009099126126126126126000000000000126126",
+"126126113006069118063015055010001001013126126126126126000000000000126126",
+"126126061000072064016062076025014000000086126126126126000000000000126126",
+"126126018000007089029048077070003000000023126126126126000000000000126126",
+"126102002000065126039030071115085000000000075126126126000000000000126126",
+"126020000026126126050028126126123074000000058126126126000000000000126126",
+"119056017108126126111098126124116104011000073126126126000000000000126126",
+"126126106126126126126126125118107101066054126126126126000000000000126126",
+"126126126117120122122120115104100093088114126126126126000000000000126126",
+"126126126117105110109107103096092090087126126126126126000000000000126126",
+"126126126112082081097095094079083080084126126126126126000000000000126126",
+"126126126033040052049078047045046036031121126126126126000000000000126126",
+"126126126037041043034032035042044038051126126126126126000000000000126126",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000000000126126000000000000126126000000000000126126000000000000126126",
+"000000000000126126000000000000126126000000000000126126000000000000126126",
+"000000000000126126000000000000126126000000000000126126000000000000126126",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film5.xpm b/avidemux/common/ADM_icons/tray/film5.xpm
index 5ba230c114..bba1375109 100644
--- a/avidemux/common/ADM_icons/tray/film5.xpm
+++ b/avidemux/common/ADM_icons/tray/film5.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film5[] = {
-"24 24 256 3",
-"000 c black",
-"001 c transparent",
-"002 c #070A18",
-"003 c #151410",
-"004 c #202432",
-"005 c #202434",
-"006 c #262837",
-"007 c #262A39",
-"008 c #2A2E3B",
-"009 c #2E323F",
-"010 c #32322E",
-"011 c #37332F",
-"012 c #2E3240",
-"013 c #313544",
-"014 c #3C3F4E",
-"015 c #3E414F",
-"016 c #483F3C",
-"017 c #404251",
-"018 c #484C57",
-"019 c #50535B",
-"020 c #5D5353",
-"021 c #5A5E66",
-"022 c #5B5F67",
-"023 c #5A5E6B",
-"024 c #5E6271",
-"025 c #625E5D",
-"026 c #757987",
-"027 c #7A7E85",
-"028 c #B9954A",
-"029 c #C5B434",
-"030 c #E69400",
-"031 c #FFA500",
-"032 c #EABA56",
-"033 c #FFCE00",
-"034 c #FDCA15",
-"035 c #FFD900",
-"036 c #FFE100",
-"037 c #FFE601",
-"038 c #FFE608",
-"039 c #FFF200",
-"040 c #FFF600",
-"041 c #FFFB00",
-"042 c #FFFE00",
-"043 c #FFF237",
-"044 c #FFF63A",
-"045 c #EEC143",
-"046 c #F2C743",
-"047 c #FFDB48",
-"048 c #FFDC61",
-"049 c #FFE17A",
-"050 c #FFFB6B",
-"051 c #82858D",
-"052 c #818292",
-"053 c #828695",
-"054 c #878B99",
-"055 c #878B9A",
-"056 c #8A8D95",
-"057 c #969593",
-"058 c #9397A6",
-"059 c #9599A1",
-"060 c #969AA9",
-"061 c #9B9FAF",
-"062 c #9C9FAE",
-"063 c #9FA2B0",
-"064 c #A1A2AD",
-"065 c #A9A9A5",
-"066 c #A5A8B7",
-"067 c #A9ADBB",
-"068 c #B5AFB3",
-"069 c Gray71",
-"070 c #BBBAB9",
-"071 c #AEB2C0",
-"072 c #B0B4C2",
-"073 c #B3B6C4",
-"074 c #B6BACA",
-"075 c #B9BCCB",
-"076 c #BDBFCA",
-"077 c #E6C18B",
-"078 c #ECD09C",
-"079 c #F6CC82",
-"080 c #F6CE8B",
-"081 c #FAD08F",
-"082 c #FBD391",
-"083 c #FDD39D",
-"084 c Gray78",
-"085 c Gray81",
-"086 c #C0C4D2",
-"087 c #C3C5D5",
-"088 c #C3C8D7",
-"089 c #C5C8D6",
-"090 c #C7CCDB",
-"091 c #CDCCD5",
-"092 c #CCCFD7",
-"093 c #D7D8E3",
-"094 c #D7DBE9",
-"095 c #D9DCEE",
-"096 c #DFE1F2",
-"097 c #DFE5F2",
-"098 c #E7D9CF",
-"099 c #E4E4E3",
-"100 c #E7E7E8",
-"101 c #E6E6EA",
-"102 c #E0E4F3",
-"103 c #E1E5F2",
-"104 c #E2E6F4",
-"105 c #E7EBF8",
-"106 c #E9EDFC",
-"107 c #EAEFFF",
-"108 c #ECEFFD",
-"109 c #EDF0FF",
-"110 c #EDF2FF",
-"111 c #F7F2E5",
-"112 c #F0F5FF",
-"113 c #F2F5FF",
-"114 c #F3F6FF",
-"115 c #F5F8FF",
-"116 c #F6FAFF",
-"117 c #FFFFF4",
-"118 c #F9FCFF",
-"119 c #FBFFFF",
-"120 c #FCFFFF",
-"121 c #FDFFFF",
-"122 c Gray100",
-"123 c black",
-"124 c black",
-"125 c black",
-"126 c black",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"122122000000000000122122000000000000122122000000000000122122000000000000",
-"122122000000000000122122000000000000122122000000000000122122000000000000",
-"122122000000000000122122000000000000122122000000000000122122000000000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"064027056051022019021092122122122122122122000000000000122122122122122122",
-"024058054007013004005008102122122122122122000000000000122122122122122122",
-"066115060017053009001001014122122122122122000000000000122122122122122122",
-"071061018059075026015000000087122122122122000000000000122122122122122069",
-"006090029046076067002000000023122122122122000000000000122122122122057100",
-"062122037030068113086000000000074122122122000000000000122122122122099003",
-"122122048028122122119073000000055122122122000000000000122122122122085010",
-"122122111101122120114106012000072122122122000000000000122122122122084065",
-"122122122122121115108104063052122122122122000000000000122122122122122025",
-"116118118116113106103094089112122122122122000000000000122122122122122020",
-"107110109108105097093091088122122122122122000000000000122122122122122016",
-"081080098096095078082079083122122122122122000000000000122122122122122011",
-"038050047077045043044035031117122122122122000000000000122122122122122070",
-"039041033032034040042036049122122122122122000000000000122122122122122122",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"122122000000000000122122000000000000122122000000000000122122000000000000",
-"122122000000000000122122000000000000122122000000000000122122000000000000",
-"122122000000000000122122000000000000122122000000000000122122000000000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film5[] = {
+"24 24 256 3",
+"000 c black",
+"001 c transparent",
+"002 c #070A18",
+"003 c #151410",
+"004 c #202432",
+"005 c #202434",
+"006 c #262837",
+"007 c #262A39",
+"008 c #2A2E3B",
+"009 c #2E323F",
+"010 c #32322E",
+"011 c #37332F",
+"012 c #2E3240",
+"013 c #313544",
+"014 c #3C3F4E",
+"015 c #3E414F",
+"016 c #483F3C",
+"017 c #404251",
+"018 c #484C57",
+"019 c #50535B",
+"020 c #5D5353",
+"021 c #5A5E66",
+"022 c #5B5F67",
+"023 c #5A5E6B",
+"024 c #5E6271",
+"025 c #625E5D",
+"026 c #757987",
+"027 c #7A7E85",
+"028 c #B9954A",
+"029 c #C5B434",
+"030 c #E69400",
+"031 c #FFA500",
+"032 c #EABA56",
+"033 c #FFCE00",
+"034 c #FDCA15",
+"035 c #FFD900",
+"036 c #FFE100",
+"037 c #FFE601",
+"038 c #FFE608",
+"039 c #FFF200",
+"040 c #FFF600",
+"041 c #FFFB00",
+"042 c #FFFE00",
+"043 c #FFF237",
+"044 c #FFF63A",
+"045 c #EEC143",
+"046 c #F2C743",
+"047 c #FFDB48",
+"048 c #FFDC61",
+"049 c #FFE17A",
+"050 c #FFFB6B",
+"051 c #82858D",
+"052 c #818292",
+"053 c #828695",
+"054 c #878B99",
+"055 c #878B9A",
+"056 c #8A8D95",
+"057 c #969593",
+"058 c #9397A6",
+"059 c #9599A1",
+"060 c #969AA9",
+"061 c #9B9FAF",
+"062 c #9C9FAE",
+"063 c #9FA2B0",
+"064 c #A1A2AD",
+"065 c #A9A9A5",
+"066 c #A5A8B7",
+"067 c #A9ADBB",
+"068 c #B5AFB3",
+"069 c Gray71",
+"070 c #BBBAB9",
+"071 c #AEB2C0",
+"072 c #B0B4C2",
+"073 c #B3B6C4",
+"074 c #B6BACA",
+"075 c #B9BCCB",
+"076 c #BDBFCA",
+"077 c #E6C18B",
+"078 c #ECD09C",
+"079 c #F6CC82",
+"080 c #F6CE8B",
+"081 c #FAD08F",
+"082 c #FBD391",
+"083 c #FDD39D",
+"084 c Gray78",
+"085 c Gray81",
+"086 c #C0C4D2",
+"087 c #C3C5D5",
+"088 c #C3C8D7",
+"089 c #C5C8D6",
+"090 c #C7CCDB",
+"091 c #CDCCD5",
+"092 c #CCCFD7",
+"093 c #D7D8E3",
+"094 c #D7DBE9",
+"095 c #D9DCEE",
+"096 c #DFE1F2",
+"097 c #DFE5F2",
+"098 c #E7D9CF",
+"099 c #E4E4E3",
+"100 c #E7E7E8",
+"101 c #E6E6EA",
+"102 c #E0E4F3",
+"103 c #E1E5F2",
+"104 c #E2E6F4",
+"105 c #E7EBF8",
+"106 c #E9EDFC",
+"107 c #EAEFFF",
+"108 c #ECEFFD",
+"109 c #EDF0FF",
+"110 c #EDF2FF",
+"111 c #F7F2E5",
+"112 c #F0F5FF",
+"113 c #F2F5FF",
+"114 c #F3F6FF",
+"115 c #F5F8FF",
+"116 c #F6FAFF",
+"117 c #FFFFF4",
+"118 c #F9FCFF",
+"119 c #FBFFFF",
+"120 c #FCFFFF",
+"121 c #FDFFFF",
+"122 c Gray100",
+"123 c black",
+"124 c black",
+"125 c black",
+"126 c black",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"122122000000000000122122000000000000122122000000000000122122000000000000",
+"122122000000000000122122000000000000122122000000000000122122000000000000",
+"122122000000000000122122000000000000122122000000000000122122000000000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"064027056051022019021092122122122122122122000000000000122122122122122122",
+"024058054007013004005008102122122122122122000000000000122122122122122122",
+"066115060017053009001001014122122122122122000000000000122122122122122122",
+"071061018059075026015000000087122122122122000000000000122122122122122069",
+"006090029046076067002000000023122122122122000000000000122122122122057100",
+"062122037030068113086000000000074122122122000000000000122122122122099003",
+"122122048028122122119073000000055122122122000000000000122122122122085010",
+"122122111101122120114106012000072122122122000000000000122122122122084065",
+"122122122122121115108104063052122122122122000000000000122122122122122025",
+"116118118116113106103094089112122122122122000000000000122122122122122020",
+"107110109108105097093091088122122122122122000000000000122122122122122016",
+"081080098096095078082079083122122122122122000000000000122122122122122011",
+"038050047077045043044035031117122122122122000000000000122122122122122070",
+"039041033032034040042036049122122122122122000000000000122122122122122122",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"122122000000000000122122000000000000122122000000000000122122000000000000",
+"122122000000000000122122000000000000122122000000000000122122000000000000",
+"122122000000000000122122000000000000122122000000000000122122000000000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film7.xpm b/avidemux/common/ADM_icons/tray/film7.xpm
index 38aafac734..77ef1ae392 100644
--- a/avidemux/common/ADM_icons/tray/film7.xpm
+++ b/avidemux/common/ADM_icons/tray/film7.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film7[] = {
-"24 24 256 3",
-"000 c black",
-"001 c transparent",
-"002 c #030200",
-"003 c #070801",
-"004 c #0D0C06",
-"005 c #0E0D07",
-"006 c #0F0E08",
-"007 c #070A18",
-"008 c #13120C",
-"009 c #14120D",
-"010 c #151410",
-"011 c #161710",
-"012 c #181711",
-"013 c #191812",
-"014 c #1B1A15",
-"015 c #1D1C16",
-"016 c #1E1D17",
-"017 c #1F1E19",
-"018 c #201F1A",
-"019 c #23231C",
-"020 c #24231D",
-"021 c #2A2925",
-"022 c #2E2D27",
-"023 c #202432",
-"024 c #202434",
-"025 c #2A2E3B",
-"026 c #2E323F",
-"027 c #33312C",
-"028 c #32322E",
-"029 c #37332F",
-"030 c #383731",
-"031 c #3C3C35",
-"032 c #2E3240",
-"033 c #313544",
-"034 c #3C3F4E",
-"035 c #3E414F",
-"036 c #483F3C",
-"037 c #474640",
-"038 c #4D4C48",
-"039 c #555450",
-"040 c #575650",
-"041 c #50535B",
-"042 c #5D5353",
-"043 c #5A5954",
-"044 c #5A5E66",
-"045 c #5B5F67",
-"046 c #5A5E6B",
-"047 c #625E5D",
-"048 c #63625D",
-"049 c #676660",
-"050 c #6B6A64",
-"051 c #6E6E6C",
-"052 c #71706C",
-"053 c #757573",
-"054 c #777776",
-"055 c #757987",
-"056 c #FFA500",
-"057 c #FDCA15",
-"058 c #FFD900",
-"059 c #FFE100",
-"060 c #FFF600",
-"061 c #FFFE00",
-"062 c #FFF237",
-"063 c #FFF63A",
-"064 c #EEC143",
-"065 c #FFE17A",
-"066 c #818292",
-"067 c #828695",
-"068 c #878B9A",
-"069 c #969593",
-"070 c #9FA2B0",
-"071 c #A2A39D",
-"072 c #A9A9A5",
-"073 c #AAA9A7",
-"074 c #ABAAA5",
-"075 c #A9ADBB",
-"076 c #B5AFB3",
-"077 c Gray71",
-"078 c #BBBAB9",
-"079 c #BCBBBB",
-"080 c #B0B4C2",
-"081 c #B3B6C4",
-"082 c #B6BACA",
-"083 c #B9BCCB",
-"084 c #BDBFCA",
-"085 c #ECD09C",
-"086 c #F6CC82",
-"087 c #FBD391",
-"088 c #FDD39D",
-"089 c #C3C3C3",
-"090 c Gray78",
-"091 c Gray81",
-"092 c #C0C4D2",
-"093 c #C3C5D5",
-"094 c #C3C8D7",
-"095 c #C5C8D6",
-"096 c #CDCCD5",
-"097 c #CCCFD7",
-"098 c #D8D5D0",
-"099 c #DADAD8",
-"100 c #D7D8E3",
-"101 c #D7DBE9",
-"102 c #D9DCEE",
-"103 c #DFE5F2",
-"104 c #E2E2DE",
-"105 c #E4E4E3",
-"106 c #E7E7E8",
-"107 c #EEEDEB",
-"108 c #E0E4F3",
-"109 c #E1E5F2",
-"110 c #E2E6F4",
-"111 c #E7EBF8",
-"112 c #E9EDFC",
-"113 c #ECEFFD",
-"114 c #F0F5FF",
-"115 c #F2F5FF",
-"116 c #F3F6FF",
-"117 c #F5F8FF",
-"118 c #F8F7F3",
-"119 c #FFFFF4",
-"120 c #FBFFFF",
-"121 c #FCFFFF",
-"122 c #FDFFFF",
-"123 c Gray100",
-"124 c black",
-"125 c black",
-"126 c black",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000123123000000000000123123000000000000123123000000000000123123000000",
-"000000123123000000000000123123000000000000123123000000000000123123000000",
-"000000123123000000000000123123000000000000123123000000000000123123000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"045041044097123123123123123123000000000000123123123123123123123123123123",
-"033023024025108123123123123123000000000000123123123123123123123123099039",
-"067026001001034123123123123123000000000000123123123123123123123079071030",
-"083055035000000093123123123123000000000000123123123123123077021037074038",
-"084075007000000046123123123123000000000000123123123123069106107018015013",
-"076115092000000000082123123123000000000000123123123123105010017005053123",
-"123123120081000000068123123123000000000000123123123123091028049052054073",
-"123121116112032000080123123123000000000000123123123123090072104040098118",
-"122117113110070066123123123123000000000000123123123123123047011027050048",
-"115112109101095114123123123123000000000000123123123123123042014019022031",
-"111103100096094123123123123123000000000000123123123123123036009012016020",
-"102085087086088123123123123123000000000000123123123123123029003006008011",
-"064062063058056119123123123123000000000000123123123123123078043004002004",
-"057060061059065123123123123123000000000000123123123123123123123123089051",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000123123000000000000123123000000000000123123000000000000123123000000",
-"000000123123000000000000123123000000000000123123000000000000123123000000",
-"000000123123000000000000123123000000000000123123000000000000123123000000",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film7[] = {
+"24 24 256 3",
+"000 c black",
+"001 c transparent",
+"002 c #030200",
+"003 c #070801",
+"004 c #0D0C06",
+"005 c #0E0D07",
+"006 c #0F0E08",
+"007 c #070A18",
+"008 c #13120C",
+"009 c #14120D",
+"010 c #151410",
+"011 c #161710",
+"012 c #181711",
+"013 c #191812",
+"014 c #1B1A15",
+"015 c #1D1C16",
+"016 c #1E1D17",
+"017 c #1F1E19",
+"018 c #201F1A",
+"019 c #23231C",
+"020 c #24231D",
+"021 c #2A2925",
+"022 c #2E2D27",
+"023 c #202432",
+"024 c #202434",
+"025 c #2A2E3B",
+"026 c #2E323F",
+"027 c #33312C",
+"028 c #32322E",
+"029 c #37332F",
+"030 c #383731",
+"031 c #3C3C35",
+"032 c #2E3240",
+"033 c #313544",
+"034 c #3C3F4E",
+"035 c #3E414F",
+"036 c #483F3C",
+"037 c #474640",
+"038 c #4D4C48",
+"039 c #555450",
+"040 c #575650",
+"041 c #50535B",
+"042 c #5D5353",
+"043 c #5A5954",
+"044 c #5A5E66",
+"045 c #5B5F67",
+"046 c #5A5E6B",
+"047 c #625E5D",
+"048 c #63625D",
+"049 c #676660",
+"050 c #6B6A64",
+"051 c #6E6E6C",
+"052 c #71706C",
+"053 c #757573",
+"054 c #777776",
+"055 c #757987",
+"056 c #FFA500",
+"057 c #FDCA15",
+"058 c #FFD900",
+"059 c #FFE100",
+"060 c #FFF600",
+"061 c #FFFE00",
+"062 c #FFF237",
+"063 c #FFF63A",
+"064 c #EEC143",
+"065 c #FFE17A",
+"066 c #818292",
+"067 c #828695",
+"068 c #878B9A",
+"069 c #969593",
+"070 c #9FA2B0",
+"071 c #A2A39D",
+"072 c #A9A9A5",
+"073 c #AAA9A7",
+"074 c #ABAAA5",
+"075 c #A9ADBB",
+"076 c #B5AFB3",
+"077 c Gray71",
+"078 c #BBBAB9",
+"079 c #BCBBBB",
+"080 c #B0B4C2",
+"081 c #B3B6C4",
+"082 c #B6BACA",
+"083 c #B9BCCB",
+"084 c #BDBFCA",
+"085 c #ECD09C",
+"086 c #F6CC82",
+"087 c #FBD391",
+"088 c #FDD39D",
+"089 c #C3C3C3",
+"090 c Gray78",
+"091 c Gray81",
+"092 c #C0C4D2",
+"093 c #C3C5D5",
+"094 c #C3C8D7",
+"095 c #C5C8D6",
+"096 c #CDCCD5",
+"097 c #CCCFD7",
+"098 c #D8D5D0",
+"099 c #DADAD8",
+"100 c #D7D8E3",
+"101 c #D7DBE9",
+"102 c #D9DCEE",
+"103 c #DFE5F2",
+"104 c #E2E2DE",
+"105 c #E4E4E3",
+"106 c #E7E7E8",
+"107 c #EEEDEB",
+"108 c #E0E4F3",
+"109 c #E1E5F2",
+"110 c #E2E6F4",
+"111 c #E7EBF8",
+"112 c #E9EDFC",
+"113 c #ECEFFD",
+"114 c #F0F5FF",
+"115 c #F2F5FF",
+"116 c #F3F6FF",
+"117 c #F5F8FF",
+"118 c #F8F7F3",
+"119 c #FFFFF4",
+"120 c #FBFFFF",
+"121 c #FCFFFF",
+"122 c #FDFFFF",
+"123 c Gray100",
+"124 c black",
+"125 c black",
+"126 c black",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000123123000000000000123123000000000000123123000000000000123123000000",
+"000000123123000000000000123123000000000000123123000000000000123123000000",
+"000000123123000000000000123123000000000000123123000000000000123123000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"045041044097123123123123123123000000000000123123123123123123123123123123",
+"033023024025108123123123123123000000000000123123123123123123123123099039",
+"067026001001034123123123123123000000000000123123123123123123123079071030",
+"083055035000000093123123123123000000000000123123123123123077021037074038",
+"084075007000000046123123123123000000000000123123123123069106107018015013",
+"076115092000000000082123123123000000000000123123123123105010017005053123",
+"123123120081000000068123123123000000000000123123123123091028049052054073",
+"123121116112032000080123123123000000000000123123123123090072104040098118",
+"122117113110070066123123123123000000000000123123123123123047011027050048",
+"115112109101095114123123123123000000000000123123123123123042014019022031",
+"111103100096094123123123123123000000000000123123123123123036009012016020",
+"102085087086088123123123123123000000000000123123123123123029003006008011",
+"064062063058056119123123123123000000000000123123123123123078043004002004",
+"057060061059065123123123123123000000000000123123123123123123123123089051",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000123123000000000000123123000000000000123123000000000000123123000000",
+"000000123123000000000000123123000000000000123123000000000000123123000000",
+"000000123123000000000000123123000000000000123123000000000000123123000000",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_icons/tray/film9.xpm b/avidemux/common/ADM_icons/tray/film9.xpm
index fb12cb20e7..4f175dff1a 100644
--- a/avidemux/common/ADM_icons/tray/film9.xpm
+++ b/avidemux/common/ADM_icons/tray/film9.xpm
@@ -1,284 +1,284 @@
-/* XPM */
-static const char *xpm_film9[] = {
-"24 24 256 3",
-"000 c black",
-"001 c #010000",
-"002 c #020100",
-"003 c #030200",
-"004 c #070601",
-"005 c #070801",
-"006 c #0B0A05",
-"007 c #0D0C06",
-"008 c #0E0D07",
-"009 c #0F0D08",
-"010 c #0F0E08",
-"011 c #100F0A",
-"012 c #12110B",
-"013 c #13120C",
-"014 c #14120D",
-"015 c #14130D",
-"016 c #15130F",
-"017 c #151410",
-"018 c #161710",
-"019 c #181711",
-"020 c #191812",
-"021 c #1A1914",
-"022 c #1B1A15",
-"023 c #1C1B16",
-"024 c #1D1C16",
-"025 c #1E1D17",
-"026 c #1F1E19",
-"027 c #201E19",
-"028 c #201F1A",
-"029 c #20201A",
-"030 c #23221C",
-"031 c #23231C",
-"032 c #23231D",
-"033 c #24221C",
-"034 c #24231D",
-"035 c #24231F",
-"036 c #25231F",
-"037 c #25241E",
-"038 c #25251F",
-"039 c #282722",
-"040 c #2A2925",
-"041 c #2E2D27",
-"042 c #322F2B",
-"043 c #32312B",
-"044 c #33312C",
-"045 c #32322E",
-"046 c #37332F",
-"047 c #383731",
-"048 c #3A3934",
-"049 c #3C3C35",
-"050 c #2E3240",
-"051 c #3C3F4E",
-"052 c #483F3C",
-"053 c #474640",
-"054 c #4C4B46",
-"055 c #4D4C48",
-"056 c #4F4E49",
-"057 c #53524E",
-"058 c #555450",
-"059 c #575650",
-"060 c #5D5353",
-"061 c #5A5954",
-"062 c #5A5E6B",
-"063 c #625E5D",
-"064 c #63625D",
-"065 c #64625E",
-"066 c #676660",
-"067 c #6B6A64",
-"068 c #6E6E6C",
-"069 c #71706C",
-"070 c #72726F",
-"071 c #757573",
-"072 c #777776",
-"073 c #7C7C78",
-"074 c #807D7D",
-"075 c #81817A",
-"076 c #82817F",
-"077 c #FFA500",
-"078 c #FFE17A",
-"079 c #8D8C89",
-"080 c #818292",
-"081 c #878B9A",
-"082 c #969593",
-"083 c #9B9B98",
-"084 c #9FA2B0",
-"085 c #A2A39D",
-"086 c #A6A3A2",
-"087 c #A9A9A5",
-"088 c #AAA9A7",
-"089 c #ABAAA5",
-"090 c #B6B5B0",
-"091 c Gray71",
-"092 c #BBBAB9",
-"093 c #BCBBBB",
-"094 c #B0B4C2",
-"095 c #B6BACA",
-"096 c #FDD39D",
-"097 c #C3C3C3",
-"098 c Gray78",
-"099 c Gray81",
-"100 c #C3C5D5",
-"101 c #C3C8D7",
-"102 c #C5C8D6",
-"103 c #D4D3CE",
-"104 c #D8D5D0",
-"105 c #DAD8D4",
-"106 c #DADAD8",
-"107 c #E2E2DE",
-"108 c #E4E4E3",
-"109 c #E7E7E8",
-"110 c #EBE9E3",
-"111 c #EAE9EA",
-"112 c #EEEDEB",
-"113 c #E0E4F3",
-"114 c #F0F5FF",
-"115 c #F8F7F3",
-"116 c #FFFFF4",
-"117 c #FEFFFF",
-"118 c Gray100",
-"119 c black",
-"120 c black",
-"121 c black",
-"122 c black",
-"123 c black",
-"124 c black",
-"125 c black",
-"126 c black",
-"127 c black",
-"128 c black",
-"129 c black",
-"130 c black",
-"131 c black",
-"132 c black",
-"133 c black",
-"134 c black",
-"135 c black",
-"136 c black",
-"137 c black",
-"138 c black",
-"139 c black",
-"140 c black",
-"141 c black",
-"142 c black",
-"143 c black",
-"144 c black",
-"145 c black",
-"146 c black",
-"147 c black",
-"148 c black",
-"149 c black",
-"150 c black",
-"151 c black",
-"152 c black",
-"153 c black",
-"154 c black",
-"155 c black",
-"156 c black",
-"157 c black",
-"158 c black",
-"159 c black",
-"160 c black",
-"161 c black",
-"162 c black",
-"163 c black",
-"164 c black",
-"165 c black",
-"166 c black",
-"167 c black",
-"168 c black",
-"169 c black",
-"170 c black",
-"171 c black",
-"172 c black",
-"173 c black",
-"174 c black",
-"175 c black",
-"176 c black",
-"177 c black",
-"178 c black",
-"179 c black",
-"180 c black",
-"181 c black",
-"182 c black",
-"183 c black",
-"184 c black",
-"185 c black",
-"186 c black",
-"187 c black",
-"188 c black",
-"189 c black",
-"190 c black",
-"191 c black",
-"192 c black",
-"193 c black",
-"194 c black",
-"195 c black",
-"196 c black",
-"197 c black",
-"198 c black",
-"199 c black",
-"200 c black",
-"201 c black",
-"202 c black",
-"203 c black",
-"204 c black",
-"205 c black",
-"206 c black",
-"207 c black",
-"208 c black",
-"209 c black",
-"210 c black",
-"211 c black",
-"212 c black",
-"213 c black",
-"214 c black",
-"215 c black",
-"216 c black",
-"217 c black",
-"218 c black",
-"219 c black",
-"220 c black",
-"221 c black",
-"222 c black",
-"223 c black",
-"224 c black",
-"225 c black",
-"226 c black",
-"227 c black",
-"228 c black",
-"229 c black",
-"230 c black",
-"231 c black",
-"232 c black",
-"233 c black",
-"234 c black",
-"235 c black",
-"236 c black",
-"237 c black",
-"238 c black",
-"239 c black",
-"240 c black",
-"241 c black",
-"242 c black",
-"243 c black",
-"244 c black",
-"245 c black",
-"246 c black",
-"247 c black",
-"248 c black",
-"249 c black",
-"250 c black",
-"251 c black",
-"252 c black",
-"253 c black",
-"254 c black",
-"255 c black",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000000000118118000000000000118118000000000000118118000000000000118118",
-"000000000000118118000000000000118118000000000000118118000000000000118118",
-"000000000000118118000000000000118118000000000000118118000000000000118118",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"118118118118118118000000000000118118118118118118118118118118083023021033",
-"113118118118118118000000000000118118118118118118118118106058118110054037",
-"051118118118118118000000000000118118118118118118118093085047027056032015",
-"000100118118118118000000000000118118118118118091040053089055032029070111",
-"000062118118118118000000000000118118118118082109112028024020073117118118",
-"000000095118118118000000000000118118118118108017026008071118118118118118",
-"000000081118118118000000000000118118118118099045066069072088076074086079",
-"050000094118118118000000000000118118118118098087107059104115075103105041",
-"084080118118118118000000000000118118118118118063018044067064065090057043",
-"102114118118118118000000000000118118118118118060022031041049048042039035",
-"101118118118118118000000000000118118118118118052014019025034038030036022",
-"096118118118118118000000000000118118118118118046005010013018015019016009",
-"077116118118118118000000000000118118118118118092061007003007007006011002",
-"078118118118118118000000000000118118118118118118118118097068012001004000",
-"000000000000000000000000000000000000000000000000000000000000000000000000",
-"000000000000118118000000000000118118000000000000118118000000000000118118",
-"000000000000118118000000000000118118000000000000118118000000000000118118",
-"000000000000118118000000000000118118000000000000118118000000000000118118",
-"000000000000000000000000000000000000000000000000000000000000000000000000"
-};
+/* XPM */
+static const char *xpm_film9[] = {
+"24 24 256 3",
+"000 c black",
+"001 c #010000",
+"002 c #020100",
+"003 c #030200",
+"004 c #070601",
+"005 c #070801",
+"006 c #0B0A05",
+"007 c #0D0C06",
+"008 c #0E0D07",
+"009 c #0F0D08",
+"010 c #0F0E08",
+"011 c #100F0A",
+"012 c #12110B",
+"013 c #13120C",
+"014 c #14120D",
+"015 c #14130D",
+"016 c #15130F",
+"017 c #151410",
+"018 c #161710",
+"019 c #181711",
+"020 c #191812",
+"021 c #1A1914",
+"022 c #1B1A15",
+"023 c #1C1B16",
+"024 c #1D1C16",
+"025 c #1E1D17",
+"026 c #1F1E19",
+"027 c #201E19",
+"028 c #201F1A",
+"029 c #20201A",
+"030 c #23221C",
+"031 c #23231C",
+"032 c #23231D",
+"033 c #24221C",
+"034 c #24231D",
+"035 c #24231F",
+"036 c #25231F",
+"037 c #25241E",
+"038 c #25251F",
+"039 c #282722",
+"040 c #2A2925",
+"041 c #2E2D27",
+"042 c #322F2B",
+"043 c #32312B",
+"044 c #33312C",
+"045 c #32322E",
+"046 c #37332F",
+"047 c #383731",
+"048 c #3A3934",
+"049 c #3C3C35",
+"050 c #2E3240",
+"051 c #3C3F4E",
+"052 c #483F3C",
+"053 c #474640",
+"054 c #4C4B46",
+"055 c #4D4C48",
+"056 c #4F4E49",
+"057 c #53524E",
+"058 c #555450",
+"059 c #575650",
+"060 c #5D5353",
+"061 c #5A5954",
+"062 c #5A5E6B",
+"063 c #625E5D",
+"064 c #63625D",
+"065 c #64625E",
+"066 c #676660",
+"067 c #6B6A64",
+"068 c #6E6E6C",
+"069 c #71706C",
+"070 c #72726F",
+"071 c #757573",
+"072 c #777776",
+"073 c #7C7C78",
+"074 c #807D7D",
+"075 c #81817A",
+"076 c #82817F",
+"077 c #FFA500",
+"078 c #FFE17A",
+"079 c #8D8C89",
+"080 c #818292",
+"081 c #878B9A",
+"082 c #969593",
+"083 c #9B9B98",
+"084 c #9FA2B0",
+"085 c #A2A39D",
+"086 c #A6A3A2",
+"087 c #A9A9A5",
+"088 c #AAA9A7",
+"089 c #ABAAA5",
+"090 c #B6B5B0",
+"091 c Gray71",
+"092 c #BBBAB9",
+"093 c #BCBBBB",
+"094 c #B0B4C2",
+"095 c #B6BACA",
+"096 c #FDD39D",
+"097 c #C3C3C3",
+"098 c Gray78",
+"099 c Gray81",
+"100 c #C3C5D5",
+"101 c #C3C8D7",
+"102 c #C5C8D6",
+"103 c #D4D3CE",
+"104 c #D8D5D0",
+"105 c #DAD8D4",
+"106 c #DADAD8",
+"107 c #E2E2DE",
+"108 c #E4E4E3",
+"109 c #E7E7E8",
+"110 c #EBE9E3",
+"111 c #EAE9EA",
+"112 c #EEEDEB",
+"113 c #E0E4F3",
+"114 c #F0F5FF",
+"115 c #F8F7F3",
+"116 c #FFFFF4",
+"117 c #FEFFFF",
+"118 c Gray100",
+"119 c black",
+"120 c black",
+"121 c black",
+"122 c black",
+"123 c black",
+"124 c black",
+"125 c black",
+"126 c black",
+"127 c black",
+"128 c black",
+"129 c black",
+"130 c black",
+"131 c black",
+"132 c black",
+"133 c black",
+"134 c black",
+"135 c black",
+"136 c black",
+"137 c black",
+"138 c black",
+"139 c black",
+"140 c black",
+"141 c black",
+"142 c black",
+"143 c black",
+"144 c black",
+"145 c black",
+"146 c black",
+"147 c black",
+"148 c black",
+"149 c black",
+"150 c black",
+"151 c black",
+"152 c black",
+"153 c black",
+"154 c black",
+"155 c black",
+"156 c black",
+"157 c black",
+"158 c black",
+"159 c black",
+"160 c black",
+"161 c black",
+"162 c black",
+"163 c black",
+"164 c black",
+"165 c black",
+"166 c black",
+"167 c black",
+"168 c black",
+"169 c black",
+"170 c black",
+"171 c black",
+"172 c black",
+"173 c black",
+"174 c black",
+"175 c black",
+"176 c black",
+"177 c black",
+"178 c black",
+"179 c black",
+"180 c black",
+"181 c black",
+"182 c black",
+"183 c black",
+"184 c black",
+"185 c black",
+"186 c black",
+"187 c black",
+"188 c black",
+"189 c black",
+"190 c black",
+"191 c black",
+"192 c black",
+"193 c black",
+"194 c black",
+"195 c black",
+"196 c black",
+"197 c black",
+"198 c black",
+"199 c black",
+"200 c black",
+"201 c black",
+"202 c black",
+"203 c black",
+"204 c black",
+"205 c black",
+"206 c black",
+"207 c black",
+"208 c black",
+"209 c black",
+"210 c black",
+"211 c black",
+"212 c black",
+"213 c black",
+"214 c black",
+"215 c black",
+"216 c black",
+"217 c black",
+"218 c black",
+"219 c black",
+"220 c black",
+"221 c black",
+"222 c black",
+"223 c black",
+"224 c black",
+"225 c black",
+"226 c black",
+"227 c black",
+"228 c black",
+"229 c black",
+"230 c black",
+"231 c black",
+"232 c black",
+"233 c black",
+"234 c black",
+"235 c black",
+"236 c black",
+"237 c black",
+"238 c black",
+"239 c black",
+"240 c black",
+"241 c black",
+"242 c black",
+"243 c black",
+"244 c black",
+"245 c black",
+"246 c black",
+"247 c black",
+"248 c black",
+"249 c black",
+"250 c black",
+"251 c black",
+"252 c black",
+"253 c black",
+"254 c black",
+"255 c black",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000000000118118000000000000118118000000000000118118000000000000118118",
+"000000000000118118000000000000118118000000000000118118000000000000118118",
+"000000000000118118000000000000118118000000000000118118000000000000118118",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"118118118118118118000000000000118118118118118118118118118118083023021033",
+"113118118118118118000000000000118118118118118118118118106058118110054037",
+"051118118118118118000000000000118118118118118118118093085047027056032015",
+"000100118118118118000000000000118118118118118091040053089055032029070111",
+"000062118118118118000000000000118118118118082109112028024020073117118118",
+"000000095118118118000000000000118118118118108017026008071118118118118118",
+"000000081118118118000000000000118118118118099045066069072088076074086079",
+"050000094118118118000000000000118118118118098087107059104115075103105041",
+"084080118118118118000000000000118118118118118063018044067064065090057043",
+"102114118118118118000000000000118118118118118060022031041049048042039035",
+"101118118118118118000000000000118118118118118052014019025034038030036022",
+"096118118118118118000000000000118118118118118046005010013018015019016009",
+"077116118118118118000000000000118118118118118092061007003007007006011002",
+"078118118118118118000000000000118118118118118118118118097068012001004000",
+"000000000000000000000000000000000000000000000000000000000000000000000000",
+"000000000000118118000000000000118118000000000000118118000000000000118118",
+"000000000000118118000000000000118118000000000000118118000000000000118118",
+"000000000000118118000000000000118118000000000000118118000000000000118118",
+"000000000000000000000000000000000000000000000000000000000000000000000000"
+};
diff --git a/avidemux/common/ADM_libraries/ADM_libsdl/CMakeLists.txt b/avidemux/common/ADM_libraries/ADM_libsdl/CMakeLists.txt
index b777afaba7..39cefa0b77 100644
--- a/avidemux/common/ADM_libraries/ADM_libsdl/CMakeLists.txt
+++ b/avidemux/common/ADM_libraries/ADM_libsdl/CMakeLists.txt
@@ -1,6 +1,6 @@
-SET(ADM_LIB ADM_libsdl)
-SET(${ADM_LIB}_SRCS SDLmain.m)
-
-SDLify(SDLmain.m)
-
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+SET(ADM_LIB ADM_libsdl)
+SET(${ADM_LIB}_SRCS SDLmain.m)
+
+SDLify(SDLmain.m)
+
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
diff --git a/avidemux/common/ADM_libraries/CMakeLists.txt b/avidemux/common/ADM_libraries/CMakeLists.txt
index 4a71d008f7..542a9c8c44 100644
--- a/avidemux/common/ADM_libraries/CMakeLists.txt
+++ b/avidemux/common/ADM_libraries/CMakeLists.txt
@@ -1,3 +1,3 @@
-if (APPLE AND USE_SDL)
- subdirs (PREORDER ADM_libsdl)
-endif (APPLE AND USE_SDL)
+if (APPLE AND USE_SDL)
+ subdirs (PREORDER ADM_libsdl)
+endif (APPLE AND USE_SDL)
diff --git a/avidemux/common/ADM_render/CMakeLists.txt b/avidemux/common/ADM_render/CMakeLists.txt
index f525130305..ec52f5f689 100644
--- a/avidemux/common/ADM_render/CMakeLists.txt
+++ b/avidemux/common/ADM_render/CMakeLists.txt
@@ -1,84 +1,84 @@
-include(admOpenGl)
-
-IF(QT_LIBRARY_EXTENSION)
- SET(ADM_LIB ADM_render6_${QT_LIBRARY_EXTENSION})
- SET(SIMPLE_RENDER GUI_simpleRender.cpp)
-ELSE(QT_LIBRARY_EXTENSION)
- SET(ADM_LIB ADM_render6_${UI_SUFFIX})
- SET(SIMPLE_RENDER GUI_simpleRenderStub.cpp)
-ENDIF(QT_LIBRARY_EXTENSION)
-
-SET(${ADM_LIB}_SRCS
-GUI_render.cpp
-${SIMPLE_RENDER}
-)
-IF(USE_DXVA2)# AND NOT MSVC)
-# TEMPORARY
- ADD_SUBDIRECTORY(ADM_coreDxva2)
- INCLUDE_DIRECTORIES(ADM_coreDxva2/include)
-ENDIF(USE_DXVA2)# AND NOT MSVC)
-
-
-IF(NOT ${UI_SUFFIX} STREQUAL "cli")
- IF (USE_OPENGL)
- INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ADM_openGL/include/)
- SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_qtGlRender.cpp)
- ENDIF (USE_OPENGL)
-
- IF (APPLE)
- IF(USE_SDL)
- SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_sdlRenderHelper.m)
- ENDIF(USE_SDL)
- ENDIF (APPLE)
- IF (USE_XV)
- SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_xvRender.cpp)
- ENDIF (USE_XV)
- IF (USE_SDL)
- SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_sdlRender.cpp)
- ENDIF (USE_SDL)
- IF (USE_VDPAU)
- ADD_CORE_INCLUDE(ADM_coreVdpau)
- SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_vdpauRender.cpp)
- ENDIF (USE_VDPAU)
- IF (USE_DXVA2)
- ADD_CORE_INCLUDE(ADM_coreDxva2)
- SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_dxva2Render.cpp)
- ENDIF (USE_DXVA2)
- IF (USE_LIBVA)
- ADD_CORE_INCLUDE(ADM_coreLibVA)
- SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_libvaRender.cpp)
- ENDIF (USE_LIBVA)
-ENDIF() # Not cli
-
-ADD_LIBRARY(${ADM_LIB} SHARED ${${ADM_LIB}_SRCS})
-TARGET_LINK_LIBRARIES( ${ADM_LIB} ADM_core6 ADM_coreUI6 ADM_coreImage6)
-
-ADM_OPEN_GL(${ADM_LIB})
-
-SDLify(GUI_sdlRender.cpp)
-
-IF (GETTEXT_FOUND)
- TARGET_LINK_LIBRARIES(${ADM_LIB} ${GETTEXT_LIBRARY_DIR})
-ENDIF (GETTEXT_FOUND)
-
-IF (USE_SDL)
- TARGET_LINK_LIBRARIES(${ADM_LIB} ${SDL2_LIBRARY})
-ENDIF (USE_SDL)
-
-IF (USE_VDPAU)
- TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_coreVDPAU6)
-ENDIF (USE_VDPAU)
-IF (USE_DXVA2)
- TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_coreDxva26)
-ENDIF (USE_DXVA2)
-
-IF (USE_XV)
- TARGET_LINK_LIBRARIES(${ADM_LIB} ${XVIDEO_LIBRARY_DIR} ${XEXT_LIBRARY_DIR})
-ENDIF (USE_XV)
-TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_coreUtils6)
-
-IF(QT_LIBRARY_EXTENSION)
- TARGET_LINK_LIBRARIES(${ADM_LIB} ${QT_QTGUI_LIBRARY})
-ENDIF(QT_LIBRARY_EXTENSION)
-
-ADM_INSTALL_LIB(${ADM_LIB})
+include(admOpenGl)
+
+IF(QT_LIBRARY_EXTENSION)
+ SET(ADM_LIB ADM_render6_${QT_LIBRARY_EXTENSION})
+ SET(SIMPLE_RENDER GUI_simpleRender.cpp)
+ELSE(QT_LIBRARY_EXTENSION)
+ SET(ADM_LIB ADM_render6_${UI_SUFFIX})
+ SET(SIMPLE_RENDER GUI_simpleRenderStub.cpp)
+ENDIF(QT_LIBRARY_EXTENSION)
+
+SET(${ADM_LIB}_SRCS
+GUI_render.cpp
+${SIMPLE_RENDER}
+)
+IF(USE_DXVA2)# AND NOT MSVC)
+# TEMPORARY
+ ADD_SUBDIRECTORY(ADM_coreDxva2)
+ INCLUDE_DIRECTORIES(ADM_coreDxva2/include)
+ENDIF(USE_DXVA2)# AND NOT MSVC)
+
+
+IF(NOT ${UI_SUFFIX} STREQUAL "cli")
+ IF (USE_OPENGL)
+ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/ADM_openGL/include/)
+ SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_qtGlRender.cpp)
+ ENDIF (USE_OPENGL)
+
+ IF (APPLE)
+ IF(USE_SDL)
+ SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_sdlRenderHelper.m)
+ ENDIF(USE_SDL)
+ ENDIF (APPLE)
+ IF (USE_XV)
+ SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_xvRender.cpp)
+ ENDIF (USE_XV)
+ IF (USE_SDL)
+ SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_sdlRender.cpp)
+ ENDIF (USE_SDL)
+ IF (USE_VDPAU)
+ ADD_CORE_INCLUDE(ADM_coreVdpau)
+ SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_vdpauRender.cpp)
+ ENDIF (USE_VDPAU)
+ IF (USE_DXVA2)
+ ADD_CORE_INCLUDE(ADM_coreDxva2)
+ SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_dxva2Render.cpp)
+ ENDIF (USE_DXVA2)
+ IF (USE_LIBVA)
+ ADD_CORE_INCLUDE(ADM_coreLibVA)
+ SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_libvaRender.cpp)
+ ENDIF (USE_LIBVA)
+ENDIF() # Not cli
+
+ADD_LIBRARY(${ADM_LIB} SHARED ${${ADM_LIB}_SRCS})
+TARGET_LINK_LIBRARIES( ${ADM_LIB} ADM_core6 ADM_coreUI6 ADM_coreImage6)
+
+ADM_OPEN_GL(${ADM_LIB})
+
+SDLify(GUI_sdlRender.cpp)
+
+IF (GETTEXT_FOUND)
+ TARGET_LINK_LIBRARIES(${ADM_LIB} ${GETTEXT_LIBRARY_DIR})
+ENDIF (GETTEXT_FOUND)
+
+IF (USE_SDL)
+ TARGET_LINK_LIBRARIES(${ADM_LIB} ${SDL2_LIBRARY})
+ENDIF (USE_SDL)
+
+IF (USE_VDPAU)
+ TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_coreVDPAU6)
+ENDIF (USE_VDPAU)
+IF (USE_DXVA2)
+ TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_coreDxva26)
+ENDIF (USE_DXVA2)
+
+IF (USE_XV)
+ TARGET_LINK_LIBRARIES(${ADM_LIB} ${XVIDEO_LIBRARY_DIR} ${XEXT_LIBRARY_DIR})
+ENDIF (USE_XV)
+TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_coreUtils6)
+
+IF(QT_LIBRARY_EXTENSION)
+ TARGET_LINK_LIBRARIES(${ADM_LIB} ${QT_QTGUI_LIBRARY})
+ENDIF(QT_LIBRARY_EXTENSION)
+
+ADM_INSTALL_LIB(${ADM_LIB})
diff --git a/avidemux/common/ADM_render/GUI_sdlRenderHelper.m b/avidemux/common/ADM_render/GUI_sdlRenderHelper.m
index 9da4d97505..375079bed0 100644
--- a/avidemux/common/ADM_render/GUI_sdlRenderHelper.m
+++ b/avidemux/common/ADM_render/GUI_sdlRenderHelper.m
@@ -1,139 +1,139 @@
-#import
-#import
-
-static NSWindow* nsParentWindow = nil;
-static NSWindow* nsWindow = nil;
-static NSView* nsView = nil;
-static bool cocoaApplication = false;
-static id oldDelegate = nil;
-static int widgetX = 0, widgetY = 0;
-
-@interface SdlCocoaWindow : NSWindow
-- (void)windowDidMove:(id)notification;
-- (void)windowWillMiniaturize:(NSNotification *)notification;
-- (void)windowDidDeminiaturize:(NSNotification *)notification;
-@end
-
-@implementation SdlCocoaWindow
-- (void)windowDidMove:(id)notification
-{
- NSRect parentFrame = [nsParentWindow frame];
- NSPoint point = NSMakePoint(parentFrame.origin.x + widgetX, parentFrame.origin.y + widgetY);
-
- [self setFrameOrigin:point];
-}
-
-- (void)windowWillMiniaturize:(NSNotification *)notification
-{
- [self setIsVisible:NO];
-}
-
-- (void)windowDidDeminiaturize:(NSNotification *)notification
-{
- [self setIsVisible:YES];
-}
-@end
-
-void initSdlCocoaView(void* parent, int x, int y, int width, int height, bool carbonParent)
-{
- printf("[SDL] Creating Cocoa view x: %d, y: %d, width: %d, height %d, carbon %d\n", x, y, width, height, carbonParent);
-
- NSRect contentRect;
-
- if (carbonParent)
- {
- contentRect = NSMakeRect(x, y, width, height);
-
- if (!nsWindow)
- {
- // initWithWindowRef always returns the same result for the same WindowRef
- nsWindow = [[NSWindow alloc] initWithWindowRef:(WindowRef)parent];
-
- [nsWindow setContentView:[[[NSView alloc] initWithFrame:contentRect] autorelease]];
- }
- }
- else
- {
- contentRect = NSMakeRect(0, 0, width, height);
-
- if (!nsWindow)
- {
- nsWindow = [[SdlCocoaWindow alloc] initWithContentRect:contentRect styleMask:NSDocModalWindowMask backing:NSBackingStoreBuffered defer:NO];
-
- nsParentWindow = (NSWindow*)parent;
- widgetX = x;
- widgetY = y;
- oldDelegate = [nsParentWindow delegate];
- cocoaApplication = true;
-
- [nsWindow setLevel:NSFloatingWindowLevel];
- [nsWindow setHasShadow:NO];
-
- NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
-
- [nc addObserver:nsWindow selector:@selector(windowDidMove:) name:NSWindowDidMoveNotification object:nsParentWindow];
- [nc addObserver:nsWindow selector:@selector(windowWillMiniaturize:) name:NSWindowWillMiniaturizeNotification object:nsParentWindow];
- [nc addObserver:nsWindow selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:nsParentWindow];
- }
- }
-
- if (!nsView)
- {
- nsView = [[NSView alloc] initWithFrame:contentRect];
-
- [[nsWindow contentView] addSubview:nsView];
- [nsView release];
-
- if (carbonParent)
- [nsWindow orderOut:nil]; // very important, otherwise window won't be placed correctly on repeat showings
- else
- {
- NSRect parentFrame = [nsParentWindow frame];
- NSPoint point = NSMakePoint(parentFrame.origin.x + x, parentFrame.origin.y + y);
-
- [nsWindow setFrameOrigin:point];
- }
-
- [nsWindow orderFront:nil];
- }
- else
- {
- [nsView setFrame:contentRect];
- [[nsWindow contentView] setFrame:contentRect];
- }
-
- // finally, set SDL environment variables with all this nonsense
- char SDL_windowhack[50];
-
- sprintf(SDL_windowhack,"SDL_NSWindowPointer=%ld",(int)nsWindow);
- putenv(SDL_windowhack);
-
- sprintf(SDL_windowhack,"SDL_NSViewPointer=%ld",(int)nsView);
- putenv(SDL_windowhack);
-}
-
-void destroyCocoaView(void)
-{
- if (cocoaApplication)
- {
- [nsParentWindow setDelegate:oldDelegate];
-
- // we're using a floating panel so it doesn't automatically get destroyed
- [nsWindow release];
-
- nsWindow = nil;
- nsView = nil;
- oldDelegate = nil;
- }
- else if (nsWindow)
- {
- // Reference count cannot fall below 2 because SDL releases the window when closing
- // and again when reinitialising (even though this is our own window...).
- if ([nsWindow retainCount] > 2)
- [nsWindow release];
-
- // SDL takes care of all the destroying...a little too much, so make sure our Carbon
- // window is still displayed (via its Cocoa wrapper)
- [nsWindow makeKeyAndOrderFront:nil];
- }
-}
+#import
+#import
+
+static NSWindow* nsParentWindow = nil;
+static NSWindow* nsWindow = nil;
+static NSView* nsView = nil;
+static bool cocoaApplication = false;
+static id oldDelegate = nil;
+static int widgetX = 0, widgetY = 0;
+
+@interface SdlCocoaWindow : NSWindow
+- (void)windowDidMove:(id)notification;
+- (void)windowWillMiniaturize:(NSNotification *)notification;
+- (void)windowDidDeminiaturize:(NSNotification *)notification;
+@end
+
+@implementation SdlCocoaWindow
+- (void)windowDidMove:(id)notification
+{
+ NSRect parentFrame = [nsParentWindow frame];
+ NSPoint point = NSMakePoint(parentFrame.origin.x + widgetX, parentFrame.origin.y + widgetY);
+
+ [self setFrameOrigin:point];
+}
+
+- (void)windowWillMiniaturize:(NSNotification *)notification
+{
+ [self setIsVisible:NO];
+}
+
+- (void)windowDidDeminiaturize:(NSNotification *)notification
+{
+ [self setIsVisible:YES];
+}
+@end
+
+void initSdlCocoaView(void* parent, int x, int y, int width, int height, bool carbonParent)
+{
+ printf("[SDL] Creating Cocoa view x: %d, y: %d, width: %d, height %d, carbon %d\n", x, y, width, height, carbonParent);
+
+ NSRect contentRect;
+
+ if (carbonParent)
+ {
+ contentRect = NSMakeRect(x, y, width, height);
+
+ if (!nsWindow)
+ {
+ // initWithWindowRef always returns the same result for the same WindowRef
+ nsWindow = [[NSWindow alloc] initWithWindowRef:(WindowRef)parent];
+
+ [nsWindow setContentView:[[[NSView alloc] initWithFrame:contentRect] autorelease]];
+ }
+ }
+ else
+ {
+ contentRect = NSMakeRect(0, 0, width, height);
+
+ if (!nsWindow)
+ {
+ nsWindow = [[SdlCocoaWindow alloc] initWithContentRect:contentRect styleMask:NSDocModalWindowMask backing:NSBackingStoreBuffered defer:NO];
+
+ nsParentWindow = (NSWindow*)parent;
+ widgetX = x;
+ widgetY = y;
+ oldDelegate = [nsParentWindow delegate];
+ cocoaApplication = true;
+
+ [nsWindow setLevel:NSFloatingWindowLevel];
+ [nsWindow setHasShadow:NO];
+
+ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
+
+ [nc addObserver:nsWindow selector:@selector(windowDidMove:) name:NSWindowDidMoveNotification object:nsParentWindow];
+ [nc addObserver:nsWindow selector:@selector(windowWillMiniaturize:) name:NSWindowWillMiniaturizeNotification object:nsParentWindow];
+ [nc addObserver:nsWindow selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:nsParentWindow];
+ }
+ }
+
+ if (!nsView)
+ {
+ nsView = [[NSView alloc] initWithFrame:contentRect];
+
+ [[nsWindow contentView] addSubview:nsView];
+ [nsView release];
+
+ if (carbonParent)
+ [nsWindow orderOut:nil]; // very important, otherwise window won't be placed correctly on repeat showings
+ else
+ {
+ NSRect parentFrame = [nsParentWindow frame];
+ NSPoint point = NSMakePoint(parentFrame.origin.x + x, parentFrame.origin.y + y);
+
+ [nsWindow setFrameOrigin:point];
+ }
+
+ [nsWindow orderFront:nil];
+ }
+ else
+ {
+ [nsView setFrame:contentRect];
+ [[nsWindow contentView] setFrame:contentRect];
+ }
+
+ // finally, set SDL environment variables with all this nonsense
+ char SDL_windowhack[50];
+
+ sprintf(SDL_windowhack,"SDL_NSWindowPointer=%ld",(int)nsWindow);
+ putenv(SDL_windowhack);
+
+ sprintf(SDL_windowhack,"SDL_NSViewPointer=%ld",(int)nsView);
+ putenv(SDL_windowhack);
+}
+
+void destroyCocoaView(void)
+{
+ if (cocoaApplication)
+ {
+ [nsParentWindow setDelegate:oldDelegate];
+
+ // we're using a floating panel so it doesn't automatically get destroyed
+ [nsWindow release];
+
+ nsWindow = nil;
+ nsView = nil;
+ oldDelegate = nil;
+ }
+ else if (nsWindow)
+ {
+ // Reference count cannot fall below 2 because SDL releases the window when closing
+ // and again when reinitialising (even though this is our own window...).
+ if ([nsWindow retainCount] > 2)
+ [nsWindow release];
+
+ // SDL takes care of all the destroying...a little too much, so make sure our Carbon
+ // window is still displayed (via its Cocoa wrapper)
+ [nsWindow makeKeyAndOrderFront:nil];
+ }
+}
diff --git a/avidemux/common/ADM_script2/CMakeLists.txt b/avidemux/common/ADM_script2/CMakeLists.txt
index d614970a86..83c1106ec3 100644
--- a/avidemux/common/ADM_script2/CMakeLists.txt
+++ b/avidemux/common/ADM_script2/CMakeLists.txt
@@ -1 +1 @@
-subdirs (src)
+subdirs (src)
diff --git a/avidemux/common/ADM_videoCodec/CMakeLists.txt b/avidemux/common/ADM_videoCodec/CMakeLists.txt
index d614970a86..83c1106ec3 100644
--- a/avidemux/common/ADM_videoCodec/CMakeLists.txt
+++ b/avidemux/common/ADM_videoCodec/CMakeLists.txt
@@ -1 +1 @@
-subdirs (src)
+subdirs (src)
diff --git a/avidemux/gtk/ADM_UIs/src/CMakeLists.txt b/avidemux/gtk/ADM_UIs/src/CMakeLists.txt
index 9f2b57e31e..6e1932fd8e 100644
--- a/avidemux/gtk/ADM_UIs/src/CMakeLists.txt
+++ b/avidemux/gtk/ADM_UIs/src/CMakeLists.txt
@@ -1,31 +1,31 @@
-SET(ADM_LIB ADM_UIGtk6)
-
-SET(${ADM_LIB}_SRCS
- DIA_color.cpp
- DIA_filesel.cpp
- DIA_dialogFactory.cpp
- FAC_bitrate.cpp
- FAC_float.cpp
- FAC_hex.cpp
- FAC_menu.cpp
- FAC_readOnlyText.cpp
- FAC_bar.cpp
- FAC_button.cpp
- FAC_frame.cpp
- FAC_integer.cpp
- FAC_notch.cpp
- FAC_toggle.cpp
- FAC_threadCount.cpp
- FAC_slider.cpp
- FAC_matrix.cpp
- FAC_timeStamp.cpp
- choice.cpp
- toolkit_dialog.cpp
- toolkit.cpp
- DIA_flyDialogGtk.cpp
-)
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../include)
-ADD_LIBRARY(${ADM_LIB} SHARED ${${ADM_LIB}_SRCS})
-TARGET_LINK_LIBRARIES(${ADM_LIB} ${GTK_LDFLAGS} ADM_core6 ADM_coreUI6 ADM_render6_gtk ADM_coreVideoFilter6)
-ADD_TARGET_CFLAGS(${ADM_LIB} ${GTK_CFLAGS})
-ADM_INSTALL_LIB( ${ADM_LIB} )
+SET(ADM_LIB ADM_UIGtk6)
+
+SET(${ADM_LIB}_SRCS
+ DIA_color.cpp
+ DIA_filesel.cpp
+ DIA_dialogFactory.cpp
+ FAC_bitrate.cpp
+ FAC_float.cpp
+ FAC_hex.cpp
+ FAC_menu.cpp
+ FAC_readOnlyText.cpp
+ FAC_bar.cpp
+ FAC_button.cpp
+ FAC_frame.cpp
+ FAC_integer.cpp
+ FAC_notch.cpp
+ FAC_toggle.cpp
+ FAC_threadCount.cpp
+ FAC_slider.cpp
+ FAC_matrix.cpp
+ FAC_timeStamp.cpp
+ choice.cpp
+ toolkit_dialog.cpp
+ toolkit.cpp
+ DIA_flyDialogGtk.cpp
+)
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../include)
+ADD_LIBRARY(${ADM_LIB} SHARED ${${ADM_LIB}_SRCS})
+TARGET_LINK_LIBRARIES(${ADM_LIB} ${GTK_LDFLAGS} ADM_core6 ADM_coreUI6 ADM_render6_gtk ADM_coreVideoFilter6)
+ADD_TARGET_CFLAGS(${ADM_LIB} ${GTK_CFLAGS})
+ADM_INSTALL_LIB( ${ADM_LIB} )
diff --git a/avidemux/gtk/ADM_userInterfaces/ADM_dialog/CMakeLists.txt b/avidemux/gtk/ADM_userInterfaces/ADM_dialog/CMakeLists.txt
index 3dbd22640b..195bae1035 100644
--- a/avidemux/gtk/ADM_userInterfaces/ADM_dialog/CMakeLists.txt
+++ b/avidemux/gtk/ADM_userInterfaces/ADM_dialog/CMakeLists.txt
@@ -1,41 +1,41 @@
-SET(ADM_LIB ADM_dialogGtk)
-
-SET(${ADM_LIB}_SRCS
-DIA_about.cpp
- DIA_calculator.cpp
- DIA_preview.cpp
- DIA_xvid4.cpp
- DIA_encoding.cpp
- DIA_ocr.cpp
- DIA_properties.cpp
- DIA_xvid.cpp
- DIA_idx_pg.cpp
- #DIA_partial.cpp
- DIA_quota.cpp
- DIA_vobsub.cpp
- DIA_jobs.cpp
- DIA_working.cpp
- DIA_busy.cpp
- toolkit_dialog.cpp
- TLK_filesel.cpp
- DIA_audioTracks.cpp
-)
-SET(OBSOLETE_SRCS
- DIA_exLame.cpp
- DIA_pipe.cpp
- DIA_threshold.cpp
- DIA_SwissArmyKnife.cpp
- DIA_particle.cpp
- DIA_eraser.cpp
-
- DIA_hue.cpp
- DIA_srt.cpp
- DIA_crop.cpp
-DIA_eq2.cpp
-DIA_asharp.cpp
- DIA_contrast.cpp
-
-
-)
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
-ADD_DEFINITIONS( -DADM_SUBVERSION=\"${ADM_SUBVERSION}\")
+SET(ADM_LIB ADM_dialogGtk)
+
+SET(${ADM_LIB}_SRCS
+DIA_about.cpp
+ DIA_calculator.cpp
+ DIA_preview.cpp
+ DIA_xvid4.cpp
+ DIA_encoding.cpp
+ DIA_ocr.cpp
+ DIA_properties.cpp
+ DIA_xvid.cpp
+ DIA_idx_pg.cpp
+ #DIA_partial.cpp
+ DIA_quota.cpp
+ DIA_vobsub.cpp
+ DIA_jobs.cpp
+ DIA_working.cpp
+ DIA_busy.cpp
+ toolkit_dialog.cpp
+ TLK_filesel.cpp
+ DIA_audioTracks.cpp
+)
+SET(OBSOLETE_SRCS
+ DIA_exLame.cpp
+ DIA_pipe.cpp
+ DIA_threshold.cpp
+ DIA_SwissArmyKnife.cpp
+ DIA_particle.cpp
+ DIA_eraser.cpp
+
+ DIA_hue.cpp
+ DIA_srt.cpp
+ DIA_crop.cpp
+DIA_eq2.cpp
+DIA_asharp.cpp
+ DIA_contrast.cpp
+
+
+)
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+ADD_DEFINITIONS( -DADM_SUBVERSION=\"${ADM_SUBVERSION}\")
diff --git a/avidemux/gtk/ADM_userInterfaces/ADM_filters/CMakeLists.txt b/avidemux/gtk/ADM_userInterfaces/ADM_filters/CMakeLists.txt
index 6dceafcee8..c9bfa31433 100644
--- a/avidemux/gtk/ADM_userInterfaces/ADM_filters/CMakeLists.txt
+++ b/avidemux/gtk/ADM_userInterfaces/ADM_filters/CMakeLists.txt
@@ -1,9 +1,9 @@
-SET(ADM_LIB ADM_filtersGtk)
-
-SET(${ADM_LIB}_SRCS
- gui_filtermanager.cpp
-)
-
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
-FILE(GLOB ADM_filterIcons ${AVIDEMUX_TOP_SOURCE_DIR}/avidemux/common/ADM_icons/videoFilter/*.png)
-INSTALL(FILES videoFilter.gtkBuilder ${ADM_filterIcons} DESTINATION "${AVIDEMUX_LIB_DIR}/ADM_glade/videoFilter")
+SET(ADM_LIB ADM_filtersGtk)
+
+SET(${ADM_LIB}_SRCS
+ gui_filtermanager.cpp
+)
+
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+FILE(GLOB ADM_filterIcons ${AVIDEMUX_TOP_SOURCE_DIR}/avidemux/common/ADM_icons/videoFilter/*.png)
+INSTALL(FILES videoFilter.gtkBuilder ${ADM_filterIcons} DESTINATION "${AVIDEMUX_LIB_DIR}/ADM_glade/videoFilter")
diff --git a/avidemux/gtk/ADM_userInterfaces/ADM_gui2/CMakeLists.txt b/avidemux/gtk/ADM_userInterfaces/ADM_gui2/CMakeLists.txt
index 1c9734739e..b3f25ef7fb 100644
--- a/avidemux/gtk/ADM_userInterfaces/ADM_gui2/CMakeLists.txt
+++ b/avidemux/gtk/ADM_userInterfaces/ADM_gui2/CMakeLists.txt
@@ -1,10 +1,10 @@
-SET(ADM_LIB ADM_gui2Gtk)
-
-SET(${ADM_LIB}_SRCS
- GUI_bindings.cpp GUI_gtkRender.cpp GUI_keymap.cpp )
-
-IF (APPLE)
- SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_gtkRenderHelper.m)
-ENDIF (APPLE)
-
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+SET(ADM_LIB ADM_gui2Gtk)
+
+SET(${ADM_LIB}_SRCS
+ GUI_bindings.cpp GUI_gtkRender.cpp GUI_keymap.cpp )
+
+IF (APPLE)
+ SET(${ADM_LIB}_SRCS ${${ADM_LIB}_SRCS} GUI_gtkRenderHelper.m)
+ENDIF (APPLE)
+
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
diff --git a/avidemux/gtk/ADM_userInterfaces/ADM_gui2/GUI_gtkRenderHelper.m b/avidemux/gtk/ADM_userInterfaces/ADM_gui2/GUI_gtkRenderHelper.m
index 2152fc1fba..cf548a1820 100644
--- a/avidemux/gtk/ADM_userInterfaces/ADM_gui2/GUI_gtkRenderHelper.m
+++ b/avidemux/gtk/ADM_userInterfaces/ADM_gui2/GUI_gtkRenderHelper.m
@@ -1,19 +1,19 @@
-#import
-
-int getMainNSWindow(void)
-{
- NSEnumerator *enumerator = [[NSApp windows] objectEnumerator];
- id nsWindow;
- id mainWindow = 0;
-
- while ((nsWindow = [enumerator nextObject]))
- {
- if ([[nsWindow title] hasSuffix:@"Avidemux"])
- {
- mainWindow = nsWindow;
- break;
- }
- }
-
- return (int)mainWindow;
+#import
+
+int getMainNSWindow(void)
+{
+ NSEnumerator *enumerator = [[NSApp windows] objectEnumerator];
+ id nsWindow;
+ id mainWindow = 0;
+
+ while ((nsWindow = [enumerator nextObject]))
+ {
+ if ([[nsWindow title] hasSuffix:@"Avidemux"])
+ {
+ mainWindow = nsWindow;
+ break;
+ }
+ }
+
+ return (int)mainWindow;
}
\ No newline at end of file
diff --git a/avidemux/gtk/ADM_userInterfaces/ADM_ocr/CMakeLists.txt b/avidemux/gtk/ADM_userInterfaces/ADM_ocr/CMakeLists.txt
index d14f4c81d9..04a61d7078 100644
--- a/avidemux/gtk/ADM_userInterfaces/ADM_ocr/CMakeLists.txt
+++ b/avidemux/gtk/ADM_userInterfaces/ADM_ocr/CMakeLists.txt
@@ -1,7 +1,7 @@
-SET(ADM_LIB ADM_ocrGtk)
-
-SET(${ADM_LIB}_SRCS
- adm_ocr.cpp
- adm_editglyph.cpp)
-
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+SET(ADM_LIB ADM_ocrGtk)
+
+SET(${ADM_LIB}_SRCS
+ adm_ocr.cpp
+ adm_editglyph.cpp)
+
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
diff --git a/avidemux/gtk/ADM_userInterfaces/ADM_toolkit_gtk/CMakeLists.txt b/avidemux/gtk/ADM_userInterfaces/ADM_toolkit_gtk/CMakeLists.txt
index 0db180b252..df5ff47642 100644
--- a/avidemux/gtk/ADM_userInterfaces/ADM_toolkit_gtk/CMakeLists.txt
+++ b/avidemux/gtk/ADM_userInterfaces/ADM_toolkit_gtk/CMakeLists.txt
@@ -1,13 +1,13 @@
-SET(ADM_LIB ADM_toolkitGtk)
-
-SET(${ADM_LIB}_SRCS
- ADM_tray_gtk.cpp
- gtkmarkscale.c jogshuttle.c ADM_jogshuttle.cpp mediactrl.c
- GUI_glade.cpp
-)
-
-ADD_DEFINITIONS(-DTARGET_DIR="${AVIDEMUX_LIB_DIR}/ADM_glade/" -DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
-ADD_LIBRARY(${ADM_LIB} SHARED ${${ADM_LIB}_SRCS})
-TARGET_LINK_LIBRARIES(${ADM_LIB} ${GTK_LDFLAGS} ADM_toolkitGtk)
-ADD_TARGET_CFLAGS(${ADM_LIB} ${GTK_CFLAGS})
+SET(ADM_LIB ADM_toolkitGtk)
+
+SET(${ADM_LIB}_SRCS
+ ADM_tray_gtk.cpp
+ gtkmarkscale.c jogshuttle.c ADM_jogshuttle.cpp mediactrl.c
+ GUI_glade.cpp
+)
+
+ADD_DEFINITIONS(-DTARGET_DIR="${AVIDEMUX_LIB_DIR}/ADM_glade/" -DSOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}")
+ADD_LIBRARY(${ADM_LIB} SHARED ${${ADM_LIB}_SRCS})
+TARGET_LINK_LIBRARIES(${ADM_LIB} ${GTK_LDFLAGS} ADM_toolkitGtk)
+ADD_TARGET_CFLAGS(${ADM_LIB} ${GTK_CFLAGS})
ADM_INSTALL_LIB(${ADM_LIB})
\ No newline at end of file
diff --git a/avidemux/gtk/ADM_userInterfaces/glade/CMakeLists.txt b/avidemux/gtk/ADM_userInterfaces/glade/CMakeLists.txt
index 79606dad9b..5f59db6666 100644
--- a/avidemux/gtk/ADM_userInterfaces/glade/CMakeLists.txt
+++ b/avidemux/gtk/ADM_userInterfaces/glade/CMakeLists.txt
@@ -1,11 +1,11 @@
-ADD_SUBDIRECTORY(main)
-# Install glade file into FOO/lib/ADM_glade/
-set(ADM_glade
-about.gtkBuilder
-calculator.gtkBuilder
-DIA_alternate.gtkBuilder
-encoding.gtkBuilder
-properties.gtkBuilder
-${AVIDEMUX_TOP_SOURCE_DIR}/avidemux_icon.png
-)
-INSTALL(FILES ${ADM_glade} DESTINATION "${AVIDEMUX_LIB_DIR}/ADM_glade/")
+ADD_SUBDIRECTORY(main)
+# Install glade file into FOO/lib/ADM_glade/
+set(ADM_glade
+about.gtkBuilder
+calculator.gtkBuilder
+DIA_alternate.gtkBuilder
+encoding.gtkBuilder
+properties.gtkBuilder
+${AVIDEMUX_TOP_SOURCE_DIR}/avidemux_icon.png
+)
+INSTALL(FILES ${ADM_glade} DESTINATION "${AVIDEMUX_LIB_DIR}/ADM_glade/")
diff --git a/avidemux/gtk/ADM_userInterfaces/glade/main/CMakeLists.txt b/avidemux/gtk/ADM_userInterfaces/glade/main/CMakeLists.txt
index 87aba05a4a..c08d2ece38 100644
--- a/avidemux/gtk/ADM_userInterfaces/glade/main/CMakeLists.txt
+++ b/avidemux/gtk/ADM_userInterfaces/glade/main/CMakeLists.txt
@@ -1,8 +1,8 @@
-# Install glade file into FOO/lib/ADM_glade/
-set(ADM_glade
-gtk2_build.gtkBuilder
-avidemux_icon_small.png
-)
-
-FILE(GLOB ADM_icons ${AVIDEMUX_TOP_SOURCE_DIR}/avidemux/common/ADM_icons/*.png)
-INSTALL(FILES ${ADM_glade} ${ADM_icons} DESTINATION "${AVIDEMUX_LIB_DIR}/ADM_glade/main")
+# Install glade file into FOO/lib/ADM_glade/
+set(ADM_glade
+gtk2_build.gtkBuilder
+avidemux_icon_small.png
+)
+
+FILE(GLOB ADM_icons ${AVIDEMUX_TOP_SOURCE_DIR}/avidemux/common/ADM_icons/*.png)
+INSTALL(FILES ${ADM_glade} ${ADM_icons} DESTINATION "${AVIDEMUX_LIB_DIR}/ADM_glade/main")
diff --git a/avidemux/gtk/ADM_userInterfaces/glade/old/project_newencoding.glade b/avidemux/gtk/ADM_userInterfaces/glade/old/project_newencoding.glade
index 017ed175dc..725469bf67 100644
--- a/avidemux/gtk/ADM_userInterfaces/glade/old/project_newencoding.glade
+++ b/avidemux/gtk/ADM_userInterfaces/glade/old/project_newencoding.glade
@@ -1,1275 +1,1275 @@
-
-
-
-
-
-
- 12
- 500
- True
- Encoding...
- GTK_WINDOW_TOPLEVEL
- GTK_WIN_POS_CENTER_ON_PARENT
- False
- True
- False
- True
- False
- False
- GDK_WINDOW_TYPE_HINT_DIALOG
- GDK_GRAVITY_NORTH_WEST
- True
- False
-
-
-
- True
- False
- 0
-
-
-
- True
- 2
- 2
- False
- 12
- 12
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 10
- 10
- 12
- 12
-
-
-
- True
- 4
- 2
- False
- 8
- 14
-
-
-
- True
- <b>Phase:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- None
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- <b>Video Codec:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- None
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- <b>Audio Codec:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- None
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- <b>Container:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 3
- 4
- fill
-
-
-
-
-
-
- True
- Unknown
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 3
- 4
- fill
-
-
-
-
-
-
-
-
-
- 0
- 1
- 0
- 1
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 10
- 10
- 12
- 12
-
-
-
- True
- 4
- 2
- False
- 8
- 14
-
-
-
- True
- <b>Processed Frames:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- <b>Total Frames:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- <b>Quantiser:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- <b>Average Bitrate:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 3
- 4
- fill
-
-
-
-
-
-
- True
- 0 kB/s
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 3
- 4
- fill
-
-
-
-
-
-
- True
- 0
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- 0
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- 0
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
-
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 10
- 10
- 12
- 12
-
-
-
- True
- 3
- 2
- False
- 8
- 14
-
-
-
- True
- <b>Video Size:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- <b>Audio Size:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- <b>Total Size:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- 0 MB
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- 10
- False
- 0
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- 0 MB
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- 10
- False
- 0
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- 0 MB
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- 10
- False
- 0
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
-
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 10
- 10
- 12
- 12
-
-
-
- True
- 3
- 2
- False
- 8
- 14
-
-
-
- True
- <b>Elapsed:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- <b>Time Remaining:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- <b>Frames/sec:</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- 0
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- Unknown
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- 00:00:00
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
-
-
-
- 1
- 2
- 1
- 2
- fill
- fill
-
-
-
-
- 0
- True
- False
-
-
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 10
- 15
- 0
- 0
-
-
-
- True
- False
- 0
-
-
-
- True
- GTK_PROGRESS_LEFT_TO_RIGHT
- 0
- 0.10000000149
- PANGO_ELLIPSIZE_NONE
-
-
- 4
- False
- False
-
-
-
-
-
-
- 0
- False
- False
-
-
-
-
-
- True
- False
- 0
-
-
-
- True
- True
- Shut down computer when finished
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- True
- False
-
-
-
-
-
- True
- Priority:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 6
- False
- False
-
-
-
-
-
- True
- True
- High
-Above Normal
-Normal
-Below Normal
-Low
- False
- True
-
-
- 0
- False
- False
-
-
-
-
- 0
- True
- True
-
-
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 6
- 30
- 0
- 0
-
-
-
- True
-
-
-
-
- 0
- True
- True
-
-
-
-
-
- True
- False
- 0
-
-
-
- True
- 1
- 1
- False
- 5
- 0
-
-
- 0
- True
- True
-
-
-
-
-
- True
- True
- True
- True
- True
- GTK_RELIEF_NORMAL
- True
-
-
-
- True
- 0.5
- 0.5
- 0
- 0
- 0
- 0
- 0
- 0
-
-
-
- True
- False
- 2
-
-
-
- True
- gtk-cancel
- 4
- 0.5
- 0.5
- 0
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Pause / Abort
- True
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
-
-
-
- 0
- False
- False
-
-
-
-
- 0
- False
- True
-
-
-
-
-
-
-
+
+
+
+
+
+
+ 12
+ 500
+ True
+ Encoding...
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_CENTER_ON_PARENT
+ False
+ True
+ False
+ True
+ False
+ False
+ GDK_WINDOW_TYPE_HINT_DIALOG
+ GDK_GRAVITY_NORTH_WEST
+ True
+ False
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ 2
+ 2
+ False
+ 12
+ 12
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 10
+ 10
+ 12
+ 12
+
+
+
+ True
+ 4
+ 2
+ False
+ 8
+ 14
+
+
+
+ True
+ <b>Phase:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ None
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ <b>Video Codec:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ None
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ <b>Audio Codec:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ None
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ <b>Container:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 3
+ 4
+ fill
+
+
+
+
+
+
+ True
+ Unknown
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 3
+ 4
+ fill
+
+
+
+
+
+
+
+
+
+ 0
+ 1
+ 0
+ 1
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 10
+ 10
+ 12
+ 12
+
+
+
+ True
+ 4
+ 2
+ False
+ 8
+ 14
+
+
+
+ True
+ <b>Processed Frames:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ <b>Total Frames:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ <b>Quantiser:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ <b>Average Bitrate:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 3
+ 4
+ fill
+
+
+
+
+
+
+ True
+ 0 kB/s
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 3
+ 4
+ fill
+
+
+
+
+
+
+ True
+ 0
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ 0
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ 0
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 10
+ 10
+ 12
+ 12
+
+
+
+ True
+ 3
+ 2
+ False
+ 8
+ 14
+
+
+
+ True
+ <b>Video Size:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ <b>Audio Size:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ <b>Total Size:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ 0 MB
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ 10
+ False
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ 0 MB
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ 10
+ False
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ 0 MB
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ 10
+ False
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 10
+ 10
+ 12
+ 12
+
+
+
+ True
+ 3
+ 2
+ False
+ 8
+ 14
+
+
+
+ True
+ <b>Elapsed:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ <b>Time Remaining:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ <b>Frames/sec:</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ 0
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ Unknown
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ 00:00:00
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+ fill
+
+
+
+
+ 0
+ True
+ False
+
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 10
+ 15
+ 0
+ 0
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ GTK_PROGRESS_LEFT_TO_RIGHT
+ 0
+ 0.10000000149
+ PANGO_ELLIPSIZE_NONE
+
+
+ 4
+ False
+ False
+
+
+
+
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ True
+ Shut down computer when finished
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ True
+ False
+
+
+
+
+
+ True
+ Priority:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 6
+ False
+ False
+
+
+
+
+
+ True
+ True
+ High
+Above Normal
+Normal
+Below Normal
+Low
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 6
+ 30
+ 0
+ 0
+
+
+
+ True
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ 1
+ 1
+ False
+ 5
+ 0
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ True
+ True
+ True
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+
+ True
+ 0.5
+ 0.5
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ True
+ False
+ 2
+
+
+
+ True
+ gtk-cancel
+ 4
+ 0.5
+ 0.5
+ 0
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Pause / Abort
+ True
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+
+
+
+ 0
+ False
+ False
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+
+
diff --git a/avidemux/gtk/ADM_userInterfaces/glade/old/project_properties.glade b/avidemux/gtk/ADM_userInterfaces/glade/old/project_properties.glade
index 0aa306a14a..81d395df4d 100644
--- a/avidemux/gtk/ADM_userInterfaces/glade/old/project_properties.glade
+++ b/avidemux/gtk/ADM_userInterfaces/glade/old/project_properties.glade
@@ -1,1165 +1,1165 @@
-
-
-
-
-
-
- True
- Properties
- GTK_WINDOW_TOPLEVEL
- GTK_WIN_POS_NONE
- False
- True
- False
- True
- False
- False
- GDK_WINDOW_TYPE_HINT_DIALOG
- GDK_GRAVITY_NORTH_WEST
- True
- False
- True
-
-
-
- True
- False
- 0
-
-
-
- True
- GTK_BUTTONBOX_END
-
-
-
- True
- True
- True
- True
- True
- gtk-ok
- True
- GTK_RELIEF_NORMAL
- True
- -5
-
-
-
-
- 0
- False
- True
- GTK_PACK_END
-
-
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 2
- 10
- 6
- 6
-
-
-
- True
- False
- 2
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 3
- 6
- 12
- 12
-
-
-
- True
- 6
- 2
- False
- 0
- 12
-
-
-
- True
- Frame Rate:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 3
- 4
- fill
-
-
-
-
-
-
- True
- Frame Count:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 4
- 5
- fill
-
-
-
-
-
-
- True
- Total Duration:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 5
- 6
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 3
- 4
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 1
- 2
-
-
-
-
-
-
- True
- Image Size:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 4
- 5
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 5
- 6
- fill
-
-
-
-
-
-
- True
- Codec 4CC:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Aspect Ratio:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>Video</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- True
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 3
- 6
- 12
- 12
-
-
-
- True
- 3
- 2
- False
- 0
- 12
-
-
-
- True
- Global Motion Compensation:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Packed Bitstream:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Quarter Pixel:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>Extra Video Properties</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 2
- True
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 3
- 6
- 12
- 12
-
-
-
- True
- 7
- 2
- False
- 0
- 12
-
-
-
- True
- Codec:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Channels:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Bitrate:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- Frequency:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 4
- 5
- fill
-
-
-
-
-
-
- True
- Total Duration:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 5
- 6
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 1
- 2
- expand
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 4
- 5
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 5
- 6
- fill
-
-
-
-
-
-
- True
- File Size:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 6
- 7
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 6
- 7
- fill
-
-
-
-
-
-
- True
- Variable Bitrate:
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 3
- 4
- fill
-
-
-
-
-
-
- True
-
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 3
- 4
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>Audio</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- True
- True
-
-
-
-
-
-
- 0
- True
- True
-
-
-
-
-
-
-
+
+
+
+
+
+
+ True
+ Properties
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_NONE
+ False
+ True
+ False
+ True
+ False
+ False
+ GDK_WINDOW_TYPE_HINT_DIALOG
+ GDK_GRAVITY_NORTH_WEST
+ True
+ False
+ True
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ GTK_BUTTONBOX_END
+
+
+
+ True
+ True
+ True
+ True
+ True
+ gtk-ok
+ True
+ GTK_RELIEF_NORMAL
+ True
+ -5
+
+
+
+
+ 0
+ False
+ True
+ GTK_PACK_END
+
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 2
+ 10
+ 6
+ 6
+
+
+
+ True
+ False
+ 2
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 3
+ 6
+ 12
+ 12
+
+
+
+ True
+ 6
+ 2
+ False
+ 0
+ 12
+
+
+
+ True
+ Frame Rate:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 3
+ 4
+ fill
+
+
+
+
+
+
+ True
+ Frame Count:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 4
+ 5
+ fill
+
+
+
+
+
+
+ True
+ Total Duration:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 5
+ 6
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 3
+ 4
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+
+
+
+
+
+
+ True
+ Image Size:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 4
+ 5
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 5
+ 6
+ fill
+
+
+
+
+
+
+ True
+ Codec 4CC:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Aspect Ratio:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>Video</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 3
+ 6
+ 12
+ 12
+
+
+
+ True
+ 3
+ 2
+ False
+ 0
+ 12
+
+
+
+ True
+ Global Motion Compensation:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Packed Bitstream:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Quarter Pixel:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>Extra Video Properties</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 2
+ True
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 3
+ 6
+ 12
+ 12
+
+
+
+ True
+ 7
+ 2
+ False
+ 0
+ 12
+
+
+
+ True
+ Codec:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Channels:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Bitrate:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ Frequency:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 4
+ 5
+ fill
+
+
+
+
+
+
+ True
+ Total Duration:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 5
+ 6
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ expand
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 4
+ 5
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 5
+ 6
+ fill
+
+
+
+
+
+
+ True
+ File Size:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 6
+ 7
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 6
+ 7
+ fill
+
+
+
+
+
+
+ True
+ Variable Bitrate:
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 3
+ 4
+ fill
+
+
+
+
+
+
+ True
+
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 3
+ 4
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>Audio</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+
+
diff --git a/avidemux/gtk/ADM_userInterfaces/glade/old/project_x264.glade b/avidemux/gtk/ADM_userInterfaces/glade/old/project_x264.glade
index f268909ced..695b50c7ad 100644
--- a/avidemux/gtk/ADM_userInterfaces/glade/old/project_x264.glade
+++ b/avidemux/gtk/ADM_userInterfaces/glade/old/project_x264.glade
@@ -1,3609 +1,3609 @@
-
-
-
-
-
-
- True
- x264 Configuration
- GTK_WINDOW_TOPLEVEL
- GTK_WIN_POS_NONE
- False
- True
- False
- True
- False
- False
- GDK_WINDOW_TYPE_HINT_DIALOG
- GDK_GRAVITY_NORTH_WEST
- True
- True
-
-
-
- True
- False
- 0
-
-
-
- True
- GTK_BUTTONBOX_END
-
-
-
- True
- True
- True
- _Defaults
- True
- GTK_RELIEF_NORMAL
- True
- 0
-
-
-
-
-
- True
- True
- True
- gtk-cancel
- True
- GTK_RELIEF_NORMAL
- True
- -6
-
-
-
-
-
- True
- True
- True
- gtk-ok
- True
- GTK_RELIEF_NORMAL
- True
- -5
-
-
-
-
- 0
- False
- True
- GTK_PACK_END
-
-
-
-
-
- True
- True
- True
- True
- GTK_POS_TOP
- False
- False
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- 3
- 2
- False
- 3
- 10
-
-
-
- True
- Encoding Mode
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Quantizer
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- Target Size
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Constant Quantizer - Each frame will have the same compression. Low numbers equal higher quality while high numbers equal lower quality.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 4 0 51 1 10 10
-
-
- 1
- 2
- 2
- 3
- shrink|fill
-
-
-
-
-
-
- True
- Target bitrate or file size
- True
- True
- True
- 0
-
- True
- *
- False
- 4
-
-
- 1
- 2
- 1
- 2
- shrink|fill
-
-
-
-
-
-
- True
- Single Pass - Quality Quantizer (Average)
-Single Pass - Quality Quantizer (Constant)
-Single Pass - Bitrate (Average)
-Two Pass - Video Size
-Two Pass - Average Bitrate
- False
- True
-
-
- 1
- 2
- 0
- 1
- shrink|fill
- fill
-
-
-
-
-
-
- False
- True
-
-
-
-
-
- True
- Bitrate
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- tab
-
-
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 4
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- 2
- 3
- False
- 3
- 10
-
-
-
- True
- Partition Decision
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Method
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- 1 - Extremely Low (Fastest)
-2 - Very Low
-3 - Low
-4 - Medium
-5 - High (Default)
-6 - Very High
-6B - Very High (RDO on B-frames)
-7 - Ultra High
-7B - Ultra High (RDO on B-frames)
-
- False
- True
-
-
- 1
- 3
- 0
- 1
- fill
- fill
-
-
-
-
-
- True
- Diamond Search
-Hexagonal Search
-Uneven Multi-hexagon
-Exhaustive Search
- False
- True
-
-
- 1
- 3
- 1
- 2
- fill
- fill
-
-
-
-
- 0
- False
- True
-
-
-
-
-
- True
- 2
- 3
- False
- 3
- 10
-
-
-
- True
- Max. Ref. Frames
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Range
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Define how many pixels are analysed for motion estimation. The higher the range the more accurate the analysis but the slower the encoding time.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 17 0 64 1 10 10
-
-
- 1
- 2
- 0
- 1
- shrink|fill
-
-
-
-
-
-
- True
- Set how many previous frames can be referenced by a P/B-frame. Numbers above 5 do not seem to improve quality greatly. Numbers 3 to 5 are recommended.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 1 0 16 1 10 10
-
-
- 1
- 2
- 1
- 2
- shrink|fill
-
-
-
-
-
-
- True
- Use color information for detecting motion to improve quality
- True
- Chroma ME
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 2
- 3
- 0
- 1
- 30
- fill
-
-
-
-
-
-
- True
- Calculate referencing individually based on each partition
- True
- Mixed Refs
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
-
-
- 2
- 3
- 1
- 2
- 30
- fill
-
-
-
-
-
- 0
- True
- False
-
-
-
-
-
- True
- True
- 0
-
-
-
- True
- Early skip detection on P-frames to speedup encoding. Quality will be slightly reduced.
- True
- Fast P-Skip
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- True
- DCT Decimate
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Input video is interlaced
- True
- Interlaced
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
-
-
- 0
- False
- False
-
-
-
-
- 0
- True
- True
-
-
-
-
-
-
-
-
-
- True
- <b>Motion Estimation</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- 3
- 2
- False
- 3
- 10
-
-
-
- True
- False
- 0
-
-
-
- True
- Enforce the size of a decoded pixel decoded to a certain value. Set this to 1:1 for non-anamorphic video.
- True
- True
- True
- 0
- 1
- True
- *
- False
- 4
-
-
- 0
- True
- True
-
-
-
-
-
- True
- :
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 3
- False
- False
-
-
-
-
-
- True
- Enforce the size of a decoded pixel decoded to a certain value. Set this to 1:1 for non-anamorphic video.
- True
- True
- True
- 0
- 1
- True
- *
- False
- 4
-
-
- 0
- True
- True
-
-
-
-
- 1
- 2
- 1
- 2
- fill
- fill
-
-
-
-
-
- True
- Set a custom aspect ratio. The default 1:1 is recommended for most video.
- True
- Custom
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Set a common predefined aspect ratio
- True
- Predefined Aspect Ratio
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
- radiobuttonCustomAR
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- True
- As Input
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
- radiobuttonCustomAR
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- 1:1 (1:1)
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 2
- 3
-
-
-
-
-
-
-
- True
- False
- True
-
-
- 1
- 2
- 0
- 1
- fill
- fill
-
-
-
-
-
-
-
-
-
- True
- <b>Sample Aspect Ratio</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 0
- 3
- 0
- 0
-
-
-
- True
- False
- 17
-
-
-
- True
- Lossless compression technique that reduces bitrate by approximately 10%. Increases encoding and decoding time.
- True
- CABAC
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- False
- 10
-
-
-
- True
- Trellis
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Use Trellis Rate Distortion Optimisation to find optimal encoding for each block. Level 0 equals disabled, level 1 equals normal and level 2 equals high.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0 0 2 1 10 10
-
-
- 0
- False
- False
-
-
-
-
- 0
- False
- False
-
-
-
-
-
- True
- False
- 10
-
-
-
- True
- Noise Reduction
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Set the amount of noise reduction
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0 0 1000000000 1 10 10
-
-
- 0
- False
- False
-
-
-
-
- 2
- False
- False
-
-
-
-
-
-
- 0
- True
- True
-
-
-
-
-
- True
- False
- 10
-
-
-
- True
- Enable in-loop deblocking to filter the video
- True
- Deblocking Filter
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- 2
- 2
- False
- 3
- 10
-
-
-
- True
- Threshold
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Strength
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Threshold for block detection. Positive values will detect more blocks, negative values will detect less.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0 -6 6 1 10 10
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Positive values will soften the video, negative values will sharpen
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0 -6 6 1 10 10
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
- 0
- True
- True
-
-
-
-
- 0
- True
- True
-
-
-
-
-
-
-
-
-
- True
- <b>Misc. Options</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
-
- False
- True
-
-
-
-
-
- True
- Motion & Misc
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- tab
-
-
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- General block breakdown transformation
- True
- 8x8 Transform
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Improve the P-frame quality
- True
- 8x8, 8x16 and 16x8 P-frame search
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Improve the B-frame quality
- True
- 8x8, 8x16 and 16x8 B-frame search
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Further improve the P-frame quality
- True
- 4x4, 4x8 and 8x4 P-frame search
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Enable DCT Intra block search to improve quality
- True
- 8x8 Intra search
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Further enable DCT Intra block search to improve quality
- True
- 4x4 Intra search
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
-
-
-
-
- True
- <b>Partition Macroblocks</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- 2
- 2
- False
- 3
- 10
-
-
-
- True
- Bias
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Max Consecutive
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Increase / decrease probability for how often B-frames are used. It will not violate the maximum consecutive frame limit.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0 -100 100 1 10 10
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Set the maximum number of consecutive B-frames. This defines how many duplicate frames can be dropped. Numbers 2 to 5 are recommended. This greatly improves the use of bitrate and quality.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 3 0 15 1 10 10
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
- 0
- True
- True
-
-
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 3
- 3
- 0
- 0
-
-
-
- True
- 2
- 2
- False
- 3
- 10
-
-
-
- True
- Optimise both motion vectors in B-frames. This will improve quality but take more time for encoding.
- True
- Bidirectional ME
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Enables weighting of B-frames to help fades
- True
- Weighted Biprediction
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Use fewer B-frames if needed. This is always recommended. If not enabled, the codec will always use the maximum number of consecutive B-frames.
- True
- Adaptative DCT
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Allow B-frames to make references non-linearly to another B-frame (instead of creating a duplicate copy)
- True
- Use as Reference
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
-
- 0
- True
- True
-
-
-
-
-
- True
- False
- 10
-
-
-
- True
- B-Frame Direct Mode
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- True
-
-
-
-
-
- True
- True
- None
-Spatial
-Temporal
-Auto
- False
- True
-
-
- 0
- False
- True
-
-
-
-
- 0
- True
- True
-
-
-
-
-
-
-
-
-
- True
- <b>B-Frames</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
-
- False
- True
-
-
-
-
-
- True
- Partitions & Frames
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- tab
-
-
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- 3
- 2
- False
- 3
- 10
-
-
-
- 115
- True
- Set how much "bitrate bonus" a keyframe can get
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 40 0 100 1 10 10
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Set how much bitrate is deducted from a B-frame as compared to the previous P-frame
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 30 0 100 1 10 10
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Define how much the bitrate can fluctuate over the entire video. 0% results in a constant bitrate stream, while 100% results in a pure quality based bitrate stream.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 60 0 100 1 10 10
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- Keyframe Boost (%)
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- B-frame Reduction (%)
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Bitrate Variability (%)
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>Bitrate</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 1
- False
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- 3
- 2
- False
- 3
- 20
-
-
-
- True
- Min QP
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Max QP
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Max QP Step
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- 54
- True
- Enforce a minimum quantizer level
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 10 10 51 1 10 10
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Enforce a maximum quantizer level
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 51 10 51 1 10 10
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Define how much the quantizer rate can change between two consecutive frames
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 4 0 10 1 10 10
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>Quantization Limits</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 1
- False
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- 3
- 2
- False
- 3
- 10
-
-
-
- 115
- True
- Increase / decrease sensitivity for detecting scene changes. Improves I-frame usage and quality.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 40 0 100 1 10 10
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Scene Cut Threshold
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Min IDR Frame Interval
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Set minimum frame interval between IDR frames. Defines the minimum amount a frame can be reused and referenced by other frames before a new IDR frame is established.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 25 0 100 1 10 10
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Set maximum frame interval between IDR frames. Defines the maximum amount a frame can be reused and referenced by other frames before a new IDR frame is established.
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 250 1 1000 1 10 10
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- Max IDR Frame Interval
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>More Rate Settings</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 1
- False
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- 3
- 2
- False
- 3
- 10
-
-
-
- True
- VBV Buffer Size
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Initial VBV Buffer (%)
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- Maximum Local Bitrate
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0 0 99999 1 10 10
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0 0 99999 1 10 10
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 90 0 100 1 10 10
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>Video Buffer Verifier</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
-
- False
- True
-
-
-
-
-
-
- tab
-
-
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- 4
- 2
- False
- 3
- 10
-
-
-
- True
- Bitrate Variance
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Allowed variance of average bitrate. Lower values mean less variance. Higher values mean more variance.
- True
- 0.10000000149
- 1
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 1 0 1 0.10000000149 10 10
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Allowed variance of average quantizer or quality. Lower values mean less variance. Higher values mean more variance. Note that 0 means constant quality while 1 means constant fluctuation. Recommended 0.6.
- True
- 0.10000000149
- 1
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0.600000023842 0 1 0.10000000149 10 10
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Reduced fluctuations in Quantizer (before curve compression)
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 20 0 999 1 10 10
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- True
- 0.5
- 1
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0.5 0 1 0.5 10 10
-
-
- 1
- 2
- 3
- 4
- fill
-
-
-
-
-
-
- True
- Quantizer Compression
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Temp. Blur of Est. Frame Complexity
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
- True
- Temp. Blur of Quant. after CC
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 3
- 4
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>Misc</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- 3
- 2
- False
- 3
- 10
-
-
-
- True
- Quantization factors used between I and P-frames
- True
- 0.10000000149
- 1
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 1.39999997616 1 10 0.10000000149 10 10
-
-
- 1
- 2
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Quantization used between P and B-frames
- True
- 0.10000000149
- 1
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 1.29999995232 1 10 0.10000000149 10 10
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Quantization difference between chroma (color) and luma (brightness)
- True
- 1
- 0
- True
- GTK_UPDATE_ALWAYS
- False
- False
- 0 -12 12 1 10 10
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- Factor between I and P-frame Quants
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 0
- 1
- fill
-
-
-
-
-
-
- True
- Factor between P and B-frame Quants
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Chroma QP Offset
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- 1
- 2
- 3
- fill
-
-
-
-
-
-
-
-
-
-
- True
- <b>Quantizers</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- 0.5
- 0.5
- 1
- 1
- 7
- 7
- 7
- 7
-
-
-
- True
- False
- 3
-
-
-
- True
- True
- Flat Matrix
- True
- GTK_RELIEF_NORMAL
- True
- True
- False
- True
-
-
- 0
- False
- False
-
-
-
-
-
- True
- True
- JVT Matrix
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
- radiobuttonFlatmatrix
-
-
- 0
- False
- False
-
-
-
-
-
- True
- False
- 10
-
-
-
- True
- True
- Custom Matrix
- True
- GTK_RELIEF_NORMAL
- True
- False
- False
- True
- radiobuttonFlatmatrix
-
-
- 0
- True
- True
-
-
-
-
-
- True
- False
- 0
-
-
-
- True
- Open CQM file
- GTK_FILE_CHOOSER_ACTION_OPEN
- True
- False
- -1
-
-
- 0
- True
- True
-
-
-
-
-
- True
-
-
- 0
- True
- True
-
-
-
-
-
- True
- Edit loaded custom quantization matrix file
- True
- Edit Custom Matrix
- True
- GTK_RELIEF_NORMAL
- True
-
-
- 0
- False
- False
-
-
-
-
- 0
- True
- True
-
-
-
-
- 0
- False
- False
-
-
-
-
-
-
-
-
-
- True
- <b>Quantization Matrices</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 0
- False
- True
-
-
-
-
-
-
- False
- True
-
-
-
-
-
- True
- More
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- tab
-
-
-
-
- 0
- True
- True
-
-
-
-
-
-
-
+
+
+
+
+
+
+ True
+ x264 Configuration
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_NONE
+ False
+ True
+ False
+ True
+ False
+ False
+ GDK_WINDOW_TYPE_HINT_DIALOG
+ GDK_GRAVITY_NORTH_WEST
+ True
+ True
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ GTK_BUTTONBOX_END
+
+
+
+ True
+ True
+ True
+ _Defaults
+ True
+ GTK_RELIEF_NORMAL
+ True
+ 0
+
+
+
+
+
+ True
+ True
+ True
+ gtk-cancel
+ True
+ GTK_RELIEF_NORMAL
+ True
+ -6
+
+
+
+
+
+ True
+ True
+ True
+ gtk-ok
+ True
+ GTK_RELIEF_NORMAL
+ True
+ -5
+
+
+
+
+ 0
+ False
+ True
+ GTK_PACK_END
+
+
+
+
+
+ True
+ True
+ True
+ True
+ GTK_POS_TOP
+ False
+ False
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ 3
+ 2
+ False
+ 3
+ 10
+
+
+
+ True
+ Encoding Mode
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Quantizer
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ Target Size
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Constant Quantizer - Each frame will have the same compression. Low numbers equal higher quality while high numbers equal lower quality.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 4 0 51 1 10 10
+
+
+ 1
+ 2
+ 2
+ 3
+ shrink|fill
+
+
+
+
+
+
+ True
+ Target bitrate or file size
+ True
+ True
+ True
+ 0
+
+ True
+ *
+ False
+ 4
+
+
+ 1
+ 2
+ 1
+ 2
+ shrink|fill
+
+
+
+
+
+
+ True
+ Single Pass - Quality Quantizer (Average)
+Single Pass - Quality Quantizer (Constant)
+Single Pass - Bitrate (Average)
+Two Pass - Video Size
+Two Pass - Average Bitrate
+ False
+ True
+
+
+ 1
+ 2
+ 0
+ 1
+ shrink|fill
+ fill
+
+
+
+
+
+
+ False
+ True
+
+
+
+
+
+ True
+ Bitrate
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ tab
+
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 4
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ 2
+ 3
+ False
+ 3
+ 10
+
+
+
+ True
+ Partition Decision
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Method
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ 1 - Extremely Low (Fastest)
+2 - Very Low
+3 - Low
+4 - Medium
+5 - High (Default)
+6 - Very High
+6B - Very High (RDO on B-frames)
+7 - Ultra High
+7B - Ultra High (RDO on B-frames)
+
+ False
+ True
+
+
+ 1
+ 3
+ 0
+ 1
+ fill
+ fill
+
+
+
+
+
+ True
+ Diamond Search
+Hexagonal Search
+Uneven Multi-hexagon
+Exhaustive Search
+ False
+ True
+
+
+ 1
+ 3
+ 1
+ 2
+ fill
+ fill
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+ True
+ 2
+ 3
+ False
+ 3
+ 10
+
+
+
+ True
+ Max. Ref. Frames
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Range
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Define how many pixels are analysed for motion estimation. The higher the range the more accurate the analysis but the slower the encoding time.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 17 0 64 1 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ shrink|fill
+
+
+
+
+
+
+ True
+ Set how many previous frames can be referenced by a P/B-frame. Numbers above 5 do not seem to improve quality greatly. Numbers 3 to 5 are recommended.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 1 0 16 1 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ shrink|fill
+
+
+
+
+
+
+ True
+ Use color information for detecting motion to improve quality
+ True
+ Chroma ME
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 2
+ 3
+ 0
+ 1
+ 30
+ fill
+
+
+
+
+
+
+ True
+ Calculate referencing individually based on each partition
+ True
+ Mixed Refs
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 2
+ 3
+ 1
+ 2
+ 30
+ fill
+
+
+
+
+
+ 0
+ True
+ False
+
+
+
+
+
+ True
+ True
+ 0
+
+
+
+ True
+ Early skip detection on P-frames to speedup encoding. Quality will be slightly reduced.
+ True
+ Fast P-Skip
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ True
+ DCT Decimate
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Input video is interlaced
+ True
+ Interlaced
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+
+
+
+
+ True
+ <b>Motion Estimation</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ 3
+ 2
+ False
+ 3
+ 10
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ Enforce the size of a decoded pixel decoded to a certain value. Set this to 1:1 for non-anamorphic video.
+ True
+ True
+ True
+ 0
+ 1
+ True
+ *
+ False
+ 4
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ :
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 3
+ False
+ False
+
+
+
+
+
+ True
+ Enforce the size of a decoded pixel decoded to a certain value. Set this to 1:1 for non-anamorphic video.
+ True
+ True
+ True
+ 0
+ 1
+ True
+ *
+ False
+ 4
+
+
+ 0
+ True
+ True
+
+
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+ fill
+
+
+
+
+
+ True
+ Set a custom aspect ratio. The default 1:1 is recommended for most video.
+ True
+ Custom
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Set a common predefined aspect ratio
+ True
+ Predefined Aspect Ratio
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+ radiobuttonCustomAR
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ True
+ As Input
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+ radiobuttonCustomAR
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ 1:1 (1:1)
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 1
+ 2
+ 2
+ 3
+
+
+
+
+
+
+
+ True
+ False
+ True
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+ fill
+
+
+
+
+
+
+
+
+
+ True
+ <b>Sample Aspect Ratio</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 0
+ 3
+ 0
+ 0
+
+
+
+ True
+ False
+ 17
+
+
+
+ True
+ Lossless compression technique that reduces bitrate by approximately 10%. Increases encoding and decoding time.
+ True
+ CABAC
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ False
+ 10
+
+
+
+ True
+ Trellis
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Use Trellis Rate Distortion Optimisation to find optimal encoding for each block. Level 0 equals disabled, level 1 equals normal and level 2 equals high.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0 0 2 1 10 10
+
+
+ 0
+ False
+ False
+
+
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ False
+ 10
+
+
+
+ True
+ Noise Reduction
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Set the amount of noise reduction
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0 0 1000000000 1 10 10
+
+
+ 0
+ False
+ False
+
+
+
+
+ 2
+ False
+ False
+
+
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ False
+ 10
+
+
+
+ True
+ Enable in-loop deblocking to filter the video
+ True
+ Deblocking Filter
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ 2
+ 2
+ False
+ 3
+ 10
+
+
+
+ True
+ Threshold
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Strength
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Threshold for block detection. Positive values will detect more blocks, negative values will detect less.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0 -6 6 1 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Positive values will soften the video, negative values will sharpen
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0 -6 6 1 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+
+
+
+
+ True
+ <b>Misc. Options</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+
+ False
+ True
+
+
+
+
+
+ True
+ Motion & Misc
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ tab
+
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ General block breakdown transformation
+ True
+ 8x8 Transform
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Improve the P-frame quality
+ True
+ 8x8, 8x16 and 16x8 P-frame search
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Improve the B-frame quality
+ True
+ 8x8, 8x16 and 16x8 B-frame search
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Further improve the P-frame quality
+ True
+ 4x4, 4x8 and 8x4 P-frame search
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Enable DCT Intra block search to improve quality
+ True
+ 8x8 Intra search
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ Further enable DCT Intra block search to improve quality
+ True
+ 4x4 Intra search
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+
+
+
+
+ True
+ <b>Partition Macroblocks</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ 2
+ 2
+ False
+ 3
+ 10
+
+
+
+ True
+ Bias
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Max Consecutive
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Increase / decrease probability for how often B-frames are used. It will not violate the maximum consecutive frame limit.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0 -100 100 1 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Set the maximum number of consecutive B-frames. This defines how many duplicate frames can be dropped. Numbers 2 to 5 are recommended. This greatly improves the use of bitrate and quality.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 3 0 15 1 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 3
+ 3
+ 0
+ 0
+
+
+
+ True
+ 2
+ 2
+ False
+ 3
+ 10
+
+
+
+ True
+ Optimise both motion vectors in B-frames. This will improve quality but take more time for encoding.
+ True
+ Bidirectional ME
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Enables weighting of B-frames to help fades
+ True
+ Weighted Biprediction
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Use fewer B-frames if needed. This is always recommended. If not enabled, the codec will always use the maximum number of consecutive B-frames.
+ True
+ Adaptative DCT
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Allow B-frames to make references non-linearly to another B-frame (instead of creating a duplicate copy)
+ True
+ Use as Reference
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ False
+ 10
+
+
+
+ True
+ B-Frame Direct Mode
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ False
+ True
+
+
+
+
+
+ True
+ True
+ None
+Spatial
+Temporal
+Auto
+ False
+ True
+
+
+ 0
+ False
+ True
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+
+
+
+
+ True
+ <b>B-Frames</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+
+ False
+ True
+
+
+
+
+
+ True
+ Partitions & Frames
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ tab
+
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ 3
+ 2
+ False
+ 3
+ 10
+
+
+
+ 115
+ True
+ Set how much "bitrate bonus" a keyframe can get
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 40 0 100 1 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Set how much bitrate is deducted from a B-frame as compared to the previous P-frame
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 30 0 100 1 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Define how much the bitrate can fluctuate over the entire video. 0% results in a constant bitrate stream, while 100% results in a pure quality based bitrate stream.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 60 0 100 1 10 10
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ Keyframe Boost (%)
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ B-frame Reduction (%)
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Bitrate Variability (%)
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>Bitrate</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 1
+ False
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ 3
+ 2
+ False
+ 3
+ 20
+
+
+
+ True
+ Min QP
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Max QP
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Max QP Step
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ 54
+ True
+ Enforce a minimum quantizer level
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 10 10 51 1 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Enforce a maximum quantizer level
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 51 10 51 1 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Define how much the quantizer rate can change between two consecutive frames
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 4 0 10 1 10 10
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>Quantization Limits</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 1
+ False
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ 3
+ 2
+ False
+ 3
+ 10
+
+
+
+ 115
+ True
+ Increase / decrease sensitivity for detecting scene changes. Improves I-frame usage and quality.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 40 0 100 1 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Scene Cut Threshold
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Min IDR Frame Interval
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Set minimum frame interval between IDR frames. Defines the minimum amount a frame can be reused and referenced by other frames before a new IDR frame is established.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 25 0 100 1 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Set maximum frame interval between IDR frames. Defines the maximum amount a frame can be reused and referenced by other frames before a new IDR frame is established.
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 250 1 1000 1 10 10
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ Max IDR Frame Interval
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>More Rate Settings</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 1
+ False
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ 3
+ 2
+ False
+ 3
+ 10
+
+
+
+ True
+ VBV Buffer Size
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Initial VBV Buffer (%)
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ Maximum Local Bitrate
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0 0 99999 1 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0 0 99999 1 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 90 0 100 1 10 10
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>Video Buffer Verifier</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+
+ False
+ True
+
+
+
+
+
+
+ tab
+
+
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ 4
+ 2
+ False
+ 3
+ 10
+
+
+
+ True
+ Bitrate Variance
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Allowed variance of average bitrate. Lower values mean less variance. Higher values mean more variance.
+ True
+ 0.10000000149
+ 1
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 1 0 1 0.10000000149 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Allowed variance of average quantizer or quality. Lower values mean less variance. Higher values mean more variance. Note that 0 means constant quality while 1 means constant fluctuation. Recommended 0.6.
+ True
+ 0.10000000149
+ 1
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0.600000023842 0 1 0.10000000149 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Reduced fluctuations in Quantizer (before curve compression)
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 20 0 999 1 10 10
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ True
+ 0.5
+ 1
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0.5 0 1 0.5 10 10
+
+
+ 1
+ 2
+ 3
+ 4
+ fill
+
+
+
+
+
+
+ True
+ Quantizer Compression
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Temp. Blur of Est. Frame Complexity
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ Temp. Blur of Quant. after CC
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 3
+ 4
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>Misc</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ 3
+ 2
+ False
+ 3
+ 10
+
+
+
+ True
+ Quantization factors used between I and P-frames
+ True
+ 0.10000000149
+ 1
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 1.39999997616 1 10 0.10000000149 10 10
+
+
+ 1
+ 2
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Quantization used between P and B-frames
+ True
+ 0.10000000149
+ 1
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 1.29999995232 1 10 0.10000000149 10 10
+
+
+ 1
+ 2
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Quantization difference between chroma (color) and luma (brightness)
+ True
+ 1
+ 0
+ True
+ GTK_UPDATE_ALWAYS
+ False
+ False
+ 0 -12 12 1 10 10
+
+
+ 1
+ 2
+ 2
+ 3
+ fill
+
+
+
+
+
+
+ True
+ Factor between I and P-frame Quants
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 0
+ 1
+ fill
+
+
+
+
+
+
+ True
+ Factor between P and B-frame Quants
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 1
+ 2
+ fill
+
+
+
+
+
+
+ True
+ Chroma QP Offset
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ 0
+ 1
+ 2
+ 3
+ fill
+
+
+
+
+
+
+
+
+
+
+ True
+ <b>Quantizers</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+ True
+ 0
+ 0.5
+ GTK_SHADOW_ETCHED_IN
+
+
+
+ True
+ 0.5
+ 0.5
+ 1
+ 1
+ 7
+ 7
+ 7
+ 7
+
+
+
+ True
+ False
+ 3
+
+
+
+ True
+ True
+ Flat Matrix
+ True
+ GTK_RELIEF_NORMAL
+ True
+ True
+ False
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ True
+ JVT Matrix
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+ radiobuttonFlatmatrix
+
+
+ 0
+ False
+ False
+
+
+
+
+
+ True
+ False
+ 10
+
+
+
+ True
+ True
+ Custom Matrix
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+ radiobuttonFlatmatrix
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ False
+ 0
+
+
+
+ True
+ Open CQM file
+ GTK_FILE_CHOOSER_ACTION_OPEN
+ True
+ False
+ -1
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+
+
+ 0
+ True
+ True
+
+
+
+
+
+ True
+ Edit loaded custom quantization matrix file
+ True
+ Edit Custom Matrix
+ True
+ GTK_RELIEF_NORMAL
+ True
+
+
+ 0
+ False
+ False
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+ 0
+ False
+ False
+
+
+
+
+
+
+
+
+
+ True
+ <b>Quantization Matrices</b>
+ False
+ True
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ label_item
+
+
+
+
+ 0
+ False
+ True
+
+
+
+
+
+
+ False
+ True
+
+
+
+
+
+ True
+ More
+ False
+ False
+ GTK_JUSTIFY_LEFT
+ False
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+ PANGO_ELLIPSIZE_NONE
+ -1
+ False
+ 0
+
+
+ tab
+
+
+
+
+ 0
+ True
+ True
+
+
+
+
+
+
+
diff --git a/avidemux/gtk/CMakeLists.txt b/avidemux/gtk/CMakeLists.txt
index 6d98d053f0..d27b4225ec 100644
--- a/avidemux/gtk/CMakeLists.txt
+++ b/avidemux/gtk/CMakeLists.txt
@@ -1,147 +1,147 @@
-cmake_minimum_required(VERSION 3.7)
-
-SET(ADM_PROJECT Avidemux_gtk)
-
-MESSAGE("")
-MESSAGE("#########################################")
-MESSAGE("Configure for avidemux Gtk Started")
-MESSAGE("#########################################")
-MESSAGE("")
-
-include(../commonCmakeApplication.cmake)
-include(admCheckGtk)
-
-checkGtk()
-
-# #########################################
-# Config
-# #########################################
-ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_GTK)
-SET(CONFIG_HEADER_TYPE ADM_BUILD_GTK)
-SET(UI_SUFFIX gtk)
-
-CONFIGURE_FILE("${AVIDEMUX_TOP_SOURCE_DIR}/cmake/config.h.cmake" "${CMAKE_BINARY_DIR}/config/gtk/config.h")
-MESSAGE(STATUS "GTK config.h generated")
-
-INCLUDE_DIRECTORIES(BEFORE "${CMAKE_BINARY_DIR}/config/gtk/")
-
-# #######################################
-# Add subdirectories
-# #######################################
-ADD_SUBDIRECTORY(../common ./common)
-ADD_SUBDIRECTORY(ADM_UIs ./ADM_UIsGtk)
-ADD_SUBDIRECTORY(ADM_userInterfaces ./ADM_userInterfacesGtk)
-
-SDLify(../common/main.cpp)
-ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_SUBVERSION='\"${ADM_SUBVERSION}\"'")
-ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_VERSION='\"${AVIDEMUX_VERSION}\"'")
-
-# ##########################################
-# Version Info
-# ##########################################
-if (WIN32)
- # add icon and version info
- SET(FILEVERSION_STRING "${AVIDEMUX_VERSION}")
- SET(PRODUCTVERSION_STRING "${AVIDEMUX_VERSION}")
- STRING(REPLACE "." "," FILEVERSION ${FILEVERSION_STRING})
- STRING(REPLACE "." "," PRODUCTVERSION ${PRODUCTVERSION_STRING})
- SET(PRODUCTVERSION "${PRODUCTVERSION},0")
-
- IF (ADM_CPU_X86_64)
- SET(WIN_RES_TARGET "pe-x86-64")
- ELSE (ADM_CPU_X86_64)
- SET(WIN_RES_TARGET "pe-i386")
- ENDIF (ADM_CPU_X86_64)
-
- SET(AVIDEMUX_ICON "adm.ico")
- SET(ADM_WIN_RES "adm.obj")
- SET(ADM_EXE_SRCS ${ADM_EXE_SRCS} ${ADM_WIN_RES})
- CONFIGURE_FILE("${AVIDEMUX_TOP_SOURCE_DIR}/cmake/admWin32.rc.in" ${CMAKE_CURRENT_BINARY_DIR}/admWin.rc IMMEDIATE)
- include(admWindRes)
- ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ADM_WIN_RES} COMMAND ${WINDRES}.exe -F ${WIN_RES_TARGET} -i ${CMAKE_CURRENT_BINARY_DIR}/admWin.rc -o ${CMAKE_CURRENT_BINARY_DIR}/${ADM_WIN_RES} -O coff --define VS_VERSION_INFO=1)
-endif (WIN32)
-
-# ##########################################
-# Executable
-# ##########################################
-ADD_EXECUTABLE(avidemux3_gtk ${ADM_EXE_SRCS})
-
-# ##########################################
-# Construct common libraries
-# ##########################################
-FOREACH (_libName ${commonLibs1})
- TARGET_LINK_LIBRARIES(avidemux3_gtk ${_libName})
-ENDFOREACH (_libName ${commonLibs1})
-
-TARGET_LINK_LIBRARIES(avidemux3_gtk ADM_filtersGtk)
-
-FOREACH (_libName ${commonLibs2})
- TARGET_LINK_LIBRARIES(avidemux3_gtk ${_libName})
-ENDFOREACH (_libName ${commonLibs2})
-
-FOREACH (_libName ${coreLibs})
- TARGET_LINK_LIBRARIES(avidemux3_gtk ${_libName})
-ENDFOREACH (_libName ${coreLibs})
-
-# ############################################
-# Add gtk specific libs
-# ############################################
-TARGET_LINK_LIBRARIES(avidemux3_gtk
- ADM_UI_GTK
- ADM_dialogGtk
- #ADM_filtersGtk
- ADM_gui2Gtk
- ADM_toolkit6
- ADM_coreAudio6
- ADM_coreUtils6
- #ADM_ocrGtk
- ADM_toolkitGtk
- ADM_shellGtk
- ADM_UIGtk6
- ADM_coreAudioDevice6
- ADM_osSupport6
-)
-
-# ##########################################
-# External libs
-# ##########################################
-# gettext
-IF (GETTEXT_FOUND)
- TARGET_LINK_LIBRARIES(avidemux3_gtk ${GETTEXT_LIBRARY_DIR})
-ENDIF (GETTEXT_FOUND)
-
-
-# SDL
-IF (USE_SDL)
- TARGET_LINK_LIBRARIES(avidemux3_gtk ${SDL2_LIBRARY})
-ENDIF (USE_SDL)
-
-
-# ##########################################
-# UI Specific
-# ##########################################
-TARGET_LINK_LIBRARIES(avidemux3_gtk ${GTK_LDFLAGS} ${GTHREAD_LDFLAGS})
-
-# ##########################################
-# OS Specific
-# ##########################################
-if (WIN32 OR APPLE)
- set_property(TARGET avidemux3_gtk PROPERTY OUTPUT_NAME avidemux_gtk)
-endif (WIN32 OR APPLE)
-
-IF (WIN32)
- target_link_libraries(avidemux3_gtk winmm -mwindows -Wl,--export-all-symbols)
-ENDIF (WIN32)
-
-# ##########################################
-# Install
-# ##########################################
-ADM_LINK_THREAD(avidemux3_gtk)
-ADM_INSTALL_BIN(avidemux3_gtk)
-
-DISPLAY_SUMMARY_LIST()
-
-include(admPackager)
-admPackager(gtkPackage)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/config/gtk/config.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/gtk" COMPONENT dev)
-MESSAGE("")
+cmake_minimum_required(VERSION 3.7)
+
+SET(ADM_PROJECT Avidemux_gtk)
+
+MESSAGE("")
+MESSAGE("#########################################")
+MESSAGE("Configure for avidemux Gtk Started")
+MESSAGE("#########################################")
+MESSAGE("")
+
+include(../commonCmakeApplication.cmake)
+include(admCheckGtk)
+
+checkGtk()
+
+# #########################################
+# Config
+# #########################################
+ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_GTK)
+SET(CONFIG_HEADER_TYPE ADM_BUILD_GTK)
+SET(UI_SUFFIX gtk)
+
+CONFIGURE_FILE("${AVIDEMUX_TOP_SOURCE_DIR}/cmake/config.h.cmake" "${CMAKE_BINARY_DIR}/config/gtk/config.h")
+MESSAGE(STATUS "GTK config.h generated")
+
+INCLUDE_DIRECTORIES(BEFORE "${CMAKE_BINARY_DIR}/config/gtk/")
+
+# #######################################
+# Add subdirectories
+# #######################################
+ADD_SUBDIRECTORY(../common ./common)
+ADD_SUBDIRECTORY(ADM_UIs ./ADM_UIsGtk)
+ADD_SUBDIRECTORY(ADM_userInterfaces ./ADM_userInterfacesGtk)
+
+SDLify(../common/main.cpp)
+ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_SUBVERSION='\"${ADM_SUBVERSION}\"'")
+ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_VERSION='\"${AVIDEMUX_VERSION}\"'")
+
+# ##########################################
+# Version Info
+# ##########################################
+if (WIN32)
+ # add icon and version info
+ SET(FILEVERSION_STRING "${AVIDEMUX_VERSION}")
+ SET(PRODUCTVERSION_STRING "${AVIDEMUX_VERSION}")
+ STRING(REPLACE "." "," FILEVERSION ${FILEVERSION_STRING})
+ STRING(REPLACE "." "," PRODUCTVERSION ${PRODUCTVERSION_STRING})
+ SET(PRODUCTVERSION "${PRODUCTVERSION},0")
+
+ IF (ADM_CPU_X86_64)
+ SET(WIN_RES_TARGET "pe-x86-64")
+ ELSE (ADM_CPU_X86_64)
+ SET(WIN_RES_TARGET "pe-i386")
+ ENDIF (ADM_CPU_X86_64)
+
+ SET(AVIDEMUX_ICON "adm.ico")
+ SET(ADM_WIN_RES "adm.obj")
+ SET(ADM_EXE_SRCS ${ADM_EXE_SRCS} ${ADM_WIN_RES})
+ CONFIGURE_FILE("${AVIDEMUX_TOP_SOURCE_DIR}/cmake/admWin32.rc.in" ${CMAKE_CURRENT_BINARY_DIR}/admWin.rc IMMEDIATE)
+ include(admWindRes)
+ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ADM_WIN_RES} COMMAND ${WINDRES}.exe -F ${WIN_RES_TARGET} -i ${CMAKE_CURRENT_BINARY_DIR}/admWin.rc -o ${CMAKE_CURRENT_BINARY_DIR}/${ADM_WIN_RES} -O coff --define VS_VERSION_INFO=1)
+endif (WIN32)
+
+# ##########################################
+# Executable
+# ##########################################
+ADD_EXECUTABLE(avidemux3_gtk ${ADM_EXE_SRCS})
+
+# ##########################################
+# Construct common libraries
+# ##########################################
+FOREACH (_libName ${commonLibs1})
+ TARGET_LINK_LIBRARIES(avidemux3_gtk ${_libName})
+ENDFOREACH (_libName ${commonLibs1})
+
+TARGET_LINK_LIBRARIES(avidemux3_gtk ADM_filtersGtk)
+
+FOREACH (_libName ${commonLibs2})
+ TARGET_LINK_LIBRARIES(avidemux3_gtk ${_libName})
+ENDFOREACH (_libName ${commonLibs2})
+
+FOREACH (_libName ${coreLibs})
+ TARGET_LINK_LIBRARIES(avidemux3_gtk ${_libName})
+ENDFOREACH (_libName ${coreLibs})
+
+# ############################################
+# Add gtk specific libs
+# ############################################
+TARGET_LINK_LIBRARIES(avidemux3_gtk
+ ADM_UI_GTK
+ ADM_dialogGtk
+ #ADM_filtersGtk
+ ADM_gui2Gtk
+ ADM_toolkit6
+ ADM_coreAudio6
+ ADM_coreUtils6
+ #ADM_ocrGtk
+ ADM_toolkitGtk
+ ADM_shellGtk
+ ADM_UIGtk6
+ ADM_coreAudioDevice6
+ ADM_osSupport6
+)
+
+# ##########################################
+# External libs
+# ##########################################
+# gettext
+IF (GETTEXT_FOUND)
+ TARGET_LINK_LIBRARIES(avidemux3_gtk ${GETTEXT_LIBRARY_DIR})
+ENDIF (GETTEXT_FOUND)
+
+
+# SDL
+IF (USE_SDL)
+ TARGET_LINK_LIBRARIES(avidemux3_gtk ${SDL2_LIBRARY})
+ENDIF (USE_SDL)
+
+
+# ##########################################
+# UI Specific
+# ##########################################
+TARGET_LINK_LIBRARIES(avidemux3_gtk ${GTK_LDFLAGS} ${GTHREAD_LDFLAGS})
+
+# ##########################################
+# OS Specific
+# ##########################################
+if (WIN32 OR APPLE)
+ set_property(TARGET avidemux3_gtk PROPERTY OUTPUT_NAME avidemux_gtk)
+endif (WIN32 OR APPLE)
+
+IF (WIN32)
+ target_link_libraries(avidemux3_gtk winmm -mwindows -Wl,--export-all-symbols)
+ENDIF (WIN32)
+
+# ##########################################
+# Install
+# ##########################################
+ADM_LINK_THREAD(avidemux3_gtk)
+ADM_INSTALL_BIN(avidemux3_gtk)
+
+DISPLAY_SUMMARY_LIST()
+
+include(admPackager)
+admPackager(gtkPackage)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/config/gtk/config.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/gtk" COMPONENT dev)
+MESSAGE("")
diff --git a/avidemux/qt4/ADM_UIs/CMakeLists.txt b/avidemux/qt4/ADM_UIs/CMakeLists.txt
index 596a5be901..4681770f61 100644
--- a/avidemux/qt4/ADM_UIs/CMakeLists.txt
+++ b/avidemux/qt4/ADM_UIs/CMakeLists.txt
@@ -1,2 +1,2 @@
-ADD_SUBDIRECTORY(src)
-
+ADD_SUBDIRECTORY(src)
+
diff --git a/avidemux/qt4/ADM_jobs/CMakeLists.txt b/avidemux/qt4/ADM_jobs/CMakeLists.txt
index f6fc76ea88..4b7537b554 100644
--- a/avidemux/qt4/ADM_jobs/CMakeLists.txt
+++ b/avidemux/qt4/ADM_jobs/CMakeLists.txt
@@ -1 +1 @@
-ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(src)
diff --git a/avidemux/qt4/ADM_jobs/src/CMakeLists.txt b/avidemux/qt4/ADM_jobs/src/CMakeLists.txt
index c79c1537c3..21b8ada1a8 100644
--- a/avidemux/qt4/ADM_jobs/src/CMakeLists.txt
+++ b/avidemux/qt4/ADM_jobs/src/CMakeLists.txt
@@ -1,108 +1,108 @@
-##########################################
-# Config
-##########################################
-ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_QT4)
-
-IF(MSVC)
-ADD_DEFINITIONS(-D_WINSOCKAPI_)
-ENDIF(MSVC)
-
-SET(CONFIG_HEADER_TYPE ADM_BUILD_QT4)
-SET(UI_SUFFIX qt4)
-include_directories(../include ${QT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE(admWindRes)
-###########################################
-# Executable
-###########################################
-#
-SET(UI uiJobs.ui uiProgress.ui)
-SET(headers ../include/T_jobs.h ../include/T_progress.h)
-IF(APPLE OR WIN32)
- ADM_QT_ADD_RESOURCES(resource jobs.qrc)
-ELSE(APPLE OR WIN32)
- ADM_QT_ADD_RESOURCES(resource jobs_linux.qrc)
-ENDIF(APPLE OR WIN32)
-ADM_QT_WRAP_UI(ADM_JOBS_headers ${UI})
-ADM_QT_WRAP_CPP(ADM_JOBS_source ${headers})
-SET(ADM_JOB_SRCS
- ADM_jobs.cpp
- ADM_jobControl.cpp
- ADM_runOneJob.cpp
- ADM_jobProgress.cpp
- ../../ADM_userInterfaces/translator.cpp
- ${ADM_JOBS_headers}
- ${ADM_JOBS_source}
- ${resource}
- )
-
-###########################################
-# Version Info
-###########################################
-if (WIN32)
- WINDRESIFY(mainJobs "${CMAKE_CURRENT_SOURCE_DIR}/../../../common/xpm/adm.ico" src "avidemux_jobs" "Avidemux Jobs")
- SET(ADM_JOB_SRCS ${ADM_JOB_SRCS} ${src})
-endif (WIN32)
-
-###########################################
-# Executable
-###########################################
-include(admCoreIncludes)
-include_directories("${PTHREAD_INCLUDE_DIR}")
-
-IF(WIN32)
- ADD_EXECUTABLE(avidemux3_jobs_${QT_EXTENSION} WIN32 ${ADM_JOB_SRCS})
- IF(MSVC)
- set_target_properties(avidemux3_jobs_${QT_EXTENSION} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
- set_target_properties(avidemux3_jobs_${QT_EXTENSION} PROPERTIES WIN32_EXECUTABLE True)
- ELSE(MSVC)
- target_link_libraries(avidemux3_jobs_${QT_EXTENSION} winmm -mwindows)
- ENDIF(MSVC)
-ELSE(WIN32)
- ADD_EXECUTABLE(avidemux3_jobs_${QT_EXTENSION} ${ADM_JOB_SRCS})
-ENDIF(WIN32)
-
-
-ADD_SOURCE_CFLAGS(ADM_jobs.cpp "-DADM_VERSION=\"${AVIDEMUX_VERSION}\"")
-if (ADM_SUBVERSION)
- ADD_SOURCE_CFLAGS(ADM_jobs.cpp "-DADM_SUBVERSION=\"${ADM_SUBVERSION}\"")
-endif (ADM_SUBVERSION)
-
-###########################################
-TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ADM_coreSocket6)
-TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ${PTHREAD_LIBRARIES})
-###########################################
-# OS Specific
-###########################################
-if (WIN32 OR APPLE)
- set_property(TARGET avidemux3_jobs_${QT_EXTENSION} PROPERTY OUTPUT_NAME avidemux_jobs)
-endif (WIN32 OR APPLE)
-
-
-IF (APPLE)
- add_source_cflags(ADM_runOneJob.cpp "-DAVIDEMUX_MAJOR_MINOR=\"${AVIDEMUX_MAJOR_MINOR}\"")
- target_link_libraries(avidemux3_jobs_${QT_EXTENSION} "-framework CoreServices -framework CoreAudio -framework AudioUnit -framework Carbon")
-
- # for Leopard but it doesn't hurt Tiger
- target_link_libraries(avidemux3_jobs_${QT_EXTENSION} "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
-ENDIF (APPLE)
-
-TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ADM_coreJobs)
-TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ADM_coreUtils6)
-TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ADM_core6)
-#
-target_link_libraries(avidemux3_jobs_${QT_EXTENSION} "-lm -lstdc++")
-#
-#
-
-
-###########################################
-# Install
-###########################################
-ADM_LINK_THREAD(avidemux3_jobs_${QT_EXTENSION})
-ADM_INSTALL_BIN(avidemux3_jobs_${QT_EXTENSION})
-#
-# Packaging
-#
-#include(admPackager)
-#admPackager(qt4Package)
+##########################################
+# Config
+##########################################
+ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_QT4)
+
+IF(MSVC)
+ADD_DEFINITIONS(-D_WINSOCKAPI_)
+ENDIF(MSVC)
+
+SET(CONFIG_HEADER_TYPE ADM_BUILD_QT4)
+SET(UI_SUFFIX qt4)
+include_directories(../include ${QT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+INCLUDE(admWindRes)
+###########################################
+# Executable
+###########################################
+#
+SET(UI uiJobs.ui uiProgress.ui)
+SET(headers ../include/T_jobs.h ../include/T_progress.h)
+IF(APPLE OR WIN32)
+ ADM_QT_ADD_RESOURCES(resource jobs.qrc)
+ELSE(APPLE OR WIN32)
+ ADM_QT_ADD_RESOURCES(resource jobs_linux.qrc)
+ENDIF(APPLE OR WIN32)
+ADM_QT_WRAP_UI(ADM_JOBS_headers ${UI})
+ADM_QT_WRAP_CPP(ADM_JOBS_source ${headers})
+SET(ADM_JOB_SRCS
+ ADM_jobs.cpp
+ ADM_jobControl.cpp
+ ADM_runOneJob.cpp
+ ADM_jobProgress.cpp
+ ../../ADM_userInterfaces/translator.cpp
+ ${ADM_JOBS_headers}
+ ${ADM_JOBS_source}
+ ${resource}
+ )
+
+###########################################
+# Version Info
+###########################################
+if (WIN32)
+ WINDRESIFY(mainJobs "${CMAKE_CURRENT_SOURCE_DIR}/../../../common/xpm/adm.ico" src "avidemux_jobs" "Avidemux Jobs")
+ SET(ADM_JOB_SRCS ${ADM_JOB_SRCS} ${src})
+endif (WIN32)
+
+###########################################
+# Executable
+###########################################
+include(admCoreIncludes)
+include_directories("${PTHREAD_INCLUDE_DIR}")
+
+IF(WIN32)
+ ADD_EXECUTABLE(avidemux3_jobs_${QT_EXTENSION} WIN32 ${ADM_JOB_SRCS})
+ IF(MSVC)
+ set_target_properties(avidemux3_jobs_${QT_EXTENSION} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
+ set_target_properties(avidemux3_jobs_${QT_EXTENSION} PROPERTIES WIN32_EXECUTABLE True)
+ ELSE(MSVC)
+ target_link_libraries(avidemux3_jobs_${QT_EXTENSION} winmm -mwindows)
+ ENDIF(MSVC)
+ELSE(WIN32)
+ ADD_EXECUTABLE(avidemux3_jobs_${QT_EXTENSION} ${ADM_JOB_SRCS})
+ENDIF(WIN32)
+
+
+ADD_SOURCE_CFLAGS(ADM_jobs.cpp "-DADM_VERSION=\"${AVIDEMUX_VERSION}\"")
+if (ADM_SUBVERSION)
+ ADD_SOURCE_CFLAGS(ADM_jobs.cpp "-DADM_SUBVERSION=\"${ADM_SUBVERSION}\"")
+endif (ADM_SUBVERSION)
+
+###########################################
+TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ADM_coreSocket6)
+TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
+TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ${PTHREAD_LIBRARIES})
+###########################################
+# OS Specific
+###########################################
+if (WIN32 OR APPLE)
+ set_property(TARGET avidemux3_jobs_${QT_EXTENSION} PROPERTY OUTPUT_NAME avidemux_jobs)
+endif (WIN32 OR APPLE)
+
+
+IF (APPLE)
+ add_source_cflags(ADM_runOneJob.cpp "-DAVIDEMUX_MAJOR_MINOR=\"${AVIDEMUX_MAJOR_MINOR}\"")
+ target_link_libraries(avidemux3_jobs_${QT_EXTENSION} "-framework CoreServices -framework CoreAudio -framework AudioUnit -framework Carbon")
+
+ # for Leopard but it doesn't hurt Tiger
+ target_link_libraries(avidemux3_jobs_${QT_EXTENSION} "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
+ENDIF (APPLE)
+
+TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ADM_coreJobs)
+TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ADM_coreUtils6)
+TARGET_LINK_LIBRARIES(avidemux3_jobs_${QT_EXTENSION} ADM_core6)
+#
+target_link_libraries(avidemux3_jobs_${QT_EXTENSION} "-lm -lstdc++")
+#
+#
+
+
+###########################################
+# Install
+###########################################
+ADM_LINK_THREAD(avidemux3_jobs_${QT_EXTENSION})
+ADM_INSTALL_BIN(avidemux3_jobs_${QT_EXTENSION})
+#
+# Packaging
+#
+#include(admPackager)
+#admPackager(qt4Package)
diff --git a/avidemux/qt4/ADM_openGL/CMakeLists.txt b/avidemux/qt4/ADM_openGL/CMakeLists.txt
index f6fc76ea88..4b7537b554 100644
--- a/avidemux/qt4/ADM_openGL/CMakeLists.txt
+++ b/avidemux/qt4/ADM_openGL/CMakeLists.txt
@@ -1 +1 @@
-ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(src)
diff --git a/avidemux/qt4/ADM_openGL/src/CMakeLists.txt b/avidemux/qt4/ADM_openGL/src/CMakeLists.txt
index fa37774154..12fefda315 100644
--- a/avidemux/qt4/ADM_openGL/src/CMakeLists.txt
+++ b/avidemux/qt4/ADM_openGL/src/CMakeLists.txt
@@ -1,12 +1,12 @@
-IF(USE_OPENGL)
- INCLUDE_DIRECTORIES(../include)
- SET(ADM_OPENGL ADM_openGL${QT_LIBRARY_EXTENSION}6)
- INCLUDE_DIRECTORIES(${QT_HEADERS_DIR})
- INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
- INCLUDE_DIRECTORIES(${QT_QTOPENGL_INCLUDE_DIR})
- YASMIFY(azm ADM_openGlDownload_asm)
- ADD_LIBRARY( ${ADM_OPENGL} SHARED ADM_openGl.cpp ADM_openGlDownloadTexture.cpp ${azm})
- TARGET_LINK_LIBRARIES(${ADM_OPENGL} ${OPENGL_LIBRARIES} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ADM_coreUI6 ADM_core6 ADM_coreUtils6 ADM_coreImage6)
- ADM_INSTALL_LIB(${ADM_OPENGL})
-ENDIF(USE_OPENGL)
-
+IF(USE_OPENGL)
+ INCLUDE_DIRECTORIES(../include)
+ SET(ADM_OPENGL ADM_openGL${QT_LIBRARY_EXTENSION}6)
+ INCLUDE_DIRECTORIES(${QT_HEADERS_DIR})
+ INCLUDE_DIRECTORIES(${OPENGL_INCLUDE_DIR})
+ INCLUDE_DIRECTORIES(${QT_QTOPENGL_INCLUDE_DIR})
+ YASMIFY(azm ADM_openGlDownload_asm)
+ ADD_LIBRARY( ${ADM_OPENGL} SHARED ADM_openGl.cpp ADM_openGlDownloadTexture.cpp ${azm})
+ TARGET_LINK_LIBRARIES(${ADM_OPENGL} ${OPENGL_LIBRARIES} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ADM_coreUI6 ADM_core6 ADM_coreUtils6 ADM_coreImage6)
+ ADM_INSTALL_LIB(${ADM_OPENGL})
+ENDIF(USE_OPENGL)
+
diff --git a/avidemux/qt4/ADM_update/CMakeLists.txt b/avidemux/qt4/ADM_update/CMakeLists.txt
index f6fc76ea88..4b7537b554 100644
--- a/avidemux/qt4/ADM_update/CMakeLists.txt
+++ b/avidemux/qt4/ADM_update/CMakeLists.txt
@@ -1 +1 @@
-ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(src)
diff --git a/avidemux/qt4/ADM_update/src/CMakeLists.txt b/avidemux/qt4/ADM_update/src/CMakeLists.txt
index 863e1aa47a..0ef8539cdc 100644
--- a/avidemux/qt4/ADM_update/src/CMakeLists.txt
+++ b/avidemux/qt4/ADM_update/src/CMakeLists.txt
@@ -1,14 +1,14 @@
-SET(ADM_update "ADM_update${QT_LIBRARY_EXTENSION}6")
-#ADD_DEFINITIONS( ${QT_DEFINITIONS})
-INCLUDE_DIRECTORIES(../include)
-INCLUDE_DIRECTORIES(../private_inc)
-INCLUDE_DIRECTORIES(${QT_HEADERS_DIR})
-
-math(EXPR currentVersion "${CPACK_PACKAGE_VERSION_MAJOR}*10000+${CPACK_PACKAGE_VERSION_MINOR}*100+${CPACK_PACKAGE_VERSION_P}")
-
-ADM_QT_WRAP_CPP(${ADM_update}_source ../private_inc/ADM_updateImpl.h)
-ADD_DEFINITIONS("-DADM_CURRENT_VERSION=${currentVersion}")
-
-
-ADD_LIBRARY( ${ADM_update} STATIC ADM_update.cpp ${${ADM_update}_source})
-
+SET(ADM_update "ADM_update${QT_LIBRARY_EXTENSION}6")
+#ADD_DEFINITIONS( ${QT_DEFINITIONS})
+INCLUDE_DIRECTORIES(../include)
+INCLUDE_DIRECTORIES(../private_inc)
+INCLUDE_DIRECTORIES(${QT_HEADERS_DIR})
+
+math(EXPR currentVersion "${CPACK_PACKAGE_VERSION_MAJOR}*10000+${CPACK_PACKAGE_VERSION_MINOR}*100+${CPACK_PACKAGE_VERSION_P}")
+
+ADM_QT_WRAP_CPP(${ADM_update}_source ../private_inc/ADM_updateImpl.h)
+ADD_DEFINITIONS("-DADM_CURRENT_VERSION=${currentVersion}")
+
+
+ADD_LIBRARY( ${ADM_update} STATIC ADM_update.cpp ${${ADM_update}_source})
+
diff --git a/avidemux/qt4/ADM_userInterfaces/ADM_filters/CMakeLists.txt b/avidemux/qt4/ADM_userInterfaces/ADM_filters/CMakeLists.txt
index c9c7f37853..5d035f82e7 100644
--- a/avidemux/qt4/ADM_userInterfaces/ADM_filters/CMakeLists.txt
+++ b/avidemux/qt4/ADM_userInterfaces/ADM_filters/CMakeLists.txt
@@ -1,15 +1,15 @@
-SET(ADM_LIB ADM_filters${QT_LIBRARY_EXTENSION})
-
-ADM_QT_WRAP_UI(${ADM_LIB}_header mainfilter.ui seekablePreview.ui quickfilter.ui)
-ADM_QT_WRAP_CPP(${ADM_LIB}_source Q_mainfilter.h Q_seekablePreview.h)
-ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource filter.qrc)
-
-SET(${ADM_LIB}_SRCS
- filter_none.cpp
- Q_mainfilter.cpp
-# Q_partialize.cpp
- Q_seekablePreview.cpp
- ${${ADM_LIB}_header} ${${ADM_LIB}_source} ${${ADM_LIB}_resource})
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+SET(ADM_LIB ADM_filters${QT_LIBRARY_EXTENSION})
+
+ADM_QT_WRAP_UI(${ADM_LIB}_header mainfilter.ui seekablePreview.ui quickfilter.ui)
+ADM_QT_WRAP_CPP(${ADM_LIB}_source Q_mainfilter.h Q_seekablePreview.h)
+ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource filter.qrc)
+
+SET(${ADM_LIB}_SRCS
+ filter_none.cpp
+ Q_mainfilter.cpp
+# Q_partialize.cpp
+ Q_seekablePreview.cpp
+ ${${ADM_LIB}_header} ${${ADM_LIB}_source} ${${ADM_LIB}_resource})
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
diff --git a/avidemux/qt4/ADM_userInterfaces/ADM_gui/CMakeLists.txt b/avidemux/qt4/ADM_userInterfaces/ADM_gui/CMakeLists.txt
index 838e31edbc..d4fd98e428 100644
--- a/avidemux/qt4/ADM_userInterfaces/ADM_gui/CMakeLists.txt
+++ b/avidemux/qt4/ADM_userInterfaces/ADM_gui/CMakeLists.txt
@@ -1,48 +1,48 @@
-SET(ADM_LIB ADM_gui${QT_LIBRARY_EXTENSION})
-INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../common/ADM_icons/")
-ADM_QT_WRAP_UI(${ADM_LIB}_header gui2.ui )
-ADM_QT_WRAP_CPP(${ADM_LIB}_source Q_gui2.h ADM_mwNavSlider.h T_preview.h T_vumeter.h T_thumbSlider.h ADM_qtray.h FileAction.h)
-IF(APPLE)
- ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource avidemux_osx.qrc)
-ELSEIF(WIN32)
- IF(USE_CUSTOM_TIME_DISPLAY_FONT)
- ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource avidemux_win32_custom_font.qrc)
- ELSE(USE_CUSTOM_TIME_DISPLAY_FONT)
- ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource avidemux_win32.qrc)
- ENDIF(USE_CUSTOM_TIME_DISPLAY_FONT)
-ELSE(APPLE)
- ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource avidemux.qrc)
-ENDIF(APPLE)
-
-IF(USE_CUSTOM_TIME_DISPLAY_FONT)
- ADD_DEFINITIONS("-DUSE_CUSTOM_TIME_DISPLAY_FONT")
-ENDIF(USE_CUSTOM_TIME_DISPLAY_FONT)
-
-IF(USE_OPENGL)
- INCLUDE_DIRECTORIES(../../ADM_openGL/include/)
-ENDIF(USE_OPENGL)
-
-IF(WIN32)
- SET(TRAYPROGRESS ADM_systemTrayProgress_win32.cpp)
-ELSE(WIN32)
- SET(TRAYPROGRESS ADM_systemTrayProgress_default.cpp)
-ENDIF(WIN32)
-
-SET(${ADM_LIB}_SRCS
- Q_gui2.cpp Q_gui2GL.cpp
- Q_gui2_menu.cpp
- T_preview.cpp
- T_vumeter.cpp
- #stubs.cpp
- T_thumbSlider.cpp
- file_qt4.cpp gui_none.cpp ADM_mwNavSlider.cpp
- ADM_qtray.cpp
- Q_dummyWidget.cpp
- FileAction.cpp
- ${TRAYPROGRESS}
- ${${ADM_LIB}_header} ${${ADM_LIB}_source} ${${ADM_LIB}_resource})
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../ADM_filters )
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../ADM_filters )
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+SET(ADM_LIB ADM_gui${QT_LIBRARY_EXTENSION})
+INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/../common/ADM_icons/")
+ADM_QT_WRAP_UI(${ADM_LIB}_header gui2.ui )
+ADM_QT_WRAP_CPP(${ADM_LIB}_source Q_gui2.h ADM_mwNavSlider.h T_preview.h T_vumeter.h T_thumbSlider.h ADM_qtray.h FileAction.h)
+IF(APPLE)
+ ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource avidemux_osx.qrc)
+ELSEIF(WIN32)
+ IF(USE_CUSTOM_TIME_DISPLAY_FONT)
+ ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource avidemux_win32_custom_font.qrc)
+ ELSE(USE_CUSTOM_TIME_DISPLAY_FONT)
+ ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource avidemux_win32.qrc)
+ ENDIF(USE_CUSTOM_TIME_DISPLAY_FONT)
+ELSE(APPLE)
+ ADM_QT_ADD_RESOURCES(${ADM_LIB}_resource avidemux.qrc)
+ENDIF(APPLE)
+
+IF(USE_CUSTOM_TIME_DISPLAY_FONT)
+ ADD_DEFINITIONS("-DUSE_CUSTOM_TIME_DISPLAY_FONT")
+ENDIF(USE_CUSTOM_TIME_DISPLAY_FONT)
+
+IF(USE_OPENGL)
+ INCLUDE_DIRECTORIES(../../ADM_openGL/include/)
+ENDIF(USE_OPENGL)
+
+IF(WIN32)
+ SET(TRAYPROGRESS ADM_systemTrayProgress_win32.cpp)
+ELSE(WIN32)
+ SET(TRAYPROGRESS ADM_systemTrayProgress_default.cpp)
+ENDIF(WIN32)
+
+SET(${ADM_LIB}_SRCS
+ Q_gui2.cpp Q_gui2GL.cpp
+ Q_gui2_menu.cpp
+ T_preview.cpp
+ T_vumeter.cpp
+ #stubs.cpp
+ T_thumbSlider.cpp
+ file_qt4.cpp gui_none.cpp ADM_mwNavSlider.cpp
+ ADM_qtray.cpp
+ Q_dummyWidget.cpp
+ FileAction.cpp
+ ${TRAYPROGRESS}
+ ${${ADM_LIB}_header} ${${ADM_LIB}_source} ${${ADM_LIB}_resource})
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../ADM_filters )
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/../ADM_filters )
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
diff --git a/avidemux/qt4/ADM_userInterfaces/ADM_gui/fonts/DSEG-LICENSE.txt b/avidemux/qt4/ADM_userInterfaces/ADM_gui/fonts/DSEG-LICENSE.txt
index ad4c0bf52a..a6c8ffd307 100755
--- a/avidemux/qt4/ADM_userInterfaces/ADM_gui/fonts/DSEG-LICENSE.txt
+++ b/avidemux/qt4/ADM_userInterfaces/ADM_gui/fonts/DSEG-LICENSE.txt
@@ -1,95 +1,95 @@
-Copyright (c) 2017, keshikan (http://www.keshikan.net),
-with Reserved Font Name "DSEG".
-
-
-This Font Software is licensed under the SIL Open Font License, Version 1.1.
-This license is copied below, and is also available with a FAQ at:
-http://scripts.sil.org/OFL
-
-
------------------------------------------------------------
-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
------------------------------------------------------------
-
-PREAMBLE
-The goals of the Open Font License (OFL) are to stimulate worldwide
-development of collaborative font projects, to support the font creation
-efforts of academic and linguistic communities, and to provide a free and
-open framework in which fonts may be shared and improved in partnership
-with others.
-
-The OFL allows the licensed fonts to be used, studied, modified and
-redistributed freely as long as they are not sold by themselves. The
-fonts, including any derivative works, can be bundled, embedded,
-redistributed and/or sold with any software provided that any reserved
-names are not used by derivative works. The fonts and derivatives,
-however, cannot be released under any other type of license. The
-requirement for fonts to remain under this license does not apply
-to any document created using the fonts or their derivatives.
-
-DEFINITIONS
-"Font Software" refers to the set of files released by the Copyright
-Holder(s) under this license and clearly marked as such. This may
-include source files, build scripts and documentation.
-
-"Reserved Font Name" refers to any names specified as such after the
-copyright statement(s).
-
-"Original Version" refers to the collection of Font Software components as
-distributed by the Copyright Holder(s).
-
-"Modified Version" refers to any derivative made by adding to, deleting,
-or substituting -- in part or in whole -- any of the components of the
-Original Version, by changing formats or by porting the Font Software to a
-new environment.
-
-"Author" refers to any designer, engineer, programmer, technical
-writer or other person who contributed to the Font Software.
-
-PERMISSION & CONDITIONS
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of the Font Software, to use, study, copy, merge, embed, modify,
-redistribute, and sell modified and unmodified copies of the Font
-Software, subject to the following conditions:
-
-1) Neither the Font Software nor any of its individual components,
-in Original or Modified Versions, may be sold by itself.
-
-2) Original or Modified Versions of the Font Software may be bundled,
-redistributed and/or sold with any software, provided that each copy
-contains the above copyright notice and this license. These can be
-included either as stand-alone text files, human-readable headers or
-in the appropriate machine-readable metadata fields within text or
-binary files as long as those fields can be easily viewed by the user.
-
-3) No Modified Version of the Font Software may use the Reserved Font
-Name(s) unless explicit written permission is granted by the corresponding
-Copyright Holder. This restriction only applies to the primary font name as
-presented to the users.
-
-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
-Software shall not be used to promote, endorse or advertise any
-Modified Version, except to acknowledge the contribution(s) of the
-Copyright Holder(s) and the Author(s) or with their explicit written
-permission.
-
-5) The Font Software, modified or unmodified, in part or in whole,
-must be distributed entirely under this license, and must not be
-distributed under any other license. The requirement for fonts to
-remain under this license does not apply to any document created
-using the Font Software.
-
-TERMINATION
-This license becomes null and void if any of the above conditions are
-not met.
-
-DISCLAIMER
-THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
-OTHER DEALINGS IN THE FONT SOFTWARE.
+Copyright (c) 2017, keshikan (http://www.keshikan.net),
+with Reserved Font Name "DSEG".
+
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/avidemux/qt4/ADM_userInterfaces/ADM_ocr/CMakeLists.txt b/avidemux/qt4/ADM_userInterfaces/ADM_ocr/CMakeLists.txt
index f2493d5730..86a6e31757 100644
--- a/avidemux/qt4/ADM_userInterfaces/ADM_ocr/CMakeLists.txt
+++ b/avidemux/qt4/ADM_userInterfaces/ADM_ocr/CMakeLists.txt
@@ -1,12 +1,12 @@
-SET(ADM_LIB ADM_ocrQt4)
-
-ADM_QT_WRAP_UI(${ADM_LIB}_header ocr.ui)
-ADM_QT_WRAP_CPP(${ADM_LIB}_source Q_ocr.h)
-
-SET(${ADM_LIB}_SRCS
- Q_ocr.cpp ${${ADM_LIB}_header} ${${ADM_LIB}_source})
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/avidemux/ADM_UIs/ADM_QT4/include")
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+SET(ADM_LIB ADM_ocrQt4)
+
+ADM_QT_WRAP_UI(${ADM_LIB}_header ocr.ui)
+ADM_QT_WRAP_CPP(${ADM_LIB}_source Q_ocr.h)
+
+SET(${ADM_LIB}_SRCS
+ Q_ocr.cpp ${${ADM_LIB}_header} ${${ADM_LIB}_source})
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
+INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/avidemux/ADM_UIs/ADM_QT4/include")
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
diff --git a/avidemux/qt4/CMakeLists.txt b/avidemux/qt4/CMakeLists.txt
index 39a8ce25a4..d06aaa7845 100755
--- a/avidemux/qt4/CMakeLists.txt
+++ b/avidemux/qt4/CMakeLists.txt
@@ -1,255 +1,255 @@
-cmake_minimum_required(VERSION 3.7)
-
-PROJECT(Avidemux_Qt)
-
-set(ORIGINAL_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake" "${CMAKE_MODULE_PATH}")
-include(avidemuxVersion)
-
-MESSAGE("")
-MESSAGE("#########################################")
-MESSAGE("Configure for Avidemux Qt Started")
-MESSAGE("#########################################")
-MESSAGE("")
-MESSAGE(STATUS "Checking for avidemux development files ..")
-
-IF(NOT FAKEROOT)
- SET(AVIDEMUX_FAKEROOT "")
-else(NOT FAKEROOT)
- SET(AVIDEMUX_FAKEROOT "${FAKEROOT}")
-endif(NOT FAKEROOT)
-
-
-IF(WIN32)
- IF(MSVC)
- include(adm_win32_vs.cmake)
- ELSE(MSVC)
- include(adm_win32_mingw.cmake)
- ENDIF(MSVC)
-ELSE(WIN32)
- IF(APPLE)
- # Silence missing nullability specifier warnings on macOS
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nullability-completeness")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-completeness")
- include(adm_osx.cmake)
- ELSE(APPLE)
- include(adm_default.cmake)
- ENDIF(APPLE)
-ENDIF(WIN32)
-#-----------------------------------
-# Set extra libs, system dependant
-#-----------------------------------
-ADM_PREBUILD()
-
-# Locate commonCmakeApplication.cmake
-SET(ADM_HEADER_DIR ${AVIDEMUX_FAKEROOT}${CMAKE_INSTALL_PREFIX}/include/avidemux/${AVIDEMUX_API_VERSION})
-SET(ADM_CMAKE_DIR ${ADM_HEADER_DIR}/cmake)
-SET(CMAKE_MODULE_PATH "${ADM_CMAKE_DIR}" "${ORIGINAL_CMAKE_MODULE_PATH}")
-MESSAGE(STATUS "Checking for avidemux include folder (i.e. CMAKE_INSTALL_PREFIX/include/avidemux/${AVIDEMUX_API_VERSION}, looking in ${ADM_HEADER_DIR}")
-if(NOT EXISTS "${ADM_HEADER_DIR}")
- MESSAGE(STATUS "Make sure you installed all the files.\n i cannot find avidemux include folder.cmake .\nSet CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(FATAL_ERROR "Aborting")
-endif(NOT EXISTS "${ADM_HEADER_DIR}")
-
-MESSAGE(STATUS "Found avidemux include folder. good.")
-MESSAGE(STATUS "Checking for cmake subfolder")
-
-if(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
- MESSAGE(STATUS "Make sure you installed all the files.\n I cannot find content of the cmake subfolder .\n")
- MESSAGE(STATUS "Set CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(STATUS "I was looking for commonCmakeApplication.cmake in ${ADM_CMAKE_DIR}")
- MESSAGE(FATAL_ERROR "Aborting")
-endif(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
-MESSAGE(STATUS "Found cmake subfolder.good.")
-
-include(commonCmakeApplication)
-include(../admAppSettings.cmake)
-INCLUDE(admCheckQt)
-INCLUDE(admWindRes)
-
-MESSAGE(STATUS "Checking Qt")
-checkQt()
-
-IF (NOT QT_FOUND)
- MESSAGE(FATAL_ERROR "Qt NOT FOUND")
-ENDIF (NOT QT_FOUND)
-
-# Qt4 openGL
-include(admCheckOpenGl)
-#
-#--
-MESSAGE(STATUS "Adding Qt inc paths : <${QT_INCLUDES}> and definitions <${QT_DEFINITIONS}>")
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-#--
-
-#
-# #########################################
-# Config
-# #########################################
-ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_QT4)
-SET(CONFIG_HEADER_TYPE ADM_BUILD_QT4)
-SET(UI_SUFFIX ${QT_EXTENSION})
-IF (${QT_EXTENSION} STREQUAL "qt6")
- SET(CMAKE_CXX_STANDARD 17)
- SET(CMAKE_CXX_STANDARD_REQUIRED ON)
- SET(CMAKE_CXX_EXTENSIONS OFF)
-ENDIF (${QT_EXTENSION} STREQUAL "qt6")
-
-
-CONFIGURE_FILE("${ADM_CMAKE_DIR}/config.h.cmake" "${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/config.h")
-MESSAGE(STATUS "${QT_EXTENSION} config.h generated")
-
-INCLUDE_DIRECTORIES(BEFORE "${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/")
-
-
-# ##########################################
-# Add job control
-# ##########################################
-ADD_SUBDIRECTORY(ADM_jobs)
-ADD_SUBDIRECTORY(ADM_update)
-IF(USE_OPENGL)
- ADD_SUBDIRECTORY(ADM_openGL)
-ENDIF(USE_OPENGL)
-
-# ##########################################
-# Custom fixed width font for time display
-# ##########################################
-if (NOT WIN32)
- SET(USE_CUSTOM_TIME_DISPLAY_FONT 1)
-endif (NOT WIN32)
-
-# #######################################
-# Add common as a symlink or directly
-# #######################################
-INCLUDE_DIRECTORIES(ADM_UIs/include/)
-
-if (WIN32 AND NOT CROSS)
- ADD_SUBDIRECTORY(../common ./commonQt4)
-else (WIN32 AND NOT CROSS)
- # Make symlink else eclipe and kdev4 are puzzled by the tree structure
- # Not needed for plain build
- MESSAGE(STATUS "Creating common symlink in ${CMAKE_CURRENT_SOURCE_DIR}")
-
- execute_process(COMMAND rm -f common
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- execute_process(COMMAND ln -s ../common .
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
- ADD_SUBDIRECTORY(common ./commonQt4)
-endif (WIN32 AND NOT CROSS)
-
-# Add misc subdirs
-ADD_SUBDIRECTORY(ADM_UIs ./ADM_UIsQt4)
-ADD_SUBDIRECTORY(ADM_userInterfaces ./ADM_userInterfaces${QT_LIBRARY_EXTENSION})
-
-SDLify(../common/main.cpp)
-if (ADM_SUBVERSION)
- ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_SUBVERSION=\"${ADM_SUBVERSION}\"")
-endif (ADM_SUBVERSION)
-ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_VERSION=\"${AVIDEMUX_VERSION}\"")
-ADD_SOURCE_CFLAGS(../common/main.cpp "-DQT_FLAVOR=\"${QT_EXTENSION}\"")
-
-# ##########################################
-# Icon for windows
-# ##########################################
-if (WIN32 )
- WINDRESIFY(mainQt "${CMAKE_CURRENT_SOURCE_DIR}/../common/xpm/adm.ico" src "avidemux" "Avidemux Video Editor")
- SET(ADM_EXE_SRCS ${ADM_EXE_SRCS} ${src})
-endif (WIN32)
-
-# ##########################################
-# Executable
-# ##########################################
-include_directories("${PTHREAD_INCLUDE_DIR}")
-
-ADM_MAIN_APP()
-
-# ##########################################
-# Construct common libraries
-# ##########################################
-FOREACH (_libName ${commonLibs1})
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
-ENDFOREACH (_libName ${commonLibs1})
-
-FOREACH (_libName ${commonLibs2})
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
-ENDFOREACH (_libName ${commonLibs2})
-
-FOREACH (_libName ${coreLibs})
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
-ENDFOREACH (_libName ${coreLibs})
-
-
-
-# ############################################
-# Add qt specific libs
-# ############################################
-TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION}
- ADM_gui${QT_LIBRARY_EXTENSION}
- ADM_filters${QT_LIBRARY_EXTENSION}
- ADM_UI${QT_LIBRARY_EXTENSION}6
- ADM_dialogQt4
- ADM_update${QT_LIBRARY_EXTENSION}6
- ADM_internalVideoFilter6
- ADM_UI${QT_LIBRARY_EXTENSION}6
- ADM_gui${QT_LIBRARY_EXTENSION}
- ADM_UI_${QT_LIBRARY_EXTENSION}6
- ADM_shell${QT_LIBRARY_EXTENSION}
- ADM_toolkit6
- ADM_coreAudio6
- ADM_coreAudioDevice6
- ADM_coreVideoEncoder6
- ADM_osSupport6
-)
-
-# ##########################################
-# External libs
-# ##########################################
-# gettext
-IF (GETTEXT_FOUND)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${GETTEXT_LIBRARY_DIR})
-ENDIF (GETTEXT_FOUND)
-
-
-# SDL
-IF (USE_SDL)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${SDL2_LIBRARY} ${SDL2_MAIN})
-ENDIF (USE_SDL)
-
-
-# ##########################################
-# UI Specific
-# ##########################################
-TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${PTHREAD_LIBRARIES})
-
-TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${PlatformLibs})
-
-#
-# i18n
-#
-ADD_SUBDIRECTORY(i18n)
-ADM_LINK_THREAD(avidemux3_${QT_EXTENSION})
-# ##########################################
-# Install
-# ##########################################
-
-DISPLAY_SUMMARY_LIST()
-
-ADM_POSTBUILD()
-include(admPackager)
-admPackager(qt4Package)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/config.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/${QT_EXTENSION}" COMPONENT dev)
-
-
-# install headers
-ADM_INSTALL_QT_INCLUDE_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/ADM_openGL/include/" ADM_openGL)
-ADM_INSTALL_QT_INCLUDE_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/ADM_UIs/include/" ADM_UIs)
-
-# install XDG metadata
-if(UNIX AND NOT APPLE)
- add_subdirectory(xdg_data)
-endif()
-
-#
-MESSAGE("")
+cmake_minimum_required(VERSION 3.7)
+
+PROJECT(Avidemux_Qt)
+
+set(ORIGINAL_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake" "${CMAKE_MODULE_PATH}")
+include(avidemuxVersion)
+
+MESSAGE("")
+MESSAGE("#########################################")
+MESSAGE("Configure for Avidemux Qt Started")
+MESSAGE("#########################################")
+MESSAGE("")
+MESSAGE(STATUS "Checking for avidemux development files ..")
+
+IF(NOT FAKEROOT)
+ SET(AVIDEMUX_FAKEROOT "")
+else(NOT FAKEROOT)
+ SET(AVIDEMUX_FAKEROOT "${FAKEROOT}")
+endif(NOT FAKEROOT)
+
+
+IF(WIN32)
+ IF(MSVC)
+ include(adm_win32_vs.cmake)
+ ELSE(MSVC)
+ include(adm_win32_mingw.cmake)
+ ENDIF(MSVC)
+ELSE(WIN32)
+ IF(APPLE)
+ # Silence missing nullability specifier warnings on macOS
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-nullability-completeness")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nullability-completeness")
+ include(adm_osx.cmake)
+ ELSE(APPLE)
+ include(adm_default.cmake)
+ ENDIF(APPLE)
+ENDIF(WIN32)
+#-----------------------------------
+# Set extra libs, system dependant
+#-----------------------------------
+ADM_PREBUILD()
+
+# Locate commonCmakeApplication.cmake
+SET(ADM_HEADER_DIR ${AVIDEMUX_FAKEROOT}${CMAKE_INSTALL_PREFIX}/include/avidemux/${AVIDEMUX_API_VERSION})
+SET(ADM_CMAKE_DIR ${ADM_HEADER_DIR}/cmake)
+SET(CMAKE_MODULE_PATH "${ADM_CMAKE_DIR}" "${ORIGINAL_CMAKE_MODULE_PATH}")
+MESSAGE(STATUS "Checking for avidemux include folder (i.e. CMAKE_INSTALL_PREFIX/include/avidemux/${AVIDEMUX_API_VERSION}, looking in ${ADM_HEADER_DIR}")
+if(NOT EXISTS "${ADM_HEADER_DIR}")
+ MESSAGE(STATUS "Make sure you installed all the files.\n i cannot find avidemux include folder.cmake .\nSet CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
+ MESSAGE(FATAL_ERROR "Aborting")
+endif(NOT EXISTS "${ADM_HEADER_DIR}")
+
+MESSAGE(STATUS "Found avidemux include folder. good.")
+MESSAGE(STATUS "Checking for cmake subfolder")
+
+if(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
+ MESSAGE(STATUS "Make sure you installed all the files.\n I cannot find content of the cmake subfolder .\n")
+ MESSAGE(STATUS "Set CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
+ MESSAGE(STATUS "I was looking for commonCmakeApplication.cmake in ${ADM_CMAKE_DIR}")
+ MESSAGE(FATAL_ERROR "Aborting")
+endif(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
+MESSAGE(STATUS "Found cmake subfolder.good.")
+
+include(commonCmakeApplication)
+include(../admAppSettings.cmake)
+INCLUDE(admCheckQt)
+INCLUDE(admWindRes)
+
+MESSAGE(STATUS "Checking Qt")
+checkQt()
+
+IF (NOT QT_FOUND)
+ MESSAGE(FATAL_ERROR "Qt NOT FOUND")
+ENDIF (NOT QT_FOUND)
+
+# Qt4 openGL
+include(admCheckOpenGl)
+#
+#--
+MESSAGE(STATUS "Adding Qt inc paths : <${QT_INCLUDES}> and definitions <${QT_DEFINITIONS}>")
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+ADD_DEFINITIONS(${QT_DEFINITIONS})
+#--
+
+#
+# #########################################
+# Config
+# #########################################
+ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_QT4)
+SET(CONFIG_HEADER_TYPE ADM_BUILD_QT4)
+SET(UI_SUFFIX ${QT_EXTENSION})
+IF (${QT_EXTENSION} STREQUAL "qt6")
+ SET(CMAKE_CXX_STANDARD 17)
+ SET(CMAKE_CXX_STANDARD_REQUIRED ON)
+ SET(CMAKE_CXX_EXTENSIONS OFF)
+ENDIF (${QT_EXTENSION} STREQUAL "qt6")
+
+
+CONFIGURE_FILE("${ADM_CMAKE_DIR}/config.h.cmake" "${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/config.h")
+MESSAGE(STATUS "${QT_EXTENSION} config.h generated")
+
+INCLUDE_DIRECTORIES(BEFORE "${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/")
+
+
+# ##########################################
+# Add job control
+# ##########################################
+ADD_SUBDIRECTORY(ADM_jobs)
+ADD_SUBDIRECTORY(ADM_update)
+IF(USE_OPENGL)
+ ADD_SUBDIRECTORY(ADM_openGL)
+ENDIF(USE_OPENGL)
+
+# ##########################################
+# Custom fixed width font for time display
+# ##########################################
+if (NOT WIN32)
+ SET(USE_CUSTOM_TIME_DISPLAY_FONT 1)
+endif (NOT WIN32)
+
+# #######################################
+# Add common as a symlink or directly
+# #######################################
+INCLUDE_DIRECTORIES(ADM_UIs/include/)
+
+if (WIN32 AND NOT CROSS)
+ ADD_SUBDIRECTORY(../common ./commonQt4)
+else (WIN32 AND NOT CROSS)
+ # Make symlink else eclipe and kdev4 are puzzled by the tree structure
+ # Not needed for plain build
+ MESSAGE(STATUS "Creating common symlink in ${CMAKE_CURRENT_SOURCE_DIR}")
+
+ execute_process(COMMAND rm -f common
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+ execute_process(COMMAND ln -s ../common .
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+ ADD_SUBDIRECTORY(common ./commonQt4)
+endif (WIN32 AND NOT CROSS)
+
+# Add misc subdirs
+ADD_SUBDIRECTORY(ADM_UIs ./ADM_UIsQt4)
+ADD_SUBDIRECTORY(ADM_userInterfaces ./ADM_userInterfaces${QT_LIBRARY_EXTENSION})
+
+SDLify(../common/main.cpp)
+if (ADM_SUBVERSION)
+ ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_SUBVERSION=\"${ADM_SUBVERSION}\"")
+endif (ADM_SUBVERSION)
+ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_VERSION=\"${AVIDEMUX_VERSION}\"")
+ADD_SOURCE_CFLAGS(../common/main.cpp "-DQT_FLAVOR=\"${QT_EXTENSION}\"")
+
+# ##########################################
+# Icon for windows
+# ##########################################
+if (WIN32 )
+ WINDRESIFY(mainQt "${CMAKE_CURRENT_SOURCE_DIR}/../common/xpm/adm.ico" src "avidemux" "Avidemux Video Editor")
+ SET(ADM_EXE_SRCS ${ADM_EXE_SRCS} ${src})
+endif (WIN32)
+
+# ##########################################
+# Executable
+# ##########################################
+include_directories("${PTHREAD_INCLUDE_DIR}")
+
+ADM_MAIN_APP()
+
+# ##########################################
+# Construct common libraries
+# ##########################################
+FOREACH (_libName ${commonLibs1})
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
+ENDFOREACH (_libName ${commonLibs1})
+
+FOREACH (_libName ${commonLibs2})
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
+ENDFOREACH (_libName ${commonLibs2})
+
+FOREACH (_libName ${coreLibs})
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
+ENDFOREACH (_libName ${coreLibs})
+
+
+
+# ############################################
+# Add qt specific libs
+# ############################################
+TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION}
+ ADM_gui${QT_LIBRARY_EXTENSION}
+ ADM_filters${QT_LIBRARY_EXTENSION}
+ ADM_UI${QT_LIBRARY_EXTENSION}6
+ ADM_dialogQt4
+ ADM_update${QT_LIBRARY_EXTENSION}6
+ ADM_internalVideoFilter6
+ ADM_UI${QT_LIBRARY_EXTENSION}6
+ ADM_gui${QT_LIBRARY_EXTENSION}
+ ADM_UI_${QT_LIBRARY_EXTENSION}6
+ ADM_shell${QT_LIBRARY_EXTENSION}
+ ADM_toolkit6
+ ADM_coreAudio6
+ ADM_coreAudioDevice6
+ ADM_coreVideoEncoder6
+ ADM_osSupport6
+)
+
+# ##########################################
+# External libs
+# ##########################################
+# gettext
+IF (GETTEXT_FOUND)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${GETTEXT_LIBRARY_DIR})
+ENDIF (GETTEXT_FOUND)
+
+
+# SDL
+IF (USE_SDL)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${SDL2_LIBRARY} ${SDL2_MAIN})
+ENDIF (USE_SDL)
+
+
+# ##########################################
+# UI Specific
+# ##########################################
+TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${PTHREAD_LIBRARIES})
+
+TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${PlatformLibs})
+
+#
+# i18n
+#
+ADD_SUBDIRECTORY(i18n)
+ADM_LINK_THREAD(avidemux3_${QT_EXTENSION})
+# ##########################################
+# Install
+# ##########################################
+
+DISPLAY_SUMMARY_LIST()
+
+ADM_POSTBUILD()
+include(admPackager)
+admPackager(qt4Package)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/config.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/${QT_EXTENSION}" COMPONENT dev)
+
+
+# install headers
+ADM_INSTALL_QT_INCLUDE_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/ADM_openGL/include/" ADM_openGL)
+ADM_INSTALL_QT_INCLUDE_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/ADM_UIs/include/" ADM_UIs)
+
+# install XDG metadata
+if(UNIX AND NOT APPLE)
+ add_subdirectory(xdg_data)
+endif()
+
+#
+MESSAGE("")
diff --git a/avidemux/qt4/old.cmake b/avidemux/qt4/old.cmake
index 5f30016fa2..bb0c115ac9 100755
--- a/avidemux/qt4/old.cmake
+++ b/avidemux/qt4/old.cmake
@@ -1,304 +1,304 @@
-cmake_minimum_required(VERSION 3.7)
-SET(AVIDEMUX_API_VERSION 2.7)
-SET(ADM_PROJECT Avidemux_qt4)
-
-MESSAGE("")
-MESSAGE("#########################################")
-MESSAGE("Configure for Avidemux Qt Started")
-MESSAGE("#########################################")
-MESSAGE("")
-#fedora
-ADD_DEFINITIONS("-std=c++11")
-MESSAGE(STATUS "Checking for avidemux development files ..")
-
-IF(NOT FAKEROOT)
- SET(AVIDEMUX_FAKEROOT "")
-else(NOT FAKEROOT)
- SET(AVIDEMUX_FAKEROOT "${FAKEROOT}/")
-endif(NOT FAKEROOT)
-
-
-IF(WIN32)
- IF(MSVC)
- include(adm_win32_vs.cmake)
- ELSEIF(MINGW)
- include(adm_win32_mingw.cmake)
-ELSE(WIN32)
- IF(APPLE)
- include(adm_osx.cmake)
- ELSE(APPLE)
- include(adm_default.cmake)
- ENDIF(APPLE)
-ENDIF(WIN32)
-#-----------------------------------
-# Set extra libs, system dependant
-#-----------------------------------
-# -- Windows --
-IF(WIN32)
- IF(MSVC)
- LIST(APPEND PlatformLibs Qt5::WinMain)
- ENDIF(MSVC)
- IF(MINGW)
- LIST(APPEND PlatformLibs "-lm -lstdc++")
- LIST(APPEND PlatformLibs "winmm -mwindows -Wl,--export-all-symbols")
- ENDIF (MINGW)
-# -- Windows --
-ELSE(WIN32) # OSx, linux, BSD
- LIST(APPEND PlatformLibs "-lm -lstdc++")
- IF(APPLE) # OSX
- LIST(APPEND PlatformLibs "-framework CoreServices -framework CoreAudio -framework AudioUnit -framework Carbon")
- LIST(APPEND PlatformLibs "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
- ELSE(APPLE)
- LIST(APPEND PlatformLibs "X11") # Linux, BSD
- ENDIF(APPLE)
-ENDIF(WIN32)
-
-#
-#
-SET(ADM_HEADER_DIR ${AVIDEMUX_FAKEROOT}${CMAKE_INSTALL_PREFIX}/include/avidemux/${AVIDEMUX_API_VERSION})
-SET(ADM_CMAKE_DIR ${ADM_HEADER_DIR}/cmake)
-# Common definitions...
-SET(CMAKE_MODULE_PATH "${ADM_CMAKE_DIR}" "${CMAKE_MODULE_PATH}")
-MESSAGE(STATUS "Checking for avidemux include folder (i.e. CMAKE_INSTALL_PREFIX/include/avidemux/${AVIDEMUX_API_VERSION}, looking in ${ADM_HEADER_DIR}")
-if(NOT EXISTS "${ADM_HEADER_DIR}")
- MESSAGE(STATUS "Make sure you installed all the files.\n i cannot find avidemux include folder.cmake .\nSet CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(FATAL_ERROR "Aborting")
-endif(NOT EXISTS "${ADM_HEADER_DIR}")
-
-MESSAGE(STATUS "Found avidemux include folder. good.")
-MESSAGE(STATUS "Checking for cmake subfolder")
-
-if(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
- MESSAGE(STATUS "Make sure you installed all the files.\n I cannot find content of the cmake subfolder .\n")
- MESSAGE(STATUS "Set CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(STATUS "I was looking for commonCmakeApplication.cmake in ${ADM_CMAKE_DIR}")
- MESSAGE(FATAL_ERROR "Aborting")
-endif(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
-MESSAGE(STATUS "Found cmake subfolder.good.")
-
-include(commonCmakeApplication)
-include(../admAppSettings.cmake)
-INCLUDE(admCheckQt)
-INCLUDE(admWindRes)
-
-MESSAGE(STATUS "Checking Qt")
-checkQt()
-
-IF (NOT QT_FOUND)
- MESSAGE(FATAL_ERROR "Qt NOT FOUND")
-ENDIF (NOT QT_FOUND)
-
-# Qt4 openGL
-include(admCheckOpenGl)
-#
-#--
-MESSAGE(STATUS "Adding Qt inc paths : <${QT_INCLUDES}> and definitions <${QT_DEFINITIONS}>")
-INCLUDE_DIRECTORIES(${QT_INCLUDES})
-ADD_DEFINITIONS(${QT_DEFINITIONS})
-#--
-
-#
-##########################################
-# Config
-##########################################
-ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_QT4)
-SET(CONFIG_HEADER_TYPE ADM_BUILD_QT4)
-SET(UI_SUFFIX ${QT_EXTENSION})
-
-CONFIGURE_FILE("${ADM_CMAKE_DIR}/config.h.cmake" "${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/config.h")
-MESSAGE(STATUS "${QT_EXTENSION} config.h generated")
-
-INCLUDE_DIRECTORIES(BEFORE "${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/")
-
-
-###########################################
-# Add job control
-###########################################
-IF(NOT MSVC)
- ADD_SUBDIRECTORY(ADM_jobs)
-ENDIF(NOT MSVC)
-ADD_SUBDIRECTORY(ADM_update)
-IF(USE_OPENGL)
- ADD_SUBDIRECTORY(ADM_openGL)
-ENDIF(USE_OPENGL)
-
-########################################
-# Add common as a symlink or directly
-########################################
-INCLUDE_DIRECTORIES(ADM_UIs/include/)
-
-if (WIN32 AND NOT CROSS)
- ADD_SUBDIRECTORY(../common ./commonQt4)
-else (WIN32 AND NOT CROSS)
- # Make symlink else eclipe and kdev4 are puzzled by the tree structure
- # Not needed for plain build
- MESSAGE(STATUS "Creating common symlink in ${CMAKE_CURRENT_SOURCE_DIR}")
-
- execute_process(COMMAND rm -f common
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
- execute_process(COMMAND ln -s ../common .
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
-
- ADD_SUBDIRECTORY(common ./commonQt4)
-endif (WIN32 AND NOT CROSS)
-
-# Add misc subdirs
-ADD_SUBDIRECTORY(ADM_UIs ./ADM_UIsQt4)
-ADD_SUBDIRECTORY(ADM_userInterfaces ./ADM_userInterfaces${QT_LIBRARY_EXTENSION})
-
-SDLify(../common/main.cpp)
-if (ADM_SUBVERSION)
- ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_SUBVERSION=\"${ADM_SUBVERSION}\"")
-endif (ADM_SUBVERSION)
-ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_VERSION=\"${AVIDEMUX_VERSION}\"")
-ADD_SOURCE_CFLAGS(../common/main.cpp "-DQT_FLAVOR=\"${QT_EXTENSION}\"")
-
-###########################################
-# Icon for windows
-###########################################
-if (WIN32 )
- WINDRESIFY(src)
- SET(ADM_EXE_SRCS ${ADM_EXE_SRCS} ${src})
-endif (WIN32)
-
-###########################################
-# Executable
-###########################################
-include_directories("${PTHREAD_INCLUDE_DIR}")
-IF(MSVC)
- SET(EXEC_TYPE "WIN32")
-ENDIF(MSVC)
-ADD_EXECUTABLE(avidemux3_${QT_EXTENSION} ${EXEC_TYPE} ${ADM_EXE_SRCS})
-IF(MSVC)
- set_target_properties(avidemux3_${QT_EXTENSION} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
- set_target_properties(avidemux3_${QT_EXTENSION} PROPERTIES WIN32_EXECUTABLE True)
-ENDIF(MSVC)
-###########################################
-# Construct common libraries
-###########################################
-FOREACH (_libName ${commonLibs1})
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
-ENDFOREACH (_libName ${commonLibs1})
-
-FOREACH (_libName ${commonLibs2})
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
-ENDFOREACH (_libName ${commonLibs2})
-
-FOREACH (_libName ${coreLibs})
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
-ENDFOREACH (_libName ${coreLibs})
-
-
-
-#############################################
-# Add qt specific libs
-#############################################
-TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION}
- ADM_gui${QT_LIBRARY_EXTENSION}
- ADM_filters${QT_LIBRARY_EXTENSION}
- ADM_UI${QT_LIBRARY_EXTENSION}6
- ADM_dialogQt4
- ADM_update${QT_LIBRARY_EXTENSION}6
- ADM_internalVideoFilter6
- ADM_UI${QT_LIBRARY_EXTENSION}6
- ADM_gui${QT_LIBRARY_EXTENSION}
- ADM_UI_${QT_LIBRARY_EXTENSION}6
- ADM_shell${QT_LIBRARY_EXTENSION}
- ADM_toolkit6
- ADM_coreAudio6
- ADM_coreAudioDevice6
- ADM_osSupport6
-)
-
-###########################################
-# External libs
-###########################################
-# gettext
-IF (GETTEXT_FOUND)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${GETTEXT_LIBRARY_DIR})
-ENDIF (GETTEXT_FOUND)
-
-
-# SDL
-IF (USE_SDL)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${SDL2_LIBRARY} ${SDL2_MAIN})
-ENDIF (USE_SDL)
-
-
-###########################################
-# UI Specific
-###########################################
-TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${PTHREAD_LIBRARIES})
-
-###########################################
-# OS Specific
-###########################################
-if (WIN32 OR APPLE)
- set_property(TARGET avidemux3_${QT_EXTENSION} PROPERTY OUTPUT_NAME avidemux)
-endif (WIN32 OR APPLE)
-
-
-IF (APPLE)
- IF (USE_SDL)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_libsdl)
- ENDIF(USE_SDL)
-ENDIF (APPLE)
-#
-# Needed for cross compiling
-#
-if(CROSS)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_UI_${QT_LIBRARY_EXTENSION}6)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_UI_${QT_LIBRARY_EXTENSION}6)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_render6_${QT_LIBRARY_EXTENSION})
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_coreUtils6)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_core6)
- TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_core6)
-endif(CROSS)
-
-TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${PlatformLibs})
-
-
-IF(QT_QTOPENGL_FOUND)
- target_link_libraries(avidemux3_${QT_EXTENSION} ${QT_QTOPENGL_LIBRARIES})
-ENDIF(QT_QTOPENGL_FOUND)
-#
-# i18n
-#
-ADD_SUBDIRECTORY(i18n)
-###########################################
-# Install
-###########################################
-ADM_LINK_THREAD(avidemux3_${QT_EXTENSION})
-ADM_INSTALL_BIN(avidemux3_${QT_EXTENSION})
-
-DISPLAY_SUMMARY_LIST()
-
-IF(MSVC)
- include(./installMsvcRunTime.cmake)
-ENDIF(MSVC)
-include(admPackager)
-admPackager(qt4Package)
-INSTALL(FILES ${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/config.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/${QT_EXTENSION}" COMPONENT dev)
-
-
-# install headers
-ADM_INSTALL_QT_INCLUDE_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/ADM_openGL/include/" ADM_openGL)
-ADM_INSTALL_QT_INCLUDE_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/ADM_UIs/include/" ADM_UIs)
-
-#
-IF(WIN32)
- include(FindBourne)
- IF(RELEASE)
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/../winInstaller/ChangeLog.release
- ${CMAKE_CURRENT_SOURCE_DIR}/../winInstaller/ChangeLog.html
- COPYONLY)
- ELSE(RELEASE)
- execute_process(
- COMMAND ${BASH_EXECUTABLE} genlog.sh
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../winInstaller/
- )
- ENDIF(RELEASE)
-ENDIF(WIN32)
-
-MESSAGE("")
+cmake_minimum_required(VERSION 3.7)
+SET(AVIDEMUX_API_VERSION 2.7)
+SET(ADM_PROJECT Avidemux_qt4)
+
+MESSAGE("")
+MESSAGE("#########################################")
+MESSAGE("Configure for Avidemux Qt Started")
+MESSAGE("#########################################")
+MESSAGE("")
+#fedora
+ADD_DEFINITIONS("-std=c++11")
+MESSAGE(STATUS "Checking for avidemux development files ..")
+
+IF(NOT FAKEROOT)
+ SET(AVIDEMUX_FAKEROOT "")
+else(NOT FAKEROOT)
+ SET(AVIDEMUX_FAKEROOT "${FAKEROOT}/")
+endif(NOT FAKEROOT)
+
+
+IF(WIN32)
+ IF(MSVC)
+ include(adm_win32_vs.cmake)
+ ELSEIF(MINGW)
+ include(adm_win32_mingw.cmake)
+ELSE(WIN32)
+ IF(APPLE)
+ include(adm_osx.cmake)
+ ELSE(APPLE)
+ include(adm_default.cmake)
+ ENDIF(APPLE)
+ENDIF(WIN32)
+#-----------------------------------
+# Set extra libs, system dependant
+#-----------------------------------
+# -- Windows --
+IF(WIN32)
+ IF(MSVC)
+ LIST(APPEND PlatformLibs Qt5::WinMain)
+ ENDIF(MSVC)
+ IF(MINGW)
+ LIST(APPEND PlatformLibs "-lm -lstdc++")
+ LIST(APPEND PlatformLibs "winmm -mwindows -Wl,--export-all-symbols")
+ ENDIF (MINGW)
+# -- Windows --
+ELSE(WIN32) # OSx, linux, BSD
+ LIST(APPEND PlatformLibs "-lm -lstdc++")
+ IF(APPLE) # OSX
+ LIST(APPEND PlatformLibs "-framework CoreServices -framework CoreAudio -framework AudioUnit -framework Carbon")
+ LIST(APPEND PlatformLibs "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
+ ELSE(APPLE)
+ LIST(APPEND PlatformLibs "X11") # Linux, BSD
+ ENDIF(APPLE)
+ENDIF(WIN32)
+
+#
+#
+SET(ADM_HEADER_DIR ${AVIDEMUX_FAKEROOT}${CMAKE_INSTALL_PREFIX}/include/avidemux/${AVIDEMUX_API_VERSION})
+SET(ADM_CMAKE_DIR ${ADM_HEADER_DIR}/cmake)
+# Common definitions...
+SET(CMAKE_MODULE_PATH "${ADM_CMAKE_DIR}" "${CMAKE_MODULE_PATH}")
+MESSAGE(STATUS "Checking for avidemux include folder (i.e. CMAKE_INSTALL_PREFIX/include/avidemux/${AVIDEMUX_API_VERSION}, looking in ${ADM_HEADER_DIR}")
+if(NOT EXISTS "${ADM_HEADER_DIR}")
+ MESSAGE(STATUS "Make sure you installed all the files.\n i cannot find avidemux include folder.cmake .\nSet CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
+ MESSAGE(FATAL_ERROR "Aborting")
+endif(NOT EXISTS "${ADM_HEADER_DIR}")
+
+MESSAGE(STATUS "Found avidemux include folder. good.")
+MESSAGE(STATUS "Checking for cmake subfolder")
+
+if(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
+ MESSAGE(STATUS "Make sure you installed all the files.\n I cannot find content of the cmake subfolder .\n")
+ MESSAGE(STATUS "Set CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
+ MESSAGE(STATUS "I was looking for commonCmakeApplication.cmake in ${ADM_CMAKE_DIR}")
+ MESSAGE(FATAL_ERROR "Aborting")
+endif(NOT EXISTS "${ADM_CMAKE_DIR}/commonCmakeApplication.cmake")
+MESSAGE(STATUS "Found cmake subfolder.good.")
+
+include(commonCmakeApplication)
+include(../admAppSettings.cmake)
+INCLUDE(admCheckQt)
+INCLUDE(admWindRes)
+
+MESSAGE(STATUS "Checking Qt")
+checkQt()
+
+IF (NOT QT_FOUND)
+ MESSAGE(FATAL_ERROR "Qt NOT FOUND")
+ENDIF (NOT QT_FOUND)
+
+# Qt4 openGL
+include(admCheckOpenGl)
+#
+#--
+MESSAGE(STATUS "Adding Qt inc paths : <${QT_INCLUDES}> and definitions <${QT_DEFINITIONS}>")
+INCLUDE_DIRECTORIES(${QT_INCLUDES})
+ADD_DEFINITIONS(${QT_DEFINITIONS})
+#--
+
+#
+##########################################
+# Config
+##########################################
+ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_QT4)
+SET(CONFIG_HEADER_TYPE ADM_BUILD_QT4)
+SET(UI_SUFFIX ${QT_EXTENSION})
+
+CONFIGURE_FILE("${ADM_CMAKE_DIR}/config.h.cmake" "${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/config.h")
+MESSAGE(STATUS "${QT_EXTENSION} config.h generated")
+
+INCLUDE_DIRECTORIES(BEFORE "${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/")
+
+
+###########################################
+# Add job control
+###########################################
+IF(NOT MSVC)
+ ADD_SUBDIRECTORY(ADM_jobs)
+ENDIF(NOT MSVC)
+ADD_SUBDIRECTORY(ADM_update)
+IF(USE_OPENGL)
+ ADD_SUBDIRECTORY(ADM_openGL)
+ENDIF(USE_OPENGL)
+
+########################################
+# Add common as a symlink or directly
+########################################
+INCLUDE_DIRECTORIES(ADM_UIs/include/)
+
+if (WIN32 AND NOT CROSS)
+ ADD_SUBDIRECTORY(../common ./commonQt4)
+else (WIN32 AND NOT CROSS)
+ # Make symlink else eclipe and kdev4 are puzzled by the tree structure
+ # Not needed for plain build
+ MESSAGE(STATUS "Creating common symlink in ${CMAKE_CURRENT_SOURCE_DIR}")
+
+ execute_process(COMMAND rm -f common
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+ execute_process(COMMAND ln -s ../common .
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
+
+ ADD_SUBDIRECTORY(common ./commonQt4)
+endif (WIN32 AND NOT CROSS)
+
+# Add misc subdirs
+ADD_SUBDIRECTORY(ADM_UIs ./ADM_UIsQt4)
+ADD_SUBDIRECTORY(ADM_userInterfaces ./ADM_userInterfaces${QT_LIBRARY_EXTENSION})
+
+SDLify(../common/main.cpp)
+if (ADM_SUBVERSION)
+ ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_SUBVERSION=\"${ADM_SUBVERSION}\"")
+endif (ADM_SUBVERSION)
+ADD_SOURCE_CFLAGS(../common/main.cpp "-DADM_VERSION=\"${AVIDEMUX_VERSION}\"")
+ADD_SOURCE_CFLAGS(../common/main.cpp "-DQT_FLAVOR=\"${QT_EXTENSION}\"")
+
+###########################################
+# Icon for windows
+###########################################
+if (WIN32 )
+ WINDRESIFY(src)
+ SET(ADM_EXE_SRCS ${ADM_EXE_SRCS} ${src})
+endif (WIN32)
+
+###########################################
+# Executable
+###########################################
+include_directories("${PTHREAD_INCLUDE_DIR}")
+IF(MSVC)
+ SET(EXEC_TYPE "WIN32")
+ENDIF(MSVC)
+ADD_EXECUTABLE(avidemux3_${QT_EXTENSION} ${EXEC_TYPE} ${ADM_EXE_SRCS})
+IF(MSVC)
+ set_target_properties(avidemux3_${QT_EXTENSION} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
+ set_target_properties(avidemux3_${QT_EXTENSION} PROPERTIES WIN32_EXECUTABLE True)
+ENDIF(MSVC)
+###########################################
+# Construct common libraries
+###########################################
+FOREACH (_libName ${commonLibs1})
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
+ENDFOREACH (_libName ${commonLibs1})
+
+FOREACH (_libName ${commonLibs2})
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
+ENDFOREACH (_libName ${commonLibs2})
+
+FOREACH (_libName ${coreLibs})
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${_libName})
+ENDFOREACH (_libName ${coreLibs})
+
+
+
+#############################################
+# Add qt specific libs
+#############################################
+TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION}
+ ADM_gui${QT_LIBRARY_EXTENSION}
+ ADM_filters${QT_LIBRARY_EXTENSION}
+ ADM_UI${QT_LIBRARY_EXTENSION}6
+ ADM_dialogQt4
+ ADM_update${QT_LIBRARY_EXTENSION}6
+ ADM_internalVideoFilter6
+ ADM_UI${QT_LIBRARY_EXTENSION}6
+ ADM_gui${QT_LIBRARY_EXTENSION}
+ ADM_UI_${QT_LIBRARY_EXTENSION}6
+ ADM_shell${QT_LIBRARY_EXTENSION}
+ ADM_toolkit6
+ ADM_coreAudio6
+ ADM_coreAudioDevice6
+ ADM_osSupport6
+)
+
+###########################################
+# External libs
+###########################################
+# gettext
+IF (GETTEXT_FOUND)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${GETTEXT_LIBRARY_DIR})
+ENDIF (GETTEXT_FOUND)
+
+
+# SDL
+IF (USE_SDL)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${SDL2_LIBRARY} ${SDL2_MAIN})
+ENDIF (USE_SDL)
+
+
+###########################################
+# UI Specific
+###########################################
+TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY} ${PTHREAD_LIBRARIES})
+
+###########################################
+# OS Specific
+###########################################
+if (WIN32 OR APPLE)
+ set_property(TARGET avidemux3_${QT_EXTENSION} PROPERTY OUTPUT_NAME avidemux)
+endif (WIN32 OR APPLE)
+
+
+IF (APPLE)
+ IF (USE_SDL)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_libsdl)
+ ENDIF(USE_SDL)
+ENDIF (APPLE)
+#
+# Needed for cross compiling
+#
+if(CROSS)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_UI_${QT_LIBRARY_EXTENSION}6)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_UI_${QT_LIBRARY_EXTENSION}6)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_render6_${QT_LIBRARY_EXTENSION})
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_coreUtils6)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_core6)
+ TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ADM_core6)
+endif(CROSS)
+
+TARGET_LINK_LIBRARIES(avidemux3_${QT_EXTENSION} ${PlatformLibs})
+
+
+IF(QT_QTOPENGL_FOUND)
+ target_link_libraries(avidemux3_${QT_EXTENSION} ${QT_QTOPENGL_LIBRARIES})
+ENDIF(QT_QTOPENGL_FOUND)
+#
+# i18n
+#
+ADD_SUBDIRECTORY(i18n)
+###########################################
+# Install
+###########################################
+ADM_LINK_THREAD(avidemux3_${QT_EXTENSION})
+ADM_INSTALL_BIN(avidemux3_${QT_EXTENSION})
+
+DISPLAY_SUMMARY_LIST()
+
+IF(MSVC)
+ include(./installMsvcRunTime.cmake)
+ENDIF(MSVC)
+include(admPackager)
+admPackager(qt4Package)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/config/${QT_EXTENSION}/config.h DESTINATION "${AVIDEMUX_INCLUDE_DIR}/avidemux/${AVIDEMUX_API_VERSION}/${QT_EXTENSION}" COMPONENT dev)
+
+
+# install headers
+ADM_INSTALL_QT_INCLUDE_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/ADM_openGL/include/" ADM_openGL)
+ADM_INSTALL_QT_INCLUDE_FOLDER("${CMAKE_CURRENT_SOURCE_DIR}/ADM_UIs/include/" ADM_UIs)
+
+#
+IF(WIN32)
+ include(FindBourne)
+ IF(RELEASE)
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/../winInstaller/ChangeLog.release
+ ${CMAKE_CURRENT_SOURCE_DIR}/../winInstaller/ChangeLog.html
+ COPYONLY)
+ ELSE(RELEASE)
+ execute_process(
+ COMMAND ${BASH_EXECUTABLE} genlog.sh
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../winInstaller/
+ )
+ ENDIF(RELEASE)
+ENDIF(WIN32)
+
+MESSAGE("")
diff --git a/avidemux/winInstaller/Build-Info.txt b/avidemux/winInstaller/Build-Info.txt
index b06635afee..ab8f8cd52a 100644
--- a/avidemux/winInstaller/Build-Info.txt
+++ b/avidemux/winInstaller/Build-Info.txt
@@ -1,27 +1,27 @@
-Avidemux 2.7.7
------------------------
-Built using GCC 5.5.0
-Packaged with NSIS 3.04
-
-Included libraries:
-Aften git-89aee3d496bb2a89f046025402626ee12a12969f
-libaom 2.0.0
-Expat 2.2.9
-FAAD2 2.8.8
-fontconfig 2.13.1
-freetype 2.10.2
-FriBidi 1.0.8
-LAME 3.100
-libogg 1.3.4
-libvorbis 1.3.6
-libvpx 1.8.2
-opencore-amr 0.1.3
-opus 1.3.1
-Qt 5.15.0
-SDL2 2.0.12
-SQLite 3320200
-TwoLAME 0.3.13
-x264 r2870
-x265 3.4
-xvidcore 1.3.4
-zlib 1.2.11
+Avidemux 2.7.7
+-----------------------
+Built using GCC 5.5.0
+Packaged with NSIS 3.04
+
+Included libraries:
+Aften git-89aee3d496bb2a89f046025402626ee12a12969f
+libaom 2.0.0
+Expat 2.2.9
+FAAD2 2.8.8
+fontconfig 2.13.1
+freetype 2.10.2
+FriBidi 1.0.8
+LAME 3.100
+libogg 1.3.4
+libvorbis 1.3.6
+libvpx 1.8.2
+opencore-amr 0.1.3
+opus 1.3.1
+Qt 5.15.0
+SDL2 2.0.12
+SQLite 3320200
+TwoLAME 0.3.13
+x264 r2870
+x265 3.4
+xvidcore 1.3.4
+zlib 1.2.11
diff --git a/avidemux/winInstaller/InstallOptions.ini b/avidemux/winInstaller/InstallOptions.ini
index e2869242d3..786c3fa49c 100644
--- a/avidemux/winInstaller/InstallOptions.ini
+++ b/avidemux/winInstaller/InstallOptions.ini
@@ -1,37 +1,37 @@
-[Settings]
-NumFields=4
-
-[Field 1]
-Type=label
-Text=Create icons for Avidemux:
-Left=0
-Right=-1
-Top=10
-Bottom=20
-
-[Field 2]
-Type=checkbox
-Text=On my &Desktop
-Left=12
-Right=-1
-Top=28
-Bottom=38
-State=1
-
-[Field 3]
-Type=checkbox
-Text=In my &Start Menu Programs folder
-Left=12
-Right=-1
-Top=46
-Bottom=56
-State=1
-
-[Field 4]
-Type=checkbox
-Text=In my &Quick Launch bar
-Left=12
-Right=-1
-Top=64
-Bottom=74
+[Settings]
+NumFields=4
+
+[Field 1]
+Type=label
+Text=Create icons for Avidemux:
+Left=0
+Right=-1
+Top=10
+Bottom=20
+
+[Field 2]
+Type=checkbox
+Text=On my &Desktop
+Left=12
+Right=-1
+Top=28
+Bottom=38
+State=1
+
+[Field 3]
+Type=checkbox
+Text=In my &Start Menu Programs folder
+Left=12
+Right=-1
+Top=46
+Bottom=56
+State=1
+
+[Field 4]
+Type=checkbox
+Text=In my &Quick Launch bar
+Left=12
+Right=-1
+Top=64
+Bottom=74
State=1
\ No newline at end of file
diff --git a/avidemux/winInstaller/UAC.nsh b/avidemux/winInstaller/UAC.nsh
index e2684da48a..08979aba97 100644
--- a/avidemux/winInstaller/UAC.nsh
+++ b/avidemux/winInstaller/UAC.nsh
@@ -1,299 +1,299 @@
-/*** UAC Plug-in ***
-
-Interactive User (MediumIL) Admin user (HighIL)
-***[Setup.exe]************* ***[Setup.exe]**************
-* * * *
-* +++[.OnInit]+++++++++++ * * +++[.OnInit]++++++++++++ *
-* + UAC_RunElevated >---+-+----> * + + *
-* + NSIS.Quit + * * + + *
-* +++++++++++++++++++++++ * * ++++++++++++++++++++++++ *
-* * * *
-* * * *
-* +++[Section]+++++++++++ * * +++[Section]++++++++++++ *
-* + + * /--+-+-
-**
-** Get integrity level of current process
-**
-**/
-!macro UAC_GetIntegrityLevel outvar
-UAC::_ 6
-!if "${outvar}" != "s"
- Pop ${outvar}
-!endif
-!macroend
-
-
-
-/* UAC_IsAdmin
-**
-** Is the current process running with administrator privileges? Result in $0
-**
-** ${If} ${UAC_IsAdmin} ...
-**
-**/
-!macro UAC_IsAdmin
-UAC::_ 2
-!macroend
-!define UAC_IsAdmin `"" UAC_IsAdmin ""`
-!macro _UAC_IsAdmin _a _b _t _f
-!insertmacro _UAC_MakeLL_Cmp _!= 0 2s
-!macroend
-
-
-
-/* UAC_IsInnerInstance
-**
-** Does the current process have a NSIS/UAC parent process that is part of the elevation operation?
-**
-** ${If} ${UAC_IsInnerInstance} ...
-**
-**/
-!macro UAC_IsInnerInstance
-UAC::_ 3
-!macroend
-!define UAC_IsInnerInstance `"" UAC_IsInnerInstance ""`
-!macro _UAC_IsInnerInstance _a _b _t _f
-!insertmacro _UAC_MakeLL_Cmp _!= 0 3s
-!macroend
-
-
-
-/* UAC_PageElevation_OnInit, UAC_PageElevation_OnGuiInit,
-**
-** Helper macros for elevation on a custom elevation page, see the DualMode example for more information.
-**
-**/
-!macro UAC_Notify_OnGuiInit
-UAC::_ 4
-!macroend
-!macro UAC_PageElevation_OnGuiInit
-!insertmacro UAC_Notify_OnGuiInit
-!macroend
-!macro UAC_PageElevation_OnInit
-UAC::_ 5
-${IfThen} ${Errors} ${|} Quit ${|}
-!macroend
-
-
-
-/* UAC_AsUser_Call
-**
-** Calls a function or label in the user process instance.
-** All the UAC_AsUser_* macros use this helper macro.
-**
-**/
-!define UAC_SYNCREGISTERS 0x1
-;define UAC_SYNCSTACK 0x2
-!define UAC_SYNCOUTDIR 0x4
-!define UAC_SYNCINSTDIR 0x8
-;define UAC_CLEARERRFLAG 0x10
-!macro UAC_AsUser_Call type name flags
-push $0
-Get${type}Address $0 ${name}
-!verbose push
-!verbose ${UAC_VERBOSE}
-!insertmacro _UAC_ParseDefineFlagsToInt _UAC_AsUser_Call__flags ${flags}
-!verbose pop
-StrCpy $0 "1$0:${_UAC_AsUser_Call__flags}"
-!undef _UAC_AsUser_Call__flags
-Exch $0
-UAC::_
-!macroend
-
-
-
-/*
-** UAC_AsUser_GetSection
-*/
-!macro UAC_AsUser_GetSection secprop secidx outvar
-!insertmacro _UAC_AsUser_GenOp ${outvar} SectionGet${secprop} ${secidx} ""
-!macroend
-
-
-
-/*
-** UAC_AsUser_GetGlobalVar
-** UAC_AsUser_GetGlobal
-*/
-!macro UAC_AsUser_GetGlobalVar var
-!insertmacro _UAC_AsUser_GenOp ${var} StrCpy "" ${var}
-!macroend
-!macro UAC_AsUser_GetGlobal outvar srcvar
-!insertmacro _UAC_AsUser_GenOp ${outvar} StrCpy "" ${srcvar}
-!macroend
-
-
-
-/*
-** UAC_AsUser_ExecShell
-**
-** Call ExecShell in the user process instance.
-**
-*/
-!macro UAC_AsUser_ExecShell verb command params workdir show
-!insertmacro _UAC_IncL
-goto _UAC_L_E_${__UAC_L}
-_UAC_L_F_${__UAC_L}:
-ExecShell "${verb}" "${command}" '${params}' ${show}
-return
-_UAC_L_E_${__UAC_L}:
-!if "${workdir}" != ""
- push $outdir
- SetOutPath "${workdir}"
-!endif
-!insertmacro UAC_AsUser_Call Label _UAC_L_F_${__UAC_L} ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR} #|${UAC_CLEARERRFLAG}
-!if "${workdir}" != ""
- pop $outdir
- SetOutPath $outdir
-!endif
-!macroend
-
-
-
-!macro _UAC_MakeLL_Cmp cmpop cmp pluginparams
-!insertmacro _LOGICLIB_TEMP
-UAC::_ ${pluginparams}
-pop $_LOGICLIB_TEMP
-!insertmacro ${cmpop} $_LOGICLIB_TEMP ${cmp} `${_t}` `${_f}`
-!macroend
-!macro _UAC_definemath def val1 op val2
-!define /math _UAC_definemath "${val1}" ${op} ${val2}
-!ifdef ${def}
- !undef ${def}
-!endif
-!define ${def} "${_UAC_definemath}"
-!undef _UAC_definemath
-!macroend
-!macro _UAC_ParseDefineFlags_orin parse outflags
-!searchparse /noerrors ${${parse}} "" _UAC_ParseDefineFlags_orin_f1 "|" _UAC_ParseDefineFlags_orin_f2
-!define _UAC_ParseDefineFlags_orin_this ${_UAC_ParseDefineFlags_orin_f1}
-!undef ${parse}
-!define ${parse} ${_UAC_ParseDefineFlags_orin_f2}
-!define _UAC_ParseDefineFlags_orin_saveout ${${outflags}}
-!undef ${outflags}
-!define /math ${outflags} "${_UAC_ParseDefineFlags_orin_saveout}" | "${_UAC_ParseDefineFlags_orin_this}"
-!undef _UAC_ParseDefineFlags_orin_saveout
-!undef _UAC_ParseDefineFlags_orin_this
-!ifdef _UAC_ParseDefineFlags_orin_f1
- !undef _UAC_ParseDefineFlags_orin_f1
-!endif
-!ifdef _UAC_ParseDefineFlags_orin_f2
- !undef _UAC_ParseDefineFlags_orin_f2
-!endif
-!macroend
-!macro _UAC_ParseDefineFlags_Begin _outdef _in
-!define _UAC_PDF${_outdef}_parse "${_in}"
-!define _UAC_PDF${_outdef}_flags ""
-!define _UAC_PDF${_outdef}_r 0
-!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x1
-!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x2
-!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x4
-!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x8
-!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x10
-!macroend
-!macro _UAC_ParseDefineFlags_End _outdef
-!define ${_outdef} ${_UAC_PDF${_outdef}_r}
-!undef _UAC_PDF${_outdef}_r
-!undef _UAC_PDF${_outdef}_flags
-!undef _UAC_PDF${_outdef}_parse
-!macroend
-!macro _UAC_ParseDefineFlags_IncludeFlag _outdef flag
-!if ${_UAC_PDF${_outdef}_flags} & ${flag}
- !insertmacro _UAC_definemath _UAC_PDF${_outdef}_r ${_UAC_PDF${_outdef}_r} | ${flag}
-!endif
-!macroend
-!macro _UAC_ParseDefineFlagsToInt _outdef _in
-!insertmacro _UAC_ParseDefineFlags_Begin _UAC_ParseDefineFlagsToInt_tmp "${_in}"
-!define ${_outdef} ${_UAC_PDF_UAC_ParseDefineFlagsToInt_tmp_flags}
-!insertmacro _UAC_ParseDefineFlags_End _UAC_ParseDefineFlagsToInt_tmp
-!undef _UAC_ParseDefineFlagsToInt_tmp
-!macroend
-!macro _UAC_IncL
-!insertmacro _UAC_definemath __UAC_L "${__UAC_L}" + 1
-!macroend
-!macro _UAC_AsUser_GenOp outvar op opparam1 opparam2
-!define _UAC_AUGOGR_ID _UAC_AUGOGR_OP${outvar}${op}${opparam1}${opparam2}
-!ifndef ${_UAC_AUGOGR_ID} ;Has this exact action been done before?
- !if ${outvar} == $0
- !define ${_UAC_AUGOGR_ID} $1
- !else
- !define ${_UAC_AUGOGR_ID} $0
- !endif
- !if "${opparam1}" == ""
- !define _UAC_AUGOGR_OPP1 ${${_UAC_AUGOGR_ID}}
- !define _UAC_AUGOGR_OPP2 ${opparam2}
- !else
- !define _UAC_AUGOGR_OPP1 ${opparam1}
- !define _UAC_AUGOGR_OPP2 ${${_UAC_AUGOGR_ID}}
- !endif
- goto ${_UAC_AUGOGR_ID}_C
- ${_UAC_AUGOGR_ID}_F:
- ${op} ${_UAC_AUGOGR_OPP1} ${_UAC_AUGOGR_OPP2}
- return
- ${_UAC_AUGOGR_ID}_C:
- !undef _UAC_AUGOGR_OPP1
- !undef _UAC_AUGOGR_OPP2
-!endif
-push ${${_UAC_AUGOGR_ID}}
-!insertmacro UAC_AsUser_Call Label ${_UAC_AUGOGR_ID}_F ${UAC_SYNCREGISTERS}
-StrCpy ${outvar} ${${_UAC_AUGOGR_ID}}
-pop ${${_UAC_AUGOGR_ID}}
-!undef _UAC_AUGOGR_ID
-!macroend
-
-
-
-!verbose pop
+/*** UAC Plug-in ***
+
+Interactive User (MediumIL) Admin user (HighIL)
+***[Setup.exe]************* ***[Setup.exe]**************
+* * * *
+* +++[.OnInit]+++++++++++ * * +++[.OnInit]++++++++++++ *
+* + UAC_RunElevated >---+-+----> * + + *
+* + NSIS.Quit + * * + + *
+* +++++++++++++++++++++++ * * ++++++++++++++++++++++++ *
+* * * *
+* * * *
+* +++[Section]+++++++++++ * * +++[Section]++++++++++++ *
+* + + * /--+-+-
+**
+** Get integrity level of current process
+**
+**/
+!macro UAC_GetIntegrityLevel outvar
+UAC::_ 6
+!if "${outvar}" != "s"
+ Pop ${outvar}
+!endif
+!macroend
+
+
+
+/* UAC_IsAdmin
+**
+** Is the current process running with administrator privileges? Result in $0
+**
+** ${If} ${UAC_IsAdmin} ...
+**
+**/
+!macro UAC_IsAdmin
+UAC::_ 2
+!macroend
+!define UAC_IsAdmin `"" UAC_IsAdmin ""`
+!macro _UAC_IsAdmin _a _b _t _f
+!insertmacro _UAC_MakeLL_Cmp _!= 0 2s
+!macroend
+
+
+
+/* UAC_IsInnerInstance
+**
+** Does the current process have a NSIS/UAC parent process that is part of the elevation operation?
+**
+** ${If} ${UAC_IsInnerInstance} ...
+**
+**/
+!macro UAC_IsInnerInstance
+UAC::_ 3
+!macroend
+!define UAC_IsInnerInstance `"" UAC_IsInnerInstance ""`
+!macro _UAC_IsInnerInstance _a _b _t _f
+!insertmacro _UAC_MakeLL_Cmp _!= 0 3s
+!macroend
+
+
+
+/* UAC_PageElevation_OnInit, UAC_PageElevation_OnGuiInit,
+**
+** Helper macros for elevation on a custom elevation page, see the DualMode example for more information.
+**
+**/
+!macro UAC_Notify_OnGuiInit
+UAC::_ 4
+!macroend
+!macro UAC_PageElevation_OnGuiInit
+!insertmacro UAC_Notify_OnGuiInit
+!macroend
+!macro UAC_PageElevation_OnInit
+UAC::_ 5
+${IfThen} ${Errors} ${|} Quit ${|}
+!macroend
+
+
+
+/* UAC_AsUser_Call
+**
+** Calls a function or label in the user process instance.
+** All the UAC_AsUser_* macros use this helper macro.
+**
+**/
+!define UAC_SYNCREGISTERS 0x1
+;define UAC_SYNCSTACK 0x2
+!define UAC_SYNCOUTDIR 0x4
+!define UAC_SYNCINSTDIR 0x8
+;define UAC_CLEARERRFLAG 0x10
+!macro UAC_AsUser_Call type name flags
+push $0
+Get${type}Address $0 ${name}
+!verbose push
+!verbose ${UAC_VERBOSE}
+!insertmacro _UAC_ParseDefineFlagsToInt _UAC_AsUser_Call__flags ${flags}
+!verbose pop
+StrCpy $0 "1$0:${_UAC_AsUser_Call__flags}"
+!undef _UAC_AsUser_Call__flags
+Exch $0
+UAC::_
+!macroend
+
+
+
+/*
+** UAC_AsUser_GetSection
+*/
+!macro UAC_AsUser_GetSection secprop secidx outvar
+!insertmacro _UAC_AsUser_GenOp ${outvar} SectionGet${secprop} ${secidx} ""
+!macroend
+
+
+
+/*
+** UAC_AsUser_GetGlobalVar
+** UAC_AsUser_GetGlobal
+*/
+!macro UAC_AsUser_GetGlobalVar var
+!insertmacro _UAC_AsUser_GenOp ${var} StrCpy "" ${var}
+!macroend
+!macro UAC_AsUser_GetGlobal outvar srcvar
+!insertmacro _UAC_AsUser_GenOp ${outvar} StrCpy "" ${srcvar}
+!macroend
+
+
+
+/*
+** UAC_AsUser_ExecShell
+**
+** Call ExecShell in the user process instance.
+**
+*/
+!macro UAC_AsUser_ExecShell verb command params workdir show
+!insertmacro _UAC_IncL
+goto _UAC_L_E_${__UAC_L}
+_UAC_L_F_${__UAC_L}:
+ExecShell "${verb}" "${command}" '${params}' ${show}
+return
+_UAC_L_E_${__UAC_L}:
+!if "${workdir}" != ""
+ push $outdir
+ SetOutPath "${workdir}"
+!endif
+!insertmacro UAC_AsUser_Call Label _UAC_L_F_${__UAC_L} ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR} #|${UAC_CLEARERRFLAG}
+!if "${workdir}" != ""
+ pop $outdir
+ SetOutPath $outdir
+!endif
+!macroend
+
+
+
+!macro _UAC_MakeLL_Cmp cmpop cmp pluginparams
+!insertmacro _LOGICLIB_TEMP
+UAC::_ ${pluginparams}
+pop $_LOGICLIB_TEMP
+!insertmacro ${cmpop} $_LOGICLIB_TEMP ${cmp} `${_t}` `${_f}`
+!macroend
+!macro _UAC_definemath def val1 op val2
+!define /math _UAC_definemath "${val1}" ${op} ${val2}
+!ifdef ${def}
+ !undef ${def}
+!endif
+!define ${def} "${_UAC_definemath}"
+!undef _UAC_definemath
+!macroend
+!macro _UAC_ParseDefineFlags_orin parse outflags
+!searchparse /noerrors ${${parse}} "" _UAC_ParseDefineFlags_orin_f1 "|" _UAC_ParseDefineFlags_orin_f2
+!define _UAC_ParseDefineFlags_orin_this ${_UAC_ParseDefineFlags_orin_f1}
+!undef ${parse}
+!define ${parse} ${_UAC_ParseDefineFlags_orin_f2}
+!define _UAC_ParseDefineFlags_orin_saveout ${${outflags}}
+!undef ${outflags}
+!define /math ${outflags} "${_UAC_ParseDefineFlags_orin_saveout}" | "${_UAC_ParseDefineFlags_orin_this}"
+!undef _UAC_ParseDefineFlags_orin_saveout
+!undef _UAC_ParseDefineFlags_orin_this
+!ifdef _UAC_ParseDefineFlags_orin_f1
+ !undef _UAC_ParseDefineFlags_orin_f1
+!endif
+!ifdef _UAC_ParseDefineFlags_orin_f2
+ !undef _UAC_ParseDefineFlags_orin_f2
+!endif
+!macroend
+!macro _UAC_ParseDefineFlags_Begin _outdef _in
+!define _UAC_PDF${_outdef}_parse "${_in}"
+!define _UAC_PDF${_outdef}_flags ""
+!define _UAC_PDF${_outdef}_r 0
+!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x1
+!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x2
+!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x4
+!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x8
+!insertmacro _UAC_ParseDefineFlags_orin _UAC_PDF${_outdef}_parse _UAC_PDF${_outdef}_flags ;0x10
+!macroend
+!macro _UAC_ParseDefineFlags_End _outdef
+!define ${_outdef} ${_UAC_PDF${_outdef}_r}
+!undef _UAC_PDF${_outdef}_r
+!undef _UAC_PDF${_outdef}_flags
+!undef _UAC_PDF${_outdef}_parse
+!macroend
+!macro _UAC_ParseDefineFlags_IncludeFlag _outdef flag
+!if ${_UAC_PDF${_outdef}_flags} & ${flag}
+ !insertmacro _UAC_definemath _UAC_PDF${_outdef}_r ${_UAC_PDF${_outdef}_r} | ${flag}
+!endif
+!macroend
+!macro _UAC_ParseDefineFlagsToInt _outdef _in
+!insertmacro _UAC_ParseDefineFlags_Begin _UAC_ParseDefineFlagsToInt_tmp "${_in}"
+!define ${_outdef} ${_UAC_PDF_UAC_ParseDefineFlagsToInt_tmp_flags}
+!insertmacro _UAC_ParseDefineFlags_End _UAC_ParseDefineFlagsToInt_tmp
+!undef _UAC_ParseDefineFlagsToInt_tmp
+!macroend
+!macro _UAC_IncL
+!insertmacro _UAC_definemath __UAC_L "${__UAC_L}" + 1
+!macroend
+!macro _UAC_AsUser_GenOp outvar op opparam1 opparam2
+!define _UAC_AUGOGR_ID _UAC_AUGOGR_OP${outvar}${op}${opparam1}${opparam2}
+!ifndef ${_UAC_AUGOGR_ID} ;Has this exact action been done before?
+ !if ${outvar} == $0
+ !define ${_UAC_AUGOGR_ID} $1
+ !else
+ !define ${_UAC_AUGOGR_ID} $0
+ !endif
+ !if "${opparam1}" == ""
+ !define _UAC_AUGOGR_OPP1 ${${_UAC_AUGOGR_ID}}
+ !define _UAC_AUGOGR_OPP2 ${opparam2}
+ !else
+ !define _UAC_AUGOGR_OPP1 ${opparam1}
+ !define _UAC_AUGOGR_OPP2 ${${_UAC_AUGOGR_ID}}
+ !endif
+ goto ${_UAC_AUGOGR_ID}_C
+ ${_UAC_AUGOGR_ID}_F:
+ ${op} ${_UAC_AUGOGR_OPP1} ${_UAC_AUGOGR_OPP2}
+ return
+ ${_UAC_AUGOGR_ID}_C:
+ !undef _UAC_AUGOGR_OPP1
+ !undef _UAC_AUGOGR_OPP2
+!endif
+push ${${_UAC_AUGOGR_ID}}
+!insertmacro UAC_AsUser_Call Label ${_UAC_AUGOGR_ID}_F ${UAC_SYNCREGISTERS}
+StrCpy ${outvar} ${${_UAC_AUGOGR_ID}}
+pop ${${_UAC_AUGOGR_ID}}
+!undef _UAC_AUGOGR_ID
+!macroend
+
+
+
+!verbose pop
!endif /* UAC_HDR__INC */
\ No newline at end of file
diff --git a/avidemux/winInstaller/What's New.html b/avidemux/winInstaller/What's New.html
index 822467b686..e563058ece 100644
--- a/avidemux/winInstaller/What's New.html
+++ b/avidemux/winInstaller/What's New.html
@@ -1,71 +1,71 @@
-
-
-
-
-
- What's New in Avidemux
-
-
-
-
What's New in Avidemux
-
- - Build : Avidemux can be built with visual c++ 2015 (losing some ASM)
- - OsX : Initialize fontconfig so that subtitling works
- - Core : Update ffmpeg to 3.0.5
- - i18n : Updated fr and ru translations (jean Elchinger/totalcaesar659)
- - Build : Improved build scripts (euma)
- - x265 : Enforce complicancy with most devices
- - vaapi : Add resizer
- - UI : Redone UI, revamped contrast filter
- - Qt : Dont use too much CPU on playback when there is no audio track
- - Qt : Reenabled nvenc + Fixed keyframe detection
- - Qt : Fixed a crash when encoding starts very slowly (x265)
- - Build : Allow use of system libass, liba52,libmad (euma)
-
-
-
-
-
+
+
+
+
+
+ What's New in Avidemux
+
+
+
+
What's New in Avidemux
+
+ - Build : Avidemux can be built with visual c++ 2015 (losing some ASM)
+ - OsX : Initialize fontconfig so that subtitling works
+ - Core : Update ffmpeg to 3.0.5
+ - i18n : Updated fr and ru translations (jean Elchinger/totalcaesar659)
+ - Build : Improved build scripts (euma)
+ - x265 : Enforce complicancy with most devices
+ - vaapi : Add resizer
+ - UI : Redone UI, revamped contrast filter
+ - Qt : Dont use too much CPU on playback when there is no audio track
+ - Qt : Reenabled nvenc + Fixed keyframe detection
+ - Qt : Fixed a crash when encoding starts very slowly (x265)
+ - Build : Allow use of system libass, liba52,libmad (euma)
+
+
+
+
+
diff --git a/avidemux/winInstaller/avidemux_cross32Qt5.nsi b/avidemux/winInstaller/avidemux_cross32Qt5.nsi
index 039a673850..601b6d344a 100644
--- a/avidemux/winInstaller/avidemux_cross32Qt5.nsi
+++ b/avidemux/winInstaller/avidemux_cross32Qt5.nsi
@@ -1,110 +1,110 @@
-##########################
-# Included files
-##########################
-!define BUILD_BITS 32
-#!define BINARY_FOLDER /mingw/avidemux_32
-#!define DEV_FOLDER /mingw_dev/mingw/Release/
-!include avidemux_crossQt5.nsi
-
-Section "Avidemux Core" SecCore
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} "./Build-Info.txt"
- ${File} "./ChangeLog.html"
- ${File} "./change.css"
-
- ${File} ${BINARY_FOLDER}/libass-5.dll
- ${File} ${BINARY_FOLDER}/libcrypto-1_1.dll
- ${File} ${BINARY_FOLDER}/libssl-1_1.dll
- ${File} ${BINARY_FOLDER}/libpcre2-16-0.dll
-
- ${File} ${BINARY_FOLDER}/libexpat-1.dll
- ${File} ${BINARY_FOLDER}/libffi-*.dll
- ${File} ${BINARY_FOLDER}/libglib-2.0-0.dll
- ${File} ${BINARY_FOLDER}/libgobject-2.0-0.dll
- ${File} ${BINARY_FOLDER}/libharfbuzz-0.dll
- ${File} ${BINARY_FOLDER}/libiconv-2.dll # MXE libiconv.dll
- ${File} ${BINARY_FOLDER}/libpcre16-0.dll
- ${File} ${BINARY_FOLDER}/libpcre-1.dll
- #${File} ${BINARY_FOLDER}/libfaad-2.dll
- #${File} ${BINARY_FOLDER}/libfaac-0.dll
- ${File} ${BINARY_FOLDER}/libtwolame.dll
- ${File} ${BINARY_FOLDER}/libbz2.dll
- ${File} ${BINARY_FOLDER}/libpng16-16.dll
- ${File} ${BINARY_FOLDER}/libsqlite3-0.dll
- ${File} ${BINARY_FOLDER}/libstdc++-6.dll
- ${File} ${BINARY_FOLDER}/libwinpthread-1.dll
- ${File} ${BINARY_FOLDER}/libz-1.dll
- ${File} ${BINARY_FOLDER}/zlib1.dll
- ${File} ${BINARY_FOLDER}/libfreetype-6.dll
- ${File} ${BINARY_FOLDER}/libgcc_s_sjlj-1.dll
- ${File} ${BINARY_FOLDER}/SDL2.dll
-# Qt
- ${File} ${BINARY_FOLDER}/Qt5Core.dll
- ${File} ${BINARY_FOLDER}/Qt5Gui.dll
- ${File} ${BINARY_FOLDER}/Qt5Widgets.dll
- ${File} ${BINARY_FOLDER}/Qt5Network.dll
- ${File} ${BINARY_FOLDER}/Qt5WinExtras.dll
- #${File} ${BINARY_FOLDER}/icudt56.dll
- #${File} ${BINARY_FOLDER}/icuin56.dll
- #${File} ${BINARY_FOLDER}/icuio56.dll
- #${File} ${BINARY_FOLDER}/icule56.dll
- #${File} ${BINARY_FOLDER}/iculx56.dll
- #${File} ${BINARY_FOLDER}/icutu56.dll
- #${File} ${BINARY_FOLDER}/icuuc56.dll
- ${File} ${BINARY_FOLDER}/libintl-8.dll
-# SSL still needed ?
- ${File} ${BINARY_FOLDER}/libeay32.dll
- ${File} ${BINARY_FOLDER}/ssleay32.dll
-
- SetOutPath $INSTDIR\platforms
- ${File} ${BINARY_FOLDER}/platforms/qminimal.dll
- ${File} ${BINARY_FOLDER}/platforms/qwindows.dll
- SetOutPath $INSTDIR\styles
- ${File} ${BINARY_FOLDER}/styles/qwindowsvistastyle.dll
- SetOutPath $INSTDIR
-# adm
- ${File} ${BINARY_FOLDER}/libADM_audioParser6.dll
- ${File} ${BINARY_FOLDER}/libADM_core6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreAudio6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreAudioDevice6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreAudioEncoder6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreAudioFilterAPI6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreDemuxer6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreDemuxerMpeg6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreImage6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreImageLoader6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreJobs.dll
- ${File} ${BINARY_FOLDER}/libADM_coreMuxer6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreScript.dll
- ${File} ${BINARY_FOLDER}/libADM_coreSocket6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreSqlLight3.dll
- ${File} ${BINARY_FOLDER}/libADM_coreUI6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreUtils6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreVideoCodec6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreVideoEncoder6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreVideoFilter6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreSubtitles6.dll
- ${File} ${SOURCE_FOLDER}/AUTHORS.
- ${File} ${SOURCE_FOLDER}/COPYING.
- ${File} ${SOURCE_FOLDER}/README.
- ${File} ${BINARY_FOLDER}/avcodec-*.dll
- ${File} ${BINARY_FOLDER}/avformat-*.dll
- ${File} ${BINARY_FOLDER}/avutil-*.dll
- ${File} ${BINARY_FOLDER}/postproc-*.dll
- ${File} ${BINARY_FOLDER}/swscale-*.dll
-
- ${File} ${BINARY_FOLDER}/libfribidi*.dll
- ${File} ${BINARY_FOLDER}/libfontconfig*.dll
- ${File} ${BINARY_FOLDER}/libfreetype*.dll
- ${File} ${BINARY_FOLDER}/libharfbuzz*.dll
-
- WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
- WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
-
- ${If} ${AtMostWinVista}
- WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
- ${EndIf}
-SectionEnd
-!include avidemux_crossQt5Tail.nsi
+##########################
+# Included files
+##########################
+!define BUILD_BITS 32
+#!define BINARY_FOLDER /mingw/avidemux_32
+#!define DEV_FOLDER /mingw_dev/mingw/Release/
+!include avidemux_crossQt5.nsi
+
+Section "Avidemux Core" SecCore
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} "./Build-Info.txt"
+ ${File} "./ChangeLog.html"
+ ${File} "./change.css"
+
+ ${File} ${BINARY_FOLDER}/libass-5.dll
+ ${File} ${BINARY_FOLDER}/libcrypto-1_1.dll
+ ${File} ${BINARY_FOLDER}/libssl-1_1.dll
+ ${File} ${BINARY_FOLDER}/libpcre2-16-0.dll
+
+ ${File} ${BINARY_FOLDER}/libexpat-1.dll
+ ${File} ${BINARY_FOLDER}/libffi-*.dll
+ ${File} ${BINARY_FOLDER}/libglib-2.0-0.dll
+ ${File} ${BINARY_FOLDER}/libgobject-2.0-0.dll
+ ${File} ${BINARY_FOLDER}/libharfbuzz-0.dll
+ ${File} ${BINARY_FOLDER}/libiconv-2.dll # MXE libiconv.dll
+ ${File} ${BINARY_FOLDER}/libpcre16-0.dll
+ ${File} ${BINARY_FOLDER}/libpcre-1.dll
+ #${File} ${BINARY_FOLDER}/libfaad-2.dll
+ #${File} ${BINARY_FOLDER}/libfaac-0.dll
+ ${File} ${BINARY_FOLDER}/libtwolame.dll
+ ${File} ${BINARY_FOLDER}/libbz2.dll
+ ${File} ${BINARY_FOLDER}/libpng16-16.dll
+ ${File} ${BINARY_FOLDER}/libsqlite3-0.dll
+ ${File} ${BINARY_FOLDER}/libstdc++-6.dll
+ ${File} ${BINARY_FOLDER}/libwinpthread-1.dll
+ ${File} ${BINARY_FOLDER}/libz-1.dll
+ ${File} ${BINARY_FOLDER}/zlib1.dll
+ ${File} ${BINARY_FOLDER}/libfreetype-6.dll
+ ${File} ${BINARY_FOLDER}/libgcc_s_sjlj-1.dll
+ ${File} ${BINARY_FOLDER}/SDL2.dll
+# Qt
+ ${File} ${BINARY_FOLDER}/Qt5Core.dll
+ ${File} ${BINARY_FOLDER}/Qt5Gui.dll
+ ${File} ${BINARY_FOLDER}/Qt5Widgets.dll
+ ${File} ${BINARY_FOLDER}/Qt5Network.dll
+ ${File} ${BINARY_FOLDER}/Qt5WinExtras.dll
+ #${File} ${BINARY_FOLDER}/icudt56.dll
+ #${File} ${BINARY_FOLDER}/icuin56.dll
+ #${File} ${BINARY_FOLDER}/icuio56.dll
+ #${File} ${BINARY_FOLDER}/icule56.dll
+ #${File} ${BINARY_FOLDER}/iculx56.dll
+ #${File} ${BINARY_FOLDER}/icutu56.dll
+ #${File} ${BINARY_FOLDER}/icuuc56.dll
+ ${File} ${BINARY_FOLDER}/libintl-8.dll
+# SSL still needed ?
+ ${File} ${BINARY_FOLDER}/libeay32.dll
+ ${File} ${BINARY_FOLDER}/ssleay32.dll
+
+ SetOutPath $INSTDIR\platforms
+ ${File} ${BINARY_FOLDER}/platforms/qminimal.dll
+ ${File} ${BINARY_FOLDER}/platforms/qwindows.dll
+ SetOutPath $INSTDIR\styles
+ ${File} ${BINARY_FOLDER}/styles/qwindowsvistastyle.dll
+ SetOutPath $INSTDIR
+# adm
+ ${File} ${BINARY_FOLDER}/libADM_audioParser6.dll
+ ${File} ${BINARY_FOLDER}/libADM_core6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreAudio6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreAudioDevice6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreAudioEncoder6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreAudioFilterAPI6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreDemuxer6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreDemuxerMpeg6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreImage6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreImageLoader6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreJobs.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreMuxer6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreScript.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreSocket6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreSqlLight3.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreUI6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreUtils6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreVideoCodec6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreVideoEncoder6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreVideoFilter6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreSubtitles6.dll
+ ${File} ${SOURCE_FOLDER}/AUTHORS.
+ ${File} ${SOURCE_FOLDER}/COPYING.
+ ${File} ${SOURCE_FOLDER}/README.
+ ${File} ${BINARY_FOLDER}/avcodec-*.dll
+ ${File} ${BINARY_FOLDER}/avformat-*.dll
+ ${File} ${BINARY_FOLDER}/avutil-*.dll
+ ${File} ${BINARY_FOLDER}/postproc-*.dll
+ ${File} ${BINARY_FOLDER}/swscale-*.dll
+
+ ${File} ${BINARY_FOLDER}/libfribidi*.dll
+ ${File} ${BINARY_FOLDER}/libfontconfig*.dll
+ ${File} ${BINARY_FOLDER}/libfreetype*.dll
+ ${File} ${BINARY_FOLDER}/libharfbuzz*.dll
+
+ WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
+ WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
+
+ ${If} ${AtMostWinVista}
+ WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
+ ${EndIf}
+SectionEnd
+!include avidemux_crossQt5Tail.nsi
diff --git a/avidemux/winInstaller/avidemux_cross64Qt5.nsi b/avidemux/winInstaller/avidemux_cross64Qt5.nsi
index eedea23dd7..aa5fd60b80 100644
--- a/avidemux/winInstaller/avidemux_cross64Qt5.nsi
+++ b/avidemux/winInstaller/avidemux_cross64Qt5.nsi
@@ -1,98 +1,98 @@
-##########################
-# Included files
-##########################
-!define BUILD_BITS 64
-#!define BINARY_FOLDER /mingw/avidemux_64
-#!define DEV_FOLDER /mingw_dev/mingw/Release/
-!include avidemux_crossQt5.nsi
-
-Section "Avidemux Core" SecCore
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} "./Build-Info.txt"
- ${File} "./change.css"
- ${File} "./ChangeLog.html"
- ${File} ${BINARY_FOLDER}/libass-9.dll
- ${File} ${BINARY_FOLDER}/libcrypto-3-x64.dll
- ${File} ${BINARY_FOLDER}/libpcre2-8-*.dll
- ${File} ${BINARY_FOLDER}/libpcre2-16-*.dll
- ${File} ${BINARY_FOLDER}/libssl-3-x64.dll
-
- ${File} ${BINARY_FOLDER}/libexpat-1.dll
- ${File} ${BINARY_FOLDER}/libffi-*.dll
- ${File} ${BINARY_FOLDER}/libglib-2.0-0.dll
- ${File} ${BINARY_FOLDER}/libgobject-2.0-0.dll
- ${File} ${BINARY_FOLDER}/libharfbuzz-0.dll
- ${File} ${BINARY_FOLDER}/libiconv-2.dll
- ${File} ${BINARY_FOLDER}/libpng16-16.dll
- ${File} ${BINARY_FOLDER}/libsqlite3-0.dll
- ${File} ${BINARY_FOLDER}/libstdc++-6.dll
- ${File} ${BINARY_FOLDER}/libwinpthread-1.dll
- ${File} ${BINARY_FOLDER}/zlib1.dll
- ${File} ${BINARY_FOLDER}/libgcc_s_seh-1.dll
- ${File} ${BINARY_FOLDER}/libintl-8.dll
- ${File} ${BINARY_FOLDER}/SDL2.dll
- ${File} ${BINARY_FOLDER}/libfdk-aac-*.dll
-# Qt
- ${File} ${BINARY_FOLDER}/Qt5Core.dll
- ${File} ${BINARY_FOLDER}/Qt5Gui.dll
- ${File} ${BINARY_FOLDER}/Qt5Widgets.dll
- ${File} ${BINARY_FOLDER}/Qt5Network.dll
- ${File} ${BINARY_FOLDER}/Qt5WinExtras.dll
- SetOutPath $INSTDIR\styles
- ${File} ${BINARY_FOLDER}/styles/qwindowsvistastyle.dll
- SetOutPath $INSTDIR
- ${File} ${BINARY_FOLDER}/icudt*.dll
- ${File} ${BINARY_FOLDER}/icuin*.dll
- ${File} ${BINARY_FOLDER}/icuuc*.dll
- SetOutPath $INSTDIR\platforms
- ${File} ${BINARY_FOLDER}/platforms/qminimal.dll
- ${File} ${BINARY_FOLDER}/platforms/qwindows.dll
- SetOutPath $INSTDIR
-# adm
- ${File} ${BINARY_FOLDER}/libADM_audioParser6.dll
- ${File} ${BINARY_FOLDER}/libADM_core6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreAudio6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreAudioDevice6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreAudioEncoder6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreAudioFilterAPI6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreDemuxer6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreDemuxerMpeg6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreImage6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreImageLoader6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreJobs.dll
- ${File} ${BINARY_FOLDER}/libADM_coreMuxer6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreScript.dll
- ${File} ${BINARY_FOLDER}/libADM_coreSocket6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreSqlLight3.dll
- ${File} ${BINARY_FOLDER}/libADM_coreUI6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreUtils6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreVideoCodec6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreVideoEncoder6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreVideoFilter6.dll
- ${File} ${BINARY_FOLDER}/libADM_coreSubtitles6.dll
- ${File} ${SOURCE_FOLDER}/AUTHORS.
- ${File} ${SOURCE_FOLDER}/COPYING.
- ${File} ${SOURCE_FOLDER}/README.
- ${File} ${BINARY_FOLDER}/avcodec-*.dll
- ${File} ${BINARY_FOLDER}/avformat-*.dll
- ${File} ${BINARY_FOLDER}/avutil-*.dll
- ${File} ${BINARY_FOLDER}/postproc-*.dll
- ${File} ${BINARY_FOLDER}/swscale-*.dll
-
- ${File} ${BINARY_FOLDER}/libfribidi*.dll
- ${File} ${BINARY_FOLDER}/libfontconfig*.dll
- ${File} ${BINARY_FOLDER}/libfreetype*.dll
- ${File} ${BINARY_FOLDER}/libharfbuzz*.dll
- ${File} ${BINARY_FOLDER}/libbrotlicommon.dll
- ${File} ${BINARY_FOLDER}/libbrotlidec.dll
-
- WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
- WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
-
- ${If} ${AtMostWinVista}
- WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
- ${EndIf}
-SectionEnd
-!include avidemux_crossQt5Tail.nsi
+##########################
+# Included files
+##########################
+!define BUILD_BITS 64
+#!define BINARY_FOLDER /mingw/avidemux_64
+#!define DEV_FOLDER /mingw_dev/mingw/Release/
+!include avidemux_crossQt5.nsi
+
+Section "Avidemux Core" SecCore
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} "./Build-Info.txt"
+ ${File} "./change.css"
+ ${File} "./ChangeLog.html"
+ ${File} ${BINARY_FOLDER}/libass-9.dll
+ ${File} ${BINARY_FOLDER}/libcrypto-3-x64.dll
+ ${File} ${BINARY_FOLDER}/libpcre2-8-*.dll
+ ${File} ${BINARY_FOLDER}/libpcre2-16-*.dll
+ ${File} ${BINARY_FOLDER}/libssl-3-x64.dll
+
+ ${File} ${BINARY_FOLDER}/libexpat-1.dll
+ ${File} ${BINARY_FOLDER}/libffi-*.dll
+ ${File} ${BINARY_FOLDER}/libglib-2.0-0.dll
+ ${File} ${BINARY_FOLDER}/libgobject-2.0-0.dll
+ ${File} ${BINARY_FOLDER}/libharfbuzz-0.dll
+ ${File} ${BINARY_FOLDER}/libiconv-2.dll
+ ${File} ${BINARY_FOLDER}/libpng16-16.dll
+ ${File} ${BINARY_FOLDER}/libsqlite3-0.dll
+ ${File} ${BINARY_FOLDER}/libstdc++-6.dll
+ ${File} ${BINARY_FOLDER}/libwinpthread-1.dll
+ ${File} ${BINARY_FOLDER}/zlib1.dll
+ ${File} ${BINARY_FOLDER}/libgcc_s_seh-1.dll
+ ${File} ${BINARY_FOLDER}/libintl-8.dll
+ ${File} ${BINARY_FOLDER}/SDL2.dll
+ ${File} ${BINARY_FOLDER}/libfdk-aac-*.dll
+# Qt
+ ${File} ${BINARY_FOLDER}/Qt5Core.dll
+ ${File} ${BINARY_FOLDER}/Qt5Gui.dll
+ ${File} ${BINARY_FOLDER}/Qt5Widgets.dll
+ ${File} ${BINARY_FOLDER}/Qt5Network.dll
+ ${File} ${BINARY_FOLDER}/Qt5WinExtras.dll
+ SetOutPath $INSTDIR\styles
+ ${File} ${BINARY_FOLDER}/styles/qwindowsvistastyle.dll
+ SetOutPath $INSTDIR
+ ${File} ${BINARY_FOLDER}/icudt*.dll
+ ${File} ${BINARY_FOLDER}/icuin*.dll
+ ${File} ${BINARY_FOLDER}/icuuc*.dll
+ SetOutPath $INSTDIR\platforms
+ ${File} ${BINARY_FOLDER}/platforms/qminimal.dll
+ ${File} ${BINARY_FOLDER}/platforms/qwindows.dll
+ SetOutPath $INSTDIR
+# adm
+ ${File} ${BINARY_FOLDER}/libADM_audioParser6.dll
+ ${File} ${BINARY_FOLDER}/libADM_core6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreAudio6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreAudioDevice6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreAudioEncoder6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreAudioFilterAPI6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreDemuxer6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreDemuxerMpeg6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreImage6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreImageLoader6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreJobs.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreMuxer6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreScript.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreSocket6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreSqlLight3.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreUI6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreUtils6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreVideoCodec6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreVideoEncoder6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreVideoFilter6.dll
+ ${File} ${BINARY_FOLDER}/libADM_coreSubtitles6.dll
+ ${File} ${SOURCE_FOLDER}/AUTHORS.
+ ${File} ${SOURCE_FOLDER}/COPYING.
+ ${File} ${SOURCE_FOLDER}/README.
+ ${File} ${BINARY_FOLDER}/avcodec-*.dll
+ ${File} ${BINARY_FOLDER}/avformat-*.dll
+ ${File} ${BINARY_FOLDER}/avutil-*.dll
+ ${File} ${BINARY_FOLDER}/postproc-*.dll
+ ${File} ${BINARY_FOLDER}/swscale-*.dll
+
+ ${File} ${BINARY_FOLDER}/libfribidi*.dll
+ ${File} ${BINARY_FOLDER}/libfontconfig*.dll
+ ${File} ${BINARY_FOLDER}/libfreetype*.dll
+ ${File} ${BINARY_FOLDER}/libharfbuzz*.dll
+ ${File} ${BINARY_FOLDER}/libbrotlicommon.dll
+ ${File} ${BINARY_FOLDER}/libbrotlidec.dll
+
+ WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
+ WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
+
+ ${If} ${AtMostWinVista}
+ WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
+ ${EndIf}
+SectionEnd
+!include avidemux_crossQt5Tail.nsi
diff --git a/avidemux/winInstaller/avidemux_crossQt5.nsi b/avidemux/winInstaller/avidemux_crossQt5.nsi
index 280f196cf1..13a9834f88 100644
--- a/avidemux/winInstaller/avidemux_crossQt5.nsi
+++ b/avidemux/winInstaller/avidemux_crossQt5.nsi
@@ -1,401 +1,401 @@
-##########################
-# Included files
-##########################
-!addincludedir ${NSIDIR}
-!if ${BUILD_BITS} == 64
- !addplugindir ${NSIDIR}/plugin/amd64-unicode
-!else
- !addplugindir ${NSIDIR}/plugin/x86-unicode
-!endif
-
-!include Sections.nsh
-!include MUI2.nsh
-!include nsDialogs.nsh
-!include Memento.nsh
-!include FileFunc.nsh
-!include WinVer.nsh
-!include WordFunc.nsh
-!include AvidemuxVersion.nsh
-SetCompressor /SOLID lzma
-SetCompressorDictSize 96
-RequestExecutionLevel admin
-
-##########################
-# Defines
-##########################
-!define REVISION ${SVN_VERSION}
-!define EXEDIR "${NSIDIR}/install"
-
-!define PRODUCT_VERSION "${CORE_VERSION}.${POINT_RELEASE}.${SVN_VERSION}"
-!define PRODUCT_NAME "Avidemux ${CORE_VERSION} - ${BUILD_BITS} bits${EXTRA}"
-!define PRODUCT_FULLNAME "Avidemux ${PRODUCT_VERSION} (${BUILD_BITS}-bits${EXTRA} Release)"
-
-!if ${BUILD_BITS} == 64
- !define SHORTCUT_NAME "${PRODUCT_NAME}"
- !define REG_GROUPNAME "${PRODUCT_NAME} (${BUILD_BITS}-bit${EXTRA})"
-!else
- !define SHORTCUT_NAME "${PRODUCT_NAME} (${BUILD_BITS}-bit${EXTRA})"
- !define REG_GROUPNAME "${PRODUCT_NAME}"
-!endif
-
-!define REGKEY "SOFTWARE\${REG_GROUPNAME}"
-!define UNINST_REGKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_GROUPNAME}"
-!define COMPANY "Free Software Foundation"
-!define URL "http://www.avidemux.org"
-
-OutFile "${BINARY_FOLDER}/avidemux_${CORE_VERSION}.${POINT_RELEASE}${EXTRA} r${REVISION}_win${BUILD_BITS}.exe"
-Name "${PRODUCT_FULLNAME}"
-
-##########################
-# Memento defines
-##########################
-!define MEMENTO_REGISTRY_ROOT HKLM
-!define MEMENTO_REGISTRY_KEY "${REGKEY}"
-
-##########################
-# MUI defines
-##########################
-!define MUI_ICON "${SOURCE_FOLDER}/avidemux/common/xpm/adm.ico"
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_RIGHT
-!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}/PageHeader.bmp"
-!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGKEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
-!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Avidemux (${BUILD_BITS} bits${EXTRA})"
-!define MUI_STARTMENUPAGE_NODISABLE
-!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
-!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
-!define MUI_UNICON "${SOURCE_FOLDER}/avidemux/common/xpm/adm.ico"
-!define MUI_COMPONENTSPAGE_NODESC
-
-##########################
-# Variables
-##########################
-Var CreateDesktopIcon
-Var CreateStartMenuGroup
-Var CreateQuickLaunchIcon
-Var StartMenuGroup
-Var PreviousVersion
-Var PreviousVersionState
-Var ReinstallUninstall
-
-##########################
-# Installer pages
-##########################
-!define MUI_WELCOMEPAGE_TITLE "${PRODUCT_FULLNAME} Setup Wizard"
-!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_LICENSE "${NSIDIR}/License.rtf"
- Page custom ReinstallPage ReinstallPageLeave
-!insertmacro MUI_PAGE_COMPONENTS
-Page custom InstallOptionsPage
-!define MUI_PAGE_CUSTOMFUNCTION_PRE IsStartMenuRequired
-!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
-!insertmacro MUI_PAGE_DIRECTORY
-!define MUI_PAGE_CUSTOMFUNCTION_PRE ActivateInternalSections
-!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesPageShow
-!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesPageLeave
-!insertmacro MUI_PAGE_INSTFILES
-!define MUI_FINISHPAGE_RUN
-!define MUI_FINISHPAGE_RUN_FUNCTION RunAvidemux
-!define MUI_FINISHPAGE_RUN_TEXT "Run ${PRODUCT_NAME} now"
-!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\ChangeLog.html"
-!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Change Log now"
-!define MUI_FINISHPAGE_LINK "Visit the Avidemux website"
-!define MUI_FINISHPAGE_LINK_LOCATION "http://www.avidemux.org"
-!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfigureFinishPage
-!insertmacro MUI_PAGE_FINISH
-
-!define MUI_PAGE_CUSTOMFUNCTION_PRE un.ConfirmPagePre
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-!define MUI_PAGE_CUSTOMFUNCTION_PRE un.FinishPagePre
-!insertmacro MUI_UNPAGE_FINISH
-
-##########################
-# Installer languages
-##########################
-!insertmacro MUI_LANGUAGE English
-
-##########################
-# Installer attributes
-##########################
-!if ${BUILD_BITS} == 64
- InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
-!else
- InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
-!endif
-
-CRCCheck on
-XPStyle on
-ShowInstDetails nevershow
-ShowUninstDetails nevershow
-VIProductVersion ${PRODUCT_VERSION}
-VIAddVersionKey ProductName Avidemux
-VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
-VIAddVersionKey FileVersion ""
-VIAddVersionKey FileDescription ""
-VIAddVersionKey LegalCopyright ""
-InstallDirRegKey HKLM "${REGKEY}" Path
-BrandingText "Packaged by Mean/Gruntster"
-InstType Standard
-InstType Full
-#########################################
-#
-#########################################
-Function GetAfterChar
- Exch $0 ; chop char
- Exch
- Exch $1 ; input string
- Push $2
- Push $3
- StrCpy $2 0
- loop:
- IntOp $2 $2 - 1
- StrCpy $3 $1 1 $2
- StrCmp $3 "" 0 +3
- StrCpy $0 ""
- Goto exit2
- StrCmp $3 $0 exit1
- Goto loop
- exit1:
- IntOp $2 $2 + 1
- StrCpy $0 $1 "" $2
- exit2:
- Pop $3
- Pop $2
- Pop $1
- Exch $0 ; output
-FunctionEnd
-#####################################################################©
-!define StrReplace '!insertmacro "_Name"'
-
-##########################
-# Uninstaller macros
-##########################
-!insertmacro un.GetOptions
-!insertmacro un.GetParameters
-
-!define UninstallLogPath "$INSTDIR\uninstall.log"
-Var UninstallLogHandle
-
-; Uninstall log file missing.
-LangString UninstallLogMissing ${LANG_ENGLISH} "uninstall.log not found!$\r$\nUninstallation cannot proceed!"
-# Regexep Does not work with cross
-# Use only one file at a time
-!macro InstallFile FILEZ
- File "${FILEZ}"
- Push "${FILEZ}"
- Push "/"
- Call GetAfterChar
- Pop $R0
- FileWrite $UninstallLogHandle "$OUTDIR\$R0$\r$\n"
-!macroend
-!define File "!insertmacro InstallFile"
-
-!macro InstallFolder FILEREGEX
- File /r "${FILEREGEX}/*"
- Push "$OUTDIR"
- Call InstallFolderInternal
-!macroend
-!define Folder "!insertmacro InstallFolder"
-
-Function InstallFolderInternal
- Pop $9
- !define Index 'Line${__LINE__}'
- FindFirst $0 $1 "$9/*"
- StrCmp $0 "" "${Index}-End"
-"${Index}-Loop:"
- StrCmp $1 "" "${Index}-End"
- StrCmp $1 "." "${Index}-Next"
- StrCmp $1 ".." "${Index}-Next"
- IfFileExists "$9\$1\*" 0 "${Index}-Write"
- Push $0
- Push $9
- Push "$9\$1"
- Call InstallFolderInternal
- Pop $9
- Pop $0
- Goto "${Index}-Next"
-"${Index}-Write:"
- FileWrite $UninstallLogHandle "$9\$1$\r$\n"
-"${Index}-Next:"
- FindNext $0 $1
- Goto "${Index}-Loop"
-"${Index}-End:"
- !undef Index
-FunctionEnd
-
-; WriteUninstaller macro
-!macro WriteUninstaller Path
- WriteUninstaller "${Path}"
- FileWrite $UninstallLogHandle "${Path}$\r$\n"
-!macroend
-!define WriteUninstaller "!insertmacro WriteUninstaller"
-
-##########################
-# Macros
-##########################
-
-!macro InstallQtLanguage LANG_NAME LANG_CODE
- SetOverwrite on
-
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} installQt${LANG_CODE} endQt${LANG_CODE}
-
-installQt${LANG_CODE}:
- SetOutPath $INSTDIR\qt5\i18n
- ${File} qt5/i18n/avidemux_${LANG_CODE}.qm
- ${File} qt5/i18n/qt_${LANG_CODE}.qm
-
-endQt${LANG_CODE}:
-!macroend
-#
-!macro InstallDev xname
- SetOutPath $INSTDIR\include\avidemux\${API_VERSION}\${xname}
- ${File} ${DEV_FOLDER}/include/avidemux/${API_VERSION}/${xname}/*
-!macroend
-!macro InstallDevQt5 xname
- SetOutPath $INSTDIR\include\avidemux\${API_VERSION}\qt5\${xname}
- ${File} ${DEV_FOLDER}/include/avidemux/${API_VERSION}/qt5/${xname}/*
-!macroend
-
-
-
-##########################
-# Installer sections
-##########################
-Section -OpenLogFile
- CreateDirectory "$INSTDIR"
- FileOpen $UninstallLogHandle ${UninstallLogPath} a
- FileSeek $UninstallLogHandle 0 END
-SectionEnd
-Section "User interfaces" SecGrpUI
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${BINARY_FOLDER}/avidemux_cli.exe
- ${File} ${BINARY_FOLDER}/avidemux.exe
- ${File} ${BINARY_FOLDER}/avidemux_jobs.exe
- SetOutPath $INSTDIR\qt5\i18n
- ${File} ${BINARY_FOLDER}/qt5/i18n/*.qm
-SectionEnd
-# !!
-Section "Plugins" SecGrpPlugins
- SectionIn 1 2 RO
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDevices
- ${File} ${BINARY_FOLDER}/plugins/audioDevices/*.dll
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${BINARY_FOLDER}/plugins/audioDecoder/*.dll
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${BINARY_FOLDER}/plugins/audioEncoders/*.dll
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${BINARY_FOLDER}/plugins/demuxers/*.dll
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${BINARY_FOLDER}/plugins/muxers/*.dll
- SetOutPath $INSTDIR\plugins\scriptEngines
- ${File} ${BINARY_FOLDER}/plugins/scriptEngines/libADM_script_tinyPy.dll
- SetOutPath $INSTDIR\plugins\autoScripts
- ${Folder} ${BINARY_FOLDER}/plugins/autoScripts
- #
- SetOutPath $INSTDIR\plugins\videoDecoders
- ${File} ${BINARY_FOLDER}/plugins/videoDecoders/*.dll
- #
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${BINARY_FOLDER}/plugins/videoEncoders/*.dll
- #
- SetOutPath $INSTDIR\plugins\videoEncoders\qt5
- ${File} ${BINARY_FOLDER}/plugins/videoEncoders/qt5/*.dll
- #SetOutPath $INSTDIR\plugins\videoEncoders\cli
- #${File} ${BINARY_FOLDER}/plugins/videoEncoders/cli/*.dll
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${BINARY_FOLDER}/plugins/videoFilters/*.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt5
- ${File} ${BINARY_FOLDER}/plugins/videoFilters/qt5/*.dll
- SetOutPath $INSTDIR\plugins\videoFilters\cli
- ${File} ${BINARY_FOLDER}/plugins/videoFilters/cli/*.dll
- # Fonts
- SetOutPath $INSTDIR\etc\fonts
- ${Folder} ${BINARY_FOLDER}/etc/fonts
-SectionEnd
-Section "PluginsSettings" SecGrpPluginsSettings
- SectionIn 1 2 RO
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\pluginSettings\x264\3
- ${File} ${BINARY_FOLDER}/plugins/pluginSettings/x264/3/*.json
- #SetOutPath $INSTDIR\plugins\pluginSettings\x264\3
- #${File} ${BINARY_FOLDER}/plugins/pluginSettings/x264/3/*.json
-SectionEnd
-# !!
-Section "Avisynth_VapourSynth" SecGrpAvisynth
- SectionIn 2
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${BINARY_FOLDER}/avsproxy32.exe
- ${File} ${BINARY_FOLDER}/avsproxy64.exe
- #${File} ${BINARY_FOLDER}/avsproxy_gui.exe
- # TMP ${File} ${BINARY_FOLDER}/vsProxy.exe
- # TMP ${File} ${BINARY_FOLDER}/vsProxy_gui_qt5.exe
-SectionEnd
-#
-Section "ShaderDemo" SecShaderDemo
- SectionIn 1 2 RO
- SetOutPath $INSTDIR\shaderDemo
- SetOverwrite on
- ${File} ${BINARY_FOLDER}/plugins/shaderDemo/1/*.shader # FIXME
-SectionEnd
-#
-#
-Section "Support libs" SecGrpSupport
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${BINARY_FOLDER}/*.dll
-SectionEnd
-#
-Section "SDK (to write plugins)" SecGrpDev
- SectionIn 2
- SetOverwrite on
- SetOutPath $INSTDIR
- ${File} ${DEV_FOLDER}/*.dll.a
- SetOutPath $INSTDIR\include\avidemux\${API_VERSION}
- ${File} ${DEV_FOLDER}/include/avidemux/${API_VERSION}/*
- SetOutPath $INSTDIR\include\avidemux\${API_VERSION}
- ${File} ${DEV_FOLDER}/include/avidemux/${API_VERSION}/*
- !insertmacro InstallDev cmake
- !insertmacro InstallDev ADM_core
- !insertmacro InstallDev ADM_coreAudio
- !insertmacro InstallDev ADM_coreAudioDevice
- !insertmacro InstallDev ADM_coreAudioEncoder
- !insertmacro InstallDev ADM_coreAudioFilter
- !insertmacro InstallDev ADM_coreAudioParser
- !insertmacro InstallDev ADM_coreDemuxer
- !insertmacro InstallDev ADM_coreDemuxerMpeg
- !insertmacro InstallDev ADM_coreImage
- !insertmacro InstallDev ADM_coreImageLoader
- !insertmacro InstallDev ADM_coreJobs
- !insertmacro InstallDev ADM_coreMuxer
- !insertmacro InstallDev ADM_coreScript
- !insertmacro InstallDev ADM_coreSocket
- !insertmacro InstallDev ADM_coreSqlLight3
- !insertmacro InstallDev ADM_coreSubtitles
- !insertmacro InstallDev ADM_coreUI
- !insertmacro InstallDev ADM_coreUtils
- !insertmacro InstallDev ADM_coreVideoCodec
- !insertmacro InstallDev ADM_coreVideoEncoder
- !insertmacro InstallDev ADM_coreVideoFilter
-
- !insertmacro InstallDev libavcodec
- !insertmacro InstallDev libavformat
- !insertmacro InstallDev libavutil
- !insertmacro InstallDev libswscale
- !insertmacro InstallDev libpostproc
-
- !insertmacro InstallDev libpostproc
- !insertmacro InstallDev qt5
- !insertmacro InstallDevQt5 ADM_openGL
- !insertmacro InstallDevQt5 ADM_UIs
-
-SectionEnd
-
-
+##########################
+# Included files
+##########################
+!addincludedir ${NSIDIR}
+!if ${BUILD_BITS} == 64
+ !addplugindir ${NSIDIR}/plugin/amd64-unicode
+!else
+ !addplugindir ${NSIDIR}/plugin/x86-unicode
+!endif
+
+!include Sections.nsh
+!include MUI2.nsh
+!include nsDialogs.nsh
+!include Memento.nsh
+!include FileFunc.nsh
+!include WinVer.nsh
+!include WordFunc.nsh
+!include AvidemuxVersion.nsh
+SetCompressor /SOLID lzma
+SetCompressorDictSize 96
+RequestExecutionLevel admin
+
+##########################
+# Defines
+##########################
+!define REVISION ${SVN_VERSION}
+!define EXEDIR "${NSIDIR}/install"
+
+!define PRODUCT_VERSION "${CORE_VERSION}.${POINT_RELEASE}.${SVN_VERSION}"
+!define PRODUCT_NAME "Avidemux ${CORE_VERSION} - ${BUILD_BITS} bits${EXTRA}"
+!define PRODUCT_FULLNAME "Avidemux ${PRODUCT_VERSION} (${BUILD_BITS}-bits${EXTRA} Release)"
+
+!if ${BUILD_BITS} == 64
+ !define SHORTCUT_NAME "${PRODUCT_NAME}"
+ !define REG_GROUPNAME "${PRODUCT_NAME} (${BUILD_BITS}-bit${EXTRA})"
+!else
+ !define SHORTCUT_NAME "${PRODUCT_NAME} (${BUILD_BITS}-bit${EXTRA})"
+ !define REG_GROUPNAME "${PRODUCT_NAME}"
+!endif
+
+!define REGKEY "SOFTWARE\${REG_GROUPNAME}"
+!define UNINST_REGKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_GROUPNAME}"
+!define COMPANY "Free Software Foundation"
+!define URL "http://www.avidemux.org"
+
+OutFile "${BINARY_FOLDER}/avidemux_${CORE_VERSION}.${POINT_RELEASE}${EXTRA} r${REVISION}_win${BUILD_BITS}.exe"
+Name "${PRODUCT_FULLNAME}"
+
+##########################
+# Memento defines
+##########################
+!define MEMENTO_REGISTRY_ROOT HKLM
+!define MEMENTO_REGISTRY_KEY "${REGKEY}"
+
+##########################
+# MUI defines
+##########################
+!define MUI_ICON "${SOURCE_FOLDER}/avidemux/common/xpm/adm.ico"
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_RIGHT
+!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}/PageHeader.bmp"
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGKEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Avidemux (${BUILD_BITS} bits${EXTRA})"
+!define MUI_STARTMENUPAGE_NODISABLE
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
+!define MUI_UNICON "${SOURCE_FOLDER}/avidemux/common/xpm/adm.ico"
+!define MUI_COMPONENTSPAGE_NODESC
+
+##########################
+# Variables
+##########################
+Var CreateDesktopIcon
+Var CreateStartMenuGroup
+Var CreateQuickLaunchIcon
+Var StartMenuGroup
+Var PreviousVersion
+Var PreviousVersionState
+Var ReinstallUninstall
+
+##########################
+# Installer pages
+##########################
+!define MUI_WELCOMEPAGE_TITLE "${PRODUCT_FULLNAME} Setup Wizard"
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "${NSIDIR}/License.rtf"
+ Page custom ReinstallPage ReinstallPageLeave
+!insertmacro MUI_PAGE_COMPONENTS
+Page custom InstallOptionsPage
+!define MUI_PAGE_CUSTOMFUNCTION_PRE IsStartMenuRequired
+!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
+!insertmacro MUI_PAGE_DIRECTORY
+!define MUI_PAGE_CUSTOMFUNCTION_PRE ActivateInternalSections
+!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesPageShow
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesPageLeave
+!insertmacro MUI_PAGE_INSTFILES
+!define MUI_FINISHPAGE_RUN
+!define MUI_FINISHPAGE_RUN_FUNCTION RunAvidemux
+!define MUI_FINISHPAGE_RUN_TEXT "Run ${PRODUCT_NAME} now"
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\ChangeLog.html"
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Change Log now"
+!define MUI_FINISHPAGE_LINK "Visit the Avidemux website"
+!define MUI_FINISHPAGE_LINK_LOCATION "http://www.avidemux.org"
+!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfigureFinishPage
+!insertmacro MUI_PAGE_FINISH
+
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.ConfirmPagePre
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.FinishPagePre
+!insertmacro MUI_UNPAGE_FINISH
+
+##########################
+# Installer languages
+##########################
+!insertmacro MUI_LANGUAGE English
+
+##########################
+# Installer attributes
+##########################
+!if ${BUILD_BITS} == 64
+ InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
+!else
+ InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
+!endif
+
+CRCCheck on
+XPStyle on
+ShowInstDetails nevershow
+ShowUninstDetails nevershow
+VIProductVersion ${PRODUCT_VERSION}
+VIAddVersionKey ProductName Avidemux
+VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
+VIAddVersionKey FileVersion ""
+VIAddVersionKey FileDescription ""
+VIAddVersionKey LegalCopyright ""
+InstallDirRegKey HKLM "${REGKEY}" Path
+BrandingText "Packaged by Mean/Gruntster"
+InstType Standard
+InstType Full
+#########################################
+#
+#########################################
+Function GetAfterChar
+ Exch $0 ; chop char
+ Exch
+ Exch $1 ; input string
+ Push $2
+ Push $3
+ StrCpy $2 0
+ loop:
+ IntOp $2 $2 - 1
+ StrCpy $3 $1 1 $2
+ StrCmp $3 "" 0 +3
+ StrCpy $0 ""
+ Goto exit2
+ StrCmp $3 $0 exit1
+ Goto loop
+ exit1:
+ IntOp $2 $2 + 1
+ StrCpy $0 $1 "" $2
+ exit2:
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0 ; output
+FunctionEnd
+#####################################################################©
+!define StrReplace '!insertmacro "_Name"'
+
+##########################
+# Uninstaller macros
+##########################
+!insertmacro un.GetOptions
+!insertmacro un.GetParameters
+
+!define UninstallLogPath "$INSTDIR\uninstall.log"
+Var UninstallLogHandle
+
+; Uninstall log file missing.
+LangString UninstallLogMissing ${LANG_ENGLISH} "uninstall.log not found!$\r$\nUninstallation cannot proceed!"
+# Regexep Does not work with cross
+# Use only one file at a time
+!macro InstallFile FILEZ
+ File "${FILEZ}"
+ Push "${FILEZ}"
+ Push "/"
+ Call GetAfterChar
+ Pop $R0
+ FileWrite $UninstallLogHandle "$OUTDIR\$R0$\r$\n"
+!macroend
+!define File "!insertmacro InstallFile"
+
+!macro InstallFolder FILEREGEX
+ File /r "${FILEREGEX}/*"
+ Push "$OUTDIR"
+ Call InstallFolderInternal
+!macroend
+!define Folder "!insertmacro InstallFolder"
+
+Function InstallFolderInternal
+ Pop $9
+ !define Index 'Line${__LINE__}'
+ FindFirst $0 $1 "$9/*"
+ StrCmp $0 "" "${Index}-End"
+"${Index}-Loop:"
+ StrCmp $1 "" "${Index}-End"
+ StrCmp $1 "." "${Index}-Next"
+ StrCmp $1 ".." "${Index}-Next"
+ IfFileExists "$9\$1\*" 0 "${Index}-Write"
+ Push $0
+ Push $9
+ Push "$9\$1"
+ Call InstallFolderInternal
+ Pop $9
+ Pop $0
+ Goto "${Index}-Next"
+"${Index}-Write:"
+ FileWrite $UninstallLogHandle "$9\$1$\r$\n"
+"${Index}-Next:"
+ FindNext $0 $1
+ Goto "${Index}-Loop"
+"${Index}-End:"
+ !undef Index
+FunctionEnd
+
+; WriteUninstaller macro
+!macro WriteUninstaller Path
+ WriteUninstaller "${Path}"
+ FileWrite $UninstallLogHandle "${Path}$\r$\n"
+!macroend
+!define WriteUninstaller "!insertmacro WriteUninstaller"
+
+##########################
+# Macros
+##########################
+
+!macro InstallQtLanguage LANG_NAME LANG_CODE
+ SetOverwrite on
+
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} installQt${LANG_CODE} endQt${LANG_CODE}
+
+installQt${LANG_CODE}:
+ SetOutPath $INSTDIR\qt5\i18n
+ ${File} qt5/i18n/avidemux_${LANG_CODE}.qm
+ ${File} qt5/i18n/qt_${LANG_CODE}.qm
+
+endQt${LANG_CODE}:
+!macroend
+#
+!macro InstallDev xname
+ SetOutPath $INSTDIR\include\avidemux\${API_VERSION}\${xname}
+ ${File} ${DEV_FOLDER}/include/avidemux/${API_VERSION}/${xname}/*
+!macroend
+!macro InstallDevQt5 xname
+ SetOutPath $INSTDIR\include\avidemux\${API_VERSION}\qt5\${xname}
+ ${File} ${DEV_FOLDER}/include/avidemux/${API_VERSION}/qt5/${xname}/*
+!macroend
+
+
+
+##########################
+# Installer sections
+##########################
+Section -OpenLogFile
+ CreateDirectory "$INSTDIR"
+ FileOpen $UninstallLogHandle ${UninstallLogPath} a
+ FileSeek $UninstallLogHandle 0 END
+SectionEnd
+Section "User interfaces" SecGrpUI
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${BINARY_FOLDER}/avidemux_cli.exe
+ ${File} ${BINARY_FOLDER}/avidemux.exe
+ ${File} ${BINARY_FOLDER}/avidemux_jobs.exe
+ SetOutPath $INSTDIR\qt5\i18n
+ ${File} ${BINARY_FOLDER}/qt5/i18n/*.qm
+SectionEnd
+# !!
+Section "Plugins" SecGrpPlugins
+ SectionIn 1 2 RO
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDevices
+ ${File} ${BINARY_FOLDER}/plugins/audioDevices/*.dll
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${BINARY_FOLDER}/plugins/audioDecoder/*.dll
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${BINARY_FOLDER}/plugins/audioEncoders/*.dll
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${BINARY_FOLDER}/plugins/demuxers/*.dll
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${BINARY_FOLDER}/plugins/muxers/*.dll
+ SetOutPath $INSTDIR\plugins\scriptEngines
+ ${File} ${BINARY_FOLDER}/plugins/scriptEngines/libADM_script_tinyPy.dll
+ SetOutPath $INSTDIR\plugins\autoScripts
+ ${Folder} ${BINARY_FOLDER}/plugins/autoScripts
+ #
+ SetOutPath $INSTDIR\plugins\videoDecoders
+ ${File} ${BINARY_FOLDER}/plugins/videoDecoders/*.dll
+ #
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${BINARY_FOLDER}/plugins/videoEncoders/*.dll
+ #
+ SetOutPath $INSTDIR\plugins\videoEncoders\qt5
+ ${File} ${BINARY_FOLDER}/plugins/videoEncoders/qt5/*.dll
+ #SetOutPath $INSTDIR\plugins\videoEncoders\cli
+ #${File} ${BINARY_FOLDER}/plugins/videoEncoders/cli/*.dll
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${BINARY_FOLDER}/plugins/videoFilters/*.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt5
+ ${File} ${BINARY_FOLDER}/plugins/videoFilters/qt5/*.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\cli
+ ${File} ${BINARY_FOLDER}/plugins/videoFilters/cli/*.dll
+ # Fonts
+ SetOutPath $INSTDIR\etc\fonts
+ ${Folder} ${BINARY_FOLDER}/etc/fonts
+SectionEnd
+Section "PluginsSettings" SecGrpPluginsSettings
+ SectionIn 1 2 RO
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\pluginSettings\x264\3
+ ${File} ${BINARY_FOLDER}/plugins/pluginSettings/x264/3/*.json
+ #SetOutPath $INSTDIR\plugins\pluginSettings\x264\3
+ #${File} ${BINARY_FOLDER}/plugins/pluginSettings/x264/3/*.json
+SectionEnd
+# !!
+Section "Avisynth_VapourSynth" SecGrpAvisynth
+ SectionIn 2
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${BINARY_FOLDER}/avsproxy32.exe
+ ${File} ${BINARY_FOLDER}/avsproxy64.exe
+ #${File} ${BINARY_FOLDER}/avsproxy_gui.exe
+ # TMP ${File} ${BINARY_FOLDER}/vsProxy.exe
+ # TMP ${File} ${BINARY_FOLDER}/vsProxy_gui_qt5.exe
+SectionEnd
+#
+Section "ShaderDemo" SecShaderDemo
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR\shaderDemo
+ SetOverwrite on
+ ${File} ${BINARY_FOLDER}/plugins/shaderDemo/1/*.shader # FIXME
+SectionEnd
+#
+#
+Section "Support libs" SecGrpSupport
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${BINARY_FOLDER}/*.dll
+SectionEnd
+#
+Section "SDK (to write plugins)" SecGrpDev
+ SectionIn 2
+ SetOverwrite on
+ SetOutPath $INSTDIR
+ ${File} ${DEV_FOLDER}/*.dll.a
+ SetOutPath $INSTDIR\include\avidemux\${API_VERSION}
+ ${File} ${DEV_FOLDER}/include/avidemux/${API_VERSION}/*
+ SetOutPath $INSTDIR\include\avidemux\${API_VERSION}
+ ${File} ${DEV_FOLDER}/include/avidemux/${API_VERSION}/*
+ !insertmacro InstallDev cmake
+ !insertmacro InstallDev ADM_core
+ !insertmacro InstallDev ADM_coreAudio
+ !insertmacro InstallDev ADM_coreAudioDevice
+ !insertmacro InstallDev ADM_coreAudioEncoder
+ !insertmacro InstallDev ADM_coreAudioFilter
+ !insertmacro InstallDev ADM_coreAudioParser
+ !insertmacro InstallDev ADM_coreDemuxer
+ !insertmacro InstallDev ADM_coreDemuxerMpeg
+ !insertmacro InstallDev ADM_coreImage
+ !insertmacro InstallDev ADM_coreImageLoader
+ !insertmacro InstallDev ADM_coreJobs
+ !insertmacro InstallDev ADM_coreMuxer
+ !insertmacro InstallDev ADM_coreScript
+ !insertmacro InstallDev ADM_coreSocket
+ !insertmacro InstallDev ADM_coreSqlLight3
+ !insertmacro InstallDev ADM_coreSubtitles
+ !insertmacro InstallDev ADM_coreUI
+ !insertmacro InstallDev ADM_coreUtils
+ !insertmacro InstallDev ADM_coreVideoCodec
+ !insertmacro InstallDev ADM_coreVideoEncoder
+ !insertmacro InstallDev ADM_coreVideoFilter
+
+ !insertmacro InstallDev libavcodec
+ !insertmacro InstallDev libavformat
+ !insertmacro InstallDev libavutil
+ !insertmacro InstallDev libswscale
+ !insertmacro InstallDev libpostproc
+
+ !insertmacro InstallDev libpostproc
+ !insertmacro InstallDev qt5
+ !insertmacro InstallDevQt5 ADM_openGL
+ !insertmacro InstallDevQt5 ADM_UIs
+
+SectionEnd
+
+
diff --git a/avidemux/winInstaller/avidemux_nativeVcQt5.nsi b/avidemux/winInstaller/avidemux_nativeVcQt5.nsi
index 5ada7217b9..6863d40f66 100644
--- a/avidemux/winInstaller/avidemux_nativeVcQt5.nsi
+++ b/avidemux/winInstaller/avidemux_nativeVcQt5.nsi
@@ -1,116 +1,116 @@
-##########################
-# Included files
-##########################
-!define BUILD_BITS 64
-!include "avidemux_nativeQt5Common.nsi"
-
-Section "Avidemux Core" SecCore
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} .\Build-Info.txt
- ${File} .\change.css
- ${File} .\ChangeLog.html
-
-
- ${File} ${BINARY_FOLDER}\avcodec-58.dll
- #${File} ${BINARY_FOLDER}\avdevice-58.dll
- ${File} ${BINARY_FOLDER}\avformat-58.dll
- ${File} ${BINARY_FOLDER}\avutil-56.dll
- ${File} ${BINARY_FOLDER}\libwinpthread-1.dll
- ${File} ${BINARY_FOLDER}\libz-1.dll
- ${File} ${BINARY_FOLDER}\msvcp140.dll
- ${File} ${BINARY_FOLDER}\swscale-5.dll
- ${File} ${BINARY_FOLDER}\postproc-55.dll
-
- ${File} ${BINARY_FOLDER}\Qt5Core.dll
- ${File} ${BINARY_FOLDER}\Qt5Gui.dll
- ${File} ${BINARY_FOLDER}\Qt5Network.dll
- ${File} ${BINARY_FOLDER}\Qt5Widgets.dll
- ${File} ${BINARY_FOLDER}\Qt5WinExtras.dll
- ${File} ${BINARY_FOLDER}\sqlite3.dll
- ${File} ${BINARY_FOLDER}\vcruntime140.dll
-
- ${File} ${BINARY_FOLDER}\freetype.dll
- ${File} ${BINARY_FOLDER}\fribidi.dll
- ${File} ${BINARY_FOLDER}\opus.dll
-
- ${File} ${BINARY_FOLDER}\twolame.dll
-
- ${File} ${BINARY_FOLDER}\fdk-aac-1.dll
- ${File} ${BINARY_FOLDER}\aften.dll
- ${File} ${BINARY_FOLDER}\zlibd.dll
- ${File} ${BINARY_FOLDER}\zlib.dll
- ${File} ${BINARY_FOLDER}\libogg.dll
- ${File} ${BINARY_FOLDER}\libvorbis.dll
- ${File} ${BINARY_FOLDER}\libvorbisenc-2.dll
- ${File} ${BINARY_FOLDER}\libvorbisfile.dll
- ${File} ${BINARY_FOLDER}\libx264-146.dll
- ${File} ${BINARY_FOLDER}\libx265.dll
- ${File} ${BINARY_FOLDER}\xvidcore.dll
-
-# QT
- ${File} ${BINARY_FOLDER}\Qt5Core.dll
- ${File} ${BINARY_FOLDER}\Qt5Gui.dll
- ${File} ${BINARY_FOLDER}\Qt5Network.dll
-# ${File} ${BINARY_FOLDER}\Qt5OpenGL.dll
- ${File} ${BINARY_FOLDER}\Qt5Widgets.dll
- ${File} ${BINARY_FOLDER}\Qt5WinExtras.dll
- SetOutPath $INSTDIR\platforms
- ${File} ${BINARY_FOLDER}\platforms\qminimal.dll
- ${File} ${BINARY_FOLDER}\platforms\qwindows.dll
- SetOutPath $INSTDIR\styles
- ${File} ${BINARY_FOLDER}\styles\qwindowsvistastyle.dll
-
- SetOutPath $INSTDIR
-# adm
- ${File} ${BINARY_FOLDER}\ADM_audioParser6.dll
- ${File} ${BINARY_FOLDER}\ADM_core6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreAudio6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreAudioDevice6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreAudioEncoder6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreAudioFilterAPI6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreDemuxer6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreDemuxerMpeg6.dll
- #${File} ${BINARY_FOLDER}\ADM_coreDxva26.dll
- ${File} ${BINARY_FOLDER}\ADM_coreImage6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreImageLoader6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreJobs.dll
- ${File} ${BINARY_FOLDER}\ADM_coreMuxer6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreScript.dll
- ${File} ${BINARY_FOLDER}\ADM_coreSocket6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreSqlLight3.dll
- ${File} ${BINARY_FOLDER}\ADM_coreSubtitles6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreUI6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreUtils6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreVideoCodec6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreVideoEncoder6.dll
- ${File} ${BINARY_FOLDER}\ADM_coreVideoFilter6.dll
- ${File} ${BINARY_FOLDER}\*ADM_openGLQT56.dll
- ${File} ${BINARY_FOLDER}\*ADM_render6_cli.dll
- ${File} ${BINARY_FOLDER}\*ADM_render6_QT5.dll
- ${File} ${BINARY_FOLDER}\*ADM_UI_Cli6.dll
- ${File} ${BINARY_FOLDER}\*ADM_UIQT56.dll
- ${File} ${BINARY_FOLDER}\*ADM_coreDxva26.dll
- ${File} ${BINARY_FOLDER}\libADM_openGLQT56.dll
- ${File} ${BINARY_FOLDER}\libADM_render6_cli.dll
- ${File} ${BINARY_FOLDER}\libADM_render6_QT5.dll
- ${File} ${BINARY_FOLDER}\libADM_UI_Cli6.dll
- ${File} ${BINARY_FOLDER}\libADM_UIQT56.dll
- ${File} ${NSIDIR}\..\..\AUTHORS.
- ${File} ${NSIDIR}\..\..\COPYING.
- ${File} ${NSIDIR}\..\..\README.
- # Avs
- ${File} d:\avsProxy\avsproxy32.exe
- ${File} d:\avsProxy\avsproxy64.exe
-
-
- WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
- WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
-
- ${If} ${AtMostWinVista}
- WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
- ${EndIf}
-SectionEnd
-!include avidemux_nativeQt5Tail.nsi
-
+##########################
+# Included files
+##########################
+!define BUILD_BITS 64
+!include "avidemux_nativeQt5Common.nsi"
+
+Section "Avidemux Core" SecCore
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} .\Build-Info.txt
+ ${File} .\change.css
+ ${File} .\ChangeLog.html
+
+
+ ${File} ${BINARY_FOLDER}\avcodec-58.dll
+ #${File} ${BINARY_FOLDER}\avdevice-58.dll
+ ${File} ${BINARY_FOLDER}\avformat-58.dll
+ ${File} ${BINARY_FOLDER}\avutil-56.dll
+ ${File} ${BINARY_FOLDER}\libwinpthread-1.dll
+ ${File} ${BINARY_FOLDER}\libz-1.dll
+ ${File} ${BINARY_FOLDER}\msvcp140.dll
+ ${File} ${BINARY_FOLDER}\swscale-5.dll
+ ${File} ${BINARY_FOLDER}\postproc-55.dll
+
+ ${File} ${BINARY_FOLDER}\Qt5Core.dll
+ ${File} ${BINARY_FOLDER}\Qt5Gui.dll
+ ${File} ${BINARY_FOLDER}\Qt5Network.dll
+ ${File} ${BINARY_FOLDER}\Qt5Widgets.dll
+ ${File} ${BINARY_FOLDER}\Qt5WinExtras.dll
+ ${File} ${BINARY_FOLDER}\sqlite3.dll
+ ${File} ${BINARY_FOLDER}\vcruntime140.dll
+
+ ${File} ${BINARY_FOLDER}\freetype.dll
+ ${File} ${BINARY_FOLDER}\fribidi.dll
+ ${File} ${BINARY_FOLDER}\opus.dll
+
+ ${File} ${BINARY_FOLDER}\twolame.dll
+
+ ${File} ${BINARY_FOLDER}\fdk-aac-1.dll
+ ${File} ${BINARY_FOLDER}\aften.dll
+ ${File} ${BINARY_FOLDER}\zlibd.dll
+ ${File} ${BINARY_FOLDER}\zlib.dll
+ ${File} ${BINARY_FOLDER}\libogg.dll
+ ${File} ${BINARY_FOLDER}\libvorbis.dll
+ ${File} ${BINARY_FOLDER}\libvorbisenc-2.dll
+ ${File} ${BINARY_FOLDER}\libvorbisfile.dll
+ ${File} ${BINARY_FOLDER}\libx264-146.dll
+ ${File} ${BINARY_FOLDER}\libx265.dll
+ ${File} ${BINARY_FOLDER}\xvidcore.dll
+
+# QT
+ ${File} ${BINARY_FOLDER}\Qt5Core.dll
+ ${File} ${BINARY_FOLDER}\Qt5Gui.dll
+ ${File} ${BINARY_FOLDER}\Qt5Network.dll
+# ${File} ${BINARY_FOLDER}\Qt5OpenGL.dll
+ ${File} ${BINARY_FOLDER}\Qt5Widgets.dll
+ ${File} ${BINARY_FOLDER}\Qt5WinExtras.dll
+ SetOutPath $INSTDIR\platforms
+ ${File} ${BINARY_FOLDER}\platforms\qminimal.dll
+ ${File} ${BINARY_FOLDER}\platforms\qwindows.dll
+ SetOutPath $INSTDIR\styles
+ ${File} ${BINARY_FOLDER}\styles\qwindowsvistastyle.dll
+
+ SetOutPath $INSTDIR
+# adm
+ ${File} ${BINARY_FOLDER}\ADM_audioParser6.dll
+ ${File} ${BINARY_FOLDER}\ADM_core6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreAudio6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreAudioDevice6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreAudioEncoder6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreAudioFilterAPI6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreDemuxer6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreDemuxerMpeg6.dll
+ #${File} ${BINARY_FOLDER}\ADM_coreDxva26.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreImage6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreImageLoader6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreJobs.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreMuxer6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreScript.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreSocket6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreSqlLight3.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreSubtitles6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreUI6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreUtils6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreVideoCodec6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreVideoEncoder6.dll
+ ${File} ${BINARY_FOLDER}\ADM_coreVideoFilter6.dll
+ ${File} ${BINARY_FOLDER}\*ADM_openGLQT56.dll
+ ${File} ${BINARY_FOLDER}\*ADM_render6_cli.dll
+ ${File} ${BINARY_FOLDER}\*ADM_render6_QT5.dll
+ ${File} ${BINARY_FOLDER}\*ADM_UI_Cli6.dll
+ ${File} ${BINARY_FOLDER}\*ADM_UIQT56.dll
+ ${File} ${BINARY_FOLDER}\*ADM_coreDxva26.dll
+ ${File} ${BINARY_FOLDER}\libADM_openGLQT56.dll
+ ${File} ${BINARY_FOLDER}\libADM_render6_cli.dll
+ ${File} ${BINARY_FOLDER}\libADM_render6_QT5.dll
+ ${File} ${BINARY_FOLDER}\libADM_UI_Cli6.dll
+ ${File} ${BINARY_FOLDER}\libADM_UIQT56.dll
+ ${File} ${NSIDIR}\..\..\AUTHORS.
+ ${File} ${NSIDIR}\..\..\COPYING.
+ ${File} ${NSIDIR}\..\..\README.
+ # Avs
+ ${File} d:\avsProxy\avsproxy32.exe
+ ${File} d:\avsProxy\avsproxy64.exe
+
+
+ WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
+ WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
+
+ ${If} ${AtMostWinVista}
+ WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
+ ${EndIf}
+SectionEnd
+!include avidemux_nativeQt5Tail.nsi
+
diff --git a/avidemux/winInstaller/old/avidemux.nsi b/avidemux/winInstaller/old/avidemux.nsi
index 56a9f9419a..baa56b85f4 100644
--- a/avidemux/winInstaller/old/avidemux.nsi
+++ b/avidemux/winInstaller/old/avidemux.nsi
@@ -1,1816 +1,1816 @@
-##########################
-# Included files
-##########################
-!addincludedir ${NSIDIR}
-!addplugindir ${NSIDIR}\plugin
-
-!include Sections.nsh
-!include MUI2.nsh
-!include nsDialogs.nsh
-!include Memento.nsh
-!include FileFunc.nsh
-!include UAC.nsh
-!include WinVer.nsh
-!include WordFunc.nsh
-!include revision.nsh
-
-SetCompressor /SOLID lzma
-SetCompressorDictSize 96
-RequestExecutionLevel user
-
-##########################
-# Defines
-##########################
-
-!define CORE_VERSION "2.6"
-!define PRODUCT_VERSION "${CORE_VERSION}.1.${REVISION}"
-!define PRODUCT_NAME "Avidemux ${CORE_VERSION}"
-!define PRODUCT_FULLNAME "Avidemux ${PRODUCT_VERSION} (${BUILD_BITS}-bit beta)"
-
-!if ${BUILD_BITS} == 64
- !define SHORTCUT_NAME "${PRODUCT_NAME}"
- !define REG_GROUPNAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
-!else
- !define SHORTCUT_NAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
- !define REG_GROUPNAME "${PRODUCT_NAME}"
-!endif
-
-!define REGKEY "SOFTWARE\${REG_GROUPNAME}"
-!define UNINST_REGKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_GROUPNAME}"
-!define COMPANY "Free Software Foundation"
-!define URL "http://www.avidemux.org"
-
-!ifndef INST_GTK
-!ifndef INST_QT
-!define INST_GTK
-!define INST_QT
-!endif
-!endif
-
-!ifdef INST_GTK
-!ifdef INST_QT
-!define INST_BOTH
-!endif
-!endif
-
-!ifdef INST_BOTH
-OutFile "${EXEDIR}\avidemux_${CORE_VERSION}_r${REVISION}_full_win${BUILD_BITS}.exe"
-Name "${PRODUCT_FULLNAME} Full"
-!else ifdef INST_QT
-OutFile "${EXEDIR}\avidemux_${CORE_VERSION}_r${REVISION}_win${BUILD_BITS}.exe"
-Name "${PRODUCT_FULLNAME}"
-!else ifdef INST_GTK
-OutFile "${EXEDIR}\avidemux_${CORE_VERSION}_r${REVISION}_gtk_win${BUILD_BITS}.exe"
-Name "${PRODUCT_FULLNAME} GTK+"
-!endif
-
-##########################
-# Memento defines
-##########################
-!define MEMENTO_REGISTRY_ROOT HKLM
-!define MEMENTO_REGISTRY_KEY "${REGKEY}"
-
-##########################
-# MUI defines
-##########################
-!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-blue-full.ico"
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_RIGHT
-!ifdef INST_GTK
-!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}\PageHeaderGtk.bmp"
-!else
-!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}\PageHeader.bmp"
-!endif
-!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGKEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
-!define MUI_STARTMENUPAGE_DEFAULTFOLDER Avidemux
-!define MUI_STARTMENUPAGE_NODISABLE
-!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIDIR}\WelcomeFinishStrip.bmp"
-!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIDIR}\WelcomeFinishStrip.bmp"
-!define MUI_UNICON "${NSIDIR}\..\common\xpm\adm.ico"
-!define MUI_COMPONENTSPAGE_NODESC
-
-##########################
-# Variables
-##########################
-Var CreateDesktopIcon
-Var CreateStartMenuGroup
-Var CreateQuickLaunchIcon
-Var StartMenuGroup
-Var PreviousVersion
-Var PreviousVersionState
-Var ReinstallUninstall
-
-##########################
-# Installer pages
-##########################
-!define MUI_WELCOMEPAGE_TITLE "${PRODUCT_FULLNAME} Setup Wizard"
-!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_LICENSE "${NSIDIR}\License.rtf"
- Page custom ReinstallPage ReinstallPageLeave
-!ifdef INST_BOTH
-!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckSelectedUIs
-!endif
-!insertmacro MUI_PAGE_COMPONENTS
-Page custom InstallOptionsPage
-!define MUI_PAGE_CUSTOMFUNCTION_PRE IsStartMenuRequired
-!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
-!insertmacro MUI_PAGE_DIRECTORY
-!define MUI_PAGE_CUSTOMFUNCTION_PRE ActivateInternalSections
-!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesPageShow
-!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesPageLeave
-!insertmacro MUI_PAGE_INSTFILES
-!define MUI_FINISHPAGE_RUN
-!define MUI_FINISHPAGE_RUN_FUNCTION RunAvidemux
-!define MUI_FINISHPAGE_RUN_TEXT "Run ${PRODUCT_NAME} now"
-!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Change Log.html"
-!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Change Log now"
-!define MUI_FINISHPAGE_LINK "Visit the Avidemux Builds for Windows website"
-!define MUI_FINISHPAGE_LINK_LOCATION "http://avidemux.razorbyte.com.au/"
-!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfigureFinishPage
-!insertmacro MUI_PAGE_FINISH
-
-!define MUI_PAGE_CUSTOMFUNCTION_PRE un.ConfirmPagePre
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-!define MUI_PAGE_CUSTOMFUNCTION_PRE un.FinishPagePre
-!insertmacro MUI_UNPAGE_FINISH
-
-##########################
-# Installer languages
-##########################
-!insertmacro MUI_LANGUAGE English
-
-##########################
-# Installer attributes
-##########################
-!if ${BUILD_BITS} == 64
- InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
-!else
- InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
-!endif
-
-CRCCheck on
-XPStyle on
-ShowInstDetails nevershow
-ShowUninstDetails nevershow
-VIProductVersion ${PRODUCT_VERSION}
-VIAddVersionKey ProductName Avidemux
-VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
-VIAddVersionKey FileVersion ""
-VIAddVersionKey FileDescription ""
-VIAddVersionKey LegalCopyright ""
-InstallDirRegKey HKLM "${REGKEY}" Path
-BrandingText "Packaged by Gruntster"
-InstType Standard
-InstType Full
-
-##########################
-# Uninstaller macros
-##########################
-!insertmacro un.GetOptions
-!insertmacro un.GetParameters
-
-!define UninstallLogPath "$INSTDIR\uninstall.log"
-Var UninstallLogHandle
-
-; Uninstall log file missing.
-LangString UninstallLogMissing ${LANG_ENGLISH} "uninstall.log not found!$\r$\nUninstallation cannot proceed!"
-
-!macro InstallFile FILEREGEX
- File "${FILEREGEX}"
- !define Index 'Line${__LINE__}'
- ${GetFileName} "${FILEREGEX}" $R0
- FindFirst $0 $1 "$OUTDIR\$R0"
- StrCmp $0 "" "${Index}-End"
-"${Index}-Loop:"
- StrCmp $1 "" "${Index}-End"
- FileWrite $UninstallLogHandle "$OUTDIR\$1$\r$\n"
- FindNext $0 $1
- Goto "${Index}-Loop"
-"${Index}-End:"
- !undef Index
-!macroend
-!define File "!insertmacro InstallFile"
-
-!macro InstallFolder FILEREGEX
- File /r "${FILEREGEX}\*"
- Push "$OUTDIR"
- Call InstallFolderInternal
-!macroend
-!define Folder "!insertmacro InstallFolder"
-
-Function InstallFolderInternal
- Pop $9
- !define Index 'Line${__LINE__}'
- FindFirst $0 $1 "$9\*"
- StrCmp $0 "" "${Index}-End"
-"${Index}-Loop:"
- StrCmp $1 "" "${Index}-End"
- StrCmp $1 "." "${Index}-Next"
- StrCmp $1 ".." "${Index}-Next"
- IfFileExists "$9\$1\*" 0 "${Index}-Write"
- Push $0
- Push $9
- Push "$9\$1"
- Call InstallFolderInternal
- Pop $9
- Pop $0
- Goto "${Index}-Next"
-"${Index}-Write:"
- FileWrite $UninstallLogHandle "$9\$1$\r$\n"
-"${Index}-Next:"
- FindNext $0 $1
- Goto "${Index}-Loop"
-"${Index}-End:"
- !undef Index
-FunctionEnd
-
-; WriteUninstaller macro
-!macro WriteUninstaller Path
- WriteUninstaller "${Path}"
- FileWrite $UninstallLogHandle "${Path}$\r$\n"
-!macroend
-!define WriteUninstaller "!insertmacro WriteUninstaller"
-
-##########################
-# Macros
-##########################
-!macro InstallGtkLanguage LANG_NAME LANG_CODE
-!ifdef INST_GTK
- SetOverwrite on
-
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} installGtk${LANG_CODE} endGtk${LANG_CODE}
-
-installGtk${LANG_CODE}:
- SetOutPath $INSTDIR\share\locale\${LANG_CODE}\LC_MESSAGES
- ${File} share\locale\${LANG_CODE}\LC_MESSAGES\avidemux.mo
- ${File} share\locale\${LANG_CODE}\LC_MESSAGES\gtk20.mo
-
-endGtk${LANG_CODE}:
-!endif
-!macroend
-
-!macro InstallQtLanguage LANG_NAME LANG_CODE
-!ifdef INST_QT
- SetOverwrite on
-
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} installQt${LANG_CODE} endQt${LANG_CODE}
-
-installQt${LANG_CODE}:
- SetOutPath $INSTDIR\i18n
- ${File} i18n\avidemux_${LANG_CODE}.qm
- ${File} i18n\qt_${LANG_CODE}.qm
-
-endQt${LANG_CODE}:
-!endif
-!macroend
-
-##########################
-# Installer sections
-##########################
-Section -OpenLogFile
- CreateDirectory "$INSTDIR"
- FileOpen $UninstallLogHandle ${UninstallLogPath} a
- FileSeek $UninstallLogHandle 0 END
-SectionEnd
-
-Section "Avidemux Core" SecCore
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} "Build Info.txt"
- ${File} "Change Log.html"
- ${File} libexpat-1.dll
- ${File} libfreetype-6.dll
- ${File} libgcc_s_sjlj-1.dll
- ${File} libsqlite3-0.dll
- ${File} libstdc++-6.dll
- ${File} libwinpthread-1.dll
- ${File} zlib1.dll
- ${File} libADM_audioParser6.dll
- ${File} libADM_core6.dll
- ${File} libADM_coreAudio6.dll
- ${File} libADM_coreAudioDevice6.dll
- ${File} libADM_coreAudioEncoder6.dll
- ${File} libADM_coreAudioFilterAPI6.dll
- ${File} libADM_coreDemuxer6.dll
- ${File} libADM_coreDemuxerMpeg6.dll
- ${File} libADM_coreImage6.dll
- ${File} libADM_coreImageLoader6.dll
- ${File} libADM_coreJobs.dll
- ${File} libADM_coreMuxer6.dll
- ${File} libADM_coreScript.dll
- ${File} libADM_coreSocket6.dll
- ${File} libADM_coreSqlLight3.dll
- ${File} libADM_coreUI6.dll
- ${File} libADM_coreUtils6.dll
- ${File} libADM_coreVideoCodec6.dll
- ${File} libADM_coreVideoEncoder6.dll
- ${File} libADM_coreVideoFilter6.dll
- ${File} QtCore4.dll
- ${File} QtGui4.dll
- ${File} AUTHORS.
- ${File} COPYING.
- ${File} README.
- ${File} avcodec-*.dll
- ${File} avformat-*.dll
- ${File} avutil-*.dll
- ${File} postproc-*.dll
- ${File} swscale-*.dll
-
- WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
- WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
-
- ${If} ${AtMostWinVista}
- WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
- ${EndIf}
-SectionEnd
-
-SectionGroup /e "User interfaces" SecGrpUI
- ${MementoUnselectedSection} "Command Line" SecUiCli
- SectionIn 2
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} avidemux_cli.exe
- ${File} libADM_render6_cli.dll
- ${File} libADM_UI_Cli6.dll
- ${MementoSectionEnd}
-
-!ifdef INST_BOTH
- ${MementoUnselectedSection} GTK+ SecUiGtk
- SectionIn 2
-!else ifdef INST_GTK
- ${MementoSection} GTK+ SecUiGtk
- SectionIn 1 2 RO
-!endif
-!ifdef INST_BOTH | INST_GTK
- SetOverwrite on
- SetOutPath $INSTDIR\etc\gtk-2.0
- ${Folder} etc\gtk-2.0
- SetOutPath $INSTDIR\etc\pango
- ${Folder} etc\pango
- SetOutPath $INSTDIR\lib\gtk-2.0
- ${Folder} lib\gtk-2.0
- SetOutPath $INSTDIR\share\themes
- ${Folder} share\themes
- SetOutPath $INSTDIR
- ${File} avidemux_gtk.exe
- ${File} gtk2_prefs.exe
- ${File} intl.dll
- ${File} libADM_render_gtk.dll
- ${File} libADM_UIGtk.dll
- ${File} libatk-1.0-0.dll
- ${File} libcairo-2.dll
- ${File} libgdk_pixbuf-2.0-0.dll
- ${File} libgdk-win32-2.0-0.dll
- ${File} libgio-2.0-0.dll
- ${File} libglib-2.0-0.dll
- ${File} libgmodule-2.0-0.dll
- ${File} libgobject-2.0-0.dll
- ${File} libgthread-2.0-0.dll
- ${File} libgtk-win32-2.0-0.dll
- ${File} libpango-1.0-0.dll
- ${File} libpangocairo-1.0-0.dll
- ${File} libpangoft2-1.0-0.dll
- ${File} libpangowin32-1.0-0.dll
- ${File} libpng14-14.dll
- ${File} SDL.dll
- ${MementoSectionEnd}
-!endif
-
-!ifdef INST_QT
- ${MementoSection} Qt SecUiQt
-!ifdef INST_BOTH
- SectionIn 1 2
-!else
- SectionIn 1 2 RO
-!endif
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} avidemux.exe
- ${File} avidemux_jobs.exe
- ${File} libADM_render6_qt4.dll
- ${File} libADM_UIQT46.dll
- ${File} QtOpenGL4.dll
- ${MementoSectionEnd}
-!endif
-SectionGroupEnd
-
-SectionGroup "Audio Decoders" SecGrpAudioDecoder
- ${MementoSection} "µ-law" SecAudDecUlaw
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_ulaw.dll
- ${MementoSectionEnd}
- ${MementoSection} "AAC (FAAD)" SecAudDecFaad
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_faad.dll
- SetOutPath $INSTDIR
- ${File} libfaad2.dll
- ${MementoSectionEnd}
- ${MementoSection} "AAC, AC-3, ADPCM IMA AMV, DTS, E-AC-3, MP2, MP3, Nellymoser, QDesign, WMA (libavcodec)" SecAudDecAvcodec
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_lav.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (liba52)" SecAudDecA52
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_a52.dll
- ${MementoSectionEnd}
- ${MementoSection} "ADPCM IMA" SecAudDecImaAdpcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_ima_adpcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "ADPCM Microsoft" SecAudDecMsAdpcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_ms_adpcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "AMR-NB" SecAudDecOpencoreAmrNb
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_opencore_amrnb.dll
- SetOutPath $INSTDIR
- ${File} libopencore-amrnb-*.dll
- ${MementoSectionEnd}
- ${MementoSection} "AMR-WB" SecAudDecOpencoreAmrWb
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_opencore_amrwb.dll
- SetOutPath $INSTDIR
- ${File} libopencore-amrwb-*.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP2, MP3 (MAD)" SecAudDecMad
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_Mad.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vorbis" SecAudDecVorbis
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} plugins\audioDecoder\libADM_ad_vorbis.dll
- SetOutPath $INSTDIR
- ${File} libogg-0.dll
- ${File} libvorbis-0.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Audio Devices" SecGrpAudioDevice
- ${MementoSection} "Waveform" SecAudDevWaveform
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDevices
- ${File} plugins\audioDevices\libADM_av_win32.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Audio Encoders" SecGrpAudioEncoder
- ${MementoSection} "AAC (FAAC)" SecAudEncFaac
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_faac.dll
- SetOutPath $INSTDIR
- ${File} libfaac.dll
- ${MementoSectionEnd}
- ${MementoSection} "AAC (libavcodec)" SecAudEncLavAac
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_lav_aac.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (Aften)" SecAudDecAften
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_aften.dll
- SetOutPath $INSTDIR
- ${File} aften.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (libavcodec)" SecAudEncLavAc3
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_lav_ac3.dll
- ${MementoSectionEnd}
- #${MementoSection} "DTS (dcaenc)" SecAudDecDcaEnc
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\audioEncoders
- #${File} plugins\audioEncoders\libADM_ae_dcaenc.dll
- #SetOutPath $INSTDIR
- #${File} libdcaenc-0.dll
- #${MementoSectionEnd}
- ${MementoSection} "MP2 (libavcodec)" SecAudEncLavMp2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_lav_mp2.dll
- SetOutPath $INSTDIR
- ${File} libtwolame-*.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP2 (TwoLAME)" SecAudEncTwoLame
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_twolame.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP3" SecAudEncLame
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_lame.dll
- SetOutPath $INSTDIR
- ${File} libmp3lame-0.dll
- ${MementoSectionEnd}
- ${MementoSection} "PCM" SecAudEncPcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_pcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vorbis" SecAudEncVorbis
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} plugins\audioEncoders\libADM_ae_vorbis.dll
- SetOutPath $INSTDIR
- ${File} libogg-0.dll
- ${File} libvorbis-0.dll
- ${File} libvorbisenc-2.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Avisynth" SecGrpAvisynth
- ${MementoUnselectedSection} "Avisynth Proxy" SecAvsProxy
- SectionIn 2
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} avsproxy.exe
- ${File} avsproxy_gui.exe
- ${MementoSectionEnd}
- ${MementoUnselectedSection} "Avisynth Proxy Demuxer" SecDemuxAvisynth
- SectionIn 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_avsproxy.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Demuxers" SecGrpDemuxers
- ${MementoSection} "ASF" SecDemuxAsf
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_asf.dll
- ${MementoSectionEnd}
- ${MementoSection} "BMP, JPEG, PNG Images" SecDemuxImage
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_pic.dll
- ${MementoSectionEnd}
- ${MementoSection} "Flash Video" SecDemuxFlv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_flv.dll
- ${MementoSectionEnd}
- ${MementoSection} "Matroska" SecDemuxMatroska
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_matroska.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4" SecDemuxMp4
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_mp4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-PS" SecDemuxMpegPs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_ps.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-TS" SecDemuxMpegTs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_ts.dll
- ${MementoSectionEnd}
- ${MementoSection} "MXF" SecDemuxMxf
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_mxf.dll
- ${MementoSectionEnd}
- ${MementoSection} "OpenDML AVI" SecDemuxOpenDml
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} plugins\demuxers\libADM_dm_opendml.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Muxers" SecGrpMuxers
- ${MementoSection} "Dummy [Raw Audio/Video]" SecMuxDummy
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_dummy.dll
- ${MementoSectionEnd}
- ${MementoSection} "Flash Video" SecMuxLavFlv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_flv.dll
- ${MementoSectionEnd}
- ${MementoSection} "Matroska" SecMuxLavMatroska
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_Mkv.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4 (libavcodec)" SecMuxLavMp4
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_mp4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4 (MP4v2)" SecMuxMp4v2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_mp4v2.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-PS" SecMuxLavMpegPs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_ffPS.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-TS" SecMuxLavMpegTs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_ffTS.dll
- ${MementoSectionEnd}
- ${MementoSection} "OpenDML AVI" SecMuxOpenDml
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_avi.dll
- ${MementoSectionEnd}
- ${MementoSection} "Raw Video" SecMuxRaw
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} plugins\muxers\libADM_mx_raw.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Script Engines" SecGrpScriptEngine
- ${MementoSection} "QtScript" SecScriptQt
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR
- ${File} QtScript4.dll
- ${File} QtScriptTools4.dll
- SetOutPath $INSTDIR\plugins\scriptEngines
- ${File} plugins\scriptEngines\libADM_script_qt.dll
- SetOutPath $INSTDIR\help\QtScript
- ${Folder} help\QtScript
- ${MementoSectionEnd}
- ${MementoSection} "SpiderMonkey" SecScriptSpiderMonkey
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR
- ${File} nspr4.dll
- ${File} libjs.dll
- SetOutPath $INSTDIR\plugins\scriptEngines
- ${File} plugins\scriptEngines\libADM_script_spiderMonkey.dll
- ${MementoSectionEnd}
- ${MementoSection} "Tinypy" SecScriptTinypy
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\scriptEngines
- ${File} plugins\scriptEngines\libADM_script_tinyPy.dll
- SetOutPath $INSTDIR\plugins\autoScripts
- ${Folder} plugins\autoScripts
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Video Decoders" SecGrpVideoDecoder
- ${MementoSection} "VP8" SecVidDecVpx
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoDecoders
- ${File} plugins\videoDecoders\libADM_vd_vpx.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Video Encoders" SecGrpVideoEncoder
- ${MementoSection} "[Null]" SecVidEncNull
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_null.dll
- ${MementoSectionEnd}
- ${MementoSection} "Huffyuv, FFVHuff" SecVidEncLavHuffyuv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_huff.dll
- ${MementoSectionEnd}
- ${MementoSection} "JPEG" SecVidEncLavJpeg
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_jpeg.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-2" SecVidEncLavMpeg2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_ffMpeg2.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 ASP (libavcodec)" SecVidEncLavMpeg4asp
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_ffMpeg4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 ASP (Xvid)" SecVidEncXvid
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_xvid4.dll
- SetOutPath $INSTDIR
- ${File} xvidcore.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 AVC" SecVidEncX264
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
-
- !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
-InstallCli:
- ${File} plugins\videoEncoders\libADM_ve_x264_other.dll
-CheckGtk:
-!ifdef INST_GTK
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
-InstallGtk:
- ${File} plugins\videoEncoders\libADM_vidEnc_x264_Gtk.dll
-CheckQt:
-!endif
-!ifdef INST_QT
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
-InstallQt:
- ${File} plugins\videoEncoders\libADM_ve_x264_qt4.dll
-End:
-!endif
- SetOutPath $INSTDIR\plugins\pluginSettings\x264
- ${Folder} plugins\pluginSettings\x264
- SetOutPath $INSTDIR
- ${File} libx264-*.dll
- ${MementoSectionEnd}
- ${MementoSection} "PNG" SecVidEncLavPng
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_png.dll
- ${MementoSectionEnd}
- ${MementoSection} "Sorenson Spark" SecVidEncSorenson
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_ffFlv1.dll
- ${MementoSectionEnd}
- ${MementoSection} "YV12" SecVidEncYv12
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} plugins\videoEncoders\libADM_ve_yv12.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Video Filters" SecGrpVideoFilter
- SectionGroup "Transform Filters" SecGrpVideoFilterTransform
- ${MementoSection} "Add Black Borders" SecVidFltBlackBorders
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_addBorders.dll
- ${MementoSectionEnd}
- ${MementoSection} "Add Logo" SecVidFltLogo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_logo.dll
- ${MementoSectionEnd}
- ${MementoSection} "Blacken Borders" SecVidFltBlackenBorders
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_blackenBorders.dll
- ${MementoSectionEnd}
- ${MementoSection} "Change FPS" SecVidFltChangeFps
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_changeFps.dll
- ${MementoSectionEnd}
- ${MementoSection} "Crop" SecVidFltCrop
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
-InstallCli:
- ${File} plugins\videoFilters\libADM_vf_CropCli.dll
-CheckGtk:
-!ifdef INST_GTK
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
-InstallGtk:
- ${File} plugins\videoFilters\libADM_vf_CropGtk.dll
-CheckQt:
-!endif
-!ifdef INST_QT
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
-InstallQt:
- ${File} plugins\videoFilters\libADM_vf_cropQt4.dll
-End:
-!endif
- ${MementoSectionEnd}
- ${MementoSection} "Fade" SecVidFltFade
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_fadeToBlack.dll
- ${MementoSectionEnd}
- ${MementoSection} "Greyscale" SecVidFltLumaOnly
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_lumaOnly.dll
- ${MementoSectionEnd}
- ${MementoSection} "Horizontal Flip" SecVidFltHorizontalFlip
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_hf_hflip.dll
- ${MementoSectionEnd}
- ${MementoSection} "libswscale Resize" SecVidFltSwscaleResize
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
-InstallCli:
- ${File} plugins\videoFilters\libADM_vf_swscaleResize_cli.dll
-CheckGtk:
-!ifdef INST_GTK
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
-InstallGtk:
- ${File} plugins\videoFilters\libADM_vf_swscaleResize_gtk.dll
-CheckQt:
-!endif
-!ifdef INST_QT
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
-InstallQt:
- ${File} plugins\videoFilters\libADM_vf_swscaleResize_qt4.dll
-End:
-!endif
- ${MementoSectionEnd}
- ${MementoSection} "Resample FPS" SecVidFltResampleFps
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_resampleFps.dll
- ${MementoSectionEnd}
- ${MementoSection} "Rotate" SecVidFltRotate
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_rotate.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vertical Flip" SecVidFltVerticalFlip
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_vflip.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Interlacing Filters" SecGrpVideoFilterInterlacing
- ${MementoSection} "Decomb Decimate" SecVidFltDecombDecimate
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_decimate.dll
- ${MementoSectionEnd}
- ${MementoSection} "Decomb Telecide" SecVidFltDecombTelecide
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_telecide.dll
- ${MementoSectionEnd}
- ${MementoSection} "DGBob" SecVidFltDgbob
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_DgBob.dll
- ${MementoSectionEnd}
- ${MementoSection} "Horizontal Stack Fields" SecVidFltHzStackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_hzstackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Kernel Deint" SecVidFltKernelDeint
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_kernelDeint.dll
- ${MementoSectionEnd}
- ${MementoSection} "libavcodec Deinterlacers" SecVidFltLavDeinterlacers
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_lavDeint.dll
- ${MementoSectionEnd}
- ${MementoSection} "Merge Fields" SecVidFltMergeFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_mergeField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Separate Fields" SecVidFltSeparateFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_separateField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Stack Fields" SecVidFltStackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_stackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Unstack Fields" SecVidFltUnstackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_unstackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Yadif" SecVidFltYadif
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_yadif.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Colour Filters" SecGrpVideoFilterColour
- ${MementoSection} "Avisynth Colour YUV" SecVidFltAvisynthColourYuv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_colorYuv.dll
- ${MementoSectionEnd}
- ${MementoSection} "ChromaShift" SecVidFltChromaShift
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
-InstallCli:
- ${File} plugins\videoFilters\libADM_vf_chromaShiftCli.dll
-CheckGtk:
-!ifdef INST_GTK
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
-InstallGtk:
- ${File} plugins\videoFilters\libADM_vf_chromaShiftGtk.dll
-CheckQt:
-!endif
-!ifdef INST_QT
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
-InstallQt:
- ${File} plugins\videoFilters\libADM_vf_chromaShiftQt4.dll
-End:
-!endif
- ${MementoSectionEnd}
- ${MementoSection} "Contrast" SecVidFltContrast
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
-InstallCli:
- ${File} plugins\videoFilters\libADM_vf_contrastCli.dll
-CheckGtk:
-!ifdef INST_GTK
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
-InstallGtk:
- ${File} plugins\videoFilters\libADM_vf_contrastGtk.dll
-CheckQt:
-!endif
-!ifdef INST_QT
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
-InstallQt:
- ${File} plugins\videoFilters\libADM_vf_contrastQt4.dll
-End:
-!endif
- ${MementoSectionEnd}
- ${MementoSection} "MPlater Eq2" SecVidFltMplayerEq2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
-InstallCli:
- ${File} plugins\videoFilters\libADM_vf_eq2Cli.dll
-CheckGtk:
-!ifdef INST_GTK
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
-InstallGtk:
- ${File} plugins\videoFilters\libADM_vf_eq2Gtk.dll
-CheckQt:
-!endif
-!ifdef INST_QT
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
-InstallQt:
- ${File} plugins\videoFilters\libADM_vf_eq2Qt4.dll
-End:
-!endif
- ${MementoSectionEnd}
- ${MementoSection} "MPlater Hue" SecVidFltMplayerHue
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
-InstallCli:
- ${File} plugins\videoFilters\libADM_vf_HueCli.dll
-CheckGtk:
-!ifdef INST_GTK
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
-InstallGtk:
- ${File} plugins\videoFilters\libADM_vf_HueGtk.dll
-CheckQt:
-!endif
-!ifdef INST_QT
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
-InstallQt:
- ${File} plugins\videoFilters\libADM_vf_HueQt4.dll
-End:
-!endif
- ${MementoSectionEnd}
- ${MementoSection} "Remove Plane" SecVidFltRemovePlane
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_removePlane.dll
- ${MementoSectionEnd}
- ${MementoSection} "Swap U and V" SecVidFltSwapUandV
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_swapUV.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Noise Filters" SecGrpVideoFilterNoise
- ${MementoSection} "FluxSmooth" SecVidFltFluxSmooth
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_FluxSmooth.dll
- ${MementoSectionEnd}
- ${MementoSection} "Gaussian Convolution" SecVidFltGauss
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_gauss.dll
- ${MementoSectionEnd}
- ${MementoSection} "Large Median (5x5)" SecVidFltMediam5x5
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_largeMedian.dll
- ${MementoSectionEnd}
- ${MementoSection} "Mean Convolution" SecVidFltMean
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_mean.dll
- ${MementoSectionEnd}
- ${MementoSection} "Median Convolution" SecVidFltMedian
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_median.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Denoise 3D" SecVidFltMPlayerDenoise3d
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_denoise3d.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Denoise 3D HQ" SecVidFltMPlayerDenoise3dHq
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_denoise3dhq.dll
- ${MementoSectionEnd}
- ${MementoSection} "MSharpen" SecVidFltMSharpen
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_msharpen.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Sharpness Filters" SecGrpVideoFilterSharpness
- ${MementoSection} "asharp" SecVidFltAsharp
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_asharpQt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Delogo" SecVidFltMPlayerDelogo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_mpdelogoQt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Sharpen" SecVidFltSharpen
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_sharpen.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Subtitle Filters" SecGrpVideoFilterSubtitle
- ${MementoSection} "ASS, SSA" SecVidFltAssSsa
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_ssa.dll
- SetOutPath $INSTDIR
- ${File} libfribidi-0.dll
- ${File} libfontconfig-1.dll
- SetOutPath $INSTDIR\etc\fonts
- ${Folder} etc\fonts
- ${MementoSectionEnd}
- SectionGroupEnd
- #SectionGroup "OpenGL Filters" SecGrpVideoFilterOpenGl
- #${MementoSection} "Fragment Shader" SecVidFltOpenGlFragmentShader
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} plugins\videoFilters\libADM_vf_sampleGlFrag2.dll
- #${MementoSectionEnd}
- #${MementoSection} "Read Back Benchmark" SecVidFltOpenGlReadBack
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} plugins\videoFilters\libADM_vf_glBenchmark.dll
- #${MementoSectionEnd}
- #${MementoSection} "Resize" SecVidFltOpenGlResize
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} plugins\videoFilters\libADM_vf_glResize.dll
- #${MementoSectionEnd}
- #${MementoSection} "Rotate" SecVidFltOpenGlRotate
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} plugins\videoFilters\libADM_vf_rotateGlFrag2.dll
- #${MementoSectionEnd}
- #${MementoSection} "Wave" SecVidFltOpenGlWave
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} plugins\videoFilters\libADM_vf_sampleGlVertex.dll
- #${MementoSectionEnd}
- #SectionGroupEnd
- SectionGroup "Miscellaneous Filters" SecGrpVideoFilterMiscellaneous
- ${MementoSection} "Print Information" SecVidFltPrintInfo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} plugins\videoFilters\libADM_vf_printInfo.dll
- ${MementoSectionEnd}
- SectionGroupEnd
-SectionGroupEnd
-
-${MementoSection} "-Start menu Change Log" SecStartMenuChangeLog
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk" "$INSTDIR\Change Log.html"
- !insertmacro MUI_STARTMENU_WRITE_END
-${MementoSectionEnd}
-
-${MementoSection} "-Start menu GTK+" SecStartMenuGtk
-!ifdef INST_GTK
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME} GTK+.lnk" $INSTDIR\avidemux_gtk.exe
- !insertmacro MUI_STARTMENU_WRITE_END
-!endif
-${MementoSectionEnd}
-
-${MementoSection} "-Start menu Qt" SecStartMenuQt
-!ifdef INST_QT
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
- !insertmacro MUI_STARTMENU_WRITE_END
-!endif
-${MementoSectionEnd}
-
-${MementoSection} "-Start menu AVS Proxy GUI" SecStartMenuAvsProxyGui
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk" "$INSTDIR\avsproxy_gui.exe"
- !insertmacro MUI_STARTMENU_WRITE_END
-${MementoSectionEnd}
-
-${MementoSection} "-Quick Launch GTK+" SecQuickLaunchGtk
-!ifdef INST_GTK
- SetOutPath $INSTDIR
- CreateShortcut "$QUICKLAUNCH\${SHORTCUT_NAME} GTK+.lnk" $INSTDIR\avidemux_gtk.exe
-!endif
-${MementoSectionEnd}
-
-${MementoSection} "-Quick Launch Qt" SecQuickLaunchQt
-!ifdef INST_QT
- SetOutPath $INSTDIR
- CreateShortcut "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
-!endif
-${MementoSectionEnd}
-
-${MementoSection} "-Desktop GTK+" SecDesktopGtk
-!ifdef INST_GTK
- SetOutPath $INSTDIR
- CreateShortcut "$DESKTOP\${SHORTCUT_NAME} GTK+.lnk" $INSTDIR\avidemux_gtk.exe
-!endif
-${MementoSectionEnd}
-
-${MementoSection} "-Desktop Qt" SecDesktopQt
-!ifdef INST_QT
- SetOutPath $INSTDIR
- CreateShortcut "$DESKTOP\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
-!endif
-${MementoSectionEnd}
-
-${MementoSectionDone}
-
-Section -post SecUninstaller
- SectionIn 1 2
- WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
- WriteRegStr HKLM "${REGKEY}" Version ${PRODUCT_VERSION}
- SetOutPath $INSTDIR
- WriteUninstaller $INSTDIR\uninstall.exe
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayName "${SHORTCUT_NAME}"
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayVersion "${PRODUCT_VERSION}"
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayIcon $INSTDIR\uninstall.exe
- WriteRegStr HKLM "${UNINST_REGKEY}" UninstallString $INSTDIR\uninstall.exe
- WriteRegDWORD HKLM "${UNINST_REGKEY}" NoModify 1
- WriteRegDWORD HKLM "${UNINST_REGKEY}" NoRepair 1
-SectionEnd
-
-Section -CloseLogFile
- FileClose $UninstallLogHandle
- SetFileAttributes ${UninstallLogPath} HIDDEN
-SectionEnd
-
-Section Uninstall
- !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
-
-!ifdef INST_GTK
- Delete /REBOOTOK "$QUICKLAUNCH\${SHORTCUT_NAME} GTK+.lnk"
- Delete /REBOOTOK "$DESKTOP\${SHORTCUT_NAME} GTK+.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME} GTK+.lnk"
-!endif
-
-!ifdef INST_QT
- Delete /REBOOTOK "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk"
- Delete /REBOOTOK "$DESKTOP\${SHORTCUT_NAME}.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk"
-!endif
-
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk"
- RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
- DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
-
- DeleteRegKey HKLM "${UNINST_REGKEY}"
- DeleteRegValue HKLM "${REGKEY}" Path
- DeleteRegValue HKLM "${REGKEY}" CreateDesktopIcon
- DeleteRegValue HKLM "${REGKEY}" CreateStartMenuGroup
- DeleteRegValue HKLM "${REGKEY}" CreateQuickLaunchIcon
- DeleteRegKey /IfEmpty HKLM "${REGKEY}"
-
- FileOpen $UninstallLogHandle "${UninstallLogPath}" r
-UninstallLoop:
- ClearErrors
- FileRead $UninstallLogHandle $R0
- IfErrors UninstallEnd
- Push $R0
- Call un.TrimNewLines
- Pop $R0
- Delete "$R0"
- Goto UninstallLoop
-UninstallEnd:
- FileClose $UninstallLogHandle
- Delete "${UninstallLogPath}"
- Delete "$INSTDIR\uninstall.exe"
- Push "\"
- Call un.RemoveEmptyDirs
- RMDir "$INSTDIR"
-SectionEnd
-
-##########################
-# Installer functions
-##########################
-Function .onInit
-UAC_Elevate:
- !insertmacro UAC_RunElevated
- StrCmp 1223 $0 UAC_ElevationAborted
- StrCmp 0 $0 0 UAC_Err
- StrCmp 1 $1 0 UAC_Success
- Quit
-
-UAC_Err:
- MessageBox MB_ICONSTOP "Unable to elevate, error $0"
- Abort
-
-UAC_ElevationAborted:
- Abort
-
-UAC_Success:
- StrCmp 1 $3 +4
- StrCmp 3 $1 0 UAC_ElevationAborted
- MessageBox MB_ICONSTOP "This installer requires admin access."
- Goto UAC_Elevate
-
- Call LoadPreviousSettings
- ReadRegStr $PreviousVersion HKLM "${REGKEY}" Version
-
- ${If} $PreviousVersion != ""
- ${VersionCompare} ${PRODUCT_VERSION} $PreviousVersion $PreviousVersionState
- ${EndIf}
-
- InitPluginsDir
- SetShellVarContext all
-FunctionEnd
-
-Function .onInstSuccess
- ${MementoSectionSave}
-FunctionEnd
-
-Function LoadPreviousSettings
- ${MementoSectionRestore}
- !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
-
-#checkStartMenuGtk:
- !insertmacro SectionFlagIsSet ${SecStartMenuGtk} ${SF_SELECTED} enableStartMenu checkStartMenuQt
-checkStartMenuQt:
- !insertmacro SectionFlagIsSet ${SecStartMenuQt} ${SF_SELECTED} enableStartMenu checkDesktopGtk
-
-enableStartMenu:
- ReadRegStr $CreateStartMenuGroup HKLM "${REGKEY}" CreateStartMenuGroup
-
- ${If} $CreateStartMenuGroup == ""
- StrCpy $CreateStartMenuGroup 1
- ${EndIf}
-
-checkDesktopGtk:
- !insertmacro SectionFlagIsSet ${SecDesktopGtk} ${SF_SELECTED} enableDesktop checkDesktopQt
-checkDesktopQt:
- !insertmacro SectionFlagIsSet ${SecDesktopQt} ${SF_SELECTED} enableDesktop checkQuickLaunchGtk
-
-enableDesktop:
- ReadRegStr $CreateDesktopIcon HKLM "${REGKEY}" CreateDesktopIcon
-
- ${If} $CreateDesktopIcon == ""
- StrCpy $CreateDesktopIcon 1
- ${EndIf}
-
-checkQuickLaunchGtk:
- !insertmacro SectionFlagIsSet ${SecQuickLaunchGtk} ${SF_SELECTED} enableQuickLaunch checkQuickLaunchQt
-checkQuickLaunchQt:
- !insertmacro SectionFlagIsSet ${SecQuickLaunchQt} ${SF_SELECTED} enableQuickLaunch end
-
-enableQuickLaunch:
- ${If} ${AtMostWinVista}
- ReadRegStr $CreateQuickLaunchIcon HKLM "${REGKEY}" CreateQuickLaunchIcon
-
- ${If} $CreateQuickLaunchIcon == ""
- StrCpy $CreateQuickLaunchIcon 1
- ${EndIf}
- ${EndIf}
-
-end:
-FunctionEnd
-
-Function RunUninstaller
- ReadRegStr $R1 HKLM "${UNINST_REGKEY}" "UninstallString"
-
- ${If} $R1 == ""
- Return
- ${EndIf}
-
- ;Run uninstaller
- HideWindow
- ClearErrors
-
- ${If} $PreviousVersionState == 0
- ${AndIf} $ReinstallUninstall == 1
- ExecWait '$R1 _?=$INSTDIR'
- ${Else}
- ExecWait '$R1 /frominstall _?=$INSTDIR'
- ${EndIf}
-
- IfErrors NoRemoveUninstaller
- IfFileExists "$INSTDIR\uninstall.exe" 0 NoRemoveUninstaller
- Delete "$R1"
- RMDir $INSTDIR
-
-NoRemoveUninstaller:
-FunctionEnd
-
-!ifdef INST_BOTH
-Function CheckSelectedUIs
- !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_SELECTED} end checkPartial
-checkPartial:
- !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_PSELECTED} end displayError
-displayError:
- MessageBox MB_OK|MB_ICONSTOP "At least one User Interface must be selected."
- Abort
-end:
-FunctionEnd
-!endif
-
-LangString INSTALL_OPTS_PAGE_TITLE ${LANG_ENGLISH} "Choose Install Options"
-LangString INSTALL_OPTS_PAGE_SUBTITLE ${LANG_ENGLISH} "Choose where to install Avidemux icons."
-Var dlgInstallOptions
-Var lblCreateIcons
-Var chkDesktop
-Var chkStartMenu
-Var chkQuickLaunch
-
-Function InstallOptionsPage
- Call IsInstallOptionsRequired
- !insertmacro MUI_HEADER_TEXT "$(INSTALL_OPTS_PAGE_TITLE)" "$(INSTALL_OPTS_PAGE_SUBTITLE)"
-
- nsDialogs::Create 1018
- Pop $dlgInstallOptions
-
- ${If} $dlgInstallOptions == error
- Abort
- ${EndIf}
-
- ${NSD_CreateLabel} 0 0u 100% 12u "Create icons for Avidemux:"
- Pop $lblCreateIcons
-
- ${NSD_CreateCheckBox} 0 18u 100% 12u "On my &Desktop"
- Pop $chkDesktop
- ${NSD_SetState} $chkDesktop $CreateDesktopIcon
- ${NSD_OnClick} $chkDesktop UpdateInstallOptions
-
- ${NSD_CreateCheckBox} 0 36u 100% 12u "In my &Start Menu Programs folder"
- Pop $chkStartMenu
- ${NSD_SetState} $chkStartMenu $CreateStartMenuGroup
- ${NSD_OnClick} $chkStartMenu UpdateInstallOptions
-
- ${If} ${AtMostWinVista}
- ${NSD_CreateCheckBox} 0 54u 100% 12u "In my &Quick Launch bar"
- Pop $chkQuickLaunch
- ${NSD_SetState} $chkQuickLaunch $CreateQuickLaunchIcon
- ${NSD_OnClick} $chkQuickLaunch UpdateInstallOptions
- ${EndIf}
-
- nsDialogs::Show
-FunctionEnd
-
-Function UpdateInstallOptions
- ${NSD_GetState} $chkDesktop $CreateDesktopIcon
- ${NSD_GetState} $chkStartMenu $CreateStartMenuGroup
- ${NSD_GetState} $chkQuickLaunch $CreateQuickLaunchIcon
-FunctionEnd
-
-Function IsInstallOptionsRequired
-!ifdef INST_GTK
- !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} end checkQt
-checkQt:
-!ifndef INST_BOTH
-Goto end
-!endif
-!endif
-!ifdef INST_QT
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} end resetOptions
-resetOptions:
-!endif
-
- StrCpy $CreateDesktopIcon 0
- StrCpy $CreateStartMenuGroup 0
- StrCpy $CreateQuickLaunchIcon 0
- Abort
-
-end:
-FunctionEnd
-
-Function IsStartMenuRequired
- StrCmp $CreateStartMenuGroup 1 +2
- Abort
-FunctionEnd
-
-Function ActivateInternalSections
- #AVS Proxy GUI shortcut:
- SectionGetFlags ${SecAvsProxy} $0
- IntOp $0 $0 & ${SF_SELECTED}
- IntOp $0 $0 & $CreateStartMenuGroup
- SectionSetFlags ${SecStartMenuAvsProxyGui} $0
-
- #Change Log shortcut:
- SectionSetFlags ${SecStartMenuChangeLog} $CreateStartMenuGroup
-
-!ifdef INST_GTK
- #GTK shortcuts:
- SectionGetFlags ${SecUiGtk} $0
- IntOp $0 $0 & ${SF_SELECTED}
-
- IntOp $1 $0 & $CreateDesktopIcon
- SectionSetFlags ${SecDesktopGtk} $1
-
- IntOp $1 $0 & $CreateQuickLaunchIcon
- SectionSetFlags ${SecQuickLaunchGtk} $1
-
- IntOp $1 $0 & $CreateStartMenuGroup
- SectionSetFlags ${SecStartMenuGtk} $1
-!endif
-
-!ifdef INST_QT
- #Qt shortcuts:
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
-
- IntOp $1 $0 & $CreateDesktopIcon
- SectionSetFlags ${SecDesktopQt} $1
-
- IntOp $1 $0 & $CreateQuickLaunchIcon
- SectionSetFlags ${SecQuickLaunchQt} $1
-
- IntOp $1 $0 & $CreateStartMenuGroup
- SectionSetFlags ${SecStartMenuQt} $1
-!endif
-FunctionEnd
-
-Function InstFilesPageShow
- ${If} $ReinstallUninstall != ""
- Call RunUninstaller
- BringToFront
- ${EndIf}
-FunctionEnd
-
-Function InstFilesPageLeave
- ; Don't advance automatically if details expanded
- FindWindow $R0 "#32770" "" $HWNDPARENT
- GetDlgItem $R0 $R0 1016
- System::Call user32::IsWindowVisible(i$R0)i.s
- Pop $R0
-
- StrCmp $R0 0 +2
- SetAutoClose false
-FunctionEnd
-
-Function ConfigureFinishPage
-!ifdef INST_GTK
- SectionGetFlags ${SecUiGtk} $0
- IntOp $0 $0 & ${SF_SELECTED}
- StrCmp $0 ${SF_SELECTED} end
-!endif
-
-!ifdef INST_QT
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
- StrCmp $0 ${SF_SELECTED} end
-!endif
-
- DeleteINISec "$PLUGINSDIR\ioSpecial.ini" "Field 4"
-
-end:
-FunctionEnd
-
-Function RunAvidemux
- SetOutPath $INSTDIR
-
-!ifdef INST_QT
-#Qt:
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
-
- StrCmp $0 ${SF_SELECTED} 0 GTK
- !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\avidemux.exe" "" "" ""
-
- Goto end
-GTK:
-!endif
-
-!ifdef INST_GTK
- SectionGetFlags ${SecUiGtk} $0
- IntOp $0 $0 & ${SF_SELECTED}
-
- StrCmp $0 ${SF_SELECTED} 0 End
- !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\avidemux_gtk.exe" "" "" ""
-!endif
-
-end:
-FunctionEnd
-
-Var ReinstallUninstallButton
-
-Function ReinstallPage
- ${If} $PreviousVersion == ""
- Abort
- ${EndIf}
-
- nsDialogs::Create /NOUNLOAD 1018
- Pop $0
-
- ${If} $PreviousVersionState == 1
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "An older version of Avidemux is installed on your system. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Upgrade Avidemux using previous settings (recommended)"
- Pop $ReinstallUninstallButton
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
- Pop $R0
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 1
- ${EndIf}
- ${ElseIf} $PreviousVersionState == 2
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "A newer version of Avidemux is already installed! It is not recommended that you downgrade to an older version. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Downgrade Avidemux using previous settings (recommended)"
- Pop $ReinstallUninstallButton
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
- Pop $R0
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 1
- ${EndIf}
- ${ElseIf} $PreviousVersionState == 0
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "${PRODUCT_FULLNAME} is already installed. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Add/Remove/Reinstall components"
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Uninstall Avidemux"
- Pop $ReinstallUninstallButton
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 2
- ${EndIf}
- ${Else}
- MessageBox MB_ICONSTOP "Unknown value of PreviousVersionState, aborting" /SD IDOK
- Abort
- ${EndIf}
-
- ${If} $ReinstallUninstall == "1"
- SendMessage $ReinstallUninstallButton ${BM_SETCHECK} 1 0
- ${Else}
- SendMessage $R0 ${BM_SETCHECK} 1 0
- ${EndIf}
-
- nsDialogs::Show
-FunctionEnd
-
-Function ReinstallPageLeave
- SendMessage $ReinstallUninstallButton ${BM_GETCHECK} 0 0 $R0
-
- ${If} $R0 == 1
- ; Option to uninstall old version selected
- StrCpy $ReinstallUninstall 1
- ${Else}
- ; Custom up/downgrade or add/remove/reinstall
- StrCpy $ReinstallUninstall 2
- ${EndIf}
-
- ${If} $ReinstallUninstall == 1
- ${If} $PreviousVersionState == 0
- Call RunUninstaller
- Quit
- ${Else}
- ; Need to reload defaults. User could have
- ; chosen custom, change something, went back and selected
- ; the express option.
- Call LoadPreviousSettings
- ${EndIf}
- ${EndIf}
-FunctionEnd
-
-
-##########################
-# Uninstaller functions
-##########################
-Function un.onInit
- SetShellVarContext all
-
-UAC_Elevate:
- !insertmacro UAC_RunElevated
- StrCmp 1223 $0 UAC_ElevationAborted
- StrCmp 0 $0 0 UAC_Err
- StrCmp 1 $1 0 UAC_Success
- Quit
-
-UAC_Err:
- MessageBox MB_ICONSTOP "Unable to elevate, error $0"
- Abort
-
-UAC_ElevationAborted:
- Abort
-
-UAC_Success:
- StrCmp 1 $3 +4
- StrCmp 3 $1 0 UAC_ElevationAborted
- MessageBox MB_ICONSTOP "This installer requires admin access."
- Goto UAC_Elevate
-FunctionEnd
-
-; TrimNewlines (copied from NSIS documentation)
-; input, top of stack (e.g. whatever$\r$\n)
-; output, top of stack (replaces, with e.g. whatever)
-; modifies no other variables.
-Function un.TrimNewlines
- Exch $R0
- Push $R1
- Push $R2
- StrCpy $R1 0
-
-loop:
- IntOp $R1 $R1 - 1
- StrCpy $R2 $R0 1 $R1
- StrCmp $R2 "$\r" loop
- StrCmp $R2 "$\n" loop
- IntOp $R1 $R1 + 1
- IntCmp $R1 0 no_trim_needed
- StrCpy $R0 $R0 $R1
-
-no_trim_needed:
- Pop $R2
- Pop $R1
- Exch $R0
-FunctionEnd
-
-Function un.RemoveEmptyDirs
- Pop $9
- !define Index 'Line${__LINE__}'
- FindFirst $0 $1 "$INSTDIR$9*"
- StrCmp $0 "" "${Index}-End"
-"${Index}-Loop:"
- StrCmp $1 "" "${Index}-End"
- StrCmp $1 "." "${Index}-Next"
- StrCmp $1 ".." "${Index}-Next"
- Push $0
- Push $1
- Push $9
- Push "$9$1\"
- Call un.RemoveEmptyDirs
- Pop $9
- Pop $1
- Pop $0
-;"${Index}-Remove:"
- RMDir "$INSTDIR$9$1"
-"${Index}-Next:"
- FindNext $0 $1
- Goto "${Index}-Loop"
-"${Index}-End:"
- FindClose $0
- !undef Index
-FunctionEnd
-
-Function un.ConfirmPagePre
- ${un.GetParameters} $R0
- ${un.GetOptions} $R0 "/frominstall" $R1
- ${Unless} ${Errors}
- Abort
- ${EndUnless}
-FunctionEnd
-
-Function un.FinishPagePre
- ${un.GetParameters} $R0
- ${un.GetOptions} $R0 "/frominstall" $R1
- ${Unless} ${Errors}
- SetRebootFlag false
- Abort
- ${EndUnless}
-FunctionEnd
+##########################
+# Included files
+##########################
+!addincludedir ${NSIDIR}
+!addplugindir ${NSIDIR}\plugin
+
+!include Sections.nsh
+!include MUI2.nsh
+!include nsDialogs.nsh
+!include Memento.nsh
+!include FileFunc.nsh
+!include UAC.nsh
+!include WinVer.nsh
+!include WordFunc.nsh
+!include revision.nsh
+
+SetCompressor /SOLID lzma
+SetCompressorDictSize 96
+RequestExecutionLevel user
+
+##########################
+# Defines
+##########################
+
+!define CORE_VERSION "2.6"
+!define PRODUCT_VERSION "${CORE_VERSION}.1.${REVISION}"
+!define PRODUCT_NAME "Avidemux ${CORE_VERSION}"
+!define PRODUCT_FULLNAME "Avidemux ${PRODUCT_VERSION} (${BUILD_BITS}-bit beta)"
+
+!if ${BUILD_BITS} == 64
+ !define SHORTCUT_NAME "${PRODUCT_NAME}"
+ !define REG_GROUPNAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
+!else
+ !define SHORTCUT_NAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
+ !define REG_GROUPNAME "${PRODUCT_NAME}"
+!endif
+
+!define REGKEY "SOFTWARE\${REG_GROUPNAME}"
+!define UNINST_REGKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_GROUPNAME}"
+!define COMPANY "Free Software Foundation"
+!define URL "http://www.avidemux.org"
+
+!ifndef INST_GTK
+!ifndef INST_QT
+!define INST_GTK
+!define INST_QT
+!endif
+!endif
+
+!ifdef INST_GTK
+!ifdef INST_QT
+!define INST_BOTH
+!endif
+!endif
+
+!ifdef INST_BOTH
+OutFile "${EXEDIR}\avidemux_${CORE_VERSION}_r${REVISION}_full_win${BUILD_BITS}.exe"
+Name "${PRODUCT_FULLNAME} Full"
+!else ifdef INST_QT
+OutFile "${EXEDIR}\avidemux_${CORE_VERSION}_r${REVISION}_win${BUILD_BITS}.exe"
+Name "${PRODUCT_FULLNAME}"
+!else ifdef INST_GTK
+OutFile "${EXEDIR}\avidemux_${CORE_VERSION}_r${REVISION}_gtk_win${BUILD_BITS}.exe"
+Name "${PRODUCT_FULLNAME} GTK+"
+!endif
+
+##########################
+# Memento defines
+##########################
+!define MEMENTO_REGISTRY_ROOT HKLM
+!define MEMENTO_REGISTRY_KEY "${REGKEY}"
+
+##########################
+# MUI defines
+##########################
+!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install-blue-full.ico"
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_RIGHT
+!ifdef INST_GTK
+!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}\PageHeaderGtk.bmp"
+!else
+!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}\PageHeader.bmp"
+!endif
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGKEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER Avidemux
+!define MUI_STARTMENUPAGE_NODISABLE
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIDIR}\WelcomeFinishStrip.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIDIR}\WelcomeFinishStrip.bmp"
+!define MUI_UNICON "${NSIDIR}\..\common\xpm\adm.ico"
+!define MUI_COMPONENTSPAGE_NODESC
+
+##########################
+# Variables
+##########################
+Var CreateDesktopIcon
+Var CreateStartMenuGroup
+Var CreateQuickLaunchIcon
+Var StartMenuGroup
+Var PreviousVersion
+Var PreviousVersionState
+Var ReinstallUninstall
+
+##########################
+# Installer pages
+##########################
+!define MUI_WELCOMEPAGE_TITLE "${PRODUCT_FULLNAME} Setup Wizard"
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "${NSIDIR}\License.rtf"
+ Page custom ReinstallPage ReinstallPageLeave
+!ifdef INST_BOTH
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE CheckSelectedUIs
+!endif
+!insertmacro MUI_PAGE_COMPONENTS
+Page custom InstallOptionsPage
+!define MUI_PAGE_CUSTOMFUNCTION_PRE IsStartMenuRequired
+!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
+!insertmacro MUI_PAGE_DIRECTORY
+!define MUI_PAGE_CUSTOMFUNCTION_PRE ActivateInternalSections
+!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesPageShow
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesPageLeave
+!insertmacro MUI_PAGE_INSTFILES
+!define MUI_FINISHPAGE_RUN
+!define MUI_FINISHPAGE_RUN_FUNCTION RunAvidemux
+!define MUI_FINISHPAGE_RUN_TEXT "Run ${PRODUCT_NAME} now"
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Change Log.html"
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Change Log now"
+!define MUI_FINISHPAGE_LINK "Visit the Avidemux Builds for Windows website"
+!define MUI_FINISHPAGE_LINK_LOCATION "http://avidemux.razorbyte.com.au/"
+!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfigureFinishPage
+!insertmacro MUI_PAGE_FINISH
+
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.ConfirmPagePre
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.FinishPagePre
+!insertmacro MUI_UNPAGE_FINISH
+
+##########################
+# Installer languages
+##########################
+!insertmacro MUI_LANGUAGE English
+
+##########################
+# Installer attributes
+##########################
+!if ${BUILD_BITS} == 64
+ InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
+!else
+ InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
+!endif
+
+CRCCheck on
+XPStyle on
+ShowInstDetails nevershow
+ShowUninstDetails nevershow
+VIProductVersion ${PRODUCT_VERSION}
+VIAddVersionKey ProductName Avidemux
+VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
+VIAddVersionKey FileVersion ""
+VIAddVersionKey FileDescription ""
+VIAddVersionKey LegalCopyright ""
+InstallDirRegKey HKLM "${REGKEY}" Path
+BrandingText "Packaged by Gruntster"
+InstType Standard
+InstType Full
+
+##########################
+# Uninstaller macros
+##########################
+!insertmacro un.GetOptions
+!insertmacro un.GetParameters
+
+!define UninstallLogPath "$INSTDIR\uninstall.log"
+Var UninstallLogHandle
+
+; Uninstall log file missing.
+LangString UninstallLogMissing ${LANG_ENGLISH} "uninstall.log not found!$\r$\nUninstallation cannot proceed!"
+
+!macro InstallFile FILEREGEX
+ File "${FILEREGEX}"
+ !define Index 'Line${__LINE__}'
+ ${GetFileName} "${FILEREGEX}" $R0
+ FindFirst $0 $1 "$OUTDIR\$R0"
+ StrCmp $0 "" "${Index}-End"
+"${Index}-Loop:"
+ StrCmp $1 "" "${Index}-End"
+ FileWrite $UninstallLogHandle "$OUTDIR\$1$\r$\n"
+ FindNext $0 $1
+ Goto "${Index}-Loop"
+"${Index}-End:"
+ !undef Index
+!macroend
+!define File "!insertmacro InstallFile"
+
+!macro InstallFolder FILEREGEX
+ File /r "${FILEREGEX}\*"
+ Push "$OUTDIR"
+ Call InstallFolderInternal
+!macroend
+!define Folder "!insertmacro InstallFolder"
+
+Function InstallFolderInternal
+ Pop $9
+ !define Index 'Line${__LINE__}'
+ FindFirst $0 $1 "$9\*"
+ StrCmp $0 "" "${Index}-End"
+"${Index}-Loop:"
+ StrCmp $1 "" "${Index}-End"
+ StrCmp $1 "." "${Index}-Next"
+ StrCmp $1 ".." "${Index}-Next"
+ IfFileExists "$9\$1\*" 0 "${Index}-Write"
+ Push $0
+ Push $9
+ Push "$9\$1"
+ Call InstallFolderInternal
+ Pop $9
+ Pop $0
+ Goto "${Index}-Next"
+"${Index}-Write:"
+ FileWrite $UninstallLogHandle "$9\$1$\r$\n"
+"${Index}-Next:"
+ FindNext $0 $1
+ Goto "${Index}-Loop"
+"${Index}-End:"
+ !undef Index
+FunctionEnd
+
+; WriteUninstaller macro
+!macro WriteUninstaller Path
+ WriteUninstaller "${Path}"
+ FileWrite $UninstallLogHandle "${Path}$\r$\n"
+!macroend
+!define WriteUninstaller "!insertmacro WriteUninstaller"
+
+##########################
+# Macros
+##########################
+!macro InstallGtkLanguage LANG_NAME LANG_CODE
+!ifdef INST_GTK
+ SetOverwrite on
+
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} installGtk${LANG_CODE} endGtk${LANG_CODE}
+
+installGtk${LANG_CODE}:
+ SetOutPath $INSTDIR\share\locale\${LANG_CODE}\LC_MESSAGES
+ ${File} share\locale\${LANG_CODE}\LC_MESSAGES\avidemux.mo
+ ${File} share\locale\${LANG_CODE}\LC_MESSAGES\gtk20.mo
+
+endGtk${LANG_CODE}:
+!endif
+!macroend
+
+!macro InstallQtLanguage LANG_NAME LANG_CODE
+!ifdef INST_QT
+ SetOverwrite on
+
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} installQt${LANG_CODE} endQt${LANG_CODE}
+
+installQt${LANG_CODE}:
+ SetOutPath $INSTDIR\i18n
+ ${File} i18n\avidemux_${LANG_CODE}.qm
+ ${File} i18n\qt_${LANG_CODE}.qm
+
+endQt${LANG_CODE}:
+!endif
+!macroend
+
+##########################
+# Installer sections
+##########################
+Section -OpenLogFile
+ CreateDirectory "$INSTDIR"
+ FileOpen $UninstallLogHandle ${UninstallLogPath} a
+ FileSeek $UninstallLogHandle 0 END
+SectionEnd
+
+Section "Avidemux Core" SecCore
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} "Build Info.txt"
+ ${File} "Change Log.html"
+ ${File} libexpat-1.dll
+ ${File} libfreetype-6.dll
+ ${File} libgcc_s_sjlj-1.dll
+ ${File} libsqlite3-0.dll
+ ${File} libstdc++-6.dll
+ ${File} libwinpthread-1.dll
+ ${File} zlib1.dll
+ ${File} libADM_audioParser6.dll
+ ${File} libADM_core6.dll
+ ${File} libADM_coreAudio6.dll
+ ${File} libADM_coreAudioDevice6.dll
+ ${File} libADM_coreAudioEncoder6.dll
+ ${File} libADM_coreAudioFilterAPI6.dll
+ ${File} libADM_coreDemuxer6.dll
+ ${File} libADM_coreDemuxerMpeg6.dll
+ ${File} libADM_coreImage6.dll
+ ${File} libADM_coreImageLoader6.dll
+ ${File} libADM_coreJobs.dll
+ ${File} libADM_coreMuxer6.dll
+ ${File} libADM_coreScript.dll
+ ${File} libADM_coreSocket6.dll
+ ${File} libADM_coreSqlLight3.dll
+ ${File} libADM_coreUI6.dll
+ ${File} libADM_coreUtils6.dll
+ ${File} libADM_coreVideoCodec6.dll
+ ${File} libADM_coreVideoEncoder6.dll
+ ${File} libADM_coreVideoFilter6.dll
+ ${File} QtCore4.dll
+ ${File} QtGui4.dll
+ ${File} AUTHORS.
+ ${File} COPYING.
+ ${File} README.
+ ${File} avcodec-*.dll
+ ${File} avformat-*.dll
+ ${File} avutil-*.dll
+ ${File} postproc-*.dll
+ ${File} swscale-*.dll
+
+ WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
+ WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
+
+ ${If} ${AtMostWinVista}
+ WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
+ ${EndIf}
+SectionEnd
+
+SectionGroup /e "User interfaces" SecGrpUI
+ ${MementoUnselectedSection} "Command Line" SecUiCli
+ SectionIn 2
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} avidemux_cli.exe
+ ${File} libADM_render6_cli.dll
+ ${File} libADM_UI_Cli6.dll
+ ${MementoSectionEnd}
+
+!ifdef INST_BOTH
+ ${MementoUnselectedSection} GTK+ SecUiGtk
+ SectionIn 2
+!else ifdef INST_GTK
+ ${MementoSection} GTK+ SecUiGtk
+ SectionIn 1 2 RO
+!endif
+!ifdef INST_BOTH | INST_GTK
+ SetOverwrite on
+ SetOutPath $INSTDIR\etc\gtk-2.0
+ ${Folder} etc\gtk-2.0
+ SetOutPath $INSTDIR\etc\pango
+ ${Folder} etc\pango
+ SetOutPath $INSTDIR\lib\gtk-2.0
+ ${Folder} lib\gtk-2.0
+ SetOutPath $INSTDIR\share\themes
+ ${Folder} share\themes
+ SetOutPath $INSTDIR
+ ${File} avidemux_gtk.exe
+ ${File} gtk2_prefs.exe
+ ${File} intl.dll
+ ${File} libADM_render_gtk.dll
+ ${File} libADM_UIGtk.dll
+ ${File} libatk-1.0-0.dll
+ ${File} libcairo-2.dll
+ ${File} libgdk_pixbuf-2.0-0.dll
+ ${File} libgdk-win32-2.0-0.dll
+ ${File} libgio-2.0-0.dll
+ ${File} libglib-2.0-0.dll
+ ${File} libgmodule-2.0-0.dll
+ ${File} libgobject-2.0-0.dll
+ ${File} libgthread-2.0-0.dll
+ ${File} libgtk-win32-2.0-0.dll
+ ${File} libpango-1.0-0.dll
+ ${File} libpangocairo-1.0-0.dll
+ ${File} libpangoft2-1.0-0.dll
+ ${File} libpangowin32-1.0-0.dll
+ ${File} libpng14-14.dll
+ ${File} SDL.dll
+ ${MementoSectionEnd}
+!endif
+
+!ifdef INST_QT
+ ${MementoSection} Qt SecUiQt
+!ifdef INST_BOTH
+ SectionIn 1 2
+!else
+ SectionIn 1 2 RO
+!endif
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} avidemux.exe
+ ${File} avidemux_jobs.exe
+ ${File} libADM_render6_qt4.dll
+ ${File} libADM_UIQT46.dll
+ ${File} QtOpenGL4.dll
+ ${MementoSectionEnd}
+!endif
+SectionGroupEnd
+
+SectionGroup "Audio Decoders" SecGrpAudioDecoder
+ ${MementoSection} "µ-law" SecAudDecUlaw
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_ulaw.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC (FAAD)" SecAudDecFaad
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_faad.dll
+ SetOutPath $INSTDIR
+ ${File} libfaad2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC, AC-3, ADPCM IMA AMV, DTS, E-AC-3, MP2, MP3, Nellymoser, QDesign, WMA (libavcodec)" SecAudDecAvcodec
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_lav.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (liba52)" SecAudDecA52
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_a52.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ADPCM IMA" SecAudDecImaAdpcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_ima_adpcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ADPCM Microsoft" SecAudDecMsAdpcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_ms_adpcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AMR-NB" SecAudDecOpencoreAmrNb
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_opencore_amrnb.dll
+ SetOutPath $INSTDIR
+ ${File} libopencore-amrnb-*.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AMR-WB" SecAudDecOpencoreAmrWb
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_opencore_amrwb.dll
+ SetOutPath $INSTDIR
+ ${File} libopencore-amrwb-*.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP2, MP3 (MAD)" SecAudDecMad
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_Mad.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vorbis" SecAudDecVorbis
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} plugins\audioDecoder\libADM_ad_vorbis.dll
+ SetOutPath $INSTDIR
+ ${File} libogg-0.dll
+ ${File} libvorbis-0.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Audio Devices" SecGrpAudioDevice
+ ${MementoSection} "Waveform" SecAudDevWaveform
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDevices
+ ${File} plugins\audioDevices\libADM_av_win32.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Audio Encoders" SecGrpAudioEncoder
+ ${MementoSection} "AAC (FAAC)" SecAudEncFaac
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_faac.dll
+ SetOutPath $INSTDIR
+ ${File} libfaac.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC (libavcodec)" SecAudEncLavAac
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_lav_aac.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (Aften)" SecAudDecAften
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_aften.dll
+ SetOutPath $INSTDIR
+ ${File} aften.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (libavcodec)" SecAudEncLavAc3
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_lav_ac3.dll
+ ${MementoSectionEnd}
+ #${MementoSection} "DTS (dcaenc)" SecAudDecDcaEnc
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\audioEncoders
+ #${File} plugins\audioEncoders\libADM_ae_dcaenc.dll
+ #SetOutPath $INSTDIR
+ #${File} libdcaenc-0.dll
+ #${MementoSectionEnd}
+ ${MementoSection} "MP2 (libavcodec)" SecAudEncLavMp2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_lav_mp2.dll
+ SetOutPath $INSTDIR
+ ${File} libtwolame-*.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP2 (TwoLAME)" SecAudEncTwoLame
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_twolame.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP3" SecAudEncLame
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_lame.dll
+ SetOutPath $INSTDIR
+ ${File} libmp3lame-0.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "PCM" SecAudEncPcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_pcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vorbis" SecAudEncVorbis
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} plugins\audioEncoders\libADM_ae_vorbis.dll
+ SetOutPath $INSTDIR
+ ${File} libogg-0.dll
+ ${File} libvorbis-0.dll
+ ${File} libvorbisenc-2.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Avisynth" SecGrpAvisynth
+ ${MementoUnselectedSection} "Avisynth Proxy" SecAvsProxy
+ SectionIn 2
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} avsproxy.exe
+ ${File} avsproxy_gui.exe
+ ${MementoSectionEnd}
+ ${MementoUnselectedSection} "Avisynth Proxy Demuxer" SecDemuxAvisynth
+ SectionIn 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_avsproxy.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Demuxers" SecGrpDemuxers
+ ${MementoSection} "ASF" SecDemuxAsf
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_asf.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "BMP, JPEG, PNG Images" SecDemuxImage
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_pic.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Flash Video" SecDemuxFlv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_flv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Matroska" SecDemuxMatroska
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_matroska.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4" SecDemuxMp4
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_mp4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-PS" SecDemuxMpegPs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_ps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-TS" SecDemuxMpegTs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_ts.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MXF" SecDemuxMxf
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_mxf.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "OpenDML AVI" SecDemuxOpenDml
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} plugins\demuxers\libADM_dm_opendml.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Muxers" SecGrpMuxers
+ ${MementoSection} "Dummy [Raw Audio/Video]" SecMuxDummy
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_dummy.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Flash Video" SecMuxLavFlv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_flv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Matroska" SecMuxLavMatroska
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_Mkv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4 (libavcodec)" SecMuxLavMp4
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_mp4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4 (MP4v2)" SecMuxMp4v2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_mp4v2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-PS" SecMuxLavMpegPs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_ffPS.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-TS" SecMuxLavMpegTs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_ffTS.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "OpenDML AVI" SecMuxOpenDml
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_avi.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Raw Video" SecMuxRaw
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} plugins\muxers\libADM_mx_raw.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Script Engines" SecGrpScriptEngine
+ ${MementoSection} "QtScript" SecScriptQt
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR
+ ${File} QtScript4.dll
+ ${File} QtScriptTools4.dll
+ SetOutPath $INSTDIR\plugins\scriptEngines
+ ${File} plugins\scriptEngines\libADM_script_qt.dll
+ SetOutPath $INSTDIR\help\QtScript
+ ${Folder} help\QtScript
+ ${MementoSectionEnd}
+ ${MementoSection} "SpiderMonkey" SecScriptSpiderMonkey
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR
+ ${File} nspr4.dll
+ ${File} libjs.dll
+ SetOutPath $INSTDIR\plugins\scriptEngines
+ ${File} plugins\scriptEngines\libADM_script_spiderMonkey.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Tinypy" SecScriptTinypy
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\scriptEngines
+ ${File} plugins\scriptEngines\libADM_script_tinyPy.dll
+ SetOutPath $INSTDIR\plugins\autoScripts
+ ${Folder} plugins\autoScripts
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Video Decoders" SecGrpVideoDecoder
+ ${MementoSection} "VP8" SecVidDecVpx
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoDecoders
+ ${File} plugins\videoDecoders\libADM_vd_vpx.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Video Encoders" SecGrpVideoEncoder
+ ${MementoSection} "[Null]" SecVidEncNull
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_null.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Huffyuv, FFVHuff" SecVidEncLavHuffyuv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_huff.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "JPEG" SecVidEncLavJpeg
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_jpeg.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-2" SecVidEncLavMpeg2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_ffMpeg2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 ASP (libavcodec)" SecVidEncLavMpeg4asp
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_ffMpeg4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 ASP (Xvid)" SecVidEncXvid
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_xvid4.dll
+ SetOutPath $INSTDIR
+ ${File} xvidcore.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 AVC" SecVidEncX264
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+
+ !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
+InstallCli:
+ ${File} plugins\videoEncoders\libADM_ve_x264_other.dll
+CheckGtk:
+!ifdef INST_GTK
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
+InstallGtk:
+ ${File} plugins\videoEncoders\libADM_vidEnc_x264_Gtk.dll
+CheckQt:
+!endif
+!ifdef INST_QT
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
+InstallQt:
+ ${File} plugins\videoEncoders\libADM_ve_x264_qt4.dll
+End:
+!endif
+ SetOutPath $INSTDIR\plugins\pluginSettings\x264
+ ${Folder} plugins\pluginSettings\x264
+ SetOutPath $INSTDIR
+ ${File} libx264-*.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "PNG" SecVidEncLavPng
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_png.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Sorenson Spark" SecVidEncSorenson
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_ffFlv1.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "YV12" SecVidEncYv12
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} plugins\videoEncoders\libADM_ve_yv12.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Video Filters" SecGrpVideoFilter
+ SectionGroup "Transform Filters" SecGrpVideoFilterTransform
+ ${MementoSection} "Add Black Borders" SecVidFltBlackBorders
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_addBorders.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Add Logo" SecVidFltLogo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_logo.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Blacken Borders" SecVidFltBlackenBorders
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_blackenBorders.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Change FPS" SecVidFltChangeFps
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_changeFps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Crop" SecVidFltCrop
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
+InstallCli:
+ ${File} plugins\videoFilters\libADM_vf_CropCli.dll
+CheckGtk:
+!ifdef INST_GTK
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
+InstallGtk:
+ ${File} plugins\videoFilters\libADM_vf_CropGtk.dll
+CheckQt:
+!endif
+!ifdef INST_QT
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
+InstallQt:
+ ${File} plugins\videoFilters\libADM_vf_cropQt4.dll
+End:
+!endif
+ ${MementoSectionEnd}
+ ${MementoSection} "Fade" SecVidFltFade
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_fadeToBlack.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Greyscale" SecVidFltLumaOnly
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_lumaOnly.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Horizontal Flip" SecVidFltHorizontalFlip
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_hf_hflip.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "libswscale Resize" SecVidFltSwscaleResize
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
+InstallCli:
+ ${File} plugins\videoFilters\libADM_vf_swscaleResize_cli.dll
+CheckGtk:
+!ifdef INST_GTK
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
+InstallGtk:
+ ${File} plugins\videoFilters\libADM_vf_swscaleResize_gtk.dll
+CheckQt:
+!endif
+!ifdef INST_QT
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
+InstallQt:
+ ${File} plugins\videoFilters\libADM_vf_swscaleResize_qt4.dll
+End:
+!endif
+ ${MementoSectionEnd}
+ ${MementoSection} "Resample FPS" SecVidFltResampleFps
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_resampleFps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Rotate" SecVidFltRotate
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_rotate.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vertical Flip" SecVidFltVerticalFlip
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_vflip.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Interlacing Filters" SecGrpVideoFilterInterlacing
+ ${MementoSection} "Decomb Decimate" SecVidFltDecombDecimate
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_decimate.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Decomb Telecide" SecVidFltDecombTelecide
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_telecide.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "DGBob" SecVidFltDgbob
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_DgBob.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Horizontal Stack Fields" SecVidFltHzStackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_hzstackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Kernel Deint" SecVidFltKernelDeint
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_kernelDeint.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "libavcodec Deinterlacers" SecVidFltLavDeinterlacers
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_lavDeint.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Merge Fields" SecVidFltMergeFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_mergeField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Separate Fields" SecVidFltSeparateFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_separateField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Stack Fields" SecVidFltStackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_stackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Unstack Fields" SecVidFltUnstackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_unstackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Yadif" SecVidFltYadif
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_yadif.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Colour Filters" SecGrpVideoFilterColour
+ ${MementoSection} "Avisynth Colour YUV" SecVidFltAvisynthColourYuv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_colorYuv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ChromaShift" SecVidFltChromaShift
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
+InstallCli:
+ ${File} plugins\videoFilters\libADM_vf_chromaShiftCli.dll
+CheckGtk:
+!ifdef INST_GTK
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
+InstallGtk:
+ ${File} plugins\videoFilters\libADM_vf_chromaShiftGtk.dll
+CheckQt:
+!endif
+!ifdef INST_QT
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
+InstallQt:
+ ${File} plugins\videoFilters\libADM_vf_chromaShiftQt4.dll
+End:
+!endif
+ ${MementoSectionEnd}
+ ${MementoSection} "Contrast" SecVidFltContrast
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
+InstallCli:
+ ${File} plugins\videoFilters\libADM_vf_contrastCli.dll
+CheckGtk:
+!ifdef INST_GTK
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
+InstallGtk:
+ ${File} plugins\videoFilters\libADM_vf_contrastGtk.dll
+CheckQt:
+!endif
+!ifdef INST_QT
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
+InstallQt:
+ ${File} plugins\videoFilters\libADM_vf_contrastQt4.dll
+End:
+!endif
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlater Eq2" SecVidFltMplayerEq2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
+InstallCli:
+ ${File} plugins\videoFilters\libADM_vf_eq2Cli.dll
+CheckGtk:
+!ifdef INST_GTK
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
+InstallGtk:
+ ${File} plugins\videoFilters\libADM_vf_eq2Gtk.dll
+CheckQt:
+!endif
+!ifdef INST_QT
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
+InstallQt:
+ ${File} plugins\videoFilters\libADM_vf_eq2Qt4.dll
+End:
+!endif
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlater Hue" SecVidFltMplayerHue
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ !insertmacro SectionFlagIsSet ${SecUiCli} ${SF_SELECTED} InstallCli CheckGtk
+InstallCli:
+ ${File} plugins\videoFilters\libADM_vf_HueCli.dll
+CheckGtk:
+!ifdef INST_GTK
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} InstallGtk CheckQt
+InstallGtk:
+ ${File} plugins\videoFilters\libADM_vf_HueGtk.dll
+CheckQt:
+!endif
+!ifdef INST_QT
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} InstallQt End
+InstallQt:
+ ${File} plugins\videoFilters\libADM_vf_HueQt4.dll
+End:
+!endif
+ ${MementoSectionEnd}
+ ${MementoSection} "Remove Plane" SecVidFltRemovePlane
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_removePlane.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Swap U and V" SecVidFltSwapUandV
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_swapUV.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Noise Filters" SecGrpVideoFilterNoise
+ ${MementoSection} "FluxSmooth" SecVidFltFluxSmooth
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_FluxSmooth.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Gaussian Convolution" SecVidFltGauss
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_gauss.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Large Median (5x5)" SecVidFltMediam5x5
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_largeMedian.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Mean Convolution" SecVidFltMean
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_mean.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Median Convolution" SecVidFltMedian
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_median.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Denoise 3D" SecVidFltMPlayerDenoise3d
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_denoise3d.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Denoise 3D HQ" SecVidFltMPlayerDenoise3dHq
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_denoise3dhq.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MSharpen" SecVidFltMSharpen
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_msharpen.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Sharpness Filters" SecGrpVideoFilterSharpness
+ ${MementoSection} "asharp" SecVidFltAsharp
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_asharpQt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Delogo" SecVidFltMPlayerDelogo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_mpdelogoQt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Sharpen" SecVidFltSharpen
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_sharpen.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Subtitle Filters" SecGrpVideoFilterSubtitle
+ ${MementoSection} "ASS, SSA" SecVidFltAssSsa
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_ssa.dll
+ SetOutPath $INSTDIR
+ ${File} libfribidi-0.dll
+ ${File} libfontconfig-1.dll
+ SetOutPath $INSTDIR\etc\fonts
+ ${Folder} etc\fonts
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ #SectionGroup "OpenGL Filters" SecGrpVideoFilterOpenGl
+ #${MementoSection} "Fragment Shader" SecVidFltOpenGlFragmentShader
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} plugins\videoFilters\libADM_vf_sampleGlFrag2.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Read Back Benchmark" SecVidFltOpenGlReadBack
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} plugins\videoFilters\libADM_vf_glBenchmark.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Resize" SecVidFltOpenGlResize
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} plugins\videoFilters\libADM_vf_glResize.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Rotate" SecVidFltOpenGlRotate
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} plugins\videoFilters\libADM_vf_rotateGlFrag2.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Wave" SecVidFltOpenGlWave
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} plugins\videoFilters\libADM_vf_sampleGlVertex.dll
+ #${MementoSectionEnd}
+ #SectionGroupEnd
+ SectionGroup "Miscellaneous Filters" SecGrpVideoFilterMiscellaneous
+ ${MementoSection} "Print Information" SecVidFltPrintInfo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} plugins\videoFilters\libADM_vf_printInfo.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+SectionGroupEnd
+
+${MementoSection} "-Start menu Change Log" SecStartMenuChangeLog
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk" "$INSTDIR\Change Log.html"
+ !insertmacro MUI_STARTMENU_WRITE_END
+${MementoSectionEnd}
+
+${MementoSection} "-Start menu GTK+" SecStartMenuGtk
+!ifdef INST_GTK
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME} GTK+.lnk" $INSTDIR\avidemux_gtk.exe
+ !insertmacro MUI_STARTMENU_WRITE_END
+!endif
+${MementoSectionEnd}
+
+${MementoSection} "-Start menu Qt" SecStartMenuQt
+!ifdef INST_QT
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+ !insertmacro MUI_STARTMENU_WRITE_END
+!endif
+${MementoSectionEnd}
+
+${MementoSection} "-Start menu AVS Proxy GUI" SecStartMenuAvsProxyGui
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk" "$INSTDIR\avsproxy_gui.exe"
+ !insertmacro MUI_STARTMENU_WRITE_END
+${MementoSectionEnd}
+
+${MementoSection} "-Quick Launch GTK+" SecQuickLaunchGtk
+!ifdef INST_GTK
+ SetOutPath $INSTDIR
+ CreateShortcut "$QUICKLAUNCH\${SHORTCUT_NAME} GTK+.lnk" $INSTDIR\avidemux_gtk.exe
+!endif
+${MementoSectionEnd}
+
+${MementoSection} "-Quick Launch Qt" SecQuickLaunchQt
+!ifdef INST_QT
+ SetOutPath $INSTDIR
+ CreateShortcut "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+!endif
+${MementoSectionEnd}
+
+${MementoSection} "-Desktop GTK+" SecDesktopGtk
+!ifdef INST_GTK
+ SetOutPath $INSTDIR
+ CreateShortcut "$DESKTOP\${SHORTCUT_NAME} GTK+.lnk" $INSTDIR\avidemux_gtk.exe
+!endif
+${MementoSectionEnd}
+
+${MementoSection} "-Desktop Qt" SecDesktopQt
+!ifdef INST_QT
+ SetOutPath $INSTDIR
+ CreateShortcut "$DESKTOP\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+!endif
+${MementoSectionEnd}
+
+${MementoSectionDone}
+
+Section -post SecUninstaller
+ SectionIn 1 2
+ WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
+ WriteRegStr HKLM "${REGKEY}" Version ${PRODUCT_VERSION}
+ SetOutPath $INSTDIR
+ WriteUninstaller $INSTDIR\uninstall.exe
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayName "${SHORTCUT_NAME}"
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayVersion "${PRODUCT_VERSION}"
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayIcon $INSTDIR\uninstall.exe
+ WriteRegStr HKLM "${UNINST_REGKEY}" UninstallString $INSTDIR\uninstall.exe
+ WriteRegDWORD HKLM "${UNINST_REGKEY}" NoModify 1
+ WriteRegDWORD HKLM "${UNINST_REGKEY}" NoRepair 1
+SectionEnd
+
+Section -CloseLogFile
+ FileClose $UninstallLogHandle
+ SetFileAttributes ${UninstallLogPath} HIDDEN
+SectionEnd
+
+Section Uninstall
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+
+!ifdef INST_GTK
+ Delete /REBOOTOK "$QUICKLAUNCH\${SHORTCUT_NAME} GTK+.lnk"
+ Delete /REBOOTOK "$DESKTOP\${SHORTCUT_NAME} GTK+.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME} GTK+.lnk"
+!endif
+
+!ifdef INST_QT
+ Delete /REBOOTOK "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk"
+ Delete /REBOOTOK "$DESKTOP\${SHORTCUT_NAME}.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk"
+!endif
+
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk"
+ RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
+ DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
+
+ DeleteRegKey HKLM "${UNINST_REGKEY}"
+ DeleteRegValue HKLM "${REGKEY}" Path
+ DeleteRegValue HKLM "${REGKEY}" CreateDesktopIcon
+ DeleteRegValue HKLM "${REGKEY}" CreateStartMenuGroup
+ DeleteRegValue HKLM "${REGKEY}" CreateQuickLaunchIcon
+ DeleteRegKey /IfEmpty HKLM "${REGKEY}"
+
+ FileOpen $UninstallLogHandle "${UninstallLogPath}" r
+UninstallLoop:
+ ClearErrors
+ FileRead $UninstallLogHandle $R0
+ IfErrors UninstallEnd
+ Push $R0
+ Call un.TrimNewLines
+ Pop $R0
+ Delete "$R0"
+ Goto UninstallLoop
+UninstallEnd:
+ FileClose $UninstallLogHandle
+ Delete "${UninstallLogPath}"
+ Delete "$INSTDIR\uninstall.exe"
+ Push "\"
+ Call un.RemoveEmptyDirs
+ RMDir "$INSTDIR"
+SectionEnd
+
+##########################
+# Installer functions
+##########################
+Function .onInit
+UAC_Elevate:
+ !insertmacro UAC_RunElevated
+ StrCmp 1223 $0 UAC_ElevationAborted
+ StrCmp 0 $0 0 UAC_Err
+ StrCmp 1 $1 0 UAC_Success
+ Quit
+
+UAC_Err:
+ MessageBox MB_ICONSTOP "Unable to elevate, error $0"
+ Abort
+
+UAC_ElevationAborted:
+ Abort
+
+UAC_Success:
+ StrCmp 1 $3 +4
+ StrCmp 3 $1 0 UAC_ElevationAborted
+ MessageBox MB_ICONSTOP "This installer requires admin access."
+ Goto UAC_Elevate
+
+ Call LoadPreviousSettings
+ ReadRegStr $PreviousVersion HKLM "${REGKEY}" Version
+
+ ${If} $PreviousVersion != ""
+ ${VersionCompare} ${PRODUCT_VERSION} $PreviousVersion $PreviousVersionState
+ ${EndIf}
+
+ InitPluginsDir
+ SetShellVarContext all
+FunctionEnd
+
+Function .onInstSuccess
+ ${MementoSectionSave}
+FunctionEnd
+
+Function LoadPreviousSettings
+ ${MementoSectionRestore}
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+
+#checkStartMenuGtk:
+ !insertmacro SectionFlagIsSet ${SecStartMenuGtk} ${SF_SELECTED} enableStartMenu checkStartMenuQt
+checkStartMenuQt:
+ !insertmacro SectionFlagIsSet ${SecStartMenuQt} ${SF_SELECTED} enableStartMenu checkDesktopGtk
+
+enableStartMenu:
+ ReadRegStr $CreateStartMenuGroup HKLM "${REGKEY}" CreateStartMenuGroup
+
+ ${If} $CreateStartMenuGroup == ""
+ StrCpy $CreateStartMenuGroup 1
+ ${EndIf}
+
+checkDesktopGtk:
+ !insertmacro SectionFlagIsSet ${SecDesktopGtk} ${SF_SELECTED} enableDesktop checkDesktopQt
+checkDesktopQt:
+ !insertmacro SectionFlagIsSet ${SecDesktopQt} ${SF_SELECTED} enableDesktop checkQuickLaunchGtk
+
+enableDesktop:
+ ReadRegStr $CreateDesktopIcon HKLM "${REGKEY}" CreateDesktopIcon
+
+ ${If} $CreateDesktopIcon == ""
+ StrCpy $CreateDesktopIcon 1
+ ${EndIf}
+
+checkQuickLaunchGtk:
+ !insertmacro SectionFlagIsSet ${SecQuickLaunchGtk} ${SF_SELECTED} enableQuickLaunch checkQuickLaunchQt
+checkQuickLaunchQt:
+ !insertmacro SectionFlagIsSet ${SecQuickLaunchQt} ${SF_SELECTED} enableQuickLaunch end
+
+enableQuickLaunch:
+ ${If} ${AtMostWinVista}
+ ReadRegStr $CreateQuickLaunchIcon HKLM "${REGKEY}" CreateQuickLaunchIcon
+
+ ${If} $CreateQuickLaunchIcon == ""
+ StrCpy $CreateQuickLaunchIcon 1
+ ${EndIf}
+ ${EndIf}
+
+end:
+FunctionEnd
+
+Function RunUninstaller
+ ReadRegStr $R1 HKLM "${UNINST_REGKEY}" "UninstallString"
+
+ ${If} $R1 == ""
+ Return
+ ${EndIf}
+
+ ;Run uninstaller
+ HideWindow
+ ClearErrors
+
+ ${If} $PreviousVersionState == 0
+ ${AndIf} $ReinstallUninstall == 1
+ ExecWait '$R1 _?=$INSTDIR'
+ ${Else}
+ ExecWait '$R1 /frominstall _?=$INSTDIR'
+ ${EndIf}
+
+ IfErrors NoRemoveUninstaller
+ IfFileExists "$INSTDIR\uninstall.exe" 0 NoRemoveUninstaller
+ Delete "$R1"
+ RMDir $INSTDIR
+
+NoRemoveUninstaller:
+FunctionEnd
+
+!ifdef INST_BOTH
+Function CheckSelectedUIs
+ !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_SELECTED} end checkPartial
+checkPartial:
+ !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_PSELECTED} end displayError
+displayError:
+ MessageBox MB_OK|MB_ICONSTOP "At least one User Interface must be selected."
+ Abort
+end:
+FunctionEnd
+!endif
+
+LangString INSTALL_OPTS_PAGE_TITLE ${LANG_ENGLISH} "Choose Install Options"
+LangString INSTALL_OPTS_PAGE_SUBTITLE ${LANG_ENGLISH} "Choose where to install Avidemux icons."
+Var dlgInstallOptions
+Var lblCreateIcons
+Var chkDesktop
+Var chkStartMenu
+Var chkQuickLaunch
+
+Function InstallOptionsPage
+ Call IsInstallOptionsRequired
+ !insertmacro MUI_HEADER_TEXT "$(INSTALL_OPTS_PAGE_TITLE)" "$(INSTALL_OPTS_PAGE_SUBTITLE)"
+
+ nsDialogs::Create 1018
+ Pop $dlgInstallOptions
+
+ ${If} $dlgInstallOptions == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateLabel} 0 0u 100% 12u "Create icons for Avidemux:"
+ Pop $lblCreateIcons
+
+ ${NSD_CreateCheckBox} 0 18u 100% 12u "On my &Desktop"
+ Pop $chkDesktop
+ ${NSD_SetState} $chkDesktop $CreateDesktopIcon
+ ${NSD_OnClick} $chkDesktop UpdateInstallOptions
+
+ ${NSD_CreateCheckBox} 0 36u 100% 12u "In my &Start Menu Programs folder"
+ Pop $chkStartMenu
+ ${NSD_SetState} $chkStartMenu $CreateStartMenuGroup
+ ${NSD_OnClick} $chkStartMenu UpdateInstallOptions
+
+ ${If} ${AtMostWinVista}
+ ${NSD_CreateCheckBox} 0 54u 100% 12u "In my &Quick Launch bar"
+ Pop $chkQuickLaunch
+ ${NSD_SetState} $chkQuickLaunch $CreateQuickLaunchIcon
+ ${NSD_OnClick} $chkQuickLaunch UpdateInstallOptions
+ ${EndIf}
+
+ nsDialogs::Show
+FunctionEnd
+
+Function UpdateInstallOptions
+ ${NSD_GetState} $chkDesktop $CreateDesktopIcon
+ ${NSD_GetState} $chkStartMenu $CreateStartMenuGroup
+ ${NSD_GetState} $chkQuickLaunch $CreateQuickLaunchIcon
+FunctionEnd
+
+Function IsInstallOptionsRequired
+!ifdef INST_GTK
+ !insertmacro SectionFlagIsSet ${SecUiGtk} ${SF_SELECTED} end checkQt
+checkQt:
+!ifndef INST_BOTH
+Goto end
+!endif
+!endif
+!ifdef INST_QT
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} end resetOptions
+resetOptions:
+!endif
+
+ StrCpy $CreateDesktopIcon 0
+ StrCpy $CreateStartMenuGroup 0
+ StrCpy $CreateQuickLaunchIcon 0
+ Abort
+
+end:
+FunctionEnd
+
+Function IsStartMenuRequired
+ StrCmp $CreateStartMenuGroup 1 +2
+ Abort
+FunctionEnd
+
+Function ActivateInternalSections
+ #AVS Proxy GUI shortcut:
+ SectionGetFlags ${SecAvsProxy} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ IntOp $0 $0 & $CreateStartMenuGroup
+ SectionSetFlags ${SecStartMenuAvsProxyGui} $0
+
+ #Change Log shortcut:
+ SectionSetFlags ${SecStartMenuChangeLog} $CreateStartMenuGroup
+
+!ifdef INST_GTK
+ #GTK shortcuts:
+ SectionGetFlags ${SecUiGtk} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+
+ IntOp $1 $0 & $CreateDesktopIcon
+ SectionSetFlags ${SecDesktopGtk} $1
+
+ IntOp $1 $0 & $CreateQuickLaunchIcon
+ SectionSetFlags ${SecQuickLaunchGtk} $1
+
+ IntOp $1 $0 & $CreateStartMenuGroup
+ SectionSetFlags ${SecStartMenuGtk} $1
+!endif
+
+!ifdef INST_QT
+ #Qt shortcuts:
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+
+ IntOp $1 $0 & $CreateDesktopIcon
+ SectionSetFlags ${SecDesktopQt} $1
+
+ IntOp $1 $0 & $CreateQuickLaunchIcon
+ SectionSetFlags ${SecQuickLaunchQt} $1
+
+ IntOp $1 $0 & $CreateStartMenuGroup
+ SectionSetFlags ${SecStartMenuQt} $1
+!endif
+FunctionEnd
+
+Function InstFilesPageShow
+ ${If} $ReinstallUninstall != ""
+ Call RunUninstaller
+ BringToFront
+ ${EndIf}
+FunctionEnd
+
+Function InstFilesPageLeave
+ ; Don't advance automatically if details expanded
+ FindWindow $R0 "#32770" "" $HWNDPARENT
+ GetDlgItem $R0 $R0 1016
+ System::Call user32::IsWindowVisible(i$R0)i.s
+ Pop $R0
+
+ StrCmp $R0 0 +2
+ SetAutoClose false
+FunctionEnd
+
+Function ConfigureFinishPage
+!ifdef INST_GTK
+ SectionGetFlags ${SecUiGtk} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ StrCmp $0 ${SF_SELECTED} end
+!endif
+
+!ifdef INST_QT
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ StrCmp $0 ${SF_SELECTED} end
+!endif
+
+ DeleteINISec "$PLUGINSDIR\ioSpecial.ini" "Field 4"
+
+end:
+FunctionEnd
+
+Function RunAvidemux
+ SetOutPath $INSTDIR
+
+!ifdef INST_QT
+#Qt:
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+
+ StrCmp $0 ${SF_SELECTED} 0 GTK
+ !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\avidemux.exe" "" "" ""
+
+ Goto end
+GTK:
+!endif
+
+!ifdef INST_GTK
+ SectionGetFlags ${SecUiGtk} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+
+ StrCmp $0 ${SF_SELECTED} 0 End
+ !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\avidemux_gtk.exe" "" "" ""
+!endif
+
+end:
+FunctionEnd
+
+Var ReinstallUninstallButton
+
+Function ReinstallPage
+ ${If} $PreviousVersion == ""
+ Abort
+ ${EndIf}
+
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $0
+
+ ${If} $PreviousVersionState == 1
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "An older version of Avidemux is installed on your system. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Upgrade Avidemux using previous settings (recommended)"
+ Pop $ReinstallUninstallButton
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
+ Pop $R0
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 1
+ ${EndIf}
+ ${ElseIf} $PreviousVersionState == 2
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "A newer version of Avidemux is already installed! It is not recommended that you downgrade to an older version. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Downgrade Avidemux using previous settings (recommended)"
+ Pop $ReinstallUninstallButton
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
+ Pop $R0
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 1
+ ${EndIf}
+ ${ElseIf} $PreviousVersionState == 0
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "${PRODUCT_FULLNAME} is already installed. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Add/Remove/Reinstall components"
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Uninstall Avidemux"
+ Pop $ReinstallUninstallButton
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 2
+ ${EndIf}
+ ${Else}
+ MessageBox MB_ICONSTOP "Unknown value of PreviousVersionState, aborting" /SD IDOK
+ Abort
+ ${EndIf}
+
+ ${If} $ReinstallUninstall == "1"
+ SendMessage $ReinstallUninstallButton ${BM_SETCHECK} 1 0
+ ${Else}
+ SendMessage $R0 ${BM_SETCHECK} 1 0
+ ${EndIf}
+
+ nsDialogs::Show
+FunctionEnd
+
+Function ReinstallPageLeave
+ SendMessage $ReinstallUninstallButton ${BM_GETCHECK} 0 0 $R0
+
+ ${If} $R0 == 1
+ ; Option to uninstall old version selected
+ StrCpy $ReinstallUninstall 1
+ ${Else}
+ ; Custom up/downgrade or add/remove/reinstall
+ StrCpy $ReinstallUninstall 2
+ ${EndIf}
+
+ ${If} $ReinstallUninstall == 1
+ ${If} $PreviousVersionState == 0
+ Call RunUninstaller
+ Quit
+ ${Else}
+ ; Need to reload defaults. User could have
+ ; chosen custom, change something, went back and selected
+ ; the express option.
+ Call LoadPreviousSettings
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
+
+##########################
+# Uninstaller functions
+##########################
+Function un.onInit
+ SetShellVarContext all
+
+UAC_Elevate:
+ !insertmacro UAC_RunElevated
+ StrCmp 1223 $0 UAC_ElevationAborted
+ StrCmp 0 $0 0 UAC_Err
+ StrCmp 1 $1 0 UAC_Success
+ Quit
+
+UAC_Err:
+ MessageBox MB_ICONSTOP "Unable to elevate, error $0"
+ Abort
+
+UAC_ElevationAborted:
+ Abort
+
+UAC_Success:
+ StrCmp 1 $3 +4
+ StrCmp 3 $1 0 UAC_ElevationAborted
+ MessageBox MB_ICONSTOP "This installer requires admin access."
+ Goto UAC_Elevate
+FunctionEnd
+
+; TrimNewlines (copied from NSIS documentation)
+; input, top of stack (e.g. whatever$\r$\n)
+; output, top of stack (replaces, with e.g. whatever)
+; modifies no other variables.
+Function un.TrimNewlines
+ Exch $R0
+ Push $R1
+ Push $R2
+ StrCpy $R1 0
+
+loop:
+ IntOp $R1 $R1 - 1
+ StrCpy $R2 $R0 1 $R1
+ StrCmp $R2 "$\r" loop
+ StrCmp $R2 "$\n" loop
+ IntOp $R1 $R1 + 1
+ IntCmp $R1 0 no_trim_needed
+ StrCpy $R0 $R0 $R1
+
+no_trim_needed:
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+Function un.RemoveEmptyDirs
+ Pop $9
+ !define Index 'Line${__LINE__}'
+ FindFirst $0 $1 "$INSTDIR$9*"
+ StrCmp $0 "" "${Index}-End"
+"${Index}-Loop:"
+ StrCmp $1 "" "${Index}-End"
+ StrCmp $1 "." "${Index}-Next"
+ StrCmp $1 ".." "${Index}-Next"
+ Push $0
+ Push $1
+ Push $9
+ Push "$9$1\"
+ Call un.RemoveEmptyDirs
+ Pop $9
+ Pop $1
+ Pop $0
+;"${Index}-Remove:"
+ RMDir "$INSTDIR$9$1"
+"${Index}-Next:"
+ FindNext $0 $1
+ Goto "${Index}-Loop"
+"${Index}-End:"
+ FindClose $0
+ !undef Index
+FunctionEnd
+
+Function un.ConfirmPagePre
+ ${un.GetParameters} $R0
+ ${un.GetOptions} $R0 "/frominstall" $R1
+ ${Unless} ${Errors}
+ Abort
+ ${EndUnless}
+FunctionEnd
+
+Function un.FinishPagePre
+ ${un.GetParameters} $R0
+ ${un.GetOptions} $R0 "/frominstall" $R1
+ ${Unless} ${Errors}
+ SetRebootFlag false
+ Abort
+ ${EndUnless}
+FunctionEnd
diff --git a/avidemux/winInstaller/old/avidemux_cross.nsi b/avidemux/winInstaller/old/avidemux_cross.nsi
index d70f170a8f..73bf61eea0 100644
--- a/avidemux/winInstaller/old/avidemux_cross.nsi
+++ b/avidemux/winInstaller/old/avidemux_cross.nsi
@@ -1,1588 +1,1588 @@
-##########################
-# Included files
-##########################
-!addincludedir ${NSIDIR}
-!addplugindir ${NSIDIR}/plugin
-
-!include Sections.nsh
-!include MUI2.nsh
-!include nsDialogs.nsh
-!include Memento.nsh
-!include FileFunc.nsh
-!include UAC.nsh
-!include WinVer.nsh
-!include WordFunc.nsh
-#!include revision.nsh
-
-SetCompressor /SOLID lzma
-SetCompressorDictSize 96
-RequestExecutionLevel user
-
-##########################
-# Defines
-##########################
-!define BUILD_BITS 32
-!define QT_DIR /mingw/Qt/current/bin/
-!define ADM_SYSDIR /mingw/bin
-!define ADM_DIR /mingw/Release
-!define TOOLCHAIN_DIR /home/fx/mxe-octave/usr/lib/gcc/i686-pc-mingw32/4.7.2/
-#/home/fx/rub/mingw32/
-#!define NSIDIR "/home/fx/hudson/workspace/mingw_2.6.2_nsis/avidemux/winInstaller"
-#!define SVN_VERSION 6
-!define REVISION ${SVN_VERSION}
-!define EXEDIR "${NSIDIR}/install"
-
-!define CORE_VERSION "2.6"
-!define POINT_RELEASE "8"
-!define PRODUCT_VERSION "${CORE_VERSION}.${POINT_RELEASE}.${SVN_VERSION}"
-!define PRODUCT_NAME "Avidemux ${CORE_VERSION}"
-!define PRODUCT_FULLNAME "Avidemux ${PRODUCT_VERSION} (${BUILD_BITS}-bit Release)"
-
-!if ${BUILD_BITS} == 64
- !define SHORTCUT_NAME "${PRODUCT_NAME}"
- !define REG_GROUPNAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
-!else
- !define SHORTCUT_NAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
- !define REG_GROUPNAME "${PRODUCT_NAME}"
-!endif
-
-!define REGKEY "SOFTWARE\${REG_GROUPNAME}"
-!define UNINST_REGKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_GROUPNAME}"
-!define COMPANY "Free Software Foundation"
-!define URL "http://www.avidemux.org"
-
-OutFile "${EXEDIR}/avidemux_${CORE_VERSION}.${POINT_RELEASE}_r${REVISION}_win${BUILD_BITS}.exe"
-Name "${PRODUCT_FULLNAME}"
-
-##########################
-# Memento defines
-##########################
-!define MEMENTO_REGISTRY_ROOT HKLM
-!define MEMENTO_REGISTRY_KEY "${REGKEY}"
-
-##########################
-# MUI defines
-##########################
-!define MUI_ICON "${NSIDIR}/../common/xpm/adm.ico"
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_RIGHT
-!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}/PageHeader.bmp"
-!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGKEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
-!define MUI_STARTMENUPAGE_DEFAULTFOLDER Avidemux
-!define MUI_STARTMENUPAGE_NODISABLE
-!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
-!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
-!define MUI_UNICON "${NSIDIR}/../common/xpm/adm.ico"
-!define MUI_COMPONENTSPAGE_NODESC
-
-##########################
-# Variables
-##########################
-Var CreateDesktopIcon
-Var CreateStartMenuGroup
-Var CreateQuickLaunchIcon
-Var StartMenuGroup
-Var PreviousVersion
-Var PreviousVersionState
-Var ReinstallUninstall
-
-##########################
-# Installer pages
-##########################
-!define MUI_WELCOMEPAGE_TITLE "${PRODUCT_FULLNAME} Setup Wizard"
-!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_LICENSE "${NSIDIR}/License.rtf"
- Page custom ReinstallPage ReinstallPageLeave
-!insertmacro MUI_PAGE_COMPONENTS
-Page custom InstallOptionsPage
-!define MUI_PAGE_CUSTOMFUNCTION_PRE IsStartMenuRequired
-!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
-!insertmacro MUI_PAGE_DIRECTORY
-!define MUI_PAGE_CUSTOMFUNCTION_PRE ActivateInternalSections
-!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesPageShow
-!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesPageLeave
-!insertmacro MUI_PAGE_INSTFILES
-!define MUI_FINISHPAGE_RUN
-!define MUI_FINISHPAGE_RUN_FUNCTION RunAvidemux
-!define MUI_FINISHPAGE_RUN_TEXT "Run ${PRODUCT_NAME} now"
-!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR/Change Log.html"
-!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Change Log now"
-!define MUI_FINISHPAGE_LINK "Visit the Avidemux website"
-!define MUI_FINISHPAGE_LINK_LOCATION "http://avidemux.org/"
-!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfigureFinishPage
-!insertmacro MUI_PAGE_FINISH
-
-!define MUI_PAGE_CUSTOMFUNCTION_PRE un.ConfirmPagePre
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-!define MUI_PAGE_CUSTOMFUNCTION_PRE un.FinishPagePre
-!insertmacro MUI_UNPAGE_FINISH
-
-##########################
-# Installer languages
-##########################
-!insertmacro MUI_LANGUAGE English
-
-##########################
-# Installer attributes
-##########################
-!if ${BUILD_BITS} == 64
- InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
-!else
- InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
-!endif
-
-CRCCheck on
-XPStyle on
-ShowInstDetails nevershow
-ShowUninstDetails nevershow
-VIProductVersion ${PRODUCT_VERSION}
-VIAddVersionKey ProductName Avidemux
-VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
-VIAddVersionKey FileVersion ""
-VIAddVersionKey FileDescription ""
-VIAddVersionKey LegalCopyright ""
-InstallDirRegKey HKLM "${REGKEY}" Path
-BrandingText "Packaged by Gruntster"
-InstType Standard
-InstType Full
-#########################################
-#
-#########################################
-Function GetAfterChar
- Exch $0 ; chop char
- Exch
- Exch $1 ; input string
- Push $2
- Push $3
- StrCpy $2 0
- loop:
- IntOp $2 $2 - 1
- StrCpy $3 $1 1 $2
- StrCmp $3 "" 0 +3
- StrCpy $0 ""
- Goto exit2
- StrCmp $3 $0 exit1
- Goto loop
- exit1:
- IntOp $2 $2 + 1
- StrCpy $0 $1 "" $2
- exit2:
- Pop $3
- Pop $2
- Pop $1
- Exch $0 ; output
-FunctionEnd
-#####################################################################
-!define StrReplace '!insertmacro "_Name"'
-
-##########################
-# Uninstaller macros
-##########################
-!insertmacro un.GetOptions
-!insertmacro un.GetParameters
-
-!define UninstallLogPath "$INSTDIR\uninstall.log"
-Var UninstallLogHandle
-
-; Uninstall log file missing.
-LangString UninstallLogMissing ${LANG_ENGLISH} "uninstall.log not found!$\r$\nUninstallation cannot proceed!"
-# Regexep Does not work with cross
-# Use only one file at a time
-!macro InstallFile FILEZ
- File "${FILEZ}"
- Push "${FILEZ}"
- Push "/"
- Call GetAfterChar
- Pop $R0
- FileWrite $UninstallLogHandle "$OUTDIR\$R0$\r$\n"
-!macroend
-!define File "!insertmacro InstallFile"
-
-!macro InstallFolder FILEREGEX
- File /r "${FILEREGEX}/*"
- Push "$OUTDIR"
- Call InstallFolderInternal
-!macroend
-!define Folder "!insertmacro InstallFolder"
-
-Function InstallFolderInternal
- Pop $9
- !define Index 'Line${__LINE__}'
- FindFirst $0 $1 "$9/*"
- StrCmp $0 "" "${Index}-End"
-"${Index}-Loop:"
- StrCmp $1 "" "${Index}-End"
- StrCmp $1 "." "${Index}-Next"
- StrCmp $1 ".." "${Index}-Next"
- IfFileExists "$9\$1\*" 0 "${Index}-Write"
- Push $0
- Push $9
- Push "$9\$1"
- Call InstallFolderInternal
- Pop $9
- Pop $0
- Goto "${Index}-Next"
-"${Index}-Write:"
- FileWrite $UninstallLogHandle "$9\$1$\r$\n"
-"${Index}-Next:"
- FindNext $0 $1
- Goto "${Index}-Loop"
-"${Index}-End:"
- !undef Index
-FunctionEnd
-
-; WriteUninstaller macro
-!macro WriteUninstaller Path
- WriteUninstaller "${Path}"
- FileWrite $UninstallLogHandle "${Path}$\r$\n"
-!macroend
-!define WriteUninstaller "!insertmacro WriteUninstaller"
-
-##########################
-# Macros
-##########################
-
-!macro InstallQtLanguage LANG_NAME LANG_CODE
- SetOverwrite on
-
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} installQt${LANG_CODE} endQt${LANG_CODE}
-
-installQt${LANG_CODE}:
- SetOutPath $INSTDIR\i18n
- ${File} i18n/avidemux_${LANG_CODE}.qm
- ${File} i18n/qt_${LANG_CODE}.qm
-
-endQt${LANG_CODE}:
-!macroend
-
-##########################
-# Installer sections
-##########################
-Section -OpenLogFile
- CreateDirectory "$INSTDIR"
- FileOpen $UninstallLogHandle ${UninstallLogPath} a
- FileSeek $UninstallLogHandle 0 END
-SectionEnd
-
-Section "Avidemux Core" SecCore
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} "./Build Info.txt"
- ${File} "./last_changes.txt"
- ${File} "./Change Log.html"
-#
-#
- ${File} ${TOOLCHAIN_DIR}/libstdc++-6.dll
- ${File} ${TOOLCHAIN_DIR}/../libgcc_s_dw2-1.dll
-#
-#
- ${File} ${ADM_SYSDIR}/libsqlite3-0.dll
- ${File} ${ADM_SYSDIR}/libz.dll
- ${File} ${ADM_SYSDIR}/libpng15-15.dll
- ${File} ${ADM_SYSDIR}/libpthread.dll
-#
-#
- ${File} ${ADM_DIR}/libADM_audioParser6.dll
- ${File} ${ADM_DIR}/libADM_core6.dll
- ${File} ${ADM_DIR}/libADM_coreAudio6.dll
- ${File} ${ADM_DIR}/libADM_coreAudioDevice6.dll
- ${File} ${ADM_DIR}/libADM_coreAudioEncoder6.dll
- ${File} ${ADM_DIR}/libADM_coreAudioFilterAPI6.dll
- ${File} ${ADM_DIR}/libADM_coreDemuxer6.dll
- ${File} ${ADM_DIR}/libADM_coreDemuxerMpeg6.dll
- ${File} ${ADM_DIR}/libADM_coreImage6.dll
- ${File} ${ADM_DIR}/libADM_coreImageLoader6.dll
- ${File} ${ADM_DIR}/libADM_coreJobs.dll
- ${File} ${ADM_DIR}/libADM_coreMuxer6.dll
- ${File} ${ADM_DIR}/libADM_coreScript.dll
- ${File} ${ADM_DIR}/libADM_coreSocket6.dll
- ${File} ${ADM_DIR}/libADM_coreSqlLight3.dll
- ${File} ${ADM_DIR}/libADM_coreUI6.dll
- ${File} ${ADM_DIR}/libADM_coreUtils6.dll
- ${File} ${ADM_DIR}/libADM_coreVideoCodec6.dll
- ${File} ${ADM_DIR}/libADM_coreVideoEncoder6.dll
- ${File} ${ADM_DIR}/libADM_coreVideoFilter6.dll
- ${File} ${ADM_DIR}/libADM_coreSubtitle.dll
- ${File} ${QT_DIR}/QtCore4.dll
- ${File} ${QT_DIR}/QtGui4.dll
- ${File} ${NSIDIR}/../../AUTHORS.
- ${File} ${NSIDIR}/../../COPYING.
- ${File} ${NSIDIR}/../../README.
- ${File} ${ADM_DIR}/avcodec-*.dll
- ${File} ${ADM_DIR}/avformat-*.dll
- ${File} ${ADM_DIR}/avutil-*.dll
- ${File} ${ADM_DIR}/postproc-*.dll
- ${File} ${ADM_DIR}/swscale-*.dll
-
- WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
- WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
-
- ${If} ${AtMostWinVista}
- WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
- ${EndIf}
-SectionEnd
-
-SectionGroup /e "User interfaces" SecGrpUI
- ${MementoUnselectedSection} "Command Line" SecUiCli
- SectionIn 2
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${ADM_DIR}/avidemux_cli.exe
- ${File} ${ADM_DIR}/libADM_render6_cli.dll
- ${File} ${ADM_DIR}/libADM_UI_Cli6.dll
- ${MementoSectionEnd}
-
- ${MementoSection} Qt SecUiQt
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${ADM_DIR}/avidemux.exe
- ${File} ${ADM_DIR}/avidemux_jobs.exe
- ${File} ${ADM_DIR}/libADM_render6_QT4.dll
- ${File} ${ADM_DIR}/libADM_UIQT46.dll
- ${File} ${QT_DIR}/QtOpenGL4.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-
-SectionGroup "Audio Decoders" SecGrpAudioDecoder
- ${MementoSection} "µ-law" SecAudDecUlaw
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ulaw.dll
- ${MementoSectionEnd}
- ${MementoSection} "AAC (FAAD)" SecAudDecFaad
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_faad.dll
- #SetOutPath $INSTDIR
- ${MementoSectionEnd}
- ${MementoSection} "AAC, AC-3, ADPCM IMA AMV, DTS, E-AC-3, MP2, MP3, Nellymoser, QDesign, WMA (libavcodec)" SecAudDecAvcodec
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_lav.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (liba52)" SecAudDecA52
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_a52.dll
- ${MementoSectionEnd}
- ${MementoSection} "ADPCM IMA" SecAudDecImaAdpcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ima_adpcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "ADPCM Microsoft" SecAudDecMsAdpcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ms_adpcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "AMR-NB" SecAudDecOpencoreAmrNb
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_opencore_amrnb.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libopencore-amrnb-*.dll
- ${MementoSectionEnd}
- ${MementoSection} "AMR-WB" SecAudDecOpencoreAmrWb
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_opencore_amrwb.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libopencore-amrwb-*.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP2, MP3 (MAD)" SecAudDecMad
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_Mad.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vorbis" SecAudDecVorbis
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_vorbis.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libogg-0.dll
- ${File} ${ADM_SYSDIR}/libvorbis-0.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Audio Devices" SecGrpAudioDevice
- ${MementoSection} "Waveform" SecAudDevWaveform
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDevices
- ${File} ${ADM_DIR}/plugins/audioDevices/libADM_av_win32.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Audio Encoders" SecGrpAudioEncoder
- ${MementoSection} "AAC (FAAC)" SecAudEncFaac
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_faac.dll
- #SetOutPath $INSTDIR
- ${MementoSectionEnd}
- ${MementoSection} "AAC (libavcodec)" SecAudEncLavAac
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_aac.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (Aften)" SecAudDecAften
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_aften.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libaften.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (libavcodec)" SecAudEncLavAc3
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_ac3.dll
- ${MementoSectionEnd}
- #${MementoSection} "DTS (dcaenc)" SecAudDecDcaEnc
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\audioEncoders
- #${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_dcaenc.dll
- #SetOutPath $INSTDIR
- #${File} libdcaenc-0.dll
- #${MementoSectionEnd}
- ${MementoSection} "MP2 (libavcodec)" SecAudEncLavMp2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_mp2.dll
- SetOutPath $INSTDIR
- ${MementoSectionEnd}
- #${MementoSection} "MP2 (TwoLAME)" SecAudEncTwoLame
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\audioEncoders
- #${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_twolame.dll
- #${MementoSectionEnd}
- ${MementoSection} "MP3" SecAudEncLame
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lame.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libmp3lame-0.dll
- ${MementoSectionEnd}
- ${MementoSection} "PCM" SecAudEncPcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_pcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vorbis" SecAudEncVorbis
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_vorbis.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libogg-0.dll
- ${File} ${ADM_SYSDIR}/libvorbis-0.dll
- ${File} ${ADM_SYSDIR}/libvorbisenc-2.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Avisynth" SecGrpAvisynth
- ${MementoUnselectedSection} "Avisynth Proxy" SecAvsProxy
- SectionIn 2
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${ADM_SYSDIR}/avsproxy.exe
- ${File} ${ADM_SYSDIR}/avsproxy_gui.exe
- ${MementoSectionEnd}
- ${MementoUnselectedSection} "Avisynth Proxy Demuxer" SecDemuxAvisynth
- SectionIn 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_avsproxy.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Demuxers" SecGrpDemuxers
- ${MementoSection} "ASF" SecDemuxAsf
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_asf.dll
- ${MementoSectionEnd}
- ${MementoSection} "BMP, JPEG, PNG Images" SecDemuxImage
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_pic.dll
- ${MementoSectionEnd}
- ${MementoSection} "Flash Video" SecDemuxFlv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_flv.dll
- ${MementoSectionEnd}
- ${MementoSection} "Matroska" SecDemuxMatroska
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_matroska.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4" SecDemuxMp4
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_mp4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-PS" SecDemuxMpegPs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_ps.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-TS" SecDemuxMpegTs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_ts.dll
- ${MementoSectionEnd}
- ${MementoSection} "MXF" SecDemuxMxf
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_mxf.dll
- ${MementoSectionEnd}
- ${MementoSection} "OpenDML AVI" SecDemuxOpenDml
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_opendml.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Muxers" SecGrpMuxers
- ${MementoSection} "Dummy [Raw Audio/Video]" SecMuxDummy
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_dummy.dll
- ${MementoSectionEnd}
- ${MementoSection} "Flash Video" SecMuxLavFlv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_flv.dll
- ${MementoSectionEnd}
- ${MementoSection} "Matroska" SecMuxLavMatroska
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_Mkv.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4 (libavcodec)" SecMuxLavMp4
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_mp4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4 (MP4v2)" SecMuxMp4v2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_mp4v2.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-PS" SecMuxLavMpegPs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_ffPS.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-TS" SecMuxLavMpegTs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_ffTS.dll
- ${MementoSectionEnd}
- ${MementoSection} "OpenDML AVI" SecMuxOpenDml
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_avi.dll
- ${MementoSectionEnd}
- ${MementoSection} "Raw Video" SecMuxRaw
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_raw.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Script Engines" SecGrpScriptEngine
- #${MementoSection} "QtScript" SecScriptQt
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR
- #${File} ${QT_DIR}/QtScript4.dll
- #${File} ${QT_DIR}/QtScriptTools4.dll
- #SetOutPath $INSTDIR\plugins\scriptEngines
- #${File} ${ADM_DIR}/plugins/scriptEngines/libADM_script_qt.dll
- #SetOutPath $INSTDIR\help\QtScript
- #${Folder} help/QtScript
- #${MementoSectionEnd}
- ${MementoSection} "Tinypy" SecScriptTinypy
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\scriptEngines
- ${File} ${ADM_DIR}/plugins/scriptEngines/libADM_script_tinyPy.dll
- SetOutPath $INSTDIR\plugins\autoScripts
- ${Folder} ${ADM_DIR}/plugins/autoScripts
- ${MementoSectionEnd}
-SectionGroupEnd
-#SectionGroup "Video Decoders" SecGrpVideoDecoder
- #${MementoSection} "VP8" SecVidDecVpx
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoDecoders
- #${File} ${ADM_DIR}/plugins/videoDecoders/libADM_vd_vpx.dll
- #${MementoSectionEnd}
-#SectionGroupEnd
-SectionGroup "Video Encoders" SecGrpVideoEncoder
- ${MementoSection} "[Null]" SecVidEncNull
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_null.dll
- ${MementoSectionEnd}
- ${MementoSection} "Huffyuv, FFVHuff" SecVidEncLavHuffyuv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_huff.dll
- ${MementoSectionEnd}
- ${MementoSection} "JPEG" SecVidEncLavJpeg
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_jpeg.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-2" SecVidEncLavMpeg2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffMpeg2.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 ASP (libavcodec)" SecVidEncLavMpeg4asp
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffMpeg4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 ASP (Xvid)" SecVidEncXvid
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_xvid4.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/xvidcore.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 AVC" SecVidEncX264
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_x264_other.dll
-
- SetOutPath $INSTDIR\plugins\videoEncoders\qt4
- ${File} ${ADM_DIR}/plugins/videoEncoders/qt4/libADM_ve_x264_QT4.dll
-
- SetOutPath $INSTDIR\plugins\pluginSettings\x264
- ${Folder} ${ADM_DIR}/plugins/pluginSettings/x264
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libx264-*.dll
- #${File} ${ADM_SYSDIR}/pthreadGC2.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 HEVC" SecVidEncX265
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_x265_other.dll
-
- SetOutPath $INSTDIR\plugins\videoEncoders\qt4
- ${File} ${ADM_DIR}/plugins/videoEncoders/qt4/libADM_ve_x265_QT4.dll
-
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libx265*.dll
- #${File} ${ADM_SYSDIR}/pthreadGC2.dll
- ${MementoSectionEnd}
-${MementoSection} "PNG" SecVidEncLavPng
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_png.dll
- ${MementoSectionEnd}
- ${MementoSection} "Sorenson Spark" SecVidEncSorenson
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffFlv1.dll
- ${MementoSectionEnd}
- ${MementoSection} "YV12" SecVidEncYv12
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_yv12.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Video Filters" SecGrpVideoFilter
- SectionGroup "Transform Filters" SecGrpVideoFilterTransform
- ${MementoSection} "Add Black Borders" SecVidFltBlackBorders
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_addBorders.dll
- ${MementoSectionEnd}
- ${MementoSection} "Add Logo" SecVidFltLogo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_logo.dll
- ${MementoSectionEnd}
- ${MementoSection} "Blacken Borders" SecVidFltBlackenBorders
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_blackenBorders.dll
- ${MementoSectionEnd}
- ${MementoSection} "Change FPS" SecVidFltChangeFps
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_changeFps.dll
- ${MementoSectionEnd}
- ${MementoSection} "Crop" SecVidFltCrop
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_CropCli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_cropQt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Fade" SecVidFltFade
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_fadeToBlack.dll
- ${MementoSectionEnd}
- ${MementoSection} "Greyscale" SecVidFltLumaOnly
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_lumaOnly.dll
- ${MementoSectionEnd}
- ${MementoSection} "Horizontal Flip" SecVidFltHorizontalFlip
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_hf_hflip.dll
- ${MementoSectionEnd}
- ${MementoSection} "libswscale Resize" SecVidFltSwscaleResize
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_swscaleResize_cli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_swscaleResizeQT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Resample FPS" SecVidFltResampleFps
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_resampleFps.dll
- ${MementoSectionEnd}
- ${MementoSection} "Rotate" SecVidFltRotate
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_rotate.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vertical Flip" SecVidFltVerticalFlip
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_vflip.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Interlacing Filters" SecGrpVideoFilterInterlacing
- ${MementoSection} "Decomb Decimate" SecVidFltDecombDecimate
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_decimate.dll
- ${MementoSectionEnd}
- ${MementoSection} "Decomb Telecide" SecVidFltDecombTelecide
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_telecide.dll
- ${MementoSectionEnd}
- ${MementoSection} "DGBob" SecVidFltDgbob
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_DgBob.dll
- ${MementoSectionEnd}
- ${MementoSection} "Horizontal Stack Fields" SecVidFltHzStackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_hzstackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Kernel Deint" SecVidFltKernelDeint
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_kernelDeint.dll
- ${MementoSectionEnd}
- ${MementoSection} "libavcodec Deinterlacers" SecVidFltLavDeinterlacers
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_lavDeint.dll
- ${MementoSectionEnd}
- ${MementoSection} "Merge Fields" SecVidFltMergeFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_mergeField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Separate Fields" SecVidFltSeparateFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_separateField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Stack Fields" SecVidFltStackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_stackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Unstack Fields" SecVidFltUnstackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_unstackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Yadif" SecVidFltYadif
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_yadif.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Colour Filters" SecGrpVideoFilterColour
- ${MementoSection} "Avisynth Colour YUV" SecVidFltAvisynthColourYuv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_colorYuv.dll
- ${MementoSectionEnd}
- ${MementoSection} "ChromaShift" SecVidFltChromaShift
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_chromaShiftCli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_chromaShiftQt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Contrast" SecVidFltContrast
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_contrastCli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_contrastQt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlater Eq2" SecVidFltMplayerEq2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_eq2Cli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_eq2Qt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlater Hue" SecVidFltMplayerHue
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_HueCli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_HueQt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Remove Plane" SecVidFltRemovePlane
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_removePlane.dll
- ${MementoSectionEnd}
- ${MementoSection} "Swap U and V" SecVidFltSwapUandV
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_swapUV.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Noise Filters" SecGrpVideoFilterNoise
- ${MementoSection} "FluxSmooth" SecVidFltFluxSmooth
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_FluxSmooth.dll
- ${MementoSectionEnd}
- ${MementoSection} "Gaussian Convolution" SecVidFltGauss
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_gauss.dll
- ${MementoSectionEnd}
- ${MementoSection} "Large Median (5x5)" SecVidFltMediam5x5
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_largeMedian.dll
- ${MementoSectionEnd}
- ${MementoSection} "Mean Convolution" SecVidFltMean
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_mean.dll
- ${MementoSectionEnd}
- ${MementoSection} "Median Convolution" SecVidFltMedian
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_median.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Denoise 3D" SecVidFltMPlayerDenoise3d
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_denoise3d.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Denoise 3D HQ" SecVidFltMPlayerDenoise3dHq
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_denoise3dhq.dll
- ${MementoSectionEnd}
- ${MementoSection} "MSharpen" SecVidFltMSharpen
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_msharpen.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Sharpness Filters" SecGrpVideoFilterSharpness
- ${MementoSection} "asharp" SecVidFltAsharp
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_asharpQt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Delogo" SecVidFltMPlayerDelogo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_mpdelogoQt4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Sharpen" SecVidFltSharpen
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sharpen.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Subtitle Filters" SecGrpVideoFilterSubtitle
- ${MementoSection} "ASS, SSA" SecVidFltAssSsa
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_ssa.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libfribidi-0.dll
- ${File} ${ADM_SYSDIR}/libiconv-2.dll
- ${File} ${ADM_SYSDIR}/libfreetype-6.dll
- ${File} ${ADM_SYSDIR}/libfontconfig-1.dll
- ${File} ${ADM_SYSDIR}/libexpat-1.dll
- SetOutPath $INSTDIR\etc\fonts
- ${Folder} ${ADM_DIR}/etc/fonts
- ${MementoSectionEnd}
- SectionGroupEnd
- #SectionGroup "OpenGL Filters" SecGrpVideoFilterOpenGl
- #${MementoSection} "Fragment Shader" SecVidFltOpenGlFragmentShader
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sampleGlFrag2.dll
- #${MementoSectionEnd}
- #${MementoSection} "Read Back Benchmark" SecVidFltOpenGlReadBack
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_glBenchmark.dll
- #${MementoSectionEnd}
- #${MementoSection} "Resize" SecVidFltOpenGlResize
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_glResize.dll
- #${MementoSectionEnd}
- #${MementoSection} "Rotate" SecVidFltOpenGlRotate
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_rotateGlFrag2.dll
- #${MementoSectionEnd}
- #${MementoSection} "Wave" SecVidFltOpenGlWave
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sampleGlVertex.dll
- #${MementoSectionEnd}
- #SectionGroupEnd
- SectionGroup "Miscellaneous Filters" SecGrpVideoFilterMiscellaneous
- ${MementoSection} "Print Information" SecVidFltPrintInfo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_printInfo.dll
- ${MementoSectionEnd}
- SectionGroupEnd
-SectionGroupEnd
-
-${MementoSection} "-Start menu Change Log" SecStartMenuChangeLog
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk" "$INSTDIR\Change Log.html"
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Avidemux job control.lnk" $INSTDIR\avidemux_jobs.exe
- !insertmacro MUI_STARTMENU_WRITE_END
-${MementoSectionEnd}
-
-
-${MementoSection} "-Start menu Qt" SecStartMenuQt
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
- !insertmacro MUI_STARTMENU_WRITE_END
-${MementoSectionEnd}
-
-${MementoSection} "-Start menu AVS Proxy GUI" SecStartMenuAvsProxyGui
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk" "$INSTDIR\avsproxy_gui.exe"
- !insertmacro MUI_STARTMENU_WRITE_END
-${MementoSectionEnd}
-
-
-${MementoSection} "-Quick Launch Qt" SecQuickLaunchQt
- SetOutPath $INSTDIR
- CreateShortcut "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
-${MementoSectionEnd}
-
-
-${MementoSection} "-Desktop Qt" SecDesktopQt
- SetOutPath $INSTDIR
- CreateShortcut "$DESKTOP\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
-${MementoSectionEnd}
-
-${MementoSectionDone}
-
-Section -post SecUninstaller
- SectionIn 1 2
- WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
- WriteRegStr HKLM "${REGKEY}" Version ${PRODUCT_VERSION}
- SetOutPath $INSTDIR
- WriteUninstaller $INSTDIR\uninstall.exe
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayName "${SHORTCUT_NAME}"
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayVersion "${PRODUCT_VERSION}"
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayIcon $INSTDIR\uninstall.exe
- WriteRegStr HKLM "${UNINST_REGKEY}" UninstallString $INSTDIR\uninstall.exe
- WriteRegDWORD HKLM "${UNINST_REGKEY}" NoModify 1
- WriteRegDWORD HKLM "${UNINST_REGKEY}" NoRepair 1
-SectionEnd
-
-Section -CloseLogFile
- FileClose $UninstallLogHandle
- SetFileAttributes ${UninstallLogPath} HIDDEN
-SectionEnd
-
-Section Uninstall
- !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
-
-
- Delete /REBOOTOK "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk"
- Delete /REBOOTOK "$DESKTOP\${SHORTCUT_NAME}.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Avidemux job control.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk"
- RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
- DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
-
- DeleteRegKey HKLM "${UNINST_REGKEY}"
- DeleteRegValue HKLM "${REGKEY}" Path
- DeleteRegValue HKLM "${REGKEY}" CreateDesktopIcon
- DeleteRegValue HKLM "${REGKEY}" CreateStartMenuGroup
- DeleteRegValue HKLM "${REGKEY}" CreateQuickLaunchIcon
- DeleteRegKey /IfEmpty HKLM "${REGKEY}"
-
- FileOpen $UninstallLogHandle "${UninstallLogPath}" r
-UninstallLoop:
- ClearErrors
- FileRead $UninstallLogHandle $R0
- IfErrors UninstallEnd
- Push $R0
- Call un.TrimNewLines
- Pop $R0
- Delete "$R0"
- Goto UninstallLoop
-UninstallEnd:
- FileClose $UninstallLogHandle
- Delete "${UninstallLogPath}"
- Delete "$INSTDIR\uninstall.exe"
- Push "\"
- Call un.RemoveEmptyDirs
- RMDir "$INSTDIR"
-SectionEnd
-
-##########################
-# Installer functions
-##########################
-Function .onInit
-UAC_Elevate:
- !insertmacro UAC_RunElevated
- StrCmp 1223 $0 UAC_ElevationAborted
- StrCmp 0 $0 0 UAC_Err
- StrCmp 1 $1 0 UAC_Success
- Quit
-
-UAC_Err:
- MessageBox MB_ICONSTOP "Unable to elevate, error $0"
- Abort
-
-UAC_ElevationAborted:
- Abort
-
-UAC_Success:
- StrCmp 1 $3 +4
- StrCmp 3 $1 0 UAC_ElevationAborted
- MessageBox MB_ICONSTOP "This installer requires admin access."
- Goto UAC_Elevate
-
- Call LoadPreviousSettings
- ReadRegStr $PreviousVersion HKLM "${REGKEY}" Version
-
- ${If} $PreviousVersion != ""
- ${VersionCompare} ${PRODUCT_VERSION} $PreviousVersion $PreviousVersionState
- ${EndIf}
-
- InitPluginsDir
- SetShellVarContext all
-FunctionEnd
-
-Function .onInstSuccess
- ${MementoSectionSave}
-FunctionEnd
-
-Function LoadPreviousSettings
- ${MementoSectionRestore}
- !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
-
- ReadRegStr $CreateStartMenuGroup HKLM "${REGKEY}" CreateStartMenuGroup
-
- ${If} $CreateStartMenuGroup == ""
- StrCpy $CreateStartMenuGroup 1
- ${EndIf}
-
- ReadRegStr $CreateDesktopIcon HKLM "${REGKEY}" CreateDesktopIcon
-
- ${If} $CreateDesktopIcon == ""
- StrCpy $CreateDesktopIcon 1
- ${EndIf}
-
- ${If} ${AtMostWinVista}
- ReadRegStr $CreateQuickLaunchIcon HKLM "${REGKEY}" CreateQuickLaunchIcon
-
- ${If} $CreateQuickLaunchIcon == ""
- StrCpy $CreateQuickLaunchIcon 1
- ${EndIf}
- ${EndIf}
-
-FunctionEnd
-
-Function RunUninstaller
- ReadRegStr $R1 HKLM "${UNINST_REGKEY}" "UninstallString"
-
- ${If} $R1 == ""
- Return
- ${EndIf}
-
- ;Run uninstaller
- HideWindow
- ClearErrors
-
- ${If} $PreviousVersionState == 0
- ${AndIf} $ReinstallUninstall == 1
- ExecWait '$R1 _?=$INSTDIR'
- ${Else}
- ExecWait '$R1 /frominstall _?=$INSTDIR'
- ${EndIf}
-
- IfErrors NoRemoveUninstaller
- IfFileExists "$INSTDIR\uninstall.exe" 0 NoRemoveUninstaller
- Delete "$R1"
- RMDir $INSTDIR
-
-NoRemoveUninstaller:
-FunctionEnd
-
-Function CheckSelectedUIs
- !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_SELECTED} end checkPartial
-checkPartial:
- !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_PSELECTED} end displayError
-displayError:
- MessageBox MB_OK|MB_ICONSTOP "At least one User Interface must be selected."
- Abort
-end:
-FunctionEnd
-
-LangString INSTALL_OPTS_PAGE_TITLE ${LANG_ENGLISH} "Choose Install Options"
-LangString INSTALL_OPTS_PAGE_SUBTITLE ${LANG_ENGLISH} "Choose where to install Avidemux icons."
-Var dlgInstallOptions
-Var lblCreateIcons
-Var chkDesktop
-Var chkStartMenu
-Var chkQuickLaunch
-
-Function InstallOptionsPage
- Call IsInstallOptionsRequired
- !insertmacro MUI_HEADER_TEXT "$(INSTALL_OPTS_PAGE_TITLE)" "$(INSTALL_OPTS_PAGE_SUBTITLE)"
-
- nsDialogs::Create 1018
- Pop $dlgInstallOptions
-
- ${If} $dlgInstallOptions == error
- Abort
- ${EndIf}
-
- ${NSD_CreateLabel} 0 0u 100% 12u "Create icons for Avidemux:"
- Pop $lblCreateIcons
-
- ${NSD_CreateCheckBox} 0 18u 100% 12u "On my &Desktop"
- Pop $chkDesktop
- ${NSD_SetState} $chkDesktop $CreateDesktopIcon
- ${NSD_OnClick} $chkDesktop UpdateInstallOptions
-
- ${NSD_CreateCheckBox} 0 36u 100% 12u "In my &Start Menu Programs folder"
- Pop $chkStartMenu
- ${NSD_SetState} $chkStartMenu $CreateStartMenuGroup
- ${NSD_OnClick} $chkStartMenu UpdateInstallOptions
-
- ${If} ${AtMostWinVista}
- ${NSD_CreateCheckBox} 0 54u 100% 12u "In my &Quick Launch bar"
- Pop $chkQuickLaunch
- ${NSD_SetState} $chkQuickLaunch $CreateQuickLaunchIcon
- ${NSD_OnClick} $chkQuickLaunch UpdateInstallOptions
- ${EndIf}
- #${If} ${IsWin2003}
- #WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\avidemux.exe" "WIN2000"
- #${EndIf}
- #${If} ${IsWinXp}
- #WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\avidemux.exe" "WIN2000"
- #${EndIf}
- nsDialogs::Show
-FunctionEnd
-
-Function UpdateInstallOptions
- ${NSD_GetState} $chkDesktop $CreateDesktopIcon
- ${NSD_GetState} $chkStartMenu $CreateStartMenuGroup
- ${NSD_GetState} $chkQuickLaunch $CreateQuickLaunchIcon
-FunctionEnd
-
-Function IsInstallOptionsRequired
-Goto end
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} end resetOptions
-resetOptions:
-
- StrCpy $CreateDesktopIcon 0
- StrCpy $CreateStartMenuGroup 0
- StrCpy $CreateQuickLaunchIcon 0
- Abort
-
-end:
-FunctionEnd
-
-Function IsStartMenuRequired
- StrCmp $CreateStartMenuGroup 1 +2
- Abort
-FunctionEnd
-
-Function ActivateInternalSections
- #AVS Proxy GUI shortcut:
- SectionGetFlags ${SecAvsProxy} $0
- IntOp $0 $0 & ${SF_SELECTED}
- IntOp $0 $0 & $CreateStartMenuGroup
- SectionSetFlags ${SecStartMenuAvsProxyGui} $0
-
- #Change Log shortcut:
- SectionSetFlags ${SecStartMenuChangeLog} $CreateStartMenuGroup
-
- #Qt shortcuts:
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
-
- IntOp $1 $0 & $CreateDesktopIcon
- SectionSetFlags ${SecDesktopQt} $1
-
- IntOp $1 $0 & $CreateQuickLaunchIcon
- SectionSetFlags ${SecQuickLaunchQt} $1
-
- IntOp $1 $0 & $CreateStartMenuGroup
- SectionSetFlags ${SecStartMenuQt} $1
-FunctionEnd
-
-Function InstFilesPageShow
- ${If} $ReinstallUninstall != ""
- Call RunUninstaller
- BringToFront
- ${EndIf}
-FunctionEnd
-
-Function InstFilesPageLeave
- ; Don't advance automatically if details expanded
- FindWindow $R0 "#32770" "" $HWNDPARENT
- GetDlgItem $R0 $R0 1016
- System::Call user32::IsWindowVisible(i$R0)i.s
- Pop $R0
-
- StrCmp $R0 0 +2
- SetAutoClose false
-FunctionEnd
-
-Function ConfigureFinishPage
-
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
- StrCmp $0 ${SF_SELECTED} end
-
- DeleteINISec "$PLUGINSDIR\ioSpecial.ini" "Field 4"
-
-end:
-FunctionEnd
-
-Function RunAvidemux
- SetOutPath $INSTDIR
-
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
-
- !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\avidemux.exe" "" "" ""
-
- Goto end
-
-
-end:
-FunctionEnd
-
-Var ReinstallUninstallButton
-
-Function ReinstallPage
- ${If} $PreviousVersion == ""
- Abort
- ${EndIf}
-
- nsDialogs::Create /NOUNLOAD 1018
- Pop $0
-
- ${If} $PreviousVersionState == 1
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "An older version of Avidemux is installed on your system. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Upgrade Avidemux using previous settings (recommended)"
- Pop $ReinstallUninstallButton
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
- Pop $R0
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 1
- ${EndIf}
- ${ElseIf} $PreviousVersionState == 2
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "A newer version of Avidemux is already installed! It is not recommended that you downgrade to an older version. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Downgrade Avidemux using previous settings (recommended)"
- Pop $ReinstallUninstallButton
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
- Pop $R0
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 1
- ${EndIf}
- ${ElseIf} $PreviousVersionState == 0
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "${PRODUCT_FULLNAME} is already installed. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Add/Remove/Reinstall components"
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Uninstall Avidemux"
- Pop $ReinstallUninstallButton
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 2
- ${EndIf}
- ${Else}
- MessageBox MB_ICONSTOP "Unknown value of PreviousVersionState, aborting" /SD IDOK
- Abort
- ${EndIf}
-
- ${If} $ReinstallUninstall == "1"
- SendMessage $ReinstallUninstallButton ${BM_SETCHECK} 1 0
- ${Else}
- SendMessage $R0 ${BM_SETCHECK} 1 0
- ${EndIf}
-
- nsDialogs::Show
-FunctionEnd
-
-Function ReinstallPageLeave
- SendMessage $ReinstallUninstallButton ${BM_GETCHECK} 0 0 $R0
-
- ${If} $R0 == 1
- ; Option to uninstall old version selected
- StrCpy $ReinstallUninstall 1
- ${Else}
- ; Custom up/downgrade or add/remove/reinstall
- StrCpy $ReinstallUninstall 2
- ${EndIf}
-
- ${If} $ReinstallUninstall == 1
- ${If} $PreviousVersionState == 0
- Call RunUninstaller
- Quit
- ${Else}
- ; Need to reload defaults. User could have
- ; chosen custom, change something, went back and selected
- ; the express option.
- Call LoadPreviousSettings
- ${EndIf}
- ${EndIf}
-FunctionEnd
-
-
-##########################
-# Uninstaller functions
-##########################
-Function un.onInit
- SetShellVarContext all
-
-UAC_Elevate:
- !insertmacro UAC_RunElevated
- StrCmp 1223 $0 UAC_ElevationAborted
- StrCmp 0 $0 0 UAC_Err
- StrCmp 1 $1 0 UAC_Success
- Quit
-
-UAC_Err:
- MessageBox MB_ICONSTOP "Unable to elevate, error $0"
- Abort
-
-UAC_ElevationAborted:
- Abort
-
-UAC_Success:
- StrCmp 1 $3 +4
- StrCmp 3 $1 0 UAC_ElevationAborted
- MessageBox MB_ICONSTOP "This installer requires admin access."
- Goto UAC_Elevate
-FunctionEnd
-
-; TrimNewlines (copied from NSIS documentation)
-; input, top of stack (e.g. whatever$/r$/n)
-; output, top of stack (replaces, with e.g. whatever)
-; modifies no other variables.
-Function un.TrimNewlines
- Exch $R0
- Push $R1
- Push $R2
- StrCpy $R1 0
-
-loop:
- IntOp $R1 $R1 - 1
- StrCpy $R2 $R0 1 $R1
- StrCmp $R2 "$\r" loop
- StrCmp $R2 "$\n" loop
- IntOp $R1 $R1 + 1
- IntCmp $R1 0 no_trim_needed
- StrCpy $R0 $R0 $R1
-
-no_trim_needed:
- Pop $R2
- Pop $R1
- Exch $R0
-FunctionEnd
-
-Function un.RemoveEmptyDirs
- Pop $9
- !define Index 'Line${__LINE__}'
- FindFirst $0 $1 "$INSTDIR$9*"
- StrCmp $0 "" "${Index}-End"
-"${Index}-Loop:"
- StrCmp $1 "" "${Index}-End"
- StrCmp $1 "." "${Index}-Next"
- StrCmp $1 ".." "${Index}-Next"
- Push $0
- Push $1
- Push $9
- Push "$9$1\"
- Call un.RemoveEmptyDirs
- Pop $9
- Pop $1
- Pop $0
-;"${Index}-Remove:"
- RMDir "$INSTDIR$9$1"
-"${Index}-Next:"
- FindNext $0 $1
- Goto "${Index}-Loop"
-"${Index}-End:"
- FindClose $0
- !undef Index
-FunctionEnd
-
-Function un.ConfirmPagePre
- ${un.GetParameters} $R0
- ${un.GetOptions} $R0 "/frominstall" $R1
- ${Unless} ${Errors}
- Abort
- ${EndUnless}
-FunctionEnd
-
-Function un.FinishPagePre
- ${un.GetParameters} $R0
- ${un.GetOptions} $R0 "/frominstall" $R1
- ${Unless} ${Errors}
- SetRebootFlag false
- Abort
- ${EndUnless}
-FunctionEnd
+##########################
+# Included files
+##########################
+!addincludedir ${NSIDIR}
+!addplugindir ${NSIDIR}/plugin
+
+!include Sections.nsh
+!include MUI2.nsh
+!include nsDialogs.nsh
+!include Memento.nsh
+!include FileFunc.nsh
+!include UAC.nsh
+!include WinVer.nsh
+!include WordFunc.nsh
+#!include revision.nsh
+
+SetCompressor /SOLID lzma
+SetCompressorDictSize 96
+RequestExecutionLevel user
+
+##########################
+# Defines
+##########################
+!define BUILD_BITS 32
+!define QT_DIR /mingw/Qt/current/bin/
+!define ADM_SYSDIR /mingw/bin
+!define ADM_DIR /mingw/Release
+!define TOOLCHAIN_DIR /home/fx/mxe-octave/usr/lib/gcc/i686-pc-mingw32/4.7.2/
+#/home/fx/rub/mingw32/
+#!define NSIDIR "/home/fx/hudson/workspace/mingw_2.6.2_nsis/avidemux/winInstaller"
+#!define SVN_VERSION 6
+!define REVISION ${SVN_VERSION}
+!define EXEDIR "${NSIDIR}/install"
+
+!define CORE_VERSION "2.6"
+!define POINT_RELEASE "8"
+!define PRODUCT_VERSION "${CORE_VERSION}.${POINT_RELEASE}.${SVN_VERSION}"
+!define PRODUCT_NAME "Avidemux ${CORE_VERSION}"
+!define PRODUCT_FULLNAME "Avidemux ${PRODUCT_VERSION} (${BUILD_BITS}-bit Release)"
+
+!if ${BUILD_BITS} == 64
+ !define SHORTCUT_NAME "${PRODUCT_NAME}"
+ !define REG_GROUPNAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
+!else
+ !define SHORTCUT_NAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
+ !define REG_GROUPNAME "${PRODUCT_NAME}"
+!endif
+
+!define REGKEY "SOFTWARE\${REG_GROUPNAME}"
+!define UNINST_REGKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_GROUPNAME}"
+!define COMPANY "Free Software Foundation"
+!define URL "http://www.avidemux.org"
+
+OutFile "${EXEDIR}/avidemux_${CORE_VERSION}.${POINT_RELEASE}_r${REVISION}_win${BUILD_BITS}.exe"
+Name "${PRODUCT_FULLNAME}"
+
+##########################
+# Memento defines
+##########################
+!define MEMENTO_REGISTRY_ROOT HKLM
+!define MEMENTO_REGISTRY_KEY "${REGKEY}"
+
+##########################
+# MUI defines
+##########################
+!define MUI_ICON "${NSIDIR}/../common/xpm/adm.ico"
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_RIGHT
+!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}/PageHeader.bmp"
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGKEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER Avidemux
+!define MUI_STARTMENUPAGE_NODISABLE
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
+!define MUI_UNICON "${NSIDIR}/../common/xpm/adm.ico"
+!define MUI_COMPONENTSPAGE_NODESC
+
+##########################
+# Variables
+##########################
+Var CreateDesktopIcon
+Var CreateStartMenuGroup
+Var CreateQuickLaunchIcon
+Var StartMenuGroup
+Var PreviousVersion
+Var PreviousVersionState
+Var ReinstallUninstall
+
+##########################
+# Installer pages
+##########################
+!define MUI_WELCOMEPAGE_TITLE "${PRODUCT_FULLNAME} Setup Wizard"
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "${NSIDIR}/License.rtf"
+ Page custom ReinstallPage ReinstallPageLeave
+!insertmacro MUI_PAGE_COMPONENTS
+Page custom InstallOptionsPage
+!define MUI_PAGE_CUSTOMFUNCTION_PRE IsStartMenuRequired
+!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
+!insertmacro MUI_PAGE_DIRECTORY
+!define MUI_PAGE_CUSTOMFUNCTION_PRE ActivateInternalSections
+!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesPageShow
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesPageLeave
+!insertmacro MUI_PAGE_INSTFILES
+!define MUI_FINISHPAGE_RUN
+!define MUI_FINISHPAGE_RUN_FUNCTION RunAvidemux
+!define MUI_FINISHPAGE_RUN_TEXT "Run ${PRODUCT_NAME} now"
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR/Change Log.html"
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Change Log now"
+!define MUI_FINISHPAGE_LINK "Visit the Avidemux website"
+!define MUI_FINISHPAGE_LINK_LOCATION "http://avidemux.org/"
+!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfigureFinishPage
+!insertmacro MUI_PAGE_FINISH
+
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.ConfirmPagePre
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.FinishPagePre
+!insertmacro MUI_UNPAGE_FINISH
+
+##########################
+# Installer languages
+##########################
+!insertmacro MUI_LANGUAGE English
+
+##########################
+# Installer attributes
+##########################
+!if ${BUILD_BITS} == 64
+ InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
+!else
+ InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
+!endif
+
+CRCCheck on
+XPStyle on
+ShowInstDetails nevershow
+ShowUninstDetails nevershow
+VIProductVersion ${PRODUCT_VERSION}
+VIAddVersionKey ProductName Avidemux
+VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
+VIAddVersionKey FileVersion ""
+VIAddVersionKey FileDescription ""
+VIAddVersionKey LegalCopyright ""
+InstallDirRegKey HKLM "${REGKEY}" Path
+BrandingText "Packaged by Gruntster"
+InstType Standard
+InstType Full
+#########################################
+#
+#########################################
+Function GetAfterChar
+ Exch $0 ; chop char
+ Exch
+ Exch $1 ; input string
+ Push $2
+ Push $3
+ StrCpy $2 0
+ loop:
+ IntOp $2 $2 - 1
+ StrCpy $3 $1 1 $2
+ StrCmp $3 "" 0 +3
+ StrCpy $0 ""
+ Goto exit2
+ StrCmp $3 $0 exit1
+ Goto loop
+ exit1:
+ IntOp $2 $2 + 1
+ StrCpy $0 $1 "" $2
+ exit2:
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0 ; output
+FunctionEnd
+#####################################################################
+!define StrReplace '!insertmacro "_Name"'
+
+##########################
+# Uninstaller macros
+##########################
+!insertmacro un.GetOptions
+!insertmacro un.GetParameters
+
+!define UninstallLogPath "$INSTDIR\uninstall.log"
+Var UninstallLogHandle
+
+; Uninstall log file missing.
+LangString UninstallLogMissing ${LANG_ENGLISH} "uninstall.log not found!$\r$\nUninstallation cannot proceed!"
+# Regexep Does not work with cross
+# Use only one file at a time
+!macro InstallFile FILEZ
+ File "${FILEZ}"
+ Push "${FILEZ}"
+ Push "/"
+ Call GetAfterChar
+ Pop $R0
+ FileWrite $UninstallLogHandle "$OUTDIR\$R0$\r$\n"
+!macroend
+!define File "!insertmacro InstallFile"
+
+!macro InstallFolder FILEREGEX
+ File /r "${FILEREGEX}/*"
+ Push "$OUTDIR"
+ Call InstallFolderInternal
+!macroend
+!define Folder "!insertmacro InstallFolder"
+
+Function InstallFolderInternal
+ Pop $9
+ !define Index 'Line${__LINE__}'
+ FindFirst $0 $1 "$9/*"
+ StrCmp $0 "" "${Index}-End"
+"${Index}-Loop:"
+ StrCmp $1 "" "${Index}-End"
+ StrCmp $1 "." "${Index}-Next"
+ StrCmp $1 ".." "${Index}-Next"
+ IfFileExists "$9\$1\*" 0 "${Index}-Write"
+ Push $0
+ Push $9
+ Push "$9\$1"
+ Call InstallFolderInternal
+ Pop $9
+ Pop $0
+ Goto "${Index}-Next"
+"${Index}-Write:"
+ FileWrite $UninstallLogHandle "$9\$1$\r$\n"
+"${Index}-Next:"
+ FindNext $0 $1
+ Goto "${Index}-Loop"
+"${Index}-End:"
+ !undef Index
+FunctionEnd
+
+; WriteUninstaller macro
+!macro WriteUninstaller Path
+ WriteUninstaller "${Path}"
+ FileWrite $UninstallLogHandle "${Path}$\r$\n"
+!macroend
+!define WriteUninstaller "!insertmacro WriteUninstaller"
+
+##########################
+# Macros
+##########################
+
+!macro InstallQtLanguage LANG_NAME LANG_CODE
+ SetOverwrite on
+
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} installQt${LANG_CODE} endQt${LANG_CODE}
+
+installQt${LANG_CODE}:
+ SetOutPath $INSTDIR\i18n
+ ${File} i18n/avidemux_${LANG_CODE}.qm
+ ${File} i18n/qt_${LANG_CODE}.qm
+
+endQt${LANG_CODE}:
+!macroend
+
+##########################
+# Installer sections
+##########################
+Section -OpenLogFile
+ CreateDirectory "$INSTDIR"
+ FileOpen $UninstallLogHandle ${UninstallLogPath} a
+ FileSeek $UninstallLogHandle 0 END
+SectionEnd
+
+Section "Avidemux Core" SecCore
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} "./Build Info.txt"
+ ${File} "./last_changes.txt"
+ ${File} "./Change Log.html"
+#
+#
+ ${File} ${TOOLCHAIN_DIR}/libstdc++-6.dll
+ ${File} ${TOOLCHAIN_DIR}/../libgcc_s_dw2-1.dll
+#
+#
+ ${File} ${ADM_SYSDIR}/libsqlite3-0.dll
+ ${File} ${ADM_SYSDIR}/libz.dll
+ ${File} ${ADM_SYSDIR}/libpng15-15.dll
+ ${File} ${ADM_SYSDIR}/libpthread.dll
+#
+#
+ ${File} ${ADM_DIR}/libADM_audioParser6.dll
+ ${File} ${ADM_DIR}/libADM_core6.dll
+ ${File} ${ADM_DIR}/libADM_coreAudio6.dll
+ ${File} ${ADM_DIR}/libADM_coreAudioDevice6.dll
+ ${File} ${ADM_DIR}/libADM_coreAudioEncoder6.dll
+ ${File} ${ADM_DIR}/libADM_coreAudioFilterAPI6.dll
+ ${File} ${ADM_DIR}/libADM_coreDemuxer6.dll
+ ${File} ${ADM_DIR}/libADM_coreDemuxerMpeg6.dll
+ ${File} ${ADM_DIR}/libADM_coreImage6.dll
+ ${File} ${ADM_DIR}/libADM_coreImageLoader6.dll
+ ${File} ${ADM_DIR}/libADM_coreJobs.dll
+ ${File} ${ADM_DIR}/libADM_coreMuxer6.dll
+ ${File} ${ADM_DIR}/libADM_coreScript.dll
+ ${File} ${ADM_DIR}/libADM_coreSocket6.dll
+ ${File} ${ADM_DIR}/libADM_coreSqlLight3.dll
+ ${File} ${ADM_DIR}/libADM_coreUI6.dll
+ ${File} ${ADM_DIR}/libADM_coreUtils6.dll
+ ${File} ${ADM_DIR}/libADM_coreVideoCodec6.dll
+ ${File} ${ADM_DIR}/libADM_coreVideoEncoder6.dll
+ ${File} ${ADM_DIR}/libADM_coreVideoFilter6.dll
+ ${File} ${ADM_DIR}/libADM_coreSubtitle.dll
+ ${File} ${QT_DIR}/QtCore4.dll
+ ${File} ${QT_DIR}/QtGui4.dll
+ ${File} ${NSIDIR}/../../AUTHORS.
+ ${File} ${NSIDIR}/../../COPYING.
+ ${File} ${NSIDIR}/../../README.
+ ${File} ${ADM_DIR}/avcodec-*.dll
+ ${File} ${ADM_DIR}/avformat-*.dll
+ ${File} ${ADM_DIR}/avutil-*.dll
+ ${File} ${ADM_DIR}/postproc-*.dll
+ ${File} ${ADM_DIR}/swscale-*.dll
+
+ WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
+ WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
+
+ ${If} ${AtMostWinVista}
+ WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
+ ${EndIf}
+SectionEnd
+
+SectionGroup /e "User interfaces" SecGrpUI
+ ${MementoUnselectedSection} "Command Line" SecUiCli
+ SectionIn 2
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${ADM_DIR}/avidemux_cli.exe
+ ${File} ${ADM_DIR}/libADM_render6_cli.dll
+ ${File} ${ADM_DIR}/libADM_UI_Cli6.dll
+ ${MementoSectionEnd}
+
+ ${MementoSection} Qt SecUiQt
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${ADM_DIR}/avidemux.exe
+ ${File} ${ADM_DIR}/avidemux_jobs.exe
+ ${File} ${ADM_DIR}/libADM_render6_QT4.dll
+ ${File} ${ADM_DIR}/libADM_UIQT46.dll
+ ${File} ${QT_DIR}/QtOpenGL4.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+
+SectionGroup "Audio Decoders" SecGrpAudioDecoder
+ ${MementoSection} "µ-law" SecAudDecUlaw
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ulaw.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC (FAAD)" SecAudDecFaad
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_faad.dll
+ #SetOutPath $INSTDIR
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC, AC-3, ADPCM IMA AMV, DTS, E-AC-3, MP2, MP3, Nellymoser, QDesign, WMA (libavcodec)" SecAudDecAvcodec
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_lav.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (liba52)" SecAudDecA52
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_a52.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ADPCM IMA" SecAudDecImaAdpcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ima_adpcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ADPCM Microsoft" SecAudDecMsAdpcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ms_adpcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AMR-NB" SecAudDecOpencoreAmrNb
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_opencore_amrnb.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libopencore-amrnb-*.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AMR-WB" SecAudDecOpencoreAmrWb
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_opencore_amrwb.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libopencore-amrwb-*.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP2, MP3 (MAD)" SecAudDecMad
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_Mad.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vorbis" SecAudDecVorbis
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_vorbis.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libogg-0.dll
+ ${File} ${ADM_SYSDIR}/libvorbis-0.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Audio Devices" SecGrpAudioDevice
+ ${MementoSection} "Waveform" SecAudDevWaveform
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDevices
+ ${File} ${ADM_DIR}/plugins/audioDevices/libADM_av_win32.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Audio Encoders" SecGrpAudioEncoder
+ ${MementoSection} "AAC (FAAC)" SecAudEncFaac
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_faac.dll
+ #SetOutPath $INSTDIR
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC (libavcodec)" SecAudEncLavAac
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_aac.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (Aften)" SecAudDecAften
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_aften.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libaften.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (libavcodec)" SecAudEncLavAc3
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_ac3.dll
+ ${MementoSectionEnd}
+ #${MementoSection} "DTS (dcaenc)" SecAudDecDcaEnc
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\audioEncoders
+ #${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_dcaenc.dll
+ #SetOutPath $INSTDIR
+ #${File} libdcaenc-0.dll
+ #${MementoSectionEnd}
+ ${MementoSection} "MP2 (libavcodec)" SecAudEncLavMp2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_mp2.dll
+ SetOutPath $INSTDIR
+ ${MementoSectionEnd}
+ #${MementoSection} "MP2 (TwoLAME)" SecAudEncTwoLame
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\audioEncoders
+ #${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_twolame.dll
+ #${MementoSectionEnd}
+ ${MementoSection} "MP3" SecAudEncLame
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lame.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libmp3lame-0.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "PCM" SecAudEncPcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_pcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vorbis" SecAudEncVorbis
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_vorbis.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libogg-0.dll
+ ${File} ${ADM_SYSDIR}/libvorbis-0.dll
+ ${File} ${ADM_SYSDIR}/libvorbisenc-2.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Avisynth" SecGrpAvisynth
+ ${MementoUnselectedSection} "Avisynth Proxy" SecAvsProxy
+ SectionIn 2
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${ADM_SYSDIR}/avsproxy.exe
+ ${File} ${ADM_SYSDIR}/avsproxy_gui.exe
+ ${MementoSectionEnd}
+ ${MementoUnselectedSection} "Avisynth Proxy Demuxer" SecDemuxAvisynth
+ SectionIn 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_avsproxy.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Demuxers" SecGrpDemuxers
+ ${MementoSection} "ASF" SecDemuxAsf
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_asf.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "BMP, JPEG, PNG Images" SecDemuxImage
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_pic.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Flash Video" SecDemuxFlv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_flv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Matroska" SecDemuxMatroska
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_matroska.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4" SecDemuxMp4
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_mp4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-PS" SecDemuxMpegPs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_ps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-TS" SecDemuxMpegTs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_ts.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MXF" SecDemuxMxf
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_mxf.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "OpenDML AVI" SecDemuxOpenDml
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_opendml.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Muxers" SecGrpMuxers
+ ${MementoSection} "Dummy [Raw Audio/Video]" SecMuxDummy
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_dummy.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Flash Video" SecMuxLavFlv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_flv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Matroska" SecMuxLavMatroska
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_Mkv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4 (libavcodec)" SecMuxLavMp4
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_mp4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4 (MP4v2)" SecMuxMp4v2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_mp4v2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-PS" SecMuxLavMpegPs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_ffPS.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-TS" SecMuxLavMpegTs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_ffTS.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "OpenDML AVI" SecMuxOpenDml
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_avi.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Raw Video" SecMuxRaw
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_raw.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Script Engines" SecGrpScriptEngine
+ #${MementoSection} "QtScript" SecScriptQt
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR
+ #${File} ${QT_DIR}/QtScript4.dll
+ #${File} ${QT_DIR}/QtScriptTools4.dll
+ #SetOutPath $INSTDIR\plugins\scriptEngines
+ #${File} ${ADM_DIR}/plugins/scriptEngines/libADM_script_qt.dll
+ #SetOutPath $INSTDIR\help\QtScript
+ #${Folder} help/QtScript
+ #${MementoSectionEnd}
+ ${MementoSection} "Tinypy" SecScriptTinypy
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\scriptEngines
+ ${File} ${ADM_DIR}/plugins/scriptEngines/libADM_script_tinyPy.dll
+ SetOutPath $INSTDIR\plugins\autoScripts
+ ${Folder} ${ADM_DIR}/plugins/autoScripts
+ ${MementoSectionEnd}
+SectionGroupEnd
+#SectionGroup "Video Decoders" SecGrpVideoDecoder
+ #${MementoSection} "VP8" SecVidDecVpx
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoDecoders
+ #${File} ${ADM_DIR}/plugins/videoDecoders/libADM_vd_vpx.dll
+ #${MementoSectionEnd}
+#SectionGroupEnd
+SectionGroup "Video Encoders" SecGrpVideoEncoder
+ ${MementoSection} "[Null]" SecVidEncNull
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_null.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Huffyuv, FFVHuff" SecVidEncLavHuffyuv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_huff.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "JPEG" SecVidEncLavJpeg
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_jpeg.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-2" SecVidEncLavMpeg2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffMpeg2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 ASP (libavcodec)" SecVidEncLavMpeg4asp
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffMpeg4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 ASP (Xvid)" SecVidEncXvid
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_xvid4.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/xvidcore.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 AVC" SecVidEncX264
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_x264_other.dll
+
+ SetOutPath $INSTDIR\plugins\videoEncoders\qt4
+ ${File} ${ADM_DIR}/plugins/videoEncoders/qt4/libADM_ve_x264_QT4.dll
+
+ SetOutPath $INSTDIR\plugins\pluginSettings\x264
+ ${Folder} ${ADM_DIR}/plugins/pluginSettings/x264
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libx264-*.dll
+ #${File} ${ADM_SYSDIR}/pthreadGC2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 HEVC" SecVidEncX265
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_x265_other.dll
+
+ SetOutPath $INSTDIR\plugins\videoEncoders\qt4
+ ${File} ${ADM_DIR}/plugins/videoEncoders/qt4/libADM_ve_x265_QT4.dll
+
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libx265*.dll
+ #${File} ${ADM_SYSDIR}/pthreadGC2.dll
+ ${MementoSectionEnd}
+${MementoSection} "PNG" SecVidEncLavPng
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_png.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Sorenson Spark" SecVidEncSorenson
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffFlv1.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "YV12" SecVidEncYv12
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_yv12.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Video Filters" SecGrpVideoFilter
+ SectionGroup "Transform Filters" SecGrpVideoFilterTransform
+ ${MementoSection} "Add Black Borders" SecVidFltBlackBorders
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_addBorders.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Add Logo" SecVidFltLogo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_logo.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Blacken Borders" SecVidFltBlackenBorders
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_blackenBorders.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Change FPS" SecVidFltChangeFps
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_changeFps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Crop" SecVidFltCrop
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_CropCli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_cropQt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Fade" SecVidFltFade
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_fadeToBlack.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Greyscale" SecVidFltLumaOnly
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_lumaOnly.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Horizontal Flip" SecVidFltHorizontalFlip
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_hf_hflip.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "libswscale Resize" SecVidFltSwscaleResize
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_swscaleResize_cli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_swscaleResizeQT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Resample FPS" SecVidFltResampleFps
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_resampleFps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Rotate" SecVidFltRotate
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_rotate.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vertical Flip" SecVidFltVerticalFlip
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_vflip.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Interlacing Filters" SecGrpVideoFilterInterlacing
+ ${MementoSection} "Decomb Decimate" SecVidFltDecombDecimate
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_decimate.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Decomb Telecide" SecVidFltDecombTelecide
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_telecide.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "DGBob" SecVidFltDgbob
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_DgBob.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Horizontal Stack Fields" SecVidFltHzStackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_hzstackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Kernel Deint" SecVidFltKernelDeint
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_kernelDeint.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "libavcodec Deinterlacers" SecVidFltLavDeinterlacers
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_lavDeint.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Merge Fields" SecVidFltMergeFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_mergeField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Separate Fields" SecVidFltSeparateFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_separateField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Stack Fields" SecVidFltStackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_stackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Unstack Fields" SecVidFltUnstackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_unstackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Yadif" SecVidFltYadif
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_yadif.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Colour Filters" SecGrpVideoFilterColour
+ ${MementoSection} "Avisynth Colour YUV" SecVidFltAvisynthColourYuv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_colorYuv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ChromaShift" SecVidFltChromaShift
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_chromaShiftCli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_chromaShiftQt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Contrast" SecVidFltContrast
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_contrastCli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_contrastQt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlater Eq2" SecVidFltMplayerEq2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_eq2Cli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_eq2Qt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlater Hue" SecVidFltMplayerHue
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_HueCli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_HueQt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Remove Plane" SecVidFltRemovePlane
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_removePlane.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Swap U and V" SecVidFltSwapUandV
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_swapUV.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Noise Filters" SecGrpVideoFilterNoise
+ ${MementoSection} "FluxSmooth" SecVidFltFluxSmooth
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_FluxSmooth.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Gaussian Convolution" SecVidFltGauss
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_gauss.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Large Median (5x5)" SecVidFltMediam5x5
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_largeMedian.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Mean Convolution" SecVidFltMean
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_mean.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Median Convolution" SecVidFltMedian
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_median.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Denoise 3D" SecVidFltMPlayerDenoise3d
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_denoise3d.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Denoise 3D HQ" SecVidFltMPlayerDenoise3dHq
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_denoise3dhq.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MSharpen" SecVidFltMSharpen
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_msharpen.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Sharpness Filters" SecGrpVideoFilterSharpness
+ ${MementoSection} "asharp" SecVidFltAsharp
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_asharpQt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Delogo" SecVidFltMPlayerDelogo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_mpdelogoQt4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Sharpen" SecVidFltSharpen
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sharpen.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Subtitle Filters" SecGrpVideoFilterSubtitle
+ ${MementoSection} "ASS, SSA" SecVidFltAssSsa
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_ssa.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libfribidi-0.dll
+ ${File} ${ADM_SYSDIR}/libiconv-2.dll
+ ${File} ${ADM_SYSDIR}/libfreetype-6.dll
+ ${File} ${ADM_SYSDIR}/libfontconfig-1.dll
+ ${File} ${ADM_SYSDIR}/libexpat-1.dll
+ SetOutPath $INSTDIR\etc\fonts
+ ${Folder} ${ADM_DIR}/etc/fonts
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ #SectionGroup "OpenGL Filters" SecGrpVideoFilterOpenGl
+ #${MementoSection} "Fragment Shader" SecVidFltOpenGlFragmentShader
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sampleGlFrag2.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Read Back Benchmark" SecVidFltOpenGlReadBack
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_glBenchmark.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Resize" SecVidFltOpenGlResize
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_glResize.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Rotate" SecVidFltOpenGlRotate
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_rotateGlFrag2.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Wave" SecVidFltOpenGlWave
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sampleGlVertex.dll
+ #${MementoSectionEnd}
+ #SectionGroupEnd
+ SectionGroup "Miscellaneous Filters" SecGrpVideoFilterMiscellaneous
+ ${MementoSection} "Print Information" SecVidFltPrintInfo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_printInfo.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+SectionGroupEnd
+
+${MementoSection} "-Start menu Change Log" SecStartMenuChangeLog
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk" "$INSTDIR\Change Log.html"
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Avidemux job control.lnk" $INSTDIR\avidemux_jobs.exe
+ !insertmacro MUI_STARTMENU_WRITE_END
+${MementoSectionEnd}
+
+
+${MementoSection} "-Start menu Qt" SecStartMenuQt
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+ !insertmacro MUI_STARTMENU_WRITE_END
+${MementoSectionEnd}
+
+${MementoSection} "-Start menu AVS Proxy GUI" SecStartMenuAvsProxyGui
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk" "$INSTDIR\avsproxy_gui.exe"
+ !insertmacro MUI_STARTMENU_WRITE_END
+${MementoSectionEnd}
+
+
+${MementoSection} "-Quick Launch Qt" SecQuickLaunchQt
+ SetOutPath $INSTDIR
+ CreateShortcut "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+${MementoSectionEnd}
+
+
+${MementoSection} "-Desktop Qt" SecDesktopQt
+ SetOutPath $INSTDIR
+ CreateShortcut "$DESKTOP\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+${MementoSectionEnd}
+
+${MementoSectionDone}
+
+Section -post SecUninstaller
+ SectionIn 1 2
+ WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
+ WriteRegStr HKLM "${REGKEY}" Version ${PRODUCT_VERSION}
+ SetOutPath $INSTDIR
+ WriteUninstaller $INSTDIR\uninstall.exe
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayName "${SHORTCUT_NAME}"
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayVersion "${PRODUCT_VERSION}"
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayIcon $INSTDIR\uninstall.exe
+ WriteRegStr HKLM "${UNINST_REGKEY}" UninstallString $INSTDIR\uninstall.exe
+ WriteRegDWORD HKLM "${UNINST_REGKEY}" NoModify 1
+ WriteRegDWORD HKLM "${UNINST_REGKEY}" NoRepair 1
+SectionEnd
+
+Section -CloseLogFile
+ FileClose $UninstallLogHandle
+ SetFileAttributes ${UninstallLogPath} HIDDEN
+SectionEnd
+
+Section Uninstall
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+
+
+ Delete /REBOOTOK "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk"
+ Delete /REBOOTOK "$DESKTOP\${SHORTCUT_NAME}.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Avidemux job control.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk"
+ RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
+ DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
+
+ DeleteRegKey HKLM "${UNINST_REGKEY}"
+ DeleteRegValue HKLM "${REGKEY}" Path
+ DeleteRegValue HKLM "${REGKEY}" CreateDesktopIcon
+ DeleteRegValue HKLM "${REGKEY}" CreateStartMenuGroup
+ DeleteRegValue HKLM "${REGKEY}" CreateQuickLaunchIcon
+ DeleteRegKey /IfEmpty HKLM "${REGKEY}"
+
+ FileOpen $UninstallLogHandle "${UninstallLogPath}" r
+UninstallLoop:
+ ClearErrors
+ FileRead $UninstallLogHandle $R0
+ IfErrors UninstallEnd
+ Push $R0
+ Call un.TrimNewLines
+ Pop $R0
+ Delete "$R0"
+ Goto UninstallLoop
+UninstallEnd:
+ FileClose $UninstallLogHandle
+ Delete "${UninstallLogPath}"
+ Delete "$INSTDIR\uninstall.exe"
+ Push "\"
+ Call un.RemoveEmptyDirs
+ RMDir "$INSTDIR"
+SectionEnd
+
+##########################
+# Installer functions
+##########################
+Function .onInit
+UAC_Elevate:
+ !insertmacro UAC_RunElevated
+ StrCmp 1223 $0 UAC_ElevationAborted
+ StrCmp 0 $0 0 UAC_Err
+ StrCmp 1 $1 0 UAC_Success
+ Quit
+
+UAC_Err:
+ MessageBox MB_ICONSTOP "Unable to elevate, error $0"
+ Abort
+
+UAC_ElevationAborted:
+ Abort
+
+UAC_Success:
+ StrCmp 1 $3 +4
+ StrCmp 3 $1 0 UAC_ElevationAborted
+ MessageBox MB_ICONSTOP "This installer requires admin access."
+ Goto UAC_Elevate
+
+ Call LoadPreviousSettings
+ ReadRegStr $PreviousVersion HKLM "${REGKEY}" Version
+
+ ${If} $PreviousVersion != ""
+ ${VersionCompare} ${PRODUCT_VERSION} $PreviousVersion $PreviousVersionState
+ ${EndIf}
+
+ InitPluginsDir
+ SetShellVarContext all
+FunctionEnd
+
+Function .onInstSuccess
+ ${MementoSectionSave}
+FunctionEnd
+
+Function LoadPreviousSettings
+ ${MementoSectionRestore}
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+
+ ReadRegStr $CreateStartMenuGroup HKLM "${REGKEY}" CreateStartMenuGroup
+
+ ${If} $CreateStartMenuGroup == ""
+ StrCpy $CreateStartMenuGroup 1
+ ${EndIf}
+
+ ReadRegStr $CreateDesktopIcon HKLM "${REGKEY}" CreateDesktopIcon
+
+ ${If} $CreateDesktopIcon == ""
+ StrCpy $CreateDesktopIcon 1
+ ${EndIf}
+
+ ${If} ${AtMostWinVista}
+ ReadRegStr $CreateQuickLaunchIcon HKLM "${REGKEY}" CreateQuickLaunchIcon
+
+ ${If} $CreateQuickLaunchIcon == ""
+ StrCpy $CreateQuickLaunchIcon 1
+ ${EndIf}
+ ${EndIf}
+
+FunctionEnd
+
+Function RunUninstaller
+ ReadRegStr $R1 HKLM "${UNINST_REGKEY}" "UninstallString"
+
+ ${If} $R1 == ""
+ Return
+ ${EndIf}
+
+ ;Run uninstaller
+ HideWindow
+ ClearErrors
+
+ ${If} $PreviousVersionState == 0
+ ${AndIf} $ReinstallUninstall == 1
+ ExecWait '$R1 _?=$INSTDIR'
+ ${Else}
+ ExecWait '$R1 /frominstall _?=$INSTDIR'
+ ${EndIf}
+
+ IfErrors NoRemoveUninstaller
+ IfFileExists "$INSTDIR\uninstall.exe" 0 NoRemoveUninstaller
+ Delete "$R1"
+ RMDir $INSTDIR
+
+NoRemoveUninstaller:
+FunctionEnd
+
+Function CheckSelectedUIs
+ !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_SELECTED} end checkPartial
+checkPartial:
+ !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_PSELECTED} end displayError
+displayError:
+ MessageBox MB_OK|MB_ICONSTOP "At least one User Interface must be selected."
+ Abort
+end:
+FunctionEnd
+
+LangString INSTALL_OPTS_PAGE_TITLE ${LANG_ENGLISH} "Choose Install Options"
+LangString INSTALL_OPTS_PAGE_SUBTITLE ${LANG_ENGLISH} "Choose where to install Avidemux icons."
+Var dlgInstallOptions
+Var lblCreateIcons
+Var chkDesktop
+Var chkStartMenu
+Var chkQuickLaunch
+
+Function InstallOptionsPage
+ Call IsInstallOptionsRequired
+ !insertmacro MUI_HEADER_TEXT "$(INSTALL_OPTS_PAGE_TITLE)" "$(INSTALL_OPTS_PAGE_SUBTITLE)"
+
+ nsDialogs::Create 1018
+ Pop $dlgInstallOptions
+
+ ${If} $dlgInstallOptions == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateLabel} 0 0u 100% 12u "Create icons for Avidemux:"
+ Pop $lblCreateIcons
+
+ ${NSD_CreateCheckBox} 0 18u 100% 12u "On my &Desktop"
+ Pop $chkDesktop
+ ${NSD_SetState} $chkDesktop $CreateDesktopIcon
+ ${NSD_OnClick} $chkDesktop UpdateInstallOptions
+
+ ${NSD_CreateCheckBox} 0 36u 100% 12u "In my &Start Menu Programs folder"
+ Pop $chkStartMenu
+ ${NSD_SetState} $chkStartMenu $CreateStartMenuGroup
+ ${NSD_OnClick} $chkStartMenu UpdateInstallOptions
+
+ ${If} ${AtMostWinVista}
+ ${NSD_CreateCheckBox} 0 54u 100% 12u "In my &Quick Launch bar"
+ Pop $chkQuickLaunch
+ ${NSD_SetState} $chkQuickLaunch $CreateQuickLaunchIcon
+ ${NSD_OnClick} $chkQuickLaunch UpdateInstallOptions
+ ${EndIf}
+ #${If} ${IsWin2003}
+ #WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\avidemux.exe" "WIN2000"
+ #${EndIf}
+ #${If} ${IsWinXp}
+ #WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\avidemux.exe" "WIN2000"
+ #${EndIf}
+ nsDialogs::Show
+FunctionEnd
+
+Function UpdateInstallOptions
+ ${NSD_GetState} $chkDesktop $CreateDesktopIcon
+ ${NSD_GetState} $chkStartMenu $CreateStartMenuGroup
+ ${NSD_GetState} $chkQuickLaunch $CreateQuickLaunchIcon
+FunctionEnd
+
+Function IsInstallOptionsRequired
+Goto end
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} end resetOptions
+resetOptions:
+
+ StrCpy $CreateDesktopIcon 0
+ StrCpy $CreateStartMenuGroup 0
+ StrCpy $CreateQuickLaunchIcon 0
+ Abort
+
+end:
+FunctionEnd
+
+Function IsStartMenuRequired
+ StrCmp $CreateStartMenuGroup 1 +2
+ Abort
+FunctionEnd
+
+Function ActivateInternalSections
+ #AVS Proxy GUI shortcut:
+ SectionGetFlags ${SecAvsProxy} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ IntOp $0 $0 & $CreateStartMenuGroup
+ SectionSetFlags ${SecStartMenuAvsProxyGui} $0
+
+ #Change Log shortcut:
+ SectionSetFlags ${SecStartMenuChangeLog} $CreateStartMenuGroup
+
+ #Qt shortcuts:
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+
+ IntOp $1 $0 & $CreateDesktopIcon
+ SectionSetFlags ${SecDesktopQt} $1
+
+ IntOp $1 $0 & $CreateQuickLaunchIcon
+ SectionSetFlags ${SecQuickLaunchQt} $1
+
+ IntOp $1 $0 & $CreateStartMenuGroup
+ SectionSetFlags ${SecStartMenuQt} $1
+FunctionEnd
+
+Function InstFilesPageShow
+ ${If} $ReinstallUninstall != ""
+ Call RunUninstaller
+ BringToFront
+ ${EndIf}
+FunctionEnd
+
+Function InstFilesPageLeave
+ ; Don't advance automatically if details expanded
+ FindWindow $R0 "#32770" "" $HWNDPARENT
+ GetDlgItem $R0 $R0 1016
+ System::Call user32::IsWindowVisible(i$R0)i.s
+ Pop $R0
+
+ StrCmp $R0 0 +2
+ SetAutoClose false
+FunctionEnd
+
+Function ConfigureFinishPage
+
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ StrCmp $0 ${SF_SELECTED} end
+
+ DeleteINISec "$PLUGINSDIR\ioSpecial.ini" "Field 4"
+
+end:
+FunctionEnd
+
+Function RunAvidemux
+ SetOutPath $INSTDIR
+
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+
+ !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\avidemux.exe" "" "" ""
+
+ Goto end
+
+
+end:
+FunctionEnd
+
+Var ReinstallUninstallButton
+
+Function ReinstallPage
+ ${If} $PreviousVersion == ""
+ Abort
+ ${EndIf}
+
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $0
+
+ ${If} $PreviousVersionState == 1
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "An older version of Avidemux is installed on your system. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Upgrade Avidemux using previous settings (recommended)"
+ Pop $ReinstallUninstallButton
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
+ Pop $R0
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 1
+ ${EndIf}
+ ${ElseIf} $PreviousVersionState == 2
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "A newer version of Avidemux is already installed! It is not recommended that you downgrade to an older version. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Downgrade Avidemux using previous settings (recommended)"
+ Pop $ReinstallUninstallButton
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
+ Pop $R0
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 1
+ ${EndIf}
+ ${ElseIf} $PreviousVersionState == 0
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "${PRODUCT_FULLNAME} is already installed. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Add/Remove/Reinstall components"
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Uninstall Avidemux"
+ Pop $ReinstallUninstallButton
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 2
+ ${EndIf}
+ ${Else}
+ MessageBox MB_ICONSTOP "Unknown value of PreviousVersionState, aborting" /SD IDOK
+ Abort
+ ${EndIf}
+
+ ${If} $ReinstallUninstall == "1"
+ SendMessage $ReinstallUninstallButton ${BM_SETCHECK} 1 0
+ ${Else}
+ SendMessage $R0 ${BM_SETCHECK} 1 0
+ ${EndIf}
+
+ nsDialogs::Show
+FunctionEnd
+
+Function ReinstallPageLeave
+ SendMessage $ReinstallUninstallButton ${BM_GETCHECK} 0 0 $R0
+
+ ${If} $R0 == 1
+ ; Option to uninstall old version selected
+ StrCpy $ReinstallUninstall 1
+ ${Else}
+ ; Custom up/downgrade or add/remove/reinstall
+ StrCpy $ReinstallUninstall 2
+ ${EndIf}
+
+ ${If} $ReinstallUninstall == 1
+ ${If} $PreviousVersionState == 0
+ Call RunUninstaller
+ Quit
+ ${Else}
+ ; Need to reload defaults. User could have
+ ; chosen custom, change something, went back and selected
+ ; the express option.
+ Call LoadPreviousSettings
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
+
+##########################
+# Uninstaller functions
+##########################
+Function un.onInit
+ SetShellVarContext all
+
+UAC_Elevate:
+ !insertmacro UAC_RunElevated
+ StrCmp 1223 $0 UAC_ElevationAborted
+ StrCmp 0 $0 0 UAC_Err
+ StrCmp 1 $1 0 UAC_Success
+ Quit
+
+UAC_Err:
+ MessageBox MB_ICONSTOP "Unable to elevate, error $0"
+ Abort
+
+UAC_ElevationAborted:
+ Abort
+
+UAC_Success:
+ StrCmp 1 $3 +4
+ StrCmp 3 $1 0 UAC_ElevationAborted
+ MessageBox MB_ICONSTOP "This installer requires admin access."
+ Goto UAC_Elevate
+FunctionEnd
+
+; TrimNewlines (copied from NSIS documentation)
+; input, top of stack (e.g. whatever$/r$/n)
+; output, top of stack (replaces, with e.g. whatever)
+; modifies no other variables.
+Function un.TrimNewlines
+ Exch $R0
+ Push $R1
+ Push $R2
+ StrCpy $R1 0
+
+loop:
+ IntOp $R1 $R1 - 1
+ StrCpy $R2 $R0 1 $R1
+ StrCmp $R2 "$\r" loop
+ StrCmp $R2 "$\n" loop
+ IntOp $R1 $R1 + 1
+ IntCmp $R1 0 no_trim_needed
+ StrCpy $R0 $R0 $R1
+
+no_trim_needed:
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+Function un.RemoveEmptyDirs
+ Pop $9
+ !define Index 'Line${__LINE__}'
+ FindFirst $0 $1 "$INSTDIR$9*"
+ StrCmp $0 "" "${Index}-End"
+"${Index}-Loop:"
+ StrCmp $1 "" "${Index}-End"
+ StrCmp $1 "." "${Index}-Next"
+ StrCmp $1 ".." "${Index}-Next"
+ Push $0
+ Push $1
+ Push $9
+ Push "$9$1\"
+ Call un.RemoveEmptyDirs
+ Pop $9
+ Pop $1
+ Pop $0
+;"${Index}-Remove:"
+ RMDir "$INSTDIR$9$1"
+"${Index}-Next:"
+ FindNext $0 $1
+ Goto "${Index}-Loop"
+"${Index}-End:"
+ FindClose $0
+ !undef Index
+FunctionEnd
+
+Function un.ConfirmPagePre
+ ${un.GetParameters} $R0
+ ${un.GetOptions} $R0 "/frominstall" $R1
+ ${Unless} ${Errors}
+ Abort
+ ${EndUnless}
+FunctionEnd
+
+Function un.FinishPagePre
+ ${un.GetParameters} $R0
+ ${un.GetOptions} $R0 "/frominstall" $R1
+ ${Unless} ${Errors}
+ SetRebootFlag false
+ Abort
+ ${EndUnless}
+FunctionEnd
diff --git a/avidemux/winInstaller/old/avidemux_cross64.nsi b/avidemux/winInstaller/old/avidemux_cross64.nsi
index 5c1d754533..28ad2e3520 100644
--- a/avidemux/winInstaller/old/avidemux_cross64.nsi
+++ b/avidemux/winInstaller/old/avidemux_cross64.nsi
@@ -1,1593 +1,1593 @@
-##########################
-# Included files
-##########################
-!addincludedir ${NSIDIR}
-!addplugindir ${NSIDIR}/plugin
-
-!include Sections.nsh
-!include MUI2.nsh
-!include nsDialogs.nsh
-!include Memento.nsh
-!include FileFunc.nsh
-!include UAC.nsh
-!include WinVer.nsh
-!include WordFunc.nsh
-#!include revision.nsh
-
-SetCompressor /SOLID lzma
-SetCompressorDictSize 96
-RequestExecutionLevel user
-
-##########################
-# Defines
-##########################
-!define BUILD_BITS 64
-!define QT_DIR /mingw/Qt/current/bin/
-!define ADM_SYSDIR /mingw/bin
-!define ADM_DIR /mingw/Release
-#!define NSIDIR "/home/fx/hudson/workspace/mingw_2.6.2_nsis/avidemux/winInstaller"
-#!define SVN_VERSION 6
-!define REVISION ${SVN_VERSION}
-!define EXEDIR "${NSIDIR}/install"
-
-!define CORE_VERSION "2.6"
-!define POINT_RELEASE "8"
-!define PRODUCT_VERSION "${CORE_VERSION}.${POINT_RELEASE}.${SVN_VERSION}"
-!define PRODUCT_NAME "Avidemux ${CORE_VERSION} - 64bits"
-!define PRODUCT_FULLNAME "Avidemux ${PRODUCT_VERSION} (${BUILD_BITS}-bit Release)"
-
-!if ${BUILD_BITS} == 64
- !define SHORTCUT_NAME "${PRODUCT_NAME}"
- !define REG_GROUPNAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
-!else
- !define SHORTCUT_NAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
- !define REG_GROUPNAME "${PRODUCT_NAME}"
-!endif
-
-!define REGKEY "SOFTWARE\${REG_GROUPNAME}"
-!define UNINST_REGKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_GROUPNAME}"
-!define COMPANY "Free Software Foundation"
-!define URL "http://www.avidemux.org"
-
-OutFile "${EXEDIR}/avidemux_${CORE_VERSION}.${POINT_RELEASE}_r${REVISION}_win${BUILD_BITS}.exe"
-Name "${PRODUCT_FULLNAME}"
-
-##########################
-# Memento defines
-##########################
-!define MEMENTO_REGISTRY_ROOT HKLM
-!define MEMENTO_REGISTRY_KEY "${REGKEY}"
-
-##########################
-# MUI defines
-##########################
-!define MUI_ICON "${NSIDIR}/../common/xpm/adm.ico"
-!define MUI_HEADERIMAGE
-!define MUI_HEADERIMAGE_RIGHT
-!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}/PageHeader.bmp"
-!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
-!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGKEY}"
-!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
-!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Avidemux (64bits)"
-!define MUI_STARTMENUPAGE_NODISABLE
-!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
-!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
-!define MUI_UNICON "${NSIDIR}/../common/xpm/adm.ico"
-!define MUI_COMPONENTSPAGE_NODESC
-
-##########################
-# Variables
-##########################
-Var CreateDesktopIcon
-Var CreateStartMenuGroup
-Var CreateQuickLaunchIcon
-Var StartMenuGroup
-Var PreviousVersion
-Var PreviousVersionState
-Var ReinstallUninstall
-
-##########################
-# Installer pages
-##########################
-!define MUI_WELCOMEPAGE_TITLE "${PRODUCT_FULLNAME} Setup Wizard"
-!insertmacro MUI_PAGE_WELCOME
-!insertmacro MUI_PAGE_LICENSE "${NSIDIR}/License.rtf"
- Page custom ReinstallPage ReinstallPageLeave
-!insertmacro MUI_PAGE_COMPONENTS
-Page custom InstallOptionsPage
-!define MUI_PAGE_CUSTOMFUNCTION_PRE IsStartMenuRequired
-!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
-!insertmacro MUI_PAGE_DIRECTORY
-!define MUI_PAGE_CUSTOMFUNCTION_PRE ActivateInternalSections
-!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesPageShow
-!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesPageLeave
-!insertmacro MUI_PAGE_INSTFILES
-!define MUI_FINISHPAGE_RUN
-!define MUI_FINISHPAGE_RUN_FUNCTION RunAvidemux
-!define MUI_FINISHPAGE_RUN_TEXT "Run ${PRODUCT_NAME} now"
-!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR/Change Log.html"
-!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Change Log now"
-!define MUI_FINISHPAGE_LINK "Visit the Avidemux website"
-!define MUI_FINISHPAGE_LINK_LOCATION "http://www.avidemux.org"
-!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfigureFinishPage
-!insertmacro MUI_PAGE_FINISH
-
-!define MUI_PAGE_CUSTOMFUNCTION_PRE un.ConfirmPagePre
-!insertmacro MUI_UNPAGE_CONFIRM
-!insertmacro MUI_UNPAGE_INSTFILES
-!define MUI_PAGE_CUSTOMFUNCTION_PRE un.FinishPagePre
-!insertmacro MUI_UNPAGE_FINISH
-
-##########################
-# Installer languages
-##########################
-!insertmacro MUI_LANGUAGE English
-
-##########################
-# Installer attributes
-##########################
-!if ${BUILD_BITS} == 64
- InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
-!else
- InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
-!endif
-
-CRCCheck on
-XPStyle on
-ShowInstDetails nevershow
-ShowUninstDetails nevershow
-VIProductVersion ${PRODUCT_VERSION}
-VIAddVersionKey ProductName Avidemux
-VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
-VIAddVersionKey FileVersion ""
-VIAddVersionKey FileDescription ""
-VIAddVersionKey LegalCopyright ""
-InstallDirRegKey HKLM "${REGKEY}" Path
-BrandingText "Packaged by Gruntster"
-InstType Standard
-InstType Full
-#########################################
-#
-#########################################
-Function GetAfterChar
- Exch $0 ; chop char
- Exch
- Exch $1 ; input string
- Push $2
- Push $3
- StrCpy $2 0
- loop:
- IntOp $2 $2 - 1
- StrCpy $3 $1 1 $2
- StrCmp $3 "" 0 +3
- StrCpy $0 ""
- Goto exit2
- StrCmp $3 $0 exit1
- Goto loop
- exit1:
- IntOp $2 $2 + 1
- StrCpy $0 $1 "" $2
- exit2:
- Pop $3
- Pop $2
- Pop $1
- Exch $0 ; output
-FunctionEnd
-#####################################################################
-!define StrReplace '!insertmacro "_Name"'
-
-##########################
-# Uninstaller macros
-##########################
-!insertmacro un.GetOptions
-!insertmacro un.GetParameters
-
-!define UninstallLogPath "$INSTDIR\uninstall.log"
-Var UninstallLogHandle
-
-; Uninstall log file missing.
-LangString UninstallLogMissing ${LANG_ENGLISH} "uninstall.log not found!$\r$\nUninstallation cannot proceed!"
-# Regexep Does not work with cross
-# Use only one file at a time
-!macro InstallFile FILEZ
- File "${FILEZ}"
- Push "${FILEZ}"
- Push "/"
- Call GetAfterChar
- Pop $R0
- FileWrite $UninstallLogHandle "$OUTDIR\$R0$\r$\n"
-!macroend
-!define File "!insertmacro InstallFile"
-
-!macro InstallFolder FILEREGEX
- File /r "${FILEREGEX}/*"
- Push "$OUTDIR"
- Call InstallFolderInternal
-!macroend
-!define Folder "!insertmacro InstallFolder"
-
-Function InstallFolderInternal
- Pop $9
- !define Index 'Line${__LINE__}'
- FindFirst $0 $1 "$9/*"
- StrCmp $0 "" "${Index}-End"
-"${Index}-Loop:"
- StrCmp $1 "" "${Index}-End"
- StrCmp $1 "." "${Index}-Next"
- StrCmp $1 ".." "${Index}-Next"
- IfFileExists "$9\$1\*" 0 "${Index}-Write"
- Push $0
- Push $9
- Push "$9\$1"
- Call InstallFolderInternal
- Pop $9
- Pop $0
- Goto "${Index}-Next"
-"${Index}-Write:"
- FileWrite $UninstallLogHandle "$9\$1$\r$\n"
-"${Index}-Next:"
- FindNext $0 $1
- Goto "${Index}-Loop"
-"${Index}-End:"
- !undef Index
-FunctionEnd
-
-; WriteUninstaller macro
-!macro WriteUninstaller Path
- WriteUninstaller "${Path}"
- FileWrite $UninstallLogHandle "${Path}$\r$\n"
-!macroend
-!define WriteUninstaller "!insertmacro WriteUninstaller"
-
-##########################
-# Macros
-##########################
-
-!macro InstallQtLanguage LANG_NAME LANG_CODE
- SetOverwrite on
-
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} installQt${LANG_CODE} endQt${LANG_CODE}
-
-installQt${LANG_CODE}:
- SetOutPath $INSTDIR\i18n
- ${File} i18n/avidemux_${LANG_CODE}.qm
- ${File} i18n/qt_${LANG_CODE}.qm
-
-endQt${LANG_CODE}:
-!macroend
-
-##########################
-# Installer sections
-##########################
-Section -OpenLogFile
- CreateDirectory "$INSTDIR"
- FileOpen $UninstallLogHandle ${UninstallLogPath} a
- FileSeek $UninstallLogHandle 0 END
-SectionEnd
-
-Section "Avidemux Core" SecCore
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} "./Build Info.txt"
- ${File} "./Change Log.html"
- ${File} ${ADM_SYSDIR}/libexpat-1.dll
- #${File} ${ADM_SYSDIR}/mgwz.dll
- ${File} ${ADM_SYSDIR}/libfreetype-6.dll
- ${File} ${ADM_SYSDIR}/libsqlite3-0.dll
- ${File} ${ADM_SYSDIR}/libstdc++-6.dll
- ${File} ${ADM_SYSDIR}/libgcc_s_seh-1.dll
- ${File} ${ADM_SYSDIR}/libwinpthread-1.dll
- ${File} ${ADM_SYSDIR}/libpng16-16.dll
- ${File} ${ADM_SYSDIR}/SDL.dll
- ${File} ${ADM_SYSDIR}/libz.dll
- ${File} ${ADM_SYSDIR}/libz.dll.1.2.8
- ${File} ${ADM_DIR}/libADM_audioParser6.dll
- ${File} ${ADM_DIR}/libADM_core6.dll
- ${File} ${ADM_DIR}/libADM_coreAudio6.dll
- ${File} ${ADM_DIR}/libADM_coreAudioDevice6.dll
- ${File} ${ADM_DIR}/libADM_coreAudioEncoder6.dll
- ${File} ${ADM_DIR}/libADM_coreAudioFilterAPI6.dll
- ${File} ${ADM_DIR}/libADM_coreDemuxer6.dll
- ${File} ${ADM_DIR}/libADM_coreDemuxerMpeg6.dll
- ${File} ${ADM_DIR}/libADM_coreImage6.dll
- ${File} ${ADM_DIR}/libADM_coreImageLoader6.dll
- ${File} ${ADM_DIR}/libADM_coreJobs.dll
- ${File} ${ADM_DIR}/libADM_coreMuxer6.dll
- ${File} ${ADM_DIR}/libADM_coreScript.dll
- ${File} ${ADM_DIR}/libADM_coreSocket6.dll
- ${File} ${ADM_DIR}/libADM_coreSqlLight3.dll
- ${File} ${ADM_DIR}/libADM_coreUI6.dll
- ${File} ${ADM_DIR}/libADM_coreUtils6.dll
- ${File} ${ADM_DIR}/libADM_coreVideoCodec6.dll
- ${File} ${ADM_DIR}/libADM_coreVideoEncoder6.dll
- ${File} ${ADM_DIR}/libADM_coreVideoFilter6.dll
- ${File} ${ADM_DIR}/libADM_coreSubtitle.dll
- ${File} ${QT_DIR}/QtCore4.dll
- ${File} ${QT_DIR}/QtGui4.dll
- ${File} ${NSIDIR}/../../AUTHORS.
- ${File} ${NSIDIR}/../../COPYING.
- ${File} ${NSIDIR}/../../README.
- ${File} ${ADM_DIR}/avcodec-*.dll
- ${File} ${ADM_DIR}/avformat-*.dll
- ${File} ${ADM_DIR}/avutil-*.dll
- ${File} ${ADM_DIR}/postproc-*.dll
- ${File} ${ADM_DIR}/swscale-*.dll
-
- WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
- WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
-
- ${If} ${AtMostWinVista}
- WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
- ${EndIf}
-SectionEnd
-
-SectionGroup /e "User interfaces" SecGrpUI
- ${MementoUnselectedSection} "Command Line" SecUiCli
- SectionIn 2
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${ADM_DIR}/avidemux_cli.exe
- ${File} ${ADM_DIR}/libADM_render6_cli.dll
- ${File} ${ADM_DIR}/libADM_UI_Cli6.dll
- ${MementoSectionEnd}
-
- ${MementoSection} Qt SecUiQt
- SectionIn 1 2 RO
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${ADM_DIR}/avidemux.exe
- ${File} ${ADM_DIR}/avidemux_jobs.exe
- ${File} ${ADM_DIR}/libADM_render6_QT4.dll
- ${File} ${ADM_DIR}/libADM_UIQT46.dll
- ${File} ${QT_DIR}/QtOpenGL4.dll
- #${File} ${QT_DIR}/libgcc_s_dw2-1.dll
- #${File} ${QT_DIR}/mingwm10.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-
-SectionGroup "Audio Decoders" SecGrpAudioDecoder
- ${MementoSection} "µ-law" SecAudDecUlaw
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ulaw.dll
- ${MementoSectionEnd}
- ${MementoSection} "AAC (FAAD)" SecAudDecFaad
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_faad.dll
- #SetOutPath $INSTDIR
- #${File} ${ADM_SYSDIR}/libfaad2.dll
- ${MementoSectionEnd}
- ${MementoSection} "AAC, AC-3, ADPCM IMA AMV, DTS, E-AC-3, MP2, MP3, Nellymoser, QDesign, WMA (libavcodec)" SecAudDecAvcodec
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_lav.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (liba52)" SecAudDecA52
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_a52.dll
- ${MementoSectionEnd}
- ${MementoSection} "ADPCM IMA" SecAudDecImaAdpcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ima_adpcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "ADPCM Microsoft" SecAudDecMsAdpcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ms_adpcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "AMR-NB" SecAudDecOpencoreAmrNb
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_opencore_amrnb.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libopencore-amrnb-*.dll
- ${MementoSectionEnd}
- ${MementoSection} "AMR-WB" SecAudDecOpencoreAmrWb
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_opencore_amrwb.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libopencore-amrwb-*.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP2, MP3 (MAD)" SecAudDecMad
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_Mad.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vorbis" SecAudDecVorbis
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDecoder
- ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_vorbis.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libogg-0.dll
- ${File} ${ADM_SYSDIR}/libvorbis-0.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Audio Devices" SecGrpAudioDevice
- ${MementoSection} "Waveform" SecAudDevWaveform
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioDevices
- ${File} ${ADM_DIR}/plugins/audioDevices/libADM_av_win32.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Audio Encoders" SecGrpAudioEncoder
- ${MementoSection} "AAC (FAAC)" SecAudEncFaac
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_faac.dll
- #SetOutPath $INSTDIR
- #${File} ${ADM_SYSDIR}libfaac.dll
- ${MementoSectionEnd}
- ${MementoSection} "AAC (libavcodec)" SecAudEncLavAac
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_aac.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (Aften)" SecAudDecAften
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_aften.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libaften.dll
- ${MementoSectionEnd}
- ${MementoSection} "AC-3 (libavcodec)" SecAudEncLavAc3
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_ac3.dll
- ${MementoSectionEnd}
- #${MementoSection} "DTS (dcaenc)" SecAudDecDcaEnc
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\audioEncoders
- #${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_dcaenc.dll
- #SetOutPath $INSTDIR
- #${File} libdcaenc-0.dll
- #${MementoSectionEnd}
- ${MementoSection} "MP2 (libavcodec)" SecAudEncLavMp2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_mp2.dll
- SetOutPath $INSTDIR
- #${File} ${ADM_SYSDIR}/libtwolame-*.dll
- ${MementoSectionEnd}
- #${MementoSection} "MP2 (TwoLAME)" SecAudEncTwoLame
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\audioEncoders
- #${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_twolame.dll
- #${MementoSectionEnd}
- ${MementoSection} "MP3" SecAudEncLame
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lame.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libmp3lame-0.dll
- ${MementoSectionEnd}
- ${MementoSection} "PCM" SecAudEncPcm
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_pcm.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vorbis" SecAudEncVorbis
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\audioEncoders
- ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_vorbis.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libogg-0.dll
- ${File} ${ADM_SYSDIR}/libvorbis-0.dll
- ${File} ${ADM_SYSDIR}/libvorbisenc-2.dll
- ${File} ${ADM_SYSDIR}/libvorbisfile-3.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Avisynth" SecGrpAvisynth
- ${MementoUnselectedSection} "Avisynth Proxy" SecAvsProxy
- SectionIn 2
- SetOutPath $INSTDIR
- SetOverwrite on
- ${File} ${ADM_SYSDIR}/avsproxy.exe
- ${File} ${ADM_SYSDIR}/avsproxy_gui.exe
- ${MementoSectionEnd}
- ${MementoUnselectedSection} "Avisynth Proxy Demuxer" SecDemuxAvisynth
- SectionIn 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_avsproxy.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Demuxers" SecGrpDemuxers
- ${MementoSection} "ASF" SecDemuxAsf
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_asf.dll
- ${MementoSectionEnd}
- ${MementoSection} "BMP, JPEG, PNG Images" SecDemuxImage
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_pic.dll
- ${MementoSectionEnd}
- ${MementoSection} "Flash Video" SecDemuxFlv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_flv.dll
- ${MementoSectionEnd}
- ${MementoSection} "Matroska" SecDemuxMatroska
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_matroska.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4" SecDemuxMp4
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_mp4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-PS" SecDemuxMpegPs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_ps.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-TS" SecDemuxMpegTs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_ts.dll
- ${MementoSectionEnd}
- ${MementoSection} "MXF" SecDemuxMxf
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_mxf.dll
- ${MementoSectionEnd}
- ${MementoSection} "OpenDML AVI" SecDemuxOpenDml
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\demuxers
- ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_opendml.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Muxers" SecGrpMuxers
- ${MementoSection} "Dummy [Raw Audio/Video]" SecMuxDummy
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_dummy.dll
- ${MementoSectionEnd}
- ${MementoSection} "Flash Video" SecMuxLavFlv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_flv.dll
- ${MementoSectionEnd}
- ${MementoSection} "Matroska" SecMuxLavMatroska
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_Mkv.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4 (libavcodec)" SecMuxLavMp4
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_mp4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MP4 (MP4v2)" SecMuxMp4v2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_mp4v2.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-PS" SecMuxLavMpegPs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_ffPS.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-TS" SecMuxLavMpegTs
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_ffTS.dll
- ${MementoSectionEnd}
- ${MementoSection} "OpenDML AVI" SecMuxOpenDml
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_avi.dll
- ${MementoSectionEnd}
- ${MementoSection} "Raw Video" SecMuxRaw
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\muxers
- ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_raw.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Script Engines" SecGrpScriptEngine
- #${MementoSection} "QtScript" SecScriptQt
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR
- #${File} ${QT_DIR}/QtScript4.dll
- #${File} ${QT_DIR}/QtScriptTools4.dll
- #SetOutPath $INSTDIR\plugins\scriptEngines
- #${File} ${ADM_DIR}/plugins/scriptEngines/libADM_script_qt.dll
- #SetOutPath $INSTDIR\help\QtScript
- #${Folder} help/QtScript
- #${MementoSectionEnd}
- ${MementoSection} "Tinypy" SecScriptTinypy
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\scriptEngines
- ${File} ${ADM_DIR}/plugins/scriptEngines/libADM_script_tinyPy.dll
- SetOutPath $INSTDIR\plugins\autoScripts
- ${Folder} ${ADM_DIR}/plugins/autoScripts
- ${MementoSectionEnd}
-SectionGroupEnd
-#SectionGroup "Video Decoders" SecGrpVideoDecoder
- #${MementoSection} "VP8" SecVidDecVpx
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoDecoders
- #${File} ${ADM_DIR}/plugins/videoDecoders/libADM_vd_vpx.dll
- #${MementoSectionEnd}
-#SectionGroupEnd
-SectionGroup "Video Encoders" SecGrpVideoEncoder
- ${MementoSection} "[Null]" SecVidEncNull
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_null.dll
- ${MementoSectionEnd}
- ${MementoSection} "Huffyuv, FFVHuff" SecVidEncLavHuffyuv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_huff.dll
- ${MementoSectionEnd}
- ${MementoSection} "JPEG" SecVidEncLavJpeg
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_jpeg.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-2" SecVidEncLavMpeg2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffMpeg2.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 ASP (libavcodec)" SecVidEncLavMpeg4asp
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffMpeg4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 ASP (Xvid)" SecVidEncXvid
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_xvid4.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/xvidcore.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 AVC" SecVidEncX264
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
-
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_x264_other.dll
-
- SetOutPath $INSTDIR\plugins\videoEncoders\qt4
- ${File} ${ADM_DIR}/plugins/videoEncoders/qt4/libADM_ve_x264_QT4.dll
-
- SetOutPath $INSTDIR\plugins\pluginSettings\x264
- ${Folder} ${ADM_DIR}/plugins/pluginSettings/x264
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libx264-*.dll
- #${File} ${ADM_SYSDIR}/pthreadGC2-w64.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPEG-4 HEC" SecVidEncX265
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
-
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_x265_other.dll
-
- SetOutPath $INSTDIR\plugins\videoEncoders\qt4
- ${File} ${ADM_DIR}/plugins/videoEncoders/qt4/libADM_ve_x265_QT4.dll
-
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libx265*.dll
- #${File} ${ADM_SYSDIR}/pthreadGC2-w64.dll
- ${MementoSectionEnd}
-${MementoSection} "PNG" SecVidEncLavPng
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_png.dll
- ${MementoSectionEnd}
- ${MementoSection} "Sorenson Spark" SecVidEncSorenson
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffFlv1.dll
- ${MementoSectionEnd}
- ${MementoSection} "YV12" SecVidEncYv12
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoEncoders
- ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_yv12.dll
- ${MementoSectionEnd}
-SectionGroupEnd
-SectionGroup "Video Filters" SecGrpVideoFilter
- SectionGroup "Transform Filters" SecGrpVideoFilterTransform
- ${MementoSection} "Add Black Borders" SecVidFltBlackBorders
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_addBorders.dll
- ${MementoSectionEnd}
- ${MementoSection} "Add Logo" SecVidFltLogo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_logo.dll
- ${MementoSectionEnd}
- ${MementoSection} "Blacken Borders" SecVidFltBlackenBorders
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_blackenBorders.dll
- ${MementoSectionEnd}
- ${MementoSection} "Change FPS" SecVidFltChangeFps
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_changeFps.dll
- ${MementoSectionEnd}
- ${MementoSection} "Crop" SecVidFltCrop
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_CropCli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_cropQT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Fade" SecVidFltFade
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_fadeToBlack.dll
- ${MementoSectionEnd}
- ${MementoSection} "Greyscale" SecVidFltLumaOnly
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_lumaOnly.dll
- ${MementoSectionEnd}
- ${MementoSection} "Horizontal Flip" SecVidFltHorizontalFlip
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_hf_hflip.dll
- ${MementoSectionEnd}
- ${MementoSection} "libswscale Resize" SecVidFltSwscaleResize
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_swscaleResize_cli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_swscaleResizeQT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Resample FPS" SecVidFltResampleFps
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_resampleFps.dll
- ${MementoSectionEnd}
- ${MementoSection} "Rotate" SecVidFltRotate
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_rotate.dll
- ${MementoSectionEnd}
- ${MementoSection} "Vertical Flip" SecVidFltVerticalFlip
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_vflip.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Interlacing Filters" SecGrpVideoFilterInterlacing
- ${MementoSection} "Decomb Decimate" SecVidFltDecombDecimate
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_decimate.dll
- ${MementoSectionEnd}
- ${MementoSection} "Decomb Telecide" SecVidFltDecombTelecide
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_telecide.dll
- ${MementoSectionEnd}
- ${MementoSection} "DGBob" SecVidFltDgbob
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_DgBob.dll
- ${MementoSectionEnd}
- ${MementoSection} "Horizontal Stack Fields" SecVidFltHzStackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_hzstackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Kernel Deint" SecVidFltKernelDeint
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_kernelDeint.dll
- ${MementoSectionEnd}
- ${MementoSection} "libavcodec Deinterlacers" SecVidFltLavDeinterlacers
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_lavDeint.dll
- ${MementoSectionEnd}
- ${MementoSection} "Merge Fields" SecVidFltMergeFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_mergeField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Separate Fields" SecVidFltSeparateFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_separateField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Stack Fields" SecVidFltStackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_stackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Unstack Fields" SecVidFltUnstackFields
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_unstackField.dll
- ${MementoSectionEnd}
- ${MementoSection} "Yadif" SecVidFltYadif
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_yadif.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Colour Filters" SecGrpVideoFilterColour
- ${MementoSection} "Avisynth Colour YUV" SecVidFltAvisynthColourYuv
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_colorYuv.dll
- ${MementoSectionEnd}
- ${MementoSection} "ChromaShift" SecVidFltChromaShift
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_chromaShiftCli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_chromaShiftQT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Contrast" SecVidFltContrast
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_contrastCli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_contrastQT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlater Eq2" SecVidFltMplayerEq2
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_eq2Cli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_eq2QT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlater Hue" SecVidFltMplayerHue
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_HueCli.dll
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_HueQT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Remove Plane" SecVidFltRemovePlane
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_removePlane.dll
- ${MementoSectionEnd}
- ${MementoSection} "Swap U and V" SecVidFltSwapUandV
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_swapUV.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Noise Filters" SecGrpVideoFilterNoise
- ${MementoSection} "FluxSmooth" SecVidFltFluxSmooth
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_FluxSmooth.dll
- ${MementoSectionEnd}
- ${MementoSection} "Gaussian Convolution" SecVidFltGauss
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_gauss.dll
- ${MementoSectionEnd}
- ${MementoSection} "Large Median (5x5)" SecVidFltMediam5x5
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_largeMedian.dll
- ${MementoSectionEnd}
- ${MementoSection} "Mean Convolution" SecVidFltMean
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_mean.dll
- ${MementoSectionEnd}
- ${MementoSection} "Median Convolution" SecVidFltMedian
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_median.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Denoise 3D" SecVidFltMPlayerDenoise3d
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_denoise3d.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Denoise 3D HQ" SecVidFltMPlayerDenoise3dHq
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_denoise3dhq.dll
- ${MementoSectionEnd}
- ${MementoSection} "MSharpen" SecVidFltMSharpen
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_msharpen.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Sharpness Filters" SecGrpVideoFilterSharpness
- ${MementoSection} "asharp" SecVidFltAsharp
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_asharpQT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "MPlayer Delogo" SecVidFltMPlayerDelogo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- SetOutPath $INSTDIR\plugins\videoFilters\qt4
- ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_mpdelogoQT4.dll
- ${MementoSectionEnd}
- ${MementoSection} "Sharpen" SecVidFltSharpen
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sharpen.dll
- ${MementoSectionEnd}
- SectionGroupEnd
- SectionGroup "Subtitle Filters" SecGrpVideoFilterSubtitle
- ${MementoSection} "ASS, SSA" SecVidFltAssSsa
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_ssa.dll
- SetOutPath $INSTDIR
- ${File} ${ADM_SYSDIR}/libfribidi-0.dll
- ${File} ${ADM_SYSDIR}/libiconv-2.dll
- ${File} ${ADM_SYSDIR}/libfontconfig-1.dll
- #${File} ${ADM_SYSDIR}/libexpat-1.dll
- SetOutPath $INSTDIR\etc\fonts
- ${Folder} ${ADM_DIR}/etc/fonts
- ${MementoSectionEnd}
- SectionGroupEnd
- #SectionGroup "OpenGL Filters" SecGrpVideoFilterOpenGl
- #${MementoSection} "Fragment Shader" SecVidFltOpenGlFragmentShader
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sampleGlFrag2.dll
- #${MementoSectionEnd}
- #${MementoSection} "Read Back Benchmark" SecVidFltOpenGlReadBack
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_glBenchmark.dll
- #${MementoSectionEnd}
- #${MementoSection} "Resize" SecVidFltOpenGlResize
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_glResize.dll
- #${MementoSectionEnd}
- #${MementoSection} "Rotate" SecVidFltOpenGlRotate
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_rotateGlFrag2.dll
- #${MementoSectionEnd}
- #${MementoSection} "Wave" SecVidFltOpenGlWave
- #SectionIn 1 2
- #SetOverwrite on
- #SetOutPath $INSTDIR\plugins\videoFilters
- #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sampleGlVertex.dll
- #${MementoSectionEnd}
- #SectionGroupEnd
- SectionGroup "Miscellaneous Filters" SecGrpVideoFilterMiscellaneous
- ${MementoSection} "Print Information" SecVidFltPrintInfo
- SectionIn 1 2
- SetOverwrite on
- SetOutPath $INSTDIR\plugins\videoFilters
- ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_printInfo.dll
- ${MementoSectionEnd}
- SectionGroupEnd
-SectionGroupEnd
-
-${MementoSection} "-Start menu Change Log" SecStartMenuChangeLog
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk" "$INSTDIR\Change Log.html"
- !insertmacro MUI_STARTMENU_WRITE_END
-${MementoSectionEnd}
-
-
-${MementoSection} "-Start menu Qt" SecStartMenuQt
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Avidemux job control (64 Bits).lnk" $INSTDIR\avidemux_jobs.exe
- !insertmacro MUI_STARTMENU_WRITE_END
-${MementoSectionEnd}
-
-${MementoSection} "-Start menu AVS Proxy GUI" SecStartMenuAvsProxyGui
- CreateDirectory $SMPROGRAMS\$StartMenuGroup
- !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
- SetOutPath $INSTDIR
- CreateShortcut "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk" "$INSTDIR\avsproxy_gui.exe"
- !insertmacro MUI_STARTMENU_WRITE_END
-${MementoSectionEnd}
-
-
-${MementoSection} "-Quick Launch Qt" SecQuickLaunchQt
- SetOutPath $INSTDIR
- CreateShortcut "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
-${MementoSectionEnd}
-
-
-${MementoSection} "-Desktop Qt" SecDesktopQt
- SetOutPath $INSTDIR
- CreateShortcut "$DESKTOP\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
-${MementoSectionEnd}
-
-${MementoSectionDone}
-
-Section -post SecUninstaller
- SectionIn 1 2
- WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
- WriteRegStr HKLM "${REGKEY}" Version ${PRODUCT_VERSION}
- SetOutPath $INSTDIR
- WriteUninstaller $INSTDIR\uninstall.exe
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayName "${SHORTCUT_NAME}"
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayVersion "${PRODUCT_VERSION}"
- WriteRegStr HKLM "${UNINST_REGKEY}" DisplayIcon $INSTDIR\uninstall.exe
- WriteRegStr HKLM "${UNINST_REGKEY}" UninstallString $INSTDIR\uninstall.exe
- WriteRegDWORD HKLM "${UNINST_REGKEY}" NoModify 1
- WriteRegDWORD HKLM "${UNINST_REGKEY}" NoRepair 1
-SectionEnd
-
-Section -CloseLogFile
- FileClose $UninstallLogHandle
- SetFileAttributes ${UninstallLogPath} HIDDEN
-SectionEnd
-
-Section Uninstall
- !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
-
-
- Delete /REBOOTOK "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk"
- Delete /REBOOTOK "$DESKTOP\${SHORTCUT_NAME}.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Avidemux job control (64 Bits).lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk"
- Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk"
- RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
- DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
-
- DeleteRegKey HKLM "${UNINST_REGKEY}"
- DeleteRegValue HKLM "${REGKEY}" Path
- DeleteRegValue HKLM "${REGKEY}" CreateDesktopIcon
- DeleteRegValue HKLM "${REGKEY}" CreateStartMenuGroup
- DeleteRegValue HKLM "${REGKEY}" CreateQuickLaunchIcon
- DeleteRegKey /IfEmpty HKLM "${REGKEY}"
-
- FileOpen $UninstallLogHandle "${UninstallLogPath}" r
-UninstallLoop:
- ClearErrors
- FileRead $UninstallLogHandle $R0
- IfErrors UninstallEnd
- Push $R0
- Call un.TrimNewLines
- Pop $R0
- Delete "$R0"
- Goto UninstallLoop
-UninstallEnd:
- FileClose $UninstallLogHandle
- Delete "${UninstallLogPath}"
- Delete "$INSTDIR\uninstall.exe"
- Push "\"
- Call un.RemoveEmptyDirs
- RMDir "$INSTDIR"
-SectionEnd
-
-##########################
-# Installer functions
-##########################
-Function .onInit
-UAC_Elevate:
- !insertmacro UAC_RunElevated
- StrCmp 1223 $0 UAC_ElevationAborted
- StrCmp 0 $0 0 UAC_Err
- StrCmp 1 $1 0 UAC_Success
- Quit
-
-UAC_Err:
- MessageBox MB_ICONSTOP "Unable to elevate, error $0"
- Abort
-
-UAC_ElevationAborted:
- Abort
-
-UAC_Success:
- StrCmp 1 $3 +4
- StrCmp 3 $1 0 UAC_ElevationAborted
- MessageBox MB_ICONSTOP "This installer requires admin access."
- Goto UAC_Elevate
-
- Call LoadPreviousSettings
- ReadRegStr $PreviousVersion HKLM "${REGKEY}" Version
-
- ${If} $PreviousVersion != ""
- ${VersionCompare} ${PRODUCT_VERSION} $PreviousVersion $PreviousVersionState
- ${EndIf}
-
- InitPluginsDir
- SetShellVarContext all
-FunctionEnd
-
-Function .onInstSuccess
- ${MementoSectionSave}
-FunctionEnd
-
-Function LoadPreviousSettings
- ${MementoSectionRestore}
- !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
-
- ReadRegStr $CreateStartMenuGroup HKLM "${REGKEY}" CreateStartMenuGroup
-
- ${If} $CreateStartMenuGroup == ""
- StrCpy $CreateStartMenuGroup 1
- ${EndIf}
-
- ReadRegStr $CreateDesktopIcon HKLM "${REGKEY}" CreateDesktopIcon
-
- ${If} $CreateDesktopIcon == ""
- StrCpy $CreateDesktopIcon 1
- ${EndIf}
-
- ${If} ${AtMostWinVista}
- ReadRegStr $CreateQuickLaunchIcon HKLM "${REGKEY}" CreateQuickLaunchIcon
-
- ${If} $CreateQuickLaunchIcon == ""
- StrCpy $CreateQuickLaunchIcon 1
- ${EndIf}
- ${EndIf}
-
-FunctionEnd
-
-Function RunUninstaller
- ReadRegStr $R1 HKLM "${UNINST_REGKEY}" "UninstallString"
-
- ${If} $R1 == ""
- Return
- ${EndIf}
-
- ;Run uninstaller
- HideWindow
- ClearErrors
-
- ${If} $PreviousVersionState == 0
- ${AndIf} $ReinstallUninstall == 1
- ExecWait '$R1 _?=$INSTDIR'
- ${Else}
- ExecWait '$R1 /frominstall _?=$INSTDIR'
- ${EndIf}
-
- IfErrors NoRemoveUninstaller
- IfFileExists "$INSTDIR\uninstall.exe" 0 NoRemoveUninstaller
- Delete "$R1"
- RMDir $INSTDIR
-
-NoRemoveUninstaller:
-FunctionEnd
-
-Function CheckSelectedUIs
- !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_SELECTED} end checkPartial
-checkPartial:
- !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_PSELECTED} end displayError
-displayError:
- MessageBox MB_OK|MB_ICONSTOP "At least one User Interface must be selected."
- Abort
-end:
-FunctionEnd
-
-LangString INSTALL_OPTS_PAGE_TITLE ${LANG_ENGLISH} "Choose Install Options"
-LangString INSTALL_OPTS_PAGE_SUBTITLE ${LANG_ENGLISH} "Choose where to install Avidemux icons."
-Var dlgInstallOptions
-Var lblCreateIcons
-Var chkDesktop
-Var chkStartMenu
-Var chkQuickLaunch
-
-Function InstallOptionsPage
- Call IsInstallOptionsRequired
- !insertmacro MUI_HEADER_TEXT "$(INSTALL_OPTS_PAGE_TITLE)" "$(INSTALL_OPTS_PAGE_SUBTITLE)"
-
- nsDialogs::Create 1018
- Pop $dlgInstallOptions
-
- ${If} $dlgInstallOptions == error
- Abort
- ${EndIf}
-
- ${NSD_CreateLabel} 0 0u 100% 12u "Create icons for Avidemux:"
- Pop $lblCreateIcons
-
- ${NSD_CreateCheckBox} 0 18u 100% 12u "On my &Desktop"
- Pop $chkDesktop
- ${NSD_SetState} $chkDesktop $CreateDesktopIcon
- ${NSD_OnClick} $chkDesktop UpdateInstallOptions
-
- ${NSD_CreateCheckBox} 0 36u 100% 12u "In my &Start Menu Programs folder"
- Pop $chkStartMenu
- ${NSD_SetState} $chkStartMenu $CreateStartMenuGroup
- ${NSD_OnClick} $chkStartMenu UpdateInstallOptions
-
- ${If} ${AtMostWinVista}
- ${NSD_CreateCheckBox} 0 54u 100% 12u "In my &Quick Launch bar"
- Pop $chkQuickLaunch
- ${NSD_SetState} $chkQuickLaunch $CreateQuickLaunchIcon
- ${NSD_OnClick} $chkQuickLaunch UpdateInstallOptions
- ${EndIf}
- #${If} ${IsWin2003}
- #WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\avidemux.exe" "WIN2000"
- #${EndIf}
- #${If} ${IsWinXp}
- #WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\avidemux.exe" "WIN2000"
- #${EndIf}
- nsDialogs::Show
-FunctionEnd
-
-Function UpdateInstallOptions
- ${NSD_GetState} $chkDesktop $CreateDesktopIcon
- ${NSD_GetState} $chkStartMenu $CreateStartMenuGroup
- ${NSD_GetState} $chkQuickLaunch $CreateQuickLaunchIcon
-FunctionEnd
-
-Function IsInstallOptionsRequired
-Goto end
- !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} end resetOptions
-resetOptions:
-
- StrCpy $CreateDesktopIcon 0
- StrCpy $CreateStartMenuGroup 0
- StrCpy $CreateQuickLaunchIcon 0
- Abort
-
-end:
-FunctionEnd
-
-Function IsStartMenuRequired
- StrCmp $CreateStartMenuGroup 1 +2
- Abort
-FunctionEnd
-
-Function ActivateInternalSections
- #AVS Proxy GUI shortcut:
- SectionGetFlags ${SecAvsProxy} $0
- IntOp $0 $0 & ${SF_SELECTED}
- IntOp $0 $0 & $CreateStartMenuGroup
- SectionSetFlags ${SecStartMenuAvsProxyGui} $0
-
- #Change Log shortcut:
- SectionSetFlags ${SecStartMenuChangeLog} $CreateStartMenuGroup
-
- #Qt shortcuts:
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
-
- IntOp $1 $0 & $CreateDesktopIcon
- SectionSetFlags ${SecDesktopQt} $1
-
- IntOp $1 $0 & $CreateQuickLaunchIcon
- SectionSetFlags ${SecQuickLaunchQt} $1
-
- IntOp $1 $0 & $CreateStartMenuGroup
- SectionSetFlags ${SecStartMenuQt} $1
-FunctionEnd
-
-Function InstFilesPageShow
- ${If} $ReinstallUninstall != ""
- Call RunUninstaller
- BringToFront
- ${EndIf}
-FunctionEnd
-
-Function InstFilesPageLeave
- ; Don't advance automatically if details expanded
- FindWindow $R0 "#32770" "" $HWNDPARENT
- GetDlgItem $R0 $R0 1016
- System::Call user32::IsWindowVisible(i$R0)i.s
- Pop $R0
-
- StrCmp $R0 0 +2
- SetAutoClose false
-FunctionEnd
-
-Function ConfigureFinishPage
-
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
- StrCmp $0 ${SF_SELECTED} end
-
- DeleteINISec "$PLUGINSDIR\ioSpecial.ini" "Field 4"
-
-end:
-FunctionEnd
-
-Function RunAvidemux
- SetOutPath $INSTDIR
-
- SectionGetFlags ${SecUiQt} $0
- IntOp $0 $0 & ${SF_SELECTED}
-
- !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\avidemux.exe" "" "" ""
-
- Goto end
-
-
-end:
-FunctionEnd
-
-Var ReinstallUninstallButton
-
-Function ReinstallPage
- ${If} $PreviousVersion == ""
- Abort
- ${EndIf}
-
- nsDialogs::Create /NOUNLOAD 1018
- Pop $0
-
- ${If} $PreviousVersionState == 1
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "An older version of Avidemux is installed on your system. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Upgrade Avidemux using previous settings (recommended)"
- Pop $ReinstallUninstallButton
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
- Pop $R0
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 1
- ${EndIf}
- ${ElseIf} $PreviousVersionState == 2
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "A newer version of Avidemux is already installed! It is not recommended that you downgrade to an older version. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Downgrade Avidemux using previous settings (recommended)"
- Pop $ReinstallUninstallButton
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
- Pop $R0
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 1
- ${EndIf}
- ${ElseIf} $PreviousVersionState == 0
- !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
- nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "${PRODUCT_FULLNAME} is already installed. Select the operation you want to perform and click Next to continue."
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Add/Remove/Reinstall components"
- Pop $R0
- nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Uninstall Avidemux"
- Pop $ReinstallUninstallButton
-
- ${If} $ReinstallUninstall == ""
- StrCpy $ReinstallUninstall 2
- ${EndIf}
- ${Else}
- MessageBox MB_ICONSTOP "Unknown value of PreviousVersionState, aborting" /SD IDOK
- Abort
- ${EndIf}
-
- ${If} $ReinstallUninstall == "1"
- SendMessage $ReinstallUninstallButton ${BM_SETCHECK} 1 0
- ${Else}
- SendMessage $R0 ${BM_SETCHECK} 1 0
- ${EndIf}
-
- nsDialogs::Show
-FunctionEnd
-
-Function ReinstallPageLeave
- SendMessage $ReinstallUninstallButton ${BM_GETCHECK} 0 0 $R0
-
- ${If} $R0 == 1
- ; Option to uninstall old version selected
- StrCpy $ReinstallUninstall 1
- ${Else}
- ; Custom up/downgrade or add/remove/reinstall
- StrCpy $ReinstallUninstall 2
- ${EndIf}
-
- ${If} $ReinstallUninstall == 1
- ${If} $PreviousVersionState == 0
- Call RunUninstaller
- Quit
- ${Else}
- ; Need to reload defaults. User could have
- ; chosen custom, change something, went back and selected
- ; the express option.
- Call LoadPreviousSettings
- ${EndIf}
- ${EndIf}
-FunctionEnd
-
-
-##########################
-# Uninstaller functions
-##########################
-Function un.onInit
- SetShellVarContext all
-
-UAC_Elevate:
- !insertmacro UAC_RunElevated
- StrCmp 1223 $0 UAC_ElevationAborted
- StrCmp 0 $0 0 UAC_Err
- StrCmp 1 $1 0 UAC_Success
- Quit
-
-UAC_Err:
- MessageBox MB_ICONSTOP "Unable to elevate, error $0"
- Abort
-
-UAC_ElevationAborted:
- Abort
-
-UAC_Success:
- StrCmp 1 $3 +4
- StrCmp 3 $1 0 UAC_ElevationAborted
- MessageBox MB_ICONSTOP "This installer requires admin access."
- Goto UAC_Elevate
-FunctionEnd
-
-; TrimNewlines (copied from NSIS documentation)
-; input, top of stack (e.g. whatever$/r$/n)
-; output, top of stack (replaces, with e.g. whatever)
-; modifies no other variables.
-Function un.TrimNewlines
- Exch $R0
- Push $R1
- Push $R2
- StrCpy $R1 0
-
-loop:
- IntOp $R1 $R1 - 1
- StrCpy $R2 $R0 1 $R1
- StrCmp $R2 "$\r" loop
- StrCmp $R2 "$\n" loop
- IntOp $R1 $R1 + 1
- IntCmp $R1 0 no_trim_needed
- StrCpy $R0 $R0 $R1
-
-no_trim_needed:
- Pop $R2
- Pop $R1
- Exch $R0
-FunctionEnd
-
-Function un.RemoveEmptyDirs
- Pop $9
- !define Index 'Line${__LINE__}'
- FindFirst $0 $1 "$INSTDIR$9*"
- StrCmp $0 "" "${Index}-End"
-"${Index}-Loop:"
- StrCmp $1 "" "${Index}-End"
- StrCmp $1 "." "${Index}-Next"
- StrCmp $1 ".." "${Index}-Next"
- Push $0
- Push $1
- Push $9
- Push "$9$1\"
- Call un.RemoveEmptyDirs
- Pop $9
- Pop $1
- Pop $0
-;"${Index}-Remove:"
- RMDir "$INSTDIR$9$1"
-"${Index}-Next:"
- FindNext $0 $1
- Goto "${Index}-Loop"
-"${Index}-End:"
- FindClose $0
- !undef Index
-FunctionEnd
-
-Function un.ConfirmPagePre
- ${un.GetParameters} $R0
- ${un.GetOptions} $R0 "/frominstall" $R1
- ${Unless} ${Errors}
- Abort
- ${EndUnless}
-FunctionEnd
-
-Function un.FinishPagePre
- ${un.GetParameters} $R0
- ${un.GetOptions} $R0 "/frominstall" $R1
- ${Unless} ${Errors}
- SetRebootFlag false
- Abort
- ${EndUnless}
-FunctionEnd
+##########################
+# Included files
+##########################
+!addincludedir ${NSIDIR}
+!addplugindir ${NSIDIR}/plugin
+
+!include Sections.nsh
+!include MUI2.nsh
+!include nsDialogs.nsh
+!include Memento.nsh
+!include FileFunc.nsh
+!include UAC.nsh
+!include WinVer.nsh
+!include WordFunc.nsh
+#!include revision.nsh
+
+SetCompressor /SOLID lzma
+SetCompressorDictSize 96
+RequestExecutionLevel user
+
+##########################
+# Defines
+##########################
+!define BUILD_BITS 64
+!define QT_DIR /mingw/Qt/current/bin/
+!define ADM_SYSDIR /mingw/bin
+!define ADM_DIR /mingw/Release
+#!define NSIDIR "/home/fx/hudson/workspace/mingw_2.6.2_nsis/avidemux/winInstaller"
+#!define SVN_VERSION 6
+!define REVISION ${SVN_VERSION}
+!define EXEDIR "${NSIDIR}/install"
+
+!define CORE_VERSION "2.6"
+!define POINT_RELEASE "8"
+!define PRODUCT_VERSION "${CORE_VERSION}.${POINT_RELEASE}.${SVN_VERSION}"
+!define PRODUCT_NAME "Avidemux ${CORE_VERSION} - 64bits"
+!define PRODUCT_FULLNAME "Avidemux ${PRODUCT_VERSION} (${BUILD_BITS}-bit Release)"
+
+!if ${BUILD_BITS} == 64
+ !define SHORTCUT_NAME "${PRODUCT_NAME}"
+ !define REG_GROUPNAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
+!else
+ !define SHORTCUT_NAME "${PRODUCT_NAME} (${BUILD_BITS}-bit)"
+ !define REG_GROUPNAME "${PRODUCT_NAME}"
+!endif
+
+!define REGKEY "SOFTWARE\${REG_GROUPNAME}"
+!define UNINST_REGKEY "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_GROUPNAME}"
+!define COMPANY "Free Software Foundation"
+!define URL "http://www.avidemux.org"
+
+OutFile "${EXEDIR}/avidemux_${CORE_VERSION}.${POINT_RELEASE}_r${REVISION}_win${BUILD_BITS}.exe"
+Name "${PRODUCT_FULLNAME}"
+
+##########################
+# Memento defines
+##########################
+!define MEMENTO_REGISTRY_ROOT HKLM
+!define MEMENTO_REGISTRY_KEY "${REGKEY}"
+
+##########################
+# MUI defines
+##########################
+!define MUI_ICON "${NSIDIR}/../common/xpm/adm.ico"
+!define MUI_HEADERIMAGE
+!define MUI_HEADERIMAGE_RIGHT
+!define MUI_HEADERIMAGE_BITMAP "${NSIDIR}/PageHeader.bmp"
+!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM
+!define MUI_STARTMENUPAGE_REGISTRY_KEY "${REGKEY}"
+!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup
+!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Avidemux (64bits)"
+!define MUI_STARTMENUPAGE_NODISABLE
+!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
+!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSIDIR}/WelcomeFinishStrip.bmp"
+!define MUI_UNICON "${NSIDIR}/../common/xpm/adm.ico"
+!define MUI_COMPONENTSPAGE_NODESC
+
+##########################
+# Variables
+##########################
+Var CreateDesktopIcon
+Var CreateStartMenuGroup
+Var CreateQuickLaunchIcon
+Var StartMenuGroup
+Var PreviousVersion
+Var PreviousVersionState
+Var ReinstallUninstall
+
+##########################
+# Installer pages
+##########################
+!define MUI_WELCOMEPAGE_TITLE "${PRODUCT_FULLNAME} Setup Wizard"
+!insertmacro MUI_PAGE_WELCOME
+!insertmacro MUI_PAGE_LICENSE "${NSIDIR}/License.rtf"
+ Page custom ReinstallPage ReinstallPageLeave
+!insertmacro MUI_PAGE_COMPONENTS
+Page custom InstallOptionsPage
+!define MUI_PAGE_CUSTOMFUNCTION_PRE IsStartMenuRequired
+!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup
+!insertmacro MUI_PAGE_DIRECTORY
+!define MUI_PAGE_CUSTOMFUNCTION_PRE ActivateInternalSections
+!define MUI_PAGE_CUSTOMFUNCTION_SHOW InstFilesPageShow
+!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesPageLeave
+!insertmacro MUI_PAGE_INSTFILES
+!define MUI_FINISHPAGE_RUN
+!define MUI_FINISHPAGE_RUN_FUNCTION RunAvidemux
+!define MUI_FINISHPAGE_RUN_TEXT "Run ${PRODUCT_NAME} now"
+!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR/Change Log.html"
+!define MUI_FINISHPAGE_SHOWREADME_TEXT "View Change Log now"
+!define MUI_FINISHPAGE_LINK "Visit the Avidemux website"
+!define MUI_FINISHPAGE_LINK_LOCATION "http://www.avidemux.org"
+!define MUI_PAGE_CUSTOMFUNCTION_PRE ConfigureFinishPage
+!insertmacro MUI_PAGE_FINISH
+
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.ConfirmPagePre
+!insertmacro MUI_UNPAGE_CONFIRM
+!insertmacro MUI_UNPAGE_INSTFILES
+!define MUI_PAGE_CUSTOMFUNCTION_PRE un.FinishPagePre
+!insertmacro MUI_UNPAGE_FINISH
+
+##########################
+# Installer languages
+##########################
+!insertmacro MUI_LANGUAGE English
+
+##########################
+# Installer attributes
+##########################
+!if ${BUILD_BITS} == 64
+ InstallDir "$PROGRAMFILES64\${PRODUCT_NAME}"
+!else
+ InstallDir "$PROGRAMFILES\${PRODUCT_NAME}"
+!endif
+
+CRCCheck on
+XPStyle on
+ShowInstDetails nevershow
+ShowUninstDetails nevershow
+VIProductVersion ${PRODUCT_VERSION}
+VIAddVersionKey ProductName Avidemux
+VIAddVersionKey ProductVersion "${PRODUCT_VERSION}"
+VIAddVersionKey FileVersion ""
+VIAddVersionKey FileDescription ""
+VIAddVersionKey LegalCopyright ""
+InstallDirRegKey HKLM "${REGKEY}" Path
+BrandingText "Packaged by Gruntster"
+InstType Standard
+InstType Full
+#########################################
+#
+#########################################
+Function GetAfterChar
+ Exch $0 ; chop char
+ Exch
+ Exch $1 ; input string
+ Push $2
+ Push $3
+ StrCpy $2 0
+ loop:
+ IntOp $2 $2 - 1
+ StrCpy $3 $1 1 $2
+ StrCmp $3 "" 0 +3
+ StrCpy $0 ""
+ Goto exit2
+ StrCmp $3 $0 exit1
+ Goto loop
+ exit1:
+ IntOp $2 $2 + 1
+ StrCpy $0 $1 "" $2
+ exit2:
+ Pop $3
+ Pop $2
+ Pop $1
+ Exch $0 ; output
+FunctionEnd
+#####################################################################
+!define StrReplace '!insertmacro "_Name"'
+
+##########################
+# Uninstaller macros
+##########################
+!insertmacro un.GetOptions
+!insertmacro un.GetParameters
+
+!define UninstallLogPath "$INSTDIR\uninstall.log"
+Var UninstallLogHandle
+
+; Uninstall log file missing.
+LangString UninstallLogMissing ${LANG_ENGLISH} "uninstall.log not found!$\r$\nUninstallation cannot proceed!"
+# Regexep Does not work with cross
+# Use only one file at a time
+!macro InstallFile FILEZ
+ File "${FILEZ}"
+ Push "${FILEZ}"
+ Push "/"
+ Call GetAfterChar
+ Pop $R0
+ FileWrite $UninstallLogHandle "$OUTDIR\$R0$\r$\n"
+!macroend
+!define File "!insertmacro InstallFile"
+
+!macro InstallFolder FILEREGEX
+ File /r "${FILEREGEX}/*"
+ Push "$OUTDIR"
+ Call InstallFolderInternal
+!macroend
+!define Folder "!insertmacro InstallFolder"
+
+Function InstallFolderInternal
+ Pop $9
+ !define Index 'Line${__LINE__}'
+ FindFirst $0 $1 "$9/*"
+ StrCmp $0 "" "${Index}-End"
+"${Index}-Loop:"
+ StrCmp $1 "" "${Index}-End"
+ StrCmp $1 "." "${Index}-Next"
+ StrCmp $1 ".." "${Index}-Next"
+ IfFileExists "$9\$1\*" 0 "${Index}-Write"
+ Push $0
+ Push $9
+ Push "$9\$1"
+ Call InstallFolderInternal
+ Pop $9
+ Pop $0
+ Goto "${Index}-Next"
+"${Index}-Write:"
+ FileWrite $UninstallLogHandle "$9\$1$\r$\n"
+"${Index}-Next:"
+ FindNext $0 $1
+ Goto "${Index}-Loop"
+"${Index}-End:"
+ !undef Index
+FunctionEnd
+
+; WriteUninstaller macro
+!macro WriteUninstaller Path
+ WriteUninstaller "${Path}"
+ FileWrite $UninstallLogHandle "${Path}$\r$\n"
+!macroend
+!define WriteUninstaller "!insertmacro WriteUninstaller"
+
+##########################
+# Macros
+##########################
+
+!macro InstallQtLanguage LANG_NAME LANG_CODE
+ SetOverwrite on
+
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} installQt${LANG_CODE} endQt${LANG_CODE}
+
+installQt${LANG_CODE}:
+ SetOutPath $INSTDIR\i18n
+ ${File} i18n/avidemux_${LANG_CODE}.qm
+ ${File} i18n/qt_${LANG_CODE}.qm
+
+endQt${LANG_CODE}:
+!macroend
+
+##########################
+# Installer sections
+##########################
+Section -OpenLogFile
+ CreateDirectory "$INSTDIR"
+ FileOpen $UninstallLogHandle ${UninstallLogPath} a
+ FileSeek $UninstallLogHandle 0 END
+SectionEnd
+
+Section "Avidemux Core" SecCore
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} "./Build Info.txt"
+ ${File} "./Change Log.html"
+ ${File} ${ADM_SYSDIR}/libexpat-1.dll
+ #${File} ${ADM_SYSDIR}/mgwz.dll
+ ${File} ${ADM_SYSDIR}/libfreetype-6.dll
+ ${File} ${ADM_SYSDIR}/libsqlite3-0.dll
+ ${File} ${ADM_SYSDIR}/libstdc++-6.dll
+ ${File} ${ADM_SYSDIR}/libgcc_s_seh-1.dll
+ ${File} ${ADM_SYSDIR}/libwinpthread-1.dll
+ ${File} ${ADM_SYSDIR}/libpng16-16.dll
+ ${File} ${ADM_SYSDIR}/SDL.dll
+ ${File} ${ADM_SYSDIR}/libz.dll
+ ${File} ${ADM_SYSDIR}/libz.dll.1.2.8
+ ${File} ${ADM_DIR}/libADM_audioParser6.dll
+ ${File} ${ADM_DIR}/libADM_core6.dll
+ ${File} ${ADM_DIR}/libADM_coreAudio6.dll
+ ${File} ${ADM_DIR}/libADM_coreAudioDevice6.dll
+ ${File} ${ADM_DIR}/libADM_coreAudioEncoder6.dll
+ ${File} ${ADM_DIR}/libADM_coreAudioFilterAPI6.dll
+ ${File} ${ADM_DIR}/libADM_coreDemuxer6.dll
+ ${File} ${ADM_DIR}/libADM_coreDemuxerMpeg6.dll
+ ${File} ${ADM_DIR}/libADM_coreImage6.dll
+ ${File} ${ADM_DIR}/libADM_coreImageLoader6.dll
+ ${File} ${ADM_DIR}/libADM_coreJobs.dll
+ ${File} ${ADM_DIR}/libADM_coreMuxer6.dll
+ ${File} ${ADM_DIR}/libADM_coreScript.dll
+ ${File} ${ADM_DIR}/libADM_coreSocket6.dll
+ ${File} ${ADM_DIR}/libADM_coreSqlLight3.dll
+ ${File} ${ADM_DIR}/libADM_coreUI6.dll
+ ${File} ${ADM_DIR}/libADM_coreUtils6.dll
+ ${File} ${ADM_DIR}/libADM_coreVideoCodec6.dll
+ ${File} ${ADM_DIR}/libADM_coreVideoEncoder6.dll
+ ${File} ${ADM_DIR}/libADM_coreVideoFilter6.dll
+ ${File} ${ADM_DIR}/libADM_coreSubtitle.dll
+ ${File} ${QT_DIR}/QtCore4.dll
+ ${File} ${QT_DIR}/QtGui4.dll
+ ${File} ${NSIDIR}/../../AUTHORS.
+ ${File} ${NSIDIR}/../../COPYING.
+ ${File} ${NSIDIR}/../../README.
+ ${File} ${ADM_DIR}/avcodec-*.dll
+ ${File} ${ADM_DIR}/avformat-*.dll
+ ${File} ${ADM_DIR}/avutil-*.dll
+ ${File} ${ADM_DIR}/postproc-*.dll
+ ${File} ${ADM_DIR}/swscale-*.dll
+
+ WriteRegStr HKLM "${REGKEY}" CreateDesktopIcon $CreateDesktopIcon
+ WriteRegStr HKLM "${REGKEY}" CreateStartMenuGroup $CreateStartMenuGroup
+
+ ${If} ${AtMostWinVista}
+ WriteRegStr HKLM "${REGKEY}" CreateQuickLaunchIcon $CreateQuickLaunchIcon
+ ${EndIf}
+SectionEnd
+
+SectionGroup /e "User interfaces" SecGrpUI
+ ${MementoUnselectedSection} "Command Line" SecUiCli
+ SectionIn 2
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${ADM_DIR}/avidemux_cli.exe
+ ${File} ${ADM_DIR}/libADM_render6_cli.dll
+ ${File} ${ADM_DIR}/libADM_UI_Cli6.dll
+ ${MementoSectionEnd}
+
+ ${MementoSection} Qt SecUiQt
+ SectionIn 1 2 RO
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${ADM_DIR}/avidemux.exe
+ ${File} ${ADM_DIR}/avidemux_jobs.exe
+ ${File} ${ADM_DIR}/libADM_render6_QT4.dll
+ ${File} ${ADM_DIR}/libADM_UIQT46.dll
+ ${File} ${QT_DIR}/QtOpenGL4.dll
+ #${File} ${QT_DIR}/libgcc_s_dw2-1.dll
+ #${File} ${QT_DIR}/mingwm10.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+
+SectionGroup "Audio Decoders" SecGrpAudioDecoder
+ ${MementoSection} "µ-law" SecAudDecUlaw
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ulaw.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC (FAAD)" SecAudDecFaad
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_faad.dll
+ #SetOutPath $INSTDIR
+ #${File} ${ADM_SYSDIR}/libfaad2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC, AC-3, ADPCM IMA AMV, DTS, E-AC-3, MP2, MP3, Nellymoser, QDesign, WMA (libavcodec)" SecAudDecAvcodec
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_lav.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (liba52)" SecAudDecA52
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_a52.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ADPCM IMA" SecAudDecImaAdpcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ima_adpcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ADPCM Microsoft" SecAudDecMsAdpcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_ms_adpcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AMR-NB" SecAudDecOpencoreAmrNb
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_opencore_amrnb.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libopencore-amrnb-*.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AMR-WB" SecAudDecOpencoreAmrWb
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_opencore_amrwb.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libopencore-amrwb-*.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP2, MP3 (MAD)" SecAudDecMad
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_Mad.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vorbis" SecAudDecVorbis
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDecoder
+ ${File} ${ADM_DIR}/plugins/audioDecoder/libADM_ad_vorbis.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libogg-0.dll
+ ${File} ${ADM_SYSDIR}/libvorbis-0.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Audio Devices" SecGrpAudioDevice
+ ${MementoSection} "Waveform" SecAudDevWaveform
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioDevices
+ ${File} ${ADM_DIR}/plugins/audioDevices/libADM_av_win32.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Audio Encoders" SecGrpAudioEncoder
+ ${MementoSection} "AAC (FAAC)" SecAudEncFaac
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_faac.dll
+ #SetOutPath $INSTDIR
+ #${File} ${ADM_SYSDIR}libfaac.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AAC (libavcodec)" SecAudEncLavAac
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_aac.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (Aften)" SecAudDecAften
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_aften.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libaften.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "AC-3 (libavcodec)" SecAudEncLavAc3
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_ac3.dll
+ ${MementoSectionEnd}
+ #${MementoSection} "DTS (dcaenc)" SecAudDecDcaEnc
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\audioEncoders
+ #${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_dcaenc.dll
+ #SetOutPath $INSTDIR
+ #${File} libdcaenc-0.dll
+ #${MementoSectionEnd}
+ ${MementoSection} "MP2 (libavcodec)" SecAudEncLavMp2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lav_mp2.dll
+ SetOutPath $INSTDIR
+ #${File} ${ADM_SYSDIR}/libtwolame-*.dll
+ ${MementoSectionEnd}
+ #${MementoSection} "MP2 (TwoLAME)" SecAudEncTwoLame
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\audioEncoders
+ #${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_twolame.dll
+ #${MementoSectionEnd}
+ ${MementoSection} "MP3" SecAudEncLame
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_lame.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libmp3lame-0.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "PCM" SecAudEncPcm
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_pcm.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vorbis" SecAudEncVorbis
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\audioEncoders
+ ${File} ${ADM_DIR}/plugins/audioEncoders/libADM_ae_vorbis.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libogg-0.dll
+ ${File} ${ADM_SYSDIR}/libvorbis-0.dll
+ ${File} ${ADM_SYSDIR}/libvorbisenc-2.dll
+ ${File} ${ADM_SYSDIR}/libvorbisfile-3.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Avisynth" SecGrpAvisynth
+ ${MementoUnselectedSection} "Avisynth Proxy" SecAvsProxy
+ SectionIn 2
+ SetOutPath $INSTDIR
+ SetOverwrite on
+ ${File} ${ADM_SYSDIR}/avsproxy.exe
+ ${File} ${ADM_SYSDIR}/avsproxy_gui.exe
+ ${MementoSectionEnd}
+ ${MementoUnselectedSection} "Avisynth Proxy Demuxer" SecDemuxAvisynth
+ SectionIn 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_avsproxy.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Demuxers" SecGrpDemuxers
+ ${MementoSection} "ASF" SecDemuxAsf
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_asf.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "BMP, JPEG, PNG Images" SecDemuxImage
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_pic.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Flash Video" SecDemuxFlv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_flv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Matroska" SecDemuxMatroska
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_matroska.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4" SecDemuxMp4
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_mp4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-PS" SecDemuxMpegPs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_ps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-TS" SecDemuxMpegTs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_ts.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MXF" SecDemuxMxf
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_mxf.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "OpenDML AVI" SecDemuxOpenDml
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\demuxers
+ ${File} ${ADM_DIR}/plugins/demuxers/libADM_dm_opendml.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Muxers" SecGrpMuxers
+ ${MementoSection} "Dummy [Raw Audio/Video]" SecMuxDummy
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_dummy.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Flash Video" SecMuxLavFlv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_flv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Matroska" SecMuxLavMatroska
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_Mkv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4 (libavcodec)" SecMuxLavMp4
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_mp4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MP4 (MP4v2)" SecMuxMp4v2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_mp4v2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-PS" SecMuxLavMpegPs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_ffPS.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-TS" SecMuxLavMpegTs
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_ffTS.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "OpenDML AVI" SecMuxOpenDml
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_avi.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Raw Video" SecMuxRaw
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\muxers
+ ${File} ${ADM_DIR}/plugins/muxers/libADM_mx_raw.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Script Engines" SecGrpScriptEngine
+ #${MementoSection} "QtScript" SecScriptQt
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR
+ #${File} ${QT_DIR}/QtScript4.dll
+ #${File} ${QT_DIR}/QtScriptTools4.dll
+ #SetOutPath $INSTDIR\plugins\scriptEngines
+ #${File} ${ADM_DIR}/plugins/scriptEngines/libADM_script_qt.dll
+ #SetOutPath $INSTDIR\help\QtScript
+ #${Folder} help/QtScript
+ #${MementoSectionEnd}
+ ${MementoSection} "Tinypy" SecScriptTinypy
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\scriptEngines
+ ${File} ${ADM_DIR}/plugins/scriptEngines/libADM_script_tinyPy.dll
+ SetOutPath $INSTDIR\plugins\autoScripts
+ ${Folder} ${ADM_DIR}/plugins/autoScripts
+ ${MementoSectionEnd}
+SectionGroupEnd
+#SectionGroup "Video Decoders" SecGrpVideoDecoder
+ #${MementoSection} "VP8" SecVidDecVpx
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoDecoders
+ #${File} ${ADM_DIR}/plugins/videoDecoders/libADM_vd_vpx.dll
+ #${MementoSectionEnd}
+#SectionGroupEnd
+SectionGroup "Video Encoders" SecGrpVideoEncoder
+ ${MementoSection} "[Null]" SecVidEncNull
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_null.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Huffyuv, FFVHuff" SecVidEncLavHuffyuv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_huff.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "JPEG" SecVidEncLavJpeg
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_jpeg.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-2" SecVidEncLavMpeg2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffMpeg2.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 ASP (libavcodec)" SecVidEncLavMpeg4asp
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffMpeg4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 ASP (Xvid)" SecVidEncXvid
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_xvid4.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/xvidcore.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 AVC" SecVidEncX264
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_x264_other.dll
+
+ SetOutPath $INSTDIR\plugins\videoEncoders\qt4
+ ${File} ${ADM_DIR}/plugins/videoEncoders/qt4/libADM_ve_x264_QT4.dll
+
+ SetOutPath $INSTDIR\plugins\pluginSettings\x264
+ ${Folder} ${ADM_DIR}/plugins/pluginSettings/x264
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libx264-*.dll
+ #${File} ${ADM_SYSDIR}/pthreadGC2-w64.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPEG-4 HEC" SecVidEncX265
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_x265_other.dll
+
+ SetOutPath $INSTDIR\plugins\videoEncoders\qt4
+ ${File} ${ADM_DIR}/plugins/videoEncoders/qt4/libADM_ve_x265_QT4.dll
+
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libx265*.dll
+ #${File} ${ADM_SYSDIR}/pthreadGC2-w64.dll
+ ${MementoSectionEnd}
+${MementoSection} "PNG" SecVidEncLavPng
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_png.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Sorenson Spark" SecVidEncSorenson
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_ffFlv1.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "YV12" SecVidEncYv12
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoEncoders
+ ${File} ${ADM_DIR}/plugins/videoEncoders/libADM_ve_yv12.dll
+ ${MementoSectionEnd}
+SectionGroupEnd
+SectionGroup "Video Filters" SecGrpVideoFilter
+ SectionGroup "Transform Filters" SecGrpVideoFilterTransform
+ ${MementoSection} "Add Black Borders" SecVidFltBlackBorders
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_addBorders.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Add Logo" SecVidFltLogo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_logo.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Blacken Borders" SecVidFltBlackenBorders
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_blackenBorders.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Change FPS" SecVidFltChangeFps
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_changeFps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Crop" SecVidFltCrop
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_CropCli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_cropQT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Fade" SecVidFltFade
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_fadeToBlack.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Greyscale" SecVidFltLumaOnly
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_lumaOnly.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Horizontal Flip" SecVidFltHorizontalFlip
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_hf_hflip.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "libswscale Resize" SecVidFltSwscaleResize
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_swscaleResize_cli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_swscaleResizeQT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Resample FPS" SecVidFltResampleFps
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_resampleFps.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Rotate" SecVidFltRotate
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_rotate.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Vertical Flip" SecVidFltVerticalFlip
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_vflip.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Interlacing Filters" SecGrpVideoFilterInterlacing
+ ${MementoSection} "Decomb Decimate" SecVidFltDecombDecimate
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_decimate.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Decomb Telecide" SecVidFltDecombTelecide
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_telecide.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "DGBob" SecVidFltDgbob
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_DgBob.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Horizontal Stack Fields" SecVidFltHzStackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_hzstackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Kernel Deint" SecVidFltKernelDeint
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_kernelDeint.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "libavcodec Deinterlacers" SecVidFltLavDeinterlacers
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_lavDeint.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Merge Fields" SecVidFltMergeFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_mergeField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Separate Fields" SecVidFltSeparateFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_separateField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Stack Fields" SecVidFltStackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_stackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Unstack Fields" SecVidFltUnstackFields
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_unstackField.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Yadif" SecVidFltYadif
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_yadif.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Colour Filters" SecGrpVideoFilterColour
+ ${MementoSection} "Avisynth Colour YUV" SecVidFltAvisynthColourYuv
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_colorYuv.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "ChromaShift" SecVidFltChromaShift
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_chromaShiftCli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_chromaShiftQT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Contrast" SecVidFltContrast
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_contrastCli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_contrastQT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlater Eq2" SecVidFltMplayerEq2
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_eq2Cli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_eq2QT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlater Hue" SecVidFltMplayerHue
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_HueCli.dll
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_HueQT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Remove Plane" SecVidFltRemovePlane
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_removePlane.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Swap U and V" SecVidFltSwapUandV
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_swapUV.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Noise Filters" SecGrpVideoFilterNoise
+ ${MementoSection} "FluxSmooth" SecVidFltFluxSmooth
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_FluxSmooth.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Gaussian Convolution" SecVidFltGauss
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_gauss.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Large Median (5x5)" SecVidFltMediam5x5
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_largeMedian.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Mean Convolution" SecVidFltMean
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_mean.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Median Convolution" SecVidFltMedian
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_median.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Denoise 3D" SecVidFltMPlayerDenoise3d
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_denoise3d.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Denoise 3D HQ" SecVidFltMPlayerDenoise3dHq
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_denoise3dhq.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MSharpen" SecVidFltMSharpen
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_msharpen.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Sharpness Filters" SecGrpVideoFilterSharpness
+ ${MementoSection} "asharp" SecVidFltAsharp
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_asharpQT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "MPlayer Delogo" SecVidFltMPlayerDelogo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ SetOutPath $INSTDIR\plugins\videoFilters\qt4
+ ${File} ${ADM_DIR}/plugins/videoFilters/qt4/libADM_vf_mpdelogoQT4.dll
+ ${MementoSectionEnd}
+ ${MementoSection} "Sharpen" SecVidFltSharpen
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sharpen.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ SectionGroup "Subtitle Filters" SecGrpVideoFilterSubtitle
+ ${MementoSection} "ASS, SSA" SecVidFltAssSsa
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_ssa.dll
+ SetOutPath $INSTDIR
+ ${File} ${ADM_SYSDIR}/libfribidi-0.dll
+ ${File} ${ADM_SYSDIR}/libiconv-2.dll
+ ${File} ${ADM_SYSDIR}/libfontconfig-1.dll
+ #${File} ${ADM_SYSDIR}/libexpat-1.dll
+ SetOutPath $INSTDIR\etc\fonts
+ ${Folder} ${ADM_DIR}/etc/fonts
+ ${MementoSectionEnd}
+ SectionGroupEnd
+ #SectionGroup "OpenGL Filters" SecGrpVideoFilterOpenGl
+ #${MementoSection} "Fragment Shader" SecVidFltOpenGlFragmentShader
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sampleGlFrag2.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Read Back Benchmark" SecVidFltOpenGlReadBack
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_glBenchmark.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Resize" SecVidFltOpenGlResize
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_glResize.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Rotate" SecVidFltOpenGlRotate
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_rotateGlFrag2.dll
+ #${MementoSectionEnd}
+ #${MementoSection} "Wave" SecVidFltOpenGlWave
+ #SectionIn 1 2
+ #SetOverwrite on
+ #SetOutPath $INSTDIR\plugins\videoFilters
+ #${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_sampleGlVertex.dll
+ #${MementoSectionEnd}
+ #SectionGroupEnd
+ SectionGroup "Miscellaneous Filters" SecGrpVideoFilterMiscellaneous
+ ${MementoSection} "Print Information" SecVidFltPrintInfo
+ SectionIn 1 2
+ SetOverwrite on
+ SetOutPath $INSTDIR\plugins\videoFilters
+ ${File} ${ADM_DIR}/plugins/videoFilters/libADM_vf_printInfo.dll
+ ${MementoSectionEnd}
+ SectionGroupEnd
+SectionGroupEnd
+
+${MementoSection} "-Start menu Change Log" SecStartMenuChangeLog
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk" "$INSTDIR\Change Log.html"
+ !insertmacro MUI_STARTMENU_WRITE_END
+${MementoSectionEnd}
+
+
+${MementoSection} "-Start menu Qt" SecStartMenuQt
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Avidemux job control (64 Bits).lnk" $INSTDIR\avidemux_jobs.exe
+ !insertmacro MUI_STARTMENU_WRITE_END
+${MementoSectionEnd}
+
+${MementoSection} "-Start menu AVS Proxy GUI" SecStartMenuAvsProxyGui
+ CreateDirectory $SMPROGRAMS\$StartMenuGroup
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+ SetOutPath $INSTDIR
+ CreateShortcut "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk" "$INSTDIR\avsproxy_gui.exe"
+ !insertmacro MUI_STARTMENU_WRITE_END
+${MementoSectionEnd}
+
+
+${MementoSection} "-Quick Launch Qt" SecQuickLaunchQt
+ SetOutPath $INSTDIR
+ CreateShortcut "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+${MementoSectionEnd}
+
+
+${MementoSection} "-Desktop Qt" SecDesktopQt
+ SetOutPath $INSTDIR
+ CreateShortcut "$DESKTOP\${SHORTCUT_NAME}.lnk" $INSTDIR\avidemux.exe
+${MementoSectionEnd}
+
+${MementoSectionDone}
+
+Section -post SecUninstaller
+ SectionIn 1 2
+ WriteRegStr HKLM "${REGKEY}" Path $INSTDIR
+ WriteRegStr HKLM "${REGKEY}" Version ${PRODUCT_VERSION}
+ SetOutPath $INSTDIR
+ WriteUninstaller $INSTDIR\uninstall.exe
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayName "${SHORTCUT_NAME}"
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayVersion "${PRODUCT_VERSION}"
+ WriteRegStr HKLM "${UNINST_REGKEY}" DisplayIcon $INSTDIR\uninstall.exe
+ WriteRegStr HKLM "${UNINST_REGKEY}" UninstallString $INSTDIR\uninstall.exe
+ WriteRegDWORD HKLM "${UNINST_REGKEY}" NoModify 1
+ WriteRegDWORD HKLM "${UNINST_REGKEY}" NoRepair 1
+SectionEnd
+
+Section -CloseLogFile
+ FileClose $UninstallLogHandle
+ SetFileAttributes ${UninstallLogPath} HIDDEN
+SectionEnd
+
+Section Uninstall
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+
+
+ Delete /REBOOTOK "$QUICKLAUNCH\${SHORTCUT_NAME}.lnk"
+ Delete /REBOOTOK "$DESKTOP\${SHORTCUT_NAME}.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\${SHORTCUT_NAME}.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Avidemux job control (64 Bits).lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Change Log ${CORE_VERSION}.lnk"
+ Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\AVS Proxy GUI ${CORE_VERSION}.lnk"
+ RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup
+ DeleteRegValue HKLM "${REGKEY}" StartMenuGroup
+
+ DeleteRegKey HKLM "${UNINST_REGKEY}"
+ DeleteRegValue HKLM "${REGKEY}" Path
+ DeleteRegValue HKLM "${REGKEY}" CreateDesktopIcon
+ DeleteRegValue HKLM "${REGKEY}" CreateStartMenuGroup
+ DeleteRegValue HKLM "${REGKEY}" CreateQuickLaunchIcon
+ DeleteRegKey /IfEmpty HKLM "${REGKEY}"
+
+ FileOpen $UninstallLogHandle "${UninstallLogPath}" r
+UninstallLoop:
+ ClearErrors
+ FileRead $UninstallLogHandle $R0
+ IfErrors UninstallEnd
+ Push $R0
+ Call un.TrimNewLines
+ Pop $R0
+ Delete "$R0"
+ Goto UninstallLoop
+UninstallEnd:
+ FileClose $UninstallLogHandle
+ Delete "${UninstallLogPath}"
+ Delete "$INSTDIR\uninstall.exe"
+ Push "\"
+ Call un.RemoveEmptyDirs
+ RMDir "$INSTDIR"
+SectionEnd
+
+##########################
+# Installer functions
+##########################
+Function .onInit
+UAC_Elevate:
+ !insertmacro UAC_RunElevated
+ StrCmp 1223 $0 UAC_ElevationAborted
+ StrCmp 0 $0 0 UAC_Err
+ StrCmp 1 $1 0 UAC_Success
+ Quit
+
+UAC_Err:
+ MessageBox MB_ICONSTOP "Unable to elevate, error $0"
+ Abort
+
+UAC_ElevationAborted:
+ Abort
+
+UAC_Success:
+ StrCmp 1 $3 +4
+ StrCmp 3 $1 0 UAC_ElevationAborted
+ MessageBox MB_ICONSTOP "This installer requires admin access."
+ Goto UAC_Elevate
+
+ Call LoadPreviousSettings
+ ReadRegStr $PreviousVersion HKLM "${REGKEY}" Version
+
+ ${If} $PreviousVersion != ""
+ ${VersionCompare} ${PRODUCT_VERSION} $PreviousVersion $PreviousVersionState
+ ${EndIf}
+
+ InitPluginsDir
+ SetShellVarContext all
+FunctionEnd
+
+Function .onInstSuccess
+ ${MementoSectionSave}
+FunctionEnd
+
+Function LoadPreviousSettings
+ ${MementoSectionRestore}
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup
+
+ ReadRegStr $CreateStartMenuGroup HKLM "${REGKEY}" CreateStartMenuGroup
+
+ ${If} $CreateStartMenuGroup == ""
+ StrCpy $CreateStartMenuGroup 1
+ ${EndIf}
+
+ ReadRegStr $CreateDesktopIcon HKLM "${REGKEY}" CreateDesktopIcon
+
+ ${If} $CreateDesktopIcon == ""
+ StrCpy $CreateDesktopIcon 1
+ ${EndIf}
+
+ ${If} ${AtMostWinVista}
+ ReadRegStr $CreateQuickLaunchIcon HKLM "${REGKEY}" CreateQuickLaunchIcon
+
+ ${If} $CreateQuickLaunchIcon == ""
+ StrCpy $CreateQuickLaunchIcon 1
+ ${EndIf}
+ ${EndIf}
+
+FunctionEnd
+
+Function RunUninstaller
+ ReadRegStr $R1 HKLM "${UNINST_REGKEY}" "UninstallString"
+
+ ${If} $R1 == ""
+ Return
+ ${EndIf}
+
+ ;Run uninstaller
+ HideWindow
+ ClearErrors
+
+ ${If} $PreviousVersionState == 0
+ ${AndIf} $ReinstallUninstall == 1
+ ExecWait '$R1 _?=$INSTDIR'
+ ${Else}
+ ExecWait '$R1 /frominstall _?=$INSTDIR'
+ ${EndIf}
+
+ IfErrors NoRemoveUninstaller
+ IfFileExists "$INSTDIR\uninstall.exe" 0 NoRemoveUninstaller
+ Delete "$R1"
+ RMDir $INSTDIR
+
+NoRemoveUninstaller:
+FunctionEnd
+
+Function CheckSelectedUIs
+ !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_SELECTED} end checkPartial
+checkPartial:
+ !insertmacro SectionFlagIsSet ${SecGrpUI} ${SF_PSELECTED} end displayError
+displayError:
+ MessageBox MB_OK|MB_ICONSTOP "At least one User Interface must be selected."
+ Abort
+end:
+FunctionEnd
+
+LangString INSTALL_OPTS_PAGE_TITLE ${LANG_ENGLISH} "Choose Install Options"
+LangString INSTALL_OPTS_PAGE_SUBTITLE ${LANG_ENGLISH} "Choose where to install Avidemux icons."
+Var dlgInstallOptions
+Var lblCreateIcons
+Var chkDesktop
+Var chkStartMenu
+Var chkQuickLaunch
+
+Function InstallOptionsPage
+ Call IsInstallOptionsRequired
+ !insertmacro MUI_HEADER_TEXT "$(INSTALL_OPTS_PAGE_TITLE)" "$(INSTALL_OPTS_PAGE_SUBTITLE)"
+
+ nsDialogs::Create 1018
+ Pop $dlgInstallOptions
+
+ ${If} $dlgInstallOptions == error
+ Abort
+ ${EndIf}
+
+ ${NSD_CreateLabel} 0 0u 100% 12u "Create icons for Avidemux:"
+ Pop $lblCreateIcons
+
+ ${NSD_CreateCheckBox} 0 18u 100% 12u "On my &Desktop"
+ Pop $chkDesktop
+ ${NSD_SetState} $chkDesktop $CreateDesktopIcon
+ ${NSD_OnClick} $chkDesktop UpdateInstallOptions
+
+ ${NSD_CreateCheckBox} 0 36u 100% 12u "In my &Start Menu Programs folder"
+ Pop $chkStartMenu
+ ${NSD_SetState} $chkStartMenu $CreateStartMenuGroup
+ ${NSD_OnClick} $chkStartMenu UpdateInstallOptions
+
+ ${If} ${AtMostWinVista}
+ ${NSD_CreateCheckBox} 0 54u 100% 12u "In my &Quick Launch bar"
+ Pop $chkQuickLaunch
+ ${NSD_SetState} $chkQuickLaunch $CreateQuickLaunchIcon
+ ${NSD_OnClick} $chkQuickLaunch UpdateInstallOptions
+ ${EndIf}
+ #${If} ${IsWin2003}
+ #WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\avidemux.exe" "WIN2000"
+ #${EndIf}
+ #${If} ${IsWinXp}
+ #WriteRegStr HKCU "Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" "$INSTDIR\avidemux.exe" "WIN2000"
+ #${EndIf}
+ nsDialogs::Show
+FunctionEnd
+
+Function UpdateInstallOptions
+ ${NSD_GetState} $chkDesktop $CreateDesktopIcon
+ ${NSD_GetState} $chkStartMenu $CreateStartMenuGroup
+ ${NSD_GetState} $chkQuickLaunch $CreateQuickLaunchIcon
+FunctionEnd
+
+Function IsInstallOptionsRequired
+Goto end
+ !insertmacro SectionFlagIsSet ${SecUiQt} ${SF_SELECTED} end resetOptions
+resetOptions:
+
+ StrCpy $CreateDesktopIcon 0
+ StrCpy $CreateStartMenuGroup 0
+ StrCpy $CreateQuickLaunchIcon 0
+ Abort
+
+end:
+FunctionEnd
+
+Function IsStartMenuRequired
+ StrCmp $CreateStartMenuGroup 1 +2
+ Abort
+FunctionEnd
+
+Function ActivateInternalSections
+ #AVS Proxy GUI shortcut:
+ SectionGetFlags ${SecAvsProxy} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ IntOp $0 $0 & $CreateStartMenuGroup
+ SectionSetFlags ${SecStartMenuAvsProxyGui} $0
+
+ #Change Log shortcut:
+ SectionSetFlags ${SecStartMenuChangeLog} $CreateStartMenuGroup
+
+ #Qt shortcuts:
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+
+ IntOp $1 $0 & $CreateDesktopIcon
+ SectionSetFlags ${SecDesktopQt} $1
+
+ IntOp $1 $0 & $CreateQuickLaunchIcon
+ SectionSetFlags ${SecQuickLaunchQt} $1
+
+ IntOp $1 $0 & $CreateStartMenuGroup
+ SectionSetFlags ${SecStartMenuQt} $1
+FunctionEnd
+
+Function InstFilesPageShow
+ ${If} $ReinstallUninstall != ""
+ Call RunUninstaller
+ BringToFront
+ ${EndIf}
+FunctionEnd
+
+Function InstFilesPageLeave
+ ; Don't advance automatically if details expanded
+ FindWindow $R0 "#32770" "" $HWNDPARENT
+ GetDlgItem $R0 $R0 1016
+ System::Call user32::IsWindowVisible(i$R0)i.s
+ Pop $R0
+
+ StrCmp $R0 0 +2
+ SetAutoClose false
+FunctionEnd
+
+Function ConfigureFinishPage
+
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+ StrCmp $0 ${SF_SELECTED} end
+
+ DeleteINISec "$PLUGINSDIR\ioSpecial.ini" "Field 4"
+
+end:
+FunctionEnd
+
+Function RunAvidemux
+ SetOutPath $INSTDIR
+
+ SectionGetFlags ${SecUiQt} $0
+ IntOp $0 $0 & ${SF_SELECTED}
+
+ !insertmacro UAC_AsUser_ExecShell "" "$INSTDIR\avidemux.exe" "" "" ""
+
+ Goto end
+
+
+end:
+FunctionEnd
+
+Var ReinstallUninstallButton
+
+Function ReinstallPage
+ ${If} $PreviousVersion == ""
+ Abort
+ ${EndIf}
+
+ nsDialogs::Create /NOUNLOAD 1018
+ Pop $0
+
+ ${If} $PreviousVersionState == 1
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "An older version of Avidemux is installed on your system. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Upgrade Avidemux using previous settings (recommended)"
+ Pop $ReinstallUninstallButton
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
+ Pop $R0
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 1
+ ${EndIf}
+ ${ElseIf} $PreviousVersionState == 2
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install ${PRODUCT_FULLNAME}."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "A newer version of Avidemux is already installed! It is not recommended that you downgrade to an older version. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Downgrade Avidemux using previous settings (recommended)"
+ Pop $ReinstallUninstallButton
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Change settings (advanced)"
+ Pop $R0
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 1
+ ${EndIf}
+ ${ElseIf} $PreviousVersionState == 0
+ !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
+ nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 "${PRODUCT_FULLNAME} is already installed. Select the operation you want to perform and click Next to continue."
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 "Add/Remove/Reinstall components"
+ Pop $R0
+ nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 "Uninstall Avidemux"
+ Pop $ReinstallUninstallButton
+
+ ${If} $ReinstallUninstall == ""
+ StrCpy $ReinstallUninstall 2
+ ${EndIf}
+ ${Else}
+ MessageBox MB_ICONSTOP "Unknown value of PreviousVersionState, aborting" /SD IDOK
+ Abort
+ ${EndIf}
+
+ ${If} $ReinstallUninstall == "1"
+ SendMessage $ReinstallUninstallButton ${BM_SETCHECK} 1 0
+ ${Else}
+ SendMessage $R0 ${BM_SETCHECK} 1 0
+ ${EndIf}
+
+ nsDialogs::Show
+FunctionEnd
+
+Function ReinstallPageLeave
+ SendMessage $ReinstallUninstallButton ${BM_GETCHECK} 0 0 $R0
+
+ ${If} $R0 == 1
+ ; Option to uninstall old version selected
+ StrCpy $ReinstallUninstall 1
+ ${Else}
+ ; Custom up/downgrade or add/remove/reinstall
+ StrCpy $ReinstallUninstall 2
+ ${EndIf}
+
+ ${If} $ReinstallUninstall == 1
+ ${If} $PreviousVersionState == 0
+ Call RunUninstaller
+ Quit
+ ${Else}
+ ; Need to reload defaults. User could have
+ ; chosen custom, change something, went back and selected
+ ; the express option.
+ Call LoadPreviousSettings
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
+
+##########################
+# Uninstaller functions
+##########################
+Function un.onInit
+ SetShellVarContext all
+
+UAC_Elevate:
+ !insertmacro UAC_RunElevated
+ StrCmp 1223 $0 UAC_ElevationAborted
+ StrCmp 0 $0 0 UAC_Err
+ StrCmp 1 $1 0 UAC_Success
+ Quit
+
+UAC_Err:
+ MessageBox MB_ICONSTOP "Unable to elevate, error $0"
+ Abort
+
+UAC_ElevationAborted:
+ Abort
+
+UAC_Success:
+ StrCmp 1 $3 +4
+ StrCmp 3 $1 0 UAC_ElevationAborted
+ MessageBox MB_ICONSTOP "This installer requires admin access."
+ Goto UAC_Elevate
+FunctionEnd
+
+; TrimNewlines (copied from NSIS documentation)
+; input, top of stack (e.g. whatever$/r$/n)
+; output, top of stack (replaces, with e.g. whatever)
+; modifies no other variables.
+Function un.TrimNewlines
+ Exch $R0
+ Push $R1
+ Push $R2
+ StrCpy $R1 0
+
+loop:
+ IntOp $R1 $R1 - 1
+ StrCpy $R2 $R0 1 $R1
+ StrCmp $R2 "$\r" loop
+ StrCmp $R2 "$\n" loop
+ IntOp $R1 $R1 + 1
+ IntCmp $R1 0 no_trim_needed
+ StrCpy $R0 $R0 $R1
+
+no_trim_needed:
+ Pop $R2
+ Pop $R1
+ Exch $R0
+FunctionEnd
+
+Function un.RemoveEmptyDirs
+ Pop $9
+ !define Index 'Line${__LINE__}'
+ FindFirst $0 $1 "$INSTDIR$9*"
+ StrCmp $0 "" "${Index}-End"
+"${Index}-Loop:"
+ StrCmp $1 "" "${Index}-End"
+ StrCmp $1 "." "${Index}-Next"
+ StrCmp $1 ".." "${Index}-Next"
+ Push $0
+ Push $1
+ Push $9
+ Push "$9$1\"
+ Call un.RemoveEmptyDirs
+ Pop $9
+ Pop $1
+ Pop $0
+;"${Index}-Remove:"
+ RMDir "$INSTDIR$9$1"
+"${Index}-Next:"
+ FindNext $0 $1
+ Goto "${Index}-Loop"
+"${Index}-End:"
+ FindClose $0
+ !undef Index
+FunctionEnd
+
+Function un.ConfirmPagePre
+ ${un.GetParameters} $R0
+ ${un.GetOptions} $R0 "/frominstall" $R1
+ ${Unless} ${Errors}
+ Abort
+ ${EndUnless}
+FunctionEnd
+
+Function un.FinishPagePre
+ ${un.GetParameters} $R0
+ ${un.GetOptions} $R0 "/frominstall" $R1
+ ${Unless} ${Errors}
+ SetRebootFlag false
+ Abort
+ ${EndUnless}
+FunctionEnd
diff --git a/avidemux/winInstaller/qtifw/config/config.xml.in b/avidemux/winInstaller/qtifw/config/config.xml.in
index 43e2a24bf4..998a60ab55 100755
--- a/avidemux/winInstaller/qtifw/config/config.xml.in
+++ b/avidemux/winInstaller/qtifw/config/config.xml.in
@@ -1,15 +1,15 @@
-
-
- Avidemux @ADM_FLAVOR@
- @ADM_VERSION@
- Avidemux @ADM_FLAVOR@
- watermark.png
- Mean
- Modern
- avidemux
- avidemux
- Avidemux @ADM_MENU_VERSION@ @ADM_FLAVOR@
- @ApplicationsDirX64@/Avidemux @ADM_MENU_VERSION@ @ADM_FLAVOR@
- Uninstall Avidemux @ADM_FLAVOR@
-
-
+
+
+ Avidemux @ADM_FLAVOR@
+ @ADM_VERSION@
+ Avidemux @ADM_FLAVOR@
+ watermark.png
+ Mean
+ Modern
+ avidemux
+ avidemux
+ Avidemux @ADM_MENU_VERSION@ @ADM_FLAVOR@
+ @ApplicationsDirX64@/Avidemux @ADM_MENU_VERSION@ @ADM_FLAVOR@
+ Uninstall Avidemux @ADM_FLAVOR@
+
+
diff --git a/avidemux/winInstaller/qtifw/packages/org.avidemux.dev/meta/installscript.qs b/avidemux/winInstaller/qtifw/packages/org.avidemux.dev/meta/installscript.qs
index e34228fc2f..e48f7dde61 100755
--- a/avidemux/winInstaller/qtifw/packages/org.avidemux.dev/meta/installscript.qs
+++ b/avidemux/winInstaller/qtifw/packages/org.avidemux.dev/meta/installscript.qs
@@ -1,31 +1,31 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the FOO module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-
-
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the FOO module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+
+
diff --git a/avidemux/winInstaller/qtifw/packages/org.avidemux.dev/meta/package.xml.in b/avidemux/winInstaller/qtifw/packages/org.avidemux.dev/meta/package.xml.in
index a18286761f..5ef2d670b8 100755
--- a/avidemux/winInstaller/qtifw/packages/org.avidemux.dev/meta/package.xml.in
+++ b/avidemux/winInstaller/qtifw/packages/org.avidemux.dev/meta/package.xml.in
@@ -1,7 +1,7 @@
-
-
- Dev files
- Avidemux development files, if you want to write plugins
- @ADM_VERSION@
- 2010-09-21
-
+
+
+ Dev files
+ Avidemux development files, if you want to write plugins
+ @ADM_VERSION@
+ 2010-09-21
+
diff --git a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/data/scripts/auto_uninstall.js b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/data/scripts/auto_uninstall.js
index ae1b6062f6..8477947f26 100755
--- a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/data/scripts/auto_uninstall.js
+++ b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/data/scripts/auto_uninstall.js
@@ -1,23 +1,23 @@
-// Controller script to pass to the uninstaller to get it to run automatically.
-// It's passed to the maintenance tool during installation if there is already an
-// installation present with: /maintenancetool.exe --script=/scripts/auto_uninstall.qs.
-// This is required so that the user doesn't have to see/deal with the uninstaller in the middle of
-// an installation.
-
-function Controller()
-{
- gui.clickButton(buttons.NextButton);
- gui.clickButton(buttons.NextButton);
-
- installer.uninstallationFinished.connect(this, this.uninstallationFinished);
-}
-
-Controller.prototype.uninstallationFinished = function()
-{
- gui.clickButton(buttons.NextButton);
-}
-
-Controller.prototype.FinishedPageCallback = function()
-{
- gui.clickButton(buttons.FinishButton);
-}
+// Controller script to pass to the uninstaller to get it to run automatically.
+// It's passed to the maintenance tool during installation if there is already an
+// installation present with: /maintenancetool.exe --script=/scripts/auto_uninstall.qs.
+// This is required so that the user doesn't have to see/deal with the uninstaller in the middle of
+// an installation.
+
+function Controller()
+{
+ gui.clickButton(buttons.NextButton);
+ gui.clickButton(buttons.NextButton);
+
+ installer.uninstallationFinished.connect(this, this.uninstallationFinished);
+}
+
+Controller.prototype.uninstallationFinished = function()
+{
+ gui.clickButton(buttons.NextButton);
+}
+
+Controller.prototype.FinishedPageCallback = function()
+{
+ gui.clickButton(buttons.FinishButton);
+}
diff --git a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/installscript.js b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/installscript.js
index 37106aa799..c827d75e73 100755
--- a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/installscript.js
+++ b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/installscript.js
@@ -1,154 +1,154 @@
-/**************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Installer Framework.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-**************************************************************************/
-
-// Derived from dynamic page example
-
-var ComponentSelectionPage = null;
-var update=false;
-
-function Controller()
-{
- installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
-}
-var Dir = new function () {
- this.toNativeSparator = function (path) {
- if (systemInfo.productType === "windows")
- return path.replace(/\//g, '\\');
- return path;
- }
-};
-
-function Component()
-{
- console.log("xxxxxxxxxxxx");
- if (installer.isInstaller())
- {
- update=false;
- component.loaded.connect(this, Component.prototype.installerLoaded);
- ComponentSelectionPage = gui.pageById(QInstaller.ComponentSelection);
-
- var folder=installer.value( "TargetDir");
- if (installer.fileExists(folder + "/components.xml"))
- {
- update=true;
- // remove old one
- // https://stackoverflow.com/questions/46455360/workaround-for-qt-installer-framework-not-overwriting-existing-installation
- QMessageBox.question("question","Uninstall","I will now uninstall the previous version of avidemux VC++" , QMessageBox.Yes);
- if (installer.fileExists(folder + "/scripts/auto_uninstall.js"))
- installer.execute(folder+"/Uninstall Avidemux VC++ 64bits.exe", "--script="+folder+"/scripts/auto_uninstall.js");
- else
- installer.execute(folder+"/Uninstall Avidemux VC++ 64bits.exe");
- }
-
- installer.setDefaultPageVisible(QInstaller.TargetDirectory, !update);
- installer.setDefaultPageVisible(QInstaller.ComponentSelection, !update);
- installer.setDefaultPageVisible(QInstaller.LicenseCheck, !update);
- /*
- if (systemInfo.productType === "windows")
- installer.setDefaultPageVisible(QInstaller.StartMenuSelection, !update);
- */
- installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
- }
-}
-Component.prototype.installerLoaded = function ()
-{
-/*
- if(update==true)
- {
- QMessageBox.question("quit.question","zzz" , text, QMessageBox.Yes);
- }
- */
-/*
- if (installer.addWizardPage(component, "TargetWidget", QInstaller.TargetDirectory))
- {
- var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
- if (widget != null) {
- widget.targetChooser.clicked.connect(this, Component.prototype.chooseTarget);
- widget.targetDirectory.textChanged.connect(this, Component.prototype.targetChanged);
-
- widget.windowTitle = "Installation Folder";
- widget.targetDirectory.text = Dir.toNativeSparator(installer.value("TargetDir"));
- }
- }
- */
-}
-Component.prototype.targetChanged = function (text) {
-/*
- var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
-
- if (widget != null && text != "")
- {
- if (installer.fileExists(text + "/components.xml"))
- {
- QMessageBox.question("quit.question","zzz" , text, QMessageBox.Yes);
- installer.setValue("TargetDir", text);
- update=true;
- widget.complete = true;
- }
- }
- if(update==false)
- {
- installer.setDefaultPageVisible(QInstaller.ComponentSelection, true);
- installer.setDefaultPageVisible(QInstaller.LicenseCheck, true);
- if (systemInfo.productType === "windows")
- installer.setDefaultPageVisible(QInstaller.StartMenuSelection, true);
- }else
- {
- gui.clickButton(buttons.NextButton);
- }
- */
-}
-
-Component.prototype.chooseTarget = function () {
- QMessageBox.question("quit.question", "chooseTarget", QMessageBox.Yes);
- var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
- if (widget != null) {
- var newTarget = QFileDialog.getExistingDirectory("Choose your target directory.", widget.targetDirectory.text);
- if (newTarget != "")
- widget.targetDirectory.text = Dir.toNativeSparator(newTarget);
- }
-}
-
-
-Component.prototype.createOperationsForArchive = function(archive)
-{
- // don't use the default operation
- component.createOperationsForArchive(archive);
- component.addOperation("CreateShortcut",
- "@TargetDir@/avidemux.exe",
- "@StartMenuDir@/avidemux.lnk",
- "workingDirectory=@TargetDir@");
- component.addOperation("CreateShortcut",
- "@TargetDir@/avidemux_jobs.exe",
- "@StartMenuDir@/avidemux_jobs.lnk",
- "workingDirectory=@TargetDir@");
- component.addOperation("CreateShortcut",
- "@TargetDir@/@MaintenanceToolName@.exe",
- "@StartMenuDir@/@MaintenanceToolName@.lnk",
- "workingDirectory=@TargetDir@");
-}
+/**************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Installer Framework.
+**
+** $QT_BEGIN_LICENSE:GPL-EXCEPT$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+** $QT_END_LICENSE$
+**
+**************************************************************************/
+
+// Derived from dynamic page example
+
+var ComponentSelectionPage = null;
+var update=false;
+
+function Controller()
+{
+ installer.setMessageBoxAutomaticAnswer("OverwriteTargetDirectory", QMessageBox.Yes);
+}
+var Dir = new function () {
+ this.toNativeSparator = function (path) {
+ if (systemInfo.productType === "windows")
+ return path.replace(/\//g, '\\');
+ return path;
+ }
+};
+
+function Component()
+{
+ console.log("xxxxxxxxxxxx");
+ if (installer.isInstaller())
+ {
+ update=false;
+ component.loaded.connect(this, Component.prototype.installerLoaded);
+ ComponentSelectionPage = gui.pageById(QInstaller.ComponentSelection);
+
+ var folder=installer.value( "TargetDir");
+ if (installer.fileExists(folder + "/components.xml"))
+ {
+ update=true;
+ // remove old one
+ // https://stackoverflow.com/questions/46455360/workaround-for-qt-installer-framework-not-overwriting-existing-installation
+ QMessageBox.question("question","Uninstall","I will now uninstall the previous version of avidemux VC++" , QMessageBox.Yes);
+ if (installer.fileExists(folder + "/scripts/auto_uninstall.js"))
+ installer.execute(folder+"/Uninstall Avidemux VC++ 64bits.exe", "--script="+folder+"/scripts/auto_uninstall.js");
+ else
+ installer.execute(folder+"/Uninstall Avidemux VC++ 64bits.exe");
+ }
+
+ installer.setDefaultPageVisible(QInstaller.TargetDirectory, !update);
+ installer.setDefaultPageVisible(QInstaller.ComponentSelection, !update);
+ installer.setDefaultPageVisible(QInstaller.LicenseCheck, !update);
+ /*
+ if (systemInfo.productType === "windows")
+ installer.setDefaultPageVisible(QInstaller.StartMenuSelection, !update);
+ */
+ installer.setDefaultPageVisible(QInstaller.ReadyForInstallation, false);
+ }
+}
+Component.prototype.installerLoaded = function ()
+{
+/*
+ if(update==true)
+ {
+ QMessageBox.question("quit.question","zzz" , text, QMessageBox.Yes);
+ }
+ */
+/*
+ if (installer.addWizardPage(component, "TargetWidget", QInstaller.TargetDirectory))
+ {
+ var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
+ if (widget != null) {
+ widget.targetChooser.clicked.connect(this, Component.prototype.chooseTarget);
+ widget.targetDirectory.textChanged.connect(this, Component.prototype.targetChanged);
+
+ widget.windowTitle = "Installation Folder";
+ widget.targetDirectory.text = Dir.toNativeSparator(installer.value("TargetDir"));
+ }
+ }
+ */
+}
+Component.prototype.targetChanged = function (text) {
+/*
+ var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
+
+ if (widget != null && text != "")
+ {
+ if (installer.fileExists(text + "/components.xml"))
+ {
+ QMessageBox.question("quit.question","zzz" , text, QMessageBox.Yes);
+ installer.setValue("TargetDir", text);
+ update=true;
+ widget.complete = true;
+ }
+ }
+ if(update==false)
+ {
+ installer.setDefaultPageVisible(QInstaller.ComponentSelection, true);
+ installer.setDefaultPageVisible(QInstaller.LicenseCheck, true);
+ if (systemInfo.productType === "windows")
+ installer.setDefaultPageVisible(QInstaller.StartMenuSelection, true);
+ }else
+ {
+ gui.clickButton(buttons.NextButton);
+ }
+ */
+}
+
+Component.prototype.chooseTarget = function () {
+ QMessageBox.question("quit.question", "chooseTarget", QMessageBox.Yes);
+ var widget = gui.pageWidgetByObjectName("DynamicTargetWidget");
+ if (widget != null) {
+ var newTarget = QFileDialog.getExistingDirectory("Choose your target directory.", widget.targetDirectory.text);
+ if (newTarget != "")
+ widget.targetDirectory.text = Dir.toNativeSparator(newTarget);
+ }
+}
+
+
+Component.prototype.createOperationsForArchive = function(archive)
+{
+ // don't use the default operation
+ component.createOperationsForArchive(archive);
+ component.addOperation("CreateShortcut",
+ "@TargetDir@/avidemux.exe",
+ "@StartMenuDir@/avidemux.lnk",
+ "workingDirectory=@TargetDir@");
+ component.addOperation("CreateShortcut",
+ "@TargetDir@/avidemux_jobs.exe",
+ "@StartMenuDir@/avidemux_jobs.lnk",
+ "workingDirectory=@TargetDir@");
+ component.addOperation("CreateShortcut",
+ "@TargetDir@/@MaintenanceToolName@.exe",
+ "@StartMenuDir@/@MaintenanceToolName@.lnk",
+ "workingDirectory=@TargetDir@");
+}
diff --git a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/license.txt b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/license.txt
index 89e08fb002..d159169d10 100755
--- a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/license.txt
+++ b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/license.txt
@@ -1,339 +1,339 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- , 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ , 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/package.xml.in b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/package.xml.in
index 1a269cfa33..bf2d4a6b23 100755
--- a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/package.xml.in
+++ b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/package.xml.in
@@ -1,16 +1,16 @@
-
-
- Avidemux @ADM_FLAVOR@
- Main files
- @ADM_VERSION@
- 2014-12-19
- true
-
-
- targetwidget.ui
-
-
-
-
- true
-
+
+
+ Avidemux @ADM_FLAVOR@
+ Main files
+ @ADM_VERSION@
+ 2014-12-19
+ true
+
+
+ targetwidget.ui
+
+
+
+
+ true
+
diff --git a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/targetwidget.ui b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/targetwidget.ui
index cd17db5ffb..f652329e70 100755
--- a/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/targetwidget.ui
+++ b/avidemux/winInstaller/qtifw/packages/org.avidemux.run/meta/targetwidget.ui
@@ -1,83 +1,83 @@
-
-
- TargetWidget
-
-
-
- 0
- 0
- 491
- 190
-
-
-
-
- 0
- 0
-
-
-
-
- 491
- 190
-
-
-
- Form
-
-
- -
-
-
- Please specify the folder where Dynamic Page Installer Example will be installed.
-
-
-
- -
-
-
-
-
-
- true
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
-
-
- ...
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 122
-
-
-
-
-
-
-
-
-
+
+
+ TargetWidget
+
+
+
+ 0
+ 0
+ 491
+ 190
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 491
+ 190
+
+
+
+ Form
+
+
+ -
+
+
+ Please specify the folder where Dynamic Page Installer Example will be installed.
+
+
+
+ -
+
+
-
+
+
+ true
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ ...
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 122
+
+
+
+
+
+
+
+
+
diff --git a/avidemux/winInstaller/qtifw/split.bash b/avidemux/winInstaller/qtifw/split.bash
index 0230986aa3..4e89adc028 100755
--- a/avidemux/winInstaller/qtifw/split.bash
+++ b/avidemux/winInstaller/qtifw/split.bash
@@ -1,27 +1,27 @@
-#/bin/bash
-export bash_path=$(cygpath -ua $(dirname $0))
-export src_path=`cygpath -u $1`
-export run_path="packages/org.avidemux.run/data/"
-export dev_path="packages/org.avidemux.dev/data/"
-
-if [ ! -d "$src_path" ]; then
- echo "Source path does not exist"
- exit 1
-fi
-
-echo "Cleaning"
-rm -Rf $run_path
-rm -Rf $dev_path
-mkdir -p $run_path $dev_path
-
-echo "Copying"
-
-cp -Rap $src_path/* $run_path/
-cp -Rap $bash_path/packages/org.avidemux.run/data/scripts $run_path/
-echo "Moving"
-mv $run_path/include $dev_path
-mv $run_path/*.lib $dev_path
-rm $run_path/plugins/*/*.lib
-rm -f $run_path/vsscript.dll
-rm -f $run_path/vapoursynth.dll
-echo "Done"
+#/bin/bash
+export bash_path=$(cygpath -ua $(dirname $0))
+export src_path=`cygpath -u $1`
+export run_path="packages/org.avidemux.run/data/"
+export dev_path="packages/org.avidemux.dev/data/"
+
+if [ ! -d "$src_path" ]; then
+ echo "Source path does not exist"
+ exit 1
+fi
+
+echo "Cleaning"
+rm -Rf $run_path
+rm -Rf $dev_path
+mkdir -p $run_path $dev_path
+
+echo "Copying"
+
+cp -Rap $src_path/* $run_path/
+cp -Rap $bash_path/packages/org.avidemux.run/data/scripts $run_path/
+echo "Moving"
+mv $run_path/include $dev_path
+mv $run_path/*.lib $dev_path
+rm $run_path/plugins/*/*.lib
+rm -f $run_path/vsscript.dll
+rm -f $run_path/vapoursynth.dll
+echo "Done"
diff --git a/avidemux/winInstaller/revision.xslt b/avidemux/winInstaller/revision.xslt
index cd4724c1f7..3fbc69e28d 100644
--- a/avidemux/winInstaller/revision.xslt
+++ b/avidemux/winInstaller/revision.xslt
@@ -1,12 +1,12 @@
-
-
-
-
-
-
-
- !define REVISION
-
-
+
+
+
+
+
+
+
+ !define REVISION
+
+
\ No newline at end of file
diff --git a/avidemux/winInstaller/svnlog.xslt b/avidemux/winInstaller/svnlog.xslt
index df06d8b6ff..9551e99f6c 100644
--- a/avidemux/winInstaller/svnlog.xslt
+++ b/avidemux/winInstaller/svnlog.xslt
@@ -1,132 +1,132 @@
-
-
-
-
-
-
-
-
-
- Avidemux 2.6 Change Log
-
-
- Avidemux 2.6 Change Log
-
-
-
- | Revision |
- Date |
- Author |
- Description |
-
-
-
-
-
-
-
-
-
-
- |
-
- |
-
-
-
-
- |
-
-
- |
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Jan
- Feb
- Mar
- Apr
- May
- Jun
- Jul
- Aug
- Sep
- Oct
- Nov
- Dec
-
-
-
+
+
+
+
+
+
+
+
+
+ Avidemux 2.6 Change Log
+
+
+ Avidemux 2.6 Change Log
+
+
+
+ | Revision |
+ Date |
+ Author |
+ Description |
+
+
+
+
+
+
+
+
+
+
+ |
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Jan
+ Feb
+ Mar
+ Apr
+ May
+ Jun
+ Jul
+ Aug
+ Sep
+ Oct
+ Nov
+ Dec
+
+
+
diff --git a/avidemux_core/ADM_core/include/ADM_crashdump_vs.h b/avidemux_core/ADM_core/include/ADM_crashdump_vs.h
index 8a843060c4..f4267d2226 100755
--- a/avidemux_core/ADM_core/include/ADM_crashdump_vs.h
+++ b/avidemux_core/ADM_core/include/ADM_crashdump_vs.h
@@ -1,11 +1,11 @@
-/**
- * \file ADM_crashdump_mingw
- * \brief Catch low level error, mingw version
- */
-#if defined(_MSC_VER)
-
-#pragma once
-ADM_CORE6_EXPORT void installSigHandler(void);
-ADM_CORE6_EXPORT void uninstallSigHandler(void);
-
-#endif
+/**
+ * \file ADM_crashdump_mingw
+ * \brief Catch low level error, mingw version
+ */
+#if defined(_MSC_VER)
+
+#pragma once
+ADM_CORE6_EXPORT void installSigHandler(void);
+ADM_CORE6_EXPORT void uninstallSigHandler(void);
+
+#endif
diff --git a/avidemux_core/ADM_core/src/ADM_folder_vs.cpp b/avidemux_core/ADM_core/src/ADM_folder_vs.cpp
index d055dcee11..5e2e2dfe21 100755
--- a/avidemux_core/ADM_core/src/ADM_folder_vs.cpp
+++ b/avidemux_core/ADM_core/src/ADM_folder_vs.cpp
@@ -1,298 +1,298 @@
- /***************************************************************************
-
- copyright : (C) 2016 by mean
- email : fixounet@free.fr
- ***************************************************************************/
-
- /***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-
- #include
- #include
- #include
- #include
- #include
- #include
- #include
- #include "ADM_win32.h"
- #include "ADM_default.h"
-
-extern char *ADM_getRelativePath(const char *base0, const char *base1, const char *base2, const char *base3);
-
- #undef fread
- #undef fwrite
- #undef fopen
- #undef fclose
-
- char *ADM_getInstallRelativePath(const char *base1, const char *base2, const char *base3)
- {
-
- wchar_t wcModuleName[MAX_PATH];
-
- GetModuleFileNameW(0, wcModuleName, sizeof(wcModuleName) / sizeof(wchar_t));
-
- int len = wideCharStringToUtf8(wcModuleName, -1, NULL);
- char *moduleName = new char[len];
-
- wideCharStringToUtf8(wcModuleName, -1, moduleName);
-
- char *slash = strrchr(moduleName, '\\');
-
- if (slash)
- *slash = '\0';
-
- char *relativePath = ADM_getRelativePath(moduleName, base1, base2, base3);
-
- delete [] moduleName;
-
- return relativePath;
- }
-
-
-
- /**
- \fn ADM_fopen
- \brief utf8 aware fopen, so that we can use utf8 string even on win32
- */
- FILE *ADM_fopen(const char *file, const char *mode)
- {
-
- // Override fopen to handle Unicode filenames and to ensure exclusive access when initially writing to a file.
- int fileNameLength = utf8StringToWideChar(file, -1, NULL);
- wchar_t *wcFile = new wchar_t[fileNameLength];
- int creation = 0, access = 0;
- HANDLE hFile;
-
- utf8StringToWideChar(file, -1, wcFile);
-
- while (true)
- {
- if (strchr(mode, 'w'))
- {
- creation = CREATE_ALWAYS;
- access = GENERIC_WRITE;
-
- if (strchr(mode, '+'))
- access |= GENERIC_READ;
- }
- else if (strchr(mode, 'r'))
- {
- creation = OPEN_EXISTING;
- access = GENERIC_READ;
-
- if (strchr(mode, '+'))
- access = GENERIC_WRITE;
- }
- else if (strchr(mode, 'a'))
- {
- creation = OPEN_ALWAYS;
- access = GENERIC_WRITE;
-
- if (strchr(mode, '+'))
- access |= GENERIC_READ;
- }
-
- if (creation & GENERIC_WRITE)
- {
- hFile = CreateFileW(wcFile, access, 0, NULL, creation, 0, NULL);
-
- if (hFile == INVALID_HANDLE_VALUE)
- break;
- else
- CloseHandle(hFile);
- }
-
- hFile = CreateFileW(wcFile, access, FILE_SHARE_READ, NULL, creation, 0, NULL);
- break;
- }
-
- delete [] wcFile;
-
- if (hFile == INVALID_HANDLE_VALUE)
- return NULL;
- else
- return _fdopen(_open_osfhandle((intptr_t)hFile, 0), mode);
- }
-
-
- extern "C"
- {
- // libavformat uses open (in the file_open function) so we need to override that too.
- // Following the same rules as ADM_fopen.
- int ADM_open(const char *path, int oflag, ...)
- {
- int fileNameLength = utf8StringToWideChar(path, -1, NULL);
- wchar_t *wcFile = new wchar_t[fileNameLength];
- int creation = 0, access = 0;
- HANDLE hFile;
-
- utf8StringToWideChar(path, -1, wcFile);
-
- delete [] wcFile;
-
- if (oflag & O_WRONLY || oflag & O_RDWR)
- {
- access = GENERIC_WRITE;
-
- if (oflag & O_RDWR)
- access |= GENERIC_READ;
-
- if (oflag & O_CREAT)
- {
- if (oflag & O_EXCL)
- creation = CREATE_NEW;
- else if (oflag & O_TRUNC)
- creation = CREATE_ALWAYS;
- else
- creation = OPEN_ALWAYS;
- }
- else if (oflag & O_TRUNC)
- creation = TRUNCATE_EXISTING;
- }
- else if (oflag & O_RDONLY)
- creation = OPEN_EXISTING;
-
- if (creation & GENERIC_WRITE)
- {
- hFile = CreateFileW(wcFile, access, 0, NULL, creation, 0, NULL);
-
- if (hFile == INVALID_HANDLE_VALUE)
- return -1;
- else
- CloseHandle(hFile);
- }
-
- hFile = CreateFileW(wcFile, access, FILE_SHARE_READ, NULL, creation, 0, NULL);
-
- if (hFile == INVALID_HANDLE_VALUE)
- return -1;
- else
- return _open_osfhandle((intptr_t)hFile, oflag);
- }
- }
-
-
- /*----------------------------------------
- Create a directory
- If it already exists, do nothing
- ------------------------------------------*/
- uint8_t ADM_mkdir(const char *dirname)
- {
-
- int dirNameLength = utf8StringToWideChar(dirname, -1, NULL);
- wchar_t *dirname2 = new wchar_t[dirNameLength];
- utf8StringToWideChar(dirname, -1, dirname2);
- int er = _wmkdir(dirname2);
- delete[] dirname2;
- uint8_t retVal = 0;
-
-
- if (er != -1)
- retVal = true;
- else
- {
- if (errno == EEXIST)
- retVal = true;
- else
- {
- ADM_warning("Failed to create folder %s with error %d\n", dirname, errno);
- retVal = false;
- }
- }
-
-
- return retVal;
- }
-
-
-
- // Convert string from Wide Char to ANSI code page
- static int wideCharStringToAnsi(const wchar_t *wideCharString, int wideCharStringLength, char *ansiString, const char *filler)
- {
- int flags = WC_COMPOSITECHECK;
-
- if (filler)
- flags |= WC_NO_BEST_FIT_CHARS | WC_DEFAULTCHAR;
-
- int ansiStringLen = WideCharToMultiByte(CP_ACP, flags, wideCharString, wideCharStringLength, NULL, 0, filler, NULL);
-
- if (ansiString)
- WideCharToMultiByte(CP_ACP, flags, wideCharString, wideCharStringLength, ansiString, ansiStringLen, filler, NULL);
-
- return ansiStringLen;
- }
-/**
- * \fn buildDirectoryContent
- * \brief Returns the content of a dir with the extension ext. The receiving vector must be allocated by caller
- */
-uint8_t buildDirectoryContent(const char *base, std::vector *list, const char *ext)
- {
- std::string joker = base;
- joker += "/*.";
- joker += ext;
-
- list->clear();
-
- int dirNameLength = utf8StringToWideChar(joker.c_str(), -1, NULL);
- wchar_t *base2 = new wchar_t[dirNameLength];
- utf8StringToWideChar(joker.c_str(), -1, base2);
-//--
- HANDLE hFind;
- WIN32_FIND_DATAW FindFileData;
-
- hFind = FindFirstFileW(base2,&FindFileData);
- if(hFind == INVALID_HANDLE_VALUE)
- {
- ADM_warning("Cannot list content of %s\n", base);
- delete[] base2;
- return true;
- }
-
- do
- {
- WCHAR *wname = FindFileData.cFileName;
- //int wideCharStringToAnsi(const wchar_t *wideCharString, int wideCharStringLength, char *ansiString, const char *filler)
- int nameLength = wideCharStringToUtf8(wname, -1, NULL);
- char *shortName = new char[nameLength];
- nameLength = wideCharStringToUtf8(wname, -1, shortName);
- std::string item = base;
- item += ADM_SEPARATOR;
- item += shortName;
- list->push_back(item);
- delete[] shortName;
-
- } while (FindNextFileW(hFind, &FindFileData));
- FindClose(hFind);
-
- delete[] base2;
- std::sort(list->begin(),list->end());
- return true;
- }
-
- /**
- \fn ADM_copyFile
- */
- uint8_t ADM_renameFile(const char *source, const char *target)
- {
-
- int sourceFileNameLength = utf8StringToWideChar(source, -1, NULL);
- int targetFileNameLength = utf8StringToWideChar(target, -1, NULL);
- wchar_t *wcFileSource=(wchar_t*)_alloca(sourceFileNameLength*sizeof(wchar_t));
- wchar_t *wcFileTarget= (wchar_t*)_alloca(targetFileNameLength * sizeof(wchar_t));
-
- utf8StringToWideChar(source, -1, wcFileSource);
- utf8StringToWideChar(target, -1, wcFileTarget);
-
- if(!_wrename(wcFileSource,wcFileTarget)) return true;
- ADM_error("Failed to rename %s to %s\n",source,target);
- return false;
- }
-
-// EOF
+ /***************************************************************************
+
+ copyright : (C) 2016 by mean
+ email : fixounet@free.fr
+ ***************************************************************************/
+
+ /***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include
+ #include "ADM_win32.h"
+ #include "ADM_default.h"
+
+extern char *ADM_getRelativePath(const char *base0, const char *base1, const char *base2, const char *base3);
+
+ #undef fread
+ #undef fwrite
+ #undef fopen
+ #undef fclose
+
+ char *ADM_getInstallRelativePath(const char *base1, const char *base2, const char *base3)
+ {
+
+ wchar_t wcModuleName[MAX_PATH];
+
+ GetModuleFileNameW(0, wcModuleName, sizeof(wcModuleName) / sizeof(wchar_t));
+
+ int len = wideCharStringToUtf8(wcModuleName, -1, NULL);
+ char *moduleName = new char[len];
+
+ wideCharStringToUtf8(wcModuleName, -1, moduleName);
+
+ char *slash = strrchr(moduleName, '\\');
+
+ if (slash)
+ *slash = '\0';
+
+ char *relativePath = ADM_getRelativePath(moduleName, base1, base2, base3);
+
+ delete [] moduleName;
+
+ return relativePath;
+ }
+
+
+
+ /**
+ \fn ADM_fopen
+ \brief utf8 aware fopen, so that we can use utf8 string even on win32
+ */
+ FILE *ADM_fopen(const char *file, const char *mode)
+ {
+
+ // Override fopen to handle Unicode filenames and to ensure exclusive access when initially writing to a file.
+ int fileNameLength = utf8StringToWideChar(file, -1, NULL);
+ wchar_t *wcFile = new wchar_t[fileNameLength];
+ int creation = 0, access = 0;
+ HANDLE hFile;
+
+ utf8StringToWideChar(file, -1, wcFile);
+
+ while (true)
+ {
+ if (strchr(mode, 'w'))
+ {
+ creation = CREATE_ALWAYS;
+ access = GENERIC_WRITE;
+
+ if (strchr(mode, '+'))
+ access |= GENERIC_READ;
+ }
+ else if (strchr(mode, 'r'))
+ {
+ creation = OPEN_EXISTING;
+ access = GENERIC_READ;
+
+ if (strchr(mode, '+'))
+ access = GENERIC_WRITE;
+ }
+ else if (strchr(mode, 'a'))
+ {
+ creation = OPEN_ALWAYS;
+ access = GENERIC_WRITE;
+
+ if (strchr(mode, '+'))
+ access |= GENERIC_READ;
+ }
+
+ if (creation & GENERIC_WRITE)
+ {
+ hFile = CreateFileW(wcFile, access, 0, NULL, creation, 0, NULL);
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ break;
+ else
+ CloseHandle(hFile);
+ }
+
+ hFile = CreateFileW(wcFile, access, FILE_SHARE_READ, NULL, creation, 0, NULL);
+ break;
+ }
+
+ delete [] wcFile;
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ return NULL;
+ else
+ return _fdopen(_open_osfhandle((intptr_t)hFile, 0), mode);
+ }
+
+
+ extern "C"
+ {
+ // libavformat uses open (in the file_open function) so we need to override that too.
+ // Following the same rules as ADM_fopen.
+ int ADM_open(const char *path, int oflag, ...)
+ {
+ int fileNameLength = utf8StringToWideChar(path, -1, NULL);
+ wchar_t *wcFile = new wchar_t[fileNameLength];
+ int creation = 0, access = 0;
+ HANDLE hFile;
+
+ utf8StringToWideChar(path, -1, wcFile);
+
+ delete [] wcFile;
+
+ if (oflag & O_WRONLY || oflag & O_RDWR)
+ {
+ access = GENERIC_WRITE;
+
+ if (oflag & O_RDWR)
+ access |= GENERIC_READ;
+
+ if (oflag & O_CREAT)
+ {
+ if (oflag & O_EXCL)
+ creation = CREATE_NEW;
+ else if (oflag & O_TRUNC)
+ creation = CREATE_ALWAYS;
+ else
+ creation = OPEN_ALWAYS;
+ }
+ else if (oflag & O_TRUNC)
+ creation = TRUNCATE_EXISTING;
+ }
+ else if (oflag & O_RDONLY)
+ creation = OPEN_EXISTING;
+
+ if (creation & GENERIC_WRITE)
+ {
+ hFile = CreateFileW(wcFile, access, 0, NULL, creation, 0, NULL);
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ return -1;
+ else
+ CloseHandle(hFile);
+ }
+
+ hFile = CreateFileW(wcFile, access, FILE_SHARE_READ, NULL, creation, 0, NULL);
+
+ if (hFile == INVALID_HANDLE_VALUE)
+ return -1;
+ else
+ return _open_osfhandle((intptr_t)hFile, oflag);
+ }
+ }
+
+
+ /*----------------------------------------
+ Create a directory
+ If it already exists, do nothing
+ ------------------------------------------*/
+ uint8_t ADM_mkdir(const char *dirname)
+ {
+
+ int dirNameLength = utf8StringToWideChar(dirname, -1, NULL);
+ wchar_t *dirname2 = new wchar_t[dirNameLength];
+ utf8StringToWideChar(dirname, -1, dirname2);
+ int er = _wmkdir(dirname2);
+ delete[] dirname2;
+ uint8_t retVal = 0;
+
+
+ if (er != -1)
+ retVal = true;
+ else
+ {
+ if (errno == EEXIST)
+ retVal = true;
+ else
+ {
+ ADM_warning("Failed to create folder %s with error %d\n", dirname, errno);
+ retVal = false;
+ }
+ }
+
+
+ return retVal;
+ }
+
+
+
+ // Convert string from Wide Char to ANSI code page
+ static int wideCharStringToAnsi(const wchar_t *wideCharString, int wideCharStringLength, char *ansiString, const char *filler)
+ {
+ int flags = WC_COMPOSITECHECK;
+
+ if (filler)
+ flags |= WC_NO_BEST_FIT_CHARS | WC_DEFAULTCHAR;
+
+ int ansiStringLen = WideCharToMultiByte(CP_ACP, flags, wideCharString, wideCharStringLength, NULL, 0, filler, NULL);
+
+ if (ansiString)
+ WideCharToMultiByte(CP_ACP, flags, wideCharString, wideCharStringLength, ansiString, ansiStringLen, filler, NULL);
+
+ return ansiStringLen;
+ }
+/**
+ * \fn buildDirectoryContent
+ * \brief Returns the content of a dir with the extension ext. The receiving vector must be allocated by caller
+ */
+uint8_t buildDirectoryContent(const char *base, std::vector *list, const char *ext)
+ {
+ std::string joker = base;
+ joker += "/*.";
+ joker += ext;
+
+ list->clear();
+
+ int dirNameLength = utf8StringToWideChar(joker.c_str(), -1, NULL);
+ wchar_t *base2 = new wchar_t[dirNameLength];
+ utf8StringToWideChar(joker.c_str(), -1, base2);
+//--
+ HANDLE hFind;
+ WIN32_FIND_DATAW FindFileData;
+
+ hFind = FindFirstFileW(base2,&FindFileData);
+ if(hFind == INVALID_HANDLE_VALUE)
+ {
+ ADM_warning("Cannot list content of %s\n", base);
+ delete[] base2;
+ return true;
+ }
+
+ do
+ {
+ WCHAR *wname = FindFileData.cFileName;
+ //int wideCharStringToAnsi(const wchar_t *wideCharString, int wideCharStringLength, char *ansiString, const char *filler)
+ int nameLength = wideCharStringToUtf8(wname, -1, NULL);
+ char *shortName = new char[nameLength];
+ nameLength = wideCharStringToUtf8(wname, -1, shortName);
+ std::string item = base;
+ item += ADM_SEPARATOR;
+ item += shortName;
+ list->push_back(item);
+ delete[] shortName;
+
+ } while (FindNextFileW(hFind, &FindFileData));
+ FindClose(hFind);
+
+ delete[] base2;
+ std::sort(list->begin(),list->end());
+ return true;
+ }
+
+ /**
+ \fn ADM_copyFile
+ */
+ uint8_t ADM_renameFile(const char *source, const char *target)
+ {
+
+ int sourceFileNameLength = utf8StringToWideChar(source, -1, NULL);
+ int targetFileNameLength = utf8StringToWideChar(target, -1, NULL);
+ wchar_t *wcFileSource=(wchar_t*)_alloca(sourceFileNameLength*sizeof(wchar_t));
+ wchar_t *wcFileTarget= (wchar_t*)_alloca(targetFileNameLength * sizeof(wchar_t));
+
+ utf8StringToWideChar(source, -1, wcFileSource);
+ utf8StringToWideChar(target, -1, wcFileTarget);
+
+ if(!_wrename(wcFileSource,wcFileTarget)) return true;
+ ADM_error("Failed to rename %s to %s\n",source,target);
+ return false;
+ }
+
+// EOF
diff --git a/avidemux_core/ADM_coreSubtitles/include/ADM_coreSubtitles_export.h b/avidemux_core/ADM_coreSubtitles/include/ADM_coreSubtitles_export.h
index cf5d0fbbe9..2f4506a740 100755
--- a/avidemux_core/ADM_coreSubtitles/include/ADM_coreSubtitles_export.h
+++ b/avidemux_core/ADM_coreSubtitles/include/ADM_coreSubtitles_export.h
@@ -1,53 +1,53 @@
-
-#ifndef ADM_CORESUBTITLES6_EXPORT_H
-#define ADM_CORESUBTITLES6_EXPORT_H
-
-#ifdef ADM_CORESUBTITLE6_STATIC_DEFINE
-# define ADM_CORESUBTITLES6_EXPORT
-# define ADM_CORESUBTITLE6_NO_EXPORT
-#else
-# ifndef ADM_CORESUBTITLES6_EXPORT
-# ifdef ADM_coreSubtitles6_EXPORTS
- /* We are building this library */
-# ifdef _WIN32
-# define ADM_CORESUBTITLES6_EXPORT __declspec(dllexport)
-# else
-# define ADM_CORESUBTITLES6_EXPORT __attribute__((visibility("default")))
-# endif
-# else
- /* We are using this library */
-# ifdef _WIN32
-# define ADM_CORESUBTITLES6_EXPORT __declspec(dllimport)
-# else
-# define ADM_CORESUBTITLES6_EXPORT __attribute__((visibility("default")))
-# endif
-# endif
-# endif
-
-# ifndef ADM_CORESUBTITLE6_NO_EXPORT
-# ifdef _WIN32
-# define ADM_CORESUBTITLE6_NO_EXPORT
-# else
-# define ADM_CORESUBTITLE6_NO_EXPORT __attribute__((visibility("hidden")))
-# endif
-# endif
-#endif
-
-#ifndef ADM_CORESUBTITLE6_DEPRECATED
-# ifdef __GNUC__
-# define ADM_CORESUBTITLE6_DEPRECATED __attribute__ ((__deprecated__))
-# define ADM_CORESUBTITLE6_DEPRECATED_EXPORT ADM_CORESUBTITLES6_EXPORT __attribute__ ((__deprecated__))
-# define ADM_CORESUBTITLE6_DEPRECATED_NO_EXPORT ADM_CORESUBTITLE6_NO_EXPORT __attribute__ ((__deprecated__))
-# elif defined(_WIN32)
-# define ADM_CORESUBTITLE6_DEPRECATED __declspec(deprecated)
-# define ADM_CORESUBTITLE6_DEPRECATED_EXPORT ADM_CORESUBTITLES6_EXPORT __declspec(deprecated)
-# define ADM_CORESUBTITLE6_DEPRECATED_NO_EXPORT ADM_CORESUBTITLE6_NO_EXPORT __declspec(deprecated)
-# endif
-#endif
-
-#define DEFINE_NO_DEPRECATED 0
-#if DEFINE_NO_DEPRECATED
-# define ADM_CORESUBTITLE6_NO_DEPRECATED
-#endif
-
-#endif
+
+#ifndef ADM_CORESUBTITLES6_EXPORT_H
+#define ADM_CORESUBTITLES6_EXPORT_H
+
+#ifdef ADM_CORESUBTITLE6_STATIC_DEFINE
+# define ADM_CORESUBTITLES6_EXPORT
+# define ADM_CORESUBTITLE6_NO_EXPORT
+#else
+# ifndef ADM_CORESUBTITLES6_EXPORT
+# ifdef ADM_coreSubtitles6_EXPORTS
+ /* We are building this library */
+# ifdef _WIN32
+# define ADM_CORESUBTITLES6_EXPORT __declspec(dllexport)
+# else
+# define ADM_CORESUBTITLES6_EXPORT __attribute__((visibility("default")))
+# endif
+# else
+ /* We are using this library */
+# ifdef _WIN32
+# define ADM_CORESUBTITLES6_EXPORT __declspec(dllimport)
+# else
+# define ADM_CORESUBTITLES6_EXPORT __attribute__((visibility("default")))
+# endif
+# endif
+# endif
+
+# ifndef ADM_CORESUBTITLE6_NO_EXPORT
+# ifdef _WIN32
+# define ADM_CORESUBTITLE6_NO_EXPORT
+# else
+# define ADM_CORESUBTITLE6_NO_EXPORT __attribute__((visibility("hidden")))
+# endif
+# endif
+#endif
+
+#ifndef ADM_CORESUBTITLE6_DEPRECATED
+# ifdef __GNUC__
+# define ADM_CORESUBTITLE6_DEPRECATED __attribute__ ((__deprecated__))
+# define ADM_CORESUBTITLE6_DEPRECATED_EXPORT ADM_CORESUBTITLES6_EXPORT __attribute__ ((__deprecated__))
+# define ADM_CORESUBTITLE6_DEPRECATED_NO_EXPORT ADM_CORESUBTITLE6_NO_EXPORT __attribute__ ((__deprecated__))
+# elif defined(_WIN32)
+# define ADM_CORESUBTITLE6_DEPRECATED __declspec(deprecated)
+# define ADM_CORESUBTITLE6_DEPRECATED_EXPORT ADM_CORESUBTITLES6_EXPORT __declspec(deprecated)
+# define ADM_CORESUBTITLE6_DEPRECATED_NO_EXPORT ADM_CORESUBTITLE6_NO_EXPORT __declspec(deprecated)
+# endif
+#endif
+
+#define DEFINE_NO_DEPRECATED 0
+#if DEFINE_NO_DEPRECATED
+# define ADM_CORESUBTITLE6_NO_DEPRECATED
+#endif
+
+#endif
diff --git a/avidemux_core/ADM_coreSubtitles/src/CMakeLists.txt b/avidemux_core/ADM_coreSubtitles/src/CMakeLists.txt
index b979e6fa67..680c05806d 100644
--- a/avidemux_core/ADM_coreSubtitles/src/CMakeLists.txt
+++ b/avidemux_core/ADM_coreSubtitles/src/CMakeLists.txt
@@ -1,6 +1,6 @@
-SET(ADM_core_subtitles_SRCS ADM_coreSubtitles.cpp ADM_subLoader.cpp ADM_subConvert.cpp)
-INCLUDE_DIRECTORIES(../include)
-# We force the use of fontconfig
-ADM_ADD_SHARED_LIBRARY(ADM_coreSubtitles6 ${ADM_core_subtitles_SRCS})
-TARGET_LINK_LIBRARIES(ADM_coreSubtitles6 ADM_core6 )
-ADM_INSTALL_LIB(ADM_coreSubtitles6)
+SET(ADM_core_subtitles_SRCS ADM_coreSubtitles.cpp ADM_subLoader.cpp ADM_subConvert.cpp)
+INCLUDE_DIRECTORIES(../include)
+# We force the use of fontconfig
+ADM_ADD_SHARED_LIBRARY(ADM_coreSubtitles6 ${ADM_core_subtitles_SRCS})
+TARGET_LINK_LIBRARIES(ADM_coreSubtitles6 ADM_core6 )
+ADM_INSTALL_LIB(ADM_coreSubtitles6)
diff --git a/avidemux_core/ffmpeg_package/patches/createPatches.sh b/avidemux_core/ffmpeg_package/patches/createPatches.sh
index 72fe2e2950..2074115198 100644
--- a/avidemux_core/ffmpeg_package/patches/createPatches.sh
+++ b/avidemux_core/ffmpeg_package/patches/createPatches.sh
@@ -1,47 +1,47 @@
-#!/bin/bash
-
-export curDir=$PWD
-export ffmpegPath=$PWD/source
-export origFfmpegPath=$PWD/ffmpeg
-
-echo Updating patches in $ffmpegPath
-
-function updatePatch {
- #cd $ffmpegPath
- #cp $1/$2 $1/$2.new
- #svn revert $1/$2
- #unix2dos $1/$2
- #unix2dos $1/$2.new
- #mv $1/$2 $1/$2.old
- #mv $1/$2.new $1/$2
- #diff -u $1/$2.old $1/$2 > $curDir/$1_$2.patch
- #rm $1/$2.old
- #cd $curDir
- #dos2unix $1_$2.patch
-
- cd $ffmpegPath
- unix2dos $1/$2
- unix2dos $origFfmpegPath/$1/$2
- diff -u $origFfmpegPath/$1/$2 $1/$2 > $curDir/${1//\//_}_$2.patch
- cd $curDir
- dos2unix ${1//\//_}_$2.patch
-}
-
-updatePatch libavcodec avcodec.h
-updatePatch libavcodec golomb.h
-updatePatch libavcodec h263dec.c
-updatePatch libavcodec h264_parser.c
-updatePatch libavcodec libavcodec.v
-updatePatch libavcodec mathops.h
-updatePatch libavcodec mpeg12enc.c
-updatePatch libavcodec mpegvideo_enc.c
-updatePatch libavcodec put_bits.h
-updatePatch libavcodec vdpau.h
-updatePatch libavcodec/x86 fmtconvert_init.c
-updatePatch libavformat isom.c
-updatePatch libavformat matroskaenc.c
-updatePatch libavformat mpegtsenc.c
-updatePatch libavutil avutil.h
-updatePatch libavutil common.h
-updatePatch libavutil lfg.c
+#!/bin/bash
+
+export curDir=$PWD
+export ffmpegPath=$PWD/source
+export origFfmpegPath=$PWD/ffmpeg
+
+echo Updating patches in $ffmpegPath
+
+function updatePatch {
+ #cd $ffmpegPath
+ #cp $1/$2 $1/$2.new
+ #svn revert $1/$2
+ #unix2dos $1/$2
+ #unix2dos $1/$2.new
+ #mv $1/$2 $1/$2.old
+ #mv $1/$2.new $1/$2
+ #diff -u $1/$2.old $1/$2 > $curDir/$1_$2.patch
+ #rm $1/$2.old
+ #cd $curDir
+ #dos2unix $1_$2.patch
+
+ cd $ffmpegPath
+ unix2dos $1/$2
+ unix2dos $origFfmpegPath/$1/$2
+ diff -u $origFfmpegPath/$1/$2 $1/$2 > $curDir/${1//\//_}_$2.patch
+ cd $curDir
+ dos2unix ${1//\//_}_$2.patch
+}
+
+updatePatch libavcodec avcodec.h
+updatePatch libavcodec golomb.h
+updatePatch libavcodec h263dec.c
+updatePatch libavcodec h264_parser.c
+updatePatch libavcodec libavcodec.v
+updatePatch libavcodec mathops.h
+updatePatch libavcodec mpeg12enc.c
+updatePatch libavcodec mpegvideo_enc.c
+updatePatch libavcodec put_bits.h
+updatePatch libavcodec vdpau.h
+updatePatch libavcodec/x86 fmtconvert_init.c
+updatePatch libavformat isom.c
+updatePatch libavformat matroskaenc.c
+updatePatch libavformat mpegtsenc.c
+updatePatch libavutil avutil.h
+updatePatch libavutil common.h
+updatePatch libavutil lfg.c
updatePatch libavutil lfg.h
\ No newline at end of file
diff --git a/avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/ADM_libMad/CMakeLists.txt b/avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/ADM_libMad/CMakeLists.txt
index ed988d4590..86f4200731 100644
--- a/avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/ADM_libMad/CMakeLists.txt
+++ b/avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/ADM_libMad/CMakeLists.txt
@@ -1,19 +1,19 @@
-SET(ADM_LIB ADM_libMad)
-
-
-SET(${ADM_LIB}_SRCS
- bit.c decoder.c fixed.c frame.c huffman.c layer12.c layer3.c
- stream.c synth.c timer.c version.c)
-
-ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
-
-IF (UNIX)
- ADD_TARGET_CFLAGS(${ADM_LIB} -fPIC)
-ENDIF (UNIX)
-
-IF (ADM_BIG_ENDIAN)
- ADD_TARGET_CFLAGS(${ADM_LIB} "-DWORDS_BIGENDIAN")
-ENDIF (ADM_BIG_ENDIAN)
-
-INIT_AUDIO_PLUGIN(${ADM_LIB})
-TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_core6)
+SET(ADM_LIB ADM_libMad)
+
+
+SET(${ADM_LIB}_SRCS
+ bit.c decoder.c fixed.c frame.c huffman.c layer12.c layer3.c
+ stream.c synth.c timer.c version.c)
+
+ADD_LIBRARY(${ADM_LIB} STATIC ${${ADM_LIB}_SRCS})
+
+IF (UNIX)
+ ADD_TARGET_CFLAGS(${ADM_LIB} -fPIC)
+ENDIF (UNIX)
+
+IF (ADM_BIG_ENDIAN)
+ ADD_TARGET_CFLAGS(${ADM_LIB} "-DWORDS_BIGENDIAN")
+ENDIF (ADM_BIG_ENDIAN)
+
+INIT_AUDIO_PLUGIN(${ADM_LIB})
+TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_core6)
diff --git a/avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/CMakeLists.txt b/avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/CMakeLists.txt
index 3deb3e49c1..f6b7cb547e 100644
--- a/avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/CMakeLists.txt
+++ b/avidemux_plugins/ADM_audioDecoders/ADM_ad_mad/CMakeLists.txt
@@ -1,34 +1,34 @@
-INCLUDE(ad_plugin)
-
-IF(MSVC)
- ADD_DEFINITIONS("-DFPM_DEFAULT")
-ENDIF(MSVC)
-
-IF (ADM_CPU_X86_32)
- ADD_DEFINITIONS("-DFPM_INTEL")
-ELSEIF (ADM_CPU_X86_64 OR ADM_CPU_ARM64 OR ADM_CPU_RISCV OR ADM_CPU_RISCV_64 OR ADM_CPU_LOONGARCH64)
- ADD_DEFINITIONS("-DFPM_DEFAULT")
-ELSEIF (ADM_CPU_PPC)
- ADD_DEFINITIONS("-DFPM_PPC")
-ELSEIF (ADM_CPU_ARMEL)
- ADD_DEFINITIONS("-DFPM_ARM")
-ENDIF (ADM_CPU_X86_32)
-
-IF(NOT USE_EXTERNAL_LIBMAD)
- ADD_SUBDIRECTORY(ADM_libMad)
-ENDIF()
-
-ADD_DEFINITIONS("-DHAVE_ASSERT_H")
-SET(ADM_ad_Mad_SRCS ADM_ad_mad.cpp)
-
-ADD_AUDIO_DECODER( ADM_ad_Mad ${ADM_ad_Mad_SRCS})
-
-IF(USE_EXTERNAL_LIBMAD)
- ADD_DEFINITIONS("-DUSE_EXTERNAL_LIBMAD")
- TARGET_LINK_LIBRARIES(ADM_ad_Mad ${LIBMAD_LIBRARIES})
-ELSE()
- TARGET_LINK_LIBRARIES(ADM_ad_Mad ADM_libMad)
-ENDIF()
-
-INIT_AUDIO_PLUGIN(ADM_ad_Mad)
-INSTALL_AUDIODECODER(ADM_ad_Mad)
+INCLUDE(ad_plugin)
+
+IF(MSVC)
+ ADD_DEFINITIONS("-DFPM_DEFAULT")
+ENDIF(MSVC)
+
+IF (ADM_CPU_X86_32)
+ ADD_DEFINITIONS("-DFPM_INTEL")
+ELSEIF (ADM_CPU_X86_64 OR ADM_CPU_ARM64 OR ADM_CPU_RISCV OR ADM_CPU_RISCV_64 OR ADM_CPU_LOONGARCH64)
+ ADD_DEFINITIONS("-DFPM_DEFAULT")
+ELSEIF (ADM_CPU_PPC)
+ ADD_DEFINITIONS("-DFPM_PPC")
+ELSEIF (ADM_CPU_ARMEL)
+ ADD_DEFINITIONS("-DFPM_ARM")
+ENDIF (ADM_CPU_X86_32)
+
+IF(NOT USE_EXTERNAL_LIBMAD)
+ ADD_SUBDIRECTORY(ADM_libMad)
+ENDIF()
+
+ADD_DEFINITIONS("-DHAVE_ASSERT_H")
+SET(ADM_ad_Mad_SRCS ADM_ad_mad.cpp)
+
+ADD_AUDIO_DECODER( ADM_ad_Mad ${ADM_ad_Mad_SRCS})
+
+IF(USE_EXTERNAL_LIBMAD)
+ ADD_DEFINITIONS("-DUSE_EXTERNAL_LIBMAD")
+ TARGET_LINK_LIBRARIES(ADM_ad_Mad ${LIBMAD_LIBRARIES})
+ELSE()
+ TARGET_LINK_LIBRARIES(ADM_ad_Mad ADM_libMad)
+ENDIF()
+
+INIT_AUDIO_PLUGIN(ADM_ad_Mad)
+INSTALL_AUDIODECODER(ADM_ad_Mad)
diff --git a/avidemux_plugins/ADM_autoScrips/CMakeLists.txt b/avidemux_plugins/ADM_autoScrips/CMakeLists.txt
index 4aa3ab1132..01a4bf2b3f 100644
--- a/avidemux_plugins/ADM_autoScrips/CMakeLists.txt
+++ b/avidemux_plugins/ADM_autoScrips/CMakeLists.txt
@@ -1,7 +1,7 @@
-SET(AUTOSCRIPT_DIR "${AVIDEMUX_LIB_DIR}/${ADM_PLUGIN_DIR}/autoScripts/")
-
-FILE(GLOB py_files ${CMAKE_CURRENT_SOURCE_DIR}/*.py)
-FILE(GLOB py_libFiles ${CMAKE_CURRENT_SOURCE_DIR}/lib/*.py)
-INSTALL(FILES ${py_files} DESTINATION "${AUTOSCRIPT_DIR}" COMPONENT plugins)
-INSTALL(FILES ${py_libFiles} DESTINATION "${AUTOSCRIPT_DIR}/lib" COMPONENT plugins)
-
+SET(AUTOSCRIPT_DIR "${AVIDEMUX_LIB_DIR}/${ADM_PLUGIN_DIR}/autoScripts/")
+
+FILE(GLOB py_files ${CMAKE_CURRENT_SOURCE_DIR}/*.py)
+FILE(GLOB py_libFiles ${CMAKE_CURRENT_SOURCE_DIR}/lib/*.py)
+INSTALL(FILES ${py_files} DESTINATION "${AUTOSCRIPT_DIR}" COMPONENT plugins)
+INSTALL(FILES ${py_libFiles} DESTINATION "${AUTOSCRIPT_DIR}/lib" COMPONENT plugins)
+
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvs.cpp b/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvs.cpp
index 0b269515fa..360c8e857d 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvs.cpp
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvs.cpp
@@ -1,446 +1,446 @@
-/** *************************************************************************
- \file ADM_nativeAv.cpp
- \brief Native AVISynth demuxer
- contains code derived from Avs2YUV by Loren Merritt
- copyright : (C) 2019 by mean
- email : fixounet@free.fr
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "ADM_default.h"
-#include "ADM_Video.h"
-#include "ADM_assert.h"
-
-#include "fourcc.h"
-#include "DIA_coreToolkit.h"
-#include "ADM_nativeAvs.h"
-#include "ADM_image.h"
-
-/**
-*/
-const AVS_Linkage *AVS_linkage = 0;
-static IScriptEnvironment *env=NULL;
-static bool tried = false;
-#if 0
-#define aprintf printf
-#else
-#define aprintf(...) {}
-#endif
-#define nbImage _videostream.dwLength
-
-typedef IScriptEnvironment * __stdcall DLLFUNC(int);
-
-/**
-*/
-static bool tryColdInit(void)
-{
- DLLFUNC *CreateScriptEnvironment = NULL;
- ADM_info("Loading Avisynth.dll \n");
- HMODULE instance = LoadLibrary("avisynth.dll");
- if (!instance)
- {
- ADM_warning("Cannot load avisynth dll\n");
- return false;
- }
- ADM_info("Avisynth.dll loaded\n");
- CreateScriptEnvironment = (DLLFUNC *)GetProcAddress(instance, "CreateScriptEnvironment");
- if (!CreateScriptEnvironment)
- {
- ADM_warning("failed to load CreateScriptEnvironment()\n");
- return false;
- }
- try
- {
- env = CreateScriptEnvironment(AVISYNTH_INTERFACE_VERSION);
- if (!env)
- {
- ADM_warning("Create Env failed\n");
- return false;
- }
- AVS_linkage = env->GetAVSLinkage();
- }
- catch (AvisynthError err)
- {
- ADM_warning("Avisynth error:\n%s\n", err.msg);
- return false;
- }
- return true;
-}
-/**
-*/
-static bool coldInit(void)
-{
- if (!tried)
- {
- tried = true;
- return tryColdInit();
- }
- return env!=NULL;
-}
-
-/**
- \fn getAudioInfo
-*/
-WAVHeader *nativeAvsHeader::getAudioInfo(uint32_t i )
-{
- if (audioAccess)
- return &audioInfo;
- return NULL;
-
-}
-/**
- \fn getAudioStream
-*/
-uint8_t nativeAvsHeader::getAudioStream(uint32_t i,ADM_audioStream **audio)
-{
- if (audioAccess && !i)
- {
- *audio = audioStream;
- return true;
- }
- return false;
-}
-/**
- \fn getNbAudioStreams
-*/
-uint8_t nativeAvsHeader::getNbAudioStreams(void)
-{
- if (audioAccess)
- return 1;
- return 0;
-}
-
-/**
- \fn Dump
-*/
-
-void nativeAvsHeader::Dump(void)
-{
-
- printf("*********** nativeAvs INFO***********\n");
-}
-
-/**
- \fn close
-*/
-
-uint8_t nativeAvsHeader::close(void)
-{
- if (clip)
- {
- delete clip;
- clip = NULL;
- }
- if (audioStream)
- {
- delete audioStream;
- audioStream = NULL;
- }
- if (audioAccess)
- {
- delete audioAccess;
- audioAccess = NULL;
- }
- return 1;
-}
-/**
- \fn nativeAvsHeader
-*/
-
-
- nativeAvsHeader::nativeAvsHeader( void ) : vidHeader()
-{
- clip = NULL;
- audioAccess = NULL;
- audioStream = NULL;
-}
-/**
- \fn ~ nativeAvsHeader
-*/
-
- nativeAvsHeader::~nativeAvsHeader( )
-{
- close();
- audioAccess = NULL; // need to delete it ?
-}
-/**
- \fn open
-*/
-
-uint8_t nativeAvsHeader::open(const char *name)
-{
- if (!coldInit())
- return false;
-
-try{
-
- AVSValue arg(name);
- AVSValue res = env->Invoke("Import", AVSValue(&arg, 1));
- if (!res.IsClip())
- {
- ADM_warning("Avisynth:%s didn t return a video clip.\n", name);
- return 0;
- }
-#if 0
- if (res.AsClip()->GetVersion() < 5)
- {
- ADM_warning(" avisynth.dll version is too old (%d)\n", res.GetVersion());
- return 0;
- }
-#endif
-
- clip = new PClip;
- (*clip) = res.AsClip();
- // Collect informations...
- VideoInfo inf = (*clip)->GetVideoInfo();
- //
- _isaudiopresent = 0;
- _isvideopresent = 1;
- _videostream.dwRate = inf.fps_numerator;
- _videostream.dwScale = inf.fps_denominator;
- _mainaviheader.dwMicroSecPerFrame = 40000;; // 25 fps hard coded
-
- if(inf.IsYV12())
- {
- pixfrmt=ADM_PIXFRMT_YV12;
- _videostream.fccHandler = fourCC::get((uint8_t *) "YV12");
- }else
- if(inf.IsYUY2())
- {
- pixfrmt=ADM_PIXFRMT_YUV422;
- _videostream.fccHandler = fourCC::get((uint8_t *) "YUY2");
- }
- else
- return 0;
-
-
- _video_bih.biCompression=_videostream.fccHandler;
- _videostream.dwLength = _mainaviheader.dwTotalFrames = inf.num_frames;
- _videostream.dwInitialFrames = 0;
- _videostream.dwStart = 0;
- _video_bih.biWidth = _mainaviheader.dwWidth = inf.width;
- _video_bih.biHeight = _mainaviheader.dwHeight = inf.height;
-
- // Do we have audio ?
- if(inf.SamplesPerSecond()) // 0 means no audio
- {
- audioInfo.frequency=inf.SamplesPerSecond(),
- audioInfo.channels=inf.AudioChannels();
-
- audioInfo.byterate = audioInfo.channels*audioInfo.frequency;
- if(audioInfo.frequency)
- {
- int sampleType = inf.SampleType();
- if(sampleType == SAMPLE_INT16 || sampleType == SAMPLE_FLOAT)
- {
- switch (sampleType)
- {
- case SAMPLE_INT16: audioInfo.encoding = WAV_PCM; audioInfo.bitspersample = 16; break;
- case SAMPLE_FLOAT: audioInfo.encoding = WAV_PCM_FLOAT; audioInfo.bitspersample = 32; break;
- default:
- return false;
- }
- audioAccess=new nativeAvsAudio(this,&audioInfo, sampleType,getVideoDuration());
- audioStream = ADM_audioCreateStream(&audioInfo, audioAccess);
- if (audioStream)
- {
- ADM_info("Created audio stream\n");
- _isaudiopresent = 1;
- }
- }
- else
- {
- ADM_warning("Only int16 for audio and not %d!\n",(int)inf.SampleType());
- }
- }
- }
- }
- catch(AvisynthError err)
- {
- ADM_warning( "Avisynth error:\n%s\n", err.msg);
- return false;
- }
- return true;
-}
-/**
- \fn setFlag
-*/
-
-uint8_t nativeAvsHeader::setFlag(uint32_t frame,uint32_t flags)
-{
- ADM_assert(frame=nbImage) return 0;
- *flags=AVI_KEY_FRAME;
- return 1;
-}
-/**
- \fn getFrameSize
-*/
-uint8_t nativeAvsHeader::getFrameSize(uint32_t frame,uint32_t *size)
-{
- *size=0;
- if(frame>=nbImage) return 0;
- *size= (3* _video_bih.biWidth * _video_bih.biHeight)>>1;
- return true;
-}
-/**
- \fn getTime
-*/
-uint64_t nativeAvsHeader::getTime(uint32_t frameNum)
-{
- if(frameNum>=nbImage) return 0;
- return frameNum2PTS(frameNum);
-}
-/**
- \fn getTime
-*/
-
-uint64_t nativeAvsHeader::getVideoDuration(void)
-{
- return frameNum2PTS(_mainaviheader.dwTotalFrames+1);
-}
-/**
- \fn getTime
-*/
-
-bool nativeAvsHeader::getPtsDts(uint32_t frame,uint64_t *pts,uint64_t *dts)
-{
- if(frame>=nbImage) return false;
- *pts=frameNum2PTS(frame);
- *dts=frameNum2PTS(frame);
- return true;
-}
-/**
- \fn getTime
-*/
-
-bool nativeAvsHeader::setPtsDts(uint32_t frame,uint64_t pts,uint64_t dts)
-{
- if(frame>=nbImage) return false;
- return true;
-}
-/**
- \fn getFrame
-*/
-uint8_t nativeAvsHeader::getFrame(uint32_t framenum,ADMCompressedImage *img)
-{
- img->dataLength=0;
- img->flags=AVI_KEY_FRAME;
-
- PVideoFrame Aframe=NULL;
-
- try
- {
- Aframe=(*clip)->GetFrame(framenum,env);
-
- }
- catch(AvisynthError err)
- {
- ADM_warning( "Avisynth get frame error :\n%s\n", err.msg);
- return false;
- }
- if(!Aframe)
- {
- ADM_warning("No video frame\n");
- return false;
- }
- // Pack
- int w= _video_bih.biWidth ;
- int h= _video_bih.biHeight;
- int plane= w*h;
- uint8_t *source;
- uint8_t *dst;
- int sourcePitch;
- switch(pixfrmt)
- {
-
- case ADM_PIXFRMT_YV12:
- {
- // Y
- source= (uint8_t *)Aframe->GetReadPtr(AVS_PLANAR_Y);
- sourcePitch = Aframe->GetPitch(AVS_PLANAR_Y);
- dst=img->data;
- BitBlit(dst,w,source,sourcePitch,w,h);
- // U
- source=(uint8_t *)Aframe->GetReadPtr(AVS_PLANAR_U);
- sourcePitch= Aframe->GetPitch(AVS_PLANAR_U);
- dst=img->data+ (plane * 5) / 4;
- BitBlit(dst,w>>1,source,sourcePitch,w>>1,h>>1);
- // V
- source= (uint8_t *)Aframe->GetReadPtr(AVS_PLANAR_V);
- sourcePitch= Aframe->GetPitch(AVS_PLANAR_V);
- dst = img->data + (plane);
- BitBlit(dst,w>>1,source,sourcePitch,w>>1,h>>1);
- // misc infos
- img->dataLength=(plane*3)>>1;
-
- }
- break;
- case ADM_PIXFRMT_YUV422:
- {
- source= (uint8_t *)Aframe->GetReadPtr();
- sourcePitch = Aframe->GetPitch();
- dst=img->data;
- BitBlit(dst,w*2,source,sourcePitch,w*2,h);
- img->dataLength=(plane*2);
- }
- break;
- default:
- Aframe=NULL;
- return false;
- break;
-
- }
- // done
- img->flags=AVI_KEY_FRAME;
- img->demuxerFrameNo=framenum;
- img->demuxerPts=frameNum2PTS(framenum);
- img->demuxerDts=frameNum2PTS(framenum);
- Aframe=NULL;
- return true;
-}
-/**
-
-*/
-uint64_t nativeAvsHeader::frameNum2PTS(int frameNumber)
-{
- if(!frameNumber)
- return 0;
- double d = _videostream.dwScale ;
- d *= (double)frameNumber;
- d /= (double)_videostream.dwRate;
- d *= 1000000.;
- return (uint64_t)d;
-}
-/**
-*/
-bool nativeAvsHeader::getAudioPacket(uint64_t sample,uint8_t *buffer, uint32_t size)
-{
- try
- {
- (*clip)->GetAudio(buffer, sample, size, env);
- return true;
- }
- catch (AvisynthError err)
- {
- ADM_warning("Avisynth Audio error:\n%s\n", err.msg);
- return false;
- }
-}
-//EOF
+/** *************************************************************************
+ \file ADM_nativeAv.cpp
+ \brief Native AVISynth demuxer
+ contains code derived from Avs2YUV by Loren Merritt
+ copyright : (C) 2019 by mean
+ email : fixounet@free.fr
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "ADM_default.h"
+#include "ADM_Video.h"
+#include "ADM_assert.h"
+
+#include "fourcc.h"
+#include "DIA_coreToolkit.h"
+#include "ADM_nativeAvs.h"
+#include "ADM_image.h"
+
+/**
+*/
+const AVS_Linkage *AVS_linkage = 0;
+static IScriptEnvironment *env=NULL;
+static bool tried = false;
+#if 0
+#define aprintf printf
+#else
+#define aprintf(...) {}
+#endif
+#define nbImage _videostream.dwLength
+
+typedef IScriptEnvironment * __stdcall DLLFUNC(int);
+
+/**
+*/
+static bool tryColdInit(void)
+{
+ DLLFUNC *CreateScriptEnvironment = NULL;
+ ADM_info("Loading Avisynth.dll \n");
+ HMODULE instance = LoadLibrary("avisynth.dll");
+ if (!instance)
+ {
+ ADM_warning("Cannot load avisynth dll\n");
+ return false;
+ }
+ ADM_info("Avisynth.dll loaded\n");
+ CreateScriptEnvironment = (DLLFUNC *)GetProcAddress(instance, "CreateScriptEnvironment");
+ if (!CreateScriptEnvironment)
+ {
+ ADM_warning("failed to load CreateScriptEnvironment()\n");
+ return false;
+ }
+ try
+ {
+ env = CreateScriptEnvironment(AVISYNTH_INTERFACE_VERSION);
+ if (!env)
+ {
+ ADM_warning("Create Env failed\n");
+ return false;
+ }
+ AVS_linkage = env->GetAVSLinkage();
+ }
+ catch (AvisynthError err)
+ {
+ ADM_warning("Avisynth error:\n%s\n", err.msg);
+ return false;
+ }
+ return true;
+}
+/**
+*/
+static bool coldInit(void)
+{
+ if (!tried)
+ {
+ tried = true;
+ return tryColdInit();
+ }
+ return env!=NULL;
+}
+
+/**
+ \fn getAudioInfo
+*/
+WAVHeader *nativeAvsHeader::getAudioInfo(uint32_t i )
+{
+ if (audioAccess)
+ return &audioInfo;
+ return NULL;
+
+}
+/**
+ \fn getAudioStream
+*/
+uint8_t nativeAvsHeader::getAudioStream(uint32_t i,ADM_audioStream **audio)
+{
+ if (audioAccess && !i)
+ {
+ *audio = audioStream;
+ return true;
+ }
+ return false;
+}
+/**
+ \fn getNbAudioStreams
+*/
+uint8_t nativeAvsHeader::getNbAudioStreams(void)
+{
+ if (audioAccess)
+ return 1;
+ return 0;
+}
+
+/**
+ \fn Dump
+*/
+
+void nativeAvsHeader::Dump(void)
+{
+
+ printf("*********** nativeAvs INFO***********\n");
+}
+
+/**
+ \fn close
+*/
+
+uint8_t nativeAvsHeader::close(void)
+{
+ if (clip)
+ {
+ delete clip;
+ clip = NULL;
+ }
+ if (audioStream)
+ {
+ delete audioStream;
+ audioStream = NULL;
+ }
+ if (audioAccess)
+ {
+ delete audioAccess;
+ audioAccess = NULL;
+ }
+ return 1;
+}
+/**
+ \fn nativeAvsHeader
+*/
+
+
+ nativeAvsHeader::nativeAvsHeader( void ) : vidHeader()
+{
+ clip = NULL;
+ audioAccess = NULL;
+ audioStream = NULL;
+}
+/**
+ \fn ~ nativeAvsHeader
+*/
+
+ nativeAvsHeader::~nativeAvsHeader( )
+{
+ close();
+ audioAccess = NULL; // need to delete it ?
+}
+/**
+ \fn open
+*/
+
+uint8_t nativeAvsHeader::open(const char *name)
+{
+ if (!coldInit())
+ return false;
+
+try{
+
+ AVSValue arg(name);
+ AVSValue res = env->Invoke("Import", AVSValue(&arg, 1));
+ if (!res.IsClip())
+ {
+ ADM_warning("Avisynth:%s didn t return a video clip.\n", name);
+ return 0;
+ }
+#if 0
+ if (res.AsClip()->GetVersion() < 5)
+ {
+ ADM_warning(" avisynth.dll version is too old (%d)\n", res.GetVersion());
+ return 0;
+ }
+#endif
+
+ clip = new PClip;
+ (*clip) = res.AsClip();
+ // Collect informations...
+ VideoInfo inf = (*clip)->GetVideoInfo();
+ //
+ _isaudiopresent = 0;
+ _isvideopresent = 1;
+ _videostream.dwRate = inf.fps_numerator;
+ _videostream.dwScale = inf.fps_denominator;
+ _mainaviheader.dwMicroSecPerFrame = 40000;; // 25 fps hard coded
+
+ if(inf.IsYV12())
+ {
+ pixfrmt=ADM_PIXFRMT_YV12;
+ _videostream.fccHandler = fourCC::get((uint8_t *) "YV12");
+ }else
+ if(inf.IsYUY2())
+ {
+ pixfrmt=ADM_PIXFRMT_YUV422;
+ _videostream.fccHandler = fourCC::get((uint8_t *) "YUY2");
+ }
+ else
+ return 0;
+
+
+ _video_bih.biCompression=_videostream.fccHandler;
+ _videostream.dwLength = _mainaviheader.dwTotalFrames = inf.num_frames;
+ _videostream.dwInitialFrames = 0;
+ _videostream.dwStart = 0;
+ _video_bih.biWidth = _mainaviheader.dwWidth = inf.width;
+ _video_bih.biHeight = _mainaviheader.dwHeight = inf.height;
+
+ // Do we have audio ?
+ if(inf.SamplesPerSecond()) // 0 means no audio
+ {
+ audioInfo.frequency=inf.SamplesPerSecond(),
+ audioInfo.channels=inf.AudioChannels();
+
+ audioInfo.byterate = audioInfo.channels*audioInfo.frequency;
+ if(audioInfo.frequency)
+ {
+ int sampleType = inf.SampleType();
+ if(sampleType == SAMPLE_INT16 || sampleType == SAMPLE_FLOAT)
+ {
+ switch (sampleType)
+ {
+ case SAMPLE_INT16: audioInfo.encoding = WAV_PCM; audioInfo.bitspersample = 16; break;
+ case SAMPLE_FLOAT: audioInfo.encoding = WAV_PCM_FLOAT; audioInfo.bitspersample = 32; break;
+ default:
+ return false;
+ }
+ audioAccess=new nativeAvsAudio(this,&audioInfo, sampleType,getVideoDuration());
+ audioStream = ADM_audioCreateStream(&audioInfo, audioAccess);
+ if (audioStream)
+ {
+ ADM_info("Created audio stream\n");
+ _isaudiopresent = 1;
+ }
+ }
+ else
+ {
+ ADM_warning("Only int16 for audio and not %d!\n",(int)inf.SampleType());
+ }
+ }
+ }
+ }
+ catch(AvisynthError err)
+ {
+ ADM_warning( "Avisynth error:\n%s\n", err.msg);
+ return false;
+ }
+ return true;
+}
+/**
+ \fn setFlag
+*/
+
+uint8_t nativeAvsHeader::setFlag(uint32_t frame,uint32_t flags)
+{
+ ADM_assert(frame=nbImage) return 0;
+ *flags=AVI_KEY_FRAME;
+ return 1;
+}
+/**
+ \fn getFrameSize
+*/
+uint8_t nativeAvsHeader::getFrameSize(uint32_t frame,uint32_t *size)
+{
+ *size=0;
+ if(frame>=nbImage) return 0;
+ *size= (3* _video_bih.biWidth * _video_bih.biHeight)>>1;
+ return true;
+}
+/**
+ \fn getTime
+*/
+uint64_t nativeAvsHeader::getTime(uint32_t frameNum)
+{
+ if(frameNum>=nbImage) return 0;
+ return frameNum2PTS(frameNum);
+}
+/**
+ \fn getTime
+*/
+
+uint64_t nativeAvsHeader::getVideoDuration(void)
+{
+ return frameNum2PTS(_mainaviheader.dwTotalFrames+1);
+}
+/**
+ \fn getTime
+*/
+
+bool nativeAvsHeader::getPtsDts(uint32_t frame,uint64_t *pts,uint64_t *dts)
+{
+ if(frame>=nbImage) return false;
+ *pts=frameNum2PTS(frame);
+ *dts=frameNum2PTS(frame);
+ return true;
+}
+/**
+ \fn getTime
+*/
+
+bool nativeAvsHeader::setPtsDts(uint32_t frame,uint64_t pts,uint64_t dts)
+{
+ if(frame>=nbImage) return false;
+ return true;
+}
+/**
+ \fn getFrame
+*/
+uint8_t nativeAvsHeader::getFrame(uint32_t framenum,ADMCompressedImage *img)
+{
+ img->dataLength=0;
+ img->flags=AVI_KEY_FRAME;
+
+ PVideoFrame Aframe=NULL;
+
+ try
+ {
+ Aframe=(*clip)->GetFrame(framenum,env);
+
+ }
+ catch(AvisynthError err)
+ {
+ ADM_warning( "Avisynth get frame error :\n%s\n", err.msg);
+ return false;
+ }
+ if(!Aframe)
+ {
+ ADM_warning("No video frame\n");
+ return false;
+ }
+ // Pack
+ int w= _video_bih.biWidth ;
+ int h= _video_bih.biHeight;
+ int plane= w*h;
+ uint8_t *source;
+ uint8_t *dst;
+ int sourcePitch;
+ switch(pixfrmt)
+ {
+
+ case ADM_PIXFRMT_YV12:
+ {
+ // Y
+ source= (uint8_t *)Aframe->GetReadPtr(AVS_PLANAR_Y);
+ sourcePitch = Aframe->GetPitch(AVS_PLANAR_Y);
+ dst=img->data;
+ BitBlit(dst,w,source,sourcePitch,w,h);
+ // U
+ source=(uint8_t *)Aframe->GetReadPtr(AVS_PLANAR_U);
+ sourcePitch= Aframe->GetPitch(AVS_PLANAR_U);
+ dst=img->data+ (plane * 5) / 4;
+ BitBlit(dst,w>>1,source,sourcePitch,w>>1,h>>1);
+ // V
+ source= (uint8_t *)Aframe->GetReadPtr(AVS_PLANAR_V);
+ sourcePitch= Aframe->GetPitch(AVS_PLANAR_V);
+ dst = img->data + (plane);
+ BitBlit(dst,w>>1,source,sourcePitch,w>>1,h>>1);
+ // misc infos
+ img->dataLength=(plane*3)>>1;
+
+ }
+ break;
+ case ADM_PIXFRMT_YUV422:
+ {
+ source= (uint8_t *)Aframe->GetReadPtr();
+ sourcePitch = Aframe->GetPitch();
+ dst=img->data;
+ BitBlit(dst,w*2,source,sourcePitch,w*2,h);
+ img->dataLength=(plane*2);
+ }
+ break;
+ default:
+ Aframe=NULL;
+ return false;
+ break;
+
+ }
+ // done
+ img->flags=AVI_KEY_FRAME;
+ img->demuxerFrameNo=framenum;
+ img->demuxerPts=frameNum2PTS(framenum);
+ img->demuxerDts=frameNum2PTS(framenum);
+ Aframe=NULL;
+ return true;
+}
+/**
+
+*/
+uint64_t nativeAvsHeader::frameNum2PTS(int frameNumber)
+{
+ if(!frameNumber)
+ return 0;
+ double d = _videostream.dwScale ;
+ d *= (double)frameNumber;
+ d /= (double)_videostream.dwRate;
+ d *= 1000000.;
+ return (uint64_t)d;
+}
+/**
+*/
+bool nativeAvsHeader::getAudioPacket(uint64_t sample,uint8_t *buffer, uint32_t size)
+{
+ try
+ {
+ (*clip)->GetAudio(buffer, sample, size, env);
+ return true;
+ }
+ catch (AvisynthError err)
+ {
+ ADM_warning("Avisynth Audio error:\n%s\n", err.msg);
+ return false;
+ }
+}
+//EOF
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvs.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvs.h
index f174c22ae3..02f4bf78dd 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvs.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvs.h
@@ -1,112 +1,112 @@
-/***************************************************************************
- ADM_pics.h - description
- -------------------
- begin : Mon Jun 3 2002
- copyright : (C) 2002/2009 by mean
- email : fixounet@free.fr
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-#pragma once
-#include
-using std::vector;
-#include "ADM_Video.h"
-#include "ADM_audioClock.h"
-#include "avisynth.h"
-
-class nativeAvsHeader;
-/**
-\fn nativeAvsAudio
-*/
-class nativeAvsAudio : public ADM_audioAccess
-{
-protected:
- audioClock clock;
- WAVHeader *wavHeader;
- uint64_t duration;
- uint64_t nextSample;
- nativeAvsHeader *avs;
- int sampleType;
-public:
- nativeAvsAudio(nativeAvsHeader *net, WAVHeader *wav, int sampleType, uint64_t duration);
- virtual ~nativeAvsAudio();
- /// Hint, the stream is pure CBR (AC3,MP2,MP3)
- virtual bool isCBR(void) { return true; }
- /// Return true if the demuxer can seek in time
- virtual bool canSeekTime(void) { return true; };
- /// Return true if the demuxer can seek by offser
- virtual bool canSeekOffset(void) { return false; };
- /// Return true if we can have the audio duration
- virtual bool canGetDuration(void) { return true; };
- /// Returns audio duration in us
- virtual uint64_t getDurationInUs(void);
- /// Go to a given time
- virtual bool goToTime(uint64_t timeUs);
- virtual bool getPacket(uint8_t *buffer, uint32_t *size, uint32_t maxSize, uint64_t *dts);
- bool getExtraData(uint32_t *l, uint8_t **d) { *l = 0; *d = NULL; return true; };
-};
-
-/**
- \class nativeAvsHeader
- \brief Asf Demuxer
-*/
-
-class nativeAvsHeader :public vidHeader
-{
- protected:
-
- uint8_t close(void);
- PClip *clip;
-
-
- public: // Shared with audio track
- public:
- nativeAvsHeader(void);
- virtual ~nativeAvsHeader();
- uint8_t open(const char *name);
- //__________________________
- // Audio
- //__________________________
-
- virtual WAVHeader *getAudioInfo(uint32_t i ) ;
- virtual uint8_t getAudioStream(uint32_t i,ADM_audioStream **audio);
- virtual uint8_t getNbAudioStreams(void);
- // Frames
- //__________________________
- // video
- //__________________________
-
- virtual uint8_t setFlag(uint32_t frame,uint32_t flags);
- virtual uint32_t getFlags(uint32_t frame,uint32_t *flags);
- virtual uint8_t getFrameSize(uint32_t frame,uint32_t *size);
- virtual uint8_t getFrame(uint32_t framenum,ADMCompressedImage *img);
-
- virtual void Dump(void);
- virtual uint64_t getTime(uint32_t frameNum);
- virtual uint64_t getVideoDuration(void);
-
- // Return true if the container provides pts informations
- virtual bool providePts(void) {return false;};
- //
- virtual bool getPtsDts(uint32_t frame,uint64_t *pts,uint64_t *dts);
- virtual bool setPtsDts(uint32_t frame,uint64_t pts,uint64_t dts);
-
- PClip *getClip() { return clip; }
- bool getAudioPacket(uint64_t sample, uint8_t *buffer, uint32_t size);
-
-protected:
- uint64_t frameNum2PTS(int frameNumber);
- ADM_pixelFormat pixfrmt;
- WAVHeader audioInfo;
- nativeAvsAudio *audioAccess;
- ADM_audioStream *audioStream;
-};
-
-
+/***************************************************************************
+ ADM_pics.h - description
+ -------------------
+ begin : Mon Jun 3 2002
+ copyright : (C) 2002/2009 by mean
+ email : fixounet@free.fr
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+#pragma once
+#include
+using std::vector;
+#include "ADM_Video.h"
+#include "ADM_audioClock.h"
+#include "avisynth.h"
+
+class nativeAvsHeader;
+/**
+\fn nativeAvsAudio
+*/
+class nativeAvsAudio : public ADM_audioAccess
+{
+protected:
+ audioClock clock;
+ WAVHeader *wavHeader;
+ uint64_t duration;
+ uint64_t nextSample;
+ nativeAvsHeader *avs;
+ int sampleType;
+public:
+ nativeAvsAudio(nativeAvsHeader *net, WAVHeader *wav, int sampleType, uint64_t duration);
+ virtual ~nativeAvsAudio();
+ /// Hint, the stream is pure CBR (AC3,MP2,MP3)
+ virtual bool isCBR(void) { return true; }
+ /// Return true if the demuxer can seek in time
+ virtual bool canSeekTime(void) { return true; };
+ /// Return true if the demuxer can seek by offser
+ virtual bool canSeekOffset(void) { return false; };
+ /// Return true if we can have the audio duration
+ virtual bool canGetDuration(void) { return true; };
+ /// Returns audio duration in us
+ virtual uint64_t getDurationInUs(void);
+ /// Go to a given time
+ virtual bool goToTime(uint64_t timeUs);
+ virtual bool getPacket(uint8_t *buffer, uint32_t *size, uint32_t maxSize, uint64_t *dts);
+ bool getExtraData(uint32_t *l, uint8_t **d) { *l = 0; *d = NULL; return true; };
+};
+
+/**
+ \class nativeAvsHeader
+ \brief Asf Demuxer
+*/
+
+class nativeAvsHeader :public vidHeader
+{
+ protected:
+
+ uint8_t close(void);
+ PClip *clip;
+
+
+ public: // Shared with audio track
+ public:
+ nativeAvsHeader(void);
+ virtual ~nativeAvsHeader();
+ uint8_t open(const char *name);
+ //__________________________
+ // Audio
+ //__________________________
+
+ virtual WAVHeader *getAudioInfo(uint32_t i ) ;
+ virtual uint8_t getAudioStream(uint32_t i,ADM_audioStream **audio);
+ virtual uint8_t getNbAudioStreams(void);
+ // Frames
+ //__________________________
+ // video
+ //__________________________
+
+ virtual uint8_t setFlag(uint32_t frame,uint32_t flags);
+ virtual uint32_t getFlags(uint32_t frame,uint32_t *flags);
+ virtual uint8_t getFrameSize(uint32_t frame,uint32_t *size);
+ virtual uint8_t getFrame(uint32_t framenum,ADMCompressedImage *img);
+
+ virtual void Dump(void);
+ virtual uint64_t getTime(uint32_t frameNum);
+ virtual uint64_t getVideoDuration(void);
+
+ // Return true if the container provides pts informations
+ virtual bool providePts(void) {return false;};
+ //
+ virtual bool getPtsDts(uint32_t frame,uint64_t *pts,uint64_t *dts);
+ virtual bool setPtsDts(uint32_t frame,uint64_t pts,uint64_t dts);
+
+ PClip *getClip() { return clip; }
+ bool getAudioPacket(uint64_t sample, uint8_t *buffer, uint32_t size);
+
+protected:
+ uint64_t frameNum2PTS(int frameNumber);
+ ADM_pixelFormat pixfrmt;
+ WAVHeader audioInfo;
+ nativeAvsAudio *audioAccess;
+ ADM_audioStream *audioStream;
+};
+
+
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvsAudio.cpp b/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvsAudio.cpp
index 7f99c2b4c9..4d70ea7c08 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvsAudio.cpp
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvsAudio.cpp
@@ -1,99 +1,99 @@
-/***************************************************************************
- \file ADM_nativeAvsAudio.cpp
- \author (C) 2018 by mean fixounet@free.fr
-
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "ADM_default.h"
-#include "fourcc.h"
-#include "DIA_coreToolkit.h"
-
-#include "fourcc.h"
-#include "ADM_nativeAvs.h"
-/**
- \fn ADM_avsAccess
-*/
-nativeAvsAudio::nativeAvsAudio(nativeAvsHeader *avsh, WAVHeader *wav,int sampleT,uint64_t duration):
- clock(wav->frequency)
-{
- this->avs=avsh;
- this->wavHeader=wav;
- this->duration=duration;
- nextSample=0;
- sampleType = sampleT;
-}
-/**
- \fn ~ADM_avsAccess
-*/
-
-nativeAvsAudio::~nativeAvsAudio()
-{
- avs = NULL;
- wavHeader = NULL;
-}
-/**
- \fn getDurationInUs
-*/
-uint64_t nativeAvsAudio::getDurationInUs(void)
-{
- return duration;
-}
-/**
- \fn goToTime
-*/
-bool nativeAvsAudio::goToTime(uint64_t timeUs)
-{
- // convert us to sample
- float f=timeUs;
- f*=wavHeader->frequency;
- f/=1000000.;
- nextSample=(uint32_t )f;
- clock.setTimeUs(timeUs);
- return true;
-}
-/**
- \fn getPacket
-*/
-bool nativeAvsAudio::getPacket(uint8_t *buffer, uint32_t *size, uint32_t maxSize,uint64_t *dts)
-{
- uint32_t sizeInSample;
- int multiply;
- switch (sampleType)
- {
- case SAMPLE_INT16:
- multiply = (2 * wavHeader->channels);
- break;
- case SAMPLE_FLOAT:
- multiply = (4 * wavHeader->channels);
- break;
- default:
- return false;
- }
- sizeInSample = maxSize / multiply;
-
- if (!avs->getAudioPacket(nextSample, buffer, sizeInSample))
- {
- ADM_warning("Error getPacket\n");
- return false;
- }
- *dts = clock.getTimeUs();
- clock.advanceBySample(sizeInSample );
-
- *size = sizeInSample*multiply;
- nextSample += sizeInSample;
-
- if (!*size)
- return false;
- return true;
-};
-//EOF
-
+/***************************************************************************
+ \file ADM_nativeAvsAudio.cpp
+ \author (C) 2018 by mean fixounet@free.fr
+
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#include "ADM_default.h"
+#include "fourcc.h"
+#include "DIA_coreToolkit.h"
+
+#include "fourcc.h"
+#include "ADM_nativeAvs.h"
+/**
+ \fn ADM_avsAccess
+*/
+nativeAvsAudio::nativeAvsAudio(nativeAvsHeader *avsh, WAVHeader *wav,int sampleT,uint64_t duration):
+ clock(wav->frequency)
+{
+ this->avs=avsh;
+ this->wavHeader=wav;
+ this->duration=duration;
+ nextSample=0;
+ sampleType = sampleT;
+}
+/**
+ \fn ~ADM_avsAccess
+*/
+
+nativeAvsAudio::~nativeAvsAudio()
+{
+ avs = NULL;
+ wavHeader = NULL;
+}
+/**
+ \fn getDurationInUs
+*/
+uint64_t nativeAvsAudio::getDurationInUs(void)
+{
+ return duration;
+}
+/**
+ \fn goToTime
+*/
+bool nativeAvsAudio::goToTime(uint64_t timeUs)
+{
+ // convert us to sample
+ float f=timeUs;
+ f*=wavHeader->frequency;
+ f/=1000000.;
+ nextSample=(uint32_t )f;
+ clock.setTimeUs(timeUs);
+ return true;
+}
+/**
+ \fn getPacket
+*/
+bool nativeAvsAudio::getPacket(uint8_t *buffer, uint32_t *size, uint32_t maxSize,uint64_t *dts)
+{
+ uint32_t sizeInSample;
+ int multiply;
+ switch (sampleType)
+ {
+ case SAMPLE_INT16:
+ multiply = (2 * wavHeader->channels);
+ break;
+ case SAMPLE_FLOAT:
+ multiply = (4 * wavHeader->channels);
+ break;
+ default:
+ return false;
+ }
+ sizeInSample = maxSize / multiply;
+
+ if (!avs->getAudioPacket(nextSample, buffer, sizeInSample))
+ {
+ ADM_warning("Error getPacket\n");
+ return false;
+ }
+ *dts = clock.getTimeUs();
+ clock.advanceBySample(sizeInSample );
+
+ *size = sizeInSample*multiply;
+ nextSample += sizeInSample;
+
+ if (!*size)
+ return false;
+ return true;
+};
+//EOF
+
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvsPlugin.cpp b/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvsPlugin.cpp
index 1f2f0dc57c..7e690b308e 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvsPlugin.cpp
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/ADM_nativeAvsPlugin.cpp
@@ -1,42 +1,42 @@
-/***************************************************************************
- copyright : (C) 2007 by mean
- email : fixounet@free.fr
-
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-#include "ADM_default.h"
-#include "ADM_nativeAvs.h"
-#include "ADM_demuxerInternal.h"
-#include "fourcc.h"
-
-ADM_DEMUXER_BEGIN(nativeAvsHeader, 50,
- 1,0,0,
- "navs",
- "native avs demuxer plugin (c) Mean 2018"
- );
-
-/**
- \fn Probe
-*/
-
-extern "C" uint32_t ADM_PLUGIN_EXPORT probe(uint32_t magic, const char *fileName)
-{
- std::string st = std::string(fileName);
- std::string extension("avs");
-
- if (st.length() >= extension.length())
- {
- if (!st.compare(st.length() - extension.length(), extension.length(), extension))
- return 100;
- }
- ADM_warning (" [avsProxy] Cannot open that\n");
- return 0;
-}
+/***************************************************************************
+ copyright : (C) 2007 by mean
+ email : fixounet@free.fr
+
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+#include "ADM_default.h"
+#include "ADM_nativeAvs.h"
+#include "ADM_demuxerInternal.h"
+#include "fourcc.h"
+
+ADM_DEMUXER_BEGIN(nativeAvsHeader, 50,
+ 1,0,0,
+ "navs",
+ "native avs demuxer plugin (c) Mean 2018"
+ );
+
+/**
+ \fn Probe
+*/
+
+extern "C" uint32_t ADM_PLUGIN_EXPORT probe(uint32_t magic, const char *fileName)
+{
+ std::string st = std::string(fileName);
+ std::string extension("avs");
+
+ if (st.length() >= extension.length())
+ {
+ if (!st.compare(st.length() - extension.length(), extension.length(), extension))
+ return 100;
+ }
+ ADM_warning (" [avsProxy] Cannot open that\n");
+ return 0;
+}
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/CMakeLists.txt b/avidemux_plugins/ADM_demuxers/NativeAvisynth/CMakeLists.txt
index 8dd49d8c4f..f89ebf854d 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/CMakeLists.txt
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/CMakeLists.txt
@@ -1,83 +1,83 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR)
-
-PROJECT(AdmAsfDemuxer)
-
-MESSAGE("#####################################")
-MESSAGE("Custom demuxer plugin template Started")
-MESSAGE("#####################################")
-MESSAGE("")
-
-SET(PLUGINS TRUE)
-SET(DO_COMMON TRUE)
-SET(AVIDEMUX_VERSION 2.8) # important !
-SET(AVIDEMUX_EXTERNAL_BUILD True) # important !
-
-######################################################
-# Try to locate & setup avidemux development files
-######################################################
-
-MESSAGE(STATUS "Checking for avidemux development files ..")
-
-SET(ADM_HEADER_DIR ${CMAKE_INSTALL_PREFIX}/include/avidemux/${AVIDEMUX_VERSION})
-SET(ADM_CMAKE_DIR ${ADM_HEADER_DIR}/cmake)
-
-# Common definitions...
-SET(CMAKE_MODULE_PATH "${ADM_CMAKE_DIR}" "${CMAKE_MODULE_PATH}")
-MESSAGE(STATUS "Checking for avidemux include folder (i.e. CMAKE_INSTALL_PREFIX/include/avidemux/${AVIDEMUX_VERSION}")
-if(NOT EXISTS "${ADM_HEADER_DIR}")
- MESSAGE(STATUS "Make sure you installed all the files.\n i cannot find avidemux include folder.cmake .\nSet CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(FATAL_ERROR "Aborting")
-endif(NOT EXISTS "${ADM_HEADER_DIR}")
-
-MESSAGE(STATUS "Found avidemux include folder. good.")
-MESSAGE(STATUS "Checking for cmake subfolder")
-
-if(NOT EXISTS "${ADM_CMAKE_DIR}/admCoreIncludesExternalBuild.cmake")
- MESSAGE(STATUS "Make sure you installed all the files.\n I cannot find content of the cmake subfolder .\n")
- MESSAGE(STATUS "Set CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
- MESSAGE(STATUS "I was looking for admCoreIncludesExternalBuild.cmake in ${ADM_CMAKE_DIR}")
- MESSAGE(FATAL_ERROR "Aborting")
-endif(NOT EXISTS "${ADM_CMAKE_DIR}/admCoreIncludesExternalBuild.cmake")
-MESSAGE(STATUS "Found cmake subfolder.good.")
-
-
-include(${ADM_CMAKE_DIR}/admCoreIncludesExternalBuild.cmake)
-include(${ADM_CMAKE_DIR}/admConfigHelper.cmake)
-########################################
-# Add include dirs
-########################################
-SET(AVIDEMUX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
-MARK_AS_ADVANCED(AVIDEMUX_INSTALL_DIR)
-include(admInstallDir)
-#########################################
-# Get regular stuff from main app
-#########################################
-LINK_DIRECTORIES("${AVIDEMUX_SEARCH_LIB_DIR}")
-INCLUDE_DIRECTORIES(${AVIDEMUX_SEARCH_INCLUDE_DIR}/avidemux/${AVIDEMUX_VERSION}/)
-
-IF (FRESH_BUILD)
- MESSAGE("")
-ENDIF (FRESH_BUILD)
-
-########################################
-# Global options
-########################################
-OPTION(VERBOSE "" OFF)
-
-################################################
-# Now really define our plugin...
-###############################################
-
-include(dm_plugin)
-SET(ADM_nativeAvs_SRCS
- ADM_nativeAvsAudio.cpp
- ADM_nativeAvs.cpp
- ADM_nativeAvsPlugin.cpp
-)
-include_directories(${CMAKE_CURRENT_SOURCE_DIR})
-link_directories(${CMAKE_CURRENT_SOURCE_DIR})
-ADD_DEMUXER(ADM_dm_nativeAvs ${ADM_nativeAvs_SRCS})
-
-INIT_DEMUXER(ADM_dm_nativeAvs)
-INSTALL_DEMUXER(ADM_dm_nativeAvs)
-#TARGET_LINK_LIBRARIES(ADM_dm_nativeAvs ${CMAKE_CURRENT_SOURCE_DIR}/AviSynth.lib)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0 FATAL_ERROR)
+
+PROJECT(AdmAsfDemuxer)
+
+MESSAGE("#####################################")
+MESSAGE("Custom demuxer plugin template Started")
+MESSAGE("#####################################")
+MESSAGE("")
+
+SET(PLUGINS TRUE)
+SET(DO_COMMON TRUE)
+SET(AVIDEMUX_VERSION 2.8) # important !
+SET(AVIDEMUX_EXTERNAL_BUILD True) # important !
+
+######################################################
+# Try to locate & setup avidemux development files
+######################################################
+
+MESSAGE(STATUS "Checking for avidemux development files ..")
+
+SET(ADM_HEADER_DIR ${CMAKE_INSTALL_PREFIX}/include/avidemux/${AVIDEMUX_VERSION})
+SET(ADM_CMAKE_DIR ${ADM_HEADER_DIR}/cmake)
+
+# Common definitions...
+SET(CMAKE_MODULE_PATH "${ADM_CMAKE_DIR}" "${CMAKE_MODULE_PATH}")
+MESSAGE(STATUS "Checking for avidemux include folder (i.e. CMAKE_INSTALL_PREFIX/include/avidemux/${AVIDEMUX_VERSION}")
+if(NOT EXISTS "${ADM_HEADER_DIR}")
+ MESSAGE(STATUS "Make sure you installed all the files.\n i cannot find avidemux include folder.cmake .\nSet CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
+ MESSAGE(FATAL_ERROR "Aborting")
+endif(NOT EXISTS "${ADM_HEADER_DIR}")
+
+MESSAGE(STATUS "Found avidemux include folder. good.")
+MESSAGE(STATUS "Checking for cmake subfolder")
+
+if(NOT EXISTS "${ADM_CMAKE_DIR}/admCoreIncludesExternalBuild.cmake")
+ MESSAGE(STATUS "Make sure you installed all the files.\n I cannot find content of the cmake subfolder .\n")
+ MESSAGE(STATUS "Set CMAKE_INSTALL_PREFIX to the install folder, current value is ${CMAKE_INSTALL_PREFIX}")
+ MESSAGE(STATUS "I was looking for admCoreIncludesExternalBuild.cmake in ${ADM_CMAKE_DIR}")
+ MESSAGE(FATAL_ERROR "Aborting")
+endif(NOT EXISTS "${ADM_CMAKE_DIR}/admCoreIncludesExternalBuild.cmake")
+MESSAGE(STATUS "Found cmake subfolder.good.")
+
+
+include(${ADM_CMAKE_DIR}/admCoreIncludesExternalBuild.cmake)
+include(${ADM_CMAKE_DIR}/admConfigHelper.cmake)
+########################################
+# Add include dirs
+########################################
+SET(AVIDEMUX_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}")
+MARK_AS_ADVANCED(AVIDEMUX_INSTALL_DIR)
+include(admInstallDir)
+#########################################
+# Get regular stuff from main app
+#########################################
+LINK_DIRECTORIES("${AVIDEMUX_SEARCH_LIB_DIR}")
+INCLUDE_DIRECTORIES(${AVIDEMUX_SEARCH_INCLUDE_DIR}/avidemux/${AVIDEMUX_VERSION}/)
+
+IF (FRESH_BUILD)
+ MESSAGE("")
+ENDIF (FRESH_BUILD)
+
+########################################
+# Global options
+########################################
+OPTION(VERBOSE "" OFF)
+
+################################################
+# Now really define our plugin...
+###############################################
+
+include(dm_plugin)
+SET(ADM_nativeAvs_SRCS
+ ADM_nativeAvsAudio.cpp
+ ADM_nativeAvs.cpp
+ ADM_nativeAvsPlugin.cpp
+)
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+link_directories(${CMAKE_CURRENT_SOURCE_DIR})
+ADD_DEMUXER(ADM_dm_nativeAvs ${ADM_nativeAvs_SRCS})
+
+INIT_DEMUXER(ADM_dm_nativeAvs)
+INSTALL_DEMUXER(ADM_dm_nativeAvs)
+#TARGET_LINK_LIBRARIES(ADM_dm_nativeAvs ${CMAKE_CURRENT_SOURCE_DIR}/AviSynth.lib)
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/Syntax.avs b/avidemux_plugins/ADM_demuxers/NativeAvisynth/Syntax.avs
index 4a73f93e48..690a9315a2 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/Syntax.avs
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/Syntax.avs
@@ -1,45 +1,45 @@
-# Generates colorbar image and converts it to YUY2
-# The image and sound is now "current clip"
-
-Colorbars(320,240)
-ConvertToYUY2()
-
-# Take the "current clip", and add greayscale to this.
-# The result is now in the variable Grey.
-# Current clip is still the original Colorbars(320,240)
-
-Grey = Greyscale()
-
-# Now you can use Grey as an alternative clip, instead if the current clip
-# This creates a new variable called Grey_Half_Size, that contains the grey colorbar at half the height.
-# Current clip is still the original Colorbars(320,240)
-
-Grey_Half_Size = VerticalReduceBy2(Grey)
-
-# If we specify more parameters, but don't want it used on the current clip,
-# we can either specify the clip in front of the filter, using '.'
-# or specify the clip as the first parameter.
-
-Grey_Same_Size = Grey_half_size.AddBorders(0,60,0,60)
-
-# which is the same as:
-
-Grey_Same_Size = AddBorders(Grey_half_size,0,60,0,60)
-
-# More examples:
-
-Combined = MergeLuma(grey_same_size)
-#Combined = MergeChroma(Combined, grey_same_size)
-#Grey_same_size=mergeluma(combined)
-# Add titles to clips:
-
-Thisclip = Subtitle("Current Clip")
-Grey_Half_size = Subtitle(Grey_Half_size,"Grey_Half_size")
-Grey_Same_size = Subtitle(Grey_Same_size,"Grey_Same_size")
-Combined = Subtitle(Combined,"Combined")
-
-# Put them on top of eachother
-
-Stackvertical(thisclip, Grey_Half_size, Grey_Same_size, Combined)
-
+# Generates colorbar image and converts it to YUY2
+# The image and sound is now "current clip"
+
+Colorbars(320,240)
+ConvertToYUY2()
+
+# Take the "current clip", and add greayscale to this.
+# The result is now in the variable Grey.
+# Current clip is still the original Colorbars(320,240)
+
+Grey = Greyscale()
+
+# Now you can use Grey as an alternative clip, instead if the current clip
+# This creates a new variable called Grey_Half_Size, that contains the grey colorbar at half the height.
+# Current clip is still the original Colorbars(320,240)
+
+Grey_Half_Size = VerticalReduceBy2(Grey)
+
+# If we specify more parameters, but don't want it used on the current clip,
+# we can either specify the clip in front of the filter, using '.'
+# or specify the clip as the first parameter.
+
+Grey_Same_Size = Grey_half_size.AddBorders(0,60,0,60)
+
+# which is the same as:
+
+Grey_Same_Size = AddBorders(Grey_half_size,0,60,0,60)
+
+# More examples:
+
+Combined = MergeLuma(grey_same_size)
+#Combined = MergeChroma(Combined, grey_same_size)
+#Grey_same_size=mergeluma(combined)
+# Add titles to clips:
+
+Thisclip = Subtitle("Current Clip")
+Grey_Half_size = Subtitle(Grey_Half_size,"Grey_Half_size")
+Grey_Same_size = Subtitle(Grey_Same_size,"Grey_Same_size")
+Combined = Subtitle(Combined,"Combined")
+
+# Put them on top of eachother
+
+Stackvertical(thisclip, Grey_Half_size, Grey_Same_size, Combined)
+
ConvertToYV12(thisclip)
\ No newline at end of file
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avisynth.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avisynth.h
index d73d6d1e31..50e9a8df91 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avisynth.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avisynth.h
@@ -1,1383 +1,1383 @@
-// Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al.
-// Avisynth v2.6. Copyright 2006 Klaus Post.
-// Avisynth v2.6. Copyright 2009 Ian Brabham.
-// Avisynth+ project
-// 20160613: new 16 bit planar pixel_type constants go live!
-// 20160725: pixel_type constants 10-12-14 bit + planar RGB + BRG48/64
-// 20161005: Fallback of VideoInfo functions to defaults if no function exists
-// 20170117: global variables for VfW output OPT_xxxx
-// 20170310: new MT mode: MT_SPECIAL_MT
-// 20171103: (test with SIZETMOD define: Videoframe offsets to size_t, may affect x64)
-// 20171207: C++ Standard Conformance (no change for plugin writers)
-// 20180525: AVS_UNUSED define to supress parameter not used warnings
-
-// http://www.avisynth.org
-
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// Linking Avisynth statically or dynamically with other modules is making
-// a combined work based on Avisynth. Thus, the terms and conditions of
-// the GNU General Public License cover the whole combination.
-//
-// As a special exception, the copyright holders of Avisynth give you
-// permission to link Avisynth with independent modules that communicate
-// with Avisynth solely through the interfaces defined in avisynth.h,
-// regardless of the license terms of these independent modules, and to
-// copy and distribute the resulting combined work under terms of your
-// choice, provided that every copy of the combined work is accompanied
-// by a complete copy of the source code of Avisynth (the version of
-// Avisynth used to produce the combined work), being distributed under
-// the terms of the GNU General Public License plus this exception. An
-// independent module is a module which is not derived from or based on
-// Avisynth, such as 3rd-party filters, import and export plugins, or
-// graphical user interfaces.
-
-
-
-
-#ifndef __AVISYNTH_6_H__
-#define __AVISYNTH_6_H__
-
-#include
-#include
-#include
-
-
-enum { AVISYNTH_INTERFACE_VERSION = 6 };
-
-
-/* Compiler-specific crap */
-
-// Tell MSVC to stop precompiling here
-#if defined(_MSC_VER) && !defined(__clang__)
- #pragma hdrstop
-#endif
-
-// Set up debugging macros for MS compilers; for others, step down to the
-// standard interface
-#ifdef _MSC_VER
- #include
-#else
- #undef _RPT0
- #undef _RPT1
- #undef _RPT2
- #undef _RPT3
- #undef _RPT4
- #undef _RPT5
- #define _RPT0(a,b) ((void)0)
- #define _RPT1(a,b,c) ((void)0)
- #define _RPT2(a,b,c,d) ((void)0)
- #define _RPT3(a,b,c,d,e) ((void)0)
- #define _RPT4(a,b,c,d,e,f) ((void)0)
- #define _RPT5(a,b,c,d,e,f,g) ((void)0)
-
- #include
- #undef _ASSERTE
- #undef _ASSERT
- #define _ASSERTE(x) assert(x)
- #define _ASSERT(x) assert(x)
-#endif
-
-
-
-// I had problems with Premiere wanting 1-byte alignment for its structures,
-// so I now set the Avisynth struct alignment explicitly here.
-#pragma pack(push,8)
-
-// The VideoInfo struct holds global information about a clip (i.e.
-// information that does not depend on the frame number). The GetVideoInfo
-// method in IClip returns this struct.
-
-enum {SAMPLE_INT8 = 1<<0,
- SAMPLE_INT16 = 1<<1,
- SAMPLE_INT24 = 1<<2, // Int24 is a very stupid thing to code, but it's supported by some hardware.
- SAMPLE_INT32 = 1<<3,
- SAMPLE_FLOAT = 1<<4};
-
-enum {
- AVS_PLANAR_Y=1<<0,
- AVS_PLANAR_U=1<<1,
- AVS_PLANAR_V=1<<2,
- AVS_PLANAR_ALIGNED=1<<3,
- AVS_PLANAR_Y_ALIGNED= AVS_PLANAR_Y| AVS_PLANAR_ALIGNED, // MEANX : Patched to avoid clash with adm names
- AVS_PLANAR_U_ALIGNED= AVS_PLANAR_U| AVS_PLANAR_ALIGNED,
- AVS_PLANAR_V_ALIGNED= AVS_PLANAR_V| AVS_PLANAR_ALIGNED,
- PLANAR_A=1<<4,
- PLANAR_R=1<<5,
- PLANAR_G=1<<6,
- PLANAR_B=1<<7,
- PLANAR_A_ALIGNED=PLANAR_A| AVS_PLANAR_ALIGNED,
- PLANAR_R_ALIGNED=PLANAR_R| AVS_PLANAR_ALIGNED,
- PLANAR_G_ALIGNED=PLANAR_G| AVS_PLANAR_ALIGNED,
- PLANAR_B_ALIGNED=PLANAR_B| AVS_PLANAR_ALIGNED,
- };
-
-class AvisynthError /* exception */ {
-public:
- const char* const msg;
- AvisynthError(const char* _msg) : msg(_msg) {}
-
-// Ensure AvisynthError cannot be publicly assigned!
-private:
- AvisynthError& operator=(const AvisynthError&);
-}; // end class AvisynthError
-
-
-/* Forward references */
-#if defined(MSVC)
- #define SINGLE_INHERITANCE __single_inheritance
-#else
- #define SINGLE_INHERITANCE
-#endif
-struct SINGLE_INHERITANCE VideoInfo;
-class SINGLE_INHERITANCE VideoFrameBuffer;
-class SINGLE_INHERITANCE VideoFrame;
-class IClip;
-class SINGLE_INHERITANCE PClip;
-class SINGLE_INHERITANCE PVideoFrame;
-class IScriptEnvironment;
-class SINGLE_INHERITANCE AVSValue;
-
-
-/*
- * Avisynth C++ plugin API code function pointers.
- *
- * In order to maintain binary compatibility with
- * future version do not change the order of the
- * existing function pointers. It will be baked
- * into all existing plugins.
- *
- * Add new function pointers to the end of the
- * structure. The linkage macros generate some
- * protection code to ensure newer plugin do not
- * call non-existing functions in an older host.
- */
-
-struct AVS_Linkage {
-
- int Size;
-
-/**********************************************************************/
-
-// struct VideoInfo
- bool (VideoInfo::*HasVideo)() const;
- bool (VideoInfo::*HasAudio)() const;
- bool (VideoInfo::*IsRGB)() const;
- bool (VideoInfo::*IsRGB24)() const;
- bool (VideoInfo::*IsRGB32)() const;
- bool (VideoInfo::*IsYUV)() const;
- bool (VideoInfo::*IsYUY2)() const;
- bool (VideoInfo::*IsYV24)() const;
- bool (VideoInfo::*IsYV16)() const;
- bool (VideoInfo::*IsYV12)() const;
- bool (VideoInfo::*IsYV411)() const;
- bool (VideoInfo::*IsY8)() const;
- bool (VideoInfo::*IsColorSpace)(int c_space) const;
- bool (VideoInfo::*Is)(int property) const;
- bool (VideoInfo::*IsPlanar)() const;
- bool (VideoInfo::*IsFieldBased)() const;
- bool (VideoInfo::*IsParityKnown)() const;
- bool (VideoInfo::*IsBFF)() const;
- bool (VideoInfo::*IsTFF)() const;
- bool (VideoInfo::*IsVPlaneFirst)() const;
- int (VideoInfo::*BytesFromPixels)(int pixels) const;
- int (VideoInfo::*RowSize)(int plane) const;
- int (VideoInfo::*BMPSize)() const;
- __int64 (VideoInfo::*AudioSamplesFromFrames)(int frames) const;
- int (VideoInfo::*FramesFromAudioSamples)(__int64 samples) const;
- __int64 (VideoInfo::*AudioSamplesFromBytes)(__int64 bytes) const;
- __int64 (VideoInfo::*BytesFromAudioSamples)(__int64 samples) const;
- int (VideoInfo::*AudioChannels)() const;
- int (VideoInfo::*SampleType)() const;
- bool (VideoInfo::*IsSampleType)(int testtype) const;
- int (VideoInfo::*SamplesPerSecond)() const;
- int (VideoInfo::*BytesPerAudioSample)() const;
- void (VideoInfo::*SetFieldBased)(bool isfieldbased);
- void (VideoInfo::*Set)(int property);
- void (VideoInfo::*Clear)(int property);
- int (VideoInfo::*GetPlaneWidthSubsampling)(int plane) const;
- int (VideoInfo::*GetPlaneHeightSubsampling)(int plane) const;
- int (VideoInfo::*BitsPerPixel)() const;
- int (VideoInfo::*BytesPerChannelSample)() const;
- void (VideoInfo::*SetFPS)(unsigned numerator, unsigned denominator);
- void (VideoInfo::*MulDivFPS)(unsigned multiplier, unsigned divisor);
- bool (VideoInfo::*IsSameColorspace)(const VideoInfo& vi) const;
-// end struct VideoInfo
-
-/**********************************************************************/
-
-// class VideoFrameBuffer
- const BYTE* (VideoFrameBuffer::*VFBGetReadPtr)() const;
- BYTE* (VideoFrameBuffer::*VFBGetWritePtr)();
-#ifdef SIZETMOD
- size_t (VideoFrameBuffer::*GetDataSize)() const;
-#else
- int (VideoFrameBuffer::*GetDataSize)() const;
-#endif
- int (VideoFrameBuffer::*GetSequenceNumber)() const;
- int (VideoFrameBuffer::*GetRefcount)() const;
-// end class VideoFrameBuffer
-
-/**********************************************************************/
-
-// class VideoFrame
- int (VideoFrame::*GetPitch)(int plane) const;
- int (VideoFrame::*GetRowSize)(int plane) const;
- int (VideoFrame::*GetHeight)(int plane) const;
- VideoFrameBuffer* (VideoFrame::*GetFrameBuffer)() const;
-#ifdef SIZETMOD
- size_t (VideoFrame::*GetOffset)(int plane) const;
-#else
- int (VideoFrame::*GetOffset)(int plane) const;
-#endif
- const BYTE* (VideoFrame::*VFGetReadPtr)(int plane) const;
- bool (VideoFrame::*IsWritable)() const;
- BYTE* (VideoFrame::*VFGetWritePtr)(int plane) const;
- void (VideoFrame::*VideoFrame_DESTRUCTOR)();
-// end class VideoFrame
-
-/**********************************************************************/
-
-// class IClip
- /* nothing */
-// end class IClip
-
-/**********************************************************************/
-
-// class PClip
- void (PClip::*PClip_CONSTRUCTOR0)();
- void (PClip::*PClip_CONSTRUCTOR1)(const PClip& x);
- void (PClip::*PClip_CONSTRUCTOR2)(IClip* x);
- void (PClip::*PClip_OPERATOR_ASSIGN0)(IClip* x);
- void (PClip::*PClip_OPERATOR_ASSIGN1)(const PClip& x);
- void (PClip::*PClip_DESTRUCTOR)();
-// end class PClip
-
-/**********************************************************************/
-
-// class PVideoFrame
- void (PVideoFrame::*PVideoFrame_CONSTRUCTOR0)();
- void (PVideoFrame::*PVideoFrame_CONSTRUCTOR1)(const PVideoFrame& x);
- void (PVideoFrame::*PVideoFrame_CONSTRUCTOR2)(VideoFrame* x);
- void (PVideoFrame::*PVideoFrame_OPERATOR_ASSIGN0)(VideoFrame* x);
- void (PVideoFrame::*PVideoFrame_OPERATOR_ASSIGN1)(const PVideoFrame& x);
- void (PVideoFrame::*PVideoFrame_DESTRUCTOR)();
-// end class PVideoFrame
-
-/**********************************************************************/
-
-// class AVSValue
- void (AVSValue::*AVSValue_CONSTRUCTOR0)();
- void (AVSValue::*AVSValue_CONSTRUCTOR1)(IClip* c);
- void (AVSValue::*AVSValue_CONSTRUCTOR2)(const PClip& c);
- void (AVSValue::*AVSValue_CONSTRUCTOR3)(bool b);
- void (AVSValue::*AVSValue_CONSTRUCTOR4)(int i);
- void (AVSValue::*AVSValue_CONSTRUCTOR5)(float f);
- void (AVSValue::*AVSValue_CONSTRUCTOR6)(double f);
- void (AVSValue::*AVSValue_CONSTRUCTOR7)(const char* s);
- void (AVSValue::*AVSValue_CONSTRUCTOR8)(const AVSValue* a, int size);
- void (AVSValue::*AVSValue_CONSTRUCTOR9)(const AVSValue& v);
- void (AVSValue::*AVSValue_DESTRUCTOR)();
- AVSValue& (AVSValue::*AVSValue_OPERATOR_ASSIGN)(const AVSValue& v);
- const AVSValue& (AVSValue::*AVSValue_OPERATOR_INDEX)(int index) const;
- bool (AVSValue::*Defined)() const;
- bool (AVSValue::*IsClip)() const;
- bool (AVSValue::*IsBool)() const;
- bool (AVSValue::*IsInt)() const;
- bool (AVSValue::*IsFloat)() const;
- bool (AVSValue::*IsString)() const;
- bool (AVSValue::*IsArray)() const;
- PClip (AVSValue::*AsClip)() const;
- bool (AVSValue::*AsBool1)() const;
- int (AVSValue::*AsInt1)() const;
- const char* (AVSValue::*AsString1)() const;
- double (AVSValue::*AsFloat1)() const;
- bool (AVSValue::*AsBool2)(bool def) const;
- int (AVSValue::*AsInt2)(int def) const;
- double (AVSValue::*AsDblDef)(double def) const;
- double (AVSValue::*AsFloat2)(float def) const;
- const char* (AVSValue::*AsString2)(const char* def) const;
- int (AVSValue::*ArraySize)() const;
-// end class AVSValue
-
-/**********************************************************************/
- // Reserve pointer space so that we can keep compatibility with Avs "classic" even if it adds functions on its own
- void (VideoInfo::*reserved[32])();
-/**********************************************************************/
- // AviSynth+ additions
- int (VideoInfo::*NumComponents)() const;
- int (VideoInfo::*ComponentSize)() const;
- int (VideoInfo::*BitsPerComponent)() const;
- bool (VideoInfo::*Is444)() const;
- bool (VideoInfo::*Is422)() const;
- bool (VideoInfo::*Is420)() const;
- bool (VideoInfo::*IsY)() const;
- bool (VideoInfo::*IsRGB48)() const;
- bool (VideoInfo::*IsRGB64)() const;
- bool (VideoInfo::*IsYUVA)() const;
- bool (VideoInfo::*IsPlanarRGB)() const;
- bool (VideoInfo::*IsPlanarRGBA)() const;
- /**********************************************************************/
-};
-
-#ifdef BUILDING_AVSCORE
-/* Macro resolution for code inside Avisynth.dll */
-# define AVS_BakedCode(arg) ;
-# define AVS_LinkCall(arg)
-# define AVS_LinkCallV(arg)
-# define AVS_LinkCallOpt(arg, argOpt) AVSLinkCall(arg)
-# define AVS_LinkCallOptDefault(arg, argDefaultValue) AVSLinkCall(arg())
-# define CALL_MEMBER_FN(object,ptrToMember)
-
-#else
-/* Macro resolution for code inside user plugin */
-# ifdef AVS_LINKAGE_DLLIMPORT
-extern __declspec(dllimport) const AVS_Linkage* const AVS_linkage;
-# else
-extern const AVS_Linkage* AVS_linkage;
-# endif
-
-# ifndef offsetof
-# include
-# endif
-
-# define AVS_BakedCode(arg) { arg ; }
-# define AVS_LinkCall(arg) !AVS_linkage || offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? 0 : (this->*(AVS_linkage->arg))
-# define AVS_LinkCall_Void(arg) !AVS_linkage || offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? (void)0 : (this->*(AVS_linkage->arg))
-# define AVS_LinkCallV(arg) !AVS_linkage || offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? *this : (this->*(AVS_linkage->arg))
-// Helper macros for fallback option when a function does not exists
-#define CALL_MEMBER_FN(object,ptrToMember) ((object)->*(ptrToMember))
-#define AVS_LinkCallOpt(arg, argOpt) !AVS_linkage ? 0 : \
- ( offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? \
- (offsetof(AVS_Linkage, argOpt) >= AVS_linkage->Size ? 0 : CALL_MEMBER_FN(this, AVS_linkage->argOpt)() ) : \
- CALL_MEMBER_FN(this, AVS_linkage->arg)() )
-// AVS_LinkCallOptDefault puts automatically () only after arg
-# define AVS_LinkCallOptDefault(arg, argDefaultValue) !AVS_linkage || offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? (argDefaultValue) : ((this->*(AVS_linkage->arg))())
-
-#endif
-
-struct VideoInfo {
- int width, height; // width=0 means no video
- unsigned fps_numerator, fps_denominator;
- int num_frames;
- // This is more extensible than previous versions. More properties can be added seeminglesly.
-
- // Colorspace properties.
-/*
-
-Planar match mask 1111.1000.0000.0111.0000.0111.0000.0111
-Planar signature 10xx.1000.0000.00xx.0000.00xx.00xx.00xx ?
-Planar signature 10xx.1000.0000.0xxx.0000.00xx.000x.x0xx ? *new
-Planar filter mask 1111.1111.1111.1111.1111.1111.1110.0111 (typo from old header fixed)
-
-pixel_type mapping
-==================
-pixel_type bit-map PIYB.Z000.0???.0SSS.0000.0???.????.????
- planar YUV CCC HHH.000u.vWWW
- planar RGB(A) CCC AR
- nonplanar CCC 000.00wx xyAR
-Legend
-======
-Planar YUV:
- Code Bits Remark
- W 0-2 Planar Width Subsampling bits
- Use (X+1) & 3 for GetPlaneWidthSubsampling
- 000 => 1 YV12, YV16, YUV420, YUV422
- 001 => 2 YV411, YUV9
- 010 => reserved
- 011 => 0 YV24, YUV444, RGBP
- 1xx => reserved
- v 3 VPlaneFirst YV12, YV16, YV24, YV411, YUV9
- u 4 UPlaneFirst I420
- H 7-9 Planar Height Subsampling bits
- Use ((X>>8)+1) & 3 for GetPlaneHeightSubsampling
- 000 => 1 YV12, YUV420
- 001 => 2 YUV9
- 010 => reserved
- 011 => 0 YV16, YV24, YV411, YUV422, YUV444, RGBP
- 1xx => reserved
-
-Planar RGB
- Code Bits Remark
- R 0 BGR, (with SSS bits for 8/16 bit/sample or float)
- A 1 BGRA, (with SSS bits for 8/16 bit/sample or float)
-
-
-Not Planar, Interleaved (I flag)
-Code Bits Remark
- R 0 BGR24, and BGRx in future (with SSS bits for 8/16 bit/sample or float)
- A 1 BGR32, and BGRAx in future (with SSS bits for 8/16 bit/sample or float)
- y 2 YUY2
- x 3-4 reserved
- w 5 Raw32
-
-General
-Code Bits Remark
- S 16-18 Sample resolution bits
- 000 => 8
- 001 => 16
- 010 => 32 (float)
- 011,100 => reserved
- 101 => 10 bits
- 110 => 12 bits
- 111 => 14 bits
-for packed RGB(A): only 8 and 16 bits are valid
-
-Other YV12 specific (not used?)
- C 20-22 Chroma Placement values 0-4 see CS_xxx_CHROMA_PLACEMENT
-
-Color family and layout
- Packed Planar Planar Planar
-Code Bits Remark RGB/RGBA YUV YUY2 Y_Grey RGB/RGBA YUVA
- R 0 1/0 - 0 - 1/0 -
- A 1 0/1 - 0 - 0/1 -
- y 2 - - 1 - 0 -
- Z 27 YUVA 0 0 0 0 1 1
- B 28 BGR 1 0 0 0 1* 0
- Y 29 YUV 0 1 1 1 0 0
- I 30 Interleaved 1 0 1 1 0 0
- P 31 Planar 0 1 0 1 1 1
-* Planar RGB plane order: G,B,R(,A)
-
-*/
-enum {
- CS_YUVA = 1<<27,
- CS_BGR = 1<<28,
- CS_YUV = 1<<29,
- CS_INTERLEAVED = 1<<30,
- CS_PLANAR = 1<<31,
-
- CS_Shift_Sub_Width = 0,
- CS_Shift_Sub_Height = 8,
- CS_Shift_Sample_Bits = 16,
-
- CS_Sub_Width_Mask = 7 << CS_Shift_Sub_Width,
- CS_Sub_Width_1 = 3 << CS_Shift_Sub_Width, // YV24
- CS_Sub_Width_2 = 0 << CS_Shift_Sub_Width, // YV12, I420, YV16
- CS_Sub_Width_4 = 1 << CS_Shift_Sub_Width, // YUV9, YV411
-
- CS_VPlaneFirst = 1 << 3, // YV12, YV16, YV24, YV411, YUV9
- CS_UPlaneFirst = 1 << 4, // I420
-
- CS_Sub_Height_Mask = 7 << CS_Shift_Sub_Height,
- CS_Sub_Height_1 = 3 << CS_Shift_Sub_Height, // YV16, YV24, YV411
- CS_Sub_Height_2 = 0 << CS_Shift_Sub_Height, // YV12, I420
- CS_Sub_Height_4 = 1 << CS_Shift_Sub_Height, // YUV9
-
- CS_Sample_Bits_Mask = 7 << CS_Shift_Sample_Bits,
- CS_Sample_Bits_8 = 0 << CS_Shift_Sample_Bits,
- CS_Sample_Bits_10 = 5 << CS_Shift_Sample_Bits,
- CS_Sample_Bits_12 = 6 << CS_Shift_Sample_Bits,
- CS_Sample_Bits_14 = 7 << CS_Shift_Sample_Bits,
- CS_Sample_Bits_16 = 1 << CS_Shift_Sample_Bits,
- CS_Sample_Bits_32 = 2 << CS_Shift_Sample_Bits,
-
- CS_PLANAR_MASK = CS_PLANAR | CS_INTERLEAVED | CS_YUV | CS_BGR | CS_YUVA | CS_Sample_Bits_Mask
- | CS_Sub_Height_Mask | CS_Sub_Width_Mask,
- CS_PLANAR_FILTER = ~( CS_VPlaneFirst | CS_UPlaneFirst ),
-
- CS_RGB_TYPE = 1 << 0,
- CS_RGBA_TYPE = 1 << 1,
-
- // Specific colorformats
- CS_UNKNOWN = 0,
-
- CS_BGR24 = CS_RGB_TYPE | CS_BGR | CS_INTERLEAVED,
- CS_BGR32 = CS_RGBA_TYPE | CS_BGR | CS_INTERLEAVED,
- CS_YUY2 = 1<<2 | CS_YUV | CS_INTERLEAVED,
- // CS_YV12 = 1<<3 Reserved
- // CS_I420 = 1<<4 Reserved
- CS_RAW32 = 1<<5 | CS_INTERLEAVED,
-
- // YV12 must be 0xA000008 2.5 Baked API will see all new planar as YV12
- // I420 must be 0xA000010
-
- CS_GENERIC_YUV420 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2, // 4:2:0 planar
- CS_GENERIC_YUV422 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_2, // 4:2:2 planar
- CS_GENERIC_YUV444 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_1, // 4:4:4 planar
- CS_GENERIC_Y = CS_PLANAR | CS_INTERLEAVED | CS_YUV, // Y only (4:0:0)
- CS_GENERIC_RGBP = CS_PLANAR | CS_BGR | CS_RGB_TYPE, // planar RGB. Though name is RGB but plane order G,B,R
- CS_GENERIC_RGBAP = CS_PLANAR | CS_BGR | CS_RGBA_TYPE, // planar RGBA
- CS_GENERIC_YUVA420 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2, // 4:2:0:A planar
- CS_GENERIC_YUVA422 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_2, // 4:2:2:A planar
- CS_GENERIC_YUVA444 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_1, // 4:4:4:A planar
-
- CS_YV24 = CS_GENERIC_YUV444 | CS_Sample_Bits_8, // YVU 4:4:4 planar
- CS_YV16 = CS_GENERIC_YUV422 | CS_Sample_Bits_8, // YVU 4:2:2 planar
- CS_YV12 = CS_GENERIC_YUV420 | CS_Sample_Bits_8, // YVU 4:2:0 planar
- CS_I420 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_UPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2, // YUV 4:2:0 planar
- CS_IYUV = CS_I420,
- CS_YUV9 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_4 | CS_Sub_Width_4, // YUV 4:1:0 planar
- CS_YV411 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_4, // YUV 4:1:1 planar
-
- CS_Y8 = CS_GENERIC_Y | CS_Sample_Bits_8, // Y 4:0:0 planar
-
- //-------------------------
- // AVS16: new planar constants go live! Experimental PF 160613
- // 10-12-14 bit + planar RGB + BRG48/64 160725
-
- CS_YUV444P10 = CS_GENERIC_YUV444 | CS_Sample_Bits_10, // YUV 4:4:4 10bit samples
- CS_YUV422P10 = CS_GENERIC_YUV422 | CS_Sample_Bits_10, // YUV 4:2:2 10bit samples
- CS_YUV420P10 = CS_GENERIC_YUV420 | CS_Sample_Bits_10, // YUV 4:2:0 10bit samples
- CS_Y10 = CS_GENERIC_Y | CS_Sample_Bits_10, // Y 4:0:0 10bit samples
-
- CS_YUV444P12 = CS_GENERIC_YUV444 | CS_Sample_Bits_12, // YUV 4:4:4 12bit samples
- CS_YUV422P12 = CS_GENERIC_YUV422 | CS_Sample_Bits_12, // YUV 4:2:2 12bit samples
- CS_YUV420P12 = CS_GENERIC_YUV420 | CS_Sample_Bits_12, // YUV 4:2:0 12bit samples
- CS_Y12 = CS_GENERIC_Y | CS_Sample_Bits_12, // Y 4:0:0 12bit samples
-
- CS_YUV444P14 = CS_GENERIC_YUV444 | CS_Sample_Bits_14, // YUV 4:4:4 14bit samples
- CS_YUV422P14 = CS_GENERIC_YUV422 | CS_Sample_Bits_14, // YUV 4:2:2 14bit samples
- CS_YUV420P14 = CS_GENERIC_YUV420 | CS_Sample_Bits_14, // YUV 4:2:0 14bit samples
- CS_Y14 = CS_GENERIC_Y | CS_Sample_Bits_14, // Y 4:0:0 14bit samples
-
- CS_YUV444P16 = CS_GENERIC_YUV444 | CS_Sample_Bits_16, // YUV 4:4:4 16bit samples
- CS_YUV422P16 = CS_GENERIC_YUV422 | CS_Sample_Bits_16, // YUV 4:2:2 16bit samples
- CS_YUV420P16 = CS_GENERIC_YUV420 | CS_Sample_Bits_16, // YUV 4:2:0 16bit samples
- CS_Y16 = CS_GENERIC_Y | CS_Sample_Bits_16, // Y 4:0:0 16bit samples
-
- // 32 bit samples (float)
- CS_YUV444PS = CS_GENERIC_YUV444 | CS_Sample_Bits_32, // YUV 4:4:4 32bit samples
- CS_YUV422PS = CS_GENERIC_YUV422 | CS_Sample_Bits_32, // YUV 4:2:2 32bit samples
- CS_YUV420PS = CS_GENERIC_YUV420 | CS_Sample_Bits_32, // YUV 4:2:0 32bit samples
- CS_Y32 = CS_GENERIC_Y | CS_Sample_Bits_32, // Y 4:0:0 32bit samples
-
- // RGB packed
- CS_BGR48 = CS_RGB_TYPE | CS_BGR | CS_INTERLEAVED | CS_Sample_Bits_16, // BGR 3x16 bit
- CS_BGR64 = CS_RGBA_TYPE | CS_BGR | CS_INTERLEAVED | CS_Sample_Bits_16, // BGR 4x16 bit
- // no packed 32 bit (float) support for these legacy types
-
- // RGB planar
- CS_RGBP = CS_GENERIC_RGBP | CS_Sample_Bits_8, // Planar RGB 8 bit samples
- CS_RGBP10 = CS_GENERIC_RGBP | CS_Sample_Bits_10, // Planar RGB 10bit samples
- CS_RGBP12 = CS_GENERIC_RGBP | CS_Sample_Bits_12, // Planar RGB 12bit samples
- CS_RGBP14 = CS_GENERIC_RGBP | CS_Sample_Bits_14, // Planar RGB 14bit samples
- CS_RGBP16 = CS_GENERIC_RGBP | CS_Sample_Bits_16, // Planar RGB 16bit samples
- CS_RGBPS = CS_GENERIC_RGBP | CS_Sample_Bits_32, // Planar RGB 32bit samples
-
- // RGBA planar
- CS_RGBAP = CS_GENERIC_RGBAP | CS_Sample_Bits_8, // Planar RGBA 8 bit samples
- CS_RGBAP10 = CS_GENERIC_RGBAP | CS_Sample_Bits_10, // Planar RGBA 10bit samples
- CS_RGBAP12 = CS_GENERIC_RGBAP | CS_Sample_Bits_12, // Planar RGBA 12bit samples
- CS_RGBAP14 = CS_GENERIC_RGBAP | CS_Sample_Bits_14, // Planar RGBA 14bit samples
- CS_RGBAP16 = CS_GENERIC_RGBAP | CS_Sample_Bits_16, // Planar RGBA 16bit samples
- CS_RGBAPS = CS_GENERIC_RGBAP | CS_Sample_Bits_32, // Planar RGBA 32bit samples
-
- // Planar YUVA
- CS_YUVA444 = CS_GENERIC_YUVA444 | CS_Sample_Bits_8, // YUVA 4:4:4 8bit samples
- CS_YUVA422 = CS_GENERIC_YUVA422 | CS_Sample_Bits_8, // YUVA 4:2:2 8bit samples
- CS_YUVA420 = CS_GENERIC_YUVA420 | CS_Sample_Bits_8, // YUVA 4:2:0 8bit samples
-
- CS_YUVA444P10 = CS_GENERIC_YUVA444 | CS_Sample_Bits_10, // YUVA 4:4:4 10bit samples
- CS_YUVA422P10 = CS_GENERIC_YUVA422 | CS_Sample_Bits_10, // YUVA 4:2:2 10bit samples
- CS_YUVA420P10 = CS_GENERIC_YUVA420 | CS_Sample_Bits_10, // YUVA 4:2:0 10bit samples
-
- CS_YUVA444P12 = CS_GENERIC_YUVA444 | CS_Sample_Bits_12, // YUVA 4:4:4 12bit samples
- CS_YUVA422P12 = CS_GENERIC_YUVA422 | CS_Sample_Bits_12, // YUVA 4:2:2 12bit samples
- CS_YUVA420P12 = CS_GENERIC_YUVA420 | CS_Sample_Bits_12, // YUVA 4:2:0 12bit samples
-
- CS_YUVA444P14 = CS_GENERIC_YUVA444 | CS_Sample_Bits_14, // YUVA 4:4:4 14bit samples
- CS_YUVA422P14 = CS_GENERIC_YUVA422 | CS_Sample_Bits_14, // YUVA 4:2:2 14bit samples
- CS_YUVA420P14 = CS_GENERIC_YUVA420 | CS_Sample_Bits_14, // YUVA 4:2:0 14bit samples
-
- CS_YUVA444P16 = CS_GENERIC_YUVA444 | CS_Sample_Bits_16, // YUVA 4:4:4 16bit samples
- CS_YUVA422P16 = CS_GENERIC_YUVA422 | CS_Sample_Bits_16, // YUVA 4:2:2 16bit samples
- CS_YUVA420P16 = CS_GENERIC_YUVA420 | CS_Sample_Bits_16, // YUVA 4:2:0 16bit samples
-
- CS_YUVA444PS = CS_GENERIC_YUVA444 | CS_Sample_Bits_32, // YUVA 4:4:4 32bit samples
- CS_YUVA422PS = CS_GENERIC_YUVA422 | CS_Sample_Bits_32, // YUVA 4:2:2 32bit samples
- CS_YUVA420PS = CS_GENERIC_YUVA420 | CS_Sample_Bits_32, // YUVA 4:2:0 32bit samples
-
- };
-
- int pixel_type; // changed to int as of 2.5
-
-
- int audio_samples_per_second; // 0 means no audio
- int sample_type; // as of 2.5
- __int64 num_audio_samples; // changed as of 2.5
- int nchannels; // as of 2.5
-
- // Imagetype properties
-
- int image_type;
-
- enum {
- IT_BFF = 1<<0,
- IT_TFF = 1<<1,
- IT_FIELDBASED = 1<<2
- };
-
- // Chroma placement bits 20 -> 23 ::FIXME:: Really want a Class to support this
- enum {
- CS_UNKNOWN_CHROMA_PLACEMENT = 0 << 20,
- CS_MPEG1_CHROMA_PLACEMENT = 1 << 20,
- CS_MPEG2_CHROMA_PLACEMENT = 2 << 20,
- CS_YUY2_CHROMA_PLACEMENT = 3 << 20,
- CS_TOPLEFT_CHROMA_PLACEMENT = 4 << 20
- };
-
- // useful functions of the above
- bool HasVideo() const AVS_BakedCode(return AVS_LinkCall(HasVideo)())
- bool HasAudio() const AVS_BakedCode(return AVS_LinkCall(HasAudio)())
- bool IsRGB() const AVS_BakedCode(return AVS_LinkCall(IsRGB)())
- bool IsRGB24() const AVS_BakedCode(return AVS_LinkCall(IsRGB24)())
- bool IsRGB32() const AVS_BakedCode(return AVS_LinkCall(IsRGB32)())
- bool IsYUV() const AVS_BakedCode(return AVS_LinkCall(IsYUV)())
- bool IsYUY2() const AVS_BakedCode(return AVS_LinkCall(IsYUY2)())
-
- bool IsYV24() const AVS_BakedCode(return AVS_LinkCall(IsYV24)())
- bool IsYV16() const AVS_BakedCode(return AVS_LinkCall(IsYV16)())
- bool IsYV12() const AVS_BakedCode(return AVS_LinkCall(IsYV12)())
- bool IsYV411() const AVS_BakedCode(return AVS_LinkCall(IsYV411)())
- //bool IsYUV9() const;
- bool IsY8() const AVS_BakedCode(return AVS_LinkCall(IsY8)())
-
- bool IsColorSpace(int c_space) const AVS_BakedCode(return AVS_LinkCall(IsColorSpace)(c_space))
-
- bool Is(int property) const AVS_BakedCode(return AVS_LinkCall(Is)(property))
- bool IsPlanar() const AVS_BakedCode(return AVS_LinkCall(IsPlanar)())
- bool IsFieldBased() const AVS_BakedCode(return AVS_LinkCall(IsFieldBased)())
- bool IsParityKnown() const AVS_BakedCode(return AVS_LinkCall(IsParityKnown)())
- bool IsBFF() const AVS_BakedCode(return AVS_LinkCall(IsBFF)())
- bool IsTFF() const AVS_BakedCode(return AVS_LinkCall(IsTFF)())
-
- bool IsVPlaneFirst() const AVS_BakedCode(return AVS_LinkCall(IsVPlaneFirst)()) // Don't use this
- // Will not work on planar images, but will return only luma planes
- int BytesFromPixels(int pixels) const AVS_BakedCode(return AVS_LinkCall(BytesFromPixels)(pixels))
- int RowSize(int plane = 0) const AVS_BakedCode(return AVS_LinkCall(RowSize)(plane))
- int BMPSize() const AVS_BakedCode(return AVS_LinkCall(BMPSize)())
-
- __int64 AudioSamplesFromFrames(int frames) const AVS_BakedCode(return AVS_LinkCall(AudioSamplesFromFrames)(frames))
- int FramesFromAudioSamples(__int64 samples) const AVS_BakedCode(return AVS_LinkCall(FramesFromAudioSamples)(samples))
- __int64 AudioSamplesFromBytes(__int64 bytes) const AVS_BakedCode(return AVS_LinkCall(AudioSamplesFromBytes)(bytes))
- __int64 BytesFromAudioSamples(__int64 samples) const AVS_BakedCode(return AVS_LinkCall(BytesFromAudioSamples)(samples))
- int AudioChannels() const AVS_BakedCode(return AVS_LinkCall(AudioChannels)())
- int SampleType() const AVS_BakedCode(return AVS_LinkCall(SampleType)())
- bool IsSampleType(int testtype) const AVS_BakedCode(return AVS_LinkCall(IsSampleType)(testtype))
- int SamplesPerSecond() const AVS_BakedCode(return AVS_LinkCall(SamplesPerSecond)())
- int BytesPerAudioSample() const AVS_BakedCode(return AVS_LinkCall(BytesPerAudioSample)())
- void SetFieldBased(bool isfieldbased) AVS_BakedCode(AVS_LinkCall_Void(SetFieldBased)(isfieldbased))
- void Set(int property) AVS_BakedCode(AVS_LinkCall_Void(Set)(property))
- void Clear(int property) AVS_BakedCode(AVS_LinkCall_Void(Clear)(property))
- // Subsampling in bitshifts!
- int GetPlaneWidthSubsampling(int plane) const AVS_BakedCode(return AVS_LinkCall(GetPlaneWidthSubsampling)(plane))
- int GetPlaneHeightSubsampling(int plane) const AVS_BakedCode(return AVS_LinkCall(GetPlaneHeightSubsampling)(plane))
- int BitsPerPixel() const AVS_BakedCode(return AVS_LinkCall(BitsPerPixel)())
-
- int BytesPerChannelSample() const AVS_BakedCode(return AVS_LinkCall(BytesPerChannelSample)())
-
- // useful mutator
- void SetFPS(unsigned numerator, unsigned denominator) AVS_BakedCode(AVS_LinkCall_Void(SetFPS)(numerator, denominator))
-
- // Range protected multiply-divide of FPS
- void MulDivFPS(unsigned multiplier, unsigned divisor) AVS_BakedCode(AVS_LinkCall_Void(MulDivFPS)(multiplier, divisor))
-
- // Test for same colorspace
- bool IsSameColorspace(const VideoInfo& vi) const AVS_BakedCode(return AVS_LinkCall(IsSameColorspace)(vi))
-
- // AVS+ extensions
- // 20161005:
- // Mapping of AVS+ extensions to classic 2.6 functions.
- // In order to use these extended AVS+ functions for plugins that should work
- // either with AVS+ or with Classic (8 bit) Avs 2.6 ans earlier AVS+ versions, there is an
- // automatic fallback mechanism.
- // From AVS+'s point of view these are not "baked" codes, the primary functions should exist.
- // Examples:
- // Is444() is mapped to IsYV24() for classic AVS2.6
- // ComponentSize() returns constant 1 (1 bytes per pixel component)
- // BitsPerComponent() returns constant 8 (Classic AVS2.6 is 8 bit only)
-
- // Returns the number of color channels or planes in a frame
- int NumComponents() const AVS_BakedCode(return AVS_LinkCallOptDefault(NumComponents, (((AVS_LinkCall(IsYUV)()) && !(AVS_LinkCall(IsY8)())) ? 3 : AVS_LinkCall(BytesFromPixels)(1)) ) )
-
- // Returns the size in bytes of a single component of a pixel
- int ComponentSize() const AVS_BakedCode(return AVS_LinkCallOptDefault(ComponentSize, 1))
-
- // Returns the bit depth of a single component of a pixel
- int BitsPerComponent() const AVS_BakedCode(return AVS_LinkCallOptDefault(BitsPerComponent, 8))
-
- // like IsYV24, but bit-depth independent also for YUVA
- bool Is444() const AVS_BakedCode(return AVS_LinkCallOpt(Is444, IsYV24) )
-
- // like IsYV16, but bit-depth independent also for YUVA
- bool Is422() const AVS_BakedCode(return AVS_LinkCallOpt(Is422, IsYV16) )
-
- // like IsYV12, but bit-depth independent also for YUVA
- bool Is420() const AVS_BakedCode( return AVS_LinkCallOpt(Is420, IsYV12) )
-
- // like IsY8, but bit-depth independent
- bool IsY() const AVS_BakedCode( return AVS_LinkCallOpt(IsY, IsY8) )
-
- // like IsRGB24 for 16 bit samples
- bool IsRGB48() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsRGB48, false) )
-
- // like IsRGB32 for 16 bit samples
- bool IsRGB64() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsRGB64, false) )
-
- // YUVA?
- bool IsYUVA() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsYUVA, false) )
-
- // Planar RGB?
- bool IsPlanarRGB() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsPlanarRGB, false) )
-
- // Planar RGBA?
- bool IsPlanarRGBA() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsPlanarRGBA, false) )
-
-}; // end struct VideoInfo
-
-
-
-
-// VideoFrameBuffer holds information about a memory block which is used
-// for video data. For efficiency, instances of this class are not deleted
-// when the refcount reaches zero; instead they're stored in a linked list
-// to be reused. The instances are deleted when the corresponding AVS
-// file is closed.
-
-class VideoFrameBuffer {
- BYTE* data;
-#ifdef SIZETMOD
- size_t data_size;
-#else
- int data_size;
-#endif
- // sequence_number is incremented every time the buffer is changed, so
- // that stale views can tell they're no longer valid.
- volatile long sequence_number;
-
- friend class VideoFrame;
- friend class Cache;
- friend class ScriptEnvironment;
- volatile long refcount;
-
-protected:
-#ifdef SIZETMOD
- VideoFrameBuffer(size_t size);
-#else
- VideoFrameBuffer(int size);
-#endif
- VideoFrameBuffer();
- ~VideoFrameBuffer();
-
-public:
- const BYTE* GetReadPtr() const AVS_BakedCode( return AVS_LinkCall(VFBGetReadPtr)() )
- BYTE* GetWritePtr() AVS_BakedCode( return AVS_LinkCall(VFBGetWritePtr)() )
-#ifdef SIZETMOD
- size_t GetDataSize() const AVS_BakedCode(return AVS_LinkCall(GetDataSize)())
-#else
- int GetDataSize() const AVS_BakedCode( return AVS_LinkCall(GetDataSize)() )
-#endif
- int GetSequenceNumber() const AVS_BakedCode( return AVS_LinkCall(GetSequenceNumber)() )
- int GetRefcount() const AVS_BakedCode( return AVS_LinkCall(GetRefcount)() )
-
-// Ensure VideoFrameBuffer cannot be publicly assigned
-private:
- VideoFrameBuffer& operator=(const VideoFrameBuffer&);
-
-}; // end class VideoFrameBuffer
-
-
-// VideoFrame holds a "window" into a VideoFrameBuffer. Operator new
-// is overloaded to recycle class instances.
-
-class VideoFrame {
- volatile long refcount;
- VideoFrameBuffer* vfb;
-
- // Due to technical reasons these members are not const, but should be treated as such.
- // That means do not modify them once the class has been constructed.
-#ifdef SIZETMOD
- size_t offset;
-#else
- int offset;
-#endif
- int pitch, row_size, height;
-#ifdef SIZETMOD
- size_t offsetU, offsetV; // U&V offsets are from top of picture.
-#else
- int offsetU, offsetV; // U&V offsets are from top of picture.
-#endif
- int pitchUV, row_sizeUV, heightUV; // for Planar RGB offsetU, offsetV is for the 2nd and 3rd Plane.
- // for Planar RGB pitchUV and row_sizeUV = 0, because when no VideoInfo (MakeWriteable)
- // the decision on existance of UV is checked by zero pitch
- // AVS+ extension, does not break plugins if appended here
-#ifdef SIZETMOD
- size_t offsetA;
-#else
- int offsetA;
-#endif
- int pitchA, row_sizeA; // 4th alpha plane support, pitch and row_size is 0 is none
-
- friend class PVideoFrame;
- void AddRef();
- void Release();
-
- friend class ScriptEnvironment;
- friend class Cache;
-
-#ifdef SIZETMOD
- VideoFrame(VideoFrameBuffer* _vfb, size_t _offset, int _pitch, int _row_size, int _height);
- VideoFrame(VideoFrameBuffer* _vfb, size_t _offset, int _pitch, int _row_size, int _height, size_t _offsetU, size_t _offsetV, int _pitchUV, int _row_sizeUV, int _heightUV);
- // for Alpha
- VideoFrame(VideoFrameBuffer* _vfb, size_t _offset, int _pitch, int _row_size, int _height, size_t _offsetU, size_t _offsetV, int _pitchUV, int _row_sizeUV, int _heightUV, size_t _offsetA);
-#else
- VideoFrame(VideoFrameBuffer* _vfb, int _offset, int _pitch, int _row_size, int _height);
- VideoFrame(VideoFrameBuffer* _vfb, int _offset, int _pitch, int _row_size, int _height, int _offsetU, int _offsetV, int _pitchUV, int _row_sizeUV, int _heightUV);
- // for Alpha
- VideoFrame(VideoFrameBuffer* _vfb, int _offset, int _pitch, int _row_size, int _height, int _offsetU, int _offsetV, int _pitchUV, int _row_sizeUV, int _heightUV, int _offsetA);
-#endif
-
- void* operator new(size_t size);
-// TESTME: OFFSET U/V may be switched to what could be expected from AVI standard!
-public:
- int GetPitch(int plane=0) const AVS_BakedCode( return AVS_LinkCall(GetPitch)(plane) )
- int GetRowSize(int plane=0) const AVS_BakedCode( return AVS_LinkCall(GetRowSize)(plane) )
- int GetHeight(int plane=0) const AVS_BakedCode( return AVS_LinkCall(GetHeight)(plane) )
-
- // generally you shouldn't use these three
- VideoFrameBuffer* GetFrameBuffer() const AVS_BakedCode( return AVS_LinkCall(GetFrameBuffer)() )
-#ifdef SIZETMOD
- size_t GetOffset(int plane = 0) const AVS_BakedCode(return AVS_LinkCall(GetOffset)(plane))
-#else
- int GetOffset(int plane=0) const AVS_BakedCode( return AVS_LinkCall(GetOffset)(plane) )
-#endif
-
- // in plugins use env->SubFrame() -- because implementation code is only available inside avisynth.dll. Doh!
- VideoFrame* Subframe(int rel_offset, int new_pitch, int new_row_size, int new_height) const;
- VideoFrame* Subframe(int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int pitchUV) const;
- // for Alpha
- VideoFrame* Subframe(int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int pitchUV, int rel_offsetA) const;
-
- const BYTE* GetReadPtr(int plane=0) const AVS_BakedCode( return AVS_LinkCall(VFGetReadPtr)(plane) )
- bool IsWritable() const AVS_BakedCode( return AVS_LinkCall(IsWritable)() )
- BYTE* GetWritePtr(int plane=0) const AVS_BakedCode( return AVS_LinkCall(VFGetWritePtr)(plane) )
-
- ~VideoFrame() AVS_BakedCode( AVS_LinkCall_Void(VideoFrame_DESTRUCTOR)() )
-#ifdef BUILDING_AVSCORE
-public:
- void DESTRUCTOR(); /* Damn compiler won't allow taking the address of reserved constructs, make a dummy interlude */
-#endif
-
-// Ensure VideoFrame cannot be publicly assigned
-private:
- VideoFrame& operator=(const VideoFrame&);
-
-}; // end class VideoFrame
-
-enum CachePolicyHint {
- // Values 0 to 5 are reserved for old 2.5 plugins
- // do not use them in new plugins
-
- // New 2.6 explicitly defined cache hints.
- CACHE_NOTHING=10, // Do not cache video.
- CACHE_WINDOW=11, // Hard protect upto X frames within a range of X from the current frame N.
- CACHE_GENERIC=12, // LRU cache upto X frames.
- CACHE_FORCE_GENERIC=13, // LRU cache upto X frames, override any previous CACHE_WINDOW.
-
- CACHE_GET_POLICY=30, // Get the current policy.
- CACHE_GET_WINDOW=31, // Get the current window h_span.
- CACHE_GET_RANGE=32, // Get the current generic frame range.
-
- CACHE_AUDIO=50, // Explicitly cache audio, X byte cache.
- CACHE_AUDIO_NOTHING=51, // Explicitly do not cache audio.
- CACHE_AUDIO_NONE=52, // Audio cache off (auto mode), X byte intial cache.
- CACHE_AUDIO_AUTO=53, // Audio cache on (auto mode), X byte intial cache.
-
- CACHE_GET_AUDIO_POLICY=70, // Get the current audio policy.
- CACHE_GET_AUDIO_SIZE=71, // Get the current audio cache size.
-
- CACHE_PREFETCH_FRAME=100, // Queue request to prefetch frame N.
- CACHE_PREFETCH_GO=101, // Action video prefetches.
-
- CACHE_PREFETCH_AUDIO_BEGIN=120, // Begin queue request transaction to prefetch audio (take critical section).
- CACHE_PREFETCH_AUDIO_STARTLO=121, // Set low 32 bits of start.
- CACHE_PREFETCH_AUDIO_STARTHI=122, // Set high 32 bits of start.
- CACHE_PREFETCH_AUDIO_COUNT=123, // Set low 32 bits of length.
- CACHE_PREFETCH_AUDIO_COMMIT=124, // Enqueue request transaction to prefetch audio (release critical section).
- CACHE_PREFETCH_AUDIO_GO=125, // Action audio prefetches.
-
- CACHE_GETCHILD_CACHE_MODE=200, // Cache ask Child for desired video cache mode.
- CACHE_GETCHILD_CACHE_SIZE=201, // Cache ask Child for desired video cache size.
- CACHE_GETCHILD_AUDIO_MODE=202, // Cache ask Child for desired audio cache mode.
- CACHE_GETCHILD_AUDIO_SIZE=203, // Cache ask Child for desired audio cache size.
-
- CACHE_GETCHILD_COST=220, // Cache ask Child for estimated processing cost.
- CACHE_COST_ZERO=221, // Child response of zero cost (ptr arithmetic only).
- CACHE_COST_UNIT=222, // Child response of unit cost (less than or equal 1 full frame blit).
- CACHE_COST_LOW=223, // Child response of light cost. (Fast)
- CACHE_COST_MED=224, // Child response of medium cost. (Real time)
- CACHE_COST_HI=225, // Child response of heavy cost. (Slow)
-
- CACHE_GETCHILD_THREAD_MODE=240, // Cache ask Child for thread safetyness.
- CACHE_THREAD_UNSAFE=241, // Only 1 thread allowed for all instances. 2.5 filters default!
- CACHE_THREAD_CLASS=242, // Only 1 thread allowed for each instance. 2.6 filters default!
- CACHE_THREAD_SAFE=243, // Allow all threads in any instance.
- CACHE_THREAD_OWN=244, // Safe but limit to 1 thread, internally threaded.
-
- CACHE_GETCHILD_ACCESS_COST=260, // Cache ask Child for preferred access pattern.
- CACHE_ACCESS_RAND=261, // Filter is access order agnostic.
- CACHE_ACCESS_SEQ0=262, // Filter prefers sequential access (low cost)
- CACHE_ACCESS_SEQ1=263, // Filter needs sequential access (high cost)
-
- CACHE_AVSPLUS_CONSTANTS = 500, // Smaller values are reserved for classic Avisynth
-
- CACHE_DONT_CACHE_ME, // Filters that don't need caching (eg. trim, cache etc.) should return 1 to this request
- CACHE_SET_MIN_CAPACITY,
- CACHE_SET_MAX_CAPACITY,
- CACHE_GET_MIN_CAPACITY,
- CACHE_GET_MAX_CAPACITY,
- CACHE_GET_SIZE,
- CACHE_GET_REQUESTED_CAP,
- CACHE_GET_CAPACITY,
- CACHE_GET_MTMODE,
-
- CACHE_IS_CACHE_REQ,
- CACHE_IS_CACHE_ANS,
- CACHE_IS_MTGUARD_REQ,
- CACHE_IS_MTGUARD_ANS,
-
- CACHE_USER_CONSTANTS = 1000 // Smaller values are reserved for the core
-
-};
-
-// Base class for all filters.
-class IClip {
- friend class PClip;
- friend class AVSValue;
- volatile long refcnt;
- void AddRef();
- void Release();
-public:
- IClip() : refcnt(0) {}
- virtual int __stdcall GetVersion() { return AVISYNTH_INTERFACE_VERSION; }
- virtual PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) = 0;
- virtual bool __stdcall GetParity(int n) = 0; // return field parity if field_based, else parity of first field in frame
- virtual void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) = 0; // start and count are in samples
- /* Need to check GetVersion first, pre v5 will return random crap from EAX reg. */
- virtual int __stdcall SetCacheHints(int cachehints,int frame_range) = 0 ; // We do not pass cache requests upwards, only to the next filter.
- virtual const VideoInfo& __stdcall GetVideoInfo() = 0;
- virtual AVSC_CC ~IClip() {}
-}; // end class IClip
-
-
-// smart pointer to IClip
-class PClip {
-
- IClip* p;
-
- IClip* GetPointerWithAddRef() const;
- friend class AVSValue;
- friend class VideoFrame;
-
- void Init(IClip* x);
- void Set(IClip* x);
-
-public:
- PClip() AVS_BakedCode( AVS_LinkCall_Void(PClip_CONSTRUCTOR0)() )
- PClip(const PClip& x) AVS_BakedCode( AVS_LinkCall_Void(PClip_CONSTRUCTOR1)(x) )
- PClip(IClip* x) AVS_BakedCode( AVS_LinkCall_Void(PClip_CONSTRUCTOR2)(x) )
- void operator=(IClip* x) AVS_BakedCode( AVS_LinkCall_Void(PClip_OPERATOR_ASSIGN0)(x) )
- void operator=(const PClip& x) AVS_BakedCode( AVS_LinkCall_Void(PClip_OPERATOR_ASSIGN1)(x) )
-
- IClip* operator->() const { return p; }
-
- // useful in conditional expressions
- operator void*() const { return p; }
- bool operator!() const { return !p; }
-
- ~PClip() AVS_BakedCode( AVS_LinkCall_Void(PClip_DESTRUCTOR)() )
-#ifdef BUILDING_AVSCORE
-public:
- void CONSTRUCTOR0(); /* Damn compiler won't allow taking the address of reserved constructs, make a dummy interlude */
- void CONSTRUCTOR1(const PClip& x);
- void CONSTRUCTOR2(IClip* x);
- void OPERATOR_ASSIGN0(IClip* x);
- void OPERATOR_ASSIGN1(const PClip& x);
- void DESTRUCTOR();
-#endif
-}; // end class PClip
-
-
-// smart pointer to VideoFrame
-class PVideoFrame {
-
- VideoFrame* p;
-
- void Init(VideoFrame* x);
- void Set(VideoFrame* x);
-
-public:
- PVideoFrame() AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_CONSTRUCTOR0)() )
- PVideoFrame(const PVideoFrame& x) AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_CONSTRUCTOR1)(x) )
- PVideoFrame(VideoFrame* x) AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_CONSTRUCTOR2)(x) )
- void operator=(VideoFrame* x) AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_OPERATOR_ASSIGN0)(x) )
- void operator=(const PVideoFrame& x) AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_OPERATOR_ASSIGN1)(x) )
-
- VideoFrame* operator->() const { return p; }
-
- // for conditional expressions
- operator void*() const { return p; }
- bool operator!() const { return !p; }
-
- ~PVideoFrame() AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_DESTRUCTOR)() )
-#ifdef BUILDING_AVSCORE
-public:
- void CONSTRUCTOR0(); /* Damn compiler won't allow taking the address of reserved constructs, make a dummy interlude */
- void CONSTRUCTOR1(const PVideoFrame& x);
- void CONSTRUCTOR2(VideoFrame* x);
- void OPERATOR_ASSIGN0(VideoFrame* x);
- void OPERATOR_ASSIGN1(const PVideoFrame& x);
- void DESTRUCTOR();
-#endif
-}; // end class PVideoFrame
-
-
-class AVSValue {
-public:
-
- AVSValue() AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR0)() )
- AVSValue(IClip* c) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR1)(c) )
- AVSValue(const PClip& c) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR2)(c) )
- AVSValue(bool b) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR3)(b) )
- AVSValue(int i) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR4)(i) )
-// AVSValue(__int64 l);
- AVSValue(float f) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR5)(f) )
- AVSValue(double f) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR6)(f) )
- AVSValue(const char* s) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR7)(s) )
- AVSValue(const AVSValue* a, int size) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR8)(a, size) )
- AVSValue(const AVSValue& a, int size) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR8)(&a, size) )
- AVSValue(const AVSValue& v) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR9)(v) )
-
- ~AVSValue() AVS_BakedCode( AVS_LinkCall_Void(AVSValue_DESTRUCTOR)() )
- AVSValue& operator=(const AVSValue& v) AVS_BakedCode( return AVS_LinkCallV(AVSValue_OPERATOR_ASSIGN)(v) )
-
- // Note that we transparently allow 'int' to be treated as 'float'.
- // There are no int<->bool conversions, though.
-
- bool Defined() const AVS_BakedCode( return AVS_LinkCall(Defined)() )
- bool IsClip() const AVS_BakedCode( return AVS_LinkCall(IsClip)() )
- bool IsBool() const AVS_BakedCode( return AVS_LinkCall(IsBool)() )
- bool IsInt() const AVS_BakedCode( return AVS_LinkCall(IsInt)() )
-// bool IsLong() const;
- bool IsFloat() const AVS_BakedCode( return AVS_LinkCall(IsFloat)() )
- bool IsString() const AVS_BakedCode( return AVS_LinkCall(IsString)() )
- bool IsArray() const AVS_BakedCode( return AVS_LinkCall(IsArray)() )
-
- PClip AsClip() const AVS_BakedCode( return AVS_LinkCall(AsClip)() )
- bool AsBool() const AVS_BakedCode( return AVS_LinkCall(AsBool1)() )
- int AsInt() const AVS_BakedCode( return AVS_LinkCall(AsInt1)() )
-// int AsLong() const;
- const char* AsString() const AVS_BakedCode( return AVS_LinkCall(AsString1)() )
- double AsFloat() const AVS_BakedCode( return AVS_LinkCall(AsFloat1)() )
- float AsFloatf() const AVS_BakedCode( return float( AVS_LinkCall(AsFloat1)() ) )
-
- bool AsBool(bool def) const AVS_BakedCode( return AVS_LinkCall(AsBool2)(def) )
- int AsInt(int def) const AVS_BakedCode( return AVS_LinkCall(AsInt2)(def) )
- double AsDblDef(double def) const AVS_BakedCode( return AVS_LinkCall(AsDblDef)(def) ) // Value is still a float
- double AsFloat(float def) const AVS_BakedCode( return AVS_LinkCall(AsFloat2)(def) )
- float AsFloatf(float def) const AVS_BakedCode( return float( AVS_LinkCall(AsFloat2)(def) ) )
- const char* AsString(const char* def) const AVS_BakedCode( return AVS_LinkCall(AsString2)(def) )
-
- int ArraySize() const AVS_BakedCode( return AVS_LinkCall(ArraySize)() )
-
- const AVSValue& operator[](int index) const AVS_BakedCode( return AVS_LinkCallV(AVSValue_OPERATOR_INDEX)(index) )
-
-private:
-
- short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or RFU: 'l'ong ('d'ouble)
- short array_size;
- union {
- IClip* clip;
- bool boolean;
- int integer;
- float floating_pt;
- const char* string;
- const AVSValue* array;
- #ifdef X86_64
- // if ever, only x64 will support. It breaks struct size on 32 bit
- __int64 longlong; // 8 bytes
- double double_pt; // 8 bytes
- #endif
- };
-
- void Assign(const AVSValue* src, bool init);
-#ifdef BUILDING_AVSCORE
-public:
- void CONSTRUCTOR0(); /* Damn compiler won't allow taking the address of reserved constructs, make a dummy interlude */
- void CONSTRUCTOR1(IClip* c);
- void CONSTRUCTOR2(const PClip& c);
- void CONSTRUCTOR3(bool b);
- void CONSTRUCTOR4(int i);
- void CONSTRUCTOR5(float f);
- void CONSTRUCTOR6(double f);
- void CONSTRUCTOR7(const char* s);
- void CONSTRUCTOR8(const AVSValue* a, int size);
- void CONSTRUCTOR9(const AVSValue& v);
- void DESTRUCTOR();
- AVSValue& OPERATOR_ASSIGN(const AVSValue& v);
- const AVSValue& OPERATOR_INDEX(int index) const;
-
- bool AsBool1() const;
- int AsInt1() const;
- const char* AsString1() const;
- double AsFloat1() const;
-
- bool AsBool2(bool def) const;
- int AsInt2(int def) const;
- double AsFloat2(float def) const;
- const char* AsString2(const char* def) const;
-
-#ifdef NEW_AVSVALUE
- void MarkArrayAsC();
- void CONSTRUCTOR10(const AVSValue& v, bool c_arrays);
- AVSValue(const AVSValue& v, bool c_arrays);
- void Assign2(const AVSValue* src, bool init, bool c_arrays);
-#endif
-
-#endif
-}; // end class AVSValue
-
-#undef CALL_MEMBER_FN
-#undef AVS_LinkCallOptDefault
-#undef AVS_LinkCallOpt
-#undef AVS_LinkCallV
-#undef AVS_LinkCall
-#undef AVS_BakedCode
-
-#define AVS_UNUSED(x) x
-
-// instantiable null filter
-class GenericVideoFilter : public IClip {
-protected:
- PClip child;
- VideoInfo vi;
-public:
- GenericVideoFilter(PClip _child) : child(_child) { vi = child->GetVideoInfo(); }
- PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) { return child->GetFrame(n, env); }
- void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) { child->GetAudio(buf, start, count, env); }
- const VideoInfo& __stdcall GetVideoInfo() { return vi; }
- bool __stdcall GetParity(int n) { return child->GetParity(n); }
- int __stdcall SetCacheHints(int cachehints, int frame_range) { AVS_UNUSED(cachehints); AVS_UNUSED(frame_range); return 0; }; // We do not pass cache requests upwards, only to the next filter.
-};
-
-
-
-
-#include
-
-
-
-class IScriptEnvironment {
-public:
- virtual AVSC_CC ~IScriptEnvironment() {}
-
- virtual /*static*/ int __stdcall GetCPUFlags() = 0;
-
- virtual char* __stdcall SaveString(const char* s, int length = -1) = 0;
- virtual char* __stdcall Sprintf(const char* fmt, ...) = 0;
- // note: val is really a va_list; I hope everyone typedefs va_list to a pointer
- virtual char* __stdcall VSprintf(const char* fmt, void* val) = 0;
-
- __declspec(noreturn) virtual void __stdcall ThrowError(const char* fmt, ...) = 0;
-
- class NotFound /*exception*/ {}; // thrown by Invoke and GetVar
-
- typedef AVSValue (__cdecl *ApplyFunc)(AVSValue args, void* user_data, IScriptEnvironment* env);
-
- virtual void __stdcall AddFunction(const char* name, const char* params, ApplyFunc apply, void* user_data) = 0;
- virtual bool __stdcall FunctionExists(const char* name) = 0;
- virtual AVSValue __stdcall Invoke(const char* name, const AVSValue args, const char* const* arg_names=0) = 0;
-
- virtual AVSValue __stdcall GetVar(const char* name) = 0;
- virtual bool __stdcall SetVar(const char* name, const AVSValue& val) = 0;
- virtual bool __stdcall SetGlobalVar(const char* name, const AVSValue& val) = 0;
-
- virtual void __stdcall PushContext(int level=0) = 0;
- virtual void __stdcall PopContext() = 0;
-
- // align should be 4 or 8
- virtual PVideoFrame __stdcall NewVideoFrame(const VideoInfo& vi, int align=FRAME_ALIGN) = 0;
-
- virtual bool __stdcall MakeWritable(PVideoFrame* pvf) = 0;
-
- virtual void __stdcall BitBlt(BYTE* dstp, int dst_pitch, const BYTE* srcp, int src_pitch, int row_size, int height) = 0;
-
- typedef void (__cdecl *ShutdownFunc)(void* user_data, IScriptEnvironment* env);
- virtual void __stdcall AtExit(ShutdownFunc function, void* user_data) = 0;
-
- virtual void __stdcall CheckVersion(int version = AVISYNTH_INTERFACE_VERSION) = 0;
-
- virtual PVideoFrame __stdcall Subframe(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height) = 0;
-
- virtual int __stdcall SetMemoryMax(int mem) = 0;
-
- virtual int __stdcall SetWorkingDir(const char * newdir) = 0;
-
- virtual void* __stdcall ManageCache(int key, void* data) = 0;
-
- enum PlanarChromaAlignmentMode {
- PlanarChromaAlignmentOff,
- PlanarChromaAlignmentOn,
- PlanarChromaAlignmentTest };
-
- virtual bool __stdcall PlanarChromaAlignment(PlanarChromaAlignmentMode key) = 0;
-
- virtual PVideoFrame __stdcall SubframePlanar(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size,
- int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV) = 0;
-
- virtual void __stdcall DeleteScriptEnvironment() = 0;
-
- virtual void __stdcall ApplyMessage(PVideoFrame* frame, const VideoInfo& vi, const char* message, int size,
- int textcolor, int halocolor, int bgcolor) = 0;
-
- virtual const AVS_Linkage* const __stdcall GetAVSLinkage() = 0;
-
- // noThrow version of GetVar
- virtual AVSValue __stdcall GetVarDef(const char* name, const AVSValue& def = AVSValue()) = 0;
-
-}; // end class IScriptEnvironment
-
-
-enum MtMode
-{
- MT_INVALID = 0,
- MT_NICE_FILTER = 1,
- MT_MULTI_INSTANCE = 2,
- MT_SERIALIZED = 3,
- MT_SPECIAL_MT = 4,
- MT_MODE_COUNT = 5
-};
-
-class IJobCompletion
-{
-public:
-
- virtual __stdcall ~IJobCompletion() {}
- virtual void __stdcall Wait() = 0;
- virtual AVSValue __stdcall Get(size_t i) = 0;
- virtual size_t __stdcall Size() const = 0;
- virtual size_t __stdcall Capacity() const = 0;
- virtual void __stdcall Reset() = 0;
- virtual void __stdcall Destroy() = 0;
-};
-
-class IScriptEnvironment2;
-class Prefetcher;
-typedef AVSValue (*ThreadWorkerFuncPtr)(IScriptEnvironment2* env, void* data);
-
-enum AvsEnvProperty
-{
- AEP_PHYSICAL_CPUS = 1,
- AEP_LOGICAL_CPUS = 2,
- AEP_THREADPOOL_THREADS = 3,
- AEP_FILTERCHAIN_THREADS = 4,
- AEP_THREAD_ID = 5,
- AEP_VERSION = 6
-};
-
-enum AvsAllocType
-{
- AVS_NORMAL_ALLOC = 1,
- AVS_POOLED_ALLOC = 2
-};
-
-/* -----------------------------------------------------------------------------
- Note to plugin authors: The interface in IScriptEnvironment2 is
- preliminary / under construction / only for testing / non-final etc.!
- As long as you see this note here, IScriptEnvironment2 might still change,
- in which case your plugin WILL break. This also means that you are welcome
- to test it and give your feedback about any ideas, improvements, or issues
- you might have.
- ----------------------------------------------------------------------------- */
-class AVSFunction;
-class IScriptEnvironment2 : public IScriptEnvironment{
-public:
- virtual ~IScriptEnvironment2() {}
-
- // Generic system to ask for various properties
- virtual size_t __stdcall GetProperty(AvsEnvProperty prop) = 0;
-
- // Returns TRUE and the requested variable. If the method fails, returns FALSE and does not touch 'val'.
- virtual bool __stdcall GetVar(const char* name, AVSValue *val) const = 0;
-
- // Return the value of the requested variable.
- // If the variable was not found or had the wrong type,
- // return the supplied default value.
- virtual bool __stdcall GetVar(const char* name, bool def) const = 0;
- virtual int __stdcall GetVar(const char* name, int def) const = 0;
- virtual double __stdcall GetVar(const char* name, double def) const = 0;
- virtual const char* __stdcall GetVar(const char* name, const char* def) const = 0;
-
- // Plugin functions
- virtual bool __stdcall LoadPlugin(const char* filePath, bool throwOnError, AVSValue *result) = 0;
- virtual void __stdcall AddAutoloadDir(const char* dirPath, bool toFront) = 0;
- virtual void __stdcall ClearAutoloadDirs() = 0;
- virtual void __stdcall AutoloadPlugins() = 0;
- virtual void __stdcall AddFunction(const char* name, const char* params, ApplyFunc apply, void* user_data, const char *exportVar) = 0;
- virtual bool __stdcall InternalFunctionExists(const char* name) = 0;
-
- // Threading
- virtual void __stdcall SetFilterMTMode(const char* filter, MtMode mode, bool force) = 0; // If filter is "DEFAULT_MT_MODE", sets the default MT mode
- virtual IJobCompletion* __stdcall NewCompletion(size_t capacity) = 0;
- virtual void __stdcall ParallelJob(ThreadWorkerFuncPtr jobFunc, void* jobData, IJobCompletion* completion) = 0;
-
- // This version of Invoke will return false instead of throwing NotFound().
- virtual bool __stdcall Invoke(AVSValue *result, const char* name, const AVSValue& args, const char* const* arg_names=0) = 0;
-
- // Support functions
- virtual void* __stdcall Allocate(size_t nBytes, size_t alignment, AvsAllocType type) = 0;
- virtual void __stdcall Free(void* ptr) = 0;
-
- // These lines are needed so that we can overload the older functions from IScriptEnvironment.
- using IScriptEnvironment::Invoke;
- using IScriptEnvironment::AddFunction;
- using IScriptEnvironment::GetVar;
-
- virtual PVideoFrame __stdcall SubframePlanarA(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size,
- int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV, int rel_offsetA) = 0;
-
-}; // end class IScriptEnvironment2
-
-
-// avisynth.dll exports this; it's a way to use it as a library, without
-// writing an AVS script or without going through AVIFile.
-AVSC_API(IScriptEnvironment*, CreateScriptEnvironment)(int version = AVISYNTH_INTERFACE_VERSION);
-
-
-// These are some global variables you can set in your script to change AviSynth's behavior.
-#define VARNAME_AllowFloatAudio "OPT_AllowFloatAudio" // Allow WAVE_FORMAT_IEEE_FLOAT audio output
-#define VARNAME_VDubPlanarHack "OPT_VDubPlanarHack" // Hack YV16 and YV24 chroma plane order for old VDub's
-#define VARNAME_AVIPadScanlines "OPT_AVIPadScanlines" // Have scanlines mod4 padded in all pixel formats
-#define VARNAME_UseWaveExtensible "OPT_UseWaveExtensible" // Use WAVEFORMATEXTENSIBLE when describing audio to Windows
-#define VARNAME_dwChannelMask "OPT_dwChannelMask" // Integer audio channel mask. See description of WAVEFORMATEXTENSIBLE for more info.
-#define VARNAME_Enable_V210 "OPT_Enable_V210" // AVS+ use V210 instead of P210 (VfW)
-#define VARNAME_Enable_Y3_10_10 "OPT_Enable_Y3_10_10" // AVS+ use Y3[10][10] instead of P210 (VfW)
-#define VARNAME_Enable_Y3_10_16 "OPT_Enable_Y3_10_16" // AVS+ use Y3[10][16] instead of P216 (VfW)
-#define VARNAME_Enable_b64a "OPT_Enable_b64a" // AVS+ use b64a instead of BRA[64] (VfW)
-#define VARNAME_Enable_PlanarToPackedRGB "OPT_Enable_PlanarToPackedRGB" // AVS+ convert Planar RGB to packed RGB (VfW)
-
-// C exports
-#include
-AVSC_API(IScriptEnvironment2*, CreateScriptEnvironment2)(int version = AVISYNTH_INTERFACE_VERSION);
-
-#ifndef BUILDING_AVSCORE
-#undef AVS_UNUSED
-#endif
-
-#pragma pack(pop)
-
-#endif //__AVISYNTH_6_H__
+// Avisynth v2.5. Copyright 2002 Ben Rudiak-Gould et al.
+// Avisynth v2.6. Copyright 2006 Klaus Post.
+// Avisynth v2.6. Copyright 2009 Ian Brabham.
+// Avisynth+ project
+// 20160613: new 16 bit planar pixel_type constants go live!
+// 20160725: pixel_type constants 10-12-14 bit + planar RGB + BRG48/64
+// 20161005: Fallback of VideoInfo functions to defaults if no function exists
+// 20170117: global variables for VfW output OPT_xxxx
+// 20170310: new MT mode: MT_SPECIAL_MT
+// 20171103: (test with SIZETMOD define: Videoframe offsets to size_t, may affect x64)
+// 20171207: C++ Standard Conformance (no change for plugin writers)
+// 20180525: AVS_UNUSED define to supress parameter not used warnings
+
+// http://www.avisynth.org
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
+// http://www.gnu.org/copyleft/gpl.html .
+//
+// Linking Avisynth statically or dynamically with other modules is making
+// a combined work based on Avisynth. Thus, the terms and conditions of
+// the GNU General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Avisynth give you
+// permission to link Avisynth with independent modules that communicate
+// with Avisynth solely through the interfaces defined in avisynth.h,
+// regardless of the license terms of these independent modules, and to
+// copy and distribute the resulting combined work under terms of your
+// choice, provided that every copy of the combined work is accompanied
+// by a complete copy of the source code of Avisynth (the version of
+// Avisynth used to produce the combined work), being distributed under
+// the terms of the GNU General Public License plus this exception. An
+// independent module is a module which is not derived from or based on
+// Avisynth, such as 3rd-party filters, import and export plugins, or
+// graphical user interfaces.
+
+
+
+
+#ifndef __AVISYNTH_6_H__
+#define __AVISYNTH_6_H__
+
+#include
+#include
+#include
+
+
+enum { AVISYNTH_INTERFACE_VERSION = 6 };
+
+
+/* Compiler-specific crap */
+
+// Tell MSVC to stop precompiling here
+#if defined(_MSC_VER) && !defined(__clang__)
+ #pragma hdrstop
+#endif
+
+// Set up debugging macros for MS compilers; for others, step down to the
+// standard interface
+#ifdef _MSC_VER
+ #include
+#else
+ #undef _RPT0
+ #undef _RPT1
+ #undef _RPT2
+ #undef _RPT3
+ #undef _RPT4
+ #undef _RPT5
+ #define _RPT0(a,b) ((void)0)
+ #define _RPT1(a,b,c) ((void)0)
+ #define _RPT2(a,b,c,d) ((void)0)
+ #define _RPT3(a,b,c,d,e) ((void)0)
+ #define _RPT4(a,b,c,d,e,f) ((void)0)
+ #define _RPT5(a,b,c,d,e,f,g) ((void)0)
+
+ #include
+ #undef _ASSERTE
+ #undef _ASSERT
+ #define _ASSERTE(x) assert(x)
+ #define _ASSERT(x) assert(x)
+#endif
+
+
+
+// I had problems with Premiere wanting 1-byte alignment for its structures,
+// so I now set the Avisynth struct alignment explicitly here.
+#pragma pack(push,8)
+
+// The VideoInfo struct holds global information about a clip (i.e.
+// information that does not depend on the frame number). The GetVideoInfo
+// method in IClip returns this struct.
+
+enum {SAMPLE_INT8 = 1<<0,
+ SAMPLE_INT16 = 1<<1,
+ SAMPLE_INT24 = 1<<2, // Int24 is a very stupid thing to code, but it's supported by some hardware.
+ SAMPLE_INT32 = 1<<3,
+ SAMPLE_FLOAT = 1<<4};
+
+enum {
+ AVS_PLANAR_Y=1<<0,
+ AVS_PLANAR_U=1<<1,
+ AVS_PLANAR_V=1<<2,
+ AVS_PLANAR_ALIGNED=1<<3,
+ AVS_PLANAR_Y_ALIGNED= AVS_PLANAR_Y| AVS_PLANAR_ALIGNED, // MEANX : Patched to avoid clash with adm names
+ AVS_PLANAR_U_ALIGNED= AVS_PLANAR_U| AVS_PLANAR_ALIGNED,
+ AVS_PLANAR_V_ALIGNED= AVS_PLANAR_V| AVS_PLANAR_ALIGNED,
+ PLANAR_A=1<<4,
+ PLANAR_R=1<<5,
+ PLANAR_G=1<<6,
+ PLANAR_B=1<<7,
+ PLANAR_A_ALIGNED=PLANAR_A| AVS_PLANAR_ALIGNED,
+ PLANAR_R_ALIGNED=PLANAR_R| AVS_PLANAR_ALIGNED,
+ PLANAR_G_ALIGNED=PLANAR_G| AVS_PLANAR_ALIGNED,
+ PLANAR_B_ALIGNED=PLANAR_B| AVS_PLANAR_ALIGNED,
+ };
+
+class AvisynthError /* exception */ {
+public:
+ const char* const msg;
+ AvisynthError(const char* _msg) : msg(_msg) {}
+
+// Ensure AvisynthError cannot be publicly assigned!
+private:
+ AvisynthError& operator=(const AvisynthError&);
+}; // end class AvisynthError
+
+
+/* Forward references */
+#if defined(MSVC)
+ #define SINGLE_INHERITANCE __single_inheritance
+#else
+ #define SINGLE_INHERITANCE
+#endif
+struct SINGLE_INHERITANCE VideoInfo;
+class SINGLE_INHERITANCE VideoFrameBuffer;
+class SINGLE_INHERITANCE VideoFrame;
+class IClip;
+class SINGLE_INHERITANCE PClip;
+class SINGLE_INHERITANCE PVideoFrame;
+class IScriptEnvironment;
+class SINGLE_INHERITANCE AVSValue;
+
+
+/*
+ * Avisynth C++ plugin API code function pointers.
+ *
+ * In order to maintain binary compatibility with
+ * future version do not change the order of the
+ * existing function pointers. It will be baked
+ * into all existing plugins.
+ *
+ * Add new function pointers to the end of the
+ * structure. The linkage macros generate some
+ * protection code to ensure newer plugin do not
+ * call non-existing functions in an older host.
+ */
+
+struct AVS_Linkage {
+
+ int Size;
+
+/**********************************************************************/
+
+// struct VideoInfo
+ bool (VideoInfo::*HasVideo)() const;
+ bool (VideoInfo::*HasAudio)() const;
+ bool (VideoInfo::*IsRGB)() const;
+ bool (VideoInfo::*IsRGB24)() const;
+ bool (VideoInfo::*IsRGB32)() const;
+ bool (VideoInfo::*IsYUV)() const;
+ bool (VideoInfo::*IsYUY2)() const;
+ bool (VideoInfo::*IsYV24)() const;
+ bool (VideoInfo::*IsYV16)() const;
+ bool (VideoInfo::*IsYV12)() const;
+ bool (VideoInfo::*IsYV411)() const;
+ bool (VideoInfo::*IsY8)() const;
+ bool (VideoInfo::*IsColorSpace)(int c_space) const;
+ bool (VideoInfo::*Is)(int property) const;
+ bool (VideoInfo::*IsPlanar)() const;
+ bool (VideoInfo::*IsFieldBased)() const;
+ bool (VideoInfo::*IsParityKnown)() const;
+ bool (VideoInfo::*IsBFF)() const;
+ bool (VideoInfo::*IsTFF)() const;
+ bool (VideoInfo::*IsVPlaneFirst)() const;
+ int (VideoInfo::*BytesFromPixels)(int pixels) const;
+ int (VideoInfo::*RowSize)(int plane) const;
+ int (VideoInfo::*BMPSize)() const;
+ __int64 (VideoInfo::*AudioSamplesFromFrames)(int frames) const;
+ int (VideoInfo::*FramesFromAudioSamples)(__int64 samples) const;
+ __int64 (VideoInfo::*AudioSamplesFromBytes)(__int64 bytes) const;
+ __int64 (VideoInfo::*BytesFromAudioSamples)(__int64 samples) const;
+ int (VideoInfo::*AudioChannels)() const;
+ int (VideoInfo::*SampleType)() const;
+ bool (VideoInfo::*IsSampleType)(int testtype) const;
+ int (VideoInfo::*SamplesPerSecond)() const;
+ int (VideoInfo::*BytesPerAudioSample)() const;
+ void (VideoInfo::*SetFieldBased)(bool isfieldbased);
+ void (VideoInfo::*Set)(int property);
+ void (VideoInfo::*Clear)(int property);
+ int (VideoInfo::*GetPlaneWidthSubsampling)(int plane) const;
+ int (VideoInfo::*GetPlaneHeightSubsampling)(int plane) const;
+ int (VideoInfo::*BitsPerPixel)() const;
+ int (VideoInfo::*BytesPerChannelSample)() const;
+ void (VideoInfo::*SetFPS)(unsigned numerator, unsigned denominator);
+ void (VideoInfo::*MulDivFPS)(unsigned multiplier, unsigned divisor);
+ bool (VideoInfo::*IsSameColorspace)(const VideoInfo& vi) const;
+// end struct VideoInfo
+
+/**********************************************************************/
+
+// class VideoFrameBuffer
+ const BYTE* (VideoFrameBuffer::*VFBGetReadPtr)() const;
+ BYTE* (VideoFrameBuffer::*VFBGetWritePtr)();
+#ifdef SIZETMOD
+ size_t (VideoFrameBuffer::*GetDataSize)() const;
+#else
+ int (VideoFrameBuffer::*GetDataSize)() const;
+#endif
+ int (VideoFrameBuffer::*GetSequenceNumber)() const;
+ int (VideoFrameBuffer::*GetRefcount)() const;
+// end class VideoFrameBuffer
+
+/**********************************************************************/
+
+// class VideoFrame
+ int (VideoFrame::*GetPitch)(int plane) const;
+ int (VideoFrame::*GetRowSize)(int plane) const;
+ int (VideoFrame::*GetHeight)(int plane) const;
+ VideoFrameBuffer* (VideoFrame::*GetFrameBuffer)() const;
+#ifdef SIZETMOD
+ size_t (VideoFrame::*GetOffset)(int plane) const;
+#else
+ int (VideoFrame::*GetOffset)(int plane) const;
+#endif
+ const BYTE* (VideoFrame::*VFGetReadPtr)(int plane) const;
+ bool (VideoFrame::*IsWritable)() const;
+ BYTE* (VideoFrame::*VFGetWritePtr)(int plane) const;
+ void (VideoFrame::*VideoFrame_DESTRUCTOR)();
+// end class VideoFrame
+
+/**********************************************************************/
+
+// class IClip
+ /* nothing */
+// end class IClip
+
+/**********************************************************************/
+
+// class PClip
+ void (PClip::*PClip_CONSTRUCTOR0)();
+ void (PClip::*PClip_CONSTRUCTOR1)(const PClip& x);
+ void (PClip::*PClip_CONSTRUCTOR2)(IClip* x);
+ void (PClip::*PClip_OPERATOR_ASSIGN0)(IClip* x);
+ void (PClip::*PClip_OPERATOR_ASSIGN1)(const PClip& x);
+ void (PClip::*PClip_DESTRUCTOR)();
+// end class PClip
+
+/**********************************************************************/
+
+// class PVideoFrame
+ void (PVideoFrame::*PVideoFrame_CONSTRUCTOR0)();
+ void (PVideoFrame::*PVideoFrame_CONSTRUCTOR1)(const PVideoFrame& x);
+ void (PVideoFrame::*PVideoFrame_CONSTRUCTOR2)(VideoFrame* x);
+ void (PVideoFrame::*PVideoFrame_OPERATOR_ASSIGN0)(VideoFrame* x);
+ void (PVideoFrame::*PVideoFrame_OPERATOR_ASSIGN1)(const PVideoFrame& x);
+ void (PVideoFrame::*PVideoFrame_DESTRUCTOR)();
+// end class PVideoFrame
+
+/**********************************************************************/
+
+// class AVSValue
+ void (AVSValue::*AVSValue_CONSTRUCTOR0)();
+ void (AVSValue::*AVSValue_CONSTRUCTOR1)(IClip* c);
+ void (AVSValue::*AVSValue_CONSTRUCTOR2)(const PClip& c);
+ void (AVSValue::*AVSValue_CONSTRUCTOR3)(bool b);
+ void (AVSValue::*AVSValue_CONSTRUCTOR4)(int i);
+ void (AVSValue::*AVSValue_CONSTRUCTOR5)(float f);
+ void (AVSValue::*AVSValue_CONSTRUCTOR6)(double f);
+ void (AVSValue::*AVSValue_CONSTRUCTOR7)(const char* s);
+ void (AVSValue::*AVSValue_CONSTRUCTOR8)(const AVSValue* a, int size);
+ void (AVSValue::*AVSValue_CONSTRUCTOR9)(const AVSValue& v);
+ void (AVSValue::*AVSValue_DESTRUCTOR)();
+ AVSValue& (AVSValue::*AVSValue_OPERATOR_ASSIGN)(const AVSValue& v);
+ const AVSValue& (AVSValue::*AVSValue_OPERATOR_INDEX)(int index) const;
+ bool (AVSValue::*Defined)() const;
+ bool (AVSValue::*IsClip)() const;
+ bool (AVSValue::*IsBool)() const;
+ bool (AVSValue::*IsInt)() const;
+ bool (AVSValue::*IsFloat)() const;
+ bool (AVSValue::*IsString)() const;
+ bool (AVSValue::*IsArray)() const;
+ PClip (AVSValue::*AsClip)() const;
+ bool (AVSValue::*AsBool1)() const;
+ int (AVSValue::*AsInt1)() const;
+ const char* (AVSValue::*AsString1)() const;
+ double (AVSValue::*AsFloat1)() const;
+ bool (AVSValue::*AsBool2)(bool def) const;
+ int (AVSValue::*AsInt2)(int def) const;
+ double (AVSValue::*AsDblDef)(double def) const;
+ double (AVSValue::*AsFloat2)(float def) const;
+ const char* (AVSValue::*AsString2)(const char* def) const;
+ int (AVSValue::*ArraySize)() const;
+// end class AVSValue
+
+/**********************************************************************/
+ // Reserve pointer space so that we can keep compatibility with Avs "classic" even if it adds functions on its own
+ void (VideoInfo::*reserved[32])();
+/**********************************************************************/
+ // AviSynth+ additions
+ int (VideoInfo::*NumComponents)() const;
+ int (VideoInfo::*ComponentSize)() const;
+ int (VideoInfo::*BitsPerComponent)() const;
+ bool (VideoInfo::*Is444)() const;
+ bool (VideoInfo::*Is422)() const;
+ bool (VideoInfo::*Is420)() const;
+ bool (VideoInfo::*IsY)() const;
+ bool (VideoInfo::*IsRGB48)() const;
+ bool (VideoInfo::*IsRGB64)() const;
+ bool (VideoInfo::*IsYUVA)() const;
+ bool (VideoInfo::*IsPlanarRGB)() const;
+ bool (VideoInfo::*IsPlanarRGBA)() const;
+ /**********************************************************************/
+};
+
+#ifdef BUILDING_AVSCORE
+/* Macro resolution for code inside Avisynth.dll */
+# define AVS_BakedCode(arg) ;
+# define AVS_LinkCall(arg)
+# define AVS_LinkCallV(arg)
+# define AVS_LinkCallOpt(arg, argOpt) AVSLinkCall(arg)
+# define AVS_LinkCallOptDefault(arg, argDefaultValue) AVSLinkCall(arg())
+# define CALL_MEMBER_FN(object,ptrToMember)
+
+#else
+/* Macro resolution for code inside user plugin */
+# ifdef AVS_LINKAGE_DLLIMPORT
+extern __declspec(dllimport) const AVS_Linkage* const AVS_linkage;
+# else
+extern const AVS_Linkage* AVS_linkage;
+# endif
+
+# ifndef offsetof
+# include
+# endif
+
+# define AVS_BakedCode(arg) { arg ; }
+# define AVS_LinkCall(arg) !AVS_linkage || offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? 0 : (this->*(AVS_linkage->arg))
+# define AVS_LinkCall_Void(arg) !AVS_linkage || offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? (void)0 : (this->*(AVS_linkage->arg))
+# define AVS_LinkCallV(arg) !AVS_linkage || offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? *this : (this->*(AVS_linkage->arg))
+// Helper macros for fallback option when a function does not exists
+#define CALL_MEMBER_FN(object,ptrToMember) ((object)->*(ptrToMember))
+#define AVS_LinkCallOpt(arg, argOpt) !AVS_linkage ? 0 : \
+ ( offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? \
+ (offsetof(AVS_Linkage, argOpt) >= AVS_linkage->Size ? 0 : CALL_MEMBER_FN(this, AVS_linkage->argOpt)() ) : \
+ CALL_MEMBER_FN(this, AVS_linkage->arg)() )
+// AVS_LinkCallOptDefault puts automatically () only after arg
+# define AVS_LinkCallOptDefault(arg, argDefaultValue) !AVS_linkage || offsetof(AVS_Linkage, arg) >= AVS_linkage->Size ? (argDefaultValue) : ((this->*(AVS_linkage->arg))())
+
+#endif
+
+struct VideoInfo {
+ int width, height; // width=0 means no video
+ unsigned fps_numerator, fps_denominator;
+ int num_frames;
+ // This is more extensible than previous versions. More properties can be added seeminglesly.
+
+ // Colorspace properties.
+/*
+
+Planar match mask 1111.1000.0000.0111.0000.0111.0000.0111
+Planar signature 10xx.1000.0000.00xx.0000.00xx.00xx.00xx ?
+Planar signature 10xx.1000.0000.0xxx.0000.00xx.000x.x0xx ? *new
+Planar filter mask 1111.1111.1111.1111.1111.1111.1110.0111 (typo from old header fixed)
+
+pixel_type mapping
+==================
+pixel_type bit-map PIYB.Z000.0???.0SSS.0000.0???.????.????
+ planar YUV CCC HHH.000u.vWWW
+ planar RGB(A) CCC AR
+ nonplanar CCC 000.00wx xyAR
+Legend
+======
+Planar YUV:
+ Code Bits Remark
+ W 0-2 Planar Width Subsampling bits
+ Use (X+1) & 3 for GetPlaneWidthSubsampling
+ 000 => 1 YV12, YV16, YUV420, YUV422
+ 001 => 2 YV411, YUV9
+ 010 => reserved
+ 011 => 0 YV24, YUV444, RGBP
+ 1xx => reserved
+ v 3 VPlaneFirst YV12, YV16, YV24, YV411, YUV9
+ u 4 UPlaneFirst I420
+ H 7-9 Planar Height Subsampling bits
+ Use ((X>>8)+1) & 3 for GetPlaneHeightSubsampling
+ 000 => 1 YV12, YUV420
+ 001 => 2 YUV9
+ 010 => reserved
+ 011 => 0 YV16, YV24, YV411, YUV422, YUV444, RGBP
+ 1xx => reserved
+
+Planar RGB
+ Code Bits Remark
+ R 0 BGR, (with SSS bits for 8/16 bit/sample or float)
+ A 1 BGRA, (with SSS bits for 8/16 bit/sample or float)
+
+
+Not Planar, Interleaved (I flag)
+Code Bits Remark
+ R 0 BGR24, and BGRx in future (with SSS bits for 8/16 bit/sample or float)
+ A 1 BGR32, and BGRAx in future (with SSS bits for 8/16 bit/sample or float)
+ y 2 YUY2
+ x 3-4 reserved
+ w 5 Raw32
+
+General
+Code Bits Remark
+ S 16-18 Sample resolution bits
+ 000 => 8
+ 001 => 16
+ 010 => 32 (float)
+ 011,100 => reserved
+ 101 => 10 bits
+ 110 => 12 bits
+ 111 => 14 bits
+for packed RGB(A): only 8 and 16 bits are valid
+
+Other YV12 specific (not used?)
+ C 20-22 Chroma Placement values 0-4 see CS_xxx_CHROMA_PLACEMENT
+
+Color family and layout
+ Packed Planar Planar Planar
+Code Bits Remark RGB/RGBA YUV YUY2 Y_Grey RGB/RGBA YUVA
+ R 0 1/0 - 0 - 1/0 -
+ A 1 0/1 - 0 - 0/1 -
+ y 2 - - 1 - 0 -
+ Z 27 YUVA 0 0 0 0 1 1
+ B 28 BGR 1 0 0 0 1* 0
+ Y 29 YUV 0 1 1 1 0 0
+ I 30 Interleaved 1 0 1 1 0 0
+ P 31 Planar 0 1 0 1 1 1
+* Planar RGB plane order: G,B,R(,A)
+
+*/
+enum {
+ CS_YUVA = 1<<27,
+ CS_BGR = 1<<28,
+ CS_YUV = 1<<29,
+ CS_INTERLEAVED = 1<<30,
+ CS_PLANAR = 1<<31,
+
+ CS_Shift_Sub_Width = 0,
+ CS_Shift_Sub_Height = 8,
+ CS_Shift_Sample_Bits = 16,
+
+ CS_Sub_Width_Mask = 7 << CS_Shift_Sub_Width,
+ CS_Sub_Width_1 = 3 << CS_Shift_Sub_Width, // YV24
+ CS_Sub_Width_2 = 0 << CS_Shift_Sub_Width, // YV12, I420, YV16
+ CS_Sub_Width_4 = 1 << CS_Shift_Sub_Width, // YUV9, YV411
+
+ CS_VPlaneFirst = 1 << 3, // YV12, YV16, YV24, YV411, YUV9
+ CS_UPlaneFirst = 1 << 4, // I420
+
+ CS_Sub_Height_Mask = 7 << CS_Shift_Sub_Height,
+ CS_Sub_Height_1 = 3 << CS_Shift_Sub_Height, // YV16, YV24, YV411
+ CS_Sub_Height_2 = 0 << CS_Shift_Sub_Height, // YV12, I420
+ CS_Sub_Height_4 = 1 << CS_Shift_Sub_Height, // YUV9
+
+ CS_Sample_Bits_Mask = 7 << CS_Shift_Sample_Bits,
+ CS_Sample_Bits_8 = 0 << CS_Shift_Sample_Bits,
+ CS_Sample_Bits_10 = 5 << CS_Shift_Sample_Bits,
+ CS_Sample_Bits_12 = 6 << CS_Shift_Sample_Bits,
+ CS_Sample_Bits_14 = 7 << CS_Shift_Sample_Bits,
+ CS_Sample_Bits_16 = 1 << CS_Shift_Sample_Bits,
+ CS_Sample_Bits_32 = 2 << CS_Shift_Sample_Bits,
+
+ CS_PLANAR_MASK = CS_PLANAR | CS_INTERLEAVED | CS_YUV | CS_BGR | CS_YUVA | CS_Sample_Bits_Mask
+ | CS_Sub_Height_Mask | CS_Sub_Width_Mask,
+ CS_PLANAR_FILTER = ~( CS_VPlaneFirst | CS_UPlaneFirst ),
+
+ CS_RGB_TYPE = 1 << 0,
+ CS_RGBA_TYPE = 1 << 1,
+
+ // Specific colorformats
+ CS_UNKNOWN = 0,
+
+ CS_BGR24 = CS_RGB_TYPE | CS_BGR | CS_INTERLEAVED,
+ CS_BGR32 = CS_RGBA_TYPE | CS_BGR | CS_INTERLEAVED,
+ CS_YUY2 = 1<<2 | CS_YUV | CS_INTERLEAVED,
+ // CS_YV12 = 1<<3 Reserved
+ // CS_I420 = 1<<4 Reserved
+ CS_RAW32 = 1<<5 | CS_INTERLEAVED,
+
+ // YV12 must be 0xA000008 2.5 Baked API will see all new planar as YV12
+ // I420 must be 0xA000010
+
+ CS_GENERIC_YUV420 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2, // 4:2:0 planar
+ CS_GENERIC_YUV422 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_2, // 4:2:2 planar
+ CS_GENERIC_YUV444 = CS_PLANAR | CS_YUV | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_1, // 4:4:4 planar
+ CS_GENERIC_Y = CS_PLANAR | CS_INTERLEAVED | CS_YUV, // Y only (4:0:0)
+ CS_GENERIC_RGBP = CS_PLANAR | CS_BGR | CS_RGB_TYPE, // planar RGB. Though name is RGB but plane order G,B,R
+ CS_GENERIC_RGBAP = CS_PLANAR | CS_BGR | CS_RGBA_TYPE, // planar RGBA
+ CS_GENERIC_YUVA420 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2, // 4:2:0:A planar
+ CS_GENERIC_YUVA422 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_2, // 4:2:2:A planar
+ CS_GENERIC_YUVA444 = CS_PLANAR | CS_YUVA | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_1, // 4:4:4:A planar
+
+ CS_YV24 = CS_GENERIC_YUV444 | CS_Sample_Bits_8, // YVU 4:4:4 planar
+ CS_YV16 = CS_GENERIC_YUV422 | CS_Sample_Bits_8, // YVU 4:2:2 planar
+ CS_YV12 = CS_GENERIC_YUV420 | CS_Sample_Bits_8, // YVU 4:2:0 planar
+ CS_I420 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_UPlaneFirst | CS_Sub_Height_2 | CS_Sub_Width_2, // YUV 4:2:0 planar
+ CS_IYUV = CS_I420,
+ CS_YUV9 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_4 | CS_Sub_Width_4, // YUV 4:1:0 planar
+ CS_YV411 = CS_PLANAR | CS_YUV | CS_Sample_Bits_8 | CS_VPlaneFirst | CS_Sub_Height_1 | CS_Sub_Width_4, // YUV 4:1:1 planar
+
+ CS_Y8 = CS_GENERIC_Y | CS_Sample_Bits_8, // Y 4:0:0 planar
+
+ //-------------------------
+ // AVS16: new planar constants go live! Experimental PF 160613
+ // 10-12-14 bit + planar RGB + BRG48/64 160725
+
+ CS_YUV444P10 = CS_GENERIC_YUV444 | CS_Sample_Bits_10, // YUV 4:4:4 10bit samples
+ CS_YUV422P10 = CS_GENERIC_YUV422 | CS_Sample_Bits_10, // YUV 4:2:2 10bit samples
+ CS_YUV420P10 = CS_GENERIC_YUV420 | CS_Sample_Bits_10, // YUV 4:2:0 10bit samples
+ CS_Y10 = CS_GENERIC_Y | CS_Sample_Bits_10, // Y 4:0:0 10bit samples
+
+ CS_YUV444P12 = CS_GENERIC_YUV444 | CS_Sample_Bits_12, // YUV 4:4:4 12bit samples
+ CS_YUV422P12 = CS_GENERIC_YUV422 | CS_Sample_Bits_12, // YUV 4:2:2 12bit samples
+ CS_YUV420P12 = CS_GENERIC_YUV420 | CS_Sample_Bits_12, // YUV 4:2:0 12bit samples
+ CS_Y12 = CS_GENERIC_Y | CS_Sample_Bits_12, // Y 4:0:0 12bit samples
+
+ CS_YUV444P14 = CS_GENERIC_YUV444 | CS_Sample_Bits_14, // YUV 4:4:4 14bit samples
+ CS_YUV422P14 = CS_GENERIC_YUV422 | CS_Sample_Bits_14, // YUV 4:2:2 14bit samples
+ CS_YUV420P14 = CS_GENERIC_YUV420 | CS_Sample_Bits_14, // YUV 4:2:0 14bit samples
+ CS_Y14 = CS_GENERIC_Y | CS_Sample_Bits_14, // Y 4:0:0 14bit samples
+
+ CS_YUV444P16 = CS_GENERIC_YUV444 | CS_Sample_Bits_16, // YUV 4:4:4 16bit samples
+ CS_YUV422P16 = CS_GENERIC_YUV422 | CS_Sample_Bits_16, // YUV 4:2:2 16bit samples
+ CS_YUV420P16 = CS_GENERIC_YUV420 | CS_Sample_Bits_16, // YUV 4:2:0 16bit samples
+ CS_Y16 = CS_GENERIC_Y | CS_Sample_Bits_16, // Y 4:0:0 16bit samples
+
+ // 32 bit samples (float)
+ CS_YUV444PS = CS_GENERIC_YUV444 | CS_Sample_Bits_32, // YUV 4:4:4 32bit samples
+ CS_YUV422PS = CS_GENERIC_YUV422 | CS_Sample_Bits_32, // YUV 4:2:2 32bit samples
+ CS_YUV420PS = CS_GENERIC_YUV420 | CS_Sample_Bits_32, // YUV 4:2:0 32bit samples
+ CS_Y32 = CS_GENERIC_Y | CS_Sample_Bits_32, // Y 4:0:0 32bit samples
+
+ // RGB packed
+ CS_BGR48 = CS_RGB_TYPE | CS_BGR | CS_INTERLEAVED | CS_Sample_Bits_16, // BGR 3x16 bit
+ CS_BGR64 = CS_RGBA_TYPE | CS_BGR | CS_INTERLEAVED | CS_Sample_Bits_16, // BGR 4x16 bit
+ // no packed 32 bit (float) support for these legacy types
+
+ // RGB planar
+ CS_RGBP = CS_GENERIC_RGBP | CS_Sample_Bits_8, // Planar RGB 8 bit samples
+ CS_RGBP10 = CS_GENERIC_RGBP | CS_Sample_Bits_10, // Planar RGB 10bit samples
+ CS_RGBP12 = CS_GENERIC_RGBP | CS_Sample_Bits_12, // Planar RGB 12bit samples
+ CS_RGBP14 = CS_GENERIC_RGBP | CS_Sample_Bits_14, // Planar RGB 14bit samples
+ CS_RGBP16 = CS_GENERIC_RGBP | CS_Sample_Bits_16, // Planar RGB 16bit samples
+ CS_RGBPS = CS_GENERIC_RGBP | CS_Sample_Bits_32, // Planar RGB 32bit samples
+
+ // RGBA planar
+ CS_RGBAP = CS_GENERIC_RGBAP | CS_Sample_Bits_8, // Planar RGBA 8 bit samples
+ CS_RGBAP10 = CS_GENERIC_RGBAP | CS_Sample_Bits_10, // Planar RGBA 10bit samples
+ CS_RGBAP12 = CS_GENERIC_RGBAP | CS_Sample_Bits_12, // Planar RGBA 12bit samples
+ CS_RGBAP14 = CS_GENERIC_RGBAP | CS_Sample_Bits_14, // Planar RGBA 14bit samples
+ CS_RGBAP16 = CS_GENERIC_RGBAP | CS_Sample_Bits_16, // Planar RGBA 16bit samples
+ CS_RGBAPS = CS_GENERIC_RGBAP | CS_Sample_Bits_32, // Planar RGBA 32bit samples
+
+ // Planar YUVA
+ CS_YUVA444 = CS_GENERIC_YUVA444 | CS_Sample_Bits_8, // YUVA 4:4:4 8bit samples
+ CS_YUVA422 = CS_GENERIC_YUVA422 | CS_Sample_Bits_8, // YUVA 4:2:2 8bit samples
+ CS_YUVA420 = CS_GENERIC_YUVA420 | CS_Sample_Bits_8, // YUVA 4:2:0 8bit samples
+
+ CS_YUVA444P10 = CS_GENERIC_YUVA444 | CS_Sample_Bits_10, // YUVA 4:4:4 10bit samples
+ CS_YUVA422P10 = CS_GENERIC_YUVA422 | CS_Sample_Bits_10, // YUVA 4:2:2 10bit samples
+ CS_YUVA420P10 = CS_GENERIC_YUVA420 | CS_Sample_Bits_10, // YUVA 4:2:0 10bit samples
+
+ CS_YUVA444P12 = CS_GENERIC_YUVA444 | CS_Sample_Bits_12, // YUVA 4:4:4 12bit samples
+ CS_YUVA422P12 = CS_GENERIC_YUVA422 | CS_Sample_Bits_12, // YUVA 4:2:2 12bit samples
+ CS_YUVA420P12 = CS_GENERIC_YUVA420 | CS_Sample_Bits_12, // YUVA 4:2:0 12bit samples
+
+ CS_YUVA444P14 = CS_GENERIC_YUVA444 | CS_Sample_Bits_14, // YUVA 4:4:4 14bit samples
+ CS_YUVA422P14 = CS_GENERIC_YUVA422 | CS_Sample_Bits_14, // YUVA 4:2:2 14bit samples
+ CS_YUVA420P14 = CS_GENERIC_YUVA420 | CS_Sample_Bits_14, // YUVA 4:2:0 14bit samples
+
+ CS_YUVA444P16 = CS_GENERIC_YUVA444 | CS_Sample_Bits_16, // YUVA 4:4:4 16bit samples
+ CS_YUVA422P16 = CS_GENERIC_YUVA422 | CS_Sample_Bits_16, // YUVA 4:2:2 16bit samples
+ CS_YUVA420P16 = CS_GENERIC_YUVA420 | CS_Sample_Bits_16, // YUVA 4:2:0 16bit samples
+
+ CS_YUVA444PS = CS_GENERIC_YUVA444 | CS_Sample_Bits_32, // YUVA 4:4:4 32bit samples
+ CS_YUVA422PS = CS_GENERIC_YUVA422 | CS_Sample_Bits_32, // YUVA 4:2:2 32bit samples
+ CS_YUVA420PS = CS_GENERIC_YUVA420 | CS_Sample_Bits_32, // YUVA 4:2:0 32bit samples
+
+ };
+
+ int pixel_type; // changed to int as of 2.5
+
+
+ int audio_samples_per_second; // 0 means no audio
+ int sample_type; // as of 2.5
+ __int64 num_audio_samples; // changed as of 2.5
+ int nchannels; // as of 2.5
+
+ // Imagetype properties
+
+ int image_type;
+
+ enum {
+ IT_BFF = 1<<0,
+ IT_TFF = 1<<1,
+ IT_FIELDBASED = 1<<2
+ };
+
+ // Chroma placement bits 20 -> 23 ::FIXME:: Really want a Class to support this
+ enum {
+ CS_UNKNOWN_CHROMA_PLACEMENT = 0 << 20,
+ CS_MPEG1_CHROMA_PLACEMENT = 1 << 20,
+ CS_MPEG2_CHROMA_PLACEMENT = 2 << 20,
+ CS_YUY2_CHROMA_PLACEMENT = 3 << 20,
+ CS_TOPLEFT_CHROMA_PLACEMENT = 4 << 20
+ };
+
+ // useful functions of the above
+ bool HasVideo() const AVS_BakedCode(return AVS_LinkCall(HasVideo)())
+ bool HasAudio() const AVS_BakedCode(return AVS_LinkCall(HasAudio)())
+ bool IsRGB() const AVS_BakedCode(return AVS_LinkCall(IsRGB)())
+ bool IsRGB24() const AVS_BakedCode(return AVS_LinkCall(IsRGB24)())
+ bool IsRGB32() const AVS_BakedCode(return AVS_LinkCall(IsRGB32)())
+ bool IsYUV() const AVS_BakedCode(return AVS_LinkCall(IsYUV)())
+ bool IsYUY2() const AVS_BakedCode(return AVS_LinkCall(IsYUY2)())
+
+ bool IsYV24() const AVS_BakedCode(return AVS_LinkCall(IsYV24)())
+ bool IsYV16() const AVS_BakedCode(return AVS_LinkCall(IsYV16)())
+ bool IsYV12() const AVS_BakedCode(return AVS_LinkCall(IsYV12)())
+ bool IsYV411() const AVS_BakedCode(return AVS_LinkCall(IsYV411)())
+ //bool IsYUV9() const;
+ bool IsY8() const AVS_BakedCode(return AVS_LinkCall(IsY8)())
+
+ bool IsColorSpace(int c_space) const AVS_BakedCode(return AVS_LinkCall(IsColorSpace)(c_space))
+
+ bool Is(int property) const AVS_BakedCode(return AVS_LinkCall(Is)(property))
+ bool IsPlanar() const AVS_BakedCode(return AVS_LinkCall(IsPlanar)())
+ bool IsFieldBased() const AVS_BakedCode(return AVS_LinkCall(IsFieldBased)())
+ bool IsParityKnown() const AVS_BakedCode(return AVS_LinkCall(IsParityKnown)())
+ bool IsBFF() const AVS_BakedCode(return AVS_LinkCall(IsBFF)())
+ bool IsTFF() const AVS_BakedCode(return AVS_LinkCall(IsTFF)())
+
+ bool IsVPlaneFirst() const AVS_BakedCode(return AVS_LinkCall(IsVPlaneFirst)()) // Don't use this
+ // Will not work on planar images, but will return only luma planes
+ int BytesFromPixels(int pixels) const AVS_BakedCode(return AVS_LinkCall(BytesFromPixels)(pixels))
+ int RowSize(int plane = 0) const AVS_BakedCode(return AVS_LinkCall(RowSize)(plane))
+ int BMPSize() const AVS_BakedCode(return AVS_LinkCall(BMPSize)())
+
+ __int64 AudioSamplesFromFrames(int frames) const AVS_BakedCode(return AVS_LinkCall(AudioSamplesFromFrames)(frames))
+ int FramesFromAudioSamples(__int64 samples) const AVS_BakedCode(return AVS_LinkCall(FramesFromAudioSamples)(samples))
+ __int64 AudioSamplesFromBytes(__int64 bytes) const AVS_BakedCode(return AVS_LinkCall(AudioSamplesFromBytes)(bytes))
+ __int64 BytesFromAudioSamples(__int64 samples) const AVS_BakedCode(return AVS_LinkCall(BytesFromAudioSamples)(samples))
+ int AudioChannels() const AVS_BakedCode(return AVS_LinkCall(AudioChannels)())
+ int SampleType() const AVS_BakedCode(return AVS_LinkCall(SampleType)())
+ bool IsSampleType(int testtype) const AVS_BakedCode(return AVS_LinkCall(IsSampleType)(testtype))
+ int SamplesPerSecond() const AVS_BakedCode(return AVS_LinkCall(SamplesPerSecond)())
+ int BytesPerAudioSample() const AVS_BakedCode(return AVS_LinkCall(BytesPerAudioSample)())
+ void SetFieldBased(bool isfieldbased) AVS_BakedCode(AVS_LinkCall_Void(SetFieldBased)(isfieldbased))
+ void Set(int property) AVS_BakedCode(AVS_LinkCall_Void(Set)(property))
+ void Clear(int property) AVS_BakedCode(AVS_LinkCall_Void(Clear)(property))
+ // Subsampling in bitshifts!
+ int GetPlaneWidthSubsampling(int plane) const AVS_BakedCode(return AVS_LinkCall(GetPlaneWidthSubsampling)(plane))
+ int GetPlaneHeightSubsampling(int plane) const AVS_BakedCode(return AVS_LinkCall(GetPlaneHeightSubsampling)(plane))
+ int BitsPerPixel() const AVS_BakedCode(return AVS_LinkCall(BitsPerPixel)())
+
+ int BytesPerChannelSample() const AVS_BakedCode(return AVS_LinkCall(BytesPerChannelSample)())
+
+ // useful mutator
+ void SetFPS(unsigned numerator, unsigned denominator) AVS_BakedCode(AVS_LinkCall_Void(SetFPS)(numerator, denominator))
+
+ // Range protected multiply-divide of FPS
+ void MulDivFPS(unsigned multiplier, unsigned divisor) AVS_BakedCode(AVS_LinkCall_Void(MulDivFPS)(multiplier, divisor))
+
+ // Test for same colorspace
+ bool IsSameColorspace(const VideoInfo& vi) const AVS_BakedCode(return AVS_LinkCall(IsSameColorspace)(vi))
+
+ // AVS+ extensions
+ // 20161005:
+ // Mapping of AVS+ extensions to classic 2.6 functions.
+ // In order to use these extended AVS+ functions for plugins that should work
+ // either with AVS+ or with Classic (8 bit) Avs 2.6 ans earlier AVS+ versions, there is an
+ // automatic fallback mechanism.
+ // From AVS+'s point of view these are not "baked" codes, the primary functions should exist.
+ // Examples:
+ // Is444() is mapped to IsYV24() for classic AVS2.6
+ // ComponentSize() returns constant 1 (1 bytes per pixel component)
+ // BitsPerComponent() returns constant 8 (Classic AVS2.6 is 8 bit only)
+
+ // Returns the number of color channels or planes in a frame
+ int NumComponents() const AVS_BakedCode(return AVS_LinkCallOptDefault(NumComponents, (((AVS_LinkCall(IsYUV)()) && !(AVS_LinkCall(IsY8)())) ? 3 : AVS_LinkCall(BytesFromPixels)(1)) ) )
+
+ // Returns the size in bytes of a single component of a pixel
+ int ComponentSize() const AVS_BakedCode(return AVS_LinkCallOptDefault(ComponentSize, 1))
+
+ // Returns the bit depth of a single component of a pixel
+ int BitsPerComponent() const AVS_BakedCode(return AVS_LinkCallOptDefault(BitsPerComponent, 8))
+
+ // like IsYV24, but bit-depth independent also for YUVA
+ bool Is444() const AVS_BakedCode(return AVS_LinkCallOpt(Is444, IsYV24) )
+
+ // like IsYV16, but bit-depth independent also for YUVA
+ bool Is422() const AVS_BakedCode(return AVS_LinkCallOpt(Is422, IsYV16) )
+
+ // like IsYV12, but bit-depth independent also for YUVA
+ bool Is420() const AVS_BakedCode( return AVS_LinkCallOpt(Is420, IsYV12) )
+
+ // like IsY8, but bit-depth independent
+ bool IsY() const AVS_BakedCode( return AVS_LinkCallOpt(IsY, IsY8) )
+
+ // like IsRGB24 for 16 bit samples
+ bool IsRGB48() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsRGB48, false) )
+
+ // like IsRGB32 for 16 bit samples
+ bool IsRGB64() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsRGB64, false) )
+
+ // YUVA?
+ bool IsYUVA() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsYUVA, false) )
+
+ // Planar RGB?
+ bool IsPlanarRGB() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsPlanarRGB, false) )
+
+ // Planar RGBA?
+ bool IsPlanarRGBA() const AVS_BakedCode( return AVS_LinkCallOptDefault(IsPlanarRGBA, false) )
+
+}; // end struct VideoInfo
+
+
+
+
+// VideoFrameBuffer holds information about a memory block which is used
+// for video data. For efficiency, instances of this class are not deleted
+// when the refcount reaches zero; instead they're stored in a linked list
+// to be reused. The instances are deleted when the corresponding AVS
+// file is closed.
+
+class VideoFrameBuffer {
+ BYTE* data;
+#ifdef SIZETMOD
+ size_t data_size;
+#else
+ int data_size;
+#endif
+ // sequence_number is incremented every time the buffer is changed, so
+ // that stale views can tell they're no longer valid.
+ volatile long sequence_number;
+
+ friend class VideoFrame;
+ friend class Cache;
+ friend class ScriptEnvironment;
+ volatile long refcount;
+
+protected:
+#ifdef SIZETMOD
+ VideoFrameBuffer(size_t size);
+#else
+ VideoFrameBuffer(int size);
+#endif
+ VideoFrameBuffer();
+ ~VideoFrameBuffer();
+
+public:
+ const BYTE* GetReadPtr() const AVS_BakedCode( return AVS_LinkCall(VFBGetReadPtr)() )
+ BYTE* GetWritePtr() AVS_BakedCode( return AVS_LinkCall(VFBGetWritePtr)() )
+#ifdef SIZETMOD
+ size_t GetDataSize() const AVS_BakedCode(return AVS_LinkCall(GetDataSize)())
+#else
+ int GetDataSize() const AVS_BakedCode( return AVS_LinkCall(GetDataSize)() )
+#endif
+ int GetSequenceNumber() const AVS_BakedCode( return AVS_LinkCall(GetSequenceNumber)() )
+ int GetRefcount() const AVS_BakedCode( return AVS_LinkCall(GetRefcount)() )
+
+// Ensure VideoFrameBuffer cannot be publicly assigned
+private:
+ VideoFrameBuffer& operator=(const VideoFrameBuffer&);
+
+}; // end class VideoFrameBuffer
+
+
+// VideoFrame holds a "window" into a VideoFrameBuffer. Operator new
+// is overloaded to recycle class instances.
+
+class VideoFrame {
+ volatile long refcount;
+ VideoFrameBuffer* vfb;
+
+ // Due to technical reasons these members are not const, but should be treated as such.
+ // That means do not modify them once the class has been constructed.
+#ifdef SIZETMOD
+ size_t offset;
+#else
+ int offset;
+#endif
+ int pitch, row_size, height;
+#ifdef SIZETMOD
+ size_t offsetU, offsetV; // U&V offsets are from top of picture.
+#else
+ int offsetU, offsetV; // U&V offsets are from top of picture.
+#endif
+ int pitchUV, row_sizeUV, heightUV; // for Planar RGB offsetU, offsetV is for the 2nd and 3rd Plane.
+ // for Planar RGB pitchUV and row_sizeUV = 0, because when no VideoInfo (MakeWriteable)
+ // the decision on existance of UV is checked by zero pitch
+ // AVS+ extension, does not break plugins if appended here
+#ifdef SIZETMOD
+ size_t offsetA;
+#else
+ int offsetA;
+#endif
+ int pitchA, row_sizeA; // 4th alpha plane support, pitch and row_size is 0 is none
+
+ friend class PVideoFrame;
+ void AddRef();
+ void Release();
+
+ friend class ScriptEnvironment;
+ friend class Cache;
+
+#ifdef SIZETMOD
+ VideoFrame(VideoFrameBuffer* _vfb, size_t _offset, int _pitch, int _row_size, int _height);
+ VideoFrame(VideoFrameBuffer* _vfb, size_t _offset, int _pitch, int _row_size, int _height, size_t _offsetU, size_t _offsetV, int _pitchUV, int _row_sizeUV, int _heightUV);
+ // for Alpha
+ VideoFrame(VideoFrameBuffer* _vfb, size_t _offset, int _pitch, int _row_size, int _height, size_t _offsetU, size_t _offsetV, int _pitchUV, int _row_sizeUV, int _heightUV, size_t _offsetA);
+#else
+ VideoFrame(VideoFrameBuffer* _vfb, int _offset, int _pitch, int _row_size, int _height);
+ VideoFrame(VideoFrameBuffer* _vfb, int _offset, int _pitch, int _row_size, int _height, int _offsetU, int _offsetV, int _pitchUV, int _row_sizeUV, int _heightUV);
+ // for Alpha
+ VideoFrame(VideoFrameBuffer* _vfb, int _offset, int _pitch, int _row_size, int _height, int _offsetU, int _offsetV, int _pitchUV, int _row_sizeUV, int _heightUV, int _offsetA);
+#endif
+
+ void* operator new(size_t size);
+// TESTME: OFFSET U/V may be switched to what could be expected from AVI standard!
+public:
+ int GetPitch(int plane=0) const AVS_BakedCode( return AVS_LinkCall(GetPitch)(plane) )
+ int GetRowSize(int plane=0) const AVS_BakedCode( return AVS_LinkCall(GetRowSize)(plane) )
+ int GetHeight(int plane=0) const AVS_BakedCode( return AVS_LinkCall(GetHeight)(plane) )
+
+ // generally you shouldn't use these three
+ VideoFrameBuffer* GetFrameBuffer() const AVS_BakedCode( return AVS_LinkCall(GetFrameBuffer)() )
+#ifdef SIZETMOD
+ size_t GetOffset(int plane = 0) const AVS_BakedCode(return AVS_LinkCall(GetOffset)(plane))
+#else
+ int GetOffset(int plane=0) const AVS_BakedCode( return AVS_LinkCall(GetOffset)(plane) )
+#endif
+
+ // in plugins use env->SubFrame() -- because implementation code is only available inside avisynth.dll. Doh!
+ VideoFrame* Subframe(int rel_offset, int new_pitch, int new_row_size, int new_height) const;
+ VideoFrame* Subframe(int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int pitchUV) const;
+ // for Alpha
+ VideoFrame* Subframe(int rel_offset, int new_pitch, int new_row_size, int new_height, int rel_offsetU, int rel_offsetV, int pitchUV, int rel_offsetA) const;
+
+ const BYTE* GetReadPtr(int plane=0) const AVS_BakedCode( return AVS_LinkCall(VFGetReadPtr)(plane) )
+ bool IsWritable() const AVS_BakedCode( return AVS_LinkCall(IsWritable)() )
+ BYTE* GetWritePtr(int plane=0) const AVS_BakedCode( return AVS_LinkCall(VFGetWritePtr)(plane) )
+
+ ~VideoFrame() AVS_BakedCode( AVS_LinkCall_Void(VideoFrame_DESTRUCTOR)() )
+#ifdef BUILDING_AVSCORE
+public:
+ void DESTRUCTOR(); /* Damn compiler won't allow taking the address of reserved constructs, make a dummy interlude */
+#endif
+
+// Ensure VideoFrame cannot be publicly assigned
+private:
+ VideoFrame& operator=(const VideoFrame&);
+
+}; // end class VideoFrame
+
+enum CachePolicyHint {
+ // Values 0 to 5 are reserved for old 2.5 plugins
+ // do not use them in new plugins
+
+ // New 2.6 explicitly defined cache hints.
+ CACHE_NOTHING=10, // Do not cache video.
+ CACHE_WINDOW=11, // Hard protect upto X frames within a range of X from the current frame N.
+ CACHE_GENERIC=12, // LRU cache upto X frames.
+ CACHE_FORCE_GENERIC=13, // LRU cache upto X frames, override any previous CACHE_WINDOW.
+
+ CACHE_GET_POLICY=30, // Get the current policy.
+ CACHE_GET_WINDOW=31, // Get the current window h_span.
+ CACHE_GET_RANGE=32, // Get the current generic frame range.
+
+ CACHE_AUDIO=50, // Explicitly cache audio, X byte cache.
+ CACHE_AUDIO_NOTHING=51, // Explicitly do not cache audio.
+ CACHE_AUDIO_NONE=52, // Audio cache off (auto mode), X byte intial cache.
+ CACHE_AUDIO_AUTO=53, // Audio cache on (auto mode), X byte intial cache.
+
+ CACHE_GET_AUDIO_POLICY=70, // Get the current audio policy.
+ CACHE_GET_AUDIO_SIZE=71, // Get the current audio cache size.
+
+ CACHE_PREFETCH_FRAME=100, // Queue request to prefetch frame N.
+ CACHE_PREFETCH_GO=101, // Action video prefetches.
+
+ CACHE_PREFETCH_AUDIO_BEGIN=120, // Begin queue request transaction to prefetch audio (take critical section).
+ CACHE_PREFETCH_AUDIO_STARTLO=121, // Set low 32 bits of start.
+ CACHE_PREFETCH_AUDIO_STARTHI=122, // Set high 32 bits of start.
+ CACHE_PREFETCH_AUDIO_COUNT=123, // Set low 32 bits of length.
+ CACHE_PREFETCH_AUDIO_COMMIT=124, // Enqueue request transaction to prefetch audio (release critical section).
+ CACHE_PREFETCH_AUDIO_GO=125, // Action audio prefetches.
+
+ CACHE_GETCHILD_CACHE_MODE=200, // Cache ask Child for desired video cache mode.
+ CACHE_GETCHILD_CACHE_SIZE=201, // Cache ask Child for desired video cache size.
+ CACHE_GETCHILD_AUDIO_MODE=202, // Cache ask Child for desired audio cache mode.
+ CACHE_GETCHILD_AUDIO_SIZE=203, // Cache ask Child for desired audio cache size.
+
+ CACHE_GETCHILD_COST=220, // Cache ask Child for estimated processing cost.
+ CACHE_COST_ZERO=221, // Child response of zero cost (ptr arithmetic only).
+ CACHE_COST_UNIT=222, // Child response of unit cost (less than or equal 1 full frame blit).
+ CACHE_COST_LOW=223, // Child response of light cost. (Fast)
+ CACHE_COST_MED=224, // Child response of medium cost. (Real time)
+ CACHE_COST_HI=225, // Child response of heavy cost. (Slow)
+
+ CACHE_GETCHILD_THREAD_MODE=240, // Cache ask Child for thread safetyness.
+ CACHE_THREAD_UNSAFE=241, // Only 1 thread allowed for all instances. 2.5 filters default!
+ CACHE_THREAD_CLASS=242, // Only 1 thread allowed for each instance. 2.6 filters default!
+ CACHE_THREAD_SAFE=243, // Allow all threads in any instance.
+ CACHE_THREAD_OWN=244, // Safe but limit to 1 thread, internally threaded.
+
+ CACHE_GETCHILD_ACCESS_COST=260, // Cache ask Child for preferred access pattern.
+ CACHE_ACCESS_RAND=261, // Filter is access order agnostic.
+ CACHE_ACCESS_SEQ0=262, // Filter prefers sequential access (low cost)
+ CACHE_ACCESS_SEQ1=263, // Filter needs sequential access (high cost)
+
+ CACHE_AVSPLUS_CONSTANTS = 500, // Smaller values are reserved for classic Avisynth
+
+ CACHE_DONT_CACHE_ME, // Filters that don't need caching (eg. trim, cache etc.) should return 1 to this request
+ CACHE_SET_MIN_CAPACITY,
+ CACHE_SET_MAX_CAPACITY,
+ CACHE_GET_MIN_CAPACITY,
+ CACHE_GET_MAX_CAPACITY,
+ CACHE_GET_SIZE,
+ CACHE_GET_REQUESTED_CAP,
+ CACHE_GET_CAPACITY,
+ CACHE_GET_MTMODE,
+
+ CACHE_IS_CACHE_REQ,
+ CACHE_IS_CACHE_ANS,
+ CACHE_IS_MTGUARD_REQ,
+ CACHE_IS_MTGUARD_ANS,
+
+ CACHE_USER_CONSTANTS = 1000 // Smaller values are reserved for the core
+
+};
+
+// Base class for all filters.
+class IClip {
+ friend class PClip;
+ friend class AVSValue;
+ volatile long refcnt;
+ void AddRef();
+ void Release();
+public:
+ IClip() : refcnt(0) {}
+ virtual int __stdcall GetVersion() { return AVISYNTH_INTERFACE_VERSION; }
+ virtual PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) = 0;
+ virtual bool __stdcall GetParity(int n) = 0; // return field parity if field_based, else parity of first field in frame
+ virtual void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) = 0; // start and count are in samples
+ /* Need to check GetVersion first, pre v5 will return random crap from EAX reg. */
+ virtual int __stdcall SetCacheHints(int cachehints,int frame_range) = 0 ; // We do not pass cache requests upwards, only to the next filter.
+ virtual const VideoInfo& __stdcall GetVideoInfo() = 0;
+ virtual AVSC_CC ~IClip() {}
+}; // end class IClip
+
+
+// smart pointer to IClip
+class PClip {
+
+ IClip* p;
+
+ IClip* GetPointerWithAddRef() const;
+ friend class AVSValue;
+ friend class VideoFrame;
+
+ void Init(IClip* x);
+ void Set(IClip* x);
+
+public:
+ PClip() AVS_BakedCode( AVS_LinkCall_Void(PClip_CONSTRUCTOR0)() )
+ PClip(const PClip& x) AVS_BakedCode( AVS_LinkCall_Void(PClip_CONSTRUCTOR1)(x) )
+ PClip(IClip* x) AVS_BakedCode( AVS_LinkCall_Void(PClip_CONSTRUCTOR2)(x) )
+ void operator=(IClip* x) AVS_BakedCode( AVS_LinkCall_Void(PClip_OPERATOR_ASSIGN0)(x) )
+ void operator=(const PClip& x) AVS_BakedCode( AVS_LinkCall_Void(PClip_OPERATOR_ASSIGN1)(x) )
+
+ IClip* operator->() const { return p; }
+
+ // useful in conditional expressions
+ operator void*() const { return p; }
+ bool operator!() const { return !p; }
+
+ ~PClip() AVS_BakedCode( AVS_LinkCall_Void(PClip_DESTRUCTOR)() )
+#ifdef BUILDING_AVSCORE
+public:
+ void CONSTRUCTOR0(); /* Damn compiler won't allow taking the address of reserved constructs, make a dummy interlude */
+ void CONSTRUCTOR1(const PClip& x);
+ void CONSTRUCTOR2(IClip* x);
+ void OPERATOR_ASSIGN0(IClip* x);
+ void OPERATOR_ASSIGN1(const PClip& x);
+ void DESTRUCTOR();
+#endif
+}; // end class PClip
+
+
+// smart pointer to VideoFrame
+class PVideoFrame {
+
+ VideoFrame* p;
+
+ void Init(VideoFrame* x);
+ void Set(VideoFrame* x);
+
+public:
+ PVideoFrame() AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_CONSTRUCTOR0)() )
+ PVideoFrame(const PVideoFrame& x) AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_CONSTRUCTOR1)(x) )
+ PVideoFrame(VideoFrame* x) AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_CONSTRUCTOR2)(x) )
+ void operator=(VideoFrame* x) AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_OPERATOR_ASSIGN0)(x) )
+ void operator=(const PVideoFrame& x) AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_OPERATOR_ASSIGN1)(x) )
+
+ VideoFrame* operator->() const { return p; }
+
+ // for conditional expressions
+ operator void*() const { return p; }
+ bool operator!() const { return !p; }
+
+ ~PVideoFrame() AVS_BakedCode( AVS_LinkCall_Void(PVideoFrame_DESTRUCTOR)() )
+#ifdef BUILDING_AVSCORE
+public:
+ void CONSTRUCTOR0(); /* Damn compiler won't allow taking the address of reserved constructs, make a dummy interlude */
+ void CONSTRUCTOR1(const PVideoFrame& x);
+ void CONSTRUCTOR2(VideoFrame* x);
+ void OPERATOR_ASSIGN0(VideoFrame* x);
+ void OPERATOR_ASSIGN1(const PVideoFrame& x);
+ void DESTRUCTOR();
+#endif
+}; // end class PVideoFrame
+
+
+class AVSValue {
+public:
+
+ AVSValue() AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR0)() )
+ AVSValue(IClip* c) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR1)(c) )
+ AVSValue(const PClip& c) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR2)(c) )
+ AVSValue(bool b) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR3)(b) )
+ AVSValue(int i) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR4)(i) )
+// AVSValue(__int64 l);
+ AVSValue(float f) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR5)(f) )
+ AVSValue(double f) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR6)(f) )
+ AVSValue(const char* s) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR7)(s) )
+ AVSValue(const AVSValue* a, int size) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR8)(a, size) )
+ AVSValue(const AVSValue& a, int size) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR8)(&a, size) )
+ AVSValue(const AVSValue& v) AVS_BakedCode( AVS_LinkCall_Void(AVSValue_CONSTRUCTOR9)(v) )
+
+ ~AVSValue() AVS_BakedCode( AVS_LinkCall_Void(AVSValue_DESTRUCTOR)() )
+ AVSValue& operator=(const AVSValue& v) AVS_BakedCode( return AVS_LinkCallV(AVSValue_OPERATOR_ASSIGN)(v) )
+
+ // Note that we transparently allow 'int' to be treated as 'float'.
+ // There are no int<->bool conversions, though.
+
+ bool Defined() const AVS_BakedCode( return AVS_LinkCall(Defined)() )
+ bool IsClip() const AVS_BakedCode( return AVS_LinkCall(IsClip)() )
+ bool IsBool() const AVS_BakedCode( return AVS_LinkCall(IsBool)() )
+ bool IsInt() const AVS_BakedCode( return AVS_LinkCall(IsInt)() )
+// bool IsLong() const;
+ bool IsFloat() const AVS_BakedCode( return AVS_LinkCall(IsFloat)() )
+ bool IsString() const AVS_BakedCode( return AVS_LinkCall(IsString)() )
+ bool IsArray() const AVS_BakedCode( return AVS_LinkCall(IsArray)() )
+
+ PClip AsClip() const AVS_BakedCode( return AVS_LinkCall(AsClip)() )
+ bool AsBool() const AVS_BakedCode( return AVS_LinkCall(AsBool1)() )
+ int AsInt() const AVS_BakedCode( return AVS_LinkCall(AsInt1)() )
+// int AsLong() const;
+ const char* AsString() const AVS_BakedCode( return AVS_LinkCall(AsString1)() )
+ double AsFloat() const AVS_BakedCode( return AVS_LinkCall(AsFloat1)() )
+ float AsFloatf() const AVS_BakedCode( return float( AVS_LinkCall(AsFloat1)() ) )
+
+ bool AsBool(bool def) const AVS_BakedCode( return AVS_LinkCall(AsBool2)(def) )
+ int AsInt(int def) const AVS_BakedCode( return AVS_LinkCall(AsInt2)(def) )
+ double AsDblDef(double def) const AVS_BakedCode( return AVS_LinkCall(AsDblDef)(def) ) // Value is still a float
+ double AsFloat(float def) const AVS_BakedCode( return AVS_LinkCall(AsFloat2)(def) )
+ float AsFloatf(float def) const AVS_BakedCode( return float( AVS_LinkCall(AsFloat2)(def) ) )
+ const char* AsString(const char* def) const AVS_BakedCode( return AVS_LinkCall(AsString2)(def) )
+
+ int ArraySize() const AVS_BakedCode( return AVS_LinkCall(ArraySize)() )
+
+ const AVSValue& operator[](int index) const AVS_BakedCode( return AVS_LinkCallV(AVSValue_OPERATOR_INDEX)(index) )
+
+private:
+
+ short type; // 'a'rray, 'c'lip, 'b'ool, 'i'nt, 'f'loat, 's'tring, 'v'oid, or RFU: 'l'ong ('d'ouble)
+ short array_size;
+ union {
+ IClip* clip;
+ bool boolean;
+ int integer;
+ float floating_pt;
+ const char* string;
+ const AVSValue* array;
+ #ifdef X86_64
+ // if ever, only x64 will support. It breaks struct size on 32 bit
+ __int64 longlong; // 8 bytes
+ double double_pt; // 8 bytes
+ #endif
+ };
+
+ void Assign(const AVSValue* src, bool init);
+#ifdef BUILDING_AVSCORE
+public:
+ void CONSTRUCTOR0(); /* Damn compiler won't allow taking the address of reserved constructs, make a dummy interlude */
+ void CONSTRUCTOR1(IClip* c);
+ void CONSTRUCTOR2(const PClip& c);
+ void CONSTRUCTOR3(bool b);
+ void CONSTRUCTOR4(int i);
+ void CONSTRUCTOR5(float f);
+ void CONSTRUCTOR6(double f);
+ void CONSTRUCTOR7(const char* s);
+ void CONSTRUCTOR8(const AVSValue* a, int size);
+ void CONSTRUCTOR9(const AVSValue& v);
+ void DESTRUCTOR();
+ AVSValue& OPERATOR_ASSIGN(const AVSValue& v);
+ const AVSValue& OPERATOR_INDEX(int index) const;
+
+ bool AsBool1() const;
+ int AsInt1() const;
+ const char* AsString1() const;
+ double AsFloat1() const;
+
+ bool AsBool2(bool def) const;
+ int AsInt2(int def) const;
+ double AsFloat2(float def) const;
+ const char* AsString2(const char* def) const;
+
+#ifdef NEW_AVSVALUE
+ void MarkArrayAsC();
+ void CONSTRUCTOR10(const AVSValue& v, bool c_arrays);
+ AVSValue(const AVSValue& v, bool c_arrays);
+ void Assign2(const AVSValue* src, bool init, bool c_arrays);
+#endif
+
+#endif
+}; // end class AVSValue
+
+#undef CALL_MEMBER_FN
+#undef AVS_LinkCallOptDefault
+#undef AVS_LinkCallOpt
+#undef AVS_LinkCallV
+#undef AVS_LinkCall
+#undef AVS_BakedCode
+
+#define AVS_UNUSED(x) x
+
+// instantiable null filter
+class GenericVideoFilter : public IClip {
+protected:
+ PClip child;
+ VideoInfo vi;
+public:
+ GenericVideoFilter(PClip _child) : child(_child) { vi = child->GetVideoInfo(); }
+ PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env) { return child->GetFrame(n, env); }
+ void __stdcall GetAudio(void* buf, __int64 start, __int64 count, IScriptEnvironment* env) { child->GetAudio(buf, start, count, env); }
+ const VideoInfo& __stdcall GetVideoInfo() { return vi; }
+ bool __stdcall GetParity(int n) { return child->GetParity(n); }
+ int __stdcall SetCacheHints(int cachehints, int frame_range) { AVS_UNUSED(cachehints); AVS_UNUSED(frame_range); return 0; }; // We do not pass cache requests upwards, only to the next filter.
+};
+
+
+
+
+#include
+
+
+
+class IScriptEnvironment {
+public:
+ virtual AVSC_CC ~IScriptEnvironment() {}
+
+ virtual /*static*/ int __stdcall GetCPUFlags() = 0;
+
+ virtual char* __stdcall SaveString(const char* s, int length = -1) = 0;
+ virtual char* __stdcall Sprintf(const char* fmt, ...) = 0;
+ // note: val is really a va_list; I hope everyone typedefs va_list to a pointer
+ virtual char* __stdcall VSprintf(const char* fmt, void* val) = 0;
+
+ __declspec(noreturn) virtual void __stdcall ThrowError(const char* fmt, ...) = 0;
+
+ class NotFound /*exception*/ {}; // thrown by Invoke and GetVar
+
+ typedef AVSValue (__cdecl *ApplyFunc)(AVSValue args, void* user_data, IScriptEnvironment* env);
+
+ virtual void __stdcall AddFunction(const char* name, const char* params, ApplyFunc apply, void* user_data) = 0;
+ virtual bool __stdcall FunctionExists(const char* name) = 0;
+ virtual AVSValue __stdcall Invoke(const char* name, const AVSValue args, const char* const* arg_names=0) = 0;
+
+ virtual AVSValue __stdcall GetVar(const char* name) = 0;
+ virtual bool __stdcall SetVar(const char* name, const AVSValue& val) = 0;
+ virtual bool __stdcall SetGlobalVar(const char* name, const AVSValue& val) = 0;
+
+ virtual void __stdcall PushContext(int level=0) = 0;
+ virtual void __stdcall PopContext() = 0;
+
+ // align should be 4 or 8
+ virtual PVideoFrame __stdcall NewVideoFrame(const VideoInfo& vi, int align=FRAME_ALIGN) = 0;
+
+ virtual bool __stdcall MakeWritable(PVideoFrame* pvf) = 0;
+
+ virtual void __stdcall BitBlt(BYTE* dstp, int dst_pitch, const BYTE* srcp, int src_pitch, int row_size, int height) = 0;
+
+ typedef void (__cdecl *ShutdownFunc)(void* user_data, IScriptEnvironment* env);
+ virtual void __stdcall AtExit(ShutdownFunc function, void* user_data) = 0;
+
+ virtual void __stdcall CheckVersion(int version = AVISYNTH_INTERFACE_VERSION) = 0;
+
+ virtual PVideoFrame __stdcall Subframe(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size, int new_height) = 0;
+
+ virtual int __stdcall SetMemoryMax(int mem) = 0;
+
+ virtual int __stdcall SetWorkingDir(const char * newdir) = 0;
+
+ virtual void* __stdcall ManageCache(int key, void* data) = 0;
+
+ enum PlanarChromaAlignmentMode {
+ PlanarChromaAlignmentOff,
+ PlanarChromaAlignmentOn,
+ PlanarChromaAlignmentTest };
+
+ virtual bool __stdcall PlanarChromaAlignment(PlanarChromaAlignmentMode key) = 0;
+
+ virtual PVideoFrame __stdcall SubframePlanar(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size,
+ int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV) = 0;
+
+ virtual void __stdcall DeleteScriptEnvironment() = 0;
+
+ virtual void __stdcall ApplyMessage(PVideoFrame* frame, const VideoInfo& vi, const char* message, int size,
+ int textcolor, int halocolor, int bgcolor) = 0;
+
+ virtual const AVS_Linkage* const __stdcall GetAVSLinkage() = 0;
+
+ // noThrow version of GetVar
+ virtual AVSValue __stdcall GetVarDef(const char* name, const AVSValue& def = AVSValue()) = 0;
+
+}; // end class IScriptEnvironment
+
+
+enum MtMode
+{
+ MT_INVALID = 0,
+ MT_NICE_FILTER = 1,
+ MT_MULTI_INSTANCE = 2,
+ MT_SERIALIZED = 3,
+ MT_SPECIAL_MT = 4,
+ MT_MODE_COUNT = 5
+};
+
+class IJobCompletion
+{
+public:
+
+ virtual __stdcall ~IJobCompletion() {}
+ virtual void __stdcall Wait() = 0;
+ virtual AVSValue __stdcall Get(size_t i) = 0;
+ virtual size_t __stdcall Size() const = 0;
+ virtual size_t __stdcall Capacity() const = 0;
+ virtual void __stdcall Reset() = 0;
+ virtual void __stdcall Destroy() = 0;
+};
+
+class IScriptEnvironment2;
+class Prefetcher;
+typedef AVSValue (*ThreadWorkerFuncPtr)(IScriptEnvironment2* env, void* data);
+
+enum AvsEnvProperty
+{
+ AEP_PHYSICAL_CPUS = 1,
+ AEP_LOGICAL_CPUS = 2,
+ AEP_THREADPOOL_THREADS = 3,
+ AEP_FILTERCHAIN_THREADS = 4,
+ AEP_THREAD_ID = 5,
+ AEP_VERSION = 6
+};
+
+enum AvsAllocType
+{
+ AVS_NORMAL_ALLOC = 1,
+ AVS_POOLED_ALLOC = 2
+};
+
+/* -----------------------------------------------------------------------------
+ Note to plugin authors: The interface in IScriptEnvironment2 is
+ preliminary / under construction / only for testing / non-final etc.!
+ As long as you see this note here, IScriptEnvironment2 might still change,
+ in which case your plugin WILL break. This also means that you are welcome
+ to test it and give your feedback about any ideas, improvements, or issues
+ you might have.
+ ----------------------------------------------------------------------------- */
+class AVSFunction;
+class IScriptEnvironment2 : public IScriptEnvironment{
+public:
+ virtual ~IScriptEnvironment2() {}
+
+ // Generic system to ask for various properties
+ virtual size_t __stdcall GetProperty(AvsEnvProperty prop) = 0;
+
+ // Returns TRUE and the requested variable. If the method fails, returns FALSE and does not touch 'val'.
+ virtual bool __stdcall GetVar(const char* name, AVSValue *val) const = 0;
+
+ // Return the value of the requested variable.
+ // If the variable was not found or had the wrong type,
+ // return the supplied default value.
+ virtual bool __stdcall GetVar(const char* name, bool def) const = 0;
+ virtual int __stdcall GetVar(const char* name, int def) const = 0;
+ virtual double __stdcall GetVar(const char* name, double def) const = 0;
+ virtual const char* __stdcall GetVar(const char* name, const char* def) const = 0;
+
+ // Plugin functions
+ virtual bool __stdcall LoadPlugin(const char* filePath, bool throwOnError, AVSValue *result) = 0;
+ virtual void __stdcall AddAutoloadDir(const char* dirPath, bool toFront) = 0;
+ virtual void __stdcall ClearAutoloadDirs() = 0;
+ virtual void __stdcall AutoloadPlugins() = 0;
+ virtual void __stdcall AddFunction(const char* name, const char* params, ApplyFunc apply, void* user_data, const char *exportVar) = 0;
+ virtual bool __stdcall InternalFunctionExists(const char* name) = 0;
+
+ // Threading
+ virtual void __stdcall SetFilterMTMode(const char* filter, MtMode mode, bool force) = 0; // If filter is "DEFAULT_MT_MODE", sets the default MT mode
+ virtual IJobCompletion* __stdcall NewCompletion(size_t capacity) = 0;
+ virtual void __stdcall ParallelJob(ThreadWorkerFuncPtr jobFunc, void* jobData, IJobCompletion* completion) = 0;
+
+ // This version of Invoke will return false instead of throwing NotFound().
+ virtual bool __stdcall Invoke(AVSValue *result, const char* name, const AVSValue& args, const char* const* arg_names=0) = 0;
+
+ // Support functions
+ virtual void* __stdcall Allocate(size_t nBytes, size_t alignment, AvsAllocType type) = 0;
+ virtual void __stdcall Free(void* ptr) = 0;
+
+ // These lines are needed so that we can overload the older functions from IScriptEnvironment.
+ using IScriptEnvironment::Invoke;
+ using IScriptEnvironment::AddFunction;
+ using IScriptEnvironment::GetVar;
+
+ virtual PVideoFrame __stdcall SubframePlanarA(PVideoFrame src, int rel_offset, int new_pitch, int new_row_size,
+ int new_height, int rel_offsetU, int rel_offsetV, int new_pitchUV, int rel_offsetA) = 0;
+
+}; // end class IScriptEnvironment2
+
+
+// avisynth.dll exports this; it's a way to use it as a library, without
+// writing an AVS script or without going through AVIFile.
+AVSC_API(IScriptEnvironment*, CreateScriptEnvironment)(int version = AVISYNTH_INTERFACE_VERSION);
+
+
+// These are some global variables you can set in your script to change AviSynth's behavior.
+#define VARNAME_AllowFloatAudio "OPT_AllowFloatAudio" // Allow WAVE_FORMAT_IEEE_FLOAT audio output
+#define VARNAME_VDubPlanarHack "OPT_VDubPlanarHack" // Hack YV16 and YV24 chroma plane order for old VDub's
+#define VARNAME_AVIPadScanlines "OPT_AVIPadScanlines" // Have scanlines mod4 padded in all pixel formats
+#define VARNAME_UseWaveExtensible "OPT_UseWaveExtensible" // Use WAVEFORMATEXTENSIBLE when describing audio to Windows
+#define VARNAME_dwChannelMask "OPT_dwChannelMask" // Integer audio channel mask. See description of WAVEFORMATEXTENSIBLE for more info.
+#define VARNAME_Enable_V210 "OPT_Enable_V210" // AVS+ use V210 instead of P210 (VfW)
+#define VARNAME_Enable_Y3_10_10 "OPT_Enable_Y3_10_10" // AVS+ use Y3[10][10] instead of P210 (VfW)
+#define VARNAME_Enable_Y3_10_16 "OPT_Enable_Y3_10_16" // AVS+ use Y3[10][16] instead of P216 (VfW)
+#define VARNAME_Enable_b64a "OPT_Enable_b64a" // AVS+ use b64a instead of BRA[64] (VfW)
+#define VARNAME_Enable_PlanarToPackedRGB "OPT_Enable_PlanarToPackedRGB" // AVS+ convert Planar RGB to packed RGB (VfW)
+
+// C exports
+#include
+AVSC_API(IScriptEnvironment2*, CreateScriptEnvironment2)(int version = AVISYNTH_INTERFACE_VERSION);
+
+#ifndef BUILDING_AVSCORE
+#undef AVS_UNUSED
+#endif
+
+#pragma pack(pop)
+
+#endif //__AVISYNTH_6_H__
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/alignment.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/alignment.h
index 68b4cfee40..cd87ca9cfe 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/alignment.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/alignment.h
@@ -1,134 +1,134 @@
-// Avisynth C Interface Version 0.20
-// Copyright 2003 Kevin Atkinson
-
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// As a special exception, I give you permission to link to the
-// Avisynth C interface with independent modules that communicate with
-// the Avisynth C interface solely through the interfaces defined in
-// avisynth_c.h, regardless of the license terms of these independent
-// modules, and to copy and distribute the resulting combined work
-// under terms of your choice, provided that every copy of the
-// combined work is accompanied by a complete copy of the source code
-// of the Avisynth C interface and Avisynth itself (with the version
-// used to produce the combined work), being distributed under the
-// terms of the GNU General Public License plus this exception. An
-// independent module is a module which is not derived from or based
-// on Avisynth C Interface, such as 3rd-party filters, import and
-// export plugins, or graphical user interfaces.
-
-#ifndef AVS_ALIGNMENT_H
-#define AVS_ALIGNMENT_H
-
-// Functions and macros to help work with alignment requirements.
-
-// Tells if a number is a power of two.
-#define IS_POWER2(n) ((n) && !((n) & ((n) - 1)))
-
-// Tells if the pointer "ptr" is aligned to "align" bytes.
-#define IS_PTR_ALIGNED(ptr, align) (((uintptr_t)ptr & ((uintptr_t)(align-1))) == 0)
-
-// Rounds up the number "n" to the next greater multiple of "align"
-#define ALIGN_NUMBER(n, align) (((n) + (align)-1) & (~((align)-1)))
-
-// Rounds up the pointer address "ptr" to the next greater multiple of "align"
-#define ALIGN_POINTER(ptr, align) (((uintptr_t)(ptr) + (align)-1) & (~(uintptr_t)((align)-1)))
-
-#ifdef __cplusplus
-
-#include
-#include
-#include
-#include
-
-#if defined(MSVC)
- // needed for VS2013, otherwise C++11 'alignas' works
- #define avs_alignas(x) __declspec(align(x))
-#else
- // assumes C++11 support
- #define avs_alignas(x) alignas(x)
-#endif
-
-template
-static bool IsPtrAligned(T* ptr, size_t align)
-{
- assert(IS_POWER2(align));
- return (bool)IS_PTR_ALIGNED(ptr, align);
-}
-
-template
-static T AlignNumber(T n, T align)
-{
- assert(IS_POWER2(align));
- return ALIGN_NUMBER(n, align);
-}
-
-template
-static T* AlignPointer(T* ptr, size_t align)
-{
- assert(IS_POWER2(align));
- return (T*)ALIGN_POINTER(ptr, align);
-}
-
-extern "C"
-{
-#else
-#include
-#endif // __cplusplus
-
-// Returns a new buffer that is at least the size "nbytes".
-// The buffer will be aligned to "align" bytes.
-// Returns NULL on error. On successful allocation,
-// the returned buffer must be freed using "avs_free".
-inline void* avs_malloc(size_t nbytes, size_t align)
-{
- if (!IS_POWER2(align))
- return NULL;
-
- size_t offset = sizeof(void*) + align - 1;
-
- void *orig = malloc(nbytes + offset);
- if (orig == NULL)
- return NULL;
-
- void **aligned = (void**)(((uintptr_t)orig + (uintptr_t)offset) & (~(uintptr_t)(align-1)));
- aligned[-1] = orig;
- return aligned;
-}
-
-// Buffers allocated using "avs_malloc" must be freed
-// using "avs_free" instead of "free".
-inline void avs_free(void *ptr)
-{
- // Mirroring free()'s semantic requires us to accept NULLs
- if (ptr == NULL)
- return;
-
- free(((void**)ptr)[-1]);
-}
-
-#ifdef __cplusplus
-} // extern "C"
-
-// The point of these undef's is to force using the template functions
-// if we are in C++ mode. For C, the user can rely only on the macros.
-#undef IS_PTR_ALIGNED
-#undef ALIGN_NUMBER
-#undef ALIGN_POINTER
-
-#endif // __cplusplus
-
-#endif //AVS_ALIGNMENT_H
+// Avisynth C Interface Version 0.20
+// Copyright 2003 Kevin Atkinson
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
+// http://www.gnu.org/copyleft/gpl.html .
+//
+// As a special exception, I give you permission to link to the
+// Avisynth C interface with independent modules that communicate with
+// the Avisynth C interface solely through the interfaces defined in
+// avisynth_c.h, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting combined work
+// under terms of your choice, provided that every copy of the
+// combined work is accompanied by a complete copy of the source code
+// of the Avisynth C interface and Avisynth itself (with the version
+// used to produce the combined work), being distributed under the
+// terms of the GNU General Public License plus this exception. An
+// independent module is a module which is not derived from or based
+// on Avisynth C Interface, such as 3rd-party filters, import and
+// export plugins, or graphical user interfaces.
+
+#ifndef AVS_ALIGNMENT_H
+#define AVS_ALIGNMENT_H
+
+// Functions and macros to help work with alignment requirements.
+
+// Tells if a number is a power of two.
+#define IS_POWER2(n) ((n) && !((n) & ((n) - 1)))
+
+// Tells if the pointer "ptr" is aligned to "align" bytes.
+#define IS_PTR_ALIGNED(ptr, align) (((uintptr_t)ptr & ((uintptr_t)(align-1))) == 0)
+
+// Rounds up the number "n" to the next greater multiple of "align"
+#define ALIGN_NUMBER(n, align) (((n) + (align)-1) & (~((align)-1)))
+
+// Rounds up the pointer address "ptr" to the next greater multiple of "align"
+#define ALIGN_POINTER(ptr, align) (((uintptr_t)(ptr) + (align)-1) & (~(uintptr_t)((align)-1)))
+
+#ifdef __cplusplus
+
+#include
+#include
+#include
+#include
+
+#if defined(MSVC)
+ // needed for VS2013, otherwise C++11 'alignas' works
+ #define avs_alignas(x) __declspec(align(x))
+#else
+ // assumes C++11 support
+ #define avs_alignas(x) alignas(x)
+#endif
+
+template
+static bool IsPtrAligned(T* ptr, size_t align)
+{
+ assert(IS_POWER2(align));
+ return (bool)IS_PTR_ALIGNED(ptr, align);
+}
+
+template
+static T AlignNumber(T n, T align)
+{
+ assert(IS_POWER2(align));
+ return ALIGN_NUMBER(n, align);
+}
+
+template
+static T* AlignPointer(T* ptr, size_t align)
+{
+ assert(IS_POWER2(align));
+ return (T*)ALIGN_POINTER(ptr, align);
+}
+
+extern "C"
+{
+#else
+#include
+#endif // __cplusplus
+
+// Returns a new buffer that is at least the size "nbytes".
+// The buffer will be aligned to "align" bytes.
+// Returns NULL on error. On successful allocation,
+// the returned buffer must be freed using "avs_free".
+inline void* avs_malloc(size_t nbytes, size_t align)
+{
+ if (!IS_POWER2(align))
+ return NULL;
+
+ size_t offset = sizeof(void*) + align - 1;
+
+ void *orig = malloc(nbytes + offset);
+ if (orig == NULL)
+ return NULL;
+
+ void **aligned = (void**)(((uintptr_t)orig + (uintptr_t)offset) & (~(uintptr_t)(align-1)));
+ aligned[-1] = orig;
+ return aligned;
+}
+
+// Buffers allocated using "avs_malloc" must be freed
+// using "avs_free" instead of "free".
+inline void avs_free(void *ptr)
+{
+ // Mirroring free()'s semantic requires us to accept NULLs
+ if (ptr == NULL)
+ return;
+
+ free(((void**)ptr)[-1]);
+}
+
+#ifdef __cplusplus
+} // extern "C"
+
+// The point of these undef's is to force using the template functions
+// if we are in C++ mode. For C, the user can rely only on the macros.
+#undef IS_PTR_ALIGNED
+#undef ALIGN_NUMBER
+#undef ALIGN_POINTER
+
+#endif // __cplusplus
+
+#endif //AVS_ALIGNMENT_H
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/capi.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/capi.h
index e735962baf..f45bdcbde1 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/capi.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/capi.h
@@ -1,66 +1,66 @@
-// Avisynth C Interface Version 0.20
-// Copyright 2003 Kevin Atkinson
-
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// As a special exception, I give you permission to link to the
-// Avisynth C interface with independent modules that communicate with
-// the Avisynth C interface solely through the interfaces defined in
-// avisynth_c.h, regardless of the license terms of these independent
-// modules, and to copy and distribute the resulting combined work
-// under terms of your choice, provided that every copy of the
-// combined work is accompanied by a complete copy of the source code
-// of the Avisynth C interface and Avisynth itself (with the version
-// used to produce the combined work), being distributed under the
-// terms of the GNU General Public License plus this exception. An
-// independent module is a module which is not derived from or based
-// on Avisynth C Interface, such as 3rd-party filters, import and
-// export plugins, or graphical user interfaces.
-
-#ifndef AVS_CAPI_H
-#define AVS_CAPI_H
-
-#ifdef __cplusplus
-# define EXTERN_C extern "C"
-#else
-# define EXTERN_C
-#endif
-
-#ifdef MSVC
-#ifndef AVSC_USE_STDCALL
-# define AVSC_CC __cdecl
-#else
-# define AVSC_CC __stdcall
-#endif
-#else
-# define AVSC_CC
-#endif
-
-#define AVSC_INLINE static __inline
-
-#ifdef BUILDING_AVSCORE
-# define AVSC_EXPORT __declspec(dllexport)
-# define AVSC_API(ret, name) EXTERN_C AVSC_EXPORT ret AVSC_CC name
-#else
-# define AVSC_EXPORT EXTERN_C __declspec(dllexport)
-# ifndef AVSC_NO_DECLSPEC
-# define AVSC_API(ret, name) EXTERN_C __declspec(dllimport) ret AVSC_CC name
-# else
-# define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func)
-# endif
-#endif
-
-#endif //AVS_CAPI_H
+// Avisynth C Interface Version 0.20
+// Copyright 2003 Kevin Atkinson
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
+// http://www.gnu.org/copyleft/gpl.html .
+//
+// As a special exception, I give you permission to link to the
+// Avisynth C interface with independent modules that communicate with
+// the Avisynth C interface solely through the interfaces defined in
+// avisynth_c.h, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting combined work
+// under terms of your choice, provided that every copy of the
+// combined work is accompanied by a complete copy of the source code
+// of the Avisynth C interface and Avisynth itself (with the version
+// used to produce the combined work), being distributed under the
+// terms of the GNU General Public License plus this exception. An
+// independent module is a module which is not derived from or based
+// on Avisynth C Interface, such as 3rd-party filters, import and
+// export plugins, or graphical user interfaces.
+
+#ifndef AVS_CAPI_H
+#define AVS_CAPI_H
+
+#ifdef __cplusplus
+# define EXTERN_C extern "C"
+#else
+# define EXTERN_C
+#endif
+
+#ifdef MSVC
+#ifndef AVSC_USE_STDCALL
+# define AVSC_CC __cdecl
+#else
+# define AVSC_CC __stdcall
+#endif
+#else
+# define AVSC_CC
+#endif
+
+#define AVSC_INLINE static __inline
+
+#ifdef BUILDING_AVSCORE
+# define AVSC_EXPORT __declspec(dllexport)
+# define AVSC_API(ret, name) EXTERN_C AVSC_EXPORT ret AVSC_CC name
+#else
+# define AVSC_EXPORT EXTERN_C __declspec(dllexport)
+# ifndef AVSC_NO_DECLSPEC
+# define AVSC_API(ret, name) EXTERN_C __declspec(dllimport) ret AVSC_CC name
+# else
+# define AVSC_API(ret, name) typedef ret (AVSC_CC *name##_func)
+# endif
+#endif
+
+#endif //AVS_CAPI_H
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/config.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/config.h
index fc12547f97..a7d3e692ea 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/config.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/config.h
@@ -1,70 +1,70 @@
-// Avisynth C Interface Version 0.20
-// Copyright 2003 Kevin Atkinson
-
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// As a special exception, I give you permission to link to the
-// Avisynth C interface with independent modules that communicate with
-// the Avisynth C interface solely through the interfaces defined in
-// avisynth_c.h, regardless of the license terms of these independent
-// modules, and to copy and distribute the resulting combined work
-// under terms of your choice, provided that every copy of the
-// combined work is accompanied by a complete copy of the source code
-// of the Avisynth C interface and Avisynth itself (with the version
-// used to produce the combined work), being distributed under the
-// terms of the GNU General Public License plus this exception. An
-// independent module is a module which is not derived from or based
-// on Avisynth C Interface, such as 3rd-party filters, import and
-// export plugins, or graphical user interfaces.
-
-#ifndef AVS_CONFIG_H
-#define AVS_CONFIG_H
-
-// Undefine this to get cdecl calling convention
-#define AVSC_USE_STDCALL 1
-
-// NOTE TO PLUGIN AUTHORS:
-// Because FRAME_ALIGN can be substantially higher than the alignment
-// a plugin actually needs, plugins should not use FRAME_ALIGN to check for
-// alignment. They should always request the exact alignment value they need.
-// This is to make sure that plugins work over the widest range of AviSynth
-// builds possible.
-#define FRAME_ALIGN 64
-
-#if defined(_M_AMD64) || defined(__x86_64)
-# define X86_64
-#elif defined(_M_IX86) || defined(__i386__)
-# define X86_32
-#else
-# error Unsupported CPU architecture.
-#endif
-
-#if defined(_MSC_VER)
-# define MSVC
-#elif defined(__GNUC__)
-# define GCC
-#elif defined(__clang__)
-# define CLANG
-#else
-# error Unsupported compiler.
-#endif
-
-#if defined(GCC)
-# undef __forceinline
-# define __forceinline inline
-#endif
-
-#endif //AVS_CONFIG_H
+// Avisynth C Interface Version 0.20
+// Copyright 2003 Kevin Atkinson
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
+// http://www.gnu.org/copyleft/gpl.html .
+//
+// As a special exception, I give you permission to link to the
+// Avisynth C interface with independent modules that communicate with
+// the Avisynth C interface solely through the interfaces defined in
+// avisynth_c.h, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting combined work
+// under terms of your choice, provided that every copy of the
+// combined work is accompanied by a complete copy of the source code
+// of the Avisynth C interface and Avisynth itself (with the version
+// used to produce the combined work), being distributed under the
+// terms of the GNU General Public License plus this exception. An
+// independent module is a module which is not derived from or based
+// on Avisynth C Interface, such as 3rd-party filters, import and
+// export plugins, or graphical user interfaces.
+
+#ifndef AVS_CONFIG_H
+#define AVS_CONFIG_H
+
+// Undefine this to get cdecl calling convention
+#define AVSC_USE_STDCALL 1
+
+// NOTE TO PLUGIN AUTHORS:
+// Because FRAME_ALIGN can be substantially higher than the alignment
+// a plugin actually needs, plugins should not use FRAME_ALIGN to check for
+// alignment. They should always request the exact alignment value they need.
+// This is to make sure that plugins work over the widest range of AviSynth
+// builds possible.
+#define FRAME_ALIGN 64
+
+#if defined(_M_AMD64) || defined(__x86_64)
+# define X86_64
+#elif defined(_M_IX86) || defined(__i386__)
+# define X86_32
+#else
+# error Unsupported CPU architecture.
+#endif
+
+#if defined(_MSC_VER)
+# define MSVC
+#elif defined(__GNUC__)
+# define GCC
+#elif defined(__clang__)
+# define CLANG
+#else
+# error Unsupported compiler.
+#endif
+
+#if defined(GCC)
+# undef __forceinline
+# define __forceinline inline
+#endif
+
+#endif //AVS_CONFIG_H
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/cpuid.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/cpuid.h
index 8559395cdc..b6354442fd 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/cpuid.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/cpuid.h
@@ -1,80 +1,80 @@
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// Linking Avisynth statically or dynamically with other modules is making a
-// combined work based on Avisynth. Thus, the terms and conditions of the GNU
-// General Public License cover the whole combination.
-//
-// As a special exception, the copyright holders of Avisynth give you
-// permission to link Avisynth with independent modules that communicate with
-// Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
-// terms of these independent modules, and to copy and distribute the
-// resulting combined work under terms of your choice, provided that
-// every copy of the combined work is accompanied by a complete copy of
-// the source code of Avisynth (the version of Avisynth used to produce the
-// combined work), being distributed under the terms of the GNU General
-// Public License plus this exception. An independent module is a module
-// which is not derived from or based on Avisynth, such as 3rd-party filters,
-// import and export plugins, or graphical user interfaces.
-
-#ifndef AVSCORE_CPUID_H
-#define AVSCORE_CPUID_H
-
-// For GetCPUFlags. These are backwards-compatible with those in VirtualDub.
-// ending with SSE4_2
-// For emulation see https://software.intel.com/en-us/articles/intel-software-development-emulator
-enum {
- /* oldest CPU to support extension */
- CPUF_FORCE = 0x01, // N/A
- CPUF_FPU = 0x02, // 386/486DX
- CPUF_MMX = 0x04, // P55C, K6, PII
- CPUF_INTEGER_SSE = 0x08, // PIII, Athlon
- CPUF_SSE = 0x10, // PIII, Athlon XP/MP
- CPUF_SSE2 = 0x20, // PIV, K8
- CPUF_3DNOW = 0x40, // K6-2
- CPUF_3DNOW_EXT = 0x80, // Athlon
- CPUF_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2, which
- // only Hammer will have anyway)
- CPUF_SSE3 = 0x100, // PIV+, K8 Venice
- CPUF_SSSE3 = 0x200, // Core 2
- CPUF_SSE4 = 0x400,
- CPUF_SSE4_1 = 0x400, // Penryn, Wolfdale, Yorkfield
- CPUF_AVX = 0x800, // Sandy Bridge, Bulldozer
- CPUF_SSE4_2 = 0x1000, // Nehalem
- // AVS+
- CPUF_AVX2 = 0x2000, // Haswell
- CPUF_FMA3 = 0x4000,
- CPUF_F16C = 0x8000,
- CPUF_MOVBE = 0x10000, // Big Endian move
- CPUF_POPCNT = 0x20000,
- CPUF_AES = 0x40000,
- CPUF_FMA4 = 0x80000,
-
- CPUF_AVX512F = 0x100000, // AVX-512 Foundation.
- CPUF_AVX512DQ = 0x200000, // AVX-512 DQ (Double/Quad granular) Instructions
- CPUF_AVX512PF = 0x400000, // AVX-512 Prefetch
- CPUF_AVX512ER = 0x800000, // AVX-512 Exponential and Reciprocal
- CPUF_AVX512CD = 0x1000000, // AVX-512 Conflict Detection
- CPUF_AVX512BW = 0x2000000, // AVX-512 BW (Byte/Word granular) Instructions
- CPUF_AVX512VL = 0x4000000, // AVX-512 VL (128/256 Vector Length) Extensions
- CPUF_AVX512IFMA = 0x8000000, // AVX-512 IFMA integer 52 bit
- CPUF_AVX512VBMI = 0x10000000,// AVX-512 VBMI
-};
-
-#ifdef BUILDING_AVSCORE
-int GetCPUFlags();
-#endif
-
-#endif // AVSCORE_CPUID_H
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
+// http://www.gnu.org/copyleft/gpl.html .
+//
+// Linking Avisynth statically or dynamically with other modules is making a
+// combined work based on Avisynth. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Avisynth give you
+// permission to link Avisynth with independent modules that communicate with
+// Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
+// terms of these independent modules, and to copy and distribute the
+// resulting combined work under terms of your choice, provided that
+// every copy of the combined work is accompanied by a complete copy of
+// the source code of Avisynth (the version of Avisynth used to produce the
+// combined work), being distributed under the terms of the GNU General
+// Public License plus this exception. An independent module is a module
+// which is not derived from or based on Avisynth, such as 3rd-party filters,
+// import and export plugins, or graphical user interfaces.
+
+#ifndef AVSCORE_CPUID_H
+#define AVSCORE_CPUID_H
+
+// For GetCPUFlags. These are backwards-compatible with those in VirtualDub.
+// ending with SSE4_2
+// For emulation see https://software.intel.com/en-us/articles/intel-software-development-emulator
+enum {
+ /* oldest CPU to support extension */
+ CPUF_FORCE = 0x01, // N/A
+ CPUF_FPU = 0x02, // 386/486DX
+ CPUF_MMX = 0x04, // P55C, K6, PII
+ CPUF_INTEGER_SSE = 0x08, // PIII, Athlon
+ CPUF_SSE = 0x10, // PIII, Athlon XP/MP
+ CPUF_SSE2 = 0x20, // PIV, K8
+ CPUF_3DNOW = 0x40, // K6-2
+ CPUF_3DNOW_EXT = 0x80, // Athlon
+ CPUF_X86_64 = 0xA0, // Hammer (note: equiv. to 3DNow + SSE2, which
+ // only Hammer will have anyway)
+ CPUF_SSE3 = 0x100, // PIV+, K8 Venice
+ CPUF_SSSE3 = 0x200, // Core 2
+ CPUF_SSE4 = 0x400,
+ CPUF_SSE4_1 = 0x400, // Penryn, Wolfdale, Yorkfield
+ CPUF_AVX = 0x800, // Sandy Bridge, Bulldozer
+ CPUF_SSE4_2 = 0x1000, // Nehalem
+ // AVS+
+ CPUF_AVX2 = 0x2000, // Haswell
+ CPUF_FMA3 = 0x4000,
+ CPUF_F16C = 0x8000,
+ CPUF_MOVBE = 0x10000, // Big Endian move
+ CPUF_POPCNT = 0x20000,
+ CPUF_AES = 0x40000,
+ CPUF_FMA4 = 0x80000,
+
+ CPUF_AVX512F = 0x100000, // AVX-512 Foundation.
+ CPUF_AVX512DQ = 0x200000, // AVX-512 DQ (Double/Quad granular) Instructions
+ CPUF_AVX512PF = 0x400000, // AVX-512 Prefetch
+ CPUF_AVX512ER = 0x800000, // AVX-512 Exponential and Reciprocal
+ CPUF_AVX512CD = 0x1000000, // AVX-512 Conflict Detection
+ CPUF_AVX512BW = 0x2000000, // AVX-512 BW (Byte/Word granular) Instructions
+ CPUF_AVX512VL = 0x4000000, // AVX-512 VL (128/256 Vector Length) Extensions
+ CPUF_AVX512IFMA = 0x8000000, // AVX-512 IFMA integer 52 bit
+ CPUF_AVX512VBMI = 0x10000000,// AVX-512 VBMI
+};
+
+#ifdef BUILDING_AVSCORE
+int GetCPUFlags();
+#endif
+
+#endif // AVSCORE_CPUID_H
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/minmax.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/minmax.h
index ceeebebd19..521ea582c6 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/minmax.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/minmax.h
@@ -1,54 +1,54 @@
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// Linking Avisynth statically or dynamically with other modules is making a
-// combined work based on Avisynth. Thus, the terms and conditions of the GNU
-// General Public License cover the whole combination.
-//
-// As a special exception, the copyright holders of Avisynth give you
-// permission to link Avisynth with independent modules that communicate with
-// Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
-// terms of these independent modules, and to copy and distribute the
-// resulting combined work under terms of your choice, provided that
-// every copy of the combined work is accompanied by a complete copy of
-// the source code of Avisynth (the version of Avisynth used to produce the
-// combined work), being distributed under the terms of the GNU General
-// Public License plus this exception. An independent module is a module
-// which is not derived from or based on Avisynth, such as 3rd-party filters,
-// import and export plugins, or graphical user interfaces.
-
-#ifndef AVSCORE_MINMAX_H
-#define AVSCORE_MINMAX_H
-
-template
-T min(T v1, T v2)
-{
- return v1 < v2 ? v1 : v2;
-}
-
-template
-T max(T v1, T v2)
-{
- return v1 > v2 ? v1 : v2;
-}
-
-template
-T clamp(T n, T min, T max)
-{
- n = n > max ? max : n;
- return n < min ? min : n;
-}
-
-#endif // AVSCORE_MINMAX_H
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
+// http://www.gnu.org/copyleft/gpl.html .
+//
+// Linking Avisynth statically or dynamically with other modules is making a
+// combined work based on Avisynth. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Avisynth give you
+// permission to link Avisynth with independent modules that communicate with
+// Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
+// terms of these independent modules, and to copy and distribute the
+// resulting combined work under terms of your choice, provided that
+// every copy of the combined work is accompanied by a complete copy of
+// the source code of Avisynth (the version of Avisynth used to produce the
+// combined work), being distributed under the terms of the GNU General
+// Public License plus this exception. An independent module is a module
+// which is not derived from or based on Avisynth, such as 3rd-party filters,
+// import and export plugins, or graphical user interfaces.
+
+#ifndef AVSCORE_MINMAX_H
+#define AVSCORE_MINMAX_H
+
+template
+T min(T v1, T v2)
+{
+ return v1 < v2 ? v1 : v2;
+}
+
+template
+T max(T v1, T v2)
+{
+ return v1 > v2 ? v1 : v2;
+}
+
+template
+T clamp(T n, T min, T max)
+{
+ n = n > max ? max : n;
+ return n < min ? min : n;
+}
+
+#endif // AVSCORE_MINMAX_H
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/types.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/types.h
index cdb387e0d9..df15f1d8e5 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/types.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/types.h
@@ -1,57 +1,57 @@
-// Avisynth C Interface Version 0.20
-// Copyright 2003 Kevin Atkinson
-
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// As a special exception, I give you permission to link to the
-// Avisynth C interface with independent modules that communicate with
-// the Avisynth C interface solely through the interfaces defined in
-// avisynth_c.h, regardless of the license terms of these independent
-// modules, and to copy and distribute the resulting combined work
-// under terms of your choice, provided that every copy of the
-// combined work is accompanied by a complete copy of the source code
-// of the Avisynth C interface and Avisynth itself (with the version
-// used to produce the combined work), being distributed under the
-// terms of the GNU General Public License plus this exception. An
-// independent module is a module which is not derived from or based
-// on Avisynth C Interface, such as 3rd-party filters, import and
-// export plugins, or graphical user interfaces.
-
-#ifndef AVS_TYPES_H
-#define AVS_TYPES_H
-
-// Define all types necessary for interfacing with avisynth.dll
-
-#ifdef __cplusplus
- #include
-#else
- #include
-#endif
-
-// Raster types used by VirtualDub & Avisynth
-typedef unsigned int Pixel32;
-typedef unsigned char BYTE;
-
-// Audio Sample information
-typedef float SFLOAT;
-
-#ifdef __GNUC__
-typedef long long int INT64;
-#else
-typedef __int64 INT64;
-#endif
-
-#endif //AVS_TYPES_H
+// Avisynth C Interface Version 0.20
+// Copyright 2003 Kevin Atkinson
+
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
+// http://www.gnu.org/copyleft/gpl.html .
+//
+// As a special exception, I give you permission to link to the
+// Avisynth C interface with independent modules that communicate with
+// the Avisynth C interface solely through the interfaces defined in
+// avisynth_c.h, regardless of the license terms of these independent
+// modules, and to copy and distribute the resulting combined work
+// under terms of your choice, provided that every copy of the
+// combined work is accompanied by a complete copy of the source code
+// of the Avisynth C interface and Avisynth itself (with the version
+// used to produce the combined work), being distributed under the
+// terms of the GNU General Public License plus this exception. An
+// independent module is a module which is not derived from or based
+// on Avisynth C Interface, such as 3rd-party filters, import and
+// export plugins, or graphical user interfaces.
+
+#ifndef AVS_TYPES_H
+#define AVS_TYPES_H
+
+// Define all types necessary for interfacing with avisynth.dll
+
+#ifdef __cplusplus
+ #include
+#else
+ #include
+#endif
+
+// Raster types used by VirtualDub & Avisynth
+typedef unsigned int Pixel32;
+typedef unsigned char BYTE;
+
+// Audio Sample information
+typedef float SFLOAT;
+
+#ifdef __GNUC__
+typedef long long int INT64;
+#else
+typedef __int64 INT64;
+#endif
+
+#endif //AVS_TYPES_H
diff --git a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/win.h b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/win.h
index 7804eafc41..6692021e6d 100755
--- a/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/win.h
+++ b/avidemux_plugins/ADM_demuxers/NativeAvisynth/avs/win.h
@@ -1,54 +1,54 @@
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
-// http://www.gnu.org/copyleft/gpl.html .
-//
-// Linking Avisynth statically or dynamically with other modules is making a
-// combined work based on Avisynth. Thus, the terms and conditions of the GNU
-// General Public License cover the whole combination.
-//
-// As a special exception, the copyright holders of Avisynth give you
-// permission to link Avisynth with independent modules that communicate with
-// Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
-// terms of these independent modules, and to copy and distribute the
-// resulting combined work under terms of your choice, provided that
-// every copy of the combined work is accompanied by a complete copy of
-// the source code of Avisynth (the version of Avisynth used to produce the
-// combined work), being distributed under the terms of the GNU General
-// Public License plus this exception. An independent module is a module
-// which is not derived from or based on Avisynth, such as 3rd-party filters,
-// import and export plugins, or graphical user interfaces.
-
-#ifndef AVSCORE_WIN_H
-#define AVSCORE_WIN_H
-
-// Whenever you need windows headers, start by including this file, then the rest.
-
-// WWUUT? We require XP now?
-#if !defined(NTDDI_VERSION) && !defined(_WIN32_WINNT)
- #define NTDDI_VERSION 0x05020000
- #define _WIN32_WINNT 0x0502
-#endif
-
-#define WIN32_LEAN_AND_MEAN
-#define STRICT
-#if !defined(NOMINMAX)
- #define NOMINMAX
-#endif
-
-#include
-
-// Provision for UTF-8 max 4 bytes per code point
-#define AVS_MAX_PATH MAX_PATH*4
-
-#endif // AVSCORE_WIN_H
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA, or visit
+// http://www.gnu.org/copyleft/gpl.html .
+//
+// Linking Avisynth statically or dynamically with other modules is making a
+// combined work based on Avisynth. Thus, the terms and conditions of the GNU
+// General Public License cover the whole combination.
+//
+// As a special exception, the copyright holders of Avisynth give you
+// permission to link Avisynth with independent modules that communicate with
+// Avisynth solely through the interfaces defined in avisynth.h, regardless of the license
+// terms of these independent modules, and to copy and distribute the
+// resulting combined work under terms of your choice, provided that
+// every copy of the combined work is accompanied by a complete copy of
+// the source code of Avisynth (the version of Avisynth used to produce the
+// combined work), being distributed under the terms of the GNU General
+// Public License plus this exception. An independent module is a module
+// which is not derived from or based on Avisynth, such as 3rd-party filters,
+// import and export plugins, or graphical user interfaces.
+
+#ifndef AVSCORE_WIN_H
+#define AVSCORE_WIN_H
+
+// Whenever you need windows headers, start by including this file, then the rest.
+
+// WWUUT? We require XP now?
+#if !defined(NTDDI_VERSION) && !defined(_WIN32_WINNT)
+ #define NTDDI_VERSION 0x05020000
+ #define _WIN32_WINNT 0x0502
+#endif
+
+#define WIN32_LEAN_AND_MEAN
+#define STRICT
+#if !defined(NOMINMAX)
+ #define NOMINMAX
+#endif
+
+#include
+
+// Provision for UTF-8 max 4 bytes per code point
+#define AVS_MAX_PATH MAX_PATH*4
+
+#endif // AVSCORE_WIN_H
diff --git a/avidemux_plugins/ADM_demuxers/VapourSynth/qt4/CMakeLists.txt b/avidemux_plugins/ADM_demuxers/VapourSynth/qt4/CMakeLists.txt
index 81a8ad1dd6..47ee1f08c7 100644
--- a/avidemux_plugins/ADM_demuxers/VapourSynth/qt4/CMakeLists.txt
+++ b/avidemux_plugins/ADM_demuxers/VapourSynth/qt4/CMakeLists.txt
@@ -1,76 +1,76 @@
-##########################################
-# Config
-##########################################
-IF(ENABLE_QT6)
- ADD_DEFINITIONS("-std=c++17")
-ELSE(ENABLE_QT6)
- IF(NOT MSVC)
- ADD_DEFINITIONS("-std=c++11")
- ENDIF(NOT MSVC)
-ENDIF(ENABLE_QT6)
-ADD_DEFINITIONS(${VAPOURSYNTHSCRIPT_CFLAGS})
-#
-IF(MSVC)
- ADD_DEFINITIONS("-DNO_WINSOCK2") # else double include on windows
-ENDIF(MSVC)
-#
-ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_QT4)
-SET(CONFIG_HEADER_TYPE ADM_BUILD_QT4)
-SET(UI_SUFFIX qt4)
-include_directories(./ ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
-INCLUDE(admWindRes)
-###########################################
-# Executable
-###########################################
-#
-SET(UI vs.ui )
-SET(srcs vsProxy_qt4.h)
-#ADM_QT_ADD_RESOURCES(resource jobs.rsc)
-ADM_QT_WRAP_UI(VS_PROXY_headers ${UI})
-ADM_QT_WRAP_CPP(VS_PROXY_source ${srcs} vsProxy_qt4.h )
-SET(ADM_vsPROXY_SRCS
- ${srcs}
- ../ADM_vsProxy.cpp
- ../ADM_vsProxy.h
- #${resource}
- ${VS_PROXY_headers}
- ${VS_PROXY_source}
- vsProxy_qt4.cpp
- )
-
-
-###########################################
-# Executable
-###########################################
-ADD_EXECUTABLE(vsProxy_gui_${QT_EXTENSION} ${ADM_vsPROXY_SRCS})
-#
-GET_PROPERTY(OLD
- TARGET vsProxy_gui_${QT_EXTENSION}
- PROPERTY LINK_FLAGS)
-IF("${OLD}" MATCHES ".*NOT.*FOUND")
- SET(OLD "")
-ENDIF("${OLD}" MATCHES ".*NOT.*FOUND")
-# Keep -L, discard everything else
-
-
-SET_TARGET_PROPERTIES(vsProxy_gui_${QT_EXTENSION} PROPERTIES LINK_FLAGS "${OLD}")
-
-###########################################
-TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} ADM_core6 ADM_coreSocket6 ADM_coreUtils6)
-TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
-TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} ${LIBS_TO_LINK} )
-
-include(admCheckThreads)
-ADM_LINK_THREAD(vsProxy_gui_${QT_EXTENSION})
-
-IF (MINGW)
- target_link_libraries(vsProxy_gui_${QT_EXTENSION} -lwsock32 winmm -mwindows )
- target_link_libraries(vsProxy_gui_${QT_EXTENSION} ${LIBS_TO_LINK} "-lm -lstdc++")
-ENDIF (MINGW)
-IF(MSVC)
- set_target_properties(vsProxy_gui_${QT_EXTENSION} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
- set_target_properties(vsProxy_gui_${QT_EXTENSION} PROPERTIES WIN32_EXECUTABLE True)
- TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} ws2_32.lib winmm -mwindows )
-ENDIF(MSVC)
-TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} "${VS_SYSTEM_LIBS}")
-ADM_INSTALL_BIN(vsProxy_gui_${QT_EXTENSION})
+##########################################
+# Config
+##########################################
+IF(ENABLE_QT6)
+ ADD_DEFINITIONS("-std=c++17")
+ELSE(ENABLE_QT6)
+ IF(NOT MSVC)
+ ADD_DEFINITIONS("-std=c++11")
+ ENDIF(NOT MSVC)
+ENDIF(ENABLE_QT6)
+ADD_DEFINITIONS(${VAPOURSYNTHSCRIPT_CFLAGS})
+#
+IF(MSVC)
+ ADD_DEFINITIONS("-DNO_WINSOCK2") # else double include on windows
+ENDIF(MSVC)
+#
+ADD_DEFINITIONS(-DADM_UI_TYPE_BUILD=ADM_UI_QT4)
+SET(CONFIG_HEADER_TYPE ADM_BUILD_QT4)
+SET(UI_SUFFIX qt4)
+include_directories(./ ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
+INCLUDE(admWindRes)
+###########################################
+# Executable
+###########################################
+#
+SET(UI vs.ui )
+SET(srcs vsProxy_qt4.h)
+#ADM_QT_ADD_RESOURCES(resource jobs.rsc)
+ADM_QT_WRAP_UI(VS_PROXY_headers ${UI})
+ADM_QT_WRAP_CPP(VS_PROXY_source ${srcs} vsProxy_qt4.h )
+SET(ADM_vsPROXY_SRCS
+ ${srcs}
+ ../ADM_vsProxy.cpp
+ ../ADM_vsProxy.h
+ #${resource}
+ ${VS_PROXY_headers}
+ ${VS_PROXY_source}
+ vsProxy_qt4.cpp
+ )
+
+
+###########################################
+# Executable
+###########################################
+ADD_EXECUTABLE(vsProxy_gui_${QT_EXTENSION} ${ADM_vsPROXY_SRCS})
+#
+GET_PROPERTY(OLD
+ TARGET vsProxy_gui_${QT_EXTENSION}
+ PROPERTY LINK_FLAGS)
+IF("${OLD}" MATCHES ".*NOT.*FOUND")
+ SET(OLD "")
+ENDIF("${OLD}" MATCHES ".*NOT.*FOUND")
+# Keep -L, discard everything else
+
+
+SET_TARGET_PROPERTIES(vsProxy_gui_${QT_EXTENSION} PROPERTIES LINK_FLAGS "${OLD}")
+
+###########################################
+TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} ADM_core6 ADM_coreSocket6 ADM_coreUtils6)
+TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY})
+TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} ${LIBS_TO_LINK} )
+
+include(admCheckThreads)
+ADM_LINK_THREAD(vsProxy_gui_${QT_EXTENSION})
+
+IF (MINGW)
+ target_link_libraries(vsProxy_gui_${QT_EXTENSION} -lwsock32 winmm -mwindows )
+ target_link_libraries(vsProxy_gui_${QT_EXTENSION} ${LIBS_TO_LINK} "-lm -lstdc++")
+ENDIF (MINGW)
+IF(MSVC)
+ set_target_properties(vsProxy_gui_${QT_EXTENSION} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:WINDOWS")
+ set_target_properties(vsProxy_gui_${QT_EXTENSION} PROPERTIES WIN32_EXECUTABLE True)
+ TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} ws2_32.lib winmm -mwindows )
+ENDIF(MSVC)
+TARGET_LINK_LIBRARIES(vsProxy_gui_${QT_EXTENSION} "${VS_SYSTEM_LIBS}")
+ADM_INSTALL_BIN(vsProxy_gui_${QT_EXTENSION})
diff --git a/avidemux_plugins/ADM_muxers/muxerMplex/CMakeLists.txt b/avidemux_plugins/ADM_muxers/muxerMplex/CMakeLists.txt
index 912ce548b7..fdfd54a585 100644
--- a/avidemux_plugins/ADM_muxers/muxerMplex/CMakeLists.txt
+++ b/avidemux_plugins/ADM_muxers/muxerMplex/CMakeLists.txt
@@ -1,33 +1,33 @@
-include(mx_plugin)
-SET(ADM_LIB ADM_mx_mplex)
-
-SET(${ADM_LIB}_SRCS
- ADM_mplexMuxer.cpp
- ADM_mplexInput.cpp
- ADM_mplexOutput.cpp
- ac3strm_in.cpp
- audiostrm_out.cpp dtsstrm_in.cpp lpcmstrm_in.cpp multiplexor.cpp stream_params.cpp videostrm_in.cpp
- ADM_mthread.cpp bits.cpp inputstrm.cpp padstrm.cpp systems.cpp videostrm_out.cpp
- ADM_transfert.cpp interact.cpp mpastrm_in.cpp stillsstream.cpp mpegconsts.c mjpeg_logging.c decodebufmodel.cpp
- yuv4mpeg.c cpu_accel.c)
-
-include_directories("${PTHREAD_INCLUDE_DIR}")
-ADD_MUXER(${ADM_LIB} ${${ADM_LIB}_SRCS})
-ADD_DEFINITIONS(${ADM_LIB} "-I${CMAKE_CURRENT_SOURCE_DIR} -DHAVE_FMAX -DRETSIGTYPE=void")
-
-IF (NOT APPLE)
- ADD_DEFINITIONS(${ADM_LIB} "-DHAVE_MEMALIGN")
-ENDIF (NOT APPLE)
-
-IF (ADM_CPU_X86)
- ADD_DEFINITIONS(${ADM_LIB} "-DHAVE_X86CPU")
-
- IF (ADM_CPU_X86_64)
- ADD_DEFINITIONS(${ADM_LIB} "-DHAVE_X86_64CPU")
- ENDIF (ADM_CPU_X86_64)
-ELSEIF (ADM_CPU_ALTIVEC)
- ADD_DEFINITIONS(${ADM_LIB} "-DHAVE_ALTIVEC")
-ENDIF (ADM_CPU_X86)
-
-INIT_MUXER(${ADM_LIB})
-INSTALL_MUXER(${ADM_LIB})
+include(mx_plugin)
+SET(ADM_LIB ADM_mx_mplex)
+
+SET(${ADM_LIB}_SRCS
+ ADM_mplexMuxer.cpp
+ ADM_mplexInput.cpp
+ ADM_mplexOutput.cpp
+ ac3strm_in.cpp
+ audiostrm_out.cpp dtsstrm_in.cpp lpcmstrm_in.cpp multiplexor.cpp stream_params.cpp videostrm_in.cpp
+ ADM_mthread.cpp bits.cpp inputstrm.cpp padstrm.cpp systems.cpp videostrm_out.cpp
+ ADM_transfert.cpp interact.cpp mpastrm_in.cpp stillsstream.cpp mpegconsts.c mjpeg_logging.c decodebufmodel.cpp
+ yuv4mpeg.c cpu_accel.c)
+
+include_directories("${PTHREAD_INCLUDE_DIR}")
+ADD_MUXER(${ADM_LIB} ${${ADM_LIB}_SRCS})
+ADD_DEFINITIONS(${ADM_LIB} "-I${CMAKE_CURRENT_SOURCE_DIR} -DHAVE_FMAX -DRETSIGTYPE=void")
+
+IF (NOT APPLE)
+ ADD_DEFINITIONS(${ADM_LIB} "-DHAVE_MEMALIGN")
+ENDIF (NOT APPLE)
+
+IF (ADM_CPU_X86)
+ ADD_DEFINITIONS(${ADM_LIB} "-DHAVE_X86CPU")
+
+ IF (ADM_CPU_X86_64)
+ ADD_DEFINITIONS(${ADM_LIB} "-DHAVE_X86_64CPU")
+ ENDIF (ADM_CPU_X86_64)
+ELSEIF (ADM_CPU_ALTIVEC)
+ ADD_DEFINITIONS(${ADM_LIB} "-DHAVE_ALTIVEC")
+ENDIF (ADM_CPU_X86)
+
+INIT_MUXER(${ADM_LIB})
+INSTALL_MUXER(${ADM_LIB})
diff --git a/avidemux_plugins/ADM_scriptEngines/qtScript/src/exampleScript/Dialog.admjs b/avidemux_plugins/ADM_scriptEngines/qtScript/src/exampleScript/Dialog.admjs
index b69ab0f6f2..a91a755067 100644
--- a/avidemux_plugins/ADM_scriptEngines/qtScript/src/exampleScript/Dialog.admjs
+++ b/avidemux_plugins/ADM_scriptEngines/qtScript/src/exampleScript/Dialog.admjs
@@ -1,29 +1,29 @@
-var dialog = new Dialog("Test Window");
-var checkBox = new CheckBoxControl("Test CheckBox", true);
-var spinBox = new SpinBoxControl("Test SpinBox:", 0, 100, 43);
-var doubleSpinBox = new DoubleSpinBoxControl("Test DoubleSpinBox:", 0, 100, 48.3);
-var lineEdit = new LineEditControl("Test LineEdit:", "text");
-var slider = new SliderControl("Test Slider:", 0, 100, 13, 5);
-var comboBox = new ComboBoxControl("Test ComboBox:");
-
-comboBox.items.add("item 1", "value 1");
-comboBox.items.add(new ComboBoxItem("item 2", "value 2"));
-comboBox.selectedItemIndex = 1;
-
-dialog.controls.add(checkBox);
-dialog.controls.add(spinBox);
-dialog.controls.add(doubleSpinBox);
-dialog.controls.add(lineEdit);
-dialog.controls.add(slider);
-dialog.controls.add(comboBox);
-
-print("Dialog Result: " + dialog.show());
-
-print("CheckBox - Value: " + checkBox.checked);
-print("SpinBox - Value: " + spinBox.value);
-print("DoubleSpinBox - Value: " + doubleSpinBox.value);
-print("LineEdit - Value: " + lineEdit.value);
-print("Slider - Value: " + slider.value);
-print("ComboBox - Selected Index: " + comboBox.selectedItemIndex);
-print("ComboBox - Selected Item Title: " + comboBox.selectedItem.title);
+var dialog = new Dialog("Test Window");
+var checkBox = new CheckBoxControl("Test CheckBox", true);
+var spinBox = new SpinBoxControl("Test SpinBox:", 0, 100, 43);
+var doubleSpinBox = new DoubleSpinBoxControl("Test DoubleSpinBox:", 0, 100, 48.3);
+var lineEdit = new LineEditControl("Test LineEdit:", "text");
+var slider = new SliderControl("Test Slider:", 0, 100, 13, 5);
+var comboBox = new ComboBoxControl("Test ComboBox:");
+
+comboBox.items.add("item 1", "value 1");
+comboBox.items.add(new ComboBoxItem("item 2", "value 2"));
+comboBox.selectedItemIndex = 1;
+
+dialog.controls.add(checkBox);
+dialog.controls.add(spinBox);
+dialog.controls.add(doubleSpinBox);
+dialog.controls.add(lineEdit);
+dialog.controls.add(slider);
+dialog.controls.add(comboBox);
+
+print("Dialog Result: " + dialog.show());
+
+print("CheckBox - Value: " + checkBox.checked);
+print("SpinBox - Value: " + spinBox.value);
+print("DoubleSpinBox - Value: " + doubleSpinBox.value);
+print("LineEdit - Value: " + lineEdit.value);
+print("Slider - Value: " + slider.value);
+print("ComboBox - Selected Index: " + comboBox.selectedItemIndex);
+print("ComboBox - Selected Item Title: " + comboBox.selectedItem.title);
print("ComboBox - Selected Item Value: " + comboBox.selectedItem.value);
\ No newline at end of file
diff --git a/avidemux_plugins/ADM_scriptEngines/qtScript/src/footer.html b/avidemux_plugins/ADM_scriptEngines/qtScript/src/footer.html
index 8a8366e749..76a97a27fc 100644
--- a/avidemux_plugins/ADM_scriptEngines/qtScript/src/footer.html
+++ b/avidemux_plugins/ADM_scriptEngines/qtScript/src/footer.html
@@ -1,12 +1,12 @@
-
-
-
-
-
-
-
-
-