fraunhoferhhi / vvenc

VVenC, the Fraunhofer Versatile Video Encoder
https://www.hhi.fraunhofer.de/en/departments/vca/technologies-and-solutions/h266-vvc.html
BSD 3-Clause Clear License
943 stars 170 forks source link

" --Log2MaxTbSize 5" setting result Segment fault #326

Closed totang closed 11 months ago

totang commented 11 months ago

Release version has the issue while Debug version hasn't in Linux platform

command and log:

release-static> vvencapp --fps 30 --InternalBitDepth 8 -ip 180 -i foreman_cif.yuv -b test.266 -o test_encdec_recon.yuv -s 352x288 -f 180 -q 30 -f 5 --preset slow --CTUSize 64 --Log2MaxTbSize 5 Segmentation fault

adamjw24 commented 11 months ago

I just tested it real quick, and of course "it works for me". Address sanitizer thinks all is fine as well.

Which exact version are you using, what compiler, what system?

One issue in your command line: you call the vvencapp and use vvencFFapp parametrization. This should not cause segfault tho, but just a bunch of parameter errors.

totang commented 11 months ago

See below log information for with and w/o --Log2MaxTbSize 5 option .

After I clone 1.9.1 ,the issue has gone

vvencFFapp --fps 30 --InternalBitDepth 8 -ip 180 --preset slow -i Flatout3_A_3840x2160_60.yuv -b Flatout3_A_3840x2160_60_at_qp47_T17.266 -o test_encdec_recon.yuv -s 3840x2160 -f 60 -q 47 --CTUSize 64 --Log2MaxTbSize 5 vvencFFapp: Fraunhofer VVC Encoder ver. 1.7.0 [Linux][GCC 9.2.0][64 bit][SIMD=AVX2] started @ Thu Oct 26 19:00:27 2023 CODING TOOL CFG: CTU64 QT33BTT32 IBD:0 SAO:1 ALF:1 (NonLinLuma:0 NonLinChr:0) CCALF:1 Tiles:1x1 Slices:1 WPP:0 WPP-Substreams:1 TMVP:1 DQ:1 SDH:0 CST:1 BDOF:1 DMVR:1 MTSImplicit:1 SBT:1 JCbCr:1 CabacInitPresent:1 AMVR:1 SMVD:3 LMCS:2 (Signal:SDR Opt:0) CIIP:1 MIP:1 AFFINE:2 (PROF:1, Type:1) MMVD:3 DisFracMMVD:1 SbTMVP:1 GPM:1 LFNST:1 MTS:0 ISP:1 TS:2 TSLog2MaxSize:5 useChromaTS:0 BDPCM:2 IBC:2 BCW:2 ENC. ALG. CFG: QPA:0 HAD:1 RDQ:1 RDQTS:1 ASR:1 MinSearchWindow:96 EDO:2 MCTF:2 BIM:1 PRE-ANALYSIS CFG: STA:1 LeadFrames:0 TrailFrames:0 FAST TOOL CFG: ECU:0 FEN:3 FDM:1 FastSearch:4 (SCC:2) LCTUFast:1 FastMrg:2 PBIntraFast:1 AMaxBT:1 FastQtBtEnc:1 ContentBasedFastQtbt:0 FastMIP:0 FastIntraTools:0 IntraEstDecBit:1 FastLocalDualTree:1 IntegerET:0 FastSubPel:1 ReduceFilterME:0 QtbttExtraFast:2 FastTTSplit:5 IBCFastMethod:1 FIM:0 ALFSpeed:0 QuantThr: 4 RATE CONTROL CFG: RateControl:0 LookAhead:0 PARALLEL PROCESSING CFG: NumThreads:0 MaxParallelFrames:0 WppBitEqual:0 WF:0

POC 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 44, TF 2) 214728 bits [Y 30.9855 dB U 39.8058 dB V 40.8110 dB] [ET 39 ] [L0 ] [L1 ] Segmentation fault

