Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#166 closed defect (fixed)

Encoder/Decoder Crash

Reported by: minoo Owned by:
Priority: critical Milestone: HM-3.1
Component: HM Version: HM-3.0
Keywords: Cc: fbossen, ksuehring, davidf, jct-vc@…

Description

Setting the "ListCombination" to "0" in "encoder_lowdelay_loco.cfg" (i.e. the LD-LC condition), usually causes the encoder to crash (after a few frames). In case that the encoder finishes without a crash, then decoding of the generated bitstream would result in a Decoder crash.

Note that the exact frame where the crash happens is intermittent and depends on the hw/sw platform as well as the coded sequence.

Comment: As replacing the CAVLC with CABAC would fix the problem, most likely the culprit is in the CAVLC/LCEC module.

Change History (9)

comment:1 Changed 10 years ago by davidf

I can reproduce this issue using the latest HM-3.0-dev.

==8495== Command: /users/davidf/project/build/jctvc-hm-amd64/jctvc-tmuc-enc-v0.3-644-gfb6d45d-dirty-heads-hm-3.0-dev -c /users/davidf/project/jctvc-hm/@//cfg//encoder_lowdelay_loco.cfg -c /users/davidf/project/jctvc-hm/@//cfg//per-sequence/BQSquare.cfg --InputFile=/users/davidf/mpeg96/BQSquare_416x240_60.yuv --FramesToBeEncoded=9 --ListCombination=0 --BitstreamFile=out.bit --ReconFile=out.bit.yuv
==8495== 

HM software: Encoder Version [3.0][Linux][GCC 4.6.1][64 bit] 

Input          File          : /users/davidf/mpeg96/BQSquare_416x240_60.yuv
Bitstream      File          : out.bit
Reconstruction File          : out.bit.yuv
Real     Format              : 416x240 60Hz
Internal Format              : 416x240 60Hz
Frame index                  : 0 - 8 (9 frames)
Number of Ref. frames (P)    : 4
Number of Ref. frames (B_L0) : 2
Number of Ref. frames (B_L1) : 2
Number of Reference frames   : 4
CU size / depth              : 64 / 4
RQT trans. size (min / max)  : 4 / 32
Max RQT depth inter          : 3
Max RQT depth intra          : 3
Min PCM size                 : 128
Motion search range          : 64
Intra period                 : -1
Decoding refresh type        : 0
QP                           : 32.00
GOP size                     : 1
Rate GOP size                : 4
Internal bit depth           : 8
PCM sample bit depth         : 8
Entropy coder                : VLC

TOOL CFG: ALF:0 IBD:0 HAD:1 SRD:0 RDQ:1 SQP:0 ASR:0 PAD:0 LDC:1 NRF:0 BQP:1 GPB:1 LComb:0 LCMod:0 FEN:1 RQT:1 MRG:1 LMC:1 Slice:0 EntropySlice:0 CIP:0 SAO:1 PCM:0 

***    SPS     12 rbspBytes
***    PPS      1 rbspBytes
***    SEI     21 rbspBytes
***    IDR  11916 rbspBytes
POC    0 TId: 0 ( I-SLICE, QP 32 )      95432 bits [Y 33.4948 dB    U 39.4126 dB    V 39.9475 dB] [ET   173 ] [L0 ] [L1 ] [MD5:6d78566d531e6db192bfcc3e6d194393]
==8495== Conditional jump or move depends on uninitialised value(s)
==8495==    at 0x46E382: TEncCavlc::codeInterDir(TComDataCU*, unsigned int) (TEncCavlc.cpp:1363)
==8495==    by 0x47A16D: TEncEntropy::encodeInterDirPU(TComDataCU*, unsigned int) (TEncEntropy.cpp:896)
==8495==    by 0x47A076: TEncEntropy::encodePUWise(TComDataCU*, unsigned int, bool) (TEncEntropy.cpp:873)
==8495==    by 0x479E98: TEncEntropy::encodePredInfo(TComDataCU*, unsigned int, bool) (TEncEntropy.cpp:824)
==8495==    by 0x4993DA: TEncSearch::xAddSymbolBitsInter(TComDataCU*, unsigned int, unsigned int, unsigned int&, TComYuv*&, TComYuv*, TComYuv*&) (TEncSearch.cpp:4909)
==8495==    by 0x4953FF: TEncSearch::encodeResAndCalcRdInterCU(TComDataCU*, TComYuv*, TComYuv*, TComYuv*&, TComYuv*&, TComYuv*&, bool) (TEncSearch.cpp:4168)
==8495==    by 0x476175: TEncCu::xCheckRDCostInter(TComDataCU*&, TComDataCU*&, PartSize) (TEncCu.cpp:1241)
==8495==    by 0x472FD4: TEncCu::xCompressCU(TComDataCU*&, TComDataCU*&, unsigned int) (TEncCu.cpp:448)
==8495==    by 0x473660: TEncCu::xCompressCU(TComDataCU*&, TComDataCU*&, unsigned int) (TEncCu.cpp:555)
==8495==    by 0x473660: TEncCu::xCompressCU(TComDataCU*&, TComDataCU*&, unsigned int) (TEncCu.cpp:555)
==8495==    by 0x473660: TEncCu::xCompressCU(TComDataCU*&, TComDataCU*&, unsigned int) (TEncCu.cpp:555)
==8495==    by 0x472ABB: TEncCu::compressCU(TComDataCU*&) (TEncCu.cpp:226)

The root cause of the problem is:

0x000000000046e382 in TEncCavlc::codeInterDir (this=0x7feffe378, pcCU=0x5bc2050, uiAbsPartIdx=0)
    at /users/davidf/project/jctvc-hm//.git/../@/source/Lib/TLibEncoder/TEncCavlc.cpp:1363
1363            if ( iRefFrame0 >= 4 )
(gdb) print iRefFrame0
$1 = 0
(gdb) print uiNumRefIdxOfLC
$2 = 4294967295

In code like:

      if(uiNumRefIdxOfLC > 0)
      {
        if ( iRefFrame0 >= 4 )
        {
          uiIndex = uiMaxVal;
        }

comment:2 Changed 10 years ago by libin

I think r827 may fix this bug.

comment:3 Changed 10 years ago by ksuehring

If David was testing on the latest HM-3.0-dev (as stated) r827 was already included. So it seems this does not fix the problem.

comment:4 Changed 10 years ago by ksuehring

  • Milestone set to HM-3.1

I just saw that a fix has been committed to HM-3.0-dev-bugfix in r926

comment:5 follow-up: Changed 10 years ago by davidf

  • Resolution set to fixed
  • Status changed from new to closed

I can confirm that r926 resolves this.

comment:6 in reply to: ↑ 5 Changed 10 years ago by minoo

Replying to davidf:

I can confirm that r926 resolves this.

FYI, I verified that r926 on top of HM 3.0 won't fix the problem.
You need to get both r827 and r926 to fix this problem.

-Koohyar.

comment:7 Changed 9 years ago by davidf

  • Component set to HM

Updating component after adding WD (Text) tickets

comment:8 Changed 9 years ago by davidf

  • Cc fbossen ksuehring davidf added

comment:9 Changed 9 years ago by davidf

  • Cc jct-vc@… added
Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber, Participant

  • Bin Li(Participant)
  • David Flynn(Subscriber, Participant)
  • Frank Bossen(Subscriber)
  • jct-vc@…(Subscriber)
  • karl.sharman@…(Always)
  • Karsten Suehring(Subscriber, Participant, Always)
  • Koohyar Minoo(Reporter, Participant)