Note: Build ETM software: set HDR_ETM_RESHAPER 1  in Defines.H.  set to 0 build original HDRTools.

1. Usage:
	1). current software supports both EXR and Tiff (R2020 and P3D65) to YCbCr conversion (full range and std range both supported). Example commandline are:
		From BT2020 EXR  to YUV420:  > HDRConvert -f HDRConvertEXR2020ToYCbCr420.cfg -p OutputSampleRange=[0/1]
		From BT2020 TIFF to YUV420:  > HDRConvert -f HDRConvertBT2020TiffToYCbCr420.cfg -p OutputSampleRange=[0/1]
		From P3D65 TIFF to YUV420:   > HDRConvert -f HDRConvertP3D65TiffToYCbCr420.cfg -p OutputSampleRange=[0/1]
		
	2). Reshaper related input parameters are added in cfg files:
		Reshaping= 		     # reshaper enable/disable 
		ReshapeSetting=	     # 0: intra-plane , 1: cross-plane with reference (and degerate the reference) , 2: cross-plane no reference
		AtfParamsCbCrFile=   # Reshaper output: Chroma metadata file, to be used in HM encoding
		AtfParamsLumaFile=   # Reshaper output: Luma metadata file, to be used in HM encoding
		
		## for Reshape Mode0 only:
		OriginalSrcPrimary=0     # source content color gamut, 0:709, 1:2020, 3: P3D65
		AtfParamsCbCrFile="ReshapeCbCr.txt"
		AtfParamsLumaFile="ReshapeLuma.txt"  
		ChromaHistScaleCb=1.3991 # P3: 1.2344, 709: 1.3991
		ChromaHistScaleCr=2.1735 # P3: 1.7913, 709: 2.1735
		
		## for Reshape Mode2 only:
		PowerAlphaInput=     # equivalent of the alpha value for a power function estimation of the input TF (e.g. compare to BT.2020 TF)
		BlackLevelLiftInput= # equivalent of the black level lift for an estimated gamma function of the input TF (e.g. compare to BT.2020 TF)
		PowerGammaTarget=    # gamma value of the target display (e.g. compare to BT.1886)
		BlackLevelLiftTarget=# black level lift of the target display (e.g. compare to BT.1886)	

	3). All Scene Info cfg files in previous release are removed. no need to provide scene info file for reshaper. 		

		
	4). The output Luma reshaping metadata file (AtfParamsLumaFile) explanation: single line with various fields describing luma reshaping as listed below
							 POC    POC(aligned with output YUV) where a new metadata is generated
					   bit_depth    bit-depth of luma channel (may take from elsewhere)
					  num_ranges    number of luma ranges signalled
					equal_ranges    flag signals if the pieces to be signalled are having same length
				   global_offset    length of first flat piece not counted in num_ranges
			 range_reshape_val[]    length of i-th piece
		coeff_log2_offset_minus2    defines number of fraction bits for coefficients
				 continuity_flag    signals method used to reconstruct coefficients and presence of first 1st order coefficient
					poly_coef0[]    integer representation of 0th order coefficient on i-th piece
					  poly_coef1    integer representation of 1st order coefficient on first signalled piece
					  
		
2. Main Features:
	 Forward reshaper implemented in 10bit YUV 420 domain;
 	 Three reshaper modes for different purposes;	
	 Conversion from official HDR source to YUV420, both TIFF (P3/R2020) and EXR are supported;
	 Automatic reshaping metadata generation;
	 Metadata is only written a line when it's necessary; 
	 Handling of std-range and full-range reshaper output YUV;
	 Resolve issue of original HDRTools: (1) mismatched fixed to float <-> float to fixed conversion in full range UV conversion;  (2) EXR output clipping to avoid negative values;
	

