Opened 23 months ago

Last modified 23 months ago

#1588 new defect

VTM is also affected. While testing the VVC in lossless mode, encoder seems to generate a invalid bit-stream and the decoder fails with error message

Reported by: Shabhrish Owned by:
Priority: major Milestone:
Component: VTM Version: VTM-17.2
Keywords: Cc: ksuehring, XiangLi, fbossen, jvet@…

Description (last modified by ksuehring)

  • The idea is to run VVC Software in lossless mode.
  • Was able to set up VVC locally and provided appropriate configuration files to run it in lossless mode.
  • However, the encoder seems to generate an invalid bitstream and the decoder

fails with the following error message:

Warning: Level set to none, invalid or unknown value
POC    0 LId:  0 TId: 0 ( IDR_N_LP, I-SLICE, QP  0 ) [DT  0.005] [L0] [L1]
[:,(unk)]
 Total Time:        0.104 sec.
  • See attachments for configuration files, log results, and a sample image to reproduce the issue

Steps to Reproduce:

  • Download the attached configuration files (lossless.cfg, encoder_intra_vtm.cfg), the sample image (cim10_672x768_crop.ppm)
  • Download and run the attached batch file (00_test_VVC.bat)
  • %ENC% -i tmp.raw -c encoder_intra_vtm.cfg -c lossless.cfg --SourceWidth=!width! --SourceHeight=!height! --BitstreamFile=!out! -f 1 -fr 1 -g 1 >> %resE%
  • %DEC% --BitstreamFile=!out! --ReconFile=!recon! -opl logDec.txt >> %resD%
  • The encoder and decoder log files are attached for reference

Attachments (6)

lossless.cfg (979 bytes) - added by Shabhrish 23 months ago.
lossless config file
logDec.txt (125 bytes) - added by Shabhrish 23 months ago.
decoder log
VVC_enc.txt (2.0 KB) - added by Shabhrish 23 months ago.
Log Encoder
VVC_dec.txt (309 bytes) - added by Shabhrish 23 months ago.
Log Decoder
00_test_VVC.bat (1.8 KB) - added by Shabhrish 23 months ago.
Batch file
cim10_672x768_crop.ppm (75.0 KB) - added by Shabhrish 23 months ago.
sample image

Download all attachments as: .zip

Change history (16)

Changed 23 months ago by Shabhrish

lossless config file

Changed 23 months ago by Shabhrish

decoder log

Changed 23 months ago by Shabhrish

Log Encoder

Changed 23 months ago by Shabhrish

Log Decoder

comment:1 Changed 23 months ago by ksuehring

  • Component changed from BMS to VTM

comment:2 Changed 23 months ago by ksuehring

  • Description modified (diff)

comment:3 follow-up: Changed 23 months ago by ksuehring

The log files here look like correct encoding and decoding. There is only a warning about the missing level (probably profile as well), which should be set at the encoder. See the example config files in the cfg/per-sequence folder.

When you sent private email earlier, the decoder log contained an actual error message, which looked like a high-level syntax parsing issue.

Did you check the decoder output after running the test above?

Changed 23 months ago by Shabhrish

Batch file

Changed 23 months ago by Shabhrish

sample image

comment:4 in reply to: ↑ 3 Changed 23 months ago by Shabhrish

Replying to ksuehring:

The log files here look like correct encoding and decoding. There is only a warning about the missing level (probably profile as well), which should be set at the encoder. See the example config files in the cfg/per-sequence folder.

When you sent private email earlier, the decoder log contained an actual error message, which looked like a high-level syntax parsing issue.

  • This is the error message generated on the decoder log (from earlier)

Warning: Level set to none, invalid or unknown value
POC 0 LId: 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 0 ) [DT 0.005] [L0] [L1]
[:,(unk)]

Total Time: 0.104 sec.

Did you check the decoder output after running the test above?

  • Yes, I did but the same error still persists.

comment:5 Changed 23 months ago by ksuehring

I only see a warning (as discussed above) and then a line printing that one picture was decoded. What do you think is the error?

comment:6 Changed 23 months ago by Shabhrish

A couple of points:
-I was able to carefully review the configuration files and adapt the parameters accordingly (transform skip, BDPCM and GOPSize ...). The encoder does produce an error-free bitstream. But when I compare the file sizes to another lossless codec (for example HEVC), the compression values are increased by about 40% more than expected.

  • Yes, on the decoder side the warning still persists and strangely the decoder does not decode the bitstream in order to reconstruct the original image back. Instead It starts and stops with the same minute.

log of encoder and decoder:
Encoder:
VVCSoftware: VTM Encoder Version 17.2 [Windows][VS 1916][64 bit] [SIMD=AVX2]