vvencFFapp --fps 30 --InternalBitDepth 8 -ip 180 --preset slow -i Flatout3_A_3840x2160_60.yuv -b Flatout3_A_3840x2160_60_at_qp47_T17.266 -o test_encdec_recon.yuv -s 3840x2160 -f 60 -q 47 --CTUSize 64 vvencFFapp: Fraunhofer VVC Encoder ver. 1.7.0 [Linux][GCC 9.2.0][64 bit][SIMD=AVX2] started @ Thu Oct 26 19:01:59 2023 CODING TOOL CFG: CTU64 QT33BTT32 IBD:0 SAO:1 ALF:1 (NonLinLuma:0 NonLinChr:0) CCALF:1 Tiles:1x1 Slices:1 WPP:0 WPP-Substreams:1 TMVP:1 DQ:1 SDH:0 CST:1 BDOF:1 DMVR:1 MTSImplicit:1 SBT:1 JCbCr:1 CabacInitPresent:1 AMVR:1 SMVD:3 LMCS:2 (Signal:SDR Opt:0) CIIP:1 MIP:1 AFFINE:2 (PROF:1, Type:1) MMVD:3 DisFracMMVD:1 SbTMVP:1 GPM:1 LFNST:1 MTS:0 ISP:1 TS:2 TSLog2MaxSize:5 useChromaTS:0 BDPCM:2 IBC:2 BCW:2 ENC. ALG. CFG: QPA:0 HAD:1 RDQ:1 RDQTS:1 ASR:1 MinSearchWindow:96 EDO:2 MCTF:2 BIM:1 PRE-ANALYSIS CFG: STA:1 LeadFrames:0 TrailFrames:0 FAST TOOL CFG: ECU:0 FEN:3 FDM:1 FastSearch:4 (SCC:2) LCTUFast:1 FastMrg:2 PBIntraFast:1 AMaxBT:1 FastQtBtEnc:1 ContentBasedFastQtbt:0 FastMIP:0 FastIntraTools:0 IntraEstDecBit:1 FastLocalDualTree:1 IntegerET:0 FastSubPel:1 ReduceFilterME:0 QtbttExtraFast:2 FastTTSplit:5 IBCFastMethod:1 FIM:0 ALFSpeed:0 QuantThr: 4 RATE CONTROL CFG: RateControl:0 LookAhead:0 PARALLEL PROCESSING CFG: NumThreads:0 MaxParallelFrames:0 WppBitEqual:0 WF:0

POC 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 44, TF 2) 204240 bits [Y 31.0426 dB U 40.7837 dB V 42.4136 dB] [ET 43 ] [L0 ] [L1 ] POC 32 TId: 0 ( TRAIL, B-SLICE, QP 46, TF 2) 96360 bits [Y 30.5084 dB U 39.9921 dB V 41.3317 dB] [ET 60 ] [L0 0 ] [L1 0 ]

