OSDN Git Service

Updated x265 to version 2.5. Now using "multilib" build.
authorlordmulder <mulder2@gmx.de>
Sat, 15 Jul 2017 18:38:23 +0000 (20:38 +0200)
committerlordmulder <mulder2@gmx.de>
Sat, 15 Jul 2017 18:38:23 +0000 (20:38 +0200)
src/encoder_x265.cpp
src/string_validator.cpp
src/thread_binaries.cpp
src/version.h

index b40c3c9..06be544 100644 (file)
@@ -40,8 +40,8 @@
 #include <QPair>
 
 //x265 version info
-static const unsigned int VERSION_X265_MINIMUM_VER = 24;
-static const unsigned int VERSION_X265_MINIMUM_REV = 36;
+static const unsigned int VERSION_X265_MINIMUM_VER = 25;
+static const unsigned int VERSION_X265_MINIMUM_REV =  0;
 
 // ------------------------------------------------------------
 // Helper Macros
@@ -160,21 +160,18 @@ public:
 
        virtual QString getBinaryPath(const SysinfoModel *sysinfo, const quint32 &encArch, const quint32 &encVariant) const
        {
-               QString arch, variant;
+               QString arch;
                switch(encArch)
                {
                        case 0: arch = "x86"; break;
                        case 1: arch = "x64"; break;
                        default: MUTILS_THROW("Unknown encoder arch!");
                }
-               switch(encVariant)
+               if((encVariant < 0) || (encVariant > 2))
                {
-                       case 0: variant =  "8bit"; break;
-                       case 1: variant = "10bit"; break;
-                       case 2: variant = "12bit"; break;
-                       default: MUTILS_THROW("Unknown encoder arch!");
+                       MUTILS_THROW("Unknown encoder variant!");
                }
-               return QString("%1/toolset/%2/x265_%3_%2.exe").arg(sysinfo->getAppPath(), arch, variant);
+               return QString("%1/toolset/%2/x265_%2.exe").arg(sysinfo->getAppPath(), arch);
        }
 
        virtual QString getHelpCommand(void) const
@@ -294,6 +291,22 @@ void X265Encoder::buildCommandLine(QStringList &cmdLine, const bool &usePipe, co
 {
        double crf_int = 0.0, crf_frc = 0.0;
 
+       cmdLine << "-D";
+       switch (m_options->encVariant())
+       {
+       case 0:
+               cmdLine << QString::number(8);
+               break;
+       case 1:
+               cmdLine << QString::number(10);
+               break;
+       case 2:
+               cmdLine << QString::number(12);
+               break;
+       default:
+               MUTILS_THROW("Unknown encoder variant!");
+       }
+
        switch(m_options->rcMode())
        {
        case 0:
index 3c9941e..3861a89 100644 (file)
@@ -167,7 +167,7 @@ const bool &StringValidator::setStatus(const bool &flag, const QString &toolName
 
 QValidator::State StringValidatorEncoder::validate(QString &input, int &pos) const
 {
-       static const char *const params[] = {"B", "o", "h", "p", "q", /*"fps", "frames",*/ "preset", "tune", "profile",
+       static const char *const params[] = {"D", "B", "o", "h", "p", "q", /*"fps", "frames",*/ "preset", "tune", "profile",
                "stdin", "crf", "bitrate", "qp", "pass", "stats", "output", "help", "quiet", "codec", "y4m", NULL};
 
        const QString commandLine = input.trimmed();
index 2490ccc..608a505 100644 (file)
@@ -152,7 +152,7 @@ void BinariesCheckThread::checkBinaries3(volatile bool &success, const SysinfoMo
        {
                const AbstractEncoderInfo &encInfo = EncoderFactory::getEncoderInfo(encdr);
                const quint32 archCount = encInfo.getArchitectures().count();
-               QSet<QString> dependencySet;
+               QSet<QString> filesSet;
                for (quint32 archIdx = 0; archIdx < archCount; ++archIdx)
                {
                        const QStringList variants = encInfo.getVariants();
@@ -161,13 +161,18 @@ void BinariesCheckThread::checkBinaries3(volatile bool &success, const SysinfoMo
                                const QStringList dependencies = encInfo.getDependencies(sysinfo, archIdx, varntIdx);
                                for (QStringList::ConstIterator iter = dependencies.constBegin(); iter != dependencies.constEnd(); iter++)
                                {
-                                       if (!dependencySet.contains(*iter))
+                                       if (!filesSet.contains(*iter))
                                        {
-                                               dependencySet << (*iter);
+                                               filesSet << (*iter);
                                                binFiles << qMakePair(*iter, true);
                                        }
                                }
-                               binFiles << qMakePair(encInfo.getBinaryPath(sysinfo, archIdx, varntIdx), false);
+                               const QString binary = encInfo.getBinaryPath(sysinfo, archIdx, varntIdx);
+                               if (!filesSet.contains(binary))
+                               {
+                                       filesSet << binary;
+                                       binFiles << qMakePair(binary, false);
+                               }
                        }
                }
        }
index 68e4232..b41e4f6 100644 (file)
@@ -26,7 +26,7 @@
 #define VER_X264_MAJOR 2
 #define VER_X264_MINOR 8
 #define VER_X264_PATCH 3
-#define VER_X264_BUILD 1114
+#define VER_X264_BUILD 1115
 
 #define VER_X264_PORTABLE_EDITION (0)