﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
301	Fix JVET-N0847 scaling matrices cause mismatch	jennylai		"The following two issues are reported when scaling matrices is enabled. 
 – Scaling list in HEVC (#HEVC_USE_SCALING_LISTS) will always be applied in 4x4 blocks even if the CUs are coded with TS mode. 
 – The scan order matrices for 2x2 scaling matrices is wrong with macro #JVET_N0847_SCALING_LISTS. 

To fix the first issue, the code shall be changed from:
{{{
  bool getUseScalingList         ( const uint32_t width, const uint32_t height, const bool isTransformSkip) { return (m_scalingListEnabledFlag && (!isTransformSkip || ((width == 4) && (height == 4)))); };
}}}
to
{{{
  bool getUseScalingList         ( const uint32_t width, const uint32_t height, const bool isTransformSkip) { return (m_scalingListEnabledFlag && !isTransformSkip); };
}}}

To fix the second issue, the code shall be:
{{{
  ScanElement *scan = g_scanOrder[SCAN_UNGROUPED][SCAN_DIAG][gp_sizeIdxInfo->idxFrom(1 << (sizeId == SCALING_LIST_2x2 ? 1 : (sizeId == SCALING_LIST_4x4 ? 2 : 3)))][gp_sizeIdxInfo->idxFrom(1 << (sizeId == SCALING_LIST_2x2 ? 1 : (sizeId == SCALING_LIST_4x4 ? 2 : 3)))];
}}}


"	defect	closed	minor	VTM-5.1	VTM	VTM-5.0	fixed		ksuehring XiangLi fbossen jvet@…