From: Adam Wieckowski @.> Sent: Friday, October 27, 2023 12:18 AM To: fraunhoferhhi/vvenc @.> Cc: Tony Tang @.>; Author @.> Subject: Re: [fraunhoferhhi/vvenc] " --Log2MaxTbSize 5" setting result Segment fault (Issue #326)

I just tested it real quick, and of course "it works for me". Address sanitizer thinks all is fine as well.

Which exact version are you using, what compiler, what system?

One issue in your command line: you call the vvencapp and use vvencFFapp parametrization. but this should not cause segfault, but just a bunch of parameter errors.

— Reply to this email directly, view it on GitHubhttps://github.com/fraunhoferhhi/vvenc/issues/326#issuecomment-1781437996, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJBJVJSEQVNSKSGBI32VFGDYBKEKHAVCNFSM6AAAAAA6PNPG6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGQZTOOJZGY. You are receiving this because you authored the thread.Message ID: @.**@.>>

adamjw24 commented 11 months ago

So the issue can be closed?

Btw. both of your logs refer to VVenC v1.7.0. If the issue does not occur in the newest version I would consider it fixed.

totang commented 11 months ago

Yes,please。

totang commented 11 months ago

I meet the issue in another 4k sequence ,see the log info for with and without " --Log2MaxTbSize 5" option

vvencFFapp --fps 30 --InternalBitDepth 8 -ip 180 --preset slow -t 8 -i Flatout3_A_3840x2160_60.yuv -b Flatout3_A_3840x2160_60_at_qp43_T18.266 -o test_encdec_recon.yuv -s 3840x2160 -f 60 -q 43 --CTUSize 64 --Log2MaxTbSize 5 vvencFFapp: Fraunhofer VVC Encoder ver. 1.9.1 [Linux][GCC 9.3.0][64 bit][SIMD=AVX2] vvencFFapp [info]: started @ Mon Oct 30 00:30:51 2023 vvenc [verbose]: Input File : Flatout3_A_3840x2160_60.yuv vvenc [verbose]: Bitstream File : Flatout3_A_3840x2160_60_at_qp43_T18.266 vvenc [verbose]: Real Format : 3840x2160 yuv420p 30 Hz SDR 319 frames vvenc [verbose]: Frames : encode 60 frames vvenc [verbose]: Internal format : 3840x2160 30 Hz SDR vvenc [verbose]: Threads : 8 (parallel frames: 4) vvenc [verbose]: Rate control : QP 43 vvenc [verbose]: Perceptual optimization : Disabled vvenc [verbose]: Intra period (keyframe) : 180 vvenc [verbose]: Decoding refresh type : CRA vvenc [verbose]: Sequence PSNR output : Linear average only vvenc [verbose]: Hexadecimal PSNR output : Disabled vvenc [verbose]: Sequence MSE output : Disabled vvenc [verbose]: Frame MSE output : Disabled vvenc [verbose]: Cabac-zero-word-padding : Enabled vvenc [verbose]: Frame index : 60 frames vvenc [verbose]: Profile : main_10 vvenc [verbose]: Level : 5 vvenc [verbose]: CU size : 64 vvenc [verbose]: Max TB size : 32 vvenc [verbose]: Min CB size : 4 vvenc [verbose]: Motion search range : 384 vvenc [verbose]: QP : 43 vvenc [verbose]: Max dQP signaling subdiv : 0 vvenc [verbose]: Cb QP Offset (dual tree) : 0 (0) vvenc [verbose]: Cr QP Offset (dual tree) : 0 (0) vvenc [verbose]: GOP size : 32 vvenc [verbose]: PicReordering : 1 vvenc [verbose]: Input bit depth : (Y:8, C:8) vvenc [verbose]: MSB-extended bit depth : (Y:8, C:8) vvenc [verbose]: Internal bit depth : (Y:8, C:8) vvenc [verbose]: cu_chroma_qp_offset_subdiv : -1 vvenc [verbose]: log2_sao_offset_scale_luma : 0 vvenc [verbose]: log2_sao_offset_scale_chroma : 0 vvenc [verbose]: Cost function: : Lossy coding

vvenc [verbose]: CODING TOOL CFG: CTU64 QTMin33BTT32 IBD:0 SAO:1 ALF:1 (NonLinLuma:0 NonLinChr:0) CCALF:1 Tiles:1x1 Slices:1 WPP:0 WPP-Substreams:1 TMVP:1 DQ:1 SDH:0 CST:1 BDOF:1 DMVR:1 MTSImplicit:1 SBT:1 JCbCr:1 CabacInitPresent:0 AMVR:1 SMVD:3 LMCS:2 (Signal:SDR Opt:0) CIIP:1 MIP:1 AFFINE:3 (PROF:1, Type:1) MMVD:3 DisFracMMVD:1 SbTMVP:1 GPM:1 LFNST:1 MTS:0 ISP:3 TS:2 TSLog2MaxSize:5 useChromaTS:0 BDPCM:2 IBC:2 BCW:2 vvenc [verbose]: ENC. ALG. CFG: QPA:0 HAD:1 RDQ:1 RDQTS:1 ASR:1 MinSearchWindow:96 EDO:2 MCTF:2 BIM:1 vvenc [verbose]: PRE-ANALYSIS CFG: STA:1 LeadFrames:0 TrailFrames:0 vvenc [verbose]: FAST TOOL CFG: ECU:0 FEN:3 FDM:1 FastSearch:4 (SCC:2) LCTUFast:1 FastMrg:3 PBIntraFast:1 AMaxBT:0 FastQtBtEnc:1 ContentBasedFastQtbt:1 FastMIP:0 FastIntraTools:0 IntraEstDecBit:1 FastLocalDualTree:1 IntegerET:0 FastSubPel:1 ReduceFilterME:2 QtbttExtraFast:2 FastTTSplit:5 IBCFastMethod:1 FIM:0 ALFSpeed:0 QuantThr:4 SelectiveRDQO:0 vvenc [verbose]: RATE CONTROL CFG: RateControl:0 QP:43 LookAhead:0 FirstPassMode:0 vvenc [verbose]: PARALLEL PROCESSING CFG: NumThreads:8 MaxParallelFrames:4 FppLinesSynchro:0 WppBitEqual:1 WF:0

POC 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 40, TF 2) 414448 bits [Y 32.7257 dB U 41.3451 dB V 42.9608 dB] [ET 17 ] [L0 ] [L1 ] Segmentation fault

