-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Stefan Eilemann
authored and
Stefan Eilemann
committed
Oct 7, 2016
1 parent
0e88791
commit 8fbb897
Showing
6 changed files
with
46 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2012-2013, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2012-2016, Stefan Eilemann <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License version 2.1 as published | ||
|
@@ -30,8 +30,8 @@ static void _getInfo( EqCompressorInfo* const info ) | |
info->version = EQ_COMPRESSOR_VERSION; | ||
info->capabilities = EQ_COMPRESSOR_DATA_1D | EQ_COMPRESSOR_DATA_2D; | ||
info->quality = 1.f; | ||
info->ratio = .50f; | ||
info->speed = .22f; | ||
info->ratio = .60f; | ||
info->speed = .26f; | ||
info->name = EQ_COMPRESSOR_FASTLZ_BYTE; | ||
info->tokenType = EQ_COMPRESSOR_DATATYPE_BYTE; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2012-2013, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2012-2016, Stefan Eilemann <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License version 2.1 as published | ||
|
@@ -32,8 +32,8 @@ static void _getInfo( EqCompressorInfo* const info ) | |
info->version = EQ_COMPRESSOR_VERSION; | ||
info->capabilities = EQ_COMPRESSOR_DATA_1D | EQ_COMPRESSOR_DATA_2D; | ||
info->quality = 1.f; | ||
info->ratio = .52f; | ||
info->speed = .21f; | ||
info->ratio = .60f; | ||
info->speed = .26f; | ||
info->name = EQ_COMPRESSOR_LZF_BYTE; | ||
info->tokenType = EQ_COMPRESSOR_DATATYPE_BYTE; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
/* Copyright (c) 2010, Cedric Stalder <[email protected]> | ||
* 2010-2013, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2010-2016, Cedric Stalder <[email protected]> | ||
* Stefan Eilemann <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License version 2.1 as published | ||
|
@@ -32,7 +32,7 @@ namespace plugin | |
{ | ||
namespace | ||
{ | ||
REGISTER_ENGINE( CompressorRLEB, BYTE, BYTE, 1., 0.93, 1., false ); | ||
REGISTER_ENGINE( CompressorRLEB, BYTE, BYTE, 1., 0.97, 1., false ); | ||
} | ||
|
||
template< typename T > | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
/* Copyright (c) 2012-2013, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2012-2016, Stefan Eilemann <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License version 2.1 as published | ||
|
@@ -31,8 +31,8 @@ static void _getInfo( EqCompressorInfo* const info ) | |
info->version = EQ_COMPRESSOR_VERSION; | ||
info->capabilities = EQ_COMPRESSOR_DATA_1D | EQ_COMPRESSOR_DATA_2D; | ||
info->quality = 1.f; | ||
info->ratio = .53f; | ||
info->speed = .34f; | ||
info->ratio = .60f; | ||
info->speed = .55f; | ||
info->name = EQ_COMPRESSOR_SNAPPY_BYTE; | ||
info->tokenType = EQ_COMPRESSOR_DATATYPE_BYTE; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
|
||
/* Copyright (c) 2010, Cedric Stalder <[email protected]> | ||
* 2010-2014, Stefan Eilemann <[email protected]> | ||
/* Copyright (c) 2010-2016, Cedric Stalder <[email protected]> | ||
* Stefan Eilemann <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License version 2.1 as published | ||
|
@@ -41,9 +41,7 @@ void _testRandom(); | |
void _testData( const uint32_t nameCompressor, const std::string& name, | ||
const uint8_t* data, const uint64_t size ); | ||
|
||
std::vector< uint32_t > getCompressorNames( const uint32_t tokenType ); | ||
Strings getFiles( const std::string& path, Strings& files, | ||
const std::string& ext ); | ||
Strings getFiles( Strings& files, const std::string& ext ); | ||
|
||
PluginRegistry registry; | ||
uint64_t _result = 0; | ||
|
@@ -55,6 +53,17 @@ float _baseTime = 0.f; | |
int main( int, char** ) | ||
{ | ||
registry.addDirectory( std::string( PRESSION_BUILD_DIR ) + "/lib" ); | ||
registry.addDirectory( "../bin" ); | ||
registry.addDirectory( "../lib" ); | ||
registry.addDirectory( "../../install/bin" ); | ||
registry.addDirectory( "../../install/lib" ); | ||
registry.addDirectory( "images" ); | ||
registry.addDirectory( | ||
"/nfs4/bbp.epfl.ch/visualization/resources/meshes/mediumPly/" ); | ||
registry.addDirectory( | ||
"/nfs4/bbp.epfl.ch/visualization/circuits/KaustCircuit/meshes" ); | ||
registry.addDirectory( | ||
"/nfs4/bbp.epfl.ch/visualization/circuits/KaustCircuit/simulations/run_1k/20.02.13/" ); | ||
TEST( registry.addLunchboxPlugins( )); | ||
registry.init(); | ||
|
||
|
@@ -151,26 +160,22 @@ void _testData( const uint32_t compressorName, const std::string& name, | |
|
||
void _testFile() | ||
{ | ||
std::vector< uint32_t >compressorNames = | ||
std::vector< uint32_t > compressorNames = | ||
getCompressorNames( EQ_COMPRESSOR_DATATYPE_BYTE ); | ||
|
||
std::vector< std::string > files; | ||
|
||
getFiles( "", files, ".*\\.dll" ); | ||
getFiles( "", files, ".*\\.exe" ); | ||
getFiles( "", files, ".*\\.so" ); | ||
getFiles( "../bin", files, ".*\\.dll" ); | ||
getFiles( "../lib", files, ".*\\.so" ); | ||
getFiles( "../../install/bin", files, ".*\\.dll" ); | ||
getFiles( "../../install/lib", files, ".*\\.so" ); | ||
getFiles( "images", files, ".*\\.rgb" ); | ||
getFiles( "", files, ".*\\.a" ); | ||
getFiles( "", files, ".*\\.dylib" ); | ||
getFiles( "/Users/eile/Library/Models/mediumPly/", files, ".*\\.bin" ); | ||
getFiles( "/Users/eile/Library/Models/mediumPly/", files, ".*\\.ply" ); | ||
getFiles( "/home/eilemann/Software/Models/mediumPly/", files, ".*\\.bin" ); | ||
getFiles( "/home/eilemann/Software/Models/mediumPly/", files, ".*\\.ply" ); | ||
|
||
getFiles( files, ".*\\.dll" ); | ||
getFiles( files, ".*\\.exe" ); | ||
getFiles( files, ".*\\.so" ); | ||
getFiles( files, ".*\\.a" ); | ||
getFiles( files, ".*\\.dylib" ); | ||
getFiles( files, ".*\\.rgb" ); | ||
getFiles( files, ".*\\.bin" ); | ||
getFiles( files, ".*\\.ply" ); | ||
getFiles( files, ".*\\.bbp" ); | ||
|
||
#if 1 | ||
// Limit to 30 files using a pseudo-random selection for reproducability | ||
const size_t maxFiles = 30; | ||
if( files.size() > maxFiles ) | ||
|
@@ -179,6 +184,7 @@ void _testFile() | |
for( size_t i = 0; i < cut; ++i ) | ||
files.erase( files.begin() + (i * 997 /*prime*/) % files.size( )); | ||
} | ||
#endif | ||
|
||
std::cout.setf( std::ios::right, std::ios::adjustfield ); | ||
std::cout.precision( 5 ); | ||
|
@@ -204,6 +210,9 @@ void _testFile() | |
} | ||
|
||
const size_t size = file.getSize(); | ||
if( size > LB_1GB ) | ||
continue; | ||
|
||
const std::string name = lunchbox::getFilename( *j ); | ||
|
||
_testData( *i, name, data, size ); | ||
|
@@ -265,13 +274,9 @@ void _testRandom() | |
delete [] data; | ||
} | ||
|
||
Strings getFiles( const std::string& path, Strings& files, | ||
const std::string& ext ) | ||
Strings getFiles( Strings& files, const std::string& ext ) | ||
{ | ||
Strings paths = registry.getDirectories(); | ||
if( !path.empty( )) | ||
paths.push_back( path ); | ||
|
||
for( uint64_t j = 0; j < paths.size(); ++j ) | ||
{ | ||
const Strings& candidates = lunchbox::searchDirectory( paths[j], ext ); | ||
|