﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1495	decoder bug about HEVC encryption	martin_zx		"when encrypt the video by HM 16.9,An error occurred.
I encrypt the merge index by encoder.the code are as follow
Void TEncSbac::codeMergeIndex( TComDataCU* pcCU, UInt uiAbsPartIdx )
{
  UInt uiUnaryIdx = pcCU->getMergeIndex( uiAbsPartIdx );
  Int Key_Mergeidx=0;
  for(int i = 0;i< 2;i++)
     {   
	if(num4 >7999) num4 = 0;
	if(keyArr[num4++])
	Key_Mergeidx+=1<<(2-i-1);
      }
      uiUnaryIdx=(uiUnaryIdx+Key_Mergeidx)%5;

and then I decrypt it by decoder via the codes below

Int Key_Mergeidx=0;
  for(int i = 0;i< 2;i++)
  {   
	  if(num4 >7999) num4 = 0;
	  if(keyArr[num4++])
		  Key_Mergeidx+=1<<(2-i-1);
  }
  uiUnaryIdx=(uiUnaryIdx+5-Key_Mergeidx)%5;

the yuv sequence I get is a little different from the version which just encode and then decode. Actually I just change the merge index to a number between 0 and 4 at encoder,and it is reversible, but after decode and decrypt, in some frames, a little pixels are not the same as the version which just encode and then decode.can you tell why? thank you very much!,it is definitely important for me to solve this problem.
"	defect	new	critical		HM	HM-16.9			ksuehring davidf karlsharman jct-vc@…