vvencFFapp --fps 30 --InternalBitDepth 8 -ip 180 --preset slow -t 8 -i Flatout3_A_3840x2160_60.yuv -b Flatout3_A_3840x2160_60_at_qp43_T18.266 -o test_encdec_recon.yuv -s 3840x2160 -f 60 -q 43 --CTUSize 64 vvencFFapp: Fraunhofer VVC Encoder ver. 1.9.1 [Linux][GCC 9.3.0][64 bit][SIMD=AVX2] vvencFFapp [info]: started @ Mon Oct 30 00:33:40 2023 vvenc [verbose]: Input File : Flatout3_A_3840x2160_60.yuv vvenc [verbose]: Bitstream File : Flatout3_A_3840x2160_60_at_qp43_T18.266 vvenc [verbose]: Real Format : 3840x2160 yuv420p 30 Hz SDR 319 frames vvenc [verbose]: Frames : encode 60 frames vvenc [verbose]: Internal format : 3840x2160 30 Hz SDR vvenc [verbose]: Threads : 8 (parallel frames: 4) vvenc [verbose]: Rate control : QP 43 vvenc [verbose]: Perceptual optimization : Disabled vvenc [verbose]: Intra period (keyframe) : 180 vvenc [verbose]: Decoding refresh type : CRA vvenc [verbose]: Sequence PSNR output : Linear average only vvenc [verbose]: Hexadecimal PSNR output : Disabled vvenc [verbose]: Sequence MSE output : Disabled vvenc [verbose]: Frame MSE output : Disabled vvenc [verbose]: Cabac-zero-word-padding : Enabled vvenc [verbose]: Frame index : 60 frames vvenc [verbose]: Profile : main_10 vvenc [verbose]: Level : 5 vvenc [verbose]: CU size : 64 vvenc [verbose]: Max TB size : 64 vvenc [verbose]: Min CB size : 4 vvenc [verbose]: Motion search range : 384 vvenc [verbose]: QP : 43 vvenc [verbose]: Max dQP signaling subdiv : 0 vvenc [verbose]: Cb QP Offset (dual tree) : 0 (0) vvenc [verbose]: Cr QP Offset (dual tree) : 0 (0) vvenc [verbose]: GOP size : 32 vvenc [verbose]: PicReordering : 1 vvenc [verbose]: Input bit depth : (Y:8, C:8) vvenc [verbose]: MSB-extended bit depth : (Y:8, C:8) vvenc [verbose]: Internal bit depth : (Y:8, C:8) vvenc [verbose]: cu_chroma_qp_offset_subdiv : -1 vvenc [verbose]: log2_sao_offset_scale_luma : 0 vvenc [verbose]: log2_sao_offset_scale_chroma : 0 vvenc [verbose]: Cost function: : Lossy coding

