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

Hang of 10 bit encoding with some resolution #471

Closed tianjunwork closed 4 years ago

tianjunwork commented 4 years ago

With below command, encoding always stops at 1833th frame.

(master) $ ./SvtHevcEncApp -i ../../../../../yuv/7680x3840_420.yuv -w 7680 -h 3840 -n 2000 -bit-depth 10
-------------------------------------------
SVT-HEVC Encoder
SVT [version]:  SVT-HEVC Encoder Lib v1.4.3
SVT [build]  :  GCC 8.1.0        64 bit
LIB Build date: Feb 13 2020 10:48:40
-------------------------------------------

Warning: input profile is not correct, force converting it from 1 to Main10 for 10 bits cases
Number of logical cores available: 72
Number of PPCS 152
-------------------------------------------
SVT [config]: Main10 Profile    Tier (auto)     Level (auto)
SVT [config]: EncoderMode / Tune                                                        : 7 / 1
SVT [config]: EncoderBitDepth / CompressedTenBitFormat / EncoderColorFormat             : 10 / 0 / 1
SVT [config]: SourceWidth / SourceHeight / InterlacedVideo                              : 7680 / 3840 / 0
SVT [config]: FrameRate / Gop Size                                                      : 60 / 64
SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure                  : 3 / 0 / 2
SVT [config]: BRC Mode / QP / LookaheadDistance / SceneChange                           : CQP / 32 / 17 / 1
SVT [config]: BitRateReduction / ImproveSharpness                                       : 0 / 0
SVT [config]: tileColumnCount / tileRowCount / tileSliceMode / Constraint MV            : 1 / 1 / 0 / 0
SVT [config]: De-blocking Filter / SAO Filter                                           : 1 / 1
SVT [config]: HME / UseDefaultHME                                                       : 1 / 1
SVT [config]: MV Search Area Width / Height                                             : 16 / 7
SVT [config]: HRD / VBV MaxRate / BufSize / BufInit                                     : 0 / 0 / 0 / 90
-------------------------------------------
Encoding      1833

gdb backtrace:

Encoding      1833^C
Thread 1 "SvtHevcEncApp" received signal SIGINT, Interrupt.
0x00007ffff70e34ee in __pthread_mutex_unlock_usercnt (decr=1, mutex=0x555824750050) at pthread_mutex_unlock.c:55
55      pthread_mutex_unlock.c: No such file or directory.
(gdb) bt
#0  0x00007ffff70e34ee in __pthread_mutex_unlock_usercnt (decr=1, mutex=0x555824750050) at pthread_mutex_unlock.c:55
#1  __GI___pthread_mutex_unlock (mutex=0x555824750050) at pthread_mutex_unlock.c:314
#2  0x00007ffff73a39c1 in EbReleaseMutex (mutexHandle=0x555824750050) at /home/vcse/jun/jun_fork/Benchmark/SVT-HEVC/Source/Lib/Codec/EbThreads.c:261
#3  0x00007ffff73a34b5 in EbReleaseProcess (processFifoPtr=0x55582475c3b0) at /home/vcse/jun/jun_fork/Benchmark/SVT-HEVC/Source/Lib/Codec/EbSystemResourceManager.c:545
#4  0x00007ffff73a36d3 in EbGetFullObjectNonBlocking (fullFifoPtr=0x55582475c3b0, wrapperDblPtr=0x7fffffffdfa0) at /home/vcse/jun/jun_fork/Benchmark/SVT-HEVC/Source/Lib/Codec/EbSystemResourceManager.c:725
#5  0x00007ffff734bf13 in EbH265GetPacket (h265EncComponent=0x55555576bbc0, pBuffer=0x7fffffffe000, picSendDone=0 '\000') at /home/vcse/jun/jun_fork/Benchmark/SVT-HEVC/Source/Lib/Codec/EbEncHandle.c:3939
#6  0x0000555555562c87 in ProcessOutputStreamBuffer (config=0x55555576b420, appCallBack=0x55555576ba50, picSendDone=0 '\000') at /home/vcse/jun/jun_fork/Benchmark/SVT-HEVC/Source/App/EbAppProcessCmd.c:1340
#7  0x000055555555e762 in main (argc=11, argv=0x7fffffffe298) at /home/vcse/jun/jun_fork/Benchmark/SVT-HEVC/Source/App/EbAppMain.c:209
(gdb)

Below command runs fine. Same resolution of 8 bit encoding: ./SvtHevcEncApp -i ../../../../../yuv/7680x3840_420.yuv -w 7680 -h 3840 -n 2000 Other resolution of 10 bit encoding: ./SvtHevcEncApp -i ../../../../../yuv/7680x4320_420_5.yuv -w 7680 -h 4320 -n 2000 -bit-depth 10

tianjunwork commented 4 years ago

Not regression of #460

tianjunwork commented 4 years ago

Lost the original file 7680x3840_420.yuv(generated by gst videotestsrc). Generated a new one with same spec. But I can't reproduce this hang issue. Close this issue for now. Will reopen if see it again.

(master) $ ./SvtHevcEncApp -i ../../../../yuv/7680x3840_420_5.yuv -w 7680 -h 3840 -n 2000 -bit-depth 10
-------------------------------------------
SVT-HEVC Encoder
SVT [version]:  SVT-HEVC Encoder Lib v1.4.3
SVT [build]  :  GCC 8.1.0        64 bit
LIB Build date: Mar  4 2020 15:54:19
-------------------------------------------

Warning: input profile is not correct, force converting it from 1 to Main10 for 10 bits cases
Number of logical cores available: 72
Number of PPCS 152
-------------------------------------------
SVT [config]: Main10 Profile    Tier (auto)     Level (auto)
SVT [config]: EncoderMode / Tune                                                 : 7 / 1
SVT [config]: EncoderBitDepth / CompressedTenBitFormat / EncoderColorFormat      : 10 / 0 / 1
SVT [config]: SourceWidth / SourceHeight / InterlacedVideo                       : 7680 / 3840 / 0
SVT [config]: FrameRate / Gop Size                                               : 60 / 64
SVT [config]: HierarchicalLevels / BaseLayerSwitchMode / PredStructure           : 3 / 0 / 2
SVT [config]: BRC Mode / QP / LookaheadDistance / SceneChange                    : CQP / 32 / 17 / 1
SVT [config]: BitRateReduction / ImproveSharpness                                : 0 / 0
SVT [config]: tileColumnCount / tileRowCount / tileSliceMode / Constraint MV     : 1 / 1 / 0 / 0
SVT [config]: De-blocking Filter / SAO Filter                                    : 1 / 1
SVT [config]: HME / UseDefaultHME                                                : 1 / 1
SVT [config]: MV Search Area Width / Height                                      : 16 / 7
SVT [config]: HRD / VBV MaxRate / BufSize / BufInit                              : 0 / 0 / 0 / 90
-------------------------------------------
Encoding      2000
Average System Encoding Speed:        18.39

SUMMARY --------------------------------- Channel 1  --------------------------------
Total Frames            Frame Rate              Byte Count              Bitrate
        2000            60.00 fps                 20898875              5015.73 kbps

Channel 1
Average Speed:          18.39 fps
Total Encoding Time:    108768 ms
Total Execution Time:   115111 ms
Average Latency:        2347 ms
Max Latency:            2901 ms
Encoder finished