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

Multithreading of Unpack2D #460

Closed PierreIntel closed 4 years ago

PierreIntel commented 4 years ago

Multithreading the Unpack2D function to remove bottleneck for non compressed 10 bits files in resolutions greater than 4k.

PierreIntel commented 4 years ago

I duplicate the failed test but I didn't have any errors. I tried with gcc 5.4.0, 8.3.0, -DCMAKE_BUILD_TYPE, -DBUILD_SHARED_LIBS=OFF and with the command line : ./SvtHevcEncApp -encMode 9 -i akiyo_cif.y4m -b test.h265 -lp 2 (-asm 0)

1480c1 commented 4 years ago

Error is that the CPU they used was too slow so the test did not finish in time, you can probably ignore it

Austin-Hu commented 4 years ago

Hi @PierreIntel ,

I also reproduced the random hang issue at least once within 20 times, with and without the PR #460 applied, by the command line:

./SvtHevcEncApp -i akiyo_cif.y4m -b test1.h265 -lp 1

So the hang issue isn't due to your PR #460 , which looks good to me, and indeed improves the encoding performance for big resolutions. So please make sure that the playback of encoded bit streams is correct for other formats (YUV422/444) as well, and then we will go through the review and merging process for the PR. Thanks!

Hi @intelmark , @1480c1 , @tianjunwork ,

I checked that the random hang issue exists for long time since v1.3.0, with the akiyo_cif.y4m file or other YUV low resolution inputs (such as 352x288), at the stack:

#0  0x00007ffff764b6d6 in futex_abstimed_wait_cancelable (private=0, abstime=0x0, expected=0, futex_word=0x555559f2b3f0) at ../sysdeps/unix/sysv/linux/futex-internal.h:205
#1  do_futex_wait (sem=sem@entry=0x555559f2b3f0, abstime=0x0) at sem_waitcommon.c:111
#2  0x00007ffff764b7c8 in __new_sem_wait_slow (sem=0x555559f2b3f0, abstime=0x0) at sem_waitcommon.c:181
#3  0x00007ffff78b8f59 in EbBlockOnSemaphore () from libSvtHevcEnc.so.1
#4  0x00007ffff78b8c33 in EbGetEmptyObject () from libSvtHevcEnc.so.1
#5  0x00007ffff787c6e7 in EbH265EncSendPicture () from libSvtHevcEnc.so.1
#6  0x000055555555ea25 in ProcessInputBuffer ()
#7  0x0000555555557ea4 in main ()

Once you also confirm it, we need to open an issue to track and fix it. Thanks!

PierreIntel commented 4 years ago

Hello @Austin-Hu , I verified the output files with an input in 422/444 and the option color-format 2/3, there are no errors and I can playback them correctly.