vvenc [verbose]: CODING TOOL CFG: CTU64 QTMin33BTT32 IBD:0 SAO:1 ALF:1 (NonLinLuma:0 NonLinChr:0) CCALF:1 Tiles:1x1 Slices:1 WPP:0 WPP-Substreams:1 TMVP:1 DQ:1 SDH:0 CST:1 BDOF:1 DMVR:1 MTSImplicit:1 SBT:1 JCbCr:1 CabacInitPresent:0 AMVR:1 SMVD:3 LMCS:2 (Signal:SDR Opt:0) CIIP:1 MIP:1 AFFINE:3 (PROF:1, Type:1) MMVD:3 DisFracMMVD:1 SbTMVP:1 GPM:1 LFNST:1 MTS:0 ISP:3 TS:2 TSLog2MaxSize:5 useChromaTS:0 BDPCM:2 IBC:2 BCW:2 vvenc [verbose]: ENC. ALG. CFG: QPA:0 HAD:1 RDQ:1 RDQTS:1 ASR:1 MinSearchWindow:96 EDO:2 MCTF:2 BIM:1 vvenc [verbose]: PRE-ANALYSIS CFG: STA:1 LeadFrames:0 TrailFrames:0 vvenc [verbose]: FAST TOOL CFG: ECU:0 FEN:3 FDM:1 FastSearch:4 (SCC:2) LCTUFast:1 FastMrg:3 PBIntraFast:1 AMaxBT:0 FastQtBtEnc:1 ContentBasedFastQtbt:1 FastMIP:0 FastIntraTools:0 IntraEstDecBit:1 FastLocalDualTree:1 IntegerET:0 FastSubPel:1 ReduceFilterME:2 QtbttExtraFast:2 FastTTSplit:5 IBCFastMethod:1 FIM:0 ALFSpeed:0 QuantThr:4 SelectiveRDQO:0 vvenc [verbose]: RATE CONTROL CFG: RateControl:0 QP:43 LookAhead:0 FirstPassMode:0 vvenc [verbose]: PARALLEL PROCESSING CFG: NumThreads:8 MaxParallelFrames:4 FppLinesSynchro:0 WppBitEqual:1 WF:0

POC 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 40, TF 2) 399952 bits [Y 32.7392 dB U 41.8701 dB V 43.5985 dB] [ET 19 ] [L0 ] [L1 ] POC 32 TId: 0 ( TRAIL, B-SLICE, QP 42, TF 2) 227024 bits [Y 32.0651 dB U 41.5040 dB V 42.8361 dB] [ET 18 ] [L0 0 ] [L1 0 ] POC 16 TId: 1 ( STSA, B-SLICE, QP 46, TF 1) 86792 bits [Y 30.5915 dB U 40.6953 dB V 42.1162 dB] [ET 8 ] [L0 0 32 ] [L1 32 0 ] ^C

