Add session overhead functions & modify perf app (#366)

* add session overhead funcitons & modify perf app

* remove class:: for function calls

* add session overhead funcitons & modify perf app

* remove class:: for function calls

* review comments

* fix comments

* duration to double

* update perf sample for thread_id for overhead

* remove debug statements

* revoew comments

* return value chnage to double

* remove session ID functions

* check session id validity
This commit is contained in:
Lakshmi Kumar
2024-06-11 07:38:19 -07:00
committed by GitHub
parent ac272886b1
commit 48b56de77a
3 changed files with 42 additions and 5 deletions
+2 -2
View File
@@ -52,9 +52,9 @@ void DecProc(RocVideoDecoder *p_dec, VideoDemuxer *demuxer, int *pn_frame, doubl
auto end_time = std::chrono::high_resolution_clock::now();
auto time_per_decode = std::chrono::duration<double, std::milli>(end_time - start_time).count();
auto session_overhead = p_dec->GetDecoderSessionOverHead(std::this_thread::get_id());
// Calculate average decoding time
total_dec_time = time_per_decode;
total_dec_time = time_per_decode - session_overhead;
double average_decoding_time = total_dec_time / n_frame;
double n_fps = 1000 / average_decoding_time;
*pn_fps = n_fps;