Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXhmikosR <xhmikosr@users.sourceforge.net>2014-06-07 20:50:59 +0400
committerXhmikosR <xhmikosr@users.sourceforge.net>2014-06-16 01:42:42 +0400
commitc15b1d3e2f2e525807835035c95aca4bf1addc4f (patch)
tree90080ca8dd9f077f10a507419b4969af4bc6e26c /src/thirdparty/unrar
parent622040d9e4f9faa122fd64e6935f565b7d974960 (diff)
Update unrar to v5.1.6.
5.1.6.tar.gz - 5.10.0 in the rc file.
Diffstat (limited to 'src/thirdparty/unrar')
-rw-r--r--src/thirdparty/unrar/blake2s.cpp5
-rw-r--r--src/thirdparty/unrar/blake2s_sse.cpp44
-rw-r--r--src/thirdparty/unrar/dll.rc8
-rw-r--r--src/thirdparty/unrar/version.hpp6
4 files changed, 41 insertions, 22 deletions
diff --git a/src/thirdparty/unrar/blake2s.cpp b/src/thirdparty/unrar/blake2s.cpp
index ca3675d57..d481bc63a 100644
--- a/src/thirdparty/unrar/blake2s.cpp
+++ b/src/thirdparty/unrar/blake2s.cpp
@@ -57,6 +57,11 @@ static inline void blake2s_increment_counter( blake2s_state *S, const uint32 inc
/* init2 xors IV with input parameter block */
void blake2s_init_param( blake2s_state *S, uint32 node_offset, uint32 node_depth)
{
+#ifdef USE_SSE
+ if (_SSE_Version>=SSE_SSE2)
+ blake2s_init_sse();
+#endif
+
S->init(); // Clean data.
for( int i = 0; i < 8; ++i )
S->h[i] = blake2s_IV[i];
diff --git a/src/thirdparty/unrar/blake2s_sse.cpp b/src/thirdparty/unrar/blake2s_sse.cpp
index a44fb62f1..af34b01dc 100644
--- a/src/thirdparty/unrar/blake2s_sse.cpp
+++ b/src/thirdparty/unrar/blake2s_sse.cpp
@@ -2,6 +2,35 @@
extern const byte blake2s_sigma[10][16];
+// Initialization vector.
+static __m128i blake2s_IV_0_3, blake2s_IV_4_7;
+
+#ifdef _WIN_64
+// Constants for cyclic rotation. Used in 64-bit mode in mm_rotr_epi32 macro.
+static __m128i crotr8, crotr16;
+#endif
+
+static void blake2s_init_sse()
+{
+ // We cannot initialize these 128 bit variables in place when declaring
+ // them globally, because global scope initialization is performed before
+ // our SSE check and it would make code incompatible with older non-SSE2
+ // CPUs. Also we cannot initialize them as static inside of function
+ // using these variables, because SSE static initialization is not thread
+ // safe: first thread starts initialization and sets "init done" flag even
+ // if it is not done yet, second thread can attempt to access half-init
+ // SSE data. So we moved init code here.
+
+ blake2s_IV_0_3 = _mm_setr_epi32( 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A );
+ blake2s_IV_4_7 = _mm_setr_epi32( 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 );
+
+#ifdef _WIN_64
+ crotr8 = _mm_set_epi8( 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1 );
+ crotr16 = _mm_set_epi8( 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2 );
+#endif
+}
+
+
#define LOAD(p) _mm_load_si128( (__m128i *)(p) )
#define STORE(p,r) _mm_store_si128((__m128i *)(p), r)
@@ -72,21 +101,6 @@ extern const byte blake2s_sigma[10][16];
static int blake2s_compress_sse( blake2s_state *S, const byte block[BLAKE2S_BLOCKBYTES] )
{
- // Initialization vector. Moving them outside of function would provide
- // ~5% speed gain in 32-bit mode, but would make code incompatible
- // with older non-SSE2 compatible CPUs. Global static initialization
- // is performed before our SSE check.
- static const __m128i blake2s_IV_0_3 = _mm_setr_epi32( 0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A );
- static const __m128i blake2s_IV_4_7 = _mm_setr_epi32( 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19 );
-
-#ifdef _WIN_64
- // Constants for cyclic rotation. We use them in 64-bit mode
- // in mm_rotr_epi32 macro above. We must not define in global scope
- // to be compatible with non-SSE CPU.
- static const __m128i crotr8 = _mm_set_epi8( 12, 15, 14, 13, 8, 11, 10, 9, 4, 7, 6, 5, 0, 3, 2, 1 );
- static const __m128i crotr16 = _mm_set_epi8( 13, 12, 15, 14, 9, 8, 11, 10, 5, 4, 7, 6, 1, 0, 3, 2 );
-#endif
-
__m128i row[4];
__m128i ff0, ff1;
diff --git a/src/thirdparty/unrar/dll.rc b/src/thirdparty/unrar/dll.rc
index a2883159b..97cb9efe8 100644
--- a/src/thirdparty/unrar/dll.rc
+++ b/src/thirdparty/unrar/dll.rc
@@ -2,8 +2,8 @@
#include <commctrl.h>
VS_VERSION_INFO VERSIONINFO
-FILEVERSION 5, 10, 3, 1216
-PRODUCTVERSION 5, 10, 3, 1216
+FILEVERSION 5, 10, 100, 1258
+PRODUCTVERSION 5, 10, 100, 1258
FILEOS VOS__WINDOWS32
FILETYPE VFT_APP
{
@@ -14,8 +14,8 @@ FILETYPE VFT_APP
VALUE "CompanyName", "Alexander Roshal\0"
VALUE "ProductName", "RAR decompression library\0"
VALUE "FileDescription", "RAR decompression library\0"
- VALUE "FileVersion", "5.10.3\0"
- VALUE "ProductVersion", "5.10.3\0"
+ VALUE "FileVersion", "5.10.0\0"
+ VALUE "ProductVersion", "5.10.0\0"
VALUE "LegalCopyright", "Copyright © Alexander Roshal 1993-2014\0"
VALUE "OriginalFilename", "Unrar.dll\0"
}
diff --git a/src/thirdparty/unrar/version.hpp b/src/thirdparty/unrar/version.hpp
index 6d7066baa..4f859616b 100644
--- a/src/thirdparty/unrar/version.hpp
+++ b/src/thirdparty/unrar/version.hpp
@@ -1,6 +1,6 @@
#define RARVER_MAJOR 5
#define RARVER_MINOR 10
-#define RARVER_BETA 3
-#define RARVER_DAY 29
-#define RARVER_MONTH 4
+#define RARVER_BETA 0
+#define RARVER_DAY 10
+#define RARVER_MONTH 6
#define RARVER_YEAR 2014