Modify the videoDecodePerf app to take an argument for memory type (#424)

Этот коммит содержится в:
Aryan Salmanpour
2024-09-24 19:06:50 -04:00
коммит произвёл GitHub
родитель 1d1f31f85c
Коммит 0ba9992247
2 изменённых файлов: 19 добавлений и 2 удалений
+5
Просмотреть файл
@@ -35,4 +35,9 @@ make -j
-disp_delay <display delay - specify the number of frames to be delayed for display [optional]>
-d <Device ID (>= 0) [optional - default:0]>
-z <force_zero_latency - Decoded frames will be flushed out for display immediately [optional]>
-m <Memory type (integer values between 0 to 3: specifies where to store the decoded output:
0 = decoded output will be in internal interopped memory,
1 = decoded output will be copied to a separate device memory
2 = decoded output will be copied to a separate host memory
3 = decoded output will not be available (decode only)) [optional; default: 3]>
```
+14 -2
Просмотреть файл
@@ -74,8 +74,13 @@ void ShowHelpAndExit(const char *option = NULL) {
std::cout << "Options:" << std::endl
<< "-i Input File Path - required" << std::endl
<< "-t Number of threads (>= 1) - optional; default: 1" << std::endl
<< "-d Device ID (>= 0) - optional; default: 0" << std::endl
<< "-z force_zero_latency (force_zero_latency, Decoded frames will be flushed out for display immediately); optional;" << std::endl;
<< "-d Device ID (>= 0) - optional; default: 0" << std::endl
<< "-z Force zero latency (decoded frames will be flushed out for display immediately) - optional" << std::endl
<< "-m Memory type (integer values between 0 to 3: specifies where to store the decoded output:" << std::endl
<< " 0 = decoded output will be in internal interopped memory," << std::endl
<< " 1 = decoded output will be copied to a separate device memory," << std::endl
<< " 2 = decoded output will be copied to a separate host memory," << std::endl
<< " 3 = decoded output will not be available (decode only)) - optional; default: 3" << std::endl;
exit(0);
}
@@ -146,6 +151,13 @@ int main(int argc, char **argv) {
b_force_zero_latency = true;
continue;
}
if (!strcmp(argv[i], "-m")) {
if (++i == argc) {
ShowHelpAndExit("-m");
}
mem_type = static_cast<OutputSurfaceMemoryType>(atoi(argv[i]));
continue;
}
ShowHelpAndExit(argv[i]);
}