-
Notifications
You must be signed in to change notification settings - Fork 615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Video tests utils and refactor #3620
Conversation
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
Signed-off-by: Albert Wolant <awolant@nvidia.com>
!build |
} | ||
|
||
void VideoTestBase::CompareFramesAvg( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: the name sounds as if you were comparing the average of each frame. Maybe AvgError
would do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
CI MESSAGE: [3756531]: BUILD STARTED |
@JanuszL @jantonguirao I have a question about this PR for you. I have some more utilities in the video test that I use for myself for test/debug purposes. One is |
Yes, I think it would be useful to add it, even add it into the test but ifdef out so during debugging it can be easily turned on. |
CI MESSAGE: [3756531]: BUILD PASSED |
Yes, I think those would be useful. |
Signed-off-by: Albert Wolant <awolant@nvidia.com>
!build |
CI MESSAGE: [3757039]: BUILD STARTED |
uint8_t *GetCfrFrame(int video_id, int frame_id) { return cfr_frames_[video_id][frame_id].data; } | ||
|
||
uint8_t *GetVfrFrame(int video_id, int frame_id) { return vfr_frames_[video_id][frame_id].data; } | ||
|
||
void SaveFrame( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a docstring to describe how to use it?
What is the meaning of frame_id, sample_id, and batch_id?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Albert Wolant <awolant@nvidia.com>
CI MESSAGE: [3757039]: BUILD PASSED |
int batch_size = nb_elements / nb_threads; | ||
int batch_remainder = nb_elements % nb_threads; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A suggestion: You could get a more even distribution of work per thread doing something like this:
for (int i = 0; i < nb_threads; ++i) {
int start = nb_elements * i / nb_threads;
int end = nb_elements * (i+1) / nb_threads;
threads[i] = std::thread(func, start, end, i);
}
This way you also don't need to treat the last batch differently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
int frame_id, | ||
int sample_id, | ||
int batch_id, | ||
std::string folder_path, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::string folder_path, | |
const std::string &folder_path, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Signed-off-by: Albert Wolant <awolant@nvidia.com>
0d7a4cd
to
71c20eb
Compare
!build |
CI MESSAGE: [3757576]: BUILD STARTED |
CI MESSAGE: [3757576]: BUILD PASSED |
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
* Add video tests utilities Signed-off-by: Albert Wolant <awolant@nvidia.com>
Description
What happened in this PR
Checklist
Tests
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: DALI-2252