WO2013077713A1 - Method for realigning transform coefficient and device using same - Google Patents

Method for realigning transform coefficient and device using same Download PDF

Info

Publication number
WO2013077713A1
WO2013077713A1 PCT/KR2012/010119 KR2012010119W WO2013077713A1 WO 2013077713 A1 WO2013077713 A1 WO 2013077713A1 KR 2012010119 W KR2012010119 W KR 2012010119W WO 2013077713 A1 WO2013077713 A1 WO 2013077713A1
Authority
WO
WIPO (PCT)
Prior art keywords
transform coefficients
block
quantized transform
order
diagonal
Prior art date
Application number
PCT/KR2012/010119
Other languages
French (fr)
Korean (ko)
Inventor
김정선
박승욱
임재현
전용준
김철근
헨드리헨드리
전병문
박준영
박내리
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Publication of WO2013077713A1 publication Critical patent/WO2013077713A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/88Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving rearrangement of data among different coding units, e.g. shuffling, interleaving, scrambling or permutation of pixel data or permutation of transform coefficient data among different blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding

Definitions

  • the present invention relates to image information compression technology, and more particularly, to a method and apparatus for scanning and rearranging transform coefficients.
  • High-efficiency image compression technology can be used to effectively transmit, store, and reproduce high-resolution, high-quality video information.
  • inter prediction and intra prediction may be used.
  • the pixel value of the current picture is predicted by referring to information of another picture
  • the intra prediction method the pixel value is predicted by using the correlation between pixels in the same picture. do.
  • Various methods for making an image identical to an original may be applied to a processing unit, eg, a block, of a predicted image. This allows the decoding apparatus to decode the image more accurately (more consistent with the original), and the encoding apparatus can encode the image so that it can be more accurately reconstructed.
  • An object of the present invention is to provide a method and apparatus for effectively scanning and rearranging quantized transform coefficients.
  • An object of the present invention is to provide a method and apparatus for scanning and rearranging quantized transform coefficients when the transform block is a non-square block.
  • An object of the present invention is to provide a method and apparatus for scanning and rearranging quantized transform coefficients in sub-block units when the changed block is a non-square block.
  • An embodiment of the present invention provides a method of reordering transform coefficients, the method comprising: quantizing a transform block composed of transform coefficients, scanning the quantized transform coefficients in units of subblocks of the transform block, and rearranging the transform coefficients into a one-dimensional array; Entropy encoding and transmitting the quantized transform coefficients of the reordered one-dimensional array, wherein the transform block may be a non-square block.
  • the scan order for subblocks and the scan order for quantized transform coefficients in the subblocks may be the same or different in the reordering step.
  • the scan order for sub-blocks in the transform block is a right-up diagonal scan order
  • the scan order for quantized transform coefficients in the sub-blocks is one of a right-up diagonal scan order, a horizontal scan order, and a vertical scan order. It can be either.
  • the transform block can be a 32x8 or 8x32 non-square block, and the subblock can be a 4x4 block.
  • Another embodiment of the present invention also provides a transform coefficient reordering method, comprising: an entropy decoding step of obtaining a one-dimensional array of quantized transform coefficients and a reordering of the quantized transform coefficients into a transform block by scanning the one-dimensional array of quantized transform coefficients In the reordering step, the quantized transform coefficients may be rearranged in units of subblocks of the transform block, and the transform block may be a non-square block.
  • the reordering order of subblocks and the reordering order of quantized transform coefficients in the subblocks may be the same or different.
  • the scan order for the quantized transform coefficients in the sub-blocks is one of a right-up diagonal scan order, a horizontal scan order, and a vertical scan order. It can be either.
  • the reordering of the sub-block units may be performed in the order of right-up diagonal scanning from the last sub-block to the first sub-block direction.
  • the reordering order of the quantized transform coefficients in the subblocks is performed according to a right-up diagonal scan order from the last quantized transform coefficient in the subblock to the first quantized transform coefficient direction.
  • the non-square block may be an 8x32 size block or a 32x8 sized block, and the sub block may be a 4x4 sized block.
  • the efficiency of transform and / or entropy coding can be increased by effectively scanning and rearranging quantized transform coefficients.
  • a non-square block can be used as a transform block according to the characteristics of an image, thereby increasing the compression efficiency.
  • the compression efficiency can be improved by scanning and rearranging the transform coefficients quantized in units of subblocks in the transform block.
  • FIG. 1 is a block diagram schematically illustrating an encoding apparatus (video encoding apparatus) according to an embodiment of the present invention.
  • FIG. 2 is a block diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention.
  • 3 is a diagram illustrating an intra prediction mode.
  • FIG. 4 is a diagram schematically illustrating a scanning method according to a scanning order.
  • 5 to 10 are diagrams schematically illustrating examples of a method of diagonally upward-scanning quantized transform coefficients in a transform using non-square transform blocks of various sizes.
  • FIG. 11 is a diagram schematically illustrating an example of a case in which a transform block is scanned in sub-block units.
  • 12 to 17 are schematic diagrams illustrating examples of a scan order of aligning transform coefficients in sub-block units for a non-square transform block.
  • FIG. 18 is a flowchart schematically illustrating a method for scanning a quantized transform coefficient by an encoding apparatus according to the present invention.
  • FIG. 19 is a flowchart schematically illustrating a method for scanning a quantized transform coefficient by a decoding apparatus according to the present invention.
  • each of the components in the drawings described in the present invention are shown independently for the convenience of description of different characteristic functions in the image encoding apparatus / decoding apparatus, each component is a separate hardware or separate software It does not mean that it is implemented.
  • two or more of each configuration may be combined to form one configuration, or one configuration may be divided into a plurality of configurations.
  • Embodiments in which each configuration is integrated and / or separated are also included in the scope of the present invention without departing from the spirit of the present invention.
  • the encoding apparatus 100 may include a picture divider 105, a predictor 110, a transformer 115, a quantizer 120, a reordering unit 125, an entropy encoding unit 130, An inverse quantization unit 135, an inverse transform unit 140, a filter unit 145, and a memory 150 are provided.
  • the picture dividing unit 105 may divide the input picture into at least one processing unit block.
  • the block as the processing unit may be a prediction unit (hereinafter referred to as a PU), a transform unit (hereinafter referred to as a TU), or a coding unit (hereinafter referred to as "CU"). It may be called.
  • the processing unit blocks divided by the picture divider 105 may have a quad-tree structure.
  • the predictor 110 includes an inter predictor for performing inter prediction and an intra predictor for performing intra prediction, as described below.
  • the prediction unit 110 generates a prediction block by performing prediction on the processing unit of the picture in the picture division unit 105.
  • the processing unit of the picture in the prediction unit 110 may be a CU, a TU, or a PU.
  • the prediction unit 110 may determine whether the prediction performed on the processing unit is inter prediction or intra prediction, and determine specific contents (eg, prediction mode, etc.) of each prediction method.
  • the processing unit in which the prediction is performed and the processing unit in which the details of the prediction method and the prediction method are determined may be different.
  • the prediction method and the prediction mode may be determined in units of PUs, and the prediction may be performed in units of TUs.
  • a prediction block may be generated by performing prediction based on information of at least one picture of a previous picture and / or a subsequent picture of the current picture.
  • a prediction block may be generated by performing prediction based on pixel information in a current picture.
  • a skip mode, a merge mode, a motion vector prediction (MVP), and the like can be used.
  • a reference picture may be selected for a PU and a reference block having the same size as the PU may be selected.
  • the reference block may be selected in integer pixel units.
  • a prediction block is generated in which a residual signal with the current PU is minimized and the size of the motion vector is also minimized.
  • the prediction block may be generated in integer sample units, or may be generated in sub-pixel units such as 1/2 pixel unit or 1/4 pixel unit.
  • the motion vector may also be expressed in units of integer pixels or less. For example, it may be expressed in units of 1/4 pixels for luminance samples and in units of 1/8 pixels for chrominance samples.
  • the residual may be used as the reconstructed block, and thus the residual may not be generated, transformed, quantized, or transmitted.
  • a prediction mode When performing intra prediction, a prediction mode may be determined in units of PUs, and prediction may be performed in units of PUs. In addition, a prediction mode may be determined in units of PUs, and intra prediction may be performed in units of TUs.
  • the prediction mode may have 33 directional prediction modes and at least two non-directional modes.
  • the non-directional mode may include a DC prediction mode and a planner mode (Planar mode).
  • a prediction block may be generated after applying a filter to a reference sample.
  • whether to apply the filter to the reference sample may be determined according to the intra prediction mode and / or the size of the current block.
  • the PU may be a block of various sizes / types, for example, in the case of inter prediction, the PU may be a 2N ⁇ 2N block, a 2N ⁇ N block, an N ⁇ 2N block, an N ⁇ N block (N is an integer), or the like.
  • the PU In the case of intra prediction, the PU may be a 2N ⁇ 2N block or an N ⁇ N block (where N is an integer).
  • the PU of the N ⁇ N block size may be set to apply only in a specific case.
  • the NxN block size PU may be used only for the minimum size CU or only for intra prediction.
  • PUs such as N ⁇ mN blocks, mN ⁇ N blocks, 2N ⁇ mN blocks, or mN ⁇ 2N blocks (m ⁇ 1) may be further defined and used.
  • the residual value (the residual block or the residual signal) between the generated prediction block and the original block is input to the converter 115.
  • the prediction mode information, the motion vector information, etc. used for the prediction are encoded by the entropy encoding unit 130 together with the residual value and transmitted to the decoding apparatus.
  • the transform unit 115 performs transform on the residual block in units of transform blocks and generates transform coefficients.
  • the transform block is a rectangular block of samples to which the same transform is applied.
  • the transform block can be a transform unit (TU) and can have a quad tree structure.
  • the transformer 115 may perform the transformation according to the prediction mode applied to the residual block and the size of the block.
  • the residual block is transformed using a discrete sine transform (DST), otherwise the residual block is transformed into a discrete cosine transform (DCT). Can be converted using.
  • DST discrete sine transform
  • DCT discrete cosine transform
  • the transform unit 115 may generate a transform block of transform coefficients by the transform.
  • the quantization unit 120 may generate quantized transform coefficients by quantizing the residual values transformed by the transform unit 115, that is, the transform coefficients.
  • the value calculated by the quantization unit 120 is provided to the inverse quantization unit 135 and the reordering unit 125.
  • the reordering unit 125 rearranges the quantized transform coefficients provided from the quantization unit 120. By rearranging the quantized transform coefficients, the encoding efficiency of the entropy encoding unit 130 may be increased.
  • the reordering unit 125 may rearrange the quantized transform coefficients in the form of a 2D block into a 1D vector form through a coefficient scanning method.
  • the reordering unit 125 may increase the entropy encoding efficiency of the entropy encoding unit 130 by changing the order of coefficient scanning based on probabilistic statistics of coefficients transmitted from the quantization unit.
  • the entropy encoding unit 130 may perform entropy encoding on the quantized transform coefficients rearranged by the reordering unit 125.
  • Entropy encoding may include, for example, encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
  • the entropy encoding unit 130 may include quantized transform coefficient information, block type information, prediction mode information, partition unit information, PU information, transmission unit information, and motion vector of the CUs received from the reordering unit 125 and the prediction unit 110.
  • Various information such as information, reference picture information, interpolation information of a block, and filtering information may be encoded.
  • the entropy encoding unit 130 may apply a constant change to a parameter set or syntax to be transmitted.
  • the inverse quantizer 135 inversely quantizes the quantized values (quantized transform coefficients) in the quantizer 120, and the inverse transformer 140 inversely transforms the inverse quantized values in the inverse quantizer 135.
  • the reconstructed block may be generated by combining the residual values generated by the inverse quantizer 135 and the inverse transform unit 140 and the prediction blocks predicted by the prediction unit 110.
  • a reconstructed block is generated by adding a residual block and a prediction block through an adder.
  • the adder may be viewed as a separate unit (restore block generation unit) for generating a reconstruction block.
  • the filter unit 145 may apply a deblocking filter, an adaptive loop filter (ALF), and a sample adaptive offset (SAO) to the reconstructed picture.
  • ALF adaptive loop filter
  • SAO sample adaptive offset
  • the deblocking filter may remove distortion generated at the boundary between blocks in the reconstructed picture.
  • the adaptive loop filter may perform filtering based on a value obtained by comparing the reconstructed image with the original image after the block is filtered through the deblocking filter. ALF may be performed only when high efficiency is applied.
  • the SAO restores the offset difference from the original image on a pixel-by-pixel basis to the residual block to which the deblocking filter is applied, and is applied in the form of a band offset and an edge offset.
  • the filter unit 145 may not apply filtering to the reconstructed block used for inter prediction.
  • the memory 150 may store the reconstructed block or the picture calculated by the filter unit 145.
  • the reconstructed block or picture stored in the memory 150 may be provided to the predictor 110 that performs inter prediction.
  • the image decoding apparatus 200 may include an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, and a filter unit 235.
  • Memory 240 may be included.
  • the input bitstream may be decoded according to a procedure in which image information is processed in the image encoding apparatus.
  • variable length coding such as CAVLC (VLC)
  • VLC variable length coding
  • the entropy decoding unit 210 also uses the VLC used in the encoding apparatus. Entropy decoding may be performed by implementing the same VLC table as the table.
  • CABAC CABAC is used to perform entropy encoding in the image encoding apparatus
  • the entropy decoding unit 210 may perform entropy decoding using CABAC correspondingly.
  • Information for generating the prediction block among the information decoded by the entropy decoding unit 210 is provided to the predictor 230, and a residual value where entropy decoding is performed by the entropy decoding unit 210, that is, a quantized transform coefficient It may be input to the reordering unit 215.
  • the reordering unit 215 may reorder the information of the bitstream entropy decoded by the entropy decoding unit 210, that is, the quantized transform coefficients, based on the reordering method in the encoding apparatus.
  • the reordering unit 215 may reorder the coefficients expressed in the form of a one-dimensional vector by restoring the coefficients in the form of a two-dimensional block.
  • the reordering unit 215 may generate an array of coefficients (quantized transform coefficients) in the form of a 2D block by scanning coefficients based on the prediction mode applied to the current block (transform block) and the size of the transform block.
  • the inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoding apparatus and the coefficient values of the rearranged block.
  • the inverse transform unit 225 may perform inverse DCT and / or inverse DST on the DCT and the DST performed by the transform unit of the encoding apparatus with respect to the quantization result performed by the image encoding apparatus.
  • the inverse transformation may be performed based on a transmission unit determined by the encoding apparatus or a division unit of an image.
  • the DCT and / or DST in the encoding unit of the encoding apparatus may be selectively performed according to a plurality of pieces of information, such as a prediction method, a size and a prediction direction of the current block, and the inverse transform unit 225 of the decoding apparatus is configured in the transformation unit of the encoding apparatus.
  • Inverse transformation may be performed based on the performed transformation information.
  • the prediction unit 230 may generate the prediction block based on the prediction block generation related information provided by the entropy decoding unit 210 and the previously decoded block and / or picture information provided by the memory 240.
  • intra prediction for generating a prediction block based on pixel information in the current picture may be performed.
  • inter prediction on the current PU may be performed based on information included in at least one of a previous picture or a subsequent picture of the current picture.
  • motion information required for inter prediction of the current PU provided by the image encoding apparatus for example, a motion vector, a reference picture index, and the like, may be derived by checking a skip flag, a merge flag, and the like received from the encoding apparatus.
  • the reconstruction block may be generated using the prediction block generated by the predictor 230 and the residual block provided by the inverse transform unit 225.
  • FIG. 2 it is described that the reconstructed block is generated by combining the prediction block and the residual block in the adder.
  • the adder may be viewed as a separate unit (restore block generation unit) for generating a reconstruction block.
  • the residual is not transmitted and the prediction block may be a reconstruction block.
  • the reconstructed block and / or picture may be provided to the filter unit 235.
  • the filter unit 235 may apply deblocking filtering, sample adaptive offset (SAO), and / or ALF to the reconstructed block and / or picture.
  • SAO sample adaptive offset
  • the memory 240 may store the reconstructed picture or block to use as a reference picture or reference block and provide the reconstructed picture to the output unit.
  • the encoding apparatus performs transformation in units of transform blocks having a quad tree structure. Which transform is to be applied based on the prediction mode applied to the transform target block and the size of the transform block. For example, a transformation scheme applied to the current block (transform block) may be different depending on whether the prediction mode applied to the current block (transform block) is an intra prediction mode or an inter prediction mode, and the size of the current block (transform block).
  • the encoding apparatus may scan two-dimensional quantized information (eg, two-dimensional quantized transform coefficient array) and rearrange the two-dimensional quantized transform coefficient array.
  • the encoding device may entropy encode the one-dimensional quantized transform coefficient array and transmit the entropy encoding to the decoding device.
  • the decoding apparatus may entropy decode the information received from the encoding apparatus to generate a one-dimensional quantized transform coefficient array.
  • the decoding apparatus may scan the one-dimensional quantized transform coefficient array and rearrange the two-dimensional quantized transform coefficient array.
  • the decoding apparatus may inversely quantize the two-dimensional quantized transform coefficient array to generate a transform coefficient block.
  • the quantized coefficients arranged in correspondence with the sample (pixel) position of the block to be processed for example, the transform block
  • Two-dimensional arrays can be rearranged into one-dimensional arrays.
  • one-dimensional quantized transform coefficients may be rearranged into a two-dimensional array corresponding to a sample (pixel) position of a block to be processed (for example, a transform block).
  • a sample (pixel) position of a block to be processed for example, a transform block.
  • the scanning may be determined by the size of the transform block, the scan order, and the scan start position.
  • the prediction mode applied to the transform block is an intra prediction mode and the size of the transform block is 4x4, or (2) the prediction mode applied to the transform block is If the intra prediction mode is 8x8 and the transform block is a transform block for luma samples, if the intra prediction mode is 6 or more and 14 or less, the scan order is a vertical scan order and the intra prediction mode is 22 If 30 or more, the scan order may be a horizontal scan order. In this case, the scan order may be an up-right diagonal scan order.
  • FIG. 3 is a diagram illustrating an intra prediction mode. As shown, the intra prediction mode of 6 to 14 is a prediction mode in the horizontal direction, and the intra prediction mode of 22 to 30 is a prediction mode in the vertical direction.
  • the transform block is square and the prediction mode applied to the transform block is the intra prediction mode
  • the transform block is 4x4 or
  • the transform block is 8x8 and the transform block is
  • the vertical scan order is applied when the intra prediction mode is the horizontal prediction mode
  • the horizontal scan order is applied when the intra prediction mode is the vertical prediction mode.
  • the encoding apparatus scans the quantized transform coefficients in the transform block in the vertical direction.
  • the encoding apparatus may scan the quantized transform coefficients along the same column from the quantized transform coefficients located in the top row of the scan target block (eg, the transform block). In this case, the scan may be performed on the right columns in order starting from the leftmost column of the scan target block. Also, the scan may be performed on the left columns in order starting from the rightmost column of the scan target block.
  • the quantized transform coefficients scanned in the two-dimensional array scan target block may be rearranged into one-dimensional quantized transform coefficient arrays according to the scanned order.
  • the decoding apparatus may scan the quantized transform coefficients and rearrange them in the vertical direction in the transform block.
  • the decoding apparatus scans one-dimensional transform coefficients in order and rearranges them in a two-dimensional array in a vertical scan order. Through this, a transform block composed of quantized transform coefficients may be generated.
  • quantized transform coefficients may be placed down along the same column from the top row of the two-dimensional array (transform block).
  • the relocation may proceed for the right columns in order starting from the leftmost column of the two-dimensional array according to the order performed in the encoding apparatus, or may proceed for the left columns in order starting from the rightmost column.
  • the encoding apparatus scans the quantized transform coefficients in the transform block in the horizontal direction.
  • the encoding apparatus may scan the quantized transform coefficients from the quantized transform coefficients located in the leftmost column of the scan target block (eg, the transform block) to the right along the same row.
  • the scan may be performed on the lower rows in order starting from the uppermost row of the scan target block.
  • the scan may also be performed on the upper rows in order starting from the lowest row of the scan target block.
  • the quantized transform coefficients scanned in the two-dimensional array scan target block may be rearranged into one-dimensional quantized transform coefficient arrays according to the scanned order.
  • the decoding apparatus may scan the quantized transform coefficients and rearrange them in the horizontal direction in the transform block.
  • the decoding apparatus scans one-dimensional transform coefficients in order and rearranges them in a two-dimensional array in a horizontal scan order. Through this, a transform block composed of quantized transform coefficients may be generated.
  • transform coefficients quantized from the leftmost column of the two-dimensional array (transform block) to the right along the same row may be arranged.
  • the relocation may proceed for the lower rows in order starting from the uppermost row of the two-dimensional array according to the order performed in the encoding apparatus, or may proceed for the upper rows in order starting from the lowest row.
  • the encoding apparatus may scan the quantized transform coefficients in the transform block in the right-up diagonal direction.
  • the encoding apparatus starts with the leftmost quantized transform coefficient with respect to the diagonal arrangement of the quantized transform coefficients in the block to be scanned (for example, the transform block) and the right-most quantized transform coefficient.
  • the scanning of the diagonal array may start in the upper left diagonal array in the scan target block and proceed to the lower right side in order, or may start in the right lower diagonal array in the scan target block and proceed to the upper left side in order.
  • the quantized transform coefficients scanned in the two-dimensional array scan target block may be rearranged into one-dimensional quantized transform coefficient arrays according to the scanned order.
  • the decoding apparatus may scan the quantized transform coefficients and rearrange them in the right upward diagonal direction in the transform block.
  • the decoding apparatus scans one-dimensional transform coefficients in order and rearranges them in a two-dimensional array in a right-up diagonal scan order. Through this, a transform block composed of quantized transform coefficients may be generated.
  • the quantized transform coefficients may be rearranged from the lower left side to the upper right side in the diagonal array of the two-dimensional array (transform block). Relocation may proceed in order for the lower right diagonal arrays starting with the upper left diagonal array of the two-dimensional array in the order performed in the encoding apparatus, or for the upper left diagonal arrays in order starting with the lower right diagonal array. It may proceed.
  • FIG. 4 is a diagram schematically illustrating a scanning method according to each scanning order.
  • quantized transform coefficients C are arranged corresponding to the pixel sample positions.
  • the transform coefficients C a, b are arranged at positions of the a-th row and the b-th column in the transform block.
  • FIG. 4 (b) shows an example of a one-dimensional array corresponding to the two-dimensional quantized transform coefficient array illustrated in FIG. 4 (a) when the horizontal scan order is applied.
  • the encoding apparatus determines that C 0,0 ⁇ C 0,1 ⁇ ... In the first row in the nxm-sized transform block. ⁇ scan the quantized transform coefficients in the order of C 0, n ⁇ 1 , and in the next line, C 1,0 ⁇ C 1,1 ⁇ . ⁇ The quantized transform coefficients can be scanned in the order of C1 , n-1 . Scanning is performed in parallel in each row, and when the horizontal scan is completed in one row, the horizontal scan can be performed in the next row.
  • the decoding apparatus may arrange the quantized transform coefficients read in order from the n ⁇ m length quantized transform coefficient array in a two-dimensional array in the transform block of size n ⁇ m according to the horizontal scan order.
  • Figure 4 (b) towards the front of the end of the column in the transform coefficients quantized in (that is, a C m-1, n-1 ⁇ C 0,0 -direction) when scanning in the decoding apparatus 4 depending on the horizontal scan order C m-1, n-1 ? C m-1, n-2 ? ⁇ C m-1,1 ⁇ C m-1,0 arranged in order, and the n quantized transform coefficients scanned after C m-1,0 are row-turned (upper row) from the right You can arrange them in order.
  • Subsequent scan and reordering of the quantized transform coefficients results in C 0, n ⁇ 1 ... ⁇ C 0,2 ⁇ C 0,1 ⁇ C 0,0 may be scanned and rearranged to produce a two-dimensional array (eg, a transform block) of nxm-sized quantized transform coefficients.
  • C m-1,0- > C m-1,1- > C m-1,2- > ⁇ can be scanned and rearranged up to C m-1, n-1 to produce a two-dimensional array (eg, transform block) of nxm quantized transform coefficients.
  • a two-dimensional array eg, transform block
  • FIG. 4 (c) shows an example of a one-dimensional array corresponding to the two-dimensional quantized transform coefficient array illustrated in FIG. 4 (a) when the vertical scan order is applied.
  • the encoding apparatus determines that C 0,0 ⁇ C 1,0 ⁇ ... In the first column in the nxm-sized transform block. ⁇ scan the quantized transform coefficients in the order C m-1,0 , and in the next column C 0,1 ⁇ C 1,1 ⁇ . ⁇ the quantized transform coefficients can be scanned in the order of C m-1,1 You can scan vertically from column to column, and after vertical scanning in one column, you can scan vertically in the next column.
  • the decoding apparatus arranges the quantized transform coefficients read in order from the n x m length quantized transform coefficient array in a two-dimensional array in the n x m transform block according to the vertical scan order.
  • FIG. 4 when scanning from the end of the quantized transform coefficient column in FIG. 4 (c) to the front (i.e., in the direction of C m-1, n-1 ⁇ C 0,0 ), the decoding apparatus according to the vertical scan order is shown in FIG. 4.
  • C m-1, n-1 ? C m-2, n-1 ? ⁇ C 1, n-1 ⁇ C 0, n-1 arranged in order, and m quantized transform coefficients scanned after C 0, n-1 are ordered from bottom to bottom by swapping columns (left column) You can arrange as you like.
  • C m-1,0 ⁇ ... ⁇ C 2,0 ⁇ C 1,0 ⁇ C 0,0 can be scanned and rearranged to generate a two-dimensional array (eg, a transform block) of nxm quantized transform coefficients.
  • FIG. 4 (a) In the case of scanning toward the front end (ie, in the direction of C 0,0 ⁇ C m-1, n-1 ) of the quantized transform coefficient column in FIG. 4 (c), the decoding apparatus according to the vertical scan order is shown in FIG. 4 (a).
  • C 0,0 ⁇ C 1,0 ⁇ C 2,0 ⁇ . ⁇ the m quantized transform coefficients scanned after C m ⁇ 1,0 are arranged in order from the top by swapping columns (to the right column). Subsequent scan and reordering of the quantized transform coefficients causes C 0, n-1 ⁇ C 1, n-1 ⁇ C 2, n-1 ⁇ . ⁇ can be scanned and rearranged to C m-1, n-1 to produce a two-dimensional array (eg, transform block) of nxn-sized quantized transform coefficients.
  • a two-dimensional array eg, transform block
  • FIG. 4 (d) shows an example of a one-dimensional array corresponding to the two-dimensional quantized transform coefficient array illustrated in FIG. 4 (a) when a right-up diagonal scan order is applied.
  • the encoding apparatus when a right-up diagonal scan order is applied, the encoding apparatus performs right upward quantization of the quantized transform coefficients of the first diagonal column according to the diagonal column order in the mxn-sized transform block. Scan and sequentially scan the quantized transform coefficients of the next diagonal columns upwards. For example, referring to FIG. 4 (a), since only the C 0,0 quantized transform coefficient is included in the first diagonal column in the transform block, C 0,0 is scanned, and C 1,0 ⁇ C 0 in the next diagonal column. The quantized transform coefficients may be scanned in the order of , 1 and then the quantized transform coefficients may be scanned in the order of C 2,0 ⁇ C 1,1 ⁇ C 0,2 in the diagonal column. In turn, the quantized transform coefficients of the diagonal column are scanned and the last quantized transform coefficients C m-1, n-1 are scanned.
  • the encoding apparatus scans the quantized transform coefficients according to a right-up diagonal scan order to generate a one-dimensional quantized transform coefficient sequence as shown in FIG. 4 (d).
  • the one-dimensional quantized transformation coefficient column if the first scanned coefficient is placed in the forward direction according to the above-described upward diagonal scan order, as shown, (C m-1, n-1 ... C 0,2 C 1,1 C) 2,0 C 0,1 C 1,0 C 0,0 ).
  • the decoding apparatus arranges the quantized transform coefficients read in order from the n-by-m length quantized transform coefficient array in a two-dimensional array in the n-by-m sized transform block according to the right-up diagonal scan order.
  • the apparatus may place the scanned quantized transform coefficients along a diagonal column of the two-dimensional array by a right-up diagonal scan order.
  • the scanned transform coefficients may be first placed in diagonal columns located at the top left of the two-dimensional array, and may be sequentially arranged in diagonal columns in the lower right direction. In each diagonal column, quantized transform coefficients may be arranged from the lower left side to the upper right side.
  • the decoding apparatus In the case of scanning from the rear to the front of the quantized transform coefficient column in FIG. 4 (d) (ie, in the direction of C m-1, n-1 ⁇ C 0,0 ), the decoding apparatus diagonally scans the scanned quantized transform coefficients upwards.
  • the scan order can be arranged along the diagonal columns of the two-dimensional array.
  • the scanned transform coefficients may be first placed in the diagonal column located at the bottom right of the two-dimensional array, and may be sequentially disposed in the diagonal columns in the upper left direction.
  • quantized transform coefficients may be arranged from the lower left side to the upper right side.
  • the transform block is square and the prediction mode applied to the transform block is the intra prediction mode
  • the size of the transform block is 4x4 or
  • the vertical scan order is applied if the intra prediction mode is the horizontal prediction mode, and if the intra prediction mode is the vertical prediction mode, the horizontal scan order is (2)
  • a right-up diagonal scan order is applied, a non-square transform block corresponds to 'other case' and a right-up diagonal scan order may be applied.
  • FIG. 5 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed on a 2 ⁇ 8 transform block.
  • FIG. 5 (a) schematically illustrates a one-dimensional array 500 of quantized transform coefficients that the encoding apparatus scans and reorders the quantized transform coefficients in the transform block.
  • the number shown in the one-dimensional array 500 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
  • FIG. 5B illustrates a two-dimensional array 510 of quantized transformed coefficients by which the decoding apparatus scans the one-dimensional array 500 of quantized transform coefficients.
  • the two-dimensional array 510 may be a transform block that includes quantized transform coefficients.
  • Each number in the two-dimensional array 510 of quantized transform coefficients specifies each quantized transform coefficient corresponding to a position in the two-dimensional array.
  • the same number in the one-dimensional array 500 and the two-dimensional array 510 of quantized transform coefficients means the same transform coefficients.
  • the decoding apparatus may sequentially scan the quantized transform coefficients in the one-dimensional array 500 and rearrange them into a two-dimensional array.
  • the decoding apparatus may scan the one-dimensional array 500 from front to back (ie, starting with zero quantized transform coefficients and toward 15 quantized transform coefficients), or from back to front (ie, quantized 15). Scans, starting with the transform coefficients, and toward zero quantized transform coefficients.
  • the decoding apparatus places zero quantized transform coefficients in the first diagonal column (upper left diagonal column) of the 2x8 array, and the next in the lower right direction. Place quantized transform coefficients of 1 and 2 in diagonal columns. As shown, in a two-dimensional array, the quantized transform coefficients are arranged in the diagonal columns in the order proceeding from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients are arranged along the diagonal column from the lower left side to the upper right side.
  • the decoding device places 15 quantized transform coefficients in the last diagonal column (the lower right first diagonal column) of the 2x8 array, and the next diagonal in the upper left direction. Place 13 and 14 quantized transform coefficients in the column.
  • the quantized transform coefficients may be arranged in the diagonal columns in the order proceeding from the lower right diagonal column (the last diagonal column) to the upper left diagonal column, and in each diagonal column, the quantized transform coefficients. These may be arranged along a diagonal row from the lower left side to the upper right side.
  • the decoding apparatus scans a one-dimensional array of quantized transform coefficients and rearranges the two-dimensional array (for example, a transform block) to the two-dimensional array (for example, a transform block). Transform coefficients) can be scanned and rearranged into a one-dimensional array.
  • the encoding apparatus may generate the one-dimensional array 500 by scanning the two-dimensional array 510 of the quantized transform coefficients in a right-up diagonal scan order.
  • the encoding apparatus may scan the 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 510 and place them at the beginning of the one-dimensional array.
  • the encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 510, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on.
  • we scan each diagonal column in order placing 15 quantized transform coefficients located in the last diagonal column (the right lower diagonal column) at the end of the one-dimensional array, 500).
  • FIG. 6 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed in units of 8 ⁇ 2 transform blocks.
  • FIG. 6 (a) schematically illustrates a one-dimensional array 600 of quantized transform coefficients which the encoding apparatus scans and rearranges the quantized transform coefficients in the transform block.
  • the number shown in the one-dimensional array 600 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
  • the two-dimensional array 610 may be a transform block that includes quantized transform coefficients.
  • Each number in the two-dimensional array 610 of quantized transform coefficients specifies each quantized transform coefficients corresponding to a position in the two-dimensional array.
  • the same number in the one-dimensional array 600 and the two-dimensional array 610 of the quantized transform coefficients means the same transform coefficients.
  • the decoding apparatus in the case of scanning the one-dimensional array 600 from front to back, is connected to the first diagonal column (upper left diagonal column) of the 8x2 array. Place quantized transform coefficients of 0 and place quantized transform coefficients of 1 and 2 in the next diagonal column in the lower right direction. As shown, in a two-dimensional array, the quantized transform coefficients are arranged in the diagonal columns in the order proceeding from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients are arranged along the diagonal column from the lower left side to the upper right side.
  • the decoding device places 15 quantized transform coefficients in the last diagonal column (the right lower diagonal column) of the 8x2 array, and the next diagonal in the upper left direction. Place 13 and 14 quantized transform coefficients in the column.
  • quantized transform coefficients may be arranged in diagonal columns in the order of progressing from the lower right diagonal column (last diagonal column) to the upper left diagonal column, and in each diagonal column, the quantized transform coefficients may be arranged. It may be arranged along a diagonal row from the lower left side to the upper right side.
  • the encoding apparatus may generate the one-dimensional array 600 by scanning the two-dimensional array 610 of the quantized transform coefficients in a right-up diagonal scan order.
  • the encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 610 at the beginning of the one-dimensional array.
  • the encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 610, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on.
  • each diagonal column may be scanned in order to generate a one-dimensional array 600 of quantized transform coefficients by placing 15 quantized transform coefficients positioned in the last diagonal column at the end of the one-dimensional array.
  • FIG. 7 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed in units of 4 ⁇ 16 transform blocks.
  • FIG. 7 (a) schematically illustrates a one-dimensional array 700 of quantized transform coefficients that the encoding apparatus scans and rearranges the quantized transform coefficients in the transform block.
  • the number shown in the one-dimensional array 700 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
  • FIG. 7B illustrates a two-dimensional array 710 of rearranged quantized transformed coefficients by the decoding apparatus scanning the one-dimensional array 700 of quantized transform coefficients.
  • the two-dimensional array 710 may be a transform block that includes quantized transform coefficients.
  • each number specifies each quantized transform coefficient corresponding to a position in the two-dimensional array.
  • the same number in the one-dimensional array 700 and the two-dimensional array 710 of quantized transform coefficients means the same transform coefficients.
  • the decoding apparatus in the case of scanning the one-dimensional array 700 from the front to the back, the decoding apparatus is connected to the first diagonal column (the upper left first diagonal column) of the 4x16 array. Place the quantized transform coefficients of 0, place the quantized transform coefficients of 1 and 2 in the next diagonal column (second diagonal column) in the lower right direction, and scan and reorder in order to the last diagonal column (lower right side).
  • a two-dimensional array 710 of quantized transform coefficients can be generated.
  • the quantized transform coefficients may be arranged in the diagonal columns in the order from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
  • the decoding device places 63 quantized transform coefficients in the last diagonal column (the right lower diagonal column) of the 4x16 array and the next diagonal in the upper left direction. Place 61 and 62 quantized transform coefficients in the column and scan and reorder them in order to place the quantized transform coefficients up to the first diagonal column (left upper diagonal column) of the two-dimensional array, A two dimensional array 710 may be created.
  • the quantized transform coefficients may be arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
  • the encoding apparatus may generate the one-dimensional array 700 by scanning the two-dimensional array 710 of the quantized transform coefficients in a right-up diagonal scan order.
  • the encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 710 at the beginning of the one-dimensional array.
  • the encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 710, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on.
  • each diagonal column may be scanned in order to generate a one-dimensional array 700 of quantized transform coefficients by placing 63 quantized transform coefficients positioned in the last diagonal column at the end of the one-dimensional array.
  • FIG. 8 is a diagram schematically illustrating an example of a method of diagonally scanning the quantized transform coefficients in the case where the transform is performed in units of 16 ⁇ 4 transform blocks.
  • FIG. 8 (a) schematically illustrates a one-dimensional array 800 of quantized transform coefficients by which an encoding apparatus scans quantized transform coefficients in a transform block.
  • the number shown in the one-dimensional array 800 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
  • the two-dimensional array 810 may be a transform block that includes quantized transform coefficients.
  • each number specifies each quantized transform coefficient corresponding to a position in the two-dimensional array.
  • the same number in the one-dimensional array 800 and the two-dimensional array 810 of the quantized transform coefficients means the same transform coefficients.
  • the decoding apparatus in the case of scanning the one-dimensional array 800 from front to back, the decoding apparatus is connected to the first diagonal column (upper left diagonal column) of the 16x4 array. Place the quantized transform coefficients of 0, place the quantized transform coefficients of 1 and 2 in the next diagonal column (second diagonal column) in the lower right direction, and scan and reorder in order to the last diagonal column (lower right side).
  • a two-dimensional array 810 of quantized transform coefficients can be generated.
  • the quantized transform coefficients may be arranged in the diagonal columns in the order from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
  • the decoding apparatus places 63 quantized transform coefficients in the last diagonal column (the right lower diagonal column) of the 16x4 array and the next diagonal in the upper left direction. Place 61 and 62 quantized transform coefficients in the column and scan and reorder them in order to place the quantized transform coefficients up to the first diagonal column (left upper diagonal column) of the two-dimensional array, A two-dimensional array 810 can be created.
  • the quantized transform coefficients may be arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
  • the encoding apparatus may generate the one-dimensional array 800 by scanning the two-dimensional array 810 of the quantized transform coefficients in a right-up diagonal scan order.
  • the encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 810 at the beginning of the one-dimensional array.
  • the encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2 located in the second diagonal column of the two-dimensional array 810 in the order from the lower left to the upper right, and then the second and third positions of the one-dimensional array. Can be placed on.
  • each diagonal column may be scanned in order to generate a one-dimensional array 800 of quantized transform coefficients by placing 63 quantized transform coefficients positioned in the last diagonal column at the end of the one-dimensional array.
  • FIG. 9 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed in units of 8 ⁇ 32 transform blocks.
  • FIG. 9 (a) schematically illustrates a one-dimensional array 900 of quantized transform coefficients arranged by the encoding apparatus by scanning quantized transform coefficients in a transform block.
  • the number shown in one-dimensional array 900 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
  • the two-dimensional array 910 may be a transform block that includes quantized transform coefficients.
  • each number specifies each quantized transform coefficient corresponding to a position in the two-dimensional array.
  • the same number in the one-dimensional array 900 and the two-dimensional array 910 of the quantized transform coefficients means the same transform coefficients.
  • the decoding apparatus is connected to the first diagonal column (upper left diagonal column) of the 8x32 array.
  • a two-dimensional array 910 of quantized transform coefficients may be generated.
  • the quantized transform coefficients may be arranged in the diagonal columns in the order from the upper left diagonal column (the first diagonal column) to the lower right diagonal column.
  • quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
  • the decoding device places 255 quantized transform coefficients in the last diagonal column (right bottom diagonal column) of the 8x32 array and the next diagonal in the upper left direction. Place 253 and 254 quantized transform coefficients in the column, scan and reorder them in order, and place the quantized transform coefficients up to the first diagonal column (left upper diagonal column) of the two-dimensional array, A two-dimensional array 910 can be generated.
  • the quantized transform coefficients may be arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
  • the encoding apparatus may generate the one-dimensional array 900 by scanning the two-dimensional array 910 of the quantized transform coefficients in a right-up diagonal scan order.
  • the encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 910 and place them at the beginning of the one-dimensional array.
  • the encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 910, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on.
  • the diagonal columns may be sequentially scanned to generate a one-dimensional array 900 of quantized transform coefficients by placing 255 quantized transform coefficients positioned at the last diagonal column at the end of the one-dimensional array.
  • FIG. 10 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed on a 32 ⁇ 8 transform block.
  • FIG. 10A schematically illustrates a one-dimensional array 1000 of quantized transform coefficients that the encoding apparatus scans and reorders the quantized transform coefficients in the transform block.
  • the number shown in the one-dimensional array 1000 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
  • FIG. 10 (b) shows a two-dimensional array 1010 of reordered quantized transformed coefficients by the decoding apparatus scanning the one-dimensional array 1000 of quantized transform coefficients.
  • the two-dimensional array 1010 may be a transform block that includes quantized transform coefficients.
  • each number specifies each quantized transform coefficient corresponding to a position in the two-dimensional array.
  • the same number in the one-dimensional array 1000 and the two-dimensional array 1010 of the quantized transform coefficients means the same transform coefficients.
  • the decoding apparatus in the case of scanning the one-dimensional array 1000 from front to back, the decoding apparatus is connected to the first diagonal column (upper left diagonal column) of the 32x8 array. Place the quantized transform coefficients of 0, place the quantized transform coefficients of 1 and 2 in the next diagonal column (second diagonal column) in the lower right direction, and scan and reorder in order to the last diagonal column (lower right side).
  • the two-dimensional array 1010 of the quantized transform coefficients may be generated by arranging the quantized transform coefficients up to the first diagonal column). In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
  • the decoding apparatus places 255 quantized transform coefficients in the last diagonal column (the lower right first diagonal column) of the 32x8 array and the next diagonal in the upper left direction. Place 253 and 254 quantized transform coefficients in the column, scan and reorder them in order, and place the quantized transform coefficients up to the first diagonal column (left upper diagonal column) of the two-dimensional array, A two dimensional array 1010 may be created.
  • the quantized transform coefficients may be arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
  • the encoding apparatus may generate the one-dimensional array 1000 by scanning the two-dimensional array 1010 of the quantized transform coefficients in a right-up diagonal scan order.
  • the encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 1010 and place them at the beginning of the one-dimensional array.
  • the encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 1010, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on.
  • the diagonal columns may be sequentially scanned to generate a one-dimensional array 1000 of quantized transform coefficients by placing 255 quantized transform coefficients positioned at the last diagonal column at the end of the one-dimensional array.
  • a right-up diagonal scan order is applied in the case of non-square transformation, but the present invention is not limited thereto.
  • the intra prediction mode is a horizontal prediction mode
  • the vertical scan order is applied, and if the intra prediction mode is the vertical prediction mode, the horizontal scan order may be applied.
  • the transform block is non-square, which encoding order is determined by the encoding device and signaled to the decoding device, and the decoding device determines which scan order to use based on the received information to perform a scan. You may.
  • 5 to 10 are examples of scan order according to the size of the block to which the non-square transform is applied, and 2x8, 8x2, 4x16, 16x4, 8x32, The same may be applied to cases other than 32x8 (eg, when n and m are arbitrary integers in FIG. 4).
  • the quantized transform coefficients are arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column of the two-dimensional array.
  • the quantized transform coefficient arrays are arranged along the diagonal column from the lower left side to the upper right side, thereby generating a two-dimensional array of quantized transform coefficients.
  • the quantized transformation coefficient array may be generated by arranging the quantized transform coefficients along the diagonal column from the lower left side to the upper right side.
  • the scan of the transform coefficients may be performed in units of sub-blocks in a two-dimensional quantized transform coefficient array (eg, a transform block).
  • a two-dimensional quantized transform coefficient array eg, a transform block
  • the encoding apparatus scans and rearranges the quantized transform coefficients in one subblock in order with respect to the subblocks in the transform coefficient array, and then sequentially scans and rearranges the quantized transform coefficients in the next subblock in one dimensional order.
  • the quantized transform coefficients may be scanned according to the above-described horizontal scan order, vertical scan order, and right-up diagonal scan order.
  • the decoding apparatus may scan and rearrange the one-dimensional transform coefficient array in sub-block units. For example, the decoding apparatus scans quantized transform coefficients for one sub-block (eg, the first sub-block) and rearranges the quantized transform coefficients at positions of the first sub-blocks in a two-dimensional array of total transform coefficients to two-dimensional. After generating the array, scan the quantized transform coefficients for the next subblock (e.g., the second subblock) and rearrange the quantized transform coefficients at positions of the second subblock in a two-dimensional array of total transform coefficients. In order to generate a two-dimensional array (eg, a transform block) of transform coefficients. In this case, the quantized transform coefficients may be rearranged in the sub-block according to the above-described horizontal scan order, vertical scan order, and right-up diagonal scan order.
  • the quantized transform coefficients may be rearranged in the sub-block according to the above-described horizontal scan order, vertical scan order, and right-up diagonal scan order.
  • the scan order of the subblocks and the scan order of the quantized transform coefficients within the subblocks may be the same or may be different. For example, if the subblocks are scanned or rearranged in a right-up diagonal scan order, the quantized transform coefficients in the subblock may also be scanned or rearranged in a right-up diagonal scan order. In addition, when the sub blocks are scanned or rearranged in a right-up diagonal scan order, the quantized transform coefficients in the sub block may be scanned or rearranged according to a horizontal scan order or a vertical scan order.
  • FIG. 11 is a diagram schematically illustrating an example of a case in which a transform block is scanned in sub-block units.
  • the transform block 1100 may be composed of S ⁇ T subblocks B ′s (S and T are integers), and the scan for the transform block 1100 may be performed in a subblock. (B) may be performed in units.
  • the transform block 1100 may be a two-dimensional array of quantized transform coefficients
  • the sub block B may be a two-dimensional array of quantized transform coefficients of size n ⁇ n.
  • the sub-blocks may also be scanned and sorted according to the horizontal scan order, vertical scan order, and right upward diagonal scan order.
  • the subblocks may be scanned in order from the first subblock in the transform block (two-dimensional array of quantized transform coefficients) (forward scan) or in reverse order from the last subblock (reverse scan).
  • B K may be a one-dimensional array according to the horizontal scan order of the quantized transform coefficients in the K-th subblock.
  • a two-dimensional array of quantized transform coefficients is generated in the sequence B 2 ⁇ B 1 ⁇ B 0 .
  • B K may be a two-dimensional array according to the horizontal scan order of the quantized transform coefficients in the K-th subblock. If the scan order of the subblock is forward, the scan and arrangement of the transform coefficients are also performed in the forward direction. If the scan order is reverse, the scan and arrangement of the transform coefficients may also be performed in the reverse direction.
  • B K may be a one-dimensional array according to the vertical scan order of the quantized transform coefficients in the K-th subblock.
  • B K may be a two-dimensional array according to the vertical scan order of the quantized transform coefficients in the K-th subblock. If the scan order of the subblock is forward, the scan and arrangement of the transform coefficients are also performed in the forward direction. If the scan order is reverse, the scan and arrangement of the transform coefficients may also be performed in the reverse direction.
  • B K may be a one-dimensional array according to a right-up diagonal scan order of the quantized transform coefficients in the K-th subblock.
  • a two-dimensional array of quantized transform coefficients is generated in the order B 2S B S + 1 B 2 B S B 1 B 0 .
  • B K may be a two-dimensional array according to a right-up diagonal scan order of the quantized transform coefficients in the K-th subblock. If the scan order of the subblock is forward, the scan and arrangement of the transform coefficients are also performed in the forward direction. If the scan order of is reverse, scan and array of transform coefficients may also be performed in the reverse direction.
  • FIG. 11B schematically illustrates an arrangement of quantized transform coefficients of any subblock B K 1110 in a transform block.
  • the case where the size of the sub block is nxn will be described as an example.
  • quantized transform coefficients C are arranged corresponding to the pixel sample positions.
  • the sub-block B K 2 of the quantization in the second row and the first row position transformation coefficient C 2,1 are arranged.
  • FIG. 11 (c) illustrates one-dimensional array of quantized transform coefficients generated by applying a horizontal scan order to two-dimensional arrays of subblocks and quantized transform coefficients, such as FIGS. 11A and 11B.
  • An example is shown.
  • the scanning order of the sub blocks is forward, the scanning and arrangement of the transform coefficients are also performed in the forward direction, and the scanning order of the sub blocks is performed. If is reverse, then scanning and arranging the transform coefficients may also be performed in the reverse direction.
  • FIG. 11 (d) illustrates one-dimensional array of quantized transform coefficients generated by applying a vertical scan order to a two-dimensional array of subblocks and quantized transform coefficients, such as FIGS. 11A and 11B.
  • An example is shown.
  • the scanning order of the subblock is forward, the scanning and arrangement of the transform coefficients are also performed in the forward direction, and the scanning order of the subblock is If is reverse, then scanning and arranging the transform coefficients may also be performed in the reverse direction.
  • FIG. 11 (e) shows a one-dimensional array of quantized transform coefficients generated by applying a right-up diagonal scan order to two-dimensional arrays of subblocks and the quantized transform coefficients as shown in FIGS. 11 (a) and 11 (b).
  • An example is shown.
  • the scanning order of the sub blocks is forward, the scanning and arrangement of the transform coefficients are also performed in the forward direction, and the scanning order of the sub blocks is performed. If is reverse, then scanning and arranging the transform coefficients may also be performed in the reverse direction.
  • the scan order (reorder order) of the subblocks and the scan order (reorder order) of the quantized transform coefficients may be different.
  • the scan order of the subblocks may be a horizontal scan order or the scan order of the quantized transform coefficients may be a vertical scan order or a horizontal scan order.
  • the scan order of the subblocks may be a vertical scan order or the scan order of the quantized transform coefficients may be a horizontal scan order or a right upward diagonal scan order.
  • the scan order of sub-blocks may be a right-up diagonal scan order or the scan order of quantized transform coefficients may be a horizontal scan order or a vertical scan order.
  • the transform block may be square or non-square
  • the scan block may be quantized in sub-block units for the non-square transform block.
  • FIG. 11 is an example in which a scan / rearrangement of quantized transform coefficients is performed for a square transform block in units of square subblocks.
  • An example of scanning / reordering transform coefficients quantized in units of square subblocks is performed on a block.
  • each sub block may be scanned as described with reference to FIGS. 4 and 11, for example.
  • each subblock for the 32x8 sized transform block may correspond to each transform coefficient in the 8x2 sized block. Accordingly, each subblock for a 32x8 transform block can be scanned and rearranged in the same manner as the method for scanning and rearranging 8x2 quantized transform coefficients.
  • the subblocks may be scanned / realigned assuming that each subblock is a quantized transform coefficient in the same manner as described in FIG. 5.
  • FIG. 12 is a diagram for explaining an example of a scanning order for arranging transform coefficients (quantized transform coefficients) in sub-block units with respect to a non-square transform block.
  • FIG. 12A illustrates a one-dimensional quantized transform coefficient array 1200 obtained through entropy decoding from a bitstream received by a decoding apparatus. If the transform block is non-square 32x8, the number of quantized transform coefficients is 0 to 255 as shown.
  • the decoding apparatus scans the transform coefficient array 1200 and rearranges the transform coefficient array 1200 into a two-dimensional array according to the applied scan order.
  • FIG. 12 (b) there are 16 4 ⁇ 4 blocks as a scan unit block in a 32 ⁇ 8 transform block 1210 in which quantized transform coefficients are rearranged.
  • the first subblock in the upper left side is called the first subblock in the transform block
  • the first subblock in the lower right side is called the last subblock in the transform block.
  • the decoding apparatus When scanning a one-dimensional array 1200 of quantized transform coefficients in a forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts from the first sub block and starts with the last sub block. Reorder the quantized transform coefficients in order up to the block.
  • the reordering is performed according to a right-up diagonal scan order for the subblocks until the reordering for the last subblock, and the second order of the quantized transform coefficients.
  • quantized transformation coefficients are arranged in diagonal columns in the order of progressing from the upper left diagonal column to the lower right diagonal column, and in the diagonal column, the right upper diagonal from the lower left side is arranged.
  • the quantized transform coefficients are arranged in order along the direction.
  • the decoding apparatus When scanning the one-dimensional array 1200 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first sub block starting from the last sub block. Reorder the quantized transform coefficients in order up to the block.
  • the rearrangement is performed according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock in such a manner that the reordering for the previous subblock after the reordering for the last subblock is performed.
  • a transform block composed of a secondary array of transform coefficients can be generated.
  • quantized transformation coefficients are arranged in diagonal columns in the order of progressing from the lower right diagonal column to the upper left diagonal column, and in the diagonal column, the lower left to upper right diagonal columns are arranged.
  • the quantized transform coefficients are arranged in order along the direction.
  • the decoding apparatus scans the one-dimensional quantized transform coefficients to form a two-dimensional quantized transform coefficient array.
  • the encoding apparatus scans the two-dimensional quantized transform coefficient array using the same method to perform one-dimensional. Quantized array of transform coefficients can be constructed.
  • the same scan order is applied to sub-blocks and quantized transform coefficients in the non-square transform block, but the present invention is not limited thereto.
  • the scan order applied to the subblocks in the non-square transform block may be different from the scan order applied to the quantized transform coefficients.
  • a horizontal scan order or a vertical scan order may be applied as the order in which the quantized transform coefficients are scanned in the subblock, in addition to the upward upward diagonal scan order.
  • FIG. 13 is a view for explaining another example of a scan order of aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to a non-square transform block.
  • a scan order of scanning / realigning a 32x8 transform block in units of 4x4 subblocks is applied to the subblocks, and a right-up diagonal scan order is applied to the quantized transform coefficients. The case where the order is applied will be described.
  • FIG. 13A illustrates a one-dimensional quantized transform coefficient array 1300 obtained through entropy decoding from a bitstream received by a decoding apparatus. If the transform block is non-square 32x8, the number of quantized transform coefficients is 0 to 255 as shown.
  • the decoding apparatus scans the transform coefficient array 1300 and rearranges the transform coefficient array into a two-dimensional array according to the applied scan order.
  • FIG. 13B illustrates rearrangement of quantized transform coefficients in sub-block units by applying a right-up diagonal scan order to subblocks and a horizontal scan order to quantized transform coefficients.
  • FIG. 13B there are 16 4x4 blocks as a scan unit block in a 32x8 transform block 1310 in which quantized transform coefficients are rearranged.
  • the first subblock in the upper left side is called the first subblock in the transform block
  • the first subblock in the lower right side is called the last subblock in the transform block.
  • the decoding apparatus When scanning a one-dimensional array 1300 of quantized transform coefficients in a forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first sub block and starts with the last sub block. Reorder the quantized transform coefficients in order up to the block.
  • the reordering is performed according to a right-up diagonal scan order for the subblocks until the reordering for the last subblock, and the second order of the quantized transform coefficients.
  • the quantized transform coefficients are arranged in order from the upper left to the lower right in the horizontal scanning order as shown.
  • the decoding apparatus When scanning the one-dimensional array 1300 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first sub block starting from the last sub block. Reorder the quantized transform coefficients in order up to the block.
  • the rearrangement is performed according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock in such a manner that the reordering for the previous subblock after the reordering for the last subblock is performed.
  • a transform block composed of a secondary array of transform coefficients can be generated.
  • the quantized transform coefficients are sequentially arranged in the reverse order of the horizontal scan from the lower right side to the upper left direction.
  • the decoding apparatus scans the one-dimensional quantized transform coefficients to form a two-dimensional quantized transform coefficient array.
  • the encoding apparatus scans the two-dimensional quantized transform coefficient array using the same method to perform one-dimensional. Quantized array of transform coefficients can be constructed.
  • the sub blocks are scanned in a right-up diagonal scan order, and the two-dimensional quantized transform coefficient arrays in each sub block are scanned in a horizontal scan order and sequentially arranged.
  • one-dimensional quantized array of transform coefficients can be configured.
  • FIG. 14 is a view for explaining another example of a scan order of aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to a non-square transform block.
  • a scan order of scanning / realigning a 32x8 transform block in units of 4x4 subblocks is applied to the subblocks, and a vertical upward scan order is applied to the quantized transform coefficients. The case where the order is applied will be described.
  • FIG. 14A illustrates a one-dimensional quantized transform coefficient array 1400 obtained through entropy decoding from a bitstream received by a decoding apparatus. If the transform block is non-square 32x8, the number of quantized transform coefficients is 0 to 255 as shown.
  • the decoding apparatus scans the transform coefficient array 1400 and rearranges the transform coefficient array 1400 into a 2D array according to an applied scan order.
  • FIG. 14B illustrates rearrangement of quantized transform coefficients in sub-block units by applying a right-up diagonal scan order to sub blocks and a vertical scan order to quantized transform coefficients.
  • FIG. 14B there are 16 4x4 blocks as a scan unit block in a 32x8 transform block 1410 in which quantized transform coefficients are rearranged.
  • the first subblock in the upper left side is called the first subblock in the transform block
  • the first subblock in the lower right side is called the last subblock in the transform block.
  • the decoding apparatus When scanning a one-dimensional array 1400 of quantized transform coefficients in a forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts from the first subblock and starts with the last subblock. Reorder the quantized transform coefficients in order up to the block.
  • the reordering is performed according to a right-up diagonal scan order for the subblocks until the reordering for the last subblock, and the second order of the quantized transform coefficients.
  • the quantized transform coefficients are arranged in order according to the vertical scan order as shown.
  • the decoding apparatus In the case of scanning the one-dimensional array 1400 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first sub block starting from the last sub block. Reorder the quantized transform coefficients in order up to the block.
  • the rearrangement is performed according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock in such a manner that the reordering for the previous subblock after the reordering for the last subblock is performed.
  • a transform block composed of a secondary array of transform coefficients can be generated.
  • quantized transform coefficients are arranged in sequence according to the reverse order of the vertical scan.
  • the decoding apparatus scans the one-dimensional quantized transform coefficients to form a two-dimensional quantized transform coefficient array.
  • the encoding apparatus scans the two-dimensional quantized transform coefficient array using the same method to perform one-dimensional. Quantized array of transform coefficients can be constructed.
  • the sub blocks are scanned in a right-up diagonal scan order, and the two-dimensional quantized transform coefficient arrays in each sub block are scanned in a vertical scan order and sequentially arranged.
  • one-dimensional quantized array of transform coefficients may be configured.
  • FIG. 15 is a view for explaining another example of a scan order for aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to the non-square transform block.
  • FIG. 15A illustrates a one-dimensional quantized transform coefficient array 1500 obtained through entropy decoding from a bitstream received by a decoding apparatus. If the transform block is an 8x32 non-square, the number of quantized transform coefficients is 0 to 255 as shown.
  • the decoding apparatus may scan the transform coefficient array 1500 and rearrange the two-dimensional array according to the applied scan order.
  • FIG. 15B there are 16 4x4 blocks as a scan unit block in an 8x32 transform block 1510 in which quantized transform coefficients are rearranged.
  • the first subblock in the upper left side is called the first subblock in the transform block
  • the first subblock in the lower right side is called the last subblock in the transform block.
  • the decoding apparatus When scanning a one-dimensional array 1500 of quantized transform coefficients in a forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts from the first sub block and starts with the last sub block. Reorder the quantized transform coefficients in order up to the block.
  • the reordering is performed according to a right-up diagonal scan order for the subblocks until the reordering for the last subblock, and the second order of the quantized transform coefficients.
  • quantized transformation coefficients are arranged in diagonal columns in the order of progressing from the upper left diagonal column to the lower right diagonal column, and in the diagonal column, the right upper diagonal from the lower left side is arranged.
  • the quantized transform coefficients are arranged in order along the direction.
  • the decoding apparatus In the case of scanning the one-dimensional array 1500 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first subblock starting from the last subblock. Reorder the quantized transform coefficients in order up to the block.
  • the rearrangement is performed according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock in such a manner that the reordering for the previous subblock after the reordering for the last subblock is performed.
  • a transform block composed of a secondary array of transform coefficients can be generated.
  • quantized transformation coefficients are arranged in diagonal columns in the order of progressing from the lower right diagonal column to the upper left diagonal column, and in the diagonal column, the lower left to upper right diagonal columns are arranged.
  • the quantized transform coefficients are arranged in order along the direction.
  • the decoding apparatus scans the one-dimensional quantized transform coefficients to form a two-dimensional quantized transform coefficient array.
  • the encoding apparatus scans the two-dimensional quantized transform coefficient array using the same method to perform one-dimensional. Quantized array of transform coefficients can be constructed.
  • FIG. 16 is a view for explaining another example of a scanning order for aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to the non-square transform block.
  • FIG. 16A illustrates a one-dimensional quantized transform coefficient array 1600 obtained through entropy decoding from a bitstream received by a decoding apparatus.
  • FIG. 16 (b) shows that the quantized transform coefficients are rearranged in sub-block units by applying a right-up diagonal scan order to sub blocks and a horizontal scan order to quantized transform coefficients.
  • FIG. 16B there are 16 4x4 blocks as a scan unit block in an 8x32 transform block 1610 in which quantized transform coefficients are rearranged.
  • the first subblock in the upper left side is called the first subblock in the transform block
  • the first subblock in the lower right side is called the last subblock in the transform block.
  • the decoding apparatus In the case of scanning the one-dimensional array 1600 of quantized transform coefficients in the forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus then realigns the first subblock after The reordering of the subblocks may be performed according to a right-up diagonal scan order for the subblocks until the reordering of the last subblock, and a transform block configured of a secondary array of quantized transform coefficients may be generated. At this time, in each sub-block, the quantized transform coefficients are arranged in order from the upper left to the lower right in the horizontal scanning order as shown.
  • the decoding apparatus In the case of scanning the one-dimensional array 1600 of quantized transform coefficients in the reverse direction (the direction proceeding from zero quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus returns before and after reordering the last subblock. Perform a reordering according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock by reordering the subblocks of the order, and then convert the transform block consisting of the secondary array of quantized transform coefficients. Can be generated. At this time, in each sub-block, as illustrated, the quantized transform coefficients are sequentially arranged in the reverse order of the horizontal scan from the lower right side to the upper left direction.
  • the encoding apparatus also scans the sub-blocks in a right-up diagonal scan order in the two-dimensional array (transform block) of FIG. 16 (b), and sequentially arranges the two-dimensional quantized transform coefficient arrays in each sub-block in a horizontal scan order.
  • an array of one-dimensional quantized transform coefficients as shown in FIG. 16 (a) can be configured.
  • FIG. 17 is a view for explaining another example of a scan order of aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to a non-square transform block.
  • FIG. 17A illustrates a one-dimensional quantized transform coefficient array 1700 obtained through entropy decoding from a bitstream received by a decoding apparatus.
  • FIG. 17B illustrates rearrangement of quantized transform coefficients in sub-block units by applying a right-up diagonal scan order to subblocks and a vertical scan order to quantized transform coefficients.
  • FIG. 17B there are 16 4x4 blocks as a scan unit block in an 8x32 transform block 1710 in which quantized transform coefficients are rearranged.
  • the first subblock in the upper left side is called the first subblock in the transform block
  • the first subblock in the lower right side is called the last subblock in the transform block.
  • the decoding apparatus next realigns the first sub-block after The reordering of the subblocks may be performed according to a right-up diagonal scan order for the subblocks until the reordering of the last subblock, and a transform block configured of a secondary array of quantized transform coefficients may be generated.
  • the quantized transform coefficients are arranged in order according to the vertical scan order as shown.
  • the decoding apparatus In the case of scanning the one-dimensional array 1700 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus returns before and after reordering the last subblock. Perform a reordering according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock by reordering the subblocks of the order, and then convert the transform block consisting of the secondary array of quantized transform coefficients. Can be generated. At this time, in each sub-block, as illustrated, quantized transform coefficients are arranged in sequence according to the reverse order of the vertical scan.
  • the encoding apparatus also scans the sub-blocks in a right-up diagonal scan order in the two-dimensional array (transform block) of FIG. 17 (b) using the same method, and vertically scans the two-dimensional quantized transform coefficient arrays in each sub-block. By sequentially scanning and arranging one by one, one-dimensional quantized transform coefficient arrays as shown in Fig. 17A can be constructed.
  • the encoding apparatus may signal a scan order applied to the sub blocks.
  • the scan order may be applied according to the prediction mode applied to the non-square transform block. For example, if the intra prediction mode applied to the non-square transform block is the prediction mode in the horizontal direction, the vertical scan order is applied. If the intra prediction mode is applied to the non-square transform block is the prediction mode in the vertical direction, the horizontal scan order is applied. When other intra prediction modes or inter prediction modes are applied, a right upward diagonal prediction order may be applied.
  • the encoding and decoding apparatuses perform scan / reordering of quantized transform coefficients.
  • this is for convenience of description and the present invention is not limited thereto.
  • scan / reordering of the quantized transform coefficients may be performed by the reordering units 125 and 215 located in the encoding apparatus and the decoding apparatus.
  • FIG. 18 is a flowchart schematically illustrating a method for scanning a quantized transform coefficient by an encoding apparatus according to the present invention.
  • the encoding apparatus converts the residual signal (S1810).
  • the residual signal may be generated as a difference value between the prediction signal generated by the prediction and the original signal.
  • the encoding apparatus may generate a transform block composed of a two-dimensional array of transform coefficients by transforming the residual signal in units of transform blocks.
  • the transform coefficients may be coefficients generated by converting signals in the time domain into the frequency domain.
  • a non-square transformation may be used according to a service, a product specification, etc. to be used.
  • the transform block to which the transform is applied may be a non-square transform block having a size of 2x8, 8x2, 4x16, 16x4, 8x32, 32x8, or the like.
  • the encoding apparatus quantizes the transform coefficients (S1820).
  • the encoding apparatus quantizes the transform coefficients in the transform block to generate a transform block composed of quantized transform coefficients.
  • the encoding apparatus rearranges the quantized transform coefficients (S1830). As described above, the encoding apparatus may scan the two-dimensional array of quantized transform coefficients and rearrange the one-dimensional array. In this case, the two-dimensional array of quantized transform coefficients (transform block composed of quantized transform coefficients) may be non-square, and scan and reordering may be performed in units of subblocks of the transform block.
  • the encoding apparatus may entropy encode one-dimensional quantized transform coefficients (S1840).
  • the encoding apparatus may entropy encode one-dimensional quantized transform coefficients and transmit the information in a bitstream together with information necessary for decoding.
  • FIG. 19 is a flowchart schematically illustrating a method for scanning a quantized transform coefficient by a decoding apparatus according to the present invention.
  • the decoding apparatus entropy decodes a bitstream received from the encoding apparatus (S1910).
  • the decoding apparatus may capture the one-dimensional quantized transform coefficient array through entropy decoding.
  • the decoding apparatus rearranges the quantized transform coefficients (S1920). As described above, the decoding apparatus may scan the one-dimensional array of quantized transform coefficients and rearrange the two-dimensional array. In this case, the two-dimensional array of quantized transform coefficients (transform block composed of quantized transform coefficients) may be non-square, and scan and reordering may be performed in units of subblocks of the transform block.
  • the decoding apparatus dequantizes the quantized transform coefficients (S1930).
  • the decoding apparatus may inversely quantize the quantized transform coefficients in the transform block to generate a transform block composed of the transform coefficients.
  • the decoding apparatus may perform inverse transform on the transform block (S1940).
  • the transform block can be non-square as described above.
  • the decoding apparatus may generate residual signals by inversely transforming the transform block, and reconstruct the original signal by adding the generated residual signal and the prediction signal generated by the prediction.
  • C i, j may represent a quantized transform coefficient located at coordinate (i, j) or may represent a coordinate (i, j) at which the quantized transform coefficient is located.
  • C Ki, j may represent quantized transform coefficients located at coordinates (i, j) in the K-th subblock in the transform block
  • C Ki, j may indicate coordinates (where quantized transform coefficients are located in the Kth subblock in the transform block).
  • a diagonal column refers to a column of elements (sample or (quantized) transform coefficients) positioned on the diagonal array in the two-dimensional array.
  • the elements of the two-dimensional array on the diagonal column are ⁇ (i, j) (i + 1, j-1) ( i + 2, j-2)... ⁇
  • the elements in the diagonal column mean the elements in the two-dimensional array.

Abstract

The present invention relates to a method for realigning transform coefficients and a device using same, and the method for realigning the transform coefficients according to the present invention comprises the steps of: quantizing a transform block which comprises the transform coefficients; scanning the quantized transform coefficients in sub-block units of the transform block and realigning same in a one-dimensional arrangement; and entropy-encoding and transmitting the quantized transform coefficients that are realigned in the one-dimensional arrangement, wherein the transform block can be a rectangular block.

Description

변환 계수 재정렬 방법 및 이를 이용하는 장치Transform coefficient reordering method and apparatus using same
본 발명은 영상 정보 압축 기술에 관한 것으로서, 더 구체적으로는 변환 계수를 스캐닝하여 재정렬하는 방법 및 장치에 관한 것이다.The present invention relates to image information compression technology, and more particularly, to a method and apparatus for scanning and rearranging transform coefficients.
최근 고해상도, 고품질의 영상에 대한 요구가 다양한 응용 분야에서 증가하고 있다. 하지만, 영상이 고해상도를 가지고 고품질이 될수록 해당 영상에 관한 정보량도 함께 증가한다. Recently, the demand for high resolution and high quality images is increasing in various applications. However, as the image becomes high quality with high resolution, the amount of information about the image also increases.
따라서 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 정보를 전송하거나 기존의 저장 매체를 이용해 영상 정보를 저장하는 경우에는, 정보의 전송 비용과 저장 비용이 증가하게 된다. Therefore, when image information is transmitted using a medium such as a conventional wired / wireless broadband line or when image information is stored using an existing storage medium, the transmission cost and the storage cost of information increase.
고해상도, 고품질 영상의 정보를 효과적으로 전송하거나 저장하고, 재생하기 위해 고효율의 영상 압축 기술을 이용할 수 있다.High-efficiency image compression technology can be used to effectively transmit, store, and reproduce high-resolution, high-quality video information.
영상 압축의 효율을 높이기 위해, 인터 예측과 인트라 예측을 이용할 수 있다. 인터 예측(inter prediction) 방법에서는 다른 픽처의 정보를 참조하여 현재 픽처(picture)의 픽셀값을 예측하며, 인트라 예측(intra prediction) 방법에서는 동일한 픽처 내에서 픽셀 간 연관 관계를 이용하여 픽셀값을 예측한다.In order to increase the efficiency of image compression, inter prediction and intra prediction may be used. In the inter prediction method, the pixel value of the current picture is predicted by referring to information of another picture, and in the intra prediction method, the pixel value is predicted by using the correlation between pixels in the same picture. do.
예측된 영상의 처리 단위, 예컨대 블록에 대하여는 영상을 원본과 동일하게 만들기 위한 다양한 방법이 적용될 수 있다. 이를 통해 디코딩 장치는 해당 영상을 더 정확하게(원본과 더 일치하게) 디코딩할 수 있으며, 인코딩 장치는 해당 영상이 더 정확하게 복원될 수 있도록 인코딩할 수 있다.Various methods for making an image identical to an original may be applied to a processing unit, eg, a block, of a predicted image. This allows the decoding apparatus to decode the image more accurately (more consistent with the original), and the encoding apparatus can encode the image so that it can be more accurately reconstructed.
본 발명은 양자화된 변환 계수를 효과적으로 스캔하여 재정렬하는 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a method and apparatus for effectively scanning and rearranging quantized transform coefficients.
본 발명은 변환 블록이 비정방형 블록인 경우에 양자화된 변환 계수들을 스캔하여 재정렬하는 방법 및 장치를 제공하는 것을 목적으로 한다.An object of the present invention is to provide a method and apparatus for scanning and rearranging quantized transform coefficients when the transform block is a non-square block.
본 발명은 변한 블록이 비정방형 블록인 경우에 양자화된 변환 계수들을 서브 블록 단위로 스캔하여 재정렬하는 방법 및 장치를 제공하는 것을 목적으로 한다. An object of the present invention is to provide a method and apparatus for scanning and rearranging quantized transform coefficients in sub-block units when the changed block is a non-square block.
본 발명의 일 실시형태는 변환 계수의 재정렬 방법으로서, 변환 계수들로 구성된 변환 블록을 양자화 하는 단계, 양자화된 변환 계수들을 상기 변환 블록의 서브 블록 단위로 스캔하여 1차원 배열로 재정렬하는 단계 및 상기 재정렬된 1차원 배열의 양자화된 변환 계수를 엔트로피 인코딩하여 전송하는 단계를 포함하며, 상기 변환 블록은 비정방형 블록일 수 있다.An embodiment of the present invention provides a method of reordering transform coefficients, the method comprising: quantizing a transform block composed of transform coefficients, scanning the quantized transform coefficients in units of subblocks of the transform block, and rearranging the transform coefficients into a one-dimensional array; Entropy encoding and transmitting the quantized transform coefficients of the reordered one-dimensional array, wherein the transform block may be a non-square block.
상기 재정렬 단계에서 서브 블록들에 대한 스캔 순서와 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 스캔 순서는 동일할 수도 있고, 다를 수도 있다. The scan order for subblocks and the scan order for quantized transform coefficients in the subblocks may be the same or different in the reordering step.
예컨대, 상기 변환 블록 내의 서브 블록들에 대한 스캔 순서가 우상향 대각 스캔 순서인 경우에, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 스캔 순서는 우상향 대각 스캔 순서, 수평 스캔 순서 및 수직 스캔 순서 중 어느 하나일 수 있다.For example, when the scan order for sub-blocks in the transform block is a right-up diagonal scan order, the scan order for quantized transform coefficients in the sub-blocks is one of a right-up diagonal scan order, a horizontal scan order, and a vertical scan order. It can be either.
상기 변환 블록은 32x8 크기 또는 8x32 크기의 비정방형 블록일 수 있으며, 상기 서브 블록은 4x4 크기의 블록일 수 있다.The transform block can be a 32x8 or 8x32 non-square block, and the subblock can be a 4x4 block.
본 발명의 다른 실시형태도 변환 계수 재정렬 방법으로서, 양자화된 변환 계수들의 1차원 배열을 획득하는 엔트로피 디코딩 단계 및 상기 양자화된 변환 계수들의 1차원 배열을 스캔하여 상기 양자화된 변환 계수들의 변환 블록으로 재정렬하는 단계를 포함하고, 상기 재정렬 단계에서는 상기 변환 블록의 서브 블록 단위로 양자화된 변환 계수들을 재정렬할 수 있으며, 상기 변환 블록은 비정방형 블록일 수 있다.Another embodiment of the present invention also provides a transform coefficient reordering method, comprising: an entropy decoding step of obtaining a one-dimensional array of quantized transform coefficients and a reordering of the quantized transform coefficients into a transform block by scanning the one-dimensional array of quantized transform coefficients In the reordering step, the quantized transform coefficients may be rearranged in units of subblocks of the transform block, and the transform block may be a non-square block.
상기 재정렬 단계에서 서브 블록들의 재정렬 순서와 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 재정렬 순서가 동일할 수도 있고 다를 수도 있다. In the reordering step, the reordering order of subblocks and the reordering order of quantized transform coefficients in the subblocks may be the same or different.
예컨대, 상기 변환 블록 내의 서브 블록들에 대한 재정렬 순서가 우상향 대각 스캔 순서인 경우에, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 스캔 순서는 우상향 대각 스캔 순서, 수평 스캔 순서 및 수직 스캔 순서 중 어느 하나일 수 있다.For example, when the reordering order for the subblocks in the transform block is a right-up diagonal scan order, the scan order for the quantized transform coefficients in the sub-blocks is one of a right-up diagonal scan order, a horizontal scan order, and a vertical scan order. It can be either.
상기 재정렬 단계에서 상기 양자화된 변환 계수의 1차원 배열을 역방향으로 스캔하는 경우에 상기 서브 블록 단위의 재정렬은 상기 변환 블록 마지막 서브 블록부터 첫 번째 서브 블록 방향으로 우상향 대각 스캔의 순서에 따라서 수행될 수도 있다. 이때, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 재정렬 순서는 상기 서브 블록 내 마지막 양자화된 변환 계수부터 첫 번째 양자화된 변환 계수 방향으로 우상향 대각 스캔 순서에 따라 수행되는 것을 특징으로 하는 변환 계수 재정렬 방법.When the one-dimensional array of the quantized transform coefficients is scanned in the reverse direction in the reordering step, the reordering of the sub-block units may be performed in the order of right-up diagonal scanning from the last sub-block to the first sub-block direction. have. In this case, the reordering order of the quantized transform coefficients in the subblocks is performed according to a right-up diagonal scan order from the last quantized transform coefficient in the subblock to the first quantized transform coefficient direction. Way.
상기 비정방형 블록은 8x32 크기의 블록 또는 32x8 크기의 블록일 수 있으며, 상기 서브 블록은 4x4 크기의 블록일 수 있다.The non-square block may be an 8x32 size block or a 32x8 sized block, and the sub block may be a 4x4 sized block.
본 발명에 의하면, 양자화된 변환 계수를 효과적으로 스캔하여 재정렬함으로써 변환 및/또는 엔트로피 코딩의 효율을 높일 수 있다.According to the present invention, the efficiency of transform and / or entropy coding can be increased by effectively scanning and rearranging quantized transform coefficients.
본 발명에 의하면, 영상의 특성에 따라서 비정방형 블록을 변환 블록으로 사용할 수 있으며, 이를 통해 압축 효율을 높일 수 있다.According to the present invention, a non-square block can be used as a transform block according to the characteristics of an image, thereby increasing the compression efficiency.
본 발명에 의하면, 변환 블록 내 서브 블록을 단위로 양자화된 변환 계수의 스캔 및 재정렬을 수행함으로써 압축 효율을 향상시킬 수 있다.According to the present invention, the compression efficiency can be improved by scanning and rearranging the transform coefficients quantized in units of subblocks in the transform block.
도 1은 본 발명의 일 실시예에 따른 인코딩 장치(영상 부호화 장치)를 개략적으로 도시한 블록도이다.1 is a block diagram schematically illustrating an encoding apparatus (video encoding apparatus) according to an embodiment of the present invention.
도 2는 본 발명의 일 실시예에 따른 영상 디코딩 장치를 개략적으로 나타낸 블록도이다.2 is a block diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention.
도 3은 인트라 예측 모드를 설명하는 도면이다. 3 is a diagram illustrating an intra prediction mode.
도 4는 스캔 순서에 따른 스캔 방법을 개략적으로 설명하는 도면이다.4 is a diagram schematically illustrating a scanning method according to a scanning order.
도 5 내지 도 10은 다양한 크기의 비정방형 변환 블록을 이용한 변환에 있어서, 양자화된 변환 계수들을 우상향 대각 스캔하는 방법의 예들을 개략적으로 설명하는 도면이다. 5 to 10 are diagrams schematically illustrating examples of a method of diagonally upward-scanning quantized transform coefficients in a transform using non-square transform blocks of various sizes.
도 11은 변환 블록이 서브 블록 단위로 스캔되는 경우의 일 예를 개략적으로 설명하는 도면이다.11 is a diagram schematically illustrating an example of a case in which a transform block is scanned in sub-block units.
도 12 내지 도 17은 비정방형 변환 블록에 대하여 서브 블록 단위로 변환 계수를 정렬하는 스캔 순서의 예들을 개략적으로 설명하는 도면이다.12 to 17 are schematic diagrams illustrating examples of a scan order of aligning transform coefficients in sub-block units for a non-square transform block.
도 18은 본 발명에 따라서 인코딩 장치가 양자화된 변환 계수를 스캔하는 방법을 개략적으로 설명하는 순서도이다.18 is a flowchart schematically illustrating a method for scanning a quantized transform coefficient by an encoding apparatus according to the present invention.
도 19는 본 발명에 따라서 디코딩 장치가 양자화된 변환 계수를 스캔하는 방법을 개략적으로 설명하는 순서도이다.19 is a flowchart schematically illustrating a method for scanning a quantized transform coefficient by a decoding apparatus according to the present invention.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니다. 본 명세서에서 사용하는 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명의 기술적 사상을 한정하려는 의도로 사용되는 것은 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성 요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.As the present invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the invention to the specific embodiments. The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the spirit of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this specification, terms such as "comprise" or "have" are intended to indicate that there is a feature, number, step, action, component, part, or combination thereof described on the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.
한편, 본 발명에서 설명되는 도면상의 각 구성들은 영상 인코딩 장치/디코딩 장치에서 서로 다른 특징적인 기능들에 관한 설명의 편의를 위해 독립적으로 도시된 것으로서, 각 구성들이 서로 별개의 하드웨어나 별개의 소프트웨어로 구현된다는 것을 의미하지는 않는다. 예컨대, 각 구성 중 두 개 이상의 구성이 합쳐져 하나의 구성을 이룰 수도 있고, 하나의 구성이 복수의 구성으로 나뉘어질 수도 있다. 각 구성이 통합 및/또는 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.On the other hand, each of the components in the drawings described in the present invention are shown independently for the convenience of description of different characteristic functions in the image encoding apparatus / decoding apparatus, each component is a separate hardware or separate software It does not mean that it is implemented. For example, two or more of each configuration may be combined to form one configuration, or one configuration may be divided into a plurality of configurations. Embodiments in which each configuration is integrated and / or separated are also included in the scope of the present invention without departing from the spirit of the present invention.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성 요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성 요소에 대해서 중복된 설명은 생략한다.Hereinafter, with reference to the accompanying drawings, it will be described in detail a preferred embodiment of the present invention. Hereinafter, the same reference numerals are used for the same components in the drawings, and redundant description of the same components is omitted.
도 1은 본 발명의 일 실시예에 따른 인코딩 장치(영상 부호화 장치)를 개략적으로 도시한 블록도이다. 도 1을 참조하면, 인코딩 장치(100)는 픽처 분할부(105), 예측부(110), 변환부(115), 양자화부(120), 재정렬부(125), 엔트로피 인코딩부(130), 역양자화부(135), 역변환부(140), 필터부(145) 및 메모리(150)를 구비한다. 1 is a block diagram schematically illustrating an encoding apparatus (video encoding apparatus) according to an embodiment of the present invention. Referring to FIG. 1, the encoding apparatus 100 may include a picture divider 105, a predictor 110, a transformer 115, a quantizer 120, a reordering unit 125, an entropy encoding unit 130, An inverse quantization unit 135, an inverse transform unit 140, a filter unit 145, and a memory 150 are provided.
픽처 분할부(105)는 입력된 픽처를 적어도 하나의 처리 단위 블록으로 분할할 수 있다. 이때, 처리 단위로서의 블록은 예측 유닛(Prediction Unit, 이하 ‘PU’라 함)일 수도 있고, 변환 유닛(Transform Unit, 이하 ‘TU’라 함)일 수도 있으며, 코딩 유닛(Coding Unit, 이하 ‘CU’라 함)일 수도 있다. The picture dividing unit 105 may divide the input picture into at least one processing unit block. In this case, the block as the processing unit may be a prediction unit (hereinafter referred to as a PU), a transform unit (hereinafter referred to as a TU), or a coding unit (hereinafter referred to as "CU"). It may be called.
픽처 분할부(105)에서 분할되는 처리 단위 블록들은 쿼드 트리(quad-tree) 구조를 가질 수 있다. The processing unit blocks divided by the picture divider 105 may have a quad-tree structure.
예측부(110)는 후술하는 바와 같이, 인터 예측을 수행하는 인터 예측부와 인트라 예측을 수행하는 인트라 예측부를 포함한다. 예측부(110)는, 픽처 분할부(105)에서 픽처의 처리 단위에 대하여 예측을 수행하여 예측 블록을 생성한다. 예측부(110)에서 픽처의 처리 단위는 CU일 수도 있고, TU일 수도 있고, PU일 수도 있다. 또한, 예측부(110)는 해당 처리 단위에 대하여 실시되는 예측이 인터 예측인지 인트라 예측인지를 결정하고, 각 예측 방법의 구체적인 내용(예컨대, 예측 모드 등)을 정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 예측 방법의 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 PU 단위로 결정되고, 예측의 수행은 TU 단위로 수행될 수도 있다. The predictor 110 includes an inter predictor for performing inter prediction and an intra predictor for performing intra prediction, as described below. The prediction unit 110 generates a prediction block by performing prediction on the processing unit of the picture in the picture division unit 105. The processing unit of the picture in the prediction unit 110 may be a CU, a TU, or a PU. In addition, the prediction unit 110 may determine whether the prediction performed on the processing unit is inter prediction or intra prediction, and determine specific contents (eg, prediction mode, etc.) of each prediction method. In this case, the processing unit in which the prediction is performed and the processing unit in which the details of the prediction method and the prediction method are determined may be different. For example, the prediction method and the prediction mode may be determined in units of PUs, and the prediction may be performed in units of TUs.
인터 예측을 통해서는 현재 픽처의 이전 픽처 및/또는 이후 픽처 중 적어도 하나의 픽처의 정보를 기초로 예측을 수행하여 예측 블록을 생성할 수 있다. 또한, 인트라 예측을 통해서는 현재 픽처 내의 픽셀 정보를 기초로 예측을 수행하여 예측 블록을 생성할 수 있다. Through inter prediction, a prediction block may be generated by performing prediction based on information of at least one picture of a previous picture and / or a subsequent picture of the current picture. In addition, through intra prediction, a prediction block may be generated by performing prediction based on pixel information in a current picture.
인터 예측의 방법으로서, 스킵(skip) 모드, 머지(merge) 모드, MVP(Motion Vector Predtiction) 등을 이용할 수 있다. 인터 예측에서는 PU에 대하여, 참조 픽처를 선택하고 PU와 동일한 크기의 참조 블록을 선택할 수 있다. 참조 블록은 정수 픽셀 단위로 선택될 수 있다. 이어서, 현재 PU와의 레지듀얼(residual) 신호가 최소화되며 움직임 벡터 크기 역시 최소가 되는 예측 블록이 생성된다.As a method of inter prediction, a skip mode, a merge mode, a motion vector prediction (MVP), and the like can be used. In inter prediction, a reference picture may be selected for a PU and a reference block having the same size as the PU may be selected. The reference block may be selected in integer pixel units. Subsequently, a prediction block is generated in which a residual signal with the current PU is minimized and the size of the motion vector is also minimized.
예측 블록은 정수 샘플 단위로 생성될 수도 있고, 1/2 픽셀 단위 또는 1/4 픽셀 단위와 같이 정수 이하 픽셀 단위로 생성될 수도 있다. 이때, 움직임 벡터 역시 정수 픽셀 이하의 단위로 표현될 수 있다. 예컨대 휘도 샘플에 대해서는 1/4 픽셀 단위로, 색차 샘플에 대해서는 1/8 픽셀 단위로 표현될 수 있다. The prediction block may be generated in integer sample units, or may be generated in sub-pixel units such as 1/2 pixel unit or 1/4 pixel unit. In this case, the motion vector may also be expressed in units of integer pixels or less. For example, it may be expressed in units of 1/4 pixels for luminance samples and in units of 1/8 pixels for chrominance samples.
인터 예측을 통해 선택된 참조 픽처의 인덱스, 움직임 벡터(ex. Motion Vector Predictor), 레지듀얼 신호 등의 정보는 엔트로피 인코딩되어 디코딩 장치에 전달된다. 스킵 모드가 적용되는 경우에는 레지듀얼을 예측 블록을 복원 블록으로 할 수 있으므로, 레지듀얼을 생성, 변환, 양자화, 전송하지 않을 수 있다. Information such as an index, a motion vector predictor, and a residual signal of a reference picture selected through inter prediction is entropy encoded and delivered to the decoding apparatus. When the skip mode is applied, the residual may be used as the reconstructed block, and thus the residual may not be generated, transformed, quantized, or transmitted.
인트라 예측을 수행하는 경우에는, PU 단위로 예측 모드가 정해져서 PU 단위로 예측이 수행될 수 있다. 또한, PU 단위로 예측 모드가 정해지고 TU 단위로 인트라 예측이 수행될 수도 있다. When performing intra prediction, a prediction mode may be determined in units of PUs, and prediction may be performed in units of PUs. In addition, a prediction mode may be determined in units of PUs, and intra prediction may be performed in units of TUs.
인트라 예측에서 예측 모드는 33개의 방향성 예측 모드와 적어도 2개 이상의 비방향성 모드를 가질 수 있다. 비향성성 모드는 DC 예측 모드 및 플래이너 모드(Planar 모드)을 포함할 수 있다. In intra prediction, the prediction mode may have 33 directional prediction modes and at least two non-directional modes. The non-directional mode may include a DC prediction mode and a planner mode (Planar mode).
인트라 예측에서는 참조 샘플에 필터를 적용한 후 예측 블록을 생성할 수 있다. 이때, 참조 샘플에 필터를 적용할 것인지는 현재 블록의 인트라 예측 모드 및/또는 사이즈에 따라 결정될 수 있다.In intra prediction, a prediction block may be generated after applying a filter to a reference sample. In this case, whether to apply the filter to the reference sample may be determined according to the intra prediction mode and / or the size of the current block.
PU는 다양한 사이즈/형태의 블록일 수 있으며, 예컨대 인터 예측의 경우에 PU는 2N×2N 블록, 2N×N 블록, N×2N 블록, 또는 N×N 블록 (N은 정수) 등일 수 있다. 인트라 예측의 경우에 PU는 2N×2N 블록 또는 N×N 블록 (N은 정수) 등일 수 있다. 이때, N×N 블록 크기의 PU는 특정한 경우에만 적용하도록 설정할 수 있다. 예컨대 최소 크기 CU에 대해서만 NxN 블록 크기의 PU를 이용하도록 정하거나 인트라 예측에 대해서만 이용하도록 정할 수도 있다. 또한, 상술한 크기의 PU 외에, N×mN 블록, mN×N 블록, 2N×mN 블록 또는 mN×2N 블록 (m<1) 등의 PU를 더 정의하여 사용할 수도 있다.The PU may be a block of various sizes / types, for example, in the case of inter prediction, the PU may be a 2N × 2N block, a 2N × N block, an N × 2N block, an N × N block (N is an integer), or the like. In the case of intra prediction, the PU may be a 2N × 2N block or an N × N block (where N is an integer). In this case, the PU of the N × N block size may be set to apply only in a specific case. For example, the NxN block size PU may be used only for the minimum size CU or only for intra prediction. In addition to the above-described PUs, PUs such as N × mN blocks, mN × N blocks, 2N × mN blocks, or mN × 2N blocks (m <1) may be further defined and used.
생성된 예측 블록과 원본 블록 사이의 레지듀얼 값(레지듀얼 블록 또는 레지듀얼 신호)은 변환부(115)로 입력된다. 또한, 예측을 위해 사용한 예측 모드 정보, 움직임 벡터 정보 등은 레지듀얼 값과 함께 엔트로피 인코딩부(130)에서 인코딩되어 디코딩 장치에 전달된다. The residual value (the residual block or the residual signal) between the generated prediction block and the original block is input to the converter 115. In addition, the prediction mode information, the motion vector information, etc. used for the prediction are encoded by the entropy encoding unit 130 together with the residual value and transmitted to the decoding apparatus.
변환부(115)는 변환 블록 단위로 레지듀얼 블록에 대한 변환을 수행하고 변환 계수를 생성한다. The transform unit 115 performs transform on the residual block in units of transform blocks and generates transform coefficients.
변환 블록은 샘플들의 직사각형 블록으로서 동일한 변환이 적용되는 블록이다. 변환 블록은 변환 유닛(TU)일 수 있으며, 쿼드 트리(quad tree) 구조를 가질 수 있다. The transform block is a rectangular block of samples to which the same transform is applied. The transform block can be a transform unit (TU) and can have a quad tree structure.
변환부(115)는 레지듀얼 블록에 적용된 예측 모드와 블록의 크기에 따라서 변환을 수행할 수 있다. The transformer 115 may perform the transformation according to the prediction mode applied to the residual block and the size of the block.
예컨대, 레지듀얼 블록에 인트라 예측이 적용되었고 블록이 4x4의 레지듀얼 배열이라면, 레지듀얼 블록을 DST(Discrete Sine Transform)를 이용하여 변환하고, 그 외의 경우라면 레지듀얼 블록을 DCT(Discrete Cosine Transform)를 이용하여 변환할 수 있다. For example, if intra prediction is applied to a residual block and the block is a 4x4 residual array, the residual block is transformed using a discrete sine transform (DST), otherwise the residual block is transformed into a discrete cosine transform (DCT). Can be converted using.
변환부(115)는 변환에 의해 변환 계수들의 변환 블록을 생성할 수 있다. The transform unit 115 may generate a transform block of transform coefficients by the transform.
양자화부(120)는 변환부(115)에서 변환된 레지듀얼 값들, 즉 변환 계수들을 양자화하여 양자화된 변환 계수를 생성할 수 있다. 양자화부(120)에서 산출된 값은 역양자화부(135)와 재정렬부(125)에 제공된다. The quantization unit 120 may generate quantized transform coefficients by quantizing the residual values transformed by the transform unit 115, that is, the transform coefficients. The value calculated by the quantization unit 120 is provided to the inverse quantization unit 135 and the reordering unit 125.
재정렬부(125)는 양자화부(120)로부터 제공된 양자화된 변환 계수를 재정렬한다. 양자화된 변환 계수를 재정렬함으로써 엔트로피 인코딩부(130)에서의 인코딩 효율을 높일 수 있다. The reordering unit 125 rearranges the quantized transform coefficients provided from the quantization unit 120. By rearranging the quantized transform coefficients, the encoding efficiency of the entropy encoding unit 130 may be increased.
재정렬부(125)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원 블록 형태의 양자화된 변환 계수들을 1차원의 벡터 형태로 재정렬할 수 있다. 재정렬부(125)에서는 양자화부에서 전송된 계수들의 확률적인 통계를 기반으로 계수 스캔닝의 순서를 변경함으로써 엔트로피 인코딩부(130)에서의 엔트로피 인코딩 효율을 높일 수도 있다.The reordering unit 125 may rearrange the quantized transform coefficients in the form of a 2D block into a 1D vector form through a coefficient scanning method. The reordering unit 125 may increase the entropy encoding efficiency of the entropy encoding unit 130 by changing the order of coefficient scanning based on probabilistic statistics of coefficients transmitted from the quantization unit.
엔트로피 인코딩부(130)는 재정렬부(125)에 의해 재정렬된 양자화된 변환 계수들에 대한 엔트로피 인코딩을 수행할 수 있다. 엔트로피 인코딩에는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding) 등과 같은 인코딩 방법을 사용할 수 있다. 엔트로피 인코딩부(130)는 재정렬부(125) 및 예측부(110)로부터 전달받은 CU의 양자화된 변환 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, PU 정보 및 전송 단위 정보, 움직임 벡터 정보, 참조 픽처 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 인코딩할 수 있다. The entropy encoding unit 130 may perform entropy encoding on the quantized transform coefficients rearranged by the reordering unit 125. Entropy encoding may include, for example, encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC). The entropy encoding unit 130 may include quantized transform coefficient information, block type information, prediction mode information, partition unit information, PU information, transmission unit information, and motion vector of the CUs received from the reordering unit 125 and the prediction unit 110. Various information such as information, reference picture information, interpolation information of a block, and filtering information may be encoded.
또한, 엔트로피 인코딩부(130)는 필요한 경우에, 전송하는 파라미터 셋(parameter set) 또는 신택스에 일정한 변경을 가할 수도 있다. In addition, if necessary, the entropy encoding unit 130 may apply a constant change to a parameter set or syntax to be transmitted.
역양자화부(135)는 양자화부(120)에서 양자화된 값(양자화된 변환 계수)들을 역양자화하고, 역변환부(140)는 역양자화부(135)에서 역양자화된 값들을 역변환한다. The inverse quantizer 135 inversely quantizes the quantized values (quantized transform coefficients) in the quantizer 120, and the inverse transformer 140 inversely transforms the inverse quantized values in the inverse quantizer 135.
역양자화부(135) 및 역변환부(140)에서 생성된 레지듀얼 값과 예측부(110)에서 예측된 예측 블록이 합쳐져 복원 블록(Reconstructed Block)이 생성될 수 있다. The reconstructed block may be generated by combining the residual values generated by the inverse quantizer 135 and the inverse transform unit 140 and the prediction blocks predicted by the prediction unit 110.
도 1에서는 가산기를 통해서, 레지듀얼 블록과 예측 블록이 합쳐져 복원 블록이 생성되는 것으로 설명하고 있다. 이때, 가산기를 복원 블록을 생성하는 별도의 유닛(복원 블록 생성부)로 볼 수도 있다. In FIG. 1, it is described that a reconstructed block is generated by adding a residual block and a prediction block through an adder. In this case, the adder may be viewed as a separate unit (restore block generation unit) for generating a reconstruction block.
필터부(145)는 디블록킹 필터, ALF(Adaptive Loop Filter), SAO(Sample Adaptive Offset)를 복원된 픽처에 적용할 수 있다. The filter unit 145 may apply a deblocking filter, an adaptive loop filter (ALF), and a sample adaptive offset (SAO) to the reconstructed picture.
디블록킹 필터는 복원된 픽처에서 블록 간의 경계에 생긴 왜곡을 제거할 수 있다. ALF(Adaptive Loop Filter)는 디블록킹 필터를 통해 블록이 필터링된 후 복원된 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. ALF는 고효율을 적용하는 경우에만 수행될 수도 있다. SAO는 디블록킹 필터가 적용된 레지듀얼 블록에 대하여, 픽셀 단위로 원본 영상과의 오프셋 차이를 복원하며, 밴드 오프셋(Band Offset), 에지 오프셋(Edge Offset) 등의 형태로 적용된다. The deblocking filter may remove distortion generated at the boundary between blocks in the reconstructed picture. The adaptive loop filter (ALF) may perform filtering based on a value obtained by comparing the reconstructed image with the original image after the block is filtered through the deblocking filter. ALF may be performed only when high efficiency is applied. The SAO restores the offset difference from the original image on a pixel-by-pixel basis to the residual block to which the deblocking filter is applied, and is applied in the form of a band offset and an edge offset.
한편, 인터 예측에 사용되는 복원 블록에 대해서 필터부(145)는 필터링을 적용하지 않을 수도 있다. Meanwhile, the filter unit 145 may not apply filtering to the reconstructed block used for inter prediction.
메모리(150)는 필터부(145)를 통해 산출된 복원 블록 또는 픽처를 저장할 수 있다. 메모리(150)에 저장된 복원 블록 또는 픽처는 인터 예측을 수행하는 예측부(110)에 제공될 수 있다. The memory 150 may store the reconstructed block or the picture calculated by the filter unit 145. The reconstructed block or picture stored in the memory 150 may be provided to the predictor 110 that performs inter prediction.
도 2는 본 발명의 일 실시예에 따른 영상 디코딩 장치를 개략적으로 나타낸 블록도이다. 도 2를 참조하면, 영상 디코딩 장치(200)는 엔트로피 디코딩부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230), 필터부(235) 메모리(240)를 포함할 수 있다. 2 is a block diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention. Referring to FIG. 2, the image decoding apparatus 200 may include an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, and a filter unit 235. Memory 240 may be included.
영상 인코딩 장치에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 인코딩 장치에서 영상 정보가 처리된 절차에 따라서 디코딩될 수 있다.When an image bitstream is input in the image encoding apparatus, the input bitstream may be decoded according to a procedure in which image information is processed in the image encoding apparatus.
예컨대, 영상 인코딩 장치에서 엔트로피 인코딩을 수행하기 위해 CAVLC 등의 가변 길이 부호화(Variable Length Coding: VLC, 이하 ‘VLC’ 라 함)가 사용된 경우에, 엔트로피 디코딩부(210)도 인코딩 장치에서 사용한 VLC 테이블과 동일한 VLC 테이블로 구현하여 엔트로피 디코딩을 수행할 수 있다. 또한, 영상 인코딩 장치에서 엔트로피 인코딩을 수행하기 위해 CABAC을 이용한 경우에, 엔트로피 디코딩부(210)는 이에 대응하여 CABAC을 이용한 엔트로피 디코딩을 수행할 수 있다.For example, when variable length coding such as CAVLC (VLC) is used to perform entropy encoding in the image encoding apparatus, the entropy decoding unit 210 also uses the VLC used in the encoding apparatus. Entropy decoding may be performed by implementing the same VLC table as the table. In addition, when CABAC is used to perform entropy encoding in the image encoding apparatus, the entropy decoding unit 210 may perform entropy decoding using CABAC correspondingly.
엔트로피 디코딩부(210)에서 디코딩된 정보 중 예측 블록을 생성하기 위한 정보는 예측부(230)로 제공되고, 엔트로피 디코딩부(210)에서 엔트로피 디코딩이 수행된 레지듀얼 값, 즉 양자화된 변환 계수는 재정렬부(215)로 입력될 수 있다. Information for generating the prediction block among the information decoded by the entropy decoding unit 210 is provided to the predictor 230, and a residual value where entropy decoding is performed by the entropy decoding unit 210, that is, a quantized transform coefficient It may be input to the reordering unit 215.
재정렬부(215)는 엔트로피 디코딩부(210)에서 엔트로피 디코딩된 비트스트림의 정보, 즉 양자화된 변환 계수를 인코딩 장치에서 재정렬한 방법을 기초로 재정렬할 수 있다. The reordering unit 215 may reorder the information of the bitstream entropy decoded by the entropy decoding unit 210, that is, the quantized transform coefficients, based on the reordering method in the encoding apparatus.
재정렬부(215)는 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)는 현재 블록(변환 블록)에 적용된 예측 모드와 변환 블록의 크기를 기반으로 계수에 대한 스캐닝을 수행하여 2 차원 블록 형태의 계수(양자화된 변환 계수) 배열을 생성할 수 있다. The reordering unit 215 may reorder the coefficients expressed in the form of a one-dimensional vector by restoring the coefficients in the form of a two-dimensional block. The reordering unit 215 may generate an array of coefficients (quantized transform coefficients) in the form of a 2D block by scanning coefficients based on the prediction mode applied to the current block (transform block) and the size of the transform block.
역양자화부(220)는 인코딩 장치에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoding apparatus and the coefficient values of the rearranged block.
역변환부(225)는 영상 인코딩 장치에서 수행된 양자화 결과에 대해, 인코딩 장치의 변환부가 수행한 DCT 및 DST에 대해 역DCT 및/또는 역DST를 수행할 수 있다. 역변환은 인코딩 장치에서 결정된 전송 단위 또는 영상의 분할 단위를 기초로 수행될 수 있다. 인코딩 장치의 변환부에서 DCT 및/또는 DST는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 선택적으로 수행될 수 있고, 디코딩 장치의 역변환부(225)는 인코딩 장치의 변환부에서 수행된 변환 정보를 기초로 역변환을 수행할 수 있다. The inverse transform unit 225 may perform inverse DCT and / or inverse DST on the DCT and the DST performed by the transform unit of the encoding apparatus with respect to the quantization result performed by the image encoding apparatus. The inverse transformation may be performed based on a transmission unit determined by the encoding apparatus or a division unit of an image. The DCT and / or DST in the encoding unit of the encoding apparatus may be selectively performed according to a plurality of pieces of information, such as a prediction method, a size and a prediction direction of the current block, and the inverse transform unit 225 of the decoding apparatus is configured in the transformation unit of the encoding apparatus. Inverse transformation may be performed based on the performed transformation information.
예측부(230)는 엔트로피 디코딩부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(240)에서 제공된 이전에 디코딩된 블록 및/또는 픽처 정보를 기초로 예측 블록을 생성할 수 있다. The prediction unit 230 may generate the prediction block based on the prediction block generation related information provided by the entropy decoding unit 210 and the previously decoded block and / or picture information provided by the memory 240.
현재 PU에 대한 예측 모드가 인트라 예측(intra prediction) 모드인 경우에, 현재 픽처 내의 픽셀 정보를 기초로 예측 블록을 생성하는 인트라 예측을 수행할 수 있다.When the prediction mode for the current PU is an intra prediction mode, intra prediction for generating a prediction block based on pixel information in the current picture may be performed.
현재 PU에 대한 예측 모드가 인터 예측(inter prediction) 모드인 경우에, 현재 픽처의 이전 픽처 또는 이후 픽처 중 적어도 하나의 픽처에 포함된 정보를 기초로 현재 PU에 대한 인터 예측을 수행할 수 있다. 이때, 영상 인코딩 장치에서 제공된 현재 PU의 인터 예측에 필요한 움직임 정보, 예컨대 움직임 벡터, 참조 픽처 인덱스 등에 관한 정보는 인코딩 장치로부터 수신한 스킵 플래그, 머지 플래그 등을 확인하고 이에 대응하여 유도될 수 있다. When the prediction mode for the current PU is an inter prediction mode, inter prediction on the current PU may be performed based on information included in at least one of a previous picture or a subsequent picture of the current picture. In this case, motion information required for inter prediction of the current PU provided by the image encoding apparatus, for example, a motion vector, a reference picture index, and the like, may be derived by checking a skip flag, a merge flag, and the like received from the encoding apparatus.
복원 블록은 예측부(230)에서 생성된 예측 블록과 역변환부(225)에서 제공된 레지듀얼 블록을 이용해 생성될 수 있다. 도 2에서는 가산기에서 예측 블록과 레지듀얼 블록이 합쳐져 복원 블록이 생성되는 것으로 설명하고 있다. 이때, 가산기를 복원 블록을 생성하는 별도의 유닛(복원 블록 생성부)로 볼 수 있다. The reconstruction block may be generated using the prediction block generated by the predictor 230 and the residual block provided by the inverse transform unit 225. In FIG. 2, it is described that the reconstructed block is generated by combining the prediction block and the residual block in the adder. In this case, the adder may be viewed as a separate unit (restore block generation unit) for generating a reconstruction block.
스킵 모드가 적용되는 경우에는 레지듀얼이 전송되지 않으며 예측 블록을 복원 블록으로 할 수 있다.When the skip mode is applied, the residual is not transmitted and the prediction block may be a reconstruction block.
복원된 블록 및/또는 픽처는 필터부(235)로 제공될 수 있다. 필터부(235)는 복원된 블록 및/또는 픽처에 디블록킹 필터링, SAO(Sample Adaptive Offset) 및/또는 ALF 등을 적용할 수 있다. The reconstructed block and / or picture may be provided to the filter unit 235. The filter unit 235 may apply deblocking filtering, sample adaptive offset (SAO), and / or ALF to the reconstructed block and / or picture.
메모리(240)는 복원된 픽처 또는 블록을 저장하여 참조 픽처 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽처를 출력부로 제공할 수 있다.The memory 240 may store the reconstructed picture or block to use as a reference picture or reference block and provide the reconstructed picture to the output unit.
한편, 상술한 바와 같이, 인코딩 장치는 쿼드 트리 구조(structure)를 가지는 변환 블록 단위로 변환을 수행한다. 변환 대상 블록에 적용된 예측 모드와 변환 블록의 크기를 기반으로 어떤 변환이 적용될 것인지가 결정될 수 있다. 예컨대, 현재 블록(변환 블록)에 적용된 예측 모드가 인트라 예측 모드인지 인터 예측 모드인지 그리고 현재 블록(변환 블록)의 사이즈가 얼마인지에 따라서 적용하는 변환 방식을 달리할 수 있다. Meanwhile, as described above, the encoding apparatus performs transformation in units of transform blocks having a quad tree structure. Which transform is to be applied based on the prediction mode applied to the transform target block and the size of the transform block. For example, a transformation scheme applied to the current block (transform block) may be different depending on whether the prediction mode applied to the current block (transform block) is an intra prediction mode or an inter prediction mode, and the size of the current block (transform block).
인코딩 장치는 2차원의 양자화된 정보(예컨대, 2 차원의 양자화된 변환 계수 배열)를 스캐닝하여 1차원의 양자화된 변환 계수 배열로 재정렬할 수 있다. 인코딩 장치는 1차원의 양자화된 변환 계수 배열을 엔트로피 인코딩하여 디코딩 장치로 전송할 수 있다. The encoding apparatus may scan two-dimensional quantized information (eg, two-dimensional quantized transform coefficient array) and rearrange the two-dimensional quantized transform coefficient array. The encoding device may entropy encode the one-dimensional quantized transform coefficient array and transmit the entropy encoding to the decoding device.
디코딩 장치는 인코딩 장치로부터 수신한 정보를 엔트로피 디코딩하여 1차원의 양자화된 변환 계수 배열을 생성할 수 있다. 디코딩 장치는 1차원의 양자화된 변환 계수 배열을 스캐닝하여 2차원의 양자화된 변환 계수 배열로 재정렬할 수 있다. 디코딩 장치는 2차원의 양자화된 변환 계수 배열을 역양자화하여 변환 계수 블록을 생성할 수 있다.The decoding apparatus may entropy decode the information received from the encoding apparatus to generate a one-dimensional quantized transform coefficient array. The decoding apparatus may scan the one-dimensional quantized transform coefficient array and rearrange the two-dimensional quantized transform coefficient array. The decoding apparatus may inversely quantize the two-dimensional quantized transform coefficient array to generate a transform coefficient block.
인코딩 장치에서 수행되는 재정렬의 경우에는, 양자화된 변환 계수의 스캐닝에 의해 도 1에 도시된 바와 같이 처리 대상 블록(예를 들어 변환 블록)의 샘플(픽셀) 위치에 대응하여 배열된 양자화된 계수들의 2차원 배열이 1차원 배렬로 재정렬될 수 있다. In the case of the reordering performed in the encoding apparatus, by scanning the quantized transform coefficients, the quantized coefficients arranged in correspondence with the sample (pixel) position of the block to be processed (for example, the transform block) as shown in FIG. Two-dimensional arrays can be rearranged into one-dimensional arrays.
디코딩 장치에서 수행되는 재정렬의 경우에는, 도 2에 도시된 바와 같이 1차원의 양자화된 변환 계수들이 처리 대상 블록(예를 들어 변환 블록)의 샘플(픽셀) 위치에 대응하는 2차원 배열로 재정렬될 수 있다. In the case of reordering performed in the decoding apparatus, as illustrated in FIG. 2, one-dimensional quantized transform coefficients may be rearranged into a two-dimensional array corresponding to a sample (pixel) position of a block to be processed (for example, a transform block). Can be.
스캐닝은 변환 블록의 사이즈, 스캔 순서, 스캔 시작 위치에 의해 결정될 수 있다. The scanning may be determined by the size of the transform block, the scan order, and the scan start position.
예컨대, 동일한 변환이 수행되는 샘플들의 블록인 변환 블록이 정방형인 경우에, (1) 변환 블록에 적용된 예측 모드가 인트라 예측 모드이고 변환 블록의 크기가 4x4이거나 (2) 변환 블록에 적용된 예측 모드가 인트라 예측 모드이고 변환 블록의 크기가 8x8이며 변환 블록이 루마 샘플들에 대한 변환 블록이면, 인트라 예측 모드가 6 이상 14이하이면 스캔 순서는 수직 스캔 순서(vertical scan order)이고, 인트라 예측 모드가 22 이상 30 이하이면 스캔 순서는 수평 스캔 순서(horizonatal scan order)일 수 있다. 이때, 상기 경우들이 아니면 스캔 순서는 우상향 대각 스캔 순서(up-right diagonal scan order)일 수 있다.For example, when a transform block, which is a block of samples on which the same transform is performed, is square, (1) the prediction mode applied to the transform block is an intra prediction mode and the size of the transform block is 4x4, or (2) the prediction mode applied to the transform block is If the intra prediction mode is 8x8 and the transform block is a transform block for luma samples, if the intra prediction mode is 6 or more and 14 or less, the scan order is a vertical scan order and the intra prediction mode is 22 If 30 or more, the scan order may be a horizontal scan order. In this case, the scan order may be an up-right diagonal scan order.
도 3은 인트라 예측 모드를 설명하는 도면이다. 도시된 바와 같이, 6 이상 14 이하의 인트라 예측 모드는 수평 방향의 예측 모드이며, 22 이상 30 이하의 인트라 예측 모드는 수직 방향의 예측 모드이다. 3 is a diagram illustrating an intra prediction mode. As shown, the intra prediction mode of 6 to 14 is a prediction mode in the horizontal direction, and the intra prediction mode of 22 to 30 is a prediction mode in the vertical direction.
따라서, 앞서의 예에서는 (1) 변환 블록이 정방형이며 변환 블록에 적용된 예측 모드가 인트라 예측 모드인 경우에 (i) 변환 블록의 크기가 4x4 이거나 (ii) 변환 블록의 크기가 8x8이며 변환 블록이 루마 샘플에 대한 것일 때, 인트라 예측 모드가 수평 방향의 예측 모드이면 수직 스캔 순서가 적용되고, 인트라 예측 모드가 수직 방향의 예측 모드이면 수평 방향의 스캔 순서가 적용된다. (2) 그 외의 경우에는 우상향 대각 스캔 순서가 적용된다. Therefore, in the above example, when (1) the transform block is square and the prediction mode applied to the transform block is the intra prediction mode, (i) the transform block is 4x4 or (ii) the transform block is 8x8 and the transform block is When the luma sample is applied, the vertical scan order is applied when the intra prediction mode is the horizontal prediction mode, and the horizontal scan order is applied when the intra prediction mode is the vertical prediction mode. (2) Otherwise, the right upward diagonal scan order is applied.
수직 스캔 순서가 적용되면, 인코딩 장치에서는 변환 블록 내 양자화된 변환 계수를 수직 방향으로 스캔한다. When the vertical scan order is applied, the encoding apparatus scans the quantized transform coefficients in the transform block in the vertical direction.
다시 말하면, 수직 스캔 순서의 경우에 인코딩 장치는 스캔 대상 블록(예컨대 변환 블록)의 최상측 행에 위치하는 양자화된 변환 계수부터 동일한 열을 따라 아래로 양자화된 변환 계수들을 스캔할 수 있다. 이때, 스캔은 스캔 대상 블록의 가장 좌측 열부터 시작해서 순서대로 우측 열들에 대하여 진행될 수 있다. 또한 스캔은 스캔 대상 블록의 가장 우측 열부터 시작해서 순서대로 좌측 열들에 대하여 진행될 수도 있다. In other words, in the case of the vertical scan order, the encoding apparatus may scan the quantized transform coefficients along the same column from the quantized transform coefficients located in the top row of the scan target block (eg, the transform block). In this case, the scan may be performed on the right columns in order starting from the leftmost column of the scan target block. Also, the scan may be performed on the left columns in order starting from the rightmost column of the scan target block.
2 차원 배열의 스캔 대상 블록(예컨대 변환 블록)에서 스캔된 양자화된 변환 계수들은 스캔된 순서에 따라서 1차원의 양자화된 변환 계수 배열로 재정렬될 수 있다. The quantized transform coefficients scanned in the two-dimensional array scan target block (eg, the transform block) may be rearranged into one-dimensional quantized transform coefficient arrays according to the scanned order.
수직 스캔 순서가 적용되면, 디코딩 장치는 양자화된 변환 계수를 스캔하여 변환 블록 내에서 수직 방향으로 재정렬할 수 있다.When the vertical scan order is applied, the decoding apparatus may scan the quantized transform coefficients and rearrange them in the vertical direction in the transform block.
다시 말하면, 디코딩 장치는 1차원의 변환 계수를 순서대로 스캔하여 2차원 배열로 수직 스캔 순서에 따라서 재배치할 수 있다. 이를 통해 양자화된 변환 계수들로 구성된 변환 블록이 생성될 수 있다. In other words, the decoding apparatus scans one-dimensional transform coefficients in order and rearranges them in a two-dimensional array in a vertical scan order. Through this, a transform block composed of quantized transform coefficients may be generated.
수직 스캔 순서에 따라서, 2차원 배열(변환 블록)의 최상측 행에서부터 동일한 열을 따라서 아래로 양자화된 변환 계수가 배치될 수 있다. 재배치는 인코딩 장치에서 수행된 순서에 따라서 2차원 배열의 가장 좌측 열부터 시작하여 순서대로 우측 열들에 대하여 진행될 수도 있고, 가장 우측 열부터 시작하여 순서대로 좌측 열들에 대하여 진행될 수도 있다. In accordance with the vertical scan order, quantized transform coefficients may be placed down along the same column from the top row of the two-dimensional array (transform block). The relocation may proceed for the right columns in order starting from the leftmost column of the two-dimensional array according to the order performed in the encoding apparatus, or may proceed for the left columns in order starting from the rightmost column.
수평 스캔 오더가 적용되면, 인코딩 장치에서는 변환 블록 내 양자화된 변환 계수를 수평 방향으로 스캔한다. When the horizontal scan order is applied, the encoding apparatus scans the quantized transform coefficients in the transform block in the horizontal direction.
다시 말하면, 수평 스캔 순서의 경우에 인코딩 장치는 스캔 대상 블록(예컨대 변환 블록)의 가장 좌측 열에 위치하는 양자화된 변환 계수부터 동일한 행을 따라 우측으로 양자화된 변환 계수들을 스캔할 수 있다. 이때, 스캔은 스캔 대상 블록의 가장 상측 행부터 시작해서 순서대로 하측 행들에 대하여 진행될 수 있다. 또한 스캔은 스캔 대상 블록의 가장 하측 행부터 시작해서 순서대로 상측 행들에 대하여 진행될 수도 있다. In other words, in the case of a horizontal scan order, the encoding apparatus may scan the quantized transform coefficients from the quantized transform coefficients located in the leftmost column of the scan target block (eg, the transform block) to the right along the same row. In this case, the scan may be performed on the lower rows in order starting from the uppermost row of the scan target block. The scan may also be performed on the upper rows in order starting from the lowest row of the scan target block.
2 차원 배열의 스캔 대상 블록(예컨대 변환 블록)에서 스캔된 양자화된 변환 계수들은 스캔된 순서에 따라서 1차원의 양자화된 변환 계수 배열로 재정렬될 수 있다. The quantized transform coefficients scanned in the two-dimensional array scan target block (eg, the transform block) may be rearranged into one-dimensional quantized transform coefficient arrays according to the scanned order.
수평 스캔 순서가 적용되면, 디코딩 장치는 양자화된 변환 계수를 스캔하여 변환 블록 내에서 수평 방향으로 재정렬할 수 있다.When the horizontal scan order is applied, the decoding apparatus may scan the quantized transform coefficients and rearrange them in the horizontal direction in the transform block.
다시 말하면, 디코딩 장치는 1차원의 변환 계수를 순서대로 스캔하여 2차원 배열로 수평 스캔 순서에 따라서 재배치할 수 있다. 이를 통해 양자화된 변환 계수들로 구성된 변환 블록이 생성될 수 있다. In other words, the decoding apparatus scans one-dimensional transform coefficients in order and rearranges them in a two-dimensional array in a horizontal scan order. Through this, a transform block composed of quantized transform coefficients may be generated.
수평 스캔 순서에 따라서, 2차원 배열(변환 블록)의 가장 좌측 열에서부터 동일한 행을 따라서 우측으로 양자화된 변환 계수가 배치될 수 있다. 재배치는 인코딩 장치에서 수행된 순서에 따라서 2차원 배열의 가장 상측 행부터 시작하여 순서대로 하측 행들에 대하여 진행될 수도 있고, 가장 하측 행부터 시작하여 순서대로 상측 행들에 대하여 진행될 수도 있다.In accordance with the horizontal scanning order, transform coefficients quantized from the leftmost column of the two-dimensional array (transform block) to the right along the same row may be arranged. The relocation may proceed for the lower rows in order starting from the uppermost row of the two-dimensional array according to the order performed in the encoding apparatus, or may proceed for the upper rows in order starting from the lowest row.
우상향 대각 스캔 순서가 적용되면, 인코딩 장치에서는 변환 블록 내 양자화된 변환 계수를 우상향 대각 방향으로 스캔할 수 있다. If a right-up diagonal scan order is applied, the encoding apparatus may scan the quantized transform coefficients in the transform block in the right-up diagonal direction.
다시 말하면, 우상향 대각 스캔 순서의 경우에 인코딩 장치는 스캔 대상 블록(예컨대 변환 블록) 내 양자화된 변환 계수들의 대각 배열에 대하여 가장 좌하측의 양자화된 변환 계수부터 시작하여 가장 우상측의 양자화된 변환 계수까지 스캔할 수 있다. 대각 배열의 스캔은 스캔 대상 블록 내 좌상측 대각 배열에서 시작하여 순서대로 우하측으로 진행될 수도 있고, 스캔 대상 블록 내 우하측 대각 배열에서 시작하여 순서대로 좌상측으로 진행될 수도 있다. In other words, in the case of a right-up diagonal scan order, the encoding apparatus starts with the leftmost quantized transform coefficient with respect to the diagonal arrangement of the quantized transform coefficients in the block to be scanned (for example, the transform block) and the right-most quantized transform coefficient. You can scan up to. The scanning of the diagonal array may start in the upper left diagonal array in the scan target block and proceed to the lower right side in order, or may start in the right lower diagonal array in the scan target block and proceed to the upper left side in order.
2 차원 배열의 스캔 대상 블록(예컨대 변환 블록)에서 스캔된 양자화된 변환 계수들은 스캔된 순서에 따라서 1차원의 양자화된 변환 계수 배열로 재정렬될 수 있다. The quantized transform coefficients scanned in the two-dimensional array scan target block (eg, the transform block) may be rearranged into one-dimensional quantized transform coefficient arrays according to the scanned order.
우상향 대각 스캔 순서가 적용되면, 디코딩 장치는 양자화된 변환 계수를 스캔하여 변환 블록 내에서 우상향 대각 방향으로 재정렬할 수 있다.When a right upward diagonal scan order is applied, the decoding apparatus may scan the quantized transform coefficients and rearrange them in the right upward diagonal direction in the transform block.
다시 말하면, 디코딩 장치는 1차원의 변환 계수를 순서대로 스캔하여 2차원 배열로 우상향 대각 스캔 순서에 따라서 재배치할 수 있다. 이를 통해 양자화된 변환 계수들로 구성된 변환 블록이 생성될 수 있다. In other words, the decoding apparatus scans one-dimensional transform coefficients in order and rearranges them in a two-dimensional array in a right-up diagonal scan order. Through this, a transform block composed of quantized transform coefficients may be generated.
우상향 대각 스캔 순서에 따라서, 2차원 배열(변환 블록)의 대각 배열에서 좌하측으로부터 동일한 대각 배열을 따라서 우상측으로 양자화된 변환 계수가 재배치될 수 있다. 재배치는 인코딩 장치에서 수행된 순서에 따라서 2차원 배열의 좌상측 대각 배열부터 시작해서 순서대로 우하측 대각 배열들에 대하여 진행될 수도 있고, 우하측 대각 배열부터 시작해서 순서대로 좌상측 대각 배열들에 대하여 진행될 수도 있다.According to the right upward diagonal scan order, the quantized transform coefficients may be rearranged from the lower left side to the upper right side in the diagonal array of the two-dimensional array (transform block). Relocation may proceed in order for the lower right diagonal arrays starting with the upper left diagonal array of the two-dimensional array in the order performed in the encoding apparatus, or for the upper left diagonal arrays in order starting with the lower right diagonal array. It may proceed.
도 4는 각 스캔 순서에 따른 스캔 방법을 개략적으로 설명하는 도면이다.4 is a diagram schematically illustrating a scanning method according to each scanning order.
도 4(a)는 n x m (n, m은 정수) 크기의 정방형 변환 블록 내에 배치된 양자화된 변환 계수들의 2 차원 배열을 개략적으로 나타낸 것이다. 4 (a) schematically illustrates a two-dimensional array of quantized transform coefficients arranged in a square transform block of size n × m (n, m is an integer).
도 4(a)를 참조하면, 각 화소 샘플 위치에 대응하여 양자화된 변환 계수 C가 배열되어 있다. 예컨대, 변환 블록 내 a 번째 행 및 b 번째 열의 위치에 변환 계수 Ca,b가 배열되어 있다. Referring to Fig. 4A, quantized transform coefficients C are arranged corresponding to the pixel sample positions. For example, the transform coefficients C a, b are arranged at positions of the a-th row and the b-th column in the transform block.
도 4(b)는 수평 스캔 순서가 적용된 경우에, 도 4(a)에 예시된 2 차원의 양자화된 변환 계수 배열에 대응하는 1차원 배열의 예를 나타낸 것이다. 4 (b) shows an example of a one-dimensional array corresponding to the two-dimensional quantized transform coefficient array illustrated in FIG. 4 (a) when the horizontal scan order is applied.
도 4(a) 및 도 4(b)를 참조하면, 수평 스캔 순서가 적용되는 경우에, 인코딩 장치는 n x m 크기의 변환 블록 내 첫 번째 행에서 C0,0→C0,1→…→C0,n-1의 순서로 양자화된 변환 계수를 스캔하고, 다음 행에서 C1,0→C1,1→…→C1,n-1의 순서로 양자화된 변환 계수를 스캔할 수 있다. 행마다 평행으로 스캔을 진행하고, 하나의 행에서 수평 스캔이 끝나면 다음 행에서 수평 스캔을 진행할 수 있다. 4 (a) and 4 (b), when the horizontal scan order is applied, the encoding apparatus determines that C 0,0 → C 0,1 →... In the first row in the nxm-sized transform block. → scan the quantized transform coefficients in the order of C 0, n−1 , and in the next line, C 1,0 → C 1,1 →. → The quantized transform coefficients can be scanned in the order of C1 , n-1 . Scanning is performed in parallel in each row, and when the horizontal scan is completed in one row, the horizontal scan can be performed in the next row.
수평 스캔 순서가 적용되는 경우에, 디코딩 장치는 n x m 길이의 양자화된 변환 계수 배열에서 순서대로 읽어낸 양자화된 변환 계수를 수평 스캔 순서에 따라서 n x m 크기의 변환 블록 내 2 차원 배열에 배열할 수 있다. When the horizontal scan order is applied, the decoding apparatus may arrange the quantized transform coefficients read in order from the n × m length quantized transform coefficient array in a two-dimensional array in the transform block of size n × m according to the horizontal scan order.
예컨대, 도 4(b)에서 양자화된 변환 계수 열의 끝에서 앞쪽으로(즉, Cm-1,n-1→C0,0 방향으로) 스캔하는 경우에 디코딩 장치는 수평 스캔 순서에 따라서 도 4(a)의 2차원 배열과 같이 Cm-1,n-1→Cm-1,n-2→…→Cm-1,1→Cm-1,0의 위치에 순서대로 배열하고, Cm-1,0다음에 스캔되는 n 개의 양자화된 변환 계수들은 행을 바꿔(위쪽 행으로 바꿔) 우측부터 순서대로 배열할 수 있다. 계속되는 양자화된 변환 계수의 스캔 및 재정렬에 의해 C0,n-1 → … → C0,2 → C0,1 → C0,0까지 스캔 및 재정렬 되어 n x m 크기의 양자화된 변환 계수들의 2차원 배열(예컨대, 변환 블록)이 생성될 수 있다. For example, Figure 4 (b) towards the front of the end of the column in the transform coefficients quantized in (that is, a C m-1, n-1 → C 0,0 -direction) when scanning in the decoding apparatus 4 depending on the horizontal scan order C m-1, n-1 ? C m-1, n-2 ? → C m-1,1 → C m-1,0 arranged in order, and the n quantized transform coefficients scanned after C m-1,0 are row-turned (upper row) from the right You can arrange them in order. Subsequent scan and reordering of the quantized transform coefficients results in C 0, n−1 ... → C 0,2 → C 0,1 → C 0,0 may be scanned and rearranged to produce a two-dimensional array (eg, a transform block) of nxm-sized quantized transform coefficients.
도 4(b)에서 양자화된 변환 계수 열의 앞에서 끝쪽으로(즉, C0,0 → Cm-1,n-1 방향으로) 스캔하는 경우에 디코딩 장치는 수평 스캔 순서에 따라서 도 4(a)의 2차원 배열과 같이 C0,0 → C0,1 → … → C0,n-1의 위치에 순서대로 배열하고, C0,n-1다음에 스캔되는 n 개의 양자화된 변환 계수들은 행을 바꿔(아래쪽 행으로 바꿔) 좌측부터 순서대로 배열할 수 있다. 계속되는 양자화된 변환 계수의 스캔 및 재정렬에 의해 Cm-1,0 → Cm-1,1 → Cm-1,2 → … → Cm-1,n-1까지 스캔 및 재정렬 되어 n x m 크기의 양자화된 변환 계수들의 2차원 배열(예컨대, 변환 블록)이 생성될 수 있다.In the case of scanning from the front to the end of the quantized transform coefficient column in FIG. 4 (b) (ie, in the direction of C 0,0 → C m-1, n-1 ), the decoding apparatus according to the horizontal scanning order is shown in FIG. 4 (a). C 0,0 → C 0,1 →. → C 0, n of the quantized transform coefficients are arranged in order on the location of the n-1 and scanning the C 0, n-1, and then they can be arranged in order to change the line (change in the bottom row) from the left. C m-1,0- &gt; C m-1,1- &gt; C m-1,2- &gt; → can be scanned and rearranged up to C m-1, n-1 to produce a two-dimensional array (eg, transform block) of nxm quantized transform coefficients.
도 4(c)는 수직 스캔 순서가 적용된 경우에, 도 4(a)에 예시된 2 차원의 양자화된 변환 계수 배열에 대응하는 1차원 배열의 예를 나타낸 것이다. 4 (c) shows an example of a one-dimensional array corresponding to the two-dimensional quantized transform coefficient array illustrated in FIG. 4 (a) when the vertical scan order is applied.
도 4(a) 및 도 4(c)를 참조하면, 수직 스캔 순서가 적용되는 경우에, 인코딩 장치는 n x m 크기의 변환 블록 내 첫 번째 열에서 C0,0 → C1,0 → … → Cm-1,0의 순서로 양자화된 변환 계수를 스캔하고, 다음 열에서 C0,1 → C1,1 → … → Cm-1,1의 순서로 양자화된 변환 계수를 스캔할 수 있다. 열마다 수직으로 스캔을 진행하고, 하나의 열에서 수직 스캔이 끝나면 다음 열에서 수직 스캔을 진행할 수 있다. 4 (a) and 4 (c), when the vertical scan order is applied, the encoding apparatus determines that C 0,0 → C 1,0 →... In the first column in the nxm-sized transform block. → scan the quantized transform coefficients in the order C m-1,0 , and in the next column C 0,1 → C 1,1 →. → the quantized transform coefficients can be scanned in the order of C m-1,1 You can scan vertically from column to column, and after vertical scanning in one column, you can scan vertically in the next column.
수직 스캔 순서가 적용되는 경우에, 디코딩 장치는 n x m 길이의 양자화된 변환 계수 배열에서 순서대로 읽어낸 양자화된 변환 계수를 수직 스캔 순서에 따라서 n x m 크기의 변환 블록 내 2 차원 배열에 배열한다. When the vertical scan order is applied, the decoding apparatus arranges the quantized transform coefficients read in order from the n x m length quantized transform coefficient array in a two-dimensional array in the n x m transform block according to the vertical scan order.
예컨대, 도 4(c)에서 양자화된 변환 계수 열의 끝에서 앞쪽으로(즉, Cm-1,n-1 → C0,0 방향으로) 스캔하는 경우에 디코딩 장치는 수직 스캔 순서에 따라서 도 4(a)의 2차원 배열과 같이 Cm-1,n-1 → Cm-2,n-1 → … → C1,n-1 → C0,n-1의 위치에 순서대로 배열하고, C0,n-1 다음에 스캔되는 m 개의 양자화된 변환 계수들은 열을 바꿔(좌측 열로 바꿔) 아래로부터 순서대로 배열할 수 있다. 계속되는 양자화된 변환 계수의 스캔 및 재정렬에 의해 Cm-1,0 → … → C2,0 → C1,0 → C0,0까지 스캔 및 재정렬 되어 n x m 크기의 양자화된 변환 계수들의 2차원 배열(예컨대, 변환 블록)이 생성될 수 있다. For example, when scanning from the end of the quantized transform coefficient column in FIG. 4 (c) to the front (i.e., in the direction of C m-1, n-1 → C 0,0 ), the decoding apparatus according to the vertical scan order is shown in FIG. 4. As in the two-dimensional array of (a), C m-1, n-1 ? C m-2, n-1 ? → C 1, n-1 → C 0, n-1 arranged in order, and m quantized transform coefficients scanned after C 0, n-1 are ordered from bottom to bottom by swapping columns (left column) You can arrange as you like. C m-1,0 →... → C 2,0 → C 1,0 → C 0,0 can be scanned and rearranged to generate a two-dimensional array (eg, a transform block) of nxm quantized transform coefficients.
도 4(c)에서 양자화된 변환 계수 열의 앞에서 끝쪽으로(즉, C0,0 → Cm-1,n-1 방향으로) 스캔하는 경우에 디코딩 장치는 수직 스캔 순서에 따라서 도 4(a)의 2차원 배열과 같이 C0,0 → C1,0 → C2,0 → … → Cm-1,0의 위치에 순서대로 배열하고, Cm-1,0 다음에 스캔되는 m 개의 양자화된 변환 계수들은 열을 바꿔(우측 열로 바꿔) 위로부터 순서대로 배열할 수 있다. 계속되는 양자화된 변환 계수의 스캔 및 재정렬에 의해 C0,n-1 → C1,n-1 → C2,n-1 → … → Cm-1,n-1까지 스캔 및 재정렬 되어 n x n 크기의 양자화된 변환 계수들의 2차원 배열(예컨대, 변환 블록)이 생성될 수 있다.In the case of scanning toward the front end (ie, in the direction of C 0,0 → C m-1, n-1 ) of the quantized transform coefficient column in FIG. 4 (c), the decoding apparatus according to the vertical scan order is shown in FIG. 4 (a). C 0,0 → C 1,0 → C 2,0 →. the m quantized transform coefficients scanned after C m−1,0 are arranged in order from the top by swapping columns (to the right column). Subsequent scan and reordering of the quantized transform coefficients causes C 0, n-1 → C 1, n-1 → C 2, n-1 →. → can be scanned and rearranged to C m-1, n-1 to produce a two-dimensional array (eg, transform block) of nxn-sized quantized transform coefficients.
도 4(d)는 우상향 대각 스캔 순서가 적용된 경우에, 도 4(a)에 예시된 2 차원의 양자화된 변환 계수 배열에 대응하는 1차원 배열의 예를 나타낸 것이다. 4 (d) shows an example of a one-dimensional array corresponding to the two-dimensional quantized transform coefficient array illustrated in FIG. 4 (a) when a right-up diagonal scan order is applied.
도 4(a) 및 도 4(d)를 참조하면, 우상향 대각 스캔 순서가 적용되는 경우에, 인코딩 장치는 m x n 크기의 변환 블록 내 대각 열 순서에 따라서 첫 번째 대각 열의 양자화된 변환 계수들을 우상향으로 스캔하고, 순서대로 다음 대각 열들의 양자화된 변환 계수들을 우상향으로 스캔한다. 예컨대, 도 4(a)를 참조하면, 변환 블록 내 첫 번째 대각 열에는 양자화된 변환 계수가 C0,0 밖에 없으므로, C0,0을 스캔하고, 다음 대각 열에서 C1,0 → C0,1의 순서로 양자화된 변환 계수를 스캔하며, 이어서 그 다음 대각 열에서 C2,0 → C1,1 → C0,2의 순서로 양자화된 변환 계수를 스캔할 수 있다. 차례대로 대각 열의 양자화된 변환 계수가 스캔되어 마지막 양자화된 변환 계수 Cm-1,n-1이 스캔된다. 4 (a) and 4 (d), when a right-up diagonal scan order is applied, the encoding apparatus performs right upward quantization of the quantized transform coefficients of the first diagonal column according to the diagonal column order in the mxn-sized transform block. Scan and sequentially scan the quantized transform coefficients of the next diagonal columns upwards. For example, referring to FIG. 4 (a), since only the C 0,0 quantized transform coefficient is included in the first diagonal column in the transform block, C 0,0 is scanned, and C 1,0 → C 0 in the next diagonal column. The quantized transform coefficients may be scanned in the order of , 1 and then the quantized transform coefficients may be scanned in the order of C 2,0 → C 1,1 → C 0,2 in the diagonal column. In turn, the quantized transform coefficients of the diagonal column are scanned and the last quantized transform coefficients C m-1, n-1 are scanned.
인코딩 장치는 우상향 대각 스캔 순서에 따라서 양자화된 변환 계수의 스캔을 수행하여 도 4(d)와 같은 1차원의 양자화된 변환 계수 열을 생성한다. 1차원의 양자화된 변환 계수 열은 상술한 우상향 대각 스캔 순서에 따라서 먼저 스캔된 계수를 앞쪽에 위치 시키면, 도시된 바와 같이 (Cm-1,n-1 … C0,2 C1,1 C2,0 C0,1 C1,0 C0,0)의 순서를 가진다. The encoding apparatus scans the quantized transform coefficients according to a right-up diagonal scan order to generate a one-dimensional quantized transform coefficient sequence as shown in FIG. 4 (d). In the one-dimensional quantized transformation coefficient column, if the first scanned coefficient is placed in the forward direction according to the above-described upward diagonal scan order, as shown, (C m-1, n-1 … C 0,2 C 1,1 C) 2,0 C 0,1 C 1,0 C 0,0 ).
우상향 대각 스캔 순서가 적용되는 경우에, 디코딩 장치는 n x m 길이의 양자화된 변환 계수 배열에서 순서대로 읽어낸 양자화된 변환 계수를 우상향 대각 스캔 순서에 따라서 n x m 크기의 변환 블록 내 2 차원 배열에 배열한다. If a right-up diagonal scan order is applied, the decoding apparatus arranges the quantized transform coefficients read in order from the n-by-m length quantized transform coefficient array in a two-dimensional array in the n-by-m sized transform block according to the right-up diagonal scan order.
예컨대, 도 4(d)과 같은 양자화된 변환 계수의 일차원 배열을 양자화된 변환 계수 열의 앞쪽부터 끝쪽으로(즉, C0,0 → Cm-1,n-1 방향으로) 스캔하는 경우에 디코딩 장치는 스캔한 양자화된 변환 계수들을 우상향 대각 스캔 순서에 의해 2차원 배열의 대각 열을 따라 배치할 수 있다. 스캔된 변환 계수들은 2차원 배열의 가장 좌상측에 위치하는 대각 열에 먼저 배치될 수 있으며, 우하측 방향의 대각 열들에 차례대로 배치될 수 있다. 각 대각 열에서는 좌하측부터 우상측으로 양자화된 변환 계수들이 배치될 수 있다. For example, decoding in the case of scanning a one- dimensional array of quantized transform coefficients as shown in FIG. 4 (d) from the front to the end of the quantized transform coefficient column (that is, in the direction of C 0,0 to C m-1, n-1 ). The apparatus may place the scanned quantized transform coefficients along a diagonal column of the two-dimensional array by a right-up diagonal scan order. The scanned transform coefficients may be first placed in diagonal columns located at the top left of the two-dimensional array, and may be sequentially arranged in diagonal columns in the lower right direction. In each diagonal column, quantized transform coefficients may be arranged from the lower left side to the upper right side.
즉, 도 4(a)의 2차원 배열을 참조하면, C0,0 → C1,0 → C0,1 → C2,0 → C1,1 → C0,2 → … → Cm-1,n-2 → Cm-2,n-1 → Cm-1,n-1의 순서대로 배열될 수 있다. That is, referring to the two-dimensional array of FIG. 4 (a), C 0,0 → C 1,0 → C 0,1 → C 2,0 → C 1,1 → C 0,2 →. → C m-1, n-2 → C m-2, n-1 → C m-1, n-1 .
도 4(d)에서 양자화된 변환 계수 열의 뒤쪽부터 앞쪽으로(즉, Cm-1,n-1 → C0,0 방향으로) 스캔하는 경우에 디코딩 장치는 스캔한 양자화된 변환 계수들을 우상향 대각 스캔 순서에 의해 2차원 배열의 대각 열을 따라 배치할 수 있다. 스캔된 변환 계수들은 2차원 배열의 가장 우하측에 위치하는 대각 열에 먼저 배치될 수 있으며, 좌상측 방향의 대각 열들에 차례대로 배치될 수 있다. 각 대각 열에서는 좌하측부터 우상측으로 양자화된 변환 계수들이 배치될 수 있다. In the case of scanning from the rear to the front of the quantized transform coefficient column in FIG. 4 (d) (ie, in the direction of C m-1, n-1 → C 0,0 ), the decoding apparatus diagonally scans the scanned quantized transform coefficients upwards. The scan order can be arranged along the diagonal columns of the two-dimensional array. The scanned transform coefficients may be first placed in the diagonal column located at the bottom right of the two-dimensional array, and may be sequentially disposed in the diagonal columns in the upper left direction. In each diagonal column, quantized transform coefficients may be arranged from the lower left side to the upper right side.
즉, 도 4(a)의 2차원 배열을 참조하면, Cm-1,n-1 → Cm-1,n-2 → Cm-2,n-1 → … → C2,0 → C1, 1 → C0,2 → C1,0→C0,1→C0,0의 순서대로 배열될 수 있다.That is, referring to the two-dimensional array of Fig. 4A, C m-1, n-1 → C m-1, n-2 → C m-2, n-1 →. → C 2,0 → C 1, 1 → C 0,2 → C 1,0 → C 0,1 → C 0,0 .
도 4의 예에서, m=n인 경우는 정방향의 블록(예컨대, 변환 블록) 단위로 변환이 수행되는 경우를 나타내며, n≠m인 경우는 비정방형의 블록(예컨대, 변환 블록) 단위로 변환이 수행되는 경우를 의미한다.In the example of FIG. 4, the case of m = n represents a case in which the transformation is performed in units of forward blocks (eg, transformation blocks), and in case of n ≠ m, the transformation is performed in units of non-square blocks (eg, transformation blocks). It means when this is done.
이때, 도 3과 관련하여 설명한 스캔 순서에 관한 예와 같이, (1) 변환 블록이 정방형이며 변환 블록에 적용된 예측 모드가 인트라 예측 모드인 경우에 (i) 변환 블록의 크기가 4x4 이거나 (ii) 변환 블록의 크기가 8x8이며 변환 블록이 루마 샘플에 대한 것일 때, 인트라 예측 모드가 수평 방향의 예측 모드이면 수직 스캔 순서가 적용되고, 인트라 예측 모드가 수직 방향의 예측 모드이면 수평 방향의 스캔 순서가 적용되며, (2) 그 외의 경우에는 우상향 대각 스캔 순서가 적용된다면, 비정방형 변환 블록의 경우는 ‘그 외의 경우’에 해당되어 우상향 대각 스캔 순서가 적용될 수 있다. In this case, as in the example of the scanning sequence described with reference to FIG. 3, when (1) the transform block is square and the prediction mode applied to the transform block is the intra prediction mode, (i) the size of the transform block is 4x4 or (ii) When the size of the transform block is 8x8 and the transform block is for luma samples, the vertical scan order is applied if the intra prediction mode is the horizontal prediction mode, and if the intra prediction mode is the vertical prediction mode, the horizontal scan order is (2) In other cases, if a right-up diagonal scan order is applied, a non-square transform block corresponds to 'other case' and a right-up diagonal scan order may be applied.
이하, 비정방형 변환(Non-Square Quad-Tree Transform)의 경우에 우상향 대각 스캔 순서를 적용하는 방법을 도면을 참조하여 설명한다. Hereinafter, a method of applying a right-up diagonal scan order in the case of a non-square quad-tree transform will be described with reference to the drawings.
도 5는 2x8 크기의 변환 블록을 단위로 변환이 수행된 경우에 있어서, 양자화된 변환 계수들을 우상향 대각 스캔하는 방법의 일 예를 개략적으로 설명하는 도면이다. 예컨대, 도 5는 도 4의 예에서 n=2, m=8인 경우로서 우상향 대각 스캔 순서가 적용되는 경우를 설명한다.FIG. 5 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed on a 2 × 8 transform block. For example, FIG. 5 illustrates a case in which the right upward diagonal scan order is applied as n = 2 and m = 8 in the example of FIG. 4.
도 5(a)는 인코딩 장치가 변환 블록 내 양자화된 변환 계수를 스캔하여 재정렬한 양자화된 변환 계수의 1 차원 배열(500)을 개략적으로 도시한 것이다. 양자화된 변환 계수의 1 차원 배열(500)에 도시된 숫자는 1 차원 열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. FIG. 5 (a) schematically illustrates a one-dimensional array 500 of quantized transform coefficients that the encoding apparatus scans and reorders the quantized transform coefficients in the transform block. The number shown in the one-dimensional array 500 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
도 5(b)는 디코딩 장치가 양자화된 변환 계수의 1 차원 배열(500)을 스캔하여 재정렬한 양자화된 변한 계수의 2 차원 배열(510)를 나타낸다. 2 차원 배열(510)은 양자화된 변환 계수를 포함하는 변환 블록일 수 있다.FIG. 5B illustrates a two-dimensional array 510 of quantized transformed coefficients by which the decoding apparatus scans the one-dimensional array 500 of quantized transform coefficients. The two-dimensional array 510 may be a transform block that includes quantized transform coefficients.
양자화된 변환 계수들의 2 차원 배열(510)에서 각 숫자들은 2 차원 배열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. 양자화된 변환 계수의 1차원 배열(500)과 2차원 배열(510)에서 동일한 숫자는 동일한 변환 계수를 의미한다.Each number in the two-dimensional array 510 of quantized transform coefficients specifies each quantized transform coefficient corresponding to a position in the two-dimensional array. The same number in the one-dimensional array 500 and the two-dimensional array 510 of quantized transform coefficients means the same transform coefficients.
도 5(a) 및 도 5(b)를 참조하면, 디코딩 장치는 1차원 배열(500) 내 양자화된 변환 계수를 순서대로 스캔하여 2차원 배열로 재정렬할 수 있다. 디코딩 장치는 1차원 배열(500)을 앞쪽에서 뒤쪽으로 (즉, 0의 양자화된 변환 계수부터 시작하여 15의 양자화된 변환 계수쪽으로) 스캔할 수도 있고, 뒤쪽에서 앞쪽으로 (즉, 15의 양자화된 변환 계수부터 시작하여 0의 양자화된 변환 계수쪽으로) 스캔할 수도 있다.Referring to FIGS. 5A and 5B, the decoding apparatus may sequentially scan the quantized transform coefficients in the one-dimensional array 500 and rearrange them into a two-dimensional array. The decoding apparatus may scan the one-dimensional array 500 from front to back (ie, starting with zero quantized transform coefficients and toward 15 quantized transform coefficients), or from back to front (ie, quantized 15). Scans, starting with the transform coefficients, and toward zero quantized transform coefficients.
1차원 배열(500)을 앞쪽에서 뒤쪽으로 스캔하는 경우에, 디코딩 장치는 2x8 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 0의 양자화된 변환 계수를 배치하고, 우하측 방향의 다음 대각 열에 1과 2의 양자화된 변환 계수들을 배치한다. 도시된 바와 같이, 2 차원 배열에서는 좌상측 대각 열(첫 번째 대각 열)부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치된다. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치된다. In the case of scanning the one-dimensional array 500 from the front to the back, the decoding apparatus places zero quantized transform coefficients in the first diagonal column (upper left diagonal column) of the 2x8 array, and the next in the lower right direction. Place quantized transform coefficients of 1 and 2 in diagonal columns. As shown, in a two-dimensional array, the quantized transform coefficients are arranged in the diagonal columns in the order proceeding from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients are arranged along the diagonal column from the lower left side to the upper right side.
1 차원 배열(500)을 뒤쪽에서 앞쪽으로 스캔하는 경우에, 디코딩 장치는 2x8 배열의 마지막 대각 열(우하측 첫 번째 대각 열)에 15의 양자화된 변환 계수를 배치하고, 좌상측 방향의 다음 대각 열에 13과 14의 양자화된 변환 계수들을 배치한다. 도시된 바와 같이, 2 차원 배열에서는 우하측 대각 열(마지막 대각 열)부터 좌상측 대각 열쪽으로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며, 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다.In the case of scanning the one-dimensional array 500 from the back to the front, the decoding device places 15 quantized transform coefficients in the last diagonal column (the lower right first diagonal column) of the 2x8 array, and the next diagonal in the upper left direction. Place 13 and 14 quantized transform coefficients in the column. As shown, in a two-dimensional array, the quantized transform coefficients may be arranged in the diagonal columns in the order proceeding from the lower right diagonal column (the last diagonal column) to the upper left diagonal column, and in each diagonal column, the quantized transform coefficients. These may be arranged along a diagonal row from the lower left side to the upper right side.
도 5에서는 디코딩 장치가 양자화된 변환 계수의 1차원 배열을 스캔하여 2차원 배열(예컨대, 변환 블록)로 재정렬하는 것을 설명하였으나, 동일한 방법으로 인코딩 장치가 양자화된 변환 계수의 2차원 배열(예컨대, 변환 계수)을 스캔하여 1차원 배열로 재정렬할 수도 있다. In FIG. 5, the decoding apparatus scans a one-dimensional array of quantized transform coefficients and rearranges the two-dimensional array (for example, a transform block) to the two-dimensional array (for example, a transform block). Transform coefficients) can be scanned and rearranged into a one-dimensional array.
예컨대, 인코딩 장치는 양자화된 변환 계수의 2차원 배열(510)을 우상향 대각 스캔 순서에 따라서 스캔하여 1차원 배열(500)을 생성할 수 있다. 인코딩 장치는 2 차원 배열(510) 내에서 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 위치하는 0의 양자화된 변환 계수를 스캔하여 1차원 배열의 처음에 배치할 수 있다. 인코딩 장치는 2 차원 배열(510)의 두 번째 대각 열에 위치하는 1의 양자화된 변환 계수와 2의 양자화된 변환 계수를 좌하측부터 우상측의 순서로 스캔하여 1 차원 배열의 두 번째 및 세 번재 위치에 배치할 수 있다. 동일한 방법으로 각 대각 열을 순서대로 스캔하여, 마지막 대각 열(우하측 첫 번째 대각 열)에 위치하는 15의 양자화된 변환 계수를 1차원 배열의 마지막에 배치함으로써 양자화된 변환 계수의 1차원 배열(500)을 생성할 수 있다. For example, the encoding apparatus may generate the one-dimensional array 500 by scanning the two-dimensional array 510 of the quantized transform coefficients in a right-up diagonal scan order. The encoding apparatus may scan the 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 510 and place them at the beginning of the one-dimensional array. The encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 510, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on. In the same way, we scan each diagonal column in order, placing 15 quantized transform coefficients located in the last diagonal column (the right lower diagonal column) at the end of the one-dimensional array, 500).
도 6은 8x2 크기의 변환 블록을 단위로 변환이 수행된 경우에 있어서, 양자화된 변환 계수들을 우상향 대각 스캔하는 방법의 일 예를 개략적으로 설명하는 도면이다. 예컨대, 도 6은 도 4의 예에서 n=8, m=2인 경우로서 우상향 대각 스캔 순서가 적용되는 경우를 설명한다.FIG. 6 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed in units of 8 × 2 transform blocks. For example, FIG. 6 illustrates a case where a right-up diagonal scan order is applied as n = 8 and m = 2 in the example of FIG. 4.
도 6(a)는 인코딩 장치가 변환 블록 내 양자화된 변환 계수를 스캔하여 재정렬한 양자화된 변환 계수의 1 차원 배열(600)을 개략적으로 도시한 것이다. 양자화된 변환 계수의 1 차원 배열(600)에 도시된 숫자는 1 차원 열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. FIG. 6 (a) schematically illustrates a one-dimensional array 600 of quantized transform coefficients which the encoding apparatus scans and rearranges the quantized transform coefficients in the transform block. The number shown in the one-dimensional array 600 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
도 6(b)는 디코딩 장치가 양자화된 변환 계수의 1 차원 배열(600)을 스캔하여 재정렬한 양자화된 변한 계수의 2 차원 배열(610)을 나타낸다. 2 차원 배열(610)은 양자화된 변환 계수를 포함하는 변환 블록일 수 있다.6 (b) shows a two-dimensional array 610 of rearranged quantized transformed coefficients by the decoding apparatus scanning the one-dimensional array 600 of quantized transform coefficients. The two-dimensional array 610 may be a transform block that includes quantized transform coefficients.
양자화된 변환 계수들의 2 차원 배열(610)에서 각 숫자들은 2 차원 배열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. 양자화된 변환 계수의 1차원 배열(600)과 2차원 배열(610)에서 동일한 숫자는 동일한 변환 계수를 의미한다.Each number in the two-dimensional array 610 of quantized transform coefficients specifies each quantized transform coefficients corresponding to a position in the two-dimensional array. The same number in the one-dimensional array 600 and the two-dimensional array 610 of the quantized transform coefficients means the same transform coefficients.
도 6(a) 및 도 6(b)를 참조하면, 1차원 배열(600)을 앞쪽에서 뒤쪽으로 스캔하는 경우에, 디코딩 장치는 8x2 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 0의 양자화된 변환 계수를 배치하고, 우하측 방향의 다음 대각 열에 1과 2의 양자화된 변환 계수들을 배치한다. 도시된 바와 같이, 2 차원 배열에서는 좌상측 대각 열(첫 번째 대각 열)부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치된다. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치된다. 6 (a) and 6 (b), in the case of scanning the one-dimensional array 600 from front to back, the decoding apparatus is connected to the first diagonal column (upper left diagonal column) of the 8x2 array. Place quantized transform coefficients of 0 and place quantized transform coefficients of 1 and 2 in the next diagonal column in the lower right direction. As shown, in a two-dimensional array, the quantized transform coefficients are arranged in the diagonal columns in the order proceeding from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients are arranged along the diagonal column from the lower left side to the upper right side.
1 차원 배열(600)을 뒤쪽에서 앞쪽으로 스캔하는 경우에, 디코딩 장치는 8x2 배열의 마지막 대각 열(우하측 첫 번째 대각 열)에 15의 양자화된 변환 계수를 배치하고, 좌상측 방향의 다음 대각 열에 13과 14의 양자화된 변환 계수들을 배치한다. 도시된 바와 같이, 2 차원 배열에서는 우하측 대각 열(마지막 대각 열)부터 좌상측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며, 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다.In the case of scanning the one-dimensional array 600 from the back to the front, the decoding device places 15 quantized transform coefficients in the last diagonal column (the right lower diagonal column) of the 8x2 array, and the next diagonal in the upper left direction. Place 13 and 14 quantized transform coefficients in the column. As shown, in a two-dimensional array, quantized transform coefficients may be arranged in diagonal columns in the order of progressing from the lower right diagonal column (last diagonal column) to the upper left diagonal column, and in each diagonal column, the quantized transform coefficients may be arranged. It may be arranged along a diagonal row from the lower left side to the upper right side.
한편, 도 6의 예에서, 인코딩 장치는 양자화된 변환 계수의 2차원 배열(610)을 우상향 대각 스캔 순서에 따라서 스캔하여 1차원 배열(600)을 생성할 수 있다. 인코딩 장치는 2 차원 배열(610) 내에서 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 위치하는 0의 양자화된 변환 계수를 스캔하여 1차원 배열의 처음에 배치할 수 있다. 인코딩 장치는 2 차원 배열(610)의 두 번째 대각 열에 위치하는 1의 양자화된 변환 계수와 2의 양자화된 변환 계수를 좌하측부터 우상측의 순서로 스캔하여 1 차원 배열의 두 번째 및 세 번재 위치에 배치할 수 있다. 동일한 방법으로 각 대각 열을 순서대로 스캔하여, 마지막 대각 열에 위치하는 15의 양자화된 변환 계수를 1차원 배열의 마지막에 배치함으로써 양자화된 변환 계수의 1차원 배열(600)을 생성할 수 있다.Meanwhile, in the example of FIG. 6, the encoding apparatus may generate the one-dimensional array 600 by scanning the two-dimensional array 610 of the quantized transform coefficients in a right-up diagonal scan order. The encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 610 at the beginning of the one-dimensional array. The encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 610, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on. In the same manner, each diagonal column may be scanned in order to generate a one-dimensional array 600 of quantized transform coefficients by placing 15 quantized transform coefficients positioned in the last diagonal column at the end of the one-dimensional array.
도 7은 4x16 크기의 변환 블록을 단위로 변환이 수행된 경우에 있어서, 양자화된 변환 계수들을 우상향 대각 스캔하는 방법의 일 예를 개략적으로 설명하는 도면이다. 예컨대, 도 7은 도 4의 예에서 n=4, m=16인 경우로서 우상향 대각 스캔 순서가 적용되는 경우를 설명한다.FIG. 7 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed in units of 4 × 16 transform blocks. For example, FIG. 7 illustrates a case in which the right upward diagonal scan order is applied as n = 4 and m = 16 in the example of FIG. 4.
도 7(a)는 인코딩 장치가 변환 블록 내 양자화된 변환 계수를 스캔하여 재정렬한 양자화된 변환 계수의 1 차원 배열(700)을 개략적으로 도시한 것이다. 양자화된 변환 계수의 1 차원 배열(700)에 도시된 숫자는 1 차원 열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. FIG. 7 (a) schematically illustrates a one-dimensional array 700 of quantized transform coefficients that the encoding apparatus scans and rearranges the quantized transform coefficients in the transform block. The number shown in the one-dimensional array 700 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
도 7(b)는 디코딩 장치가 양자화된 변환 계수의 1 차원 배열(700)을 스캔하여 재정렬한 양자화된 변한 계수의 2 차원 배열(710)를 나타낸다. 2 차원 배열(710)은 양자화된 변환 계수를 포함하는 변환 블록일 수 있다.FIG. 7B illustrates a two-dimensional array 710 of rearranged quantized transformed coefficients by the decoding apparatus scanning the one-dimensional array 700 of quantized transform coefficients. The two-dimensional array 710 may be a transform block that includes quantized transform coefficients.
양자화된 변환 계수들의 2 차원 배열(710)에서 각 숫자들은 2 차원 배열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. 양자화된 변환 계수의 1차원 배열(700)과 2차원 배열(710)에서 동일한 숫자는 동일한 변환 계수를 의미한다.In the two-dimensional array 710 of quantized transform coefficients, each number specifies each quantized transform coefficient corresponding to a position in the two-dimensional array. The same number in the one-dimensional array 700 and the two-dimensional array 710 of quantized transform coefficients means the same transform coefficients.
도 7(a) 및 도 7(b)를 참조하면, 1차원 배열(700)을 앞쪽에서 뒤쪽으로 스캔하는 경우에, 디코딩 장치는 4x16 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 0의 양자화된 변환 계수를 배치하고, 우하측 방향의 다음 대각 열(두 번째 대각 열)에 1과 2의 양자화된 변환 계수들을 배치하며, 순서대로 스캔 및 재정렬을 진행하여 마지막 대각 열(우하측 첫 번째 대각 열)까지 양자화된 변환 계수를 배치함으로써 양자화된 변환 계수의 2 차원 배열(710)을 생성할 수 있다. 2 차원 배열에서는 도시된 바와 같이, 좌상측 대각 열(첫 번재 대각 열)부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다. 7 (a) and 7 (b), in the case of scanning the one-dimensional array 700 from the front to the back, the decoding apparatus is connected to the first diagonal column (the upper left first diagonal column) of the 4x16 array. Place the quantized transform coefficients of 0, place the quantized transform coefficients of 1 and 2 in the next diagonal column (second diagonal column) in the lower right direction, and scan and reorder in order to the last diagonal column (lower right side). By placing the quantized transform coefficients up to a first diagonal column), a two-dimensional array 710 of quantized transform coefficients can be generated. In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
1차원 배열(700)을 뒤쪽에서 앞쪽으로 스캔하는 경우에, 디코딩 장치는 4x16 배열의 마지막 대각 열(우하측 첫 번째 대각 열)에 63의 양자화된 변환 계수를 배치하고, 좌상측 방향의 다음 대각 열에 61과 62의 양자화된 변환 계수들을 배치하며, 순서대로 스캔 및 재정렬을 진행하여 2 차원 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)까지 양자화된 변환 계수를 배치함으로써 양자화된 변환 계수의 2 차원 배열(710)을 생성할 수 있다. 2 차원 배열에서는 도시된 바와 같이, 우하측 대각 열(마지막 대각 열)부터 좌상측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다.In the case of scanning the one-dimensional array 700 from the back to the front, the decoding device places 63 quantized transform coefficients in the last diagonal column (the right lower diagonal column) of the 4x16 array and the next diagonal in the upper left direction. Place 61 and 62 quantized transform coefficients in the column and scan and reorder them in order to place the quantized transform coefficients up to the first diagonal column (left upper diagonal column) of the two-dimensional array, A two dimensional array 710 may be created. In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
한편, 도 7의 예에서, 인코딩 장치는 양자화된 변환 계수의 2차원 배열(710)을 우상향 대각 스캔 순서에 따라서 스캔하여 1차원 배열(700)을 생성할 수 있다. 인코딩 장치는 2 차원 배열(710) 내에서 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 위치하는 0의 양자화된 변환 계수를 스캔하여 1차원 배열의 처음에 배치할 수 있다. 인코딩 장치는 2 차원 배열(710)의 두 번째 대각 열에 위치하는 1의 양자화된 변환 계수와 2의 양자화된 변환 계수를 좌하측부터 우상측의 순서로 스캔하여 1 차원 배열의 두 번째 및 세 번재 위치에 배치할 수 있다. 동일한 방법으로 각 대각 열을 순서대로 스캔하여, 마지막 대각 열에 위치하는 63의 양자화된 변환 계수를 1차원 배열의 마지막에 배치함으로써 양자화된 변환 계수의 1차원 배열(700)을 생성할 수 있다.Meanwhile, in the example of FIG. 7, the encoding apparatus may generate the one-dimensional array 700 by scanning the two-dimensional array 710 of the quantized transform coefficients in a right-up diagonal scan order. The encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 710 at the beginning of the one-dimensional array. The encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 710, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on. In the same manner, each diagonal column may be scanned in order to generate a one-dimensional array 700 of quantized transform coefficients by placing 63 quantized transform coefficients positioned in the last diagonal column at the end of the one-dimensional array.
도 8은 16x4 크기의 변환 블록을 단위로 변환이 수행된 경우에 있어서, 양자화된 변환 계수들을 우상향 대각 스캔하는 방법의 일 예를 개략적으로 설명하는 도면이다. 예컨대, 도 8은 도 4의 예에서 n=16, m=4인 경우로서 우상향 대각 스캔 순서가 적용되는 경우를 설명한다.FIG. 8 is a diagram schematically illustrating an example of a method of diagonally scanning the quantized transform coefficients in the case where the transform is performed in units of 16 × 4 transform blocks. For example, FIG. 8 illustrates a case in which the right upward diagonal scan order is applied as n = 16 and m = 4 in the example of FIG. 4.
도 8(a)는 인코딩 장치가 변환 블록 내 양자화된 변환 계수를 스캔하여 재정렬한 양자화된 변환 계수의 1 차원 배열(800)을 개략적으로 도시한 것이다. 양자화된 변환 계수의 1 차원 배열(800)에 도시된 숫자는 1 차원 열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. FIG. 8 (a) schematically illustrates a one-dimensional array 800 of quantized transform coefficients by which an encoding apparatus scans quantized transform coefficients in a transform block. The number shown in the one-dimensional array 800 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
도 8(b)는 디코딩 장치가 양자화된 변환 계수의 1 차원 배열(800)을 스캔하여 재정렬한 양자화된 변한 계수의 2 차원 배열(810)를 나타낸다. 2 차원 배열(810)은 양자화된 변환 계수를 포함하는 변환 블록일 수 있다.8 (b) shows a two-dimensional array 810 of rearranged quantized transformed coefficients by the decoding apparatus scanning the one-dimensional array 800 of quantized transform coefficients. The two-dimensional array 810 may be a transform block that includes quantized transform coefficients.
양자화된 변환 계수들의 2 차원 배열(810)에서 각 숫자들은 2 차원 배열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. 양자화된 변환 계수의 1차원 배열(800)과 2차원 배열(810)에서 동일한 숫자는 동일한 변환 계수를 의미한다.In the two-dimensional array 810 of quantized transform coefficients, each number specifies each quantized transform coefficient corresponding to a position in the two-dimensional array. The same number in the one-dimensional array 800 and the two-dimensional array 810 of the quantized transform coefficients means the same transform coefficients.
도 8(a) 및 도 8(b)를 참조하면, 1차원 배열(800)을 앞쪽에서 뒤쪽으로 스캔하는 경우에, 디코딩 장치는 16x4 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 0의 양자화된 변환 계수를 배치하고, 우하측 방향의 다음 대각 열(두 번째 대각 열)에 1과 2의 양자화된 변환 계수들을 배치하며, 순서대로 스캔 및 재정렬을 진행하여 마지막 대각 열(우하측 첫 번째 대각 열)까지 양자화된 변환 계수를 배치함으로써 양자화된 변환 계수의 2 차원 배열(810)을 생성할 수 있다. 2 차원 배열에서는 도시된 바와 같이, 좌상측 대각 열(첫 번재 대각 열)부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다. 8 (a) and 8 (b), in the case of scanning the one-dimensional array 800 from front to back, the decoding apparatus is connected to the first diagonal column (upper left diagonal column) of the 16x4 array. Place the quantized transform coefficients of 0, place the quantized transform coefficients of 1 and 2 in the next diagonal column (second diagonal column) in the lower right direction, and scan and reorder in order to the last diagonal column (lower right side). By placing the quantized transform coefficients up to a first diagonal column, a two-dimensional array 810 of quantized transform coefficients can be generated. In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
1차원 배열(800)을 뒤쪽에서 앞쪽으로 스캔하는 경우에, 디코딩 장치는 16x4 배열의 마지막 대각 열(우하측 첫 번째 대각 열)에 63의 양자화된 변환 계수를 배치하고, 좌상측 방향의 다음 대각 열에 61과 62의 양자화된 변환 계수들을 배치하며, 순서대로 스캔 및 재정렬을 진행하여 2 차원 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)까지 양자화된 변환 계수를 배치함으로써 양자화된 변환 계수의 2 차원 배열(810)을 생성할 수 있다. 2 차원 배열에서는 도시된 바와 같이, 우하측 대각 열(마지막 대각 열)부터 좌상측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다.In the case of scanning the one-dimensional array 800 from the back to the front, the decoding apparatus places 63 quantized transform coefficients in the last diagonal column (the right lower diagonal column) of the 16x4 array and the next diagonal in the upper left direction. Place 61 and 62 quantized transform coefficients in the column and scan and reorder them in order to place the quantized transform coefficients up to the first diagonal column (left upper diagonal column) of the two-dimensional array, A two-dimensional array 810 can be created. In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
한편, 도 8의 예에서, 인코딩 장치는 양자화된 변환 계수의 2차원 배열(810)을 우상향 대각 스캔 순서에 따라서 스캔하여 1차원 배열(800)을 생성할 수 있다. 인코딩 장치는 2 차원 배열(810) 내에서 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 위치하는 0의 양자화된 변환 계수를 스캔하여 1차원 배열의 처음에 배치할 수 있다. 인코딩 장치는 2 차원 배열(810)의 두 번째 대각 열에 위치하는 1의 양자화된 변환 계수와 2의 양자화된 변환 계수를 좌하측부터 우상측의 순서로 스캔하여 1 차원 배열의 두 번째 및 세 번재 위치에 배치할 수 있다. 동일한 방법으로 각 대각 열을 순서대로 스캔하여, 마지막 대각 열에 위치하는 63의 양자화된 변환 계수를 1차원 배열의 마지막에 배치함으로써 양자화된 변환 계수의 1차원 배열(800)을 생성할 수 있다.Meanwhile, in the example of FIG. 8, the encoding apparatus may generate the one-dimensional array 800 by scanning the two-dimensional array 810 of the quantized transform coefficients in a right-up diagonal scan order. The encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 810 at the beginning of the one-dimensional array. The encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2 located in the second diagonal column of the two-dimensional array 810 in the order from the lower left to the upper right, and then the second and third positions of the one-dimensional array. Can be placed on. In the same manner, each diagonal column may be scanned in order to generate a one-dimensional array 800 of quantized transform coefficients by placing 63 quantized transform coefficients positioned in the last diagonal column at the end of the one-dimensional array.
도 9는 8x32 크기의 변환 블록을 단위로 변환이 수행된 경우에 있어서, 양자화된 변환 계수들을 우상향 대각 스캔하는 방법의 일 예를 개략적으로 설명하는 도면이다. 예컨대, 도 9는 도 4의 예에서 n=8, m=32인 경우로서 우상향 대각 스캔 순서가 적용되는 경우를 설명한다.FIG. 9 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed in units of 8 × 32 transform blocks. For example, FIG. 9 illustrates a case in which the right upward diagonal scan order is applied as n = 8 and m = 32 in the example of FIG. 4.
도 9(a)는 인코딩 장치가 변환 블록 내 양자화된 변환 계수를 스캔하여 재정렬한 양자화된 변환 계수의 1 차원 배열(900)을 개략적으로 도시한 것이다. 양자화된 변환 계수의 1 차원 배열(900)에 도시된 숫자는 1 차원 열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. FIG. 9 (a) schematically illustrates a one-dimensional array 900 of quantized transform coefficients arranged by the encoding apparatus by scanning quantized transform coefficients in a transform block. The number shown in one-dimensional array 900 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
도 9(b)는 디코딩 장치가 양자화된 변환 계수의 1 차원 배열(900)를 스캔하여 재정렬한 양자화된 변한 계수의 2 차원 배열(910)을 나타낸다. 2 차원 배열(910)는 양자화된 변환 계수를 포함하는 변환 블록일 수 있다.9 (b) shows a two-dimensional array 910 of reordered quantized transformed coefficients by scanning the one-dimensional array 900 of quantized transform coefficients. The two-dimensional array 910 may be a transform block that includes quantized transform coefficients.
양자화된 변환 계수들의 2 차원 배열(910)에서 각 숫자들은 2 차원 배열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. 양자화된 변환 계수의 1차원 배열(900)과 2차원 배열(910)에서 동일한 숫자는 동일한 변환 계수를 의미한다.In the two-dimensional array 910 of quantized transform coefficients, each number specifies each quantized transform coefficient corresponding to a position in the two-dimensional array. The same number in the one-dimensional array 900 and the two-dimensional array 910 of the quantized transform coefficients means the same transform coefficients.
도 9(a) 및 도 9(b)를 참조하면, 1차원 배열(900)을 앞쪽에서 뒤쪽으로 스캔하는 경우에, 디코딩 장치는 8x32 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 0의 양자화된 변환 계수를 배치하고, 우하측 방향의 다음 대각 열(두 번째 대각 열)에 1과 2의 양자화된 변환 계수들을 배치하며, 순서대로 스캔 및 재정렬을 진행하여 마지막 대각 열(우하측 첫 번째 대각 열)까지 양자화된 변환 계수를 배치함으로써 양자화된 변환 계수의 2 차원 배열(910)을 생성할 수 있다. 2 차원 배열에서는 도시된 바와 같이, 좌상측 대각 열(첫 번재 대각 열)부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다. 9 (a) and 9 (b), in the case of scanning the one-dimensional array 900 from front to back, the decoding apparatus is connected to the first diagonal column (upper left diagonal column) of the 8x32 array. Place the quantized transform coefficients of 0, place the quantized transform coefficients of 1 and 2 in the next diagonal column (second diagonal column) in the lower right direction, and scan and reorder in order to the last diagonal column (lower right side). By placing the quantized transform coefficients up to a first diagonal column, a two-dimensional array 910 of quantized transform coefficients may be generated. In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
1차원 배열(900)을 뒤쪽에서 앞쪽으로 스캔하는 경우에, 디코딩 장치는 8x32 배열의 마지막 대각 열(우하측 첫 번째 대각 열)에 255의 양자화된 변환 계수를 배치하고, 좌상측 방향의 다음 대각 열에 253과 254의 양자화된 변환 계수들을 배치하며, 순서대로 스캔 및 재정렬을 진행하여 2 차원 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)까지 양자화된 변환 계수를 배치함으로써 양자화된 변환 계수의 2 차원 배열(910)을 생성할 수 있다. 2 차원 배열에서는 도시된 바와 같이, 우하측 대각 열(마지막 대각 열)부터 좌상측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다.In the case of scanning the one-dimensional array 900 from back to front, the decoding device places 255 quantized transform coefficients in the last diagonal column (right bottom diagonal column) of the 8x32 array and the next diagonal in the upper left direction. Place 253 and 254 quantized transform coefficients in the column, scan and reorder them in order, and place the quantized transform coefficients up to the first diagonal column (left upper diagonal column) of the two-dimensional array, A two-dimensional array 910 can be generated. In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
한편, 도 9의 예에서, 인코딩 장치는 양자화된 변환 계수의 2차원 배열(910)을 우상향 대각 스캔 순서에 따라서 스캔하여 1차원 배열(900)을 생성할 수 있다. 인코딩 장치는 2 차원 배열(910) 내에서 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 위치하는 0의 양자화된 변환 계수를 스캔하여 1차원 배열의 처음에 배치할 수 있다. 인코딩 장치는 2 차원 배열(910)의 두 번째 대각 열에 위치하는 1의 양자화된 변환 계수와 2의 양자화된 변환 계수를 좌하측부터 우상측의 순서로 스캔하여 1 차원 배열의 두 번째 및 세 번재 위치에 배치할 수 있다. 동일한 방법으로 각 대각 열을 순서대로 스캔하여, 마지막 대각 열에 위치하는 255의 양자화된 변환 계수를 1차원 배열의 마지막에 배치함으로써 양자화된 변환 계수의 1차원 배열(900)을 생성할 수 있다.Meanwhile, in the example of FIG. 9, the encoding apparatus may generate the one-dimensional array 900 by scanning the two-dimensional array 910 of the quantized transform coefficients in a right-up diagonal scan order. The encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 910 and place them at the beginning of the one-dimensional array. The encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 910, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on. In the same manner, the diagonal columns may be sequentially scanned to generate a one-dimensional array 900 of quantized transform coefficients by placing 255 quantized transform coefficients positioned at the last diagonal column at the end of the one-dimensional array.
도 10은 32x8 크기의 변환 블록을 단위로 변환이 수행된 경우에 있어서, 양자화된 변환 계수들을 우상향 대각 스캔하는 방법의 일 예를 개략적으로 설명하는 도면이다. 예컨대, 도 10은 도 4의 예에서 n=32, m=8인 경우로서 우상향 대각 스캔 순서가 적용되는 경우를 설명한다.FIG. 10 is a diagram schematically illustrating an example of a method of diagonally upward-scanning quantized transform coefficients when a transform is performed on a 32 × 8 transform block. For example, FIG. 10 illustrates a case in which the right upward diagonal scan order is applied as n = 32 and m = 8 in the example of FIG. 4.
도 10(a)는 인코딩 장치가 변환 블록 내 양자화된 변환 계수를 스캔하여 재정렬한 양자화된 변환 계수의 1 차원 배열(1000)을 개략적으로 도시한 것이다. 양자화된 변환 계수의 1 차원 배열(1000)에 도시된 숫자는 1 차원 열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. FIG. 10A schematically illustrates a one-dimensional array 1000 of quantized transform coefficients that the encoding apparatus scans and reorders the quantized transform coefficients in the transform block. The number shown in the one-dimensional array 1000 of quantized transform coefficients specifies each quantized transform coefficient corresponding to its position in the one-dimensional column.
도 10(b)는 디코딩 장치가 양자화된 변환 계수의 1 차원 배열(1000)을 스캔하여 재정렬한 양자화된 변한 계수의 2 차원 배열(1010)을 나타낸다. 2 차원 배열(1010)은 양자화된 변환 계수를 포함하는 변환 블록일 수 있다.FIG. 10 (b) shows a two-dimensional array 1010 of reordered quantized transformed coefficients by the decoding apparatus scanning the one-dimensional array 1000 of quantized transform coefficients. The two-dimensional array 1010 may be a transform block that includes quantized transform coefficients.
양자화된 변환 계수들의 2 차원 배열(1010)에서 각 숫자들은 2 차원 배열 내에서의 위치에 대응하여 각 양자화된 변환 계수들을 특정한다. 양자화된 변환 계수의 1차원 배열(1000)과 2차원 배열(1010)에서 동일한 숫자는 동일한 변환 계수를 의미한다.In the two-dimensional array 1010 of quantized transform coefficients, each number specifies each quantized transform coefficient corresponding to a position in the two-dimensional array. The same number in the one-dimensional array 1000 and the two-dimensional array 1010 of the quantized transform coefficients means the same transform coefficients.
도 10(a) 및 도 10(b)를 참조하면, 1차원 배열(1000)을 앞쪽에서 뒤쪽으로 스캔하는 경우에, 디코딩 장치는 32x8 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 0의 양자화된 변환 계수를 배치하고, 우하측 방향의 다음 대각 열(두 번째 대각 열)에 1과 2의 양자화된 변환 계수들을 배치하며, 순서대로 스캔 및 재정렬을 진행하여 마지막 대각 열(우하측 첫 번째 대각 열)까지 양자화된 변환 계수를 배치함으로써 양자화된 변환 계수의 2 차원 배열(1010)을 생성할 수 있다. 2 차원 배열에서는 도시된 바와 같이, 좌상측 대각 열(첫 번재 대각 열)부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다. 10 (a) and 10 (b), in the case of scanning the one-dimensional array 1000 from front to back, the decoding apparatus is connected to the first diagonal column (upper left diagonal column) of the 32x8 array. Place the quantized transform coefficients of 0, place the quantized transform coefficients of 1 and 2 in the next diagonal column (second diagonal column) in the lower right direction, and scan and reorder in order to the last diagonal column (lower right side). The two-dimensional array 1010 of the quantized transform coefficients may be generated by arranging the quantized transform coefficients up to the first diagonal column). In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the upper left diagonal column (the first diagonal column) to the lower right diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
1차원 배열(1000)을 뒤쪽에서 앞쪽으로 스캔하는 경우에, 디코딩 장치는 32x8 배열의 마지막 대각 열(우하측 첫 번째 대각 열)에 255의 양자화된 변환 계수를 배치하고, 좌상측 방향의 다음 대각 열에 253과 254의 양자화된 변환 계수들을 배치하며, 순서대로 스캔 및 재정렬을 진행하여 2 차원 배열의 첫 번째 대각 열(좌상측 첫 번째 대각 열)까지 양자화된 변환 계수를 배치함으로써 양자화된 변환 계수의 2 차원 배열(1010)을 생성할 수 있다. 2 차원 배열에서는 도시된 바와 같이, 우하측 대각 열(마지막 대각 열)부터 좌상측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치될 수 있으며. 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치될 수 있다.In the case of scanning the one-dimensional array 1000 from the back to the front, the decoding apparatus places 255 quantized transform coefficients in the last diagonal column (the lower right first diagonal column) of the 32x8 array and the next diagonal in the upper left direction. Place 253 and 254 quantized transform coefficients in the column, scan and reorder them in order, and place the quantized transform coefficients up to the first diagonal column (left upper diagonal column) of the two-dimensional array, A two dimensional array 1010 may be created. In the two-dimensional array, as shown, the quantized transform coefficients may be arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column. In each diagonal column, quantized transform coefficients may be arranged along the diagonal column from the lower left side to the upper right side.
한편, 도 10의 예에서, 인코딩 장치는 양자화된 변환 계수의 2차원 배열(1010)을 우상향 대각 스캔 순서에 따라서 스캔하여 1차원 배열(1000)을 생성할 수 있다. 인코딩 장치는 2 차원 배열(1010) 내에서 첫 번째 대각 열(좌상측 첫 번째 대각 열)에 위치하는 0의 양자화된 변환 계수를 스캔하여 1차원 배열의 처음에 배치할 수 있다. 인코딩 장치는 2 차원 배열(1010)의 두 번째 대각 열에 위치하는 1의 양자화된 변환 계수와 2의 양자화된 변환 계수를 좌하측부터 우상측의 순서로 스캔하여 1 차원 배열의 두 번째 및 세 번재 위치에 배치할 수 있다. 동일한 방법으로 각 대각 열을 순서대로 스캔하여, 마지막 대각 열에 위치하는 255의 양자화된 변환 계수를 1차원 배열의 마지막에 배치함으로써 양자화된 변환 계수의 1차원 배열(1000)을 생성할 수 있다.Meanwhile, in the example of FIG. 10, the encoding apparatus may generate the one-dimensional array 1000 by scanning the two-dimensional array 1010 of the quantized transform coefficients in a right-up diagonal scan order. The encoding apparatus may scan and place 0 quantized transform coefficients located in the first diagonal column (the upper left first diagonal column) in the two-dimensional array 1010 and place them at the beginning of the one-dimensional array. The encoding apparatus scans the quantized transform coefficients of 1 and the quantized transform coefficients of 2, which are located in the second diagonal column of the two-dimensional array 1010, in the order from the lower left to the upper right, and the second and third positions of the one-dimensional array. Can be placed on. In the same manner, the diagonal columns may be sequentially scanned to generate a one-dimensional array 1000 of quantized transform coefficients by placing 255 quantized transform coefficients positioned at the last diagonal column at the end of the one-dimensional array.
도 5 내지 도 10의 예에서는 비정방형 변환의 경우에 우상향 대각 스캔 순서를 적용하는 것으로 설명하였으나, 본 발명은 이에 한정되지 않는다. 예컨대, 변환 블록이 비정방형인 경우에도 (i) 변환 블록의 크기가 4x4 이거나 (ii) 변환 블록의 크기가 8x8이며 변환 블록이 루마 샘플에 대한 것일 때, 인트라 예측 모드가 수평 방향의 예측 모드이면 수직 스캔 순서가 적용되고, 인트라 예측 모드가 수직 방향의 예측 모드이면 수평 방향의 스캔 순서가 적용되도록 할 수도 있다. 또한, 변환 블록이 비정방형인 경우에는 어떤 스캔 순서를 이용할 것인지가 인코딩 장치에서 결정되어 디코딩 장치로 시그널링 되며, 디코딩 장치는 수신한 정보를 기반으로 어떤 스캔 순서를 이용할 것인지를 결정하여 스캔을 수행하도록 할 수도 있다. In the example of FIG. 5 to FIG. 10, it has been described that a right-up diagonal scan order is applied in the case of non-square transformation, but the present invention is not limited thereto. For example, even if the transform block is non-square, if the (i) transform block size is 4x4 or (ii) the transform block is 8x8 and the transform block is for luma samples, the intra prediction mode is a horizontal prediction mode, The vertical scan order is applied, and if the intra prediction mode is the vertical prediction mode, the horizontal scan order may be applied. In addition, when the transform block is non-square, which encoding order is determined by the encoding device and signaled to the decoding device, and the decoding device determines which scan order to use based on the received information to perform a scan. You may.
또한, 도 5 내지 도 10의 예는, 비정방형 변환을 적용하는 블록의 크기에 따른 스캔 순서의 예로서, 비정방형 변환을 적용하는 블록의 크기가 예시한 2x8, 8x2, 4x16, 16x4, 8x32, 32x8 이외인 경우(예컨대, 도 4에서 n과 m이 임의의 정수인 경우)에도 동일하게 적용될 수 있다. 즉, 1차원의 양자화된 변환 계수 배열을 뒤쪽에서 앞쪽으로 스캔하는 경우에 2 차원 배열의 우하측 대각 열(마지막 대각 열)부터 좌상측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치되고, 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치됨으로써 2 차원의 양자화된 변환 계수 배열이 생성될 수 있다. 또한, 1차원의 양자화된 변환 계수 배열을 앞쪽에서 뒤쪽으로 스캔하는 경우에 2 차원 배열의 좌상측 대각 열(첫 번째 대각 열)부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배치되고, 각 대각 열에서는 양자화된 변환 계수들이 좌하측부터 우상측으로 대각 열을 따라서 배치됨으로써 2 차원의 양자화된 변환 계수 배열이 생성될 수 있다.5 to 10 are examples of scan order according to the size of the block to which the non-square transform is applied, and 2x8, 8x2, 4x16, 16x4, 8x32, The same may be applied to cases other than 32x8 (eg, when n and m are arbitrary integers in FIG. 4). In other words, when scanning a one-dimensional array of quantized transform coefficients from the rear to the front, the quantized transform coefficients are arranged in the diagonal columns in the order from the lower right diagonal column (last diagonal column) to the upper left diagonal column of the two-dimensional array. In each diagonal column, the quantized transform coefficient arrays are arranged along the diagonal column from the lower left side to the upper right side, thereby generating a two-dimensional array of quantized transform coefficients. Also, when scanning a one-dimensional array of quantized transform coefficients from the front to the rear, the transform coefficients quantized in the diagonal columns in the order from the upper left diagonal column (first diagonal column) to the lower right diagonal column of the two-dimensional array. Are arranged, and in each diagonal column, the quantized transformation coefficient array may be generated by arranging the quantized transform coefficients along the diagonal column from the lower left side to the upper right side.
한편, 변환 계수의 스캔이 2 차원의 양자화된 변환 계수 배열(예컨대, 변환 블록) 내 서브 블록 단위로 수행될 수도 있다. Meanwhile, the scan of the transform coefficients may be performed in units of sub-blocks in a two-dimensional quantized transform coefficient array (eg, a transform block).
예컨대, 인코딩 장치는 변환 계수 배열 내의 서브 블록들에 대하여 한 서브 블록 내 양자화된 변환 계수들을 순서대로 스캔하여 재정렬한 후 다음 서브 블록 내 양자화된 변환 계수들을 순서대로 스캔하여 재정렬함으로써 1차원의 양자화된 변환 계수 배열을 생성할 수 있다. 서브 블록 내에서는 상술한 수평 스캔 순서, 수직 스캔 순서, 우상향 대각 스캔 순서에 따라서 양자화된 변환 계수들을 스캔할 수 있다. For example, the encoding apparatus scans and rearranges the quantized transform coefficients in one subblock in order with respect to the subblocks in the transform coefficient array, and then sequentially scans and rearranges the quantized transform coefficients in the next subblock in one dimensional order. You can create an array of transform coefficients. In the sub-block, the quantized transform coefficients may be scanned according to the above-described horizontal scan order, vertical scan order, and right-up diagonal scan order.
디코딩 장치는 1차원의 변환 계수 배열을 서브 블록 단위로 스캔 및 재정렬할 수 있다. 예컨대, 디코딩 장치는 한 서브 블록(예컨대, 제1 서브 블록)에 대하여 양자화된 변환 계수들을 스캔하고 전체 변환 계수의 2 차원 배열에서 상기 제1 서브 블록의 위치에 양자화된 변환 계수들을 재정렬하여 2차원 배열을 생성한 후, 다음 서브 블록(예컨대, 제2 서브 블록)에 대하여 양자화된 변환 계수들을 스캔하고 전체 변환 계수의 2차원 배열에서 상기 제2 서브 블록의 위치에 양자화된 변환 계수들을 재정렬하는 방식으로 변환 계수들의 2차원 배열(예컨대 변환 블록)를 생성할 수 있다. 이때, 서브 블록 내에서는 상술한 수평 스캔 순서, 수직 스캔 순서, 우상향 대각 스캔 순서에 따라서 양자화된 변환 계수들을 재정렬할 수 있다. The decoding apparatus may scan and rearrange the one-dimensional transform coefficient array in sub-block units. For example, the decoding apparatus scans quantized transform coefficients for one sub-block (eg, the first sub-block) and rearranges the quantized transform coefficients at positions of the first sub-blocks in a two-dimensional array of total transform coefficients to two-dimensional. After generating the array, scan the quantized transform coefficients for the next subblock (e.g., the second subblock) and rearrange the quantized transform coefficients at positions of the second subblock in a two-dimensional array of total transform coefficients. In order to generate a two-dimensional array (eg, a transform block) of transform coefficients. In this case, the quantized transform coefficients may be rearranged in the sub-block according to the above-described horizontal scan order, vertical scan order, and right-up diagonal scan order.
서브 블록들의 스캔 순서와 서브 블록 내 양자화된 변환 계수의 스캔 순서는 동일할 수도 있고 상이할 수도 있다. 예컨대, 서브 블록들이 우상향 대각 스캔 순서로 스캔 또는 재정렬되는 경우에, 서브 블록 내 양자화된 변환 계수들도 우상향 대각 스캔 순서로 스캔 또는 재정렬될 수 있다. 또한, 서브 블록들이 우상향 대각 스캔 순서로 스캔 또는 재정렬되는 경우에, 서브 블록 내 양자화된 변환 계수들은 수평 스캔 순서 또는 수직 스캔 순서에 따라서 스캔되거나 재정렬될 수도 있다.The scan order of the subblocks and the scan order of the quantized transform coefficients within the subblocks may be the same or may be different. For example, if the subblocks are scanned or rearranged in a right-up diagonal scan order, the quantized transform coefficients in the subblock may also be scanned or rearranged in a right-up diagonal scan order. In addition, when the sub blocks are scanned or rearranged in a right-up diagonal scan order, the quantized transform coefficients in the sub block may be scanned or rearranged according to a horizontal scan order or a vertical scan order.
이하, 도면을 참조하여, 변환 블록(양자화된 변환 계수들의 2차원 배열)이 크기의 서브 블록 단위로 스캔되는 경우에 대하여 구체적으로 설명한다.Hereinafter, a case in which a transform block (two-dimensional array of quantized transform coefficients) is scanned in units of subblocks of size will be described in detail with reference to the drawings.
도 11은 변환 블록이 서브 블록 단위로 스캔되는 경우의 일 예를 개략적으로 설명하는 도면이다. 11 is a diagram schematically illustrating an example of a case in which a transform block is scanned in sub-block units.
도 11(a)를 참조하면, 변환 블록(1100)은 S x T 개 (S, T는 정수)의 서브 블록들(B’s)로 구성될 수 있으며, 변환 블록(1100)에 대한 스캔은 서브 블록(B) 단위로 수행될 수 있다. 변환 블록(1100)은 양자화된 변환 계수들의 2 차원 배열일 수 있으며, 서브 블록(B)은 n x n 크기의 양자화된 변환 계수의 2 차원 배열일 수 있다. Referring to FIG. 11A, the transform block 1100 may be composed of S × T subblocks B ′s (S and T are integers), and the scan for the transform block 1100 may be performed in a subblock. (B) may be performed in units. The transform block 1100 may be a two-dimensional array of quantized transform coefficients, and the sub block B may be a two-dimensional array of quantized transform coefficients of size n × n.
상술한 바와 같이, 서브 블록들도 수평 스캔 순서, 수직 스캔 순서, 우상향 대각 스캔 순서에 따라서 스캔 및 정렬될 수 있다. 이때, 서브 블록들은 변환 블록(양자화된 변환 계수의 2 차원 배열) 내의 첫 번째 서브 블록부터 순서대로 스캔될 수도 있고(정방향 스캔), 마지막 서브 블록부터 역순으로 스캔될 수도 있다(역방향 스캔).As described above, the sub-blocks may also be scanned and sorted according to the horizontal scan order, vertical scan order, and right upward diagonal scan order. At this time, the subblocks may be scanned in order from the first subblock in the transform block (two-dimensional array of quantized transform coefficients) (forward scan) or in reverse order from the last subblock (reverse scan).
예컨대, 변환 블록 내 서브 블록들에 대하여 인코딩 장치가 수평 스캔 순서를 적용하면 (BT-1 BT-2 BT-3 … BK … BS+2 BS+1 BS BS-1 … B2 B1 B0) 순서를 가지는 1차원 의 양자화된 변환 계수 배열이 생성된다. 이때, BK는 K 번째 서브 블록 내 양자화된 변환 계수들의 수평 스캔 순서에 따른 1차원 배열일 수 있다. For example, if the encoding apparatus applies a horizontal scan order to sub blocks in a transform block (B T-1 B T-2 B T-3 … B K … B S + 2 B S + 1 B S B S-1 … B 2 B 1 B 0 ) ordered one-dimensional quantized array of transform coefficients. In this case, B K may be a one-dimensional array according to the horizontal scan order of the quantized transform coefficients in the K-th subblock.
1차원의 양자화된 변환 계수 배열에 대하여, 디코딩 장치가 수평 스캔 순서에 따라서 정방향 스캔을 하게 되면, 도 11(a)를 참조할 때 B0 → B1 → B2 → … → BS-1 → BS → BS+1 → BS+2 → … → BK → … → BT-3 → BT-2 → BT-1의 순서로 양자화된 변환 계수의 2차원 배열이 생성된다. 디코딩 장치가 수평 스캔 순서에 따라서 역방향 스캔을 하게 되면, 도 11(a)를 참조할 때 BT-1 → BT-2 → BT-3 → … → BK → … → BS+2 → BS+1 → BS → BS-1 → … → B2 → B1 → B0의 순서로 양자화된 변환 계수의 2차원 배열이 생성된다. 이때, BK는 K 번째 서브 블록 내 양자화된 변환 계수들의 수평 스캔 순서에 따른 2차원 배열일 수 있으며, 서브 블록의 스캔 순서가 정방향이면 변환 계수들의 스캔 및 배열도 정방향으로 수행되고, 서브 블록의 스캔 순서가 역방향이면 변환 계수들의 스캔 및 배열도 역방향으로 수행될 수 있다. When the decoding apparatus performs a forward scan according to the horizontal scan order with respect to the one-dimensional quantized array of transform coefficient arrays, referring to FIG. 11 (a), B 0 → B 1 → B 2 →. → B S-1 → B S → B S + 1 → B S + 2 →. → B K →… A two-dimensional array of quantized transform coefficients is generated in the order B T-3 B T-2 B T-1 . When the decoding apparatus performs reverse scanning according to the horizontal scanning order, referring to FIG. 11 (a), B T-1 → B T-2 → B T-3 →. → B K →… → B S + 2 → B S + 1 → B S → B S-1 →. A two-dimensional array of quantized transform coefficients is generated in the sequence B 2 → B 1 → B 0 . In this case, B K may be a two-dimensional array according to the horizontal scan order of the quantized transform coefficients in the K-th subblock. If the scan order of the subblock is forward, the scan and arrangement of the transform coefficients are also performed in the forward direction. If the scan order is reverse, the scan and arrangement of the transform coefficients may also be performed in the reverse direction.
또한, 변환 블록 내 서브 블록들에 대하여 인코딩 장치가 수직 스캔 순서를 적용하면 (BT-1 … B3S-1 B2S-1 BS-1 … BK … B2S+1 BS+1 B1 BT-S … B2S BS B0) 순서를 가지는 1차원의 양자화된 변환 계수 배열이 생성될 수 있다. 이때, BK는 K 번째 서브 블록 내 양자화된 변환 계수들의 수직 스캔 순서에 따른 1차원 배열일 수 있다. In addition, if the encoding apparatus applies a vertical scan order to sub-blocks in the transform block (B T-1 ... B 3S-1 B 2S-1 B S-1 ... B K ... B 2S + 1 B S + 1 B) A one- dimensional quantized array of transform coefficients having an order of 1 B TS ... B 2S B S B 0 ) may be generated. In this case, B K may be a one-dimensional array according to the vertical scan order of the quantized transform coefficients in the K-th subblock.
1차원의 양자화된 변환 계수 배열에 대하여, 디코딩 장치가 수직 스캔 순서에 따라서 정방향 스캔을 하게 되면, 도 11(a)를 참조할 때 B0 → BS → B2S → … → BT-S → B1 → BS+1 → B2S+1 → … → BK → … → BS-1 → B2S-1 → B3S-1 → … → BT-1의 순서로 양자화된 변환 계수의 2차원 배열이 생성된다. 디코딩 장치가 수직 스캔 순서에 따라서 역방향 스캔을 하게 되면, 도 11(a)를 참조할 때 BT-1 → … → B3S-1 → B2S-1 → BS-1 → … → BK → … → BT-S+1 → … → B2S+1 → BS+1 → B1 → BT-S → … → B2S → BS → B0의 순서로 양자화된 변환 계수의 2차원 배열이 생성된다. 이때, BK는 K 번째 서브 블록 내 양자화된 변환 계수들의 수직 스캔 순서에 따른 2차원 배열일 수 있으며, 서브 블록의 스캔 순서가 정방향이면 변환 계수들의 스캔 및 배열도 정방향으로 수행되고, 서브 블록의 스캔 순서가 역방향이면 변환 계수들의 스캔 및 배열도 역방향으로 수행될 수 있다. For a one-dimensional quantized array of transform coefficients, if the decoding apparatus performs forward scanning in the vertical scanning order, referring to FIG. 11 (a), B 0 → B S → B 2S →. → B TS → B 1 → B S + 1 → B 2S + 1 →. → B K →… → B S-1 → B 2S-1 → B 3S-1 →. ¡Æ a two-dimensional array of quantized transform coefficients in order of B T-1 If the decoding apparatus performs backward scanning in the vertical scanning order, referring to FIG. 11 (a), B T-1 ? → B 3S-1 → B 2S-1 → B S-1 →. → B K →… ¡Æ B T-S + 1 ? → B 2S + 1 → B S + 1 → B 1 → B TS →. A two-dimensional array of quantized transform coefficients is generated in the sequence B 2S B S B 0 . In this case, B K may be a two-dimensional array according to the vertical scan order of the quantized transform coefficients in the K-th subblock. If the scan order of the subblock is forward, the scan and arrangement of the transform coefficients are also performed in the forward direction. If the scan order is reverse, the scan and arrangement of the transform coefficients may also be performed in the reverse direction.
또한, 변환 블록 내 서브 블록들에 대하여 인코딩 장치가 우상향 대각 스캔 순서를 적용하면 (BT-1 BT-2 BT-S-1 … BK … B2S BS+1 B2 BS B1 B0) 순서를 가지는 1차원의 양자화된 변환 계수 배열이 생성될 수 있다. 이때, BK는 K 번째 서브 블록 내 양자화된 변환 계수들의 우상향 대각 스캔 순서에 따른 1차원 배열일 수 있다. In addition, if the encoding apparatus applies a right-up diagonal scan order to sub-blocks in the transform block (B T-1 B T-2 B TS-1 … B K … B 2S B S + 1 B 2 B S B 1 B 0 ) an ordered one-dimensional quantized array of transform coefficients may be generated. In this case, B K may be a one-dimensional array according to a right-up diagonal scan order of the quantized transform coefficients in the K-th subblock.
1차원의 양자화된 변환 계수 배열에 대하여, 디코딩 장치가 우상향 대각 스캔 순서에 따라서 정방향 스캔을 하게 되면, 도 11(a)를 참조할 때 B0 → BS → B1 → B2S → BS+1 → B2 → … → BK → … → BT-2 → BT-S-1 → BT-1의 순서로 양자화된 변환 계수의 2차원 배열이 생성된다. 디코딩 장치가 우상향 대각 스캔 순서에 따라서 역방향 스캔을 하게 되면, 도 11(a)를 참조할 때 BT-1 → BT-2 → BT-S-1 → … → BK → … → B2S → BS+1 → B2 → BS → B1 → B0 의 순서로 양자화된 변환 계수의 2차원 배열이 생성된다. 이때, BK는 K 번째 서브 블록 내 양자화된 변환 계수들의 우상향 대각 스캔 순서에 따른 2차원 배열일 수 있으며, 서브 블록의 스캔 순서가 정방향이면 변환 계수들의 스캔 및 배열도 정방향으로 수행되고, 서브 블록의 스캔 순서가 역방향이면 변환 계수들의 스캔 및 배열도 역방향으로 수행될 수 있다.For a one-dimensional quantized array of transform coefficients, if the decoding apparatus performs a forward scan in a right-up diagonal scan order, referring to FIG. 11 (a), B 0 → B S → B 1 → B 2S → B S + 1 → B 2 →. → B K →… A two-dimensional array of transform coefficients quantized in order of B T-2 B TS-1 B T-1 is then generated. If the decoding apparatus performs backward scanning according to the right-up diagonal scanning order, referring to FIG. 11 (a), B T-1- > B T-2- > B TS-1- &gt; → B K →… A two-dimensional array of quantized transform coefficients is generated in the order B 2S B S + 1 B 2 B S B 1 B 0 . In this case, B K may be a two-dimensional array according to a right-up diagonal scan order of the quantized transform coefficients in the K-th subblock. If the scan order of the subblock is forward, the scan and arrangement of the transform coefficients are also performed in the forward direction. If the scan order of is reverse, scan and array of transform coefficients may also be performed in the reverse direction.
도 11(b)는 변환 블록 내 임의의 서브 블록 BK(1110)의 양자화된 변환 계수 배열을 개략적으로 나타낸 것이다. 도 11(b)에서는 서브 블록의 크기가 n x n 인 경우를 예로서 설명한다. FIG. 11B schematically illustrates an arrangement of quantized transform coefficients of any subblock B K 1110 in a transform block. In FIG. 11B, the case where the size of the sub block is nxn will be described as an example.
도 11(b)를 참조하면, 각 화소 샘플 위치에 대응하여 양자화된 변환 계수 C가 배열되어 있다. 예컨대, 서브 블록 BK 내 2 번째 행 및 1 번째 열의 위치에 양자화된 변환 계수 C2,1가 배치되어 있다.Referring to Fig. 11B, quantized transform coefficients C are arranged corresponding to the pixel sample positions. For example, the sub-block B K 2 of the quantization in the second row and the first row position transformation coefficient C 2,1 are arranged.
도 11(a)의 예를 이용하여 설명한 바와 같이 양자화된 변환 계수의 스캔 및 재정렬이 서브 블록 단위로 수행되는 경우에, 서브 블록 내의 양자화된 변환 계수는 도 4의 예에서 설명한 바와 동일하게 스캔 및 재정렬될 수 있다. 서브 블록이 정방형인 경우에는 m=n이 되며, 서브 블록이 비정방형인 경우에는 n=행 내의 샘플 개수, m= 열 내의 샘플 개수가 된다.When scanning and reordering of the quantized transform coefficients are performed in units of subblocks as described with reference to the example of FIG. 11A, the quantized transform coefficients in the subblocks are scanned and identically described in the example of FIG. 4. Can be rearranged. If the subblock is square, m = n. If the subblock is non-square, n = number of samples in a row and m = number of samples in a column.
도 11(c)는 도 11(a) 및 11(b)과 같은 서브 블록들 및 양자화된 변환 계수들의 2차원 배열에 대하여 수평 스캔 순서가 적용되어 생성되는 양자화된 변환 계수들의 1차원 배열의 일 예를 나타낸 것이다. 도 11(c)의 1차원 배열로부터 도 11(a)의 2차원 배열을 생성하는 경우에, 서브 블록의 스캔 순서가 정방향이면 변환 계수들의 스캔 및 배열도 정방향으로 수행되고, 서브 블록의 스캔 순서가 역방향이면 변환 계수들의 스캔 및 배열도 역방향으로 수행될 수 있다.FIG. 11 (c) illustrates one-dimensional array of quantized transform coefficients generated by applying a horizontal scan order to two-dimensional arrays of subblocks and quantized transform coefficients, such as FIGS. 11A and 11B. An example is shown. In the case of generating the two-dimensional array of FIG. 11 (a) from the one-dimensional array of FIG. 11 (c), if the scanning order of the sub blocks is forward, the scanning and arrangement of the transform coefficients are also performed in the forward direction, and the scanning order of the sub blocks is performed. If is reverse, then scanning and arranging the transform coefficients may also be performed in the reverse direction.
도 11(d)는 도 11(a) 및 11(b)과 같은 서브 블록들 및 양자화된 변환 계수들의 2차원 배열에 대하여 수직 스캔 순서가 적용되어 생성되는 양자화된 변환 계수들의 1차원 배열의 일 예를 나타낸 것이다. 도 11(d)의 1차원 배열로부터 도 11(a)의 2차원 배열을 생성하는 경우에, 서브 블록의 스캔 순서가 정방향이면 변환 계수들의 스캔 및 배열도 정방향으로 수행되고, 서브 블록의 스캔 순서가 역방향이면 변환 계수들의 스캔 및 배열도 역방향으로 수행될 수 있다.11 (d) illustrates one-dimensional array of quantized transform coefficients generated by applying a vertical scan order to a two-dimensional array of subblocks and quantized transform coefficients, such as FIGS. 11A and 11B. An example is shown. In the case of generating the two-dimensional array of FIG. 11 (a) from the one-dimensional array of FIG. 11 (d), if the scanning order of the subblock is forward, the scanning and arrangement of the transform coefficients are also performed in the forward direction, and the scanning order of the subblock is If is reverse, then scanning and arranging the transform coefficients may also be performed in the reverse direction.
도 11(e)는 도 11(a) 및 11(b)과 같은 서브 블록들 및 양자화된 변환 계수들의 2차원 배열에 대하여 우상향 대각 스캔 순서가 적용되어 생성되는 양자화된 변환 계수들의 1차원 배열의 일 예를 나타낸 것이다. 도 11(e)의 1차원 배열로부터 도 11(a)의 2차원 배열을 생성하는 경우에, 서브 블록의 스캔 순서가 정방향이면 변환 계수들의 스캔 및 배열도 정방향으로 수행되고, 서브 블록의 스캔 순서가 역방향이면 변환 계수들의 스캔 및 배열도 역방향으로 수행될 수 있다. FIG. 11 (e) shows a one-dimensional array of quantized transform coefficients generated by applying a right-up diagonal scan order to two-dimensional arrays of subblocks and the quantized transform coefficients as shown in FIGS. 11 (a) and 11 (b). An example is shown. In the case of generating the two-dimensional array of FIG. 11 (a) from the one-dimensional array of FIG. 11 (e), if the scanning order of the sub blocks is forward, the scanning and arrangement of the transform coefficients are also performed in the forward direction, and the scanning order of the sub blocks is performed. If is reverse, then scanning and arranging the transform coefficients may also be performed in the reverse direction.
도 11에서는 서브 블록들의 스캔 순서(재정렬 순서)와 서브 블록 내 양자화된 변환 계수들의 스캔 순서(재정렬 순서)가 동일한 경우를 설명하였으나, 본 발명은 이에 한정되지 않는다. In FIG. 11, the case in which the scanning order (reordering order) of the subblocks is the same as the scanning order (reordering order) of the quantized transform coefficients in the subblock is described.
따라서, 서브 블록들의 스캔 순서(재정렬 순서)와 양자화된 변환 계수들의 스캔 순서(재정렬 순서)가 상이할 수도 있다. 예컨대, 서브 블록들의 스캔 순서는 수평 스캔 순서이나 양자화된 변환 계수들의 스캔 순서는 수직 스캔 순서 또는 수평 스캔 순서일 수도 있다. 또한, 서브 블록들의 스캔 순서는 수직 스캔 순서이나 양자화된 변환 계수들의 스캔 순서는 수평 스캔 순서 또는 우상향 대각 스캔 순서일 수도 있다. 또한, 서브 블록들의 스캔 순서는 우상향 대각 스캔 순서이나 양자화된 변환 계수들의 스캔 순서는 수평 스캔 순서 또는 수직 스캔 순서일 수도 있다.Thus, the scan order (reorder order) of the subblocks and the scan order (reorder order) of the quantized transform coefficients may be different. For example, the scan order of the subblocks may be a horizontal scan order or the scan order of the quantized transform coefficients may be a vertical scan order or a horizontal scan order. Further, the scan order of the subblocks may be a vertical scan order or the scan order of the quantized transform coefficients may be a horizontal scan order or a right upward diagonal scan order. In addition, the scan order of sub-blocks may be a right-up diagonal scan order or the scan order of quantized transform coefficients may be a horizontal scan order or a vertical scan order.
한편, 설명한 바와 같이 변환 블록은 정방형일 수도 있고 비정방형일 수도 있으며, 비정방형의 변환 블록에 대해서도 서브 블록 단위로 양자화된 변환 계수의 스캔/재정렬을 수행할 수 있다.Meanwhile, as described, the transform block may be square or non-square, and the scan block may be quantized in sub-block units for the non-square transform block.
예컨대, 도 11의 예는 T/S=S인 경우라면 정방형 변환 블록에 대하여 정방형 서브 블록 단위로 양자화된 변환 계수의 스캔/재정렬이 수행되는 예가 되며, T/S≠S인 경우라면 비정방형 변환 블록에 대하여 정방형 서브 블록 단위로 양자화된 변환 계수의 스캔/재정렬이 수행되는 예가 된다. For example, in the case of T / S = S, the example of FIG. 11 is an example in which a scan / rearrangement of quantized transform coefficients is performed for a square transform block in units of square subblocks. An example of scanning / reordering transform coefficients quantized in units of square subblocks is performed on a block.
비정방형 변환 블록이 서브 블록 단위로 스캔된다면 각 서브 블록은 예컨대 도 4 및 도 11에서 설명한 바와 같이 스캔될 수 있다. If the non-square transform block is scanned in units of sub blocks, each sub block may be scanned as described with reference to FIGS. 4 and 11, for example.
예를 들어, 32x8 크기의 변환 블록(양자화된 변환 계수들의 2차원 배열)이 4x4 크기의 서브 블록 단위로 스캔되고 각 서브 블록별로 양자화된 변환 계수가 스캔되는 경우를 고려해 보자. 이 경우에 32x8 크기의 변환 블록에 대한 각 서브 블록은 8x2 크기의 블록에서 각 변환 계수에 대응할 수 있다. 따라서, 8x2 배열의 양자화된 변환 계수들을 스캔 하고 재정렬하는 방법과 동일한 방법으로 32x8 크기의 변환 블록에 대한 각 서브 블록들을 스캔 및 재정렬 할 수 있다. For example, consider a case in which a 32x8 transform block (two-dimensional array of quantized transform coefficients) is scanned in units of 4x4 subblocks and quantized transform coefficients are scanned for each subblock. In this case, each subblock for the 32x8 sized transform block may correspond to each transform coefficient in the 8x2 sized block. Accordingly, each subblock for a 32x8 transform block can be scanned and rearranged in the same manner as the method for scanning and rearranging 8x2 quantized transform coefficients.
이때, 서브 블록들을 우상향 대각 스캔 순서에 따라서 스캔하고 재정렬한다면, 도 5에서 설명한 방법과 동일하게 각 서브 블록을 양자화된 변환 계수로 가정하고 스캔/재정렬 할 수 있다.In this case, if the subblocks are scanned and rearranged according to a right-up diagonal scan order, the subblocks may be scanned / realigned assuming that each subblock is a quantized transform coefficient in the same manner as described in FIG. 5.
도 12는 비정방형 변환 블록에 대하여 서브 블록 단위로 변환 계수(양자화된 변환 계수)를 정렬하는 스캔 순서의 일 예를 설명하는 도면이다.FIG. 12 is a diagram for explaining an example of a scanning order for arranging transform coefficients (quantized transform coefficients) in sub-block units with respect to a non-square transform block.
도 12의 예에서는 비정방형 변환 블록으로서 32x8 크기의 변환 블록을 4x4 크기의 서브 블록 단위로 스캔/재정렬하는 스캔 순서로서, 서브 블록들과 양자화된 변환 계수들에 우상향 대각 스캔 순서가 적용되는 경우를 설명한다.In the example of FIG. 12, a scan order for scanning / realigning a 32x8 transform block in units of 4x4 subblocks as a non-square transform block, and a case in which a right-up diagonal scan order is applied to subblocks and quantized transform coefficients is illustrated. Explain.
도 12(a)는 디코딩 장치가 수신한 비트스트림으로부터 엔트로피 디코딩을 통해 획득한 1차원의 양자화된 변환 계수 배열(1200)를 나타낸 것이다. 변환 블록이 비정방형의 32x8인 경우, 양자화된 변환 계수의 개수는 도시된 바와 같이 0 ~ 255가 된다. FIG. 12A illustrates a one-dimensional quantized transform coefficient array 1200 obtained through entropy decoding from a bitstream received by a decoding apparatus. If the transform block is non-square 32x8, the number of quantized transform coefficients is 0 to 255 as shown.
디코딩 장치는 변환 계수 배열(1200)을 스캔하여, 적용된 스캔 순서에 따라 2차원 배열로 재정렬할 수 있다. The decoding apparatus scans the transform coefficient array 1200 and rearranges the transform coefficient array 1200 into a two-dimensional array according to the applied scan order.
도 12(b)는 우상향 대각 스캔 순서를 적용하여, 양자화된 변환 계수들을 32x8의 변환 블록에 재정렬한 것을 나타낸다. 12 (b) shows that the quantized transform coefficients are rearranged to a 32 × 8 transform block by applying a right-up diagonal scan order.
도 12(b)를 참조하면, 양자화된 변환 계수들이 재정렬된 32x8 크기의 변환 블록(1210)에는 스캔 단위 블록으로서 16개의 4x4 블록이 존재한다. 설명의 편의를 위해, 좌상측으로 첫 번째인 서브 블록을 변환 블록 내 첫 번째 서브 블록, 우하측으로 첫 번째인 서브 블록을 변환 블록 내 마지막 서브 블록이라고 한다. Referring to FIG. 12 (b), there are 16 4 × 4 blocks as a scan unit block in a 32 × 8 transform block 1210 in which quantized transform coefficients are rearranged. For convenience of description, the first subblock in the upper left side is called the first subblock in the transform block, and the first subblock in the lower right side is called the last subblock in the transform block.
양자화된 변환 계수의 1차원 배열(1200)을 정방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 첫 번째 서브 블록부터 시작하여 마지막 서브 블록까지 순서대로 양자화된 변환 계수를 재정렬한다. When scanning a one-dimensional array 1200 of quantized transform coefficients in a forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts from the first sub block and starts with the last sub block. Reorder the quantized transform coefficients in order up to the block.
예컨대, 첫 번째 서브 블록에 대한 재정렬 후 다음 서브 블록에 대한 재정렬을 수행하는 방식으로 마지막 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔 순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도 4의 예에서 설명한 바와 같이 좌상측 대각 열부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배열되며, 대각 열 내에서는 좌하측으로부터 우상측 대각 방향을 따라 순서대로 양자화된 변환 계수가 배열된다.For example, by reordering the first subblock after the reordering for the first subblock, the reordering is performed according to a right-up diagonal scan order for the subblocks until the reordering for the last subblock, and the second order of the quantized transform coefficients. You can create transform blocks composed of arrays. At this time, in each sub-block, as described in the example of FIG. 4, quantized transformation coefficients are arranged in diagonal columns in the order of progressing from the upper left diagonal column to the lower right diagonal column, and in the diagonal column, the right upper diagonal from the lower left side is arranged. The quantized transform coefficients are arranged in order along the direction.
양자화된 변환 계수의 1차원 배열(1200)을 역방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 마지막 서브 블록부터 시작하여 첫 번째 서브 블록까지 순서대로 양자화된 변환 계수를 재정렬한다. When scanning the one-dimensional array 1200 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first sub block starting from the last sub block. Reorder the quantized transform coefficients in order up to the block.
예컨대, 마지막 서브 블록에 대한 재정렬 후 그 이전 순서의 서브 블록에 대한 재정렬을 수행하는 방식으로 첫 번째 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔의 역순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도 4의 예에서 설명한 바와 같이 우하측 대각 열부터 좌상측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배열되며, 대각 열 내에서는 좌하측부터 우상측 대각 방향을 따라 순서대로 양자화된 변환 계수가 배열된다. For example, the rearrangement is performed according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock in such a manner that the reordering for the previous subblock after the reordering for the last subblock is performed. A transform block composed of a secondary array of transform coefficients can be generated. At this time, in each sub-block, as described in the example of FIG. 4, quantized transformation coefficients are arranged in diagonal columns in the order of progressing from the lower right diagonal column to the upper left diagonal column, and in the diagonal column, the lower left to upper right diagonal columns are arranged. The quantized transform coefficients are arranged in order along the direction.
여기서는 디코딩 장치가 1차원의 양자화된 변환 계수를 스캔하여 2차원의 양자화된 변환 계수 배열을 구성하는 것을 설명하였으나, 인코딩 장치도 동일한 방식을 이용하여 2차원의 양자화된 변환 계수 배열을 스캔하여 1차원의 양자화된 변환 계수 배열을 구성할 수 있다. Herein, the decoding apparatus scans the one-dimensional quantized transform coefficients to form a two-dimensional quantized transform coefficient array. However, the encoding apparatus scans the two-dimensional quantized transform coefficient array using the same method to perform one-dimensional. Quantized array of transform coefficients can be constructed.
예컨대, 도 12(b)의 2 차원 배열(변환 블록)에서 서브 블록들을 우상향 대각 스캔 순서대로 스캔하며, 각 서브 블록 내 2차원의 양자화된 변환 계수 배열들을 우상향 대각 스캔 순서대로 스캔하여 차례대로 배열함으로써, 도 12(a)와 같은 1 차원의 양자화된 변환 계수 배열을 구성할 수 있다. For example, in the two-dimensional array (transform block) of FIG. 12 (b), subblocks are scanned in a right-up diagonal scan order, and two-dimensional quantized transform coefficient arrays in each subblock are sequentially scanned in a right-up diagonal scan order. As a result, an array of one-dimensional quantized transform coefficients as shown in FIG. 12A can be configured.
도 12의 예에서는 비정방형 변환 블록 내의 서브 블록들과 양자화된 변환 계수들에 동일한 스캔 순서가 적용되는 경우를 설명하였으나, 본 발명은 이에 한정되지 않는다. 따라서, 비정방형 변환 블록 내의 서브 블록들에 적용되는 스캔 순서가 양자화된 변환 계수들에 적용되는 스캔 순서와 상이할 수도 있다. In the example of FIG. 12, the same scan order is applied to sub-blocks and quantized transform coefficients in the non-square transform block, but the present invention is not limited thereto. Thus, the scan order applied to the subblocks in the non-square transform block may be different from the scan order applied to the quantized transform coefficients.
예컨대, 서브 블록 내에서 양자화된 변환 계수들이 스캔되는 순서로서 우상향 대각 스캔 순서 외에 수평 스캔 순서 또는 수직 스캔 순서가 적용될 수도 있다. For example, a horizontal scan order or a vertical scan order may be applied as the order in which the quantized transform coefficients are scanned in the subblock, in addition to the upward upward diagonal scan order.
도 13은 비정방형 변환 블록에 대하여 서브 블록 단위로 변환 계수(양자화된 변환 계수)를 정렬하는 스캔 순서의 다른 예를 설명하는 도면이다.FIG. 13 is a view for explaining another example of a scan order of aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to a non-square transform block.
도 13의 예에서는 비정방형 변환 블록으로서 32x8 크기의 변환 블록을 4x4 크기의 서브 블록 단위로 스캔/재정렬하는 스캔 순서로서, 서브 블록들에는 우상향 대각 스캔 순서가 적용되고 양자화된 변환 계수들에는 수평 스캔 순서가 적용되는 경우를 설명한다.In the example of FIG. 13, as a non-square transform block, a scan order of scanning / realigning a 32x8 transform block in units of 4x4 subblocks is applied to the subblocks, and a right-up diagonal scan order is applied to the quantized transform coefficients. The case where the order is applied will be described.
도 13(a)는 디코딩 장치가 수신한 비트스트림으로부터 엔트로피 디코딩을 통해 획득한 1차원의 양자화된 변환 계수 배열(1300)를 나타낸 것이다. 변환 블록이 비정방형의 32x8인 경우, 양자화된 변환 계수의 개수는 도시된 바와 같이 0 ~ 255가 된다. FIG. 13A illustrates a one-dimensional quantized transform coefficient array 1300 obtained through entropy decoding from a bitstream received by a decoding apparatus. If the transform block is non-square 32x8, the number of quantized transform coefficients is 0 to 255 as shown.
디코딩 장치는 변환 계수 배열(1300)을 스캔하여, 적용된 스캔 순서에 따라 2차원 배열로 재정렬할 수 있다. The decoding apparatus scans the transform coefficient array 1300 and rearranges the transform coefficient array into a two-dimensional array according to the applied scan order.
도 13(b)는 서브 블록들에 우상향 대각 스캔 순서를 적용하고, 양자화된 변환 계수들에는 수평 스캔 순서를 적용하여 양자화된 변환 계수들을 서브 블록 단위로 재정렬한 것을 나타낸다. FIG. 13B illustrates rearrangement of quantized transform coefficients in sub-block units by applying a right-up diagonal scan order to subblocks and a horizontal scan order to quantized transform coefficients.
도 13(b)를 참조하면, 양자화된 변환 계수들이 재정렬된 32x8 크기의 변환 블록(1310)에는 스캔 단위 블록으로서 16개의 4x4 블록이 존재한다. 설명의 편의를 위해, 좌상측으로 첫 번째인 서브 블록을 변환 블록 내 첫 번째 서브 블록, 우하측으로 첫 번째인 서브 블록을 변환 블록 내 마지막 서브 블록이라고 한다. Referring to FIG. 13B, there are 16 4x4 blocks as a scan unit block in a 32x8 transform block 1310 in which quantized transform coefficients are rearranged. For convenience of description, the first subblock in the upper left side is called the first subblock in the transform block, and the first subblock in the lower right side is called the last subblock in the transform block.
양자화된 변환 계수의 1차원 배열(1300)을 정방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 첫 번째 서브 블록부터 시작하여 마지막 서브 블록까지 순서대로 양자화된 변환 계수를 재정렬한다. When scanning a one-dimensional array 1300 of quantized transform coefficients in a forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first sub block and starts with the last sub block. Reorder the quantized transform coefficients in order up to the block.
예컨대, 첫 번째 서브 블록에 대한 재정렬 후 다음 서브 블록에 대한 재정렬을 수행하는 방식으로 마지막 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔 순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도시된 바와 같이 수평 스캔 순서에 따라서 좌상측부터 우하측까지 차례대로 양자화된 변환 계수가 배열된다.For example, by reordering the first subblock after the reordering for the first subblock, the reordering is performed according to a right-up diagonal scan order for the subblocks until the reordering for the last subblock, and the second order of the quantized transform coefficients. You can create transform blocks composed of arrays. At this time, in each sub-block, the quantized transform coefficients are arranged in order from the upper left to the lower right in the horizontal scanning order as shown.
양자화된 변환 계수의 1차원 배열(1300)을 역방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 마지막 서브 블록부터 시작하여 첫 번째 서브 블록까지 순서대로 양자화된 변환 계수를 재정렬한다. When scanning the one-dimensional array 1300 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first sub block starting from the last sub block. Reorder the quantized transform coefficients in order up to the block.
예컨대, 마지막 서브 블록에 대한 재정렬 후 그 이전 순서의 서브 블록에 대한 재정렬을 수행하는 방식으로 첫 번째 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔의 역순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도시된 바와 같이, 우하측부터 좌상측 방향으로 수평 스캔의 역순서를 따라서 양자화된 변환 계수가 차례로 배열된다. For example, the rearrangement is performed according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock in such a manner that the reordering for the previous subblock after the reordering for the last subblock is performed. A transform block composed of a secondary array of transform coefficients can be generated. At this time, in each sub-block, as illustrated, the quantized transform coefficients are sequentially arranged in the reverse order of the horizontal scan from the lower right side to the upper left direction.
여기서는 디코딩 장치가 1차원의 양자화된 변환 계수를 스캔하여 2차원의 양자화된 변환 계수 배열을 구성하는 것을 설명하였으나, 인코딩 장치도 동일한 방식을 이용하여 2차원의 양자화된 변환 계수 배열을 스캔하여 1차원의 양자화된 변환 계수 배열을 구성할 수 있다. Herein, the decoding apparatus scans the one-dimensional quantized transform coefficients to form a two-dimensional quantized transform coefficient array. However, the encoding apparatus scans the two-dimensional quantized transform coefficient array using the same method to perform one-dimensional. Quantized array of transform coefficients can be constructed.
예컨대, 도 13(b)의 2 차원 배열(변환 블록)에서 서브 블록들을 우상향 대각 스캔 순서대로 스캔하며, 각 서브 블록 내 2차원의 양자화된 변환 계수 배열들을 수평 스캔 순서대로 스캔하여 차례대로 배열함으로써, 도 13(a)와 같은 1 차원의 양자화된 변환 계수 배열을 구성할 수 있다.For example, in the two-dimensional array (transform block) of FIG. 13 (b), the sub blocks are scanned in a right-up diagonal scan order, and the two-dimensional quantized transform coefficient arrays in each sub block are scanned in a horizontal scan order and sequentially arranged. As shown in FIG. 13A, one-dimensional quantized array of transform coefficients can be configured.
도 14는 비정방형 변환 블록에 대하여 서브 블록 단위로 변환 계수(양자화된 변환 계수)를 정렬하는 스캔 순서의 또 다른 예를 설명하는 도면이다.FIG. 14 is a view for explaining another example of a scan order of aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to a non-square transform block.
도 14의 예에서는 비정방형 변환 블록으로서 32x8 크기의 변환 블록을 4x4 크기의 서브 블록 단위로 스캔/재정렬하는 스캔 순서로서, 서브 블록들에는 우상향 대각 스캔 순서가 적용되고 양자화된 변환 계수들에는 수직 스캔 순서가 적용되는 경우를 설명한다.In the example of FIG. 14, as a non-square transform block, a scan order of scanning / realigning a 32x8 transform block in units of 4x4 subblocks is applied to the subblocks, and a vertical upward scan order is applied to the quantized transform coefficients. The case where the order is applied will be described.
도 14(a)는 디코딩 장치가 수신한 비트스트림으로부터 엔트로피 디코딩을 통해 획득한 1차원의 양자화된 변환 계수 배열(1400)를 나타낸 것이다. 변환 블록이 비정방형의 32x8인 경우, 양자화된 변환 계수의 개수는 도시된 바와 같이 0 ~ 255가 된다. FIG. 14A illustrates a one-dimensional quantized transform coefficient array 1400 obtained through entropy decoding from a bitstream received by a decoding apparatus. If the transform block is non-square 32x8, the number of quantized transform coefficients is 0 to 255 as shown.
디코딩 장치는 변환 계수 배열(1400)을 스캔하여, 적용된 스캔 순서에 따라 2차원 배열로 재정렬할 수 있다. The decoding apparatus scans the transform coefficient array 1400 and rearranges the transform coefficient array 1400 into a 2D array according to an applied scan order.
도 14(b)는 서브 블록들에 우상향 대각 스캔 순서를 적용하고, 양자화된 변환 계수들에는 수직 스캔 순서를 적용하여 양자화된 변환 계수들을 서브 블록 단위로 재정렬한 것을 나타낸다. FIG. 14B illustrates rearrangement of quantized transform coefficients in sub-block units by applying a right-up diagonal scan order to sub blocks and a vertical scan order to quantized transform coefficients.
도 14(b)를 참조하면, 양자화된 변환 계수들이 재정렬된 32x8 크기의 변환 블록(1410)에는 스캔 단위 블록으로서 16개의 4x4 블록이 존재한다. 설명의 편의를 위해, 좌상측으로 첫 번째인 서브 블록을 변환 블록 내 첫 번째 서브 블록, 우하측으로 첫 번째인 서브 블록을 변환 블록 내 마지막 서브 블록이라고 한다. Referring to FIG. 14B, there are 16 4x4 blocks as a scan unit block in a 32x8 transform block 1410 in which quantized transform coefficients are rearranged. For convenience of description, the first subblock in the upper left side is called the first subblock in the transform block, and the first subblock in the lower right side is called the last subblock in the transform block.
양자화된 변환 계수의 1차원 배열(1400)을 정방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 첫 번째 서브 블록부터 시작하여 마지막 서브 블록까지 순서대로 양자화된 변환 계수를 재정렬한다. When scanning a one-dimensional array 1400 of quantized transform coefficients in a forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts from the first subblock and starts with the last subblock. Reorder the quantized transform coefficients in order up to the block.
예컨대, 첫 번째 서브 블록에 대한 재정렬 후 다음 서브 블록에 대한 재정렬을 수행하는 방식으로 마지막 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔 순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도시된 바와 같이 수직 스캔 순서에 따라서 차례대로 양자화된 변환 계수가 배열된다.For example, by reordering the first subblock after the reordering for the first subblock, the reordering is performed according to a right-up diagonal scan order for the subblocks until the reordering for the last subblock, and the second order of the quantized transform coefficients. You can create transform blocks composed of arrays. At this time, in each sub-block, the quantized transform coefficients are arranged in order according to the vertical scan order as shown.
양자화된 변환 계수의 1차원 배열(1400)을 역방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 마지막 서브 블록부터 시작하여 첫 번째 서브 블록까지 순서대로 양자화된 변환 계수를 재정렬한다. In the case of scanning the one-dimensional array 1400 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first sub block starting from the last sub block. Reorder the quantized transform coefficients in order up to the block.
예컨대, 마지막 서브 블록에 대한 재정렬 후 그 이전 순서의 서브 블록에 대한 재정렬을 수행하는 방식으로 첫 번째 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔의 역순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도시된 바와 같이, 수직 스캔의 역순서를 따라서 양자화된 변환 계수가 차례로 배열된다. For example, the rearrangement is performed according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock in such a manner that the reordering for the previous subblock after the reordering for the last subblock is performed. A transform block composed of a secondary array of transform coefficients can be generated. At this time, in each sub-block, as illustrated, quantized transform coefficients are arranged in sequence according to the reverse order of the vertical scan.
여기서는 디코딩 장치가 1차원의 양자화된 변환 계수를 스캔하여 2차원의 양자화된 변환 계수 배열을 구성하는 것을 설명하였으나, 인코딩 장치도 동일한 방식을 이용하여 2차원의 양자화된 변환 계수 배열을 스캔하여 1차원의 양자화된 변환 계수 배열을 구성할 수 있다. Herein, the decoding apparatus scans the one-dimensional quantized transform coefficients to form a two-dimensional quantized transform coefficient array. However, the encoding apparatus scans the two-dimensional quantized transform coefficient array using the same method to perform one-dimensional. Quantized array of transform coefficients can be constructed.
예컨대, 도 14(b)의 2 차원 배열(변환 블록)에서 서브 블록들을 우상향 대각 스캔 순서대로 스캔하며, 각 서브 블록 내 2차원의 양자화된 변환 계수 배열들을 수직 스캔 순서대로 스캔하여 차례대로 배열함으로써, 도 14(a)와 같은 1 차원의 양자화된 변환 계수 배열을 구성할 수 있다.For example, in the two-dimensional array (transform block) of FIG. 14 (b), the sub blocks are scanned in a right-up diagonal scan order, and the two-dimensional quantized transform coefficient arrays in each sub block are scanned in a vertical scan order and sequentially arranged. As shown in FIG. 14A, one-dimensional quantized array of transform coefficients may be configured.
도 12 내지 도 14에서는 수평으로 긴 비정방형 변환 블록에 대한 스캔 및 재정렬에 관해 설명하였으나, 수직으로 긴 비정방향 변환 블록에 대해서도 동일하게 스캔 및 재정렬 과정을 수행할 수 있다. 12 to 14 have been described with respect to the scan and rearrangement for the horizontally long non-square transform block, the same scan and realignment process can be performed for the vertically long non-directional transform block.
도 15는 비정방형 변환 블록에 대하여 서브 블록 단위로 변환 계수(양자화된 변환 계수)를 정렬하는 스캔 순서의 또 다른 예를 설명하는 도면이다.FIG. 15 is a view for explaining another example of a scan order for aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to the non-square transform block.
도 15의 예에서는 비정방형 변환 블록으로서 8x32크기의 변환 블록을 4x4 크기의 서브 블록 단위로 스캔/재정렬하는 스캔 순서로서, 서브 블록들과 양자화된 변환 계수들에 우상향 대각 스캔 순서가 적용되는 경우를 설명한다.In the example of FIG. 15, a scan order for scanning / realigning an 8x32 sized transform block in units of 4x4 sized subblocks as a non-square transformed block, and a case in which a right-up diagonal scan order is applied to subblocks and quantized transform coefficients is illustrated. Explain.
도 15(a)는 디코딩 장치가 수신한 비트스트림으로부터 엔트로피 디코딩을 통해 획득한 1차원의 양자화된 변환 계수 배열(1500)를 나타낸 것이다. 변환 블록이 비정방형의 8x32인 경우, 양자화된 변환 계수의 개수는 도시된 바와 같이 0 ~ 255가 된다. FIG. 15A illustrates a one-dimensional quantized transform coefficient array 1500 obtained through entropy decoding from a bitstream received by a decoding apparatus. If the transform block is an 8x32 non-square, the number of quantized transform coefficients is 0 to 255 as shown.
디코딩 장치는 변환 계수 배열(1500)을 스캔하여, 적용된 스캔 순서에 따라 2차원 배열로 재정렬할 수 있다. The decoding apparatus may scan the transform coefficient array 1500 and rearrange the two-dimensional array according to the applied scan order.
도 15(b)는 우상향 대각 스캔 순서를 적용하여, 양자화된 변환 계수들을 8x32의 변환 블록에 재정렬한 것을 나타낸다. 15 (b) shows that the quantized transform coefficients are rearranged to 8 × 32 transform blocks by applying a right-up diagonal scan order.
도 15(b)를 참조하면, 양자화된 변환 계수들이 재정렬된 8x32 크기의 변환 블록(1510)에는 스캔 단위 블록으로서 16개의 4x4 블록이 존재한다. 설명의 편의를 위해, 좌상측으로 첫 번째인 서브 블록을 변환 블록 내 첫 번째 서브 블록, 우하측으로 첫 번째인 서브 블록을 변환 블록 내 마지막 서브 블록이라고 한다. Referring to FIG. 15B, there are 16 4x4 blocks as a scan unit block in an 8x32 transform block 1510 in which quantized transform coefficients are rearranged. For convenience of description, the first subblock in the upper left side is called the first subblock in the transform block, and the first subblock in the lower right side is called the last subblock in the transform block.
양자화된 변환 계수의 1차원 배열(1500)을 정방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 첫 번째 서브 블록부터 시작하여 마지막 서브 블록까지 순서대로 양자화된 변환 계수를 재정렬한다. When scanning a one-dimensional array 1500 of quantized transform coefficients in a forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts from the first sub block and starts with the last sub block. Reorder the quantized transform coefficients in order up to the block.
예컨대, 첫 번째 서브 블록에 대한 재정렬 후 다음 서브 블록에 대한 재정렬을 수행하는 방식으로 마지막 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔 순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도 4의 예에서 설명한 바와 같이 좌상측 대각 열부터 우하측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배열되며, 대각 열 내에서는 좌하측으로부터 우상측 대각 방향을 따라 순서대로 양자화된 변환 계수가 배열된다.For example, by reordering the first subblock after the reordering for the first subblock, the reordering is performed according to a right-up diagonal scan order for the subblocks until the reordering for the last subblock, and the second order of the quantized transform coefficients. You can create transform blocks composed of arrays. At this time, in each sub-block, as described in the example of FIG. 4, quantized transformation coefficients are arranged in diagonal columns in the order of progressing from the upper left diagonal column to the lower right diagonal column, and in the diagonal column, the right upper diagonal from the lower left side is arranged. The quantized transform coefficients are arranged in order along the direction.
양자화된 변환 계수의 1차원 배열(1500)을 역방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 마지막 서브 블록부터 시작하여 첫 번째 서브 블록까지 순서대로 양자화된 변환 계수를 재정렬한다. In the case of scanning the one-dimensional array 1500 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus starts with the first subblock starting from the last subblock. Reorder the quantized transform coefficients in order up to the block.
예컨대, 마지막 서브 블록에 대한 재정렬 후 그 이전 순서의 서브 블록에 대한 재정렬을 수행하는 방식으로 첫 번째 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔의 역순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도 4의 예에서 설명한 바와 같이 우하측 대각 열부터 좌상측 대각 열로 진행하는 순서에 따라서 대각 열들에 양자화된 변환 계수가 배열되며, 대각 열 내에서는 좌하측부터 우상측 대각 방향을 따라 순서대로 양자화된 변환 계수가 배열된다. For example, the rearrangement is performed according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock in such a manner that the reordering for the previous subblock after the reordering for the last subblock is performed. A transform block composed of a secondary array of transform coefficients can be generated. At this time, in each sub-block, as described in the example of FIG. 4, quantized transformation coefficients are arranged in diagonal columns in the order of progressing from the lower right diagonal column to the upper left diagonal column, and in the diagonal column, the lower left to upper right diagonal columns are arranged. The quantized transform coefficients are arranged in order along the direction.
여기서는 디코딩 장치가 1차원의 양자화된 변환 계수를 스캔하여 2차원의 양자화된 변환 계수 배열을 구성하는 것을 설명하였으나, 인코딩 장치도 동일한 방식을 이용하여 2차원의 양자화된 변환 계수 배열을 스캔하여 1차원의 양자화된 변환 계수 배열을 구성할 수 있다. Herein, the decoding apparatus scans the one-dimensional quantized transform coefficients to form a two-dimensional quantized transform coefficient array. However, the encoding apparatus scans the two-dimensional quantized transform coefficient array using the same method to perform one-dimensional. Quantized array of transform coefficients can be constructed.
예컨대, 도 15(b)의 2 차원 배열(변환 블록)에서 서브 블록들을 우상향 대각 스캔 순서대로 스캔하며, 각 서브 블록 내 2차원의 양자화된 변환 계수 배열들을 우상향 대각 스캔 순서대로 스캔하여 차례대로 배열함으로써, 도 15(a)와 같은 1 차원의 양자화된 변환 계수 배열을 구성할 수 있다. For example, in the two-dimensional array (transform block) of FIG. 15 (b), subblocks are scanned in a right-up diagonal scan order, and two-dimensional quantized transform coefficient arrays in each subblock are sequentially scanned in a right-up diagonal scan order. As a result, an array of one-dimensional quantized transform coefficients as shown in FIG. 15A can be configured.
도 16은 비정방형 변환 블록에 대하여 서브 블록 단위로 변환 계수(양자화된 변환 계수)를 정렬하는 스캔 순서의 또 다른 예를 설명하는 도면이다.FIG. 16 is a view for explaining another example of a scanning order for aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to the non-square transform block.
도 16의 예에서는 비정방형 변환 블록으로서 8x32 크기의 변환 블록을 4x4 크기의 서브 블록 단위로 스캔/재정렬하는 스캔 순서로서, 서브 블록들에는 우상향 대각 스캔 순서가 적용되고 양자화된 변환 계수들에는 수평 스캔 순서가 적용되는 경우를 설명한다.In the example of FIG. 16, as a non-square transform block, a scan order of scanning / realigning an 8x32 transform block in units of 4x4 subblocks is performed. The case where the order is applied will be described.
도 16(a)는 디코딩 장치가 수신한 비트스트림으로부터 엔트로피 디코딩을 통해 획득한 1차원의 양자화된 변환 계수 배열(1600)를 나타낸 것이다. FIG. 16A illustrates a one-dimensional quantized transform coefficient array 1600 obtained through entropy decoding from a bitstream received by a decoding apparatus.
도 16(b)는 서브 블록들에 우상향 대각 스캔 순서를 적용하고, 양자화된 변환 계수들에는 수평 스캔 순서를 적용하여 양자화된 변환 계수들을 서브 블록 단위로 재정렬한 것을 나타낸다. FIG. 16 (b) shows that the quantized transform coefficients are rearranged in sub-block units by applying a right-up diagonal scan order to sub blocks and a horizontal scan order to quantized transform coefficients.
도 16(b)를 참조하면, 양자화된 변환 계수들이 재정렬된 8x32 크기의 변환 블록(1610)에는 스캔 단위 블록으로서 16개의 4x4 블록이 존재한다. 설명의 편의를 위해, 좌상측으로 첫 번째인 서브 블록을 변환 블록 내 첫 번째 서브 블록, 우하측으로 첫 번째인 서브 블록을 변환 블록 내 마지막 서브 블록이라고 한다. Referring to FIG. 16B, there are 16 4x4 blocks as a scan unit block in an 8x32 transform block 1610 in which quantized transform coefficients are rearranged. For convenience of description, the first subblock in the upper left side is called the first subblock in the transform block, and the first subblock in the lower right side is called the last subblock in the transform block.
양자화된 변환 계수의 1차원 배열(1600)을 정방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 첫 번째 서브 블록에 대한 재정렬 후 다음 서브 블록에 대한 재정렬을 수행하는 방식으로 마지막 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔 순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도시된 바와 같이 수평 스캔 순서에 따라서 좌상측부터 우하측까지 차례대로 양자화된 변환 계수가 배열된다.In the case of scanning the one-dimensional array 1600 of quantized transform coefficients in the forward direction (a direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus then realigns the first subblock after The reordering of the subblocks may be performed according to a right-up diagonal scan order for the subblocks until the reordering of the last subblock, and a transform block configured of a secondary array of quantized transform coefficients may be generated. At this time, in each sub-block, the quantized transform coefficients are arranged in order from the upper left to the lower right in the horizontal scanning order as shown.
양자화된 변환 계수의 1차원 배열(1600)을 역방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 마지막 서브 블록에 대한 재정렬 후 그 이전 순서의 서브 블록에 대한 재정렬을 수행하는 방식으로 첫 번째 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔의 역순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도시된 바와 같이, 우하측부터 좌상측 방향으로 수평 스캔의 역순서를 따라서 양자화된 변환 계수가 차례로 배열된다. In the case of scanning the one-dimensional array 1600 of quantized transform coefficients in the reverse direction (the direction proceeding from zero quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus returns before and after reordering the last subblock. Perform a reordering according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock by reordering the subblocks of the order, and then convert the transform block consisting of the secondary array of quantized transform coefficients. Can be generated. At this time, in each sub-block, as illustrated, the quantized transform coefficients are sequentially arranged in the reverse order of the horizontal scan from the lower right side to the upper left direction.
인코딩 장치도 도 16(b)의 2 차원 배열(변환 블록)에서 서브 블록들을 우상향 대각 스캔 순서대로 스캔하며, 각 서브 블록 내 2차원의 양자화된 변환 계수 배열들을 수평 스캔 순서대로 스캔하여 차례대로 배열함으로써, 도 16(a)와 같은 1 차원의 양자화된 변환 계수 배열을 구성할 수 있다.The encoding apparatus also scans the sub-blocks in a right-up diagonal scan order in the two-dimensional array (transform block) of FIG. 16 (b), and sequentially arranges the two-dimensional quantized transform coefficient arrays in each sub-block in a horizontal scan order. As a result, an array of one-dimensional quantized transform coefficients as shown in FIG. 16 (a) can be configured.
도 17은 비정방형 변환 블록에 대하여 서브 블록 단위로 변환 계수(양자화된 변환 계수)를 정렬하는 스캔 순서의 또 다른 예를 설명하는 도면이다.FIG. 17 is a view for explaining another example of a scan order of aligning transform coefficients (quantized transform coefficients) in sub-block units with respect to a non-square transform block.
도 17의 예에서는 비정방형 변환 블록으로서 8x32 크기의 변환 블록을 4x4 크기의 서브 블록 단위로 스캔/재정렬하는 스캔 순서로서, 서브 블록들에는 우상향 대각 스캔 순서가 적용되고 양자화된 변환 계수들에는 수직 스캔 순서가 적용되는 경우를 설명한다.In the example of FIG. 17, a scan order of scanning / realigning an 8x32 transform block in units of 4x4 subblocks as a non-square transform block, a right-up diagonal scan order is applied to subblocks, and a vertical scan is applied to quantized transform coefficients. The case where the order is applied will be described.
도 17(a)는 디코딩 장치가 수신한 비트스트림으로부터 엔트로피 디코딩을 통해 획득한 1차원의 양자화된 변환 계수 배열(1700)를 나타낸 것이다. FIG. 17A illustrates a one-dimensional quantized transform coefficient array 1700 obtained through entropy decoding from a bitstream received by a decoding apparatus.
도 17(b)는 서브 블록들에 우상향 대각 스캔 순서를 적용하고, 양자화된 변환 계수들에는 수직 스캔 순서를 적용하여 양자화된 변환 계수들을 서브 블록 단위로 재정렬한 것을 나타낸다. FIG. 17B illustrates rearrangement of quantized transform coefficients in sub-block units by applying a right-up diagonal scan order to subblocks and a vertical scan order to quantized transform coefficients.
도 17(b)를 참조하면, 양자화된 변환 계수들이 재정렬된 8x32 크기의 변환 블록(1710)에는 스캔 단위 블록으로서 16개의 4x4 블록이 존재한다. 설명의 편의를 위해, 좌상측으로 첫 번째인 서브 블록을 변환 블록 내 첫 번째 서브 블록, 우하측으로 첫 번째인 서브 블록을 변환 블록 내 마지막 서브 블록이라고 한다. Referring to FIG. 17B, there are 16 4x4 blocks as a scan unit block in an 8x32 transform block 1710 in which quantized transform coefficients are rearranged. For convenience of description, the first subblock in the upper left side is called the first subblock in the transform block, and the first subblock in the lower right side is called the last subblock in the transform block.
양자화된 변환 계수의 1차원 배열(1700)을 정방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 첫 번째 서브 블록에 대한 재정렬 후 다음 서브 블록에 대한 재정렬을 수행하는 방식으로 마지막 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔 순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도시된 바와 같이 수직 스캔 순서에 따라서 차례대로 양자화된 변환 계수가 배열된다.In the case of scanning the one-dimensional array 1700 of quantized transform coefficients in the forward direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus next realigns the first sub-block after The reordering of the subblocks may be performed according to a right-up diagonal scan order for the subblocks until the reordering of the last subblock, and a transform block configured of a secondary array of quantized transform coefficients may be generated. At this time, in each sub-block, the quantized transform coefficients are arranged in order according to the vertical scan order as shown.
양자화된 변환 계수의 1차원 배열(1700)을 역방향(0의 양자화된 변환 계수로부터 255의 양자화된 변환 계수로 진행하는 방향)으로 스캔하는 경우에, 디코딩 장치는 마지막 서브 블록에 대한 재정렬 후 그 이전 순서의 서브 블록에 대한 재정렬을 수행하는 방식으로 첫 번째 서브 블록에 대한 재정렬까지 서브 블록들에 대한 우상향 대각 스캔의 역순서에 따라서 재정렬을 수행하고 양자화된 변환 계수들의 2 차 배열로 구성된 변환 블록을 생성할 수 있다. 이때, 각 서브 블록 내에서는 도시된 바와 같이, 수직 스캔의 역순서를 따라서 양자화된 변환 계수가 차례로 배열된다. In the case of scanning the one-dimensional array 1700 of quantized transform coefficients in the reverse direction (the direction from 0 quantized transform coefficients to 255 quantized transform coefficients), the decoding apparatus returns before and after reordering the last subblock. Perform a reordering according to the reverse order of the right-up diagonal scan for the subblocks until the reordering for the first subblock by reordering the subblocks of the order, and then convert the transform block consisting of the secondary array of quantized transform coefficients. Can be generated. At this time, in each sub-block, as illustrated, quantized transform coefficients are arranged in sequence according to the reverse order of the vertical scan.
인코딩 장치도, 동일한 방식을 이용하여, 도 17(b)의 2 차원 배열(변환 블록)에서 서브 블록들을 우상향 대각 스캔 순서대로 스캔하며, 각 서브 블록 내 2차원의 양자화된 변환 계수 배열들을 수직 스캔 순서대로 스캔하여 차례대로 배열함으로써, 도 17(a)와 같은 1 차원의 양자화된 변환 계수 배열을 구성할 수 있다.The encoding apparatus also scans the sub-blocks in a right-up diagonal scan order in the two-dimensional array (transform block) of FIG. 17 (b) using the same method, and vertically scans the two-dimensional quantized transform coefficient arrays in each sub-block. By sequentially scanning and arranging one by one, one-dimensional quantized transform coefficient arrays as shown in Fig. 17A can be constructed.
도 12 내지 도 17에서는 32x8의 비정방형 변환 블록 또는 8x32의 비정방형 변환 블록에 대하여 설명하였으나, 본 발명은 이에 한정되지 않으며, 다른 크기의 비정방형 변환 블록에 대해서도 동일한 방법으로 적용될 수 있다. 12 to 17 illustrate a 32 × 8 non-square transform block or an 8 × 32 non-square transform block, the present invention is not limited thereto and may be applied to the non-square transform block having a different size in the same manner.
지금까지는 비정방형 변환 블록의 경우에는 서브 블록들에 대하여 우상향 대각 스캔 순서가 적용되는 것으로 설명하였으나, 본 발명은 이에 한정되지 않는다. 예컨대, 비정방형 변환 블록의 경우에 서브 블록들에 적용되는 스캔 순서를 인코딩 장치가 시그널링 할 수도 있다. 또한, 비정방형 변환 블록에 적용된 예측 모드에 따라서 스캔 순서를 적용할 수도 있다. 예컨대, 비정방형 변환 블록에 적용되는 인트라 예측 모드가 수평 방향의 예측 모드이면 수직 스캔 순서를 적용하고, 비정방형 변환 블록에 적용되는 인트라 예측 모드가 수직 방향의 예측 모드이면 수평 스캔 순서를 적용하며, 그 외의 인트라 예측 모드가 적용되었거나 인터 예측 모드가 적용된 경우에는 우상향 대각 예측 순서를 적용하도록 할 수 있다.Up to now, in the case of the non-square transform block has been described that the right-up diagonal scan order is applied to the sub-blocks, the present invention is not limited thereto. For example, in the case of a non-square transform block, the encoding apparatus may signal a scan order applied to the sub blocks. In addition, the scan order may be applied according to the prediction mode applied to the non-square transform block. For example, if the intra prediction mode applied to the non-square transform block is the prediction mode in the horizontal direction, the vertical scan order is applied. If the intra prediction mode is applied to the non-square transform block is the prediction mode in the vertical direction, the horizontal scan order is applied. When other intra prediction modes or inter prediction modes are applied, a right upward diagonal prediction order may be applied.
지금까지는 양자화된 변환 계수의 스캔/재정렬을 인코딩 장치와 디코딩 장치가 수행하는 것으로 설명하였으나, 이는 설명의 편의를 위한 것으로서 본 발명은 이에 한정되지 않는다. 예컨대, 양자화된 변환 계수의 스캔/재정렬은 인코딩 장치와 디코딩 장치 내에 위치하는 재정렬부(125, 215)에서 수행될 수 있다. Until now, the encoding and decoding apparatuses perform scan / reordering of quantized transform coefficients. However, this is for convenience of description and the present invention is not limited thereto. For example, scan / reordering of the quantized transform coefficients may be performed by the reordering units 125 and 215 located in the encoding apparatus and the decoding apparatus.
도 18은 본 발명에 따라서 인코딩 장치가 양자화된 변환 계수를 스캔하는 방법을 개략적으로 설명하는 순서도이다. 18 is a flowchart schematically illustrating a method for scanning a quantized transform coefficient by an encoding apparatus according to the present invention.
도 18을 참조하면, 인코딩 장치는 레지듀얼 신호를 변환한다(S1810). 레지듀얼 신호는 예측에 의해 생성된 예측 신호와 원본 신호의 차분 값으로서 생성될 수 있다. 인코딩 장치는 변환 블록 단위로 레지듀얼 신호를 변환하여 변환 계수들의 2차원 배열로 구성된 변환 블록을 생성할 수 있다. 변환 계수들은 시간 영역에서의 신호들을 주파수 영역으로 변환하여 생성한 계수들일 수 있다.Referring to FIG. 18, the encoding apparatus converts the residual signal (S1810). The residual signal may be generated as a difference value between the prediction signal generated by the prediction and the original signal. The encoding apparatus may generate a transform block composed of a two-dimensional array of transform coefficients by transforming the residual signal in units of transform blocks. The transform coefficients may be coefficients generated by converting signals in the time domain into the frequency domain.
이때, 이용하는 서비스, 제품 사양 등에 따라서 비정방형 변환이 이용될 수도 있다. 따라서, 변환이 적용되는 변환 블록은 2x8, 8x2, 4x16, 16x4, 8x32, 32x8 등과 같은 크기의 비정방형 변환 블록일 수 있다. In this case, a non-square transformation may be used according to a service, a product specification, etc. to be used. Accordingly, the transform block to which the transform is applied may be a non-square transform block having a size of 2x8, 8x2, 4x16, 16x4, 8x32, 32x8, or the like.
인코딩 장치는 변환 계수를 양자화한다(S1820). 인코딩 장치는 변환 블록 내 변환 계수를 양자화하여 양자화된 변환 계수들로 구성된 변환 블록을 생성한다.The encoding apparatus quantizes the transform coefficients (S1820). The encoding apparatus quantizes the transform coefficients in the transform block to generate a transform block composed of quantized transform coefficients.
인코딩 장치는 양자화된 변환 계수들을 재정렬 한다(S1830). 인코딩 장치는 상술한 바와 같이 양자화된 변환 계수들의 2차원 배열을 스캔하여 1차원 배열로 재정렬 할 수 있다. 이때, 양자화된 변환 계수들의 2차원 배열(양자화된 변환 계수들로 구성된 변환 블록)은 비정방형일 수 있으며, 스캔 및 재정렬은 변환 블록의 서브 블록 단위로 수행될 수 있다.The encoding apparatus rearranges the quantized transform coefficients (S1830). As described above, the encoding apparatus may scan the two-dimensional array of quantized transform coefficients and rearrange the one-dimensional array. In this case, the two-dimensional array of quantized transform coefficients (transform block composed of quantized transform coefficients) may be non-square, and scan and reordering may be performed in units of subblocks of the transform block.
인코딩 장치는 1차원의 양자화된 변환 계수들을 엔트로피 인코딩할 수 있다(S1840). 인코딩 장치는 1차원의 양자화된 변환 계수들을 엔트로피 인코딩하고 디코딩에 필요한 정보들과 함께 비트스트림으로 전송할 수 있다. The encoding apparatus may entropy encode one-dimensional quantized transform coefficients (S1840). The encoding apparatus may entropy encode one-dimensional quantized transform coefficients and transmit the information in a bitstream together with information necessary for decoding.
도 19는 본 발명에 따라서 디코딩 장치가 양자화된 변환 계수를 스캔하는 방법을 개략적으로 설명하는 순서도이다.19 is a flowchart schematically illustrating a method for scanning a quantized transform coefficient by a decoding apparatus according to the present invention.
도 19를 참조하면, 디코딩 장치는 인코딩 장치로부터 수신한 비트스트림을 엔트로피 디코딩한다(S1910). 디코딩 장치는 엔트로피 디코딩을 통해 1차원의 양자화된 변환 계수 배열을 획들할 수 있다. Referring to FIG. 19, the decoding apparatus entropy decodes a bitstream received from the encoding apparatus (S1910). The decoding apparatus may capture the one-dimensional quantized transform coefficient array through entropy decoding.
디코딩 장치는 양자화된 변환 계수들을 재정렬 한다(S1920). 디코딩 장치는 상술한 바와 같이 양자화된 변환 계수들의 1차원 배열을 스캔하여 2 차원 배열로 재정렬할 수 있다. 이때, 양자화된 변환 계수들의 2 차원 배열(양자화된 변환 계수들로 구성되는 변환 블록)은 비정방형일 수 있으며, 스캔 및 재정렬은 변환 블록의 서브 블록 단위로 수행될 수 있다.The decoding apparatus rearranges the quantized transform coefficients (S1920). As described above, the decoding apparatus may scan the one-dimensional array of quantized transform coefficients and rearrange the two-dimensional array. In this case, the two-dimensional array of quantized transform coefficients (transform block composed of quantized transform coefficients) may be non-square, and scan and reordering may be performed in units of subblocks of the transform block.
디코딩 장치는 양자화된 변환 계수들을 역양자화 한다(S1930). 디코딩 장치는 변환 블록 내 양자화된 변환 계수들을 역양자화 하여 변환 계수들로 구성된 변환 블록을 생성할 수 있다.The decoding apparatus dequantizes the quantized transform coefficients (S1930). The decoding apparatus may inversely quantize the quantized transform coefficients in the transform block to generate a transform block composed of the transform coefficients.
디코딩 장치는 변환 블록에 대한 역변환을 수행할 수 있다(S1940). 변환 블록은 상술한 바와 같이 비정방형일 수 있다. The decoding apparatus may perform inverse transform on the transform block (S1940). The transform block can be non-square as described above.
디코딩 장치는 변환 블록을 역변환하여 레지듀얼 신호들을 생성할 수 있으며, 생성된 레지듀얼 신호와 예측에 의해 생성된 예측 신호를 합하여 원본 신호를 복원할 수 있다.The decoding apparatus may generate residual signals by inversely transforming the transform block, and reconstruct the original signal by adding the generated residual signal and the prediction signal generated by the prediction.
본 명세서에서 Ci,j는 좌표 (i,j)에 위치하는 양자화된 변환 계수를 나타낼 수도 있고, 양자화된 변환 계수가 위치하는 좌표 (i,j)를 나타낼 수도 있다. 또한, CKi,j는 변환 블록 내의 K 번째 서브 블록에서 좌표 (i,j)에 위치하는 양자화된 변환 계수를 나타낼 수도 있고, 변환 블록 내의K 번째 서브 블록에서 양자화된 변환 계수가 위치하는 좌표 (i,j)를 나타낼 수도 있다In the present specification, C i, j may represent a quantized transform coefficient located at coordinate (i, j) or may represent a coordinate (i, j) at which the quantized transform coefficient is located. Further, C Ki, j may represent quantized transform coefficients located at coordinates (i, j) in the K-th subblock in the transform block , and C Ki, j may indicate coordinates (where quantized transform coefficients are located in the Kth subblock in the transform block). i, j)
또한, 본 명세서에서는 ‘0의 양자화된 변환 계수’, ‘1의 양자화된 변환 계수’ 등의 표현을 사용하였으나, 이는 설명의 편의를 위한 것으로서, ‘X의 양자화된 변환 계수’는 ‘(도면에서) X로 표시된 (위치의) 양자화된 변환 계수’를 의미한다. In addition, in the present specification, expressions such as' quantized transform coefficient of 0 'and' quantized transform coefficient of 1 'are used for convenience of description, and' quantized transform coefficient of X 'is represented by' (in the drawing. Quantized transform coefficient (in position) denoted by X '.
또한, 본 명세서에서 대각 열은 2차원 배열에 있어서 대각선 배열 상에 위치하는 원소(샘플 혹은 (양자화된) 변환 계수)의 열을 말한다. 예컨대, 대각 열 상의 왼쪽 아래 방향의 첫 번째 원소에 대한 좌표를 (i,j)라고 할 때, 대각 열 상에서 2차원 배열의 원소들은 {(i,j) (i+1,j-1) (i+2,j-2)…} 의 순서로 배치되어 있다. 이때, 대각 열의 원소들은 2 차원 배열 내의 원소들을 의미한다. Further, in this specification, a diagonal column refers to a column of elements (sample or (quantized) transform coefficients) positioned on the diagonal array in the two-dimensional array. For example, when the coordinate of the first element in the lower left direction on the diagonal column is (i, j), the elements of the two-dimensional array on the diagonal column are {(i, j) (i + 1, j-1) ( i + 2, j-2)... } In order. In this case, the elements in the diagonal column mean the elements in the two-dimensional array.
상술한 예시적인 시스템에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 상술한 실시예들은 다양한 양태의 예시들을 포함한다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.In the exemplary system described above, the methods are described based on a flowchart as a series of steps or blocks, but the invention is not limited to the order of steps, and certain steps may occur in a different order or concurrently with other steps than those described above. Can be. In addition, the above-described embodiments include examples of various aspects. Accordingly, it is intended that the present invention cover all other replacements, modifications and variations that fall within the scope of the following claims.
지금까지 본 발명에 관한 설명에서 일 구성 요소가 타 구성 요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 상기 일 다른 구성 요소가 상기 타 구성 요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 상기 두 구성 요소 사이에 다른 구성 요소가 존재할 수도 있다고 이해되어야 한다. 반면에, 일 구성 요소가 타 구성 요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 두 구성 요소 사이에 다른 구성요소가 존재하지 않는 것으로 이해되어야 한다.So far in the description of the present invention, when one component is referred to as being "connected" or "connected" to another component, the other component is directly connected to or connected to the other component. It may be, but it should be understood that other components may exist between the two components. On the other hand, when one component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that no other component exists between the two components.

Claims (18)

  1. 변환 계수들로 구성된 변환 블록을 양자화 하는 단계;
    양자화된 변환 계수들을 상기 변환 블록의 서브 블록 단위로 스캔하여 1차원 배열로 재정렬하는 단계; 및
    상기 재정렬된 1차원 배열의 양자화된 변환 계수를 엔트로피 인코딩하여 전송하는 단계를 포함하며,
    상기 변환 블록은 비정방형 블록인 것을 특징으로 하는 변환 계수 재정렬 방법.
    Quantizing a transform block composed of transform coefficients;
    Rescanning the quantized transform coefficients into sub-block units of the transform block into a one-dimensional array; And
    Entropy encoding and transmitting the quantized transform coefficients of the rearranged one-dimensional array,
    And a transform block is a non-square block.
  2. 제1항에 있어서, 상기 재정렬 단계에서는 서브 블록들에 대한 스캔 순서와 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 스캔 순서가 동일한 것을 특징으로 하는 변환 계수 재정렬 방법.2. The method of claim 1, wherein the reordering step includes a scan order for subblocks and a scan order for quantized transform coefficients in the subblocks.
  3. 제1항에 있어서, 상기 변환 블록 내의 서브 블록들에 대한 스캔 순서는 우상향 대각 스캔 순서인 것을 특징으로 하는 변환 계수 재정렬 방법.The method of claim 1, wherein the scan order of subblocks in the transform block is a right-up diagonal scan order.
  4. 제3항에 있어서, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 스캔 순서는 우상향 대각 스캔 순서인 것을 특징으로 하는 변환 계수 재정렬 방법.4. The method of claim 3, wherein the scan order for quantized transform coefficients in the subblocks is a right-up diagonal scan order.
  5. 제3항에 있어서, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 스캔 순서는 수평 스캔 순서인 것을 특징으로 하는 변환 계수 재정렬 방법.4. The method of claim 3, wherein the scan order for quantized transform coefficients in the subblocks is a horizontal scan order.
  6. 제3항에 있어서, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 스캔 순서는 수직 스캔 순서인 것을 특징으로 하는 변환 계수 재정렬 방법.4. The method of claim 3, wherein the scan order for quantized transform coefficients in the subblocks is a vertical scan order.
  7. 제1항에 있어서, 상기 변환 블록은 32x8 크기 또는 8x32 크기의 변환 블록인 것을 특징으로 하는 변환 계수 재정렬 방법.The method of claim 1, wherein the transform block is a 32x8 or 8x32 transform block.
  8. 제1항에 있어서, 상기 서브 블록은 4x4 크기의 블록인 것을 특징으로 하는 변환 계수 재정렬 방법.The method of claim 1, wherein the sub-blocks are 4x4 sized blocks.
  9. 양자화된 변환 계수들의 1차원 배열을 획득하는 엔트로피 디코딩 단계; 및
    상기 양자화된 변환 계수들의 1차원 배열을 스캔하여 상기 양자화된 변환 계수들의 변환 블록으로 재정렬하는 단계를 포함하고,
    상기 재정렬 단계에서는 상기 변환 블록의 서브 블록 단위로 양자화된 변환 계수들을 재정렬하며,
    상기 변환 블록은 비정방형 블록인 것을 특징으로 하는 변환 계수 재정렬 방법.
    An entropy decoding step of obtaining a one-dimensional array of quantized transform coefficients; And
    Scanning and aligning the one-dimensional array of quantized transform coefficients into a transform block of the quantized transform coefficients,
    In the reordering step, the quantized transform coefficients are rearranged in units of subblocks of the transform block,
    And a transform block is a non-square block.
  10. 제9항에 있어서, 상기 재정렬 단계에서는 서브 블록들의 재정렬 순서와 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 재정렬 순서가 동일한 것을 특징으로 하는 변환 계수 재정렬 방법.10. The method of claim 9, wherein in the reordering step, the reordering order of subblocks and the reordering order of quantized transform coefficients in the subblocks are the same.
  11. 제9항에 있어서, 상기 변환 블록 내의 서브 블록들에 대한 재정렬 순서는 우상향 대각 스캔 순서인 것을 특징으로 하는 변환 계수 재정렬 방법.10. The method of claim 9, wherein the reordering order for the subblocks in the transform block is a right-up diagonal scan order.
  12. 제11항에 있어서, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 재정렬 순서는 우상향 대각 스캔 순서인 것을 특징으로 하는 변환 계수 재정렬 방법.12. The method of claim 11, wherein the reordering order of the quantized transform coefficients in the subblocks is a right-up diagonal scan order.
  13. 제11항에 있어서, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 재정렬 순서는 수평 스캔 순서인 것을 특징으로 하는 변환 계수 재정렬 방법.12. The method of claim 11, wherein the reordering order of the quantized transform coefficients in the subblocks is a horizontal scan order.
  14. 제11항에 있어서, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 재정렬 순서는 수직 스캔 순서인 것을 특징으로 하는 변환 계수 재정렬 방법.12. The method of claim 11, wherein the reordering order of the quantized transform coefficients in the subblocks is a vertical scan order.
  15. 제9항에 있어서, 상기 재정렬 단계에서 상기 양자화된 변환 계수의 1차원 배열을 역방향으로 스캔하는 경우에 상기 서브 블록 단위의 재정렬은 상기 변환 블록 마지막 서브 블록부터 첫 번째 서브 블록 방향으로 우상향 대각 스캔의 순서에 따라서 수행되는 것을 특징으로 하는 변환 계수 재정렬 방법.10. The method of claim 9, wherein in the reordering step, when the one-dimensional array of the quantized transform coefficients is scanned in the reverse direction, the reordering of the subblock units is performed by a right-up diagonal scan in the direction of the first subblock from the last subblock of the transform block. The method of reordering transform coefficients, characterized in that performed in order.
  16. 제15항에 있어서, 상기 서브 블록들 내의 양자화된 변환 계수들에 대한 재정렬 순서는 상기 서브 블록 내 마지막 양자화된 변환 계수부터 첫 번째 양자화된 변환 계수 방향으로 우상향 대각 스캔 순서에 따라 수행되는 것을 특징으로 하는 변환 계수 재정렬 방법.The method of claim 15, wherein the reordering order of the quantized transform coefficients in the subblocks is performed according to a right-up diagonal scan order from the last quantized transform coefficient in the subblock to the first quantized transform coefficient direction. How to reorder transform coefficients.
  17. 제9항에 있어서, 상기 비정방형 블록은 8x32 크기의 블록 또는 32x8 크기의 블록인 것을 특징으로 하는 변환 계수 재정렬 방법.10. The method of claim 9, wherein the non-square block is an 8x32 block or a 32x8 block.
  18. 제9항에 있어서, 상기 서브 블록은 4x4 크기의 블록인 것을 특징으로 하는 변환 계수 재정렬 방법.10. The method of claim 9, wherein the sub block is a 4 × 4 block.
PCT/KR2012/010119 2011-11-27 2012-11-27 Method for realigning transform coefficient and device using same WO2013077713A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201161563821P 2011-11-27 2011-11-27
US61/563,821 2011-11-27

Publications (1)

Publication Number Publication Date
WO2013077713A1 true WO2013077713A1 (en) 2013-05-30

Family

ID=48470087

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2012/010119 WO2013077713A1 (en) 2011-11-27 2012-11-27 Method for realigning transform coefficient and device using same

Country Status (1)

Country Link
WO (1) WO2013077713A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999016250A1 (en) * 1997-09-23 1999-04-01 Telefonaktiebolaget Lm Ericsson (Publ) An embedded dct-based still image coding algorithm
KR20090129939A (en) * 2008-06-13 2009-12-17 삼성전자주식회사 Method and apparatus for image encoding by dynamic unit grouping, method and apparatus for image decoding by dynamic unit grouping
KR20100095992A (en) * 2009-02-23 2010-09-01 한국과학기술원 Method for encoding partitioned block in video encoding, method for decoding partitioned block in video decoding and recording medium implementing the same
JP2011182132A (en) * 2010-02-26 2011-09-15 Panasonic Corp Image encoding apparatus, image decoding apparatus, image encoding method, image decoding method, integrated circuit, and program
WO2011128303A2 (en) * 2010-04-13 2011-10-20 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Coding of significance maps and transform coefficient blocks

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999016250A1 (en) * 1997-09-23 1999-04-01 Telefonaktiebolaget Lm Ericsson (Publ) An embedded dct-based still image coding algorithm
KR20090129939A (en) * 2008-06-13 2009-12-17 삼성전자주식회사 Method and apparatus for image encoding by dynamic unit grouping, method and apparatus for image decoding by dynamic unit grouping
KR20100095992A (en) * 2009-02-23 2010-09-01 한국과학기술원 Method for encoding partitioned block in video encoding, method for decoding partitioned block in video decoding and recording medium implementing the same
JP2011182132A (en) * 2010-02-26 2011-09-15 Panasonic Corp Image encoding apparatus, image decoding apparatus, image encoding method, image decoding method, integrated circuit, and program
WO2011128303A2 (en) * 2010-04-13 2011-10-20 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Coding of significance maps and transform coefficient blocks

Similar Documents

Publication Publication Date Title
US11616989B2 (en) Entropy decoding method, and decoding apparatus using same
US9826251B2 (en) Method and apparatus for encoding/decoding image
KR102295680B1 (en) Intra prediction method and encoding apparatus and decoding apparatus using same
KR102351132B1 (en) Video encoding method, video decoding method, and apparatus using same
KR102261939B1 (en) Video encoding method, video decoding method and apparatus using same
KR102267518B1 (en) Method for encoding/decoding image, and device using same
EP2805495A2 (en) Devices and methods for context reduction in last significant coefficient position coding
WO2013077713A1 (en) Method for realigning transform coefficient and device using same
KR20230004920A (en) Method for encoding and decoding image information

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 12851368

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12851368

Country of ref document: EP

Kind code of ref document: A1