From: Tony Tang @.> Sent: Friday, October 27, 2023 10:32 AM To: fraunhoferhhi/vvenc @.>; fraunhoferhhi/vvenc @.> Cc: Author @.> Subject: RE: [fraunhoferhhi/vvenc] " --Log2MaxTbSize 5" setting result Segment fault (Issue #326)

See below log information for with and w/o --Log2MaxTbSize 5 option .

After I clone 1.9.1 ,the issue has gone

pdx-xterm-04:/home/scratch.totang_gpu/vvenc_10272023/bin/release-static> /home/scratch.gpu_ip/video/reference/vvenc/v1.7.0/vvencFFapp --fps 30 --InternalBitDepth 8 -ip 180 --preset slow -i /home/scratch.gpu_ip/video/sequence/yuv//4K_Raw_Game_Captures/Flatout3_A_3840x2160_60.yuv -b Flatout3_A_3840x2160_60_at_qp47_T17.266 -o test_encdec_recon.yuv -s 3840x2160 -f 60 -q 47 --CTUSize 64 --Log2MaxTbSize 5 vvencFFapp: Fraunhofer VVC Encoder ver. 1.7.0 [Linux][GCC 9.2.0][64 bit][SIMD=AVX2] started @ Thu Oct 26 19:00:27 2023 CODING TOOL CFG: CTU64 QT33BTT32 IBD:0 SAO:1 ALF:1 (NonLinLuma:0 NonLinChr:0) CCALF:1 Tiles:1x1 Slices:1 WPP:0 WPP-Substreams:1 TMVP:1 DQ:1 SDH:0 CST:1 BDOF:1 DMVR:1 MTSImplicit:1 SBT:1 JCbCr:1 CabacInitPresent:1 AMVR:1 SMVD:3 LMCS:2 (Signal:SDR Opt:0) CIIP:1 MIP:1 AFFINE:2 (PROF:1, Type:1) MMVD:3 DisFracMMVD:1 SbTMVP:1 GPM:1 LFNST:1 MTS:0 ISP:1 TS:2 TSLog2MaxSize:5 useChromaTS:0 BDPCM:2 IBC:2 BCW:2 ENC. ALG. CFG: QPA:0 HAD:1 RDQ:1 RDQTS:1 ASR:1 MinSearchWindow:96 EDO:2 MCTF:2 BIM:1 PRE-ANALYSIS CFG: STA:1 LeadFrames:0 TrailFrames:0 FAST TOOL CFG: ECU:0 FEN:3 FDM:1 FastSearch:4 (SCC:2) LCTUFast:1 FastMrg:2 PBIntraFast:1 AMaxBT:1 FastQtBtEnc:1 ContentBasedFastQtbt:0 FastMIP:0 FastIntraTools:0 IntraEstDecBit:1 FastLocalDualTree:1 IntegerET:0 FastSubPel:1 ReduceFilterME:0 QtbttExtraFast:2 FastTTSplit:5 IBCFastMethod:1 FIM:0 ALFSpeed:0 QuantThr: 4 RATE CONTROL CFG: RateControl:0 LookAhead:0 PARALLEL PROCESSING CFG: NumThreads:0 MaxParallelFrames:0 WppBitEqual:0 WF:0

POC 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 44, TF 2) 214728 bits [Y 30.9855 dB U 39.8058 dB V 40.8110 dB] [ET 39 ] [L0 ] [L1 ] Segmentation fault

pdx-xterm-04:/home/scratch.totang_gpu/vvenc_10272023/bin/release-static> /home/scratch.gpu_ip/video/reference/vvenc/v1.7.0/vvencFFapp --fps 30 --InternalBitDepth 8 -ip 180 --preset slow -i /home/scratch.gpu_ip/video/sequence/yuv//4K_Raw_Game_Captures/Flatout3_A_3840x2160_60.yuv -b Flatout3_A_3840x2160_60_at_qp47_T17.266 -o test_encdec_recon.yuv -s 3840x2160 -f 60 -q 47 --CTUSize 64 vvencFFapp: Fraunhofer VVC Encoder ver. 1.7.0 [Linux][GCC 9.2.0][64 bit][SIMD=AVX2] started @ Thu Oct 26 19:01:59 2023 CODING TOOL CFG: CTU64 QT33BTT32 IBD:0 SAO:1 ALF:1 (NonLinLuma:0 NonLinChr:0) CCALF:1 Tiles:1x1 Slices:1 WPP:0 WPP-Substreams:1 TMVP:1 DQ:1 SDH:0 CST:1 BDOF:1 DMVR:1 MTSImplicit:1 SBT:1 JCbCr:1 CabacInitPresent:1 AMVR:1 SMVD:3 LMCS:2 (Signal:SDR Opt:0) CIIP:1 MIP:1 AFFINE:2 (PROF:1, Type:1) MMVD:3 DisFracMMVD:1 SbTMVP:1 GPM:1 LFNST:1 MTS:0 ISP:1 TS:2 TSLog2MaxSize:5 useChromaTS:0 BDPCM:2 IBC:2 BCW:2 ENC. ALG. CFG: QPA:0 HAD:1 RDQ:1 RDQTS:1 ASR:1 MinSearchWindow:96 EDO:2 MCTF:2 BIM:1 PRE-ANALYSIS CFG: STA:1 LeadFrames:0 TrailFrames:0 FAST TOOL CFG: ECU:0 FEN:3 FDM:1 FastSearch:4 (SCC:2) LCTUFast:1 FastMrg:2 PBIntraFast:1 AMaxBT:1 FastQtBtEnc:1 ContentBasedFastQtbt:0 FastMIP:0 FastIntraTools:0 IntraEstDecBit:1 FastLocalDualTree:1 IntegerET:0 FastSubPel:1 ReduceFilterME:0 QtbttExtraFast:2 FastTTSplit:5 IBCFastMethod:1 FIM:0 ALFSpeed:0 QuantThr: 4 RATE CONTROL CFG: RateControl:0 LookAhead:0 PARALLEL PROCESSING CFG: NumThreads:0 MaxParallelFrames:0 WppBitEqual:0 WF:0

