mirror of
https://github.com/yuzu-emu/FasTC
synced 2024-11-23 09:03:51 +00:00
Add flag to modify the number of compressions in order to take an average of the compression time.
This commit is contained in:
parent
1c8b065261
commit
e25e5bae90
2 changed files with 15 additions and 0 deletions
|
@ -18,11 +18,24 @@ int main(int argc, char **argv) {
|
|||
|
||||
int quality = 50;
|
||||
int numThreads = 1;
|
||||
int numCompressions = 1;
|
||||
bool bUseSIMD = false;
|
||||
|
||||
bool knowArg = false;
|
||||
do {
|
||||
knowArg = false;
|
||||
|
||||
if(strcmp(argv[fileArg], "-n") == 0) {
|
||||
fileArg++;
|
||||
|
||||
if(fileArg == argc || (numCompressions = atoi(argv[fileArg])) < 0) {
|
||||
PrintUsage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fileArg++;
|
||||
knowArg = true;
|
||||
}
|
||||
|
||||
if(strcmp(argv[fileArg], "-s") == 0) {
|
||||
fileArg++;
|
||||
|
@ -67,6 +80,7 @@ int main(int argc, char **argv) {
|
|||
settings.bUseSIMD = bUseSIMD;
|
||||
settings.iNumThreads = numThreads;
|
||||
settings.iQuality = quality;
|
||||
settings.iNumCompressions = numCompressions;
|
||||
|
||||
CompressedImage *ci = CompressImage(file, settings);
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ struct SCompressionSettings {
|
|||
bool bUseSIMD;
|
||||
int iNumThreads;
|
||||
int iQuality;
|
||||
int iNumCompressions;
|
||||
};
|
||||
|
||||
extern CompressedImage * CompressImage(
|
||||
|
|
Loading…
Reference in a new issue