A method of decoding video data, the method comprising: decoding information indicating a direction in which residual differential pulse code modulation (DPCM) is applied to a first residual block that includes residual data generated from a difference between a predictive block, referred to by a vector of a current block, and the current block, wherein the information indicating the direction comprises information indicating one of a vertical residual DPCM or a horizontal residual DPCM; determining whether a size of the first residual block is less than or equal to a threshold size; determining a scan order for the first residual block based on the information indicating the direction, wherein the determined scan order is required to be the same scan order as would be used on a second residual block if the second residual block was generated from intra-predicting the current block and if the second residual block had residual DPCM applied with the same direction as the direction indicated in the decoded information; entropy decoding the residual data of the first residual block based on the determined scan order; and reconstructing the current block based on the decoded residual data; wherein determining the scan order for the first residual block comprises one of: determining a vertical scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had horizontal residual DPCM applied and would have used the vertical scan, or determining a horizontal scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had vertical residual DPCM applied and would have used the horizontal scan; or wherein determining the scan order for the first residual block comprises one of: determining a horizontal scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had horizontal residual DPCM applied and would have used the horizontal scan, or determining a vertical scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had vertical residual DPCM applied and would have used the vertical scan. decoding information indicating a direction in which residual differential pulse code modulation (DPCM) is applied to a first residual block that includes residual data generated from a difference between a predictive block, referred to by a vector of a current block, and the current block, wherein the information indicating the direction comprises information indicating one of a vertical residual DPCM or a horizontal residual DPCM; determining whether a size of the first residual block is less than or equal to a threshold size; determining a scan order for the first residual block based on the information indicating the direction, wherein the determined scan order is required to be the same scan order as would be used on a second residual block if the second residual block was generated from intra-predicting the current block and if the second residual block had residual DPCM applied with the same direction as the direction indicated in the decoded information; entropy decoding the residual data of the first residual block based on the determined scan order; and reconstructing the current block based on the decoded residual data; wherein determining the scan order for the first residual block comprises one of: determining a vertical scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had horizontal residual DPCM applied and would have used the vertical scan, or determining a horizontal scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had vertical residual DPCM applied and would have used the horizontal scan; determining a vertical scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had horizontal residual DPCM applied and would have used the vertical scan, or determining a horizontal scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had vertical residual DPCM applied and would have used the horizontal scan; or wherein determining the scan order for the first residual block comprises one of: determining a horizontal scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had horizontal residual DPCM applied and would have used the horizontal scan, or determining a vertical scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had vertical residual DPCM applied and would have used the vertical scan. determining a horizontal scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had horizontal residual DPCM applied and would have used the horizontal scan, or determining a vertical scan, if the size of the first residual block is less than or equal to the threshold size, and if the second residual block had vertical residual DPCM applied and would have used the vertical scan.