From e2ad4617847787f18866136c1924dac6285d038d Mon Sep 17 00:00:00 2001 From: lordmulder Date: Wed, 4 Jun 2014 19:36:20 +0200 Subject: [PATCH] Bump x265 encoder version. --- src/encoder_x265.cpp | 19 ++++++++++++++++--- src/version.h | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/encoder_x265.cpp b/src/encoder_x265.cpp index 3475aae..e5bf675 100644 --- a/src/encoder_x265.cpp +++ b/src/encoder_x265.cpp @@ -32,8 +32,8 @@ #include //x265 version info -static const unsigned int VERSION_X265_MINIMUM_VER = 10; -static const unsigned int VERSION_X265_MINIMUM_REV = 38; +static const unsigned int VERSION_X265_MINIMUM_VER = 11; +static const unsigned int VERSION_X265_MINIMUM_REV = 0; // ------------------------------------------------------------ // Helper Macros @@ -188,7 +188,8 @@ const QString &X265Encoder::getName(void) void X265Encoder::checkVersion_init(QList &patterns, QStringList &cmdLine) { cmdLine << "--version"; - patterns << new QRegExp("\\bHEVC\\s+encoder\\s+version\\s+(\\d)\\.(\\d+)\\+(\\d+)-[a-f0-9]+\\b", Qt::CaseInsensitive); + patterns << new QRegExp("\\bHEVC\\s+encoder\\s+version\\s+(\\d)\\.(\\d+)\\+(\\d+)\\b", Qt::CaseInsensitive); + patterns << new QRegExp("\\bHEVC\\s+encoder\\s+version\\s+(\\d)\\.(\\d+)\\b", Qt::CaseInsensitive); } void X265Encoder::checkVersion_parseLine(const QString &line, QList &patterns, unsigned int &core, unsigned int &build, bool &modified) @@ -208,6 +209,18 @@ void X265Encoder::checkVersion_parseLine(const QString &line, QList &p } if(ok[2]) build = temp[2]; } + else if((offset = patterns[1]->lastIndexIn(line)) >= 0) + { + bool ok[2] = { false, false }; + unsigned int temp[2]; + temp[0] = patterns[1]->cap(1).toUInt(&ok[0]); + temp[1] = patterns[1]->cap(2).toUInt(&ok[1]); + if(ok[0] && ok[1]) + { + core = (10 * temp[0]) + temp[1]; + } + build = 0; + } if(!line.isEmpty()) { diff --git a/src/version.h b/src/version.h index 9486c4b..ea4202d 100644 --- a/src/version.h +++ b/src/version.h @@ -26,7 +26,7 @@ #define VER_X264_MAJOR 2 #define VER_X264_MINOR 4 #define VER_X264_PATCH 0 -#define VER_X264_BUILD 876 +#define VER_X264_BUILD 878 #define VER_X264_PORTABLE_EDITION (0)