mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2025-01-09 04:05:37 +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
|
@ -18,11 +18,24 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
int quality = 50;
|
int quality = 50;
|
||||||
int numThreads = 1;
|
int numThreads = 1;
|
||||||
|
int numCompressions = 1;
|
||||||
bool bUseSIMD = false;
|
bool bUseSIMD = false;
|
||||||
|
|
||||||
bool knowArg = false;
|
bool knowArg = false;
|
||||||
do {
|
do {
|
||||||
knowArg = false;
|
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) {
|
if(strcmp(argv[fileArg], "-s") == 0) {
|
||||||
fileArg++;
|
fileArg++;
|
||||||
|
@ -67,6 +80,7 @@ int main(int argc, char **argv) {
|
||||||
settings.bUseSIMD = bUseSIMD;
|
settings.bUseSIMD = bUseSIMD;
|
||||||
settings.iNumThreads = numThreads;
|
settings.iNumThreads = numThreads;
|
||||||
settings.iQuality = quality;
|
settings.iQuality = quality;
|
||||||
|
settings.iNumCompressions = numCompressions;
|
||||||
|
|
||||||
CompressedImage *ci = CompressImage(file, settings);
|
CompressedImage *ci = CompressImage(file, settings);
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ struct SCompressionSettings {
|
||||||
bool bUseSIMD;
|
bool bUseSIMD;
|
||||||
int iNumThreads;
|
int iNumThreads;
|
||||||
int iQuality;
|
int iQuality;
|
||||||
|
int iNumCompressions;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CompressedImage * CompressImage(
|
extern CompressedImage * CompressImage(
|
||||||
|
|
Loading…
Reference in a new issue