Skip to content
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

enhance H264EncoderNvCodec by adding a buffer threshold property #360

Merged
merged 5 commits into from
Jul 29, 2024

Conversation

kushaljain-apra
Copy link
Collaborator

@kushaljain-apra kushaljain-apra commented Jun 3, 2024

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #358

Description

  1. Added a buffer threshold property in H264EncoderNvcodec Module
  2. Currently, it uses a fixed number of encoder buffers that are initialized once.
  3. We still have default number of buffers set to 30, but with buffer threshold property you can specify the upper limit for the number encoders.
  4. If the number of free output encoder buffers becomes zero and the total number of encoder buffers is less the buffer threshold, we allocate min(total number of buffers currently allocated, buffer threshold - total number of buffers currently allocated) more buffers.
  5. This lets us control the number of buffers to be allocated if needed using an upper limit as buffer threshold.

Alternative(s) considered

Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type

Type Choose one: (Bug fix)

Screenshots (if applicable)

Checklist

  • I have read the Contribution Guidelines
  • I have written Unit Tests
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach

Copy link

github-actions bot commented Jun 3, 2024

Test Results Linux

  1 files  ±0    1 suites  ±0   10m 12s ⏱️ -1s
308 tests ±0  227 ✅ ±0  81 💤 ±0  0 ❌ ±0 
227 runs  ±0  146 ✅ ±0  81 💤 ±0  0 ❌ ±0 

Results for commit eb72fe9. ± Comparison against base commit 19190c3.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jun 3, 2024

Test Results Win-nocuda

  1 files  ±0    1 suites  ±0   10m 28s ⏱️ -1s
303 tests ±0  227 ✅ ±0  76 💤 ±0  0 ❌ ±0 
227 runs  ±0  151 ✅ ±0  76 💤 ±0  0 ❌ ±0 

Results for commit eb72fe9. ± Comparison against base commit 19190c3.

♻️ This comment has been updated with latest results.

Copy link

github-actions bot commented Jul 4, 2024

Test Results Windows-cuda

  1 files  ±0    1 suites  ±0   12m 6s ⏱️ -1s
404 tests ±0  288 ✅ ±0  116 💤 ±0  0 ❌ ±0 
288 runs  ±0  172 ✅ ±0  116 💤 ±0  0 ❌ ±0 

Results for commit eb72fe9. ± Comparison against base commit 19190c3.

♻️ This comment has been updated with latest results.

base/src/H264EncoderNVCodec.cpp Outdated Show resolved Hide resolved
base/src/H264EncoderNVCodecHelper.cpp Show resolved Hide resolved
base/include/H264EncoderNVCodec.h Show resolved Hide resolved
Copy link

Test Results Linux_ARM64

  1 files  ±0    1 suites  ±0   10m 58s ⏱️ +3s
431 tests ±0  259 ✅ ±0  172 💤 ±0  0 ❌ ±0 
259 runs  ±0   87 ✅ ±0  172 💤 ±0  0 ❌ ±0 

Results for commit eb72fe9. ± Comparison against base commit 19190c3.

Copy link

Test Results Linux-CudaT

  1 files  ±0    1 suites  ±0   11m 58s ⏱️ -1s
409 tests ±0  249 ✅ ±0  160 💤 ±0  0 ❌ ±0 
249 runs  ±0   89 ✅ ±0  160 💤 ±0  0 ❌ ±0 

Results for commit eb72fe9. ± Comparison against base commit 19190c3.

@joiskash joiskash merged commit 7b852c8 into main Jul 29, 2024
18 of 21 checks passed
@joiskash joiskash deleted the ks/enhanceH264EncoderNvCodec branch July 29, 2024 14:00
Vinayak-YB pushed a commit that referenced this pull request Aug 7, 2024
* enhance H264EncoderNvCodec by adding a buffer threshold property

* add default threshold as a #define

* add comments for doxygen documentation

---------

Co-authored-by: Yashraj <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants