A method of decoding video data, the method comprising: generating a block of residual values, wherein the block is a transform skip block coded using transform skip coding in which a transform is not applied prior to quantization, and wherein generating the block comprises, for 0 ≤ i ≤ ( M- 1) and 0 ≤ j ≤ ( N- 1), where M is a height of the block and N is the width of the block, obtaining modified quantized residual values Q ( r̃ i,j) and calculating a reconstructed residual value Q ( r i,j) for a residual value r i,j in the block, wherein: the block is coded using one of a plurality of near-vertical intra prediction modes or one of a plurality of near-horizontal intra prediction modes from a plurality of intra prediction modes, the plurality of near-vertical intra prediction modes includes intra prediction modes between 22 and 30 and the plurality of near-horizontal modes includes intra prediction modes between 6 and 14, as defined in High Efficiency Video Coding (HEVC) text specification draft 10, for each of the near-vertical intra prediction modes between 22 and 30, the reconstructed residual value Q ( r i,j) is defined as: Q r i, j = { Q r ̃ i, j, i = 0, 0 ≤ j ≤ N − 1, Q r ̃ i, j + Q r i − 1, j 1 ≤ i ≤ M − 1, 0 ≤ j ≤ N − 1, where r̃ i,j is a modified residual value defined as: r ̃ i, j = { r i, j, i = 0, 0 ≤ j ≤ N − 1 r i, j − Q r i − 1, j, 1 ≤ i ≤ M − 1, 0 ≤ j ≤ N − 1, Q ( r̃ i,j) denotes a quantized version of the modified residual value r̃ i,j, and Q ( r i -1, j) is a reconstructed residual value for a residual value one row above the residual value r i,j, and for each of the near-horizontal intra prediction modes between 6 and 14, the reconstructed residual value Q ( r i,j) is defined as: Q r i, j = { Q r ̃ i, j, 0 ≤ i ≤ M − 1, j = 0, Q r ̃ i, j + Q r i, j − 1 0 ≤ i ≤ M − 1, 1 ≤ j ≤ N − 1, where the modified residual value r̃ i,j is defined as: r ̃ i, j = { r i, j, 0 ≤ i ≤ M − 1, j = 0 r i, j − Q r i, j − 1 0 ≤ i ≤ M − 1, 1 ≤ j ≤ N − 1, wherein Q ( r i,j -1) is a reconstructed residual value for a residual value one column left of the residual value r i,j; and for 0 ≤ i ≤ (M- 1) and 0 ≤ j ≤ ( N- 1), adding the reconstructed residual value Q ( r i,j) to a prediction value to reconstruct a sample value. the block is coded using one of a plurality of near-vertical intra prediction modes or one of a plurality of near-horizontal intra prediction modes from a plurality of intra prediction modes, the plurality of near-vertical intra prediction modes includes intra prediction modes between 22 and 30 and the plurality of near-horizontal modes includes intra prediction modes between 6 and 14, as defined in High Efficiency Video Coding (HEVC) text specification draft 10, for each of the near-vertical intra prediction modes between 22 and 30, the reconstructed residual value Q ( r i,j) is defined as: Q r i, j = { Q r ̃ i, j, i = 0, 0 ≤ j ≤ N − 1, Q r ̃ i, j + Q r i − 1, j 1 ≤ i ≤ M − 1, 0 ≤ j ≤ N − 1, where r̃ i,j is a modified residual value defined as: r ̃ i, j = { r i, j, i = 0, 0 ≤ j ≤ N − 1 r i, j − Q r i − 1, j, 1 ≤ i ≤ M − 1, 0 ≤ j ≤ N − 1, Q ( r̃ i,j) denotes a quantized version of the modified residual value r̃ i,j, and Q ( r i -1, j) is a reconstructed residual value for a residual value one row above the residual value r i,j, and for each of the near-horizontal intra prediction modes between 6 and 14, the reconstructed residual value Q ( r i,j) is defined as: Q r i, j = { Q r ̃ i, j, 0 ≤ i ≤ M − 1, j = 0, Q r ̃ i, j + Q r i, j − 1 0 ≤ i ≤ M − 1, 1 ≤ j ≤ N − 1, where the modified residual value r̃ i,j is defined as: r ̃ i, j = { r i, j, 0 ≤ i ≤ M − 1, j = 0 r i, j − Q r i, j − 1 0 ≤ i ≤ M − 1, 1 ≤ j ≤ N − 1, wherein Q ( r i,j -1) is a reconstructed residual value for a residual value one column left of the residual value r i,j; and for 0 ≤ i ≤ (M- 1) and 0 ≤ j ≤ ( N- 1), adding the reconstructed residual value Q ( r i,j) to a prediction value to reconstruct a sample value.