View Issue Details

IDProjectCategoryView StatusLast Update
0000281JVT JM H.264/AVC reference softwaredecoderpublic2011-10-26 23:49
Reportereldesh Assigned ToKarsten Suehring  
PriorityhighSeveritycrashReproducibilityalways
Status acknowledgedResolutionopen 
Platformx86(CYGWIN)OSWindows7(32bit)OS Version6.1.7600
Product VersionJM 18.0 
Summary0000281: analysing 'buffering period SEI message' fail
Descriptionif the decoder try to decoding particular H.264 stream then it crash :(

The stream have a 'buffering_period' NAL unit and
the NAL unit is stored in prior to nal_unit_type=1(NALU_SLICE) and nalu_unit_type=5(NALU_IDR).

Additionally, when 'profile_idc' of the stream is equals to 118(Multiview High profile) or 128(Stereo High profile),
the condition is met (and the decoding process crash).
Steps To Reproduce- make the stream that is described above
- execute ldecod.exe
- XD

To making the stream with the JM-encoder (lencod.exe),
you need to apply simple patches like below:
>>>
--- a/JM/lencod/src/image.c
+++ b/JM/lencod/src/image.c
@@ -3281,6 +3281,7 @@ void write_non_vcl_nalu_mvc( VideoParameters *p_Vid )
     UpdateToneMapping(p_Vid->p_SEI);
   }
 (!!! this is a hack !!!)
+ init_sei(p_Vid->p_SEI);
   PrepareAggregationSEIMessage(p_Vid);
   
   p_Vid->p_Stats->bit_ctr_parametersets_n += bits = Write_SEI_NALU(p_Vid, 0);
<<<
and
>>>
--- a/JM/lencod/src/sei.c
+++ b/JM/lencod/src/sei.c
@@ -63,7 +63,7 @@ void init_sei(SEIParameters *p_SEI)
   p_SEI->seiHasRecoveryPoint_info=FALSE;
   p_SEI->seiHasRef_pic_buffer_management_repetition=FALSE;
   p_SEI->seiHasSpare_picture=FALSE;
- p_SEI->seiHasBufferingPeriod_info=FALSE;
+ p_SEI->seiHasBufferingPeriod_info=TRUE;
   p_SEI->seiHasPicTiming_info=FALSE;
   p_SEI->seiHasSceneInformation=FALSE;
   p_SEI->seiHasSubseq_information=FALSE;
<<<
Additional InformationI upload files that includes the patched encoder source code(sei.c, image.c), encode.cfg and decode.cfg,
these are used for analysing this issue.


I think that accessing to '(p_Vid->)active_subset_sps' is wrong at blow code:
>>>
src/mbuffer.c:166
  size /= pic_size;
  if(p_Vid->profile_idc == MVC_HIGH || p_Vid->profile_idc == STEREO_HIGH)
  {
    int num_views = p_Vid->active_subset_sps->num_views_minus1+1;
    size = imin(2*size, imax(1, RoundLog2(num_views))*16)/num_views;
  }
  else
    size = imin( size, 16);
<<<
the 'active_subset_sps' member is initialized only when decoding slices NALU_IDR, NALU_SLICE (and NALU_TYPE_DPA).
TagsNo tags attached.

Activities

eldesh

2011-10-25 11:34

reporter  

jm18_bug_env.tar.bz2 (40,868 bytes)

Karsten Suehring

2011-10-26 23:49

administrator   ~0000503

The decoding loop is in general bad shape. A rewrite is planned which should hopefully take care of such issues.

Issue History

Date Modified Username Field Change
2011-10-25 11:34 eldesh New Issue
2011-10-25 11:34 eldesh File Added: jm18_bug_env.tar.bz2
2011-10-26 23:49 Karsten Suehring Note Added: 0000503
2011-10-26 23:49 Karsten Suehring Assigned To => Karsten Suehring
2011-10-26 23:49 Karsten Suehring Status new => acknowledged