A method of coding video data, the method comprising: generating, by a video encoder or video decoder, based at least in part on a predefined function and parameter values for the function, a scan order for transform coefficients associated with a block of residual video data, wherein the block comprises a plurality of rows and columns comprising transform coefficients, and wherein the parameter values include a size of the block of residual video data, an orientation of the scan order, and an orientation strength of the scan order, wherein if the orientation of the scan order indicates that the scan order is horizontally oriented, the scan order starts scanning from the upper-left corner position of the block and continues to the upper right corner along the top rcw and then proceeds to scan from left to right in each succeeding row, and if the orientation of the scan order indicates that the scan order is vertically oriented, the scan order starts from the upper-left corner position of the block and continues to the lower left corner along the left-hand column and then proceeds to scan from top to bottom each succeeding column, wherein the orientation strength indicates a degree to which the scan order is biased toward the orientation of the scan, wherein a threshold is set according to the size of the block and the orientation strength, and the threshold specifies how many transform coefficients should be scanned in a current row or column before starting scanning transform coefficients in the next row or column, wherein after the threshold number of transform coefficients at the current row or column are scanned, the remaining transform coefficients at the current row or column and the coefficients of the next row or column are scanned in an interleaved manner; and scanning, by the video encoder or video decoder, the transform coefficients according to the scan order for use in a video coding process. generating, by a video encoder or video decoder, based at least in part on a predefined function and parameter values for the function, a scan order for transform coefficients associated with a block of residual video data, wherein the block comprises a plurality of rows and columns comprising transform coefficients, and wherein the parameter values include a size of the block of residual video data, an orientation of the scan order, and an orientation strength of the scan order, wherein if the orientation of the scan order indicates that the scan order is horizontally oriented, the scan order starts scanning from the upper-left corner position of the block and continues to the upper right corner along the top rcw and then proceeds to scan from left to right in each succeeding row, and if the orientation of the scan order indicates that the scan order is vertically oriented, the scan order starts from the upper-left corner position of the block and continues to the lower left corner along the left-hand column and then proceeds to scan from top to bottom each succeeding column, wherein the orientation strength indicates a degree to which the scan order is biased toward the orientation of the scan, wherein a threshold is set according to the size of the block and the orientation strength, and the threshold specifies how many transform coefficients should be scanned in a current row or column before starting scanning transform coefficients in the next row or column, wherein after the threshold number of transform coefficients at the current row or column are scanned, the remaining transform coefficients at the current row or column and the coefficients of the next row or column are scanned in an interleaved manner; and scanning, by the video encoder or video decoder, the transform coefficients according to the scan order for use in a video coding process.