TOOL CFG: IBD:0 HAD:1 RDQ:1 RDQTS:0 RDpenalty:0 LQP:0 SQP:0 ASR:0 MinSearchWindow:8 RestrictMESampling:0 FEN:1 ECU:0 FDM:1 ESD:0 TransformSkip:1 TransformSkipFast:1 TransformSkipLog2MaxSize:5 ChromaTS:1 BDPCM:0 Tiles: 1x1 Slices: 1 MCTS:0 SAO:0 ALF:0 CCALF:0 MaxNumALFAPSConstantJointCbCrSignFlagWPP:0 WPB:0 PME:2 WaveFrontSynchro:0 WaveFrontSubstreams:1 ScalingList:0 TMVPMode:1 DQ:0 SignBitHidingFlag:0 RecalQP:0
TOOL CFG: LFNST:0 MMVD:1 Affine:1 AffineType:1 AdaptBypassAffineMe:0 PROF:0 SbTMVP:1 DualITree:1 IMV:1 BIO:0 LMChroma:1 HorCollocatedChroma:1 VerCollocatedChroma:0 MTS:0 SBT:0 ISP:0 SMVD:0 CompositeLTReference:0 Bcw:0 BcwFast:0 LADF:0 CIIP:0 Geo:0 AllowDisFracMMVD:1 AffineAmvr:0 AffineAmvrEncOpt:0 AffineAmvp:1 DMVR:0 MmvdDisNum:8 JointCbCr:0 ACT:0 PLT:1 IBC:0 HashME:0 WrapAround:0 VirtualBoundariesEnabledFlag:0 VirtualBoundariesPresentInSPSFlag:1 vertical virtual boundaries:[ ] horizontal virtual boundaries:[ ] Reshape:0 MRL:1 MIP:1 EncDbOpt:0
FAST TOOL CFG: LCTUFast:1 FastMrg:1 PBIntraFast:1 IMV4PelFast:1 AMaxBT:1 E0023FastEnc:1 ContentBasedFastQtbt:0 UseNonLinearAlfLuma:1 UseNonLinearAlfChroma:1 MaxNumAlfAlternativesChroma:8 FastMIP:1 TTFastSkip:31 TTFastSkipThr:1.075 FastLocalDualTree:0 RPR:0 TemporalFilter:4/4 SEI CTI:0 BIM:0 SEI FGC:0 SEI processing Order:0

started @ Wed Jan 18 15:40:55 2023

POC 0 LId: 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 0 ) 1159968 bits [Y 999.9900 dB U 999.9900 dB V 999.9900 dB] [Y MSE 0.0000 U MSE 0.0000 V MSE 0.0000] [ET 72 ] [L0] [L1]

LayerId 0

Total Frames | Bitrate Y-PSNR U-PSNR V-PSNR YUV-PSNR Y-MSE U-MSE V-MSE YUV-MSE MSE-Y-PSNR MSE-U-PSNR MSE-V-PSNR MSE-YUV-PSNR
1 a 144.9960 999.9900 999.9900 999.9900 999.9900 0.0000 0.0000 0.0000 0.0000 999.9900 999.9900 999.9900 999.9900

finished @ Wed Jan 18 15:42:08 2023
Total Time: 72.986 sec. [user] 72.987 sec. [elapsed]

#Results
Start Encoder: 15:47:52

1159968 bits/144996 bytes (VVC), however, the expected file size should be less than 96000 bytes.

Decoder:
VVCSoftware: VTM Decoder Version 17.2 [Windows][VS 1916][64 bit] [SIMD=AVX2]
Warning: Level set to none, invalid or unknown value
POC 0 LId: 0 TId: 0 ( IDR_N_LP, I-SLICE, QP 0 ) [DT 0.005] [L0] [L1] [:,(unk)]

Total Time: 0.107 sec.

Finished Decoder 15:47:56

comment:7 follow-up: Changed 23 months ago by ksuehring

The decoder is much faster than the encoder. Did you specify an output file? Did anything get written to that file?

I have not worked on lossless coding. So I can't really comment on the expected performance. It may be dependent on the content and if the source file is properly formatted (e.g. YUV planar format, proper sizing of components) and selection of according input parameters.

comment:8 follow-up: Changed 23 months ago by dmytro.rusanovskyy

To improve lossless coding performance of VTM, you may consider enabling coding tools for High Bit Depth coding:

ExtendedPrecision: 1
ExtendedRiceRRC : 1
GolombRiceParameterAdaptation : 1
ReverseLastSigCoeff : 1

comment:9 in reply to: ↑ 8 Changed 23 months ago by Shabhrish

Replying to dmytro.rusanovskyy:

To improve lossless coding performance of VTM, you may consider enabling coding tools for High Bit Depth coding:

ExtendedPrecision: 1
ExtendedRiceRRC : 1
GolombRiceParameterAdaptation : 1
ReverseLastSigCoeff : 1

The bit depth of most (if not all) images is less than 10 in the test set that I have. This error message confirms this:
Error: RExt tools (Extended Precision Processing, RRC Rice Extension, Persistent Rice Adaptation and TSRC Rice Extension) must be disabled for BitDepth is less than or equal to 10 (the value of sps_range_extension_flag shall be 0 when BitDepth is less than or equal to 10.)

comment:10 in reply to: ↑ 7 Changed 23 months ago by Shabhrish

Replying to ksuehring:

The decoder is much faster than the encoder. Did you specify an output file? Did anything get written to that file?

  • Yes, I specify the out file and also provide a parameter to reconstruct the image from the bit stream. But I think the bitstream file that I provide as an input to the decoder is probably empty for some reason.

%DEC% --BitstreamFile=!out! --ReconFile=!recon! -opl logDec.txt >> %resD%

I have not worked on lossless coding. So I can't really comment on the expected performance. It may be dependent on the content and if the source file is properly formatted (e.g. YUV planar format, proper sizing of components) and the selection according to input parameters.

  • This is definitely a good idea to print out intermediate results to verify what exactly the encoder is doing. I will look into the documentation for help regarding the logging of intermediate results.
Note: See TracTickets for help on using tickets.