OpenVisualCloud / SVT-HEVC

SVT HEVC encoder. Scalable Video Technology (SVT) is a software-based video coding technology that is highly optimized for Intel® Xeon® processors. Using the open source SVT-HEVC encoder, it is possible to spread video encoding processing across multiple Intel® Xeon® processors to achieve a real advantage of processing efficiency.
Other
519 stars 169 forks source link

Fixed the memory map management issue with multi-instance. #446

Closed Austin-Hu closed 4 years ago

Austin-Hu commented 4 years ago

Because currently almost all the objects allocated in heap are managed by the memoryMap, addressed the issue by:

  1. Managing the memory maps with encoding context via linked list;
  2. Searching for the corresponding memory map with the current encoding context.

Note: thread ID (POSIX pthread_t) can't be used to distinguish the memory maps, because the SVT APIs may be invoked within different threads by applications or framework plugins.

NOTE: the most reasonable solution is:

  1. Free the allocated objects at the end of each kernel thread;
  2. Join each kernel thread, destruct each kernel context and System Resource object in EbDeinitEncoder().

Signed-off-by: Austin Hu austin.hu@intel.com

Fixes Issue #357 .

Austin-Hu commented 4 years ago

Don't need it any more, as PR #467 targets to address this issue as well.