| CPC H04N 19/159 (2014.11) [H04N 19/103 (2014.11); H04N 19/11 (2014.11); H04N 19/129 (2014.11); H04N 19/13 (2014.11); H04N 19/136 (2014.11); H04N 19/176 (2014.11); H04N 19/18 (2014.11); H04N 19/182 (2014.11); H04N 19/61 (2014.11); H04N 19/91 (2014.11)] | 8 Claims |

|
1. An encoding method, comprising:
performing transformation and quantization for a residual block to obtain transform coefficients; and
performing encoding for the transform coefficients scanned according to a scanning mode,
wherein the residual block is generated based on a prediction block,
wherein the scanning mode is selected based on an intra prediction mode used for intra prediction to generate the prediction block,
wherein the intra prediction uses a reference pixel adjacent to a current block to generate the prediction block,
wherein the reference pixel is determined according to the intra prediction mode of the intra prediction,
wherein a reconstructed block is generated based on the prediction block and a reconstructed residual block,
wherein the reconstructed residual block is generated based on the transform coefficients,
wherein a first scanning mode which is selected as the scanning mode when the intra prediction mode is a horizontal mode is different from a second scanning mode which is selected as the scanning mode when the intra prediction mode is a vertical mode,
wherein the horizontal mode is a first intra prediction mode which uses a first reconstructed pixel horizontally adjacent to a left side of the current block as the reference pixel to generate values of first predicted pixels of the prediction block,
wherein each of vertical coordinates of the first prediction pixels is equal to a vertical coordinate of the first reconstructed pixel,
wherein the vertical mode is a second intra prediction mode which uses a second reconstructed pixel vertically adjacent to an upper side of the current block as the reference pixel to generate values of second predicted pixels of the prediction block,
wherein each of horizontal coordinates of the second prediction pixels is equal to a horizontal coordinate of the second reconstructed pixel,
wherein the scanning mode is a horizontal scanning mode in a case that the intra prediction mode of the current block is the vertical mode,
wherein the scanning mode is a vertical scanning mode in a case that the intra prediction mode of the current block is the horizontal mode,
wherein all coefficients of each row of the transform coefficients are sequentially scanned in a case that the horizontal scanning mode is used as the scanning mode,
wherein all coefficients of each column of the transform coefficients are sequentially scanned in a case that the vertical scanning mode is used as the scanning mode,
wherein no coefficient of another row is scanned during sequential scanning of all coefficients of a row when the horizontal scanning mode is used as the scanning mode, and
wherein no coefficient of another column is scanned during sequential scanning of all coefficients of a column when the vertical scanning mode is used as the scanning mode.
|