Patent attributes
An electronic apparatus performs a method of encoding and decoding video data. The method comprises: receiving bitstream encoding a transform block, wherein the transform block includes a non-zero region and a zero-out region; checking whether there is any non-zero coefficient within the zero-out region; in accordance with a determination that there is no non-zero coefficient within the zero-out region of the transform block: determining a scan order index of a last non-zero coefficient of the transform block along a scanning direction; in accordance with a determination that the scan order index of the last non-zero coefficient is greater than a predefined threshold: receiving, from the bitstream, a value for multiple transform selection (MTS) index; and applying respective transforms to transform coefficients of the transform block in both horizontal and vertical directions based on the value of the MTS index.