POC 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 44, TF 2) 204240 bits [Y 31.0426 dB U 40.7837 dB V 42.4136 dB] [ET 43 ] [L0 ] [L1 ] POC 32 TId: 0 ( TRAIL, B-SLICE, QP 46, TF 2) 96360 bits [Y 30.5084 dB U 39.9921 dB V 41.3317 dB] [ET 60 ] [L0 0 ] [L1 0 ]

From: Adam Wieckowski @.**@.>> Sent: Friday, October 27, 2023 12:18 AM To: fraunhoferhhi/vvenc @.**@.>> Cc: Tony Tang @.**@.>>; Author @.**@.>> Subject: Re: [fraunhoferhhi/vvenc] " --Log2MaxTbSize 5" setting result Segment fault (Issue #326)

I just tested it real quick, and of course "it works for me". Address sanitizer thinks all is fine as well.

Which exact version are you using, what compiler, what system?

One issue in your command line: you call the vvencapp and use vvencFFapp parametrization. but this should not cause segfault, but just a bunch of parameter errors.

— Reply to this email directly, view it on GitHubhttps://github.com/fraunhoferhhi/vvenc/issues/326#issuecomment-1781437996, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJBJVJSEQVNSKSGBI32VFGDYBKEKHAVCNFSM6AAAAAA6PNPG6KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGQZTOOJZGY. You are receiving this because you authored the thread.Message ID: @.**@.>>

totang commented 11 months ago

This 720p sequence reproduces the issue :

vvencFFapp --fps 30 --InternalBitDepth 8 -ip 180 --preset slow -t 8 -i FourPeople_1280x720_60.yuv -b FourPeople_1280x720_60_at_qp2_T415.266 -o test_encdec_recon.yuv -s 1280x720 -f 180 -q 2 --CTUSize 64 --Log2MaxTbSize 5 vvencFFapp: Fraunhofer VVC Encoder ver. 1.9.1 [Linux][GCC 9.3.0][64 bit][SIMD=AVX2] vvencFFapp [info]: started @ Mon Oct 30 02:50:32 2023 vvenc [verbose]: Input File : FourPeople_1280x720_60.yuv vvenc [verbose]: Bitstream File : FourPeople_1280x720_60_at_qp2_T415.266 vvenc [verbose]: Real Format : 1280x720 yuv420p 30 Hz SDR 600 frames vvenc [verbose]: Frames : encode 180 frames vvenc [verbose]: Internal format : 1280x720 30 Hz SDR vvenc [verbose]: Threads : 8 (parallel frames: 4) vvenc [verbose]: Rate control : QP 2 vvenc [verbose]: Perceptual optimization : Disabled vvenc [verbose]: Intra period (keyframe) : 180 vvenc [verbose]: Decoding refresh type : CRA vvenc [verbose]: Sequence PSNR output : Linear average only vvenc [verbose]: Hexadecimal PSNR output : Disabled vvenc [verbose]: Sequence MSE output : Disabled vvenc [verbose]: Frame MSE output : Disabled vvenc [verbose]: Cabac-zero-word-padding : Enabled vvenc [verbose]: Frame index : 180 frames vvenc [verbose]: Profile : main_10 vvenc [verbose]: Level : 3.1 vvenc [verbose]: CU size : 64 vvenc [verbose]: Max TB size : 32 vvenc [verbose]: Min CB size : 4 vvenc [verbose]: Motion search range : 384 vvenc [verbose]: QP : 2 vvenc [verbose]: Max dQP signaling subdiv : 0 vvenc [verbose]: Cb QP Offset (dual tree) : 0 (0) vvenc [verbose]: Cr QP Offset (dual tree) : 0 (0) vvenc [verbose]: GOP size : 32 vvenc [verbose]: PicReordering : 1 vvenc [verbose]: Input bit depth : (Y:8, C:8) vvenc [verbose]: MSB-extended bit depth : (Y:8, C:8) vvenc [verbose]: Internal bit depth : (Y:8, C:8) vvenc [verbose]: cu_chroma_qp_offset_subdiv : -1 vvenc [verbose]: log2_sao_offset_scale_luma : 0 vvenc [verbose]: log2_sao_offset_scale_chroma : 0 vvenc [verbose]: Cost function: : Lossy coding

vvenc [verbose]: CODING TOOL CFG: CTU64 QTMin33BTT32 IBD:0 SAO:1 ALF:1 (NonLinLuma:0 NonLinChr:0) CCALF:1 Tiles:1x1 Slices:1 WPP:0 WPP-Substreams:1 TMVP:1 DQ:1 SDH:0 CST:1 BDOF:1 DMVR:1 MTSImplicit:1 SBT:1 JCbCr:1 CabacInitPresent:0 AMVR:1 SMVD:3 LMCS:2 (Signal:SDR Opt:0) CIIP:1 MIP:1 AFFINE:3 (PROF:1, Type:1) MMVD:3 DisFracMMVD:1 SbTMVP:1 GPM:1 LFNST:1 MTS:0 ISP:3 TS:2 TSLog2MaxSize:5 useChromaTS:0 BDPCM:2 IBC:2 BCW:2 vvenc [verbose]: ENC. ALG. CFG: QPA:0 HAD:1 RDQ:1 RDQTS:1 ASR:1 MinSearchWindow:96 EDO:2 MCTF:2 BIM:1 vvenc [verbose]: PRE-ANALYSIS CFG: STA:1 LeadFrames:0 TrailFrames:0 vvenc [verbose]: FAST TOOL CFG: ECU:0 FEN:3 FDM:1 FastSearch:4 (SCC:2) LCTUFast:1 FastMrg:3 PBIntraFast:1 AMaxBT:0 FastQtBtEnc:1 ContentBasedFastQtbt:1 FastMIP:0 FastIntraTools:0 IntraEstDecBit:1 FastLocalDualTree:1 IntegerET:0 FastSubPel:1 ReduceFilterME:2 QtbttExtraFast:2 FastTTSplit:5 IBCFastMethod:1 FIM:0 ALFSpeed:0 QuantThr:4 SelectiveRDQO:0 vvenc [verbose]: RATE CONTROL CFG: RateControl:0 QP:2 LookAhead:0 FirstPassMode:0 vvenc [verbose]: PARALLEL PROCESSING CFG: NumThreads:8 MaxParallelFrames:4 FppLinesSynchro:0 WppBitEqual:1 WF:0

POC 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 0, TF 4) 4006640 bits [Y 97.3623 dB U 89.9947 dB V 90.9638 dB] [ET 51 ] [L0 ] [L1 ] POC 32 TId: 0 ( TRAIL, B-SLICE, QP 1, TF 4) 3814944 bits [Y 83.0050 dB U 77.4743 dB V 77.1018 dB] [ET 32 ] [L0 0 ] [L1 0 ] Segmentation fault

adamjw24 commented 11 months ago

The problem is with a condition in the EncModeCtrl.cpp:

    if( lumaArea.width > cs.sps->getMaxTbSize() || lumaArea.height > cs.sps->getMaxTbSize() )
    {
      return false;
    }

This condition breaks chroma search in local dual tree before a suitable encoding can be found. Thus, later on in deblocking, the block does not have a suitable neighbor for chroma channel. This has been changed from the following (initially intended to properly handle local dual tree):

    // if this is removed, the IntraSearch::xIntraCodingLumaQT needs to be adapted to support Intra TU split
    // also isXXAvailable in IntraPrediction.cpp need to be fixed to check availability within the same CU without isDecomp
    if( lumaArea.width > cs.sps->getMaxTbSize() || lumaArea.height > cs.sps->getMaxTbSize() )
    {
      return false;
    }

The change has been motivated by allowing MaxTrSize to be variable, but obviously it does not work with local dual tree, which was not caught in the inital testing.

Will further review and fix asap. This might require some work though.