WO2011068332A2 - Spatial prediction apparatus and predicting method thereof, image encoding device and method using same, and image decoding device and method using same - Google Patents

Spatial prediction apparatus and predicting method thereof, image encoding device and method using same, and image decoding device and method using same Download PDF

Info

Publication number
WO2011068332A2
WO2011068332A2 PCT/KR2010/008389 KR2010008389W WO2011068332A2 WO 2011068332 A2 WO2011068332 A2 WO 2011068332A2 KR 2010008389 W KR2010008389 W KR 2010008389W WO 2011068332 A2 WO2011068332 A2 WO 2011068332A2
Authority
WO
WIPO (PCT)
Prior art keywords
mode
prediction
template matching
block
execution unit
Prior art date
Application number
PCT/KR2010/008389
Other languages
French (fr)
Korean (ko)
Other versions
WO2011068332A3 (en
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 WO2011068332A2 publication Critical patent/WO2011068332A2/en
Publication of WO2011068332A3 publication Critical patent/WO2011068332A3/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/59Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/17Methods 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 an image region, e.g. an object
    • H04N19/176Methods 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 an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • An embodiment of the present invention relates to a spatial prediction apparatus and a prediction method thereof, an image encoding apparatus and method using the same, and an image decoding apparatus and method. More specifically, by using a template matching method in addition to the directional intra prediction mode in the prediction within the same frame for the video, the spatial prediction device that can increase the prediction efficiency and accuracy while minimizing the increase in the overhead thereof, and its A prediction method, an image encoding apparatus and method using the same, and an image decoding apparatus and method.
  • the basic principle of compressing data is to eliminate redundancy in the data. Spatial overlap, such as the same color or object repeating in an image, temporal overlap, such as when there is almost no change in adjacent frames in a movie frame, or the same note over and over in audio, or high frequency of human vision and perception Data can be compressed by removing the psychological duplication taking into account the insensitive to.
  • H.264 is a digital video codec standard that has a very high data compression ratio, also called MPEG-4 Part 10 or Advanced Video Coding (AVC).
  • AVC Advanced Video Coding
  • This standard is based on the Video Coding Experts Group (VCEG) of the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) and the International Standardization Organization / International Electrotechnical Commission (ISO / IEC). This is the result of MPEG jointly forming and standardizing a Joint Video Team.
  • VCEG Video Coding Experts Group
  • ITU-T International Telecommunication Union Telecommunication Standardization Sector
  • ISO / IEC International Electrotechnical Commission
  • the temporal prediction is performed by referring to a reference block 122 of another temporal frame 120 that is adjacent in time when predicting the current block 112 of the current frame 110. to be. That is, in inter-prediction of the current block 112 of the current frame 110, the adjacent reference frame 120 is searched for in time, and the reference block (the most similar to the current block 112 in the reference frame 120) 122).
  • the reference block 122 is a block that can best predict the current block 112, and the block having the smallest sum of absolute difference (SAD) with the current block 112 may be the reference block 122.
  • the reference block 122 becomes a prediction block of the current block 112, and generates a residual block by subtracting the reference block 122 from the current block 112.
  • the generated residual block is encoded and inserted into the bitstream.
  • the relative difference between the position of the current block 112 in the current frame 110 and the position of the reference block 122 in the reference frame 120 is called a motion vector 130, and the motion vector 130 is also a residual block.
  • Temporal prediction is also referred to as inter prediction or inter prediction.
  • Spatial prediction is to obtain the prediction pixel value of the target block by using the reconstructed pixel value of the reference block adjacent to the target block in one frame, and directional intra-prediction (hereinafter referred to simply as intra prediction) It is also called intra prediction.
  • H. 264 specifies encoding / decoding using intra prediction.
  • Intra prediction is a method of predicting values of a current subblock by copying in a predetermined direction by using adjacent pixels in up and left directions for one sub-block, and encoding only the difference.
  • the prediction block for the current block is generated based on another block having the previous coding order.
  • a value obtained by subtracting the current block and the prediction block is coded.
  • the video encoder according to H. 264 selects, for each block, a prediction mode in which the difference between the current block and the prediction block is minimal among the prediction modes.
  • Intra prediction according to the H. 264 standard is illustrated in FIG. 2 in consideration of the position of adjacent pixels and the direction of the prediction used to generate predicted pixel values of 4 x 4 luma blocks and 8 x 8 luma blocks.
  • Nine prediction modes as defined. The nine prediction modes are vertical prediction mode (prediction mode 0), horizontal prediction mode (prediction mode 1), DC prediction mode (prediction mode 2), Diagonal_Down_Left prediction mode (prediction mode 3), Diagontal_Down_Right prediction mode (depending on the prediction direction).
  • Prediction mode 4 Vertical_Right prediction mode (prediction mode 5), Horizontal_Down prediction mode (prediction mode 6), Vertical_Left prediction mode (prediction mode 7), and Horizontal_Up prediction mode (prediction mode 8).
  • the DC prediction mode uses an average value of eight adjacent pixels.
  • prediction mode 3 is that.
  • the same four prediction modes are also used for intra prediction processing on 8 x 8 chroma blocks.
  • FIG. 3 shows an example of labeling for explaining the nine prediction modes of FIG. 2.
  • a prediction block (region including a to p) for the current block is generated using the samples A to M that are decoded in advance. If E, F, G, and H cannot be decoded in advance, E, F, G, and H can be virtually generated by copying D to their positions.
  • FIG. 4 is a diagram for describing nine prediction modes of FIG. 2 using FIG. 3.
  • the prediction block predicts the pixel value with the same pixel value for each vertical line. That is, the pixels of the prediction block predict the pixel value from the nearest pixels of the reference block located above the prediction block, and the reconstructed pixel values of the adjacent pixel A are converted into the first column pixels a, pixel e, pixel i and Set to the predicted pixel value for pixel m.
  • second column pixel b, pixel f, pixel j and pixel n are predicted from the reconstructed pixel values of adjacent pixel B
  • third column pixel c, pixel g, pixel k and pixel o are Predicted from the reconstructed pixel values
  • fourth column pixel d, pixel h, pixel l and pixel p predicts from the reconstructed pixel values of adjacent pixel D.
  • a prediction block is generated in which the prediction pixel values of each column are the pixel values of pixel A, pixel B, pixel C and pixel D.
  • the prediction block predicts the pixel value with the same pixel value for each horizontal line. That is, the pixels of the prediction block predict the pixel value from the nearest pixels of the reference block located to the left of the prediction block, and the reconstructed pixel value of the adjacent pixel I is determined by the first row of pixels a, pixel b, pixel c and Set to the predicted pixel value for pixel d.
  • the second row pixels e, pixel f, pixel g and pixel h are predicted from the reconstructed pixel values of adjacent pixel J
  • the third row pixel i, pixel j, pixel k and pixel l are Predicted from the reconstructed pixel values
  • the fourth row pixel m, pixel n, pixel o and pixel p predicts from the reconstructed pixel values of adjacent pixel D.
  • a prediction block is generated in which the prediction pixel values of each row are the pixel values of pixel I, pixel J, pixel K, and pixel L.
  • the pixels of the prediction block are equally replaced by the average of the pixel values of the upper pixels A, B, C and D and the left pixels I, J, K and L.
  • the pixels of the prediction block in the prediction mode 3 are interpolated in the lower left direction at a 45 ° angle between the lower-left and the upper-right, and the prediction in the prediction mode 4
  • the pixels of the block are extrapolated in the lower right direction at a 45 ° angle.
  • the pixels of the prediction block in the prediction mode 6 are extrapolated in the lower right direction at an angle of about 26.6 ° horizontally, and the pixels of the prediction block in the prediction mode 7 are in the lower left direction at about 26.6 ° angle from the vertical Extrapolated, the pixels of the predictive block in the case of the prediction mode 8 are interpolated in an upward direction of about 26.6 degrees from the horizontal.
  • the pixels of the prediction block may be generated from a weighted average of pixels A to M of the reference block to be decoded in advance.
  • the pixel d located at the top right of the prediction block may be estimated as in Equation 1.
  • round () is a function that rounds to integer places.
  • the 16 ⁇ 16 prediction model for the luminance component includes four modes of prediction mode 0, prediction mode 1, prediction mode 2, and prediction mode 3.
  • prediction mode 1 the pixels of the prediction block are extrapolated from the upper pixels, and in prediction mode 1, the pixels are extrapolated from the left pixels.
  • prediction mode 2 the pixels of the prediction block are calculated as an average of upper pixels and left pixels.
  • prediction mode 3 a linear "plane" function is used that fits the upper and left pixels. This mode is more suitable for areas where the luminance changes smoothly.
  • the pixel value of the prediction block is generated according to the direction corresponding to each mode based on the adjacent pixels of the prediction block to be currently encoded.
  • the current directional mode may be sufficient.
  • the encoding efficiency may be poor, and thus the pixel value of the prediction block may not be accurately predicted.
  • the gain of entropy coding cannot be properly seen due to incorrect intra prediction, which causes a problem that the bit rate is unnecessarily increased.
  • One embodiment of the present invention is to solve the above-described problem, by using a template matching method in addition to the directional intra prediction mode in the prediction within the same frame for the video, thereby increasing the prediction efficiency and accuracy,
  • An object of the present invention is to provide a spatial prediction apparatus and a prediction method thereof, an image encoding apparatus and method using the same, and an image decoding apparatus and method capable of minimizing the increase.
  • an image encoding apparatus performs prediction on a target block using a template matching mode together with a directional intra prediction mode, among which A spatial prediction execution unit which selects a mode having the lowest cost based on distortion (distortion); And an integer conversion execution unit that performs integer conversion on the residual signal of the image predicted by the template matching mode when the template matching mode is selected by the spatial prediction execution unit.
  • the integer conversion execution unit may perform integer conversion as in the following equation.
  • the spatial prediction execution unit may select a low cost mode by the following equation.
  • C is the cost
  • E is the difference between the reconstructed signal and the original signal when decoding the coded bits
  • B is the amount of bits required for each coding
  • is the Lagrangian coefficient, which reflects the reflection ratio of E and B. Represents an adjustable coefficient.
  • the image encoding apparatus may further include an MDDT execution unit that executes a Mode Dependent Directional Transform (MDDT) in consideration of the directionality when any one of nine modes of the directional intra prediction mode is selected by the spatial prediction execution unit.
  • MDDT Mode Dependent Directional Transform
  • the MDDT execution unit transforms the residual signal of the predicted image according to a transform function corresponding to a selected mode among the preset transform functions corresponding to the directional intra prediction mode.
  • the intra prediction execution unit for performing the prediction for the target block using the directional intra prediction mode;
  • a template prediction execution unit which executes the prediction on the target block using the template matching mode;
  • a mode selection unit for selecting a mode having a lowest cost based on rate-distortion among a prediction mode executed by the intra prediction execution unit and a template matching mode executed by the template prediction execution unit;
  • a residual signal calculator configured to calculate a residual signal between the prediction block and the target block according to the selected mode.
  • an image decoding apparatus for determining the mode type for the current block with respect to the bitstream encoded and input by spatial predictive encoding; If the mode type determination unit determines that the mode type of the current block is the template matching mode, the template matching is performed by dividing the current block into units of N ⁇ N blocks and performing template matching on each of the divided N ⁇ N blocks. part; And an inverse integer transform execution unit that performs inverse integer transform on the residual signal between the prediction block and the target block by the template matching.
  • the video decoding apparatus when it is determined by the mode type determination unit that the mode type of the current block is the directional intra prediction mode, the video decoding apparatus further includes an inverse MDDT execution unit that executes the inverse MDDT in consideration of the directionality.
  • the template matching execution unit may divide the current block into 2 x 2 block units and then perform template matching on each 2 x 2 block.
  • an image encoding method includes: performing prediction on a target block using a template matching mode together with a directional intra prediction mode; Selecting a mode having the lowest cost among the modes executed by the predictive execution step; Calculating a residual signal between the prediction block and the target block generated by the mode selected by the selecting step; And perform integer conversion on the residual signal calculated by the calculation step when the mode selected by the selection step is the template matching mode, and calculate the residual signal calculated by the calculation step when the mode selected by the selection step is the directional prediction mode. It characterized in that it comprises the step of executing the MDDT for.
  • the image encoding method may further include selecting a transform function corresponding to the prediction mode among preset transformation functions when the mode selected by the selecting step is a directional prediction mode.
  • the MDDT execution step preferably executes the MDDT according to the selected conversion function.
  • a spatial prediction method performing the prediction for the target block using a template matching mode with a directional intra prediction mode; Selecting a mode having the lowest cost among the modes executed by the predictive execution step; And calculating a residual signal between the prediction block and the target block generated by the mode selected by the selecting step.
  • an image decoding method comprises the steps of: determining a mode type of a current block from a bitstream encoded and input by spatial predictive encoding; If it is determined that the mode type of the current block is a template matching mode, dividing the current block into units of N ⁇ N blocks and performing template matching on each of the divided N ⁇ N blocks; And performing inverse integer transform on the residual signal between the prediction block and the target block by template matching.
  • the image decoding method may further include executing the inverse MDDT in consideration of the directionality if it is determined that the mode type of the current block is the directional intra prediction mode.
  • 1 is a diagram illustrating a general inter prediction.
  • FIG. 2 is a diagram illustrating directionality of the intra prediction mode.
  • FIG. 3 is a diagram illustrating an example of labeling for explaining an intra prediction mode of FIG. 2.
  • FIG. 4 is a diagram illustrating each of the intra prediction modes of FIG. 2.
  • FIG. 5A is a diagram illustrating the prediction mode 0 of the intra prediction modes of FIG. 2
  • FIG. 5B is a diagram illustrating the prediction mode 1 of the intra prediction modes of FIG. 2. to be.
  • FIG. 6 is a diagram schematically illustrating an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 7 is a diagram illustrating template matching used in an embodiment of the present invention.
  • FIG. 8 is a diagram showing an example of the structure of a macroblock composed of four 8x8 partitions.
  • FIG. 9 is a diagram showing an example of the structure of a macroblock consisting of 16 4x4 partitions.
  • 10 is a diagram illustrating a zigzag scan for transform coefficients of a 4x4 partition.
  • FIG. 11 is a flowchart illustrating a spatial prediction method according to an embodiment of the present invention.
  • FIG. 12 is a flowchart illustrating a video encoding method according to another embodiment of the present invention.
  • FIG. 13 is a diagram illustrating an example of a structure of a bitstream generated by the video encoding apparatus of FIG. 6.
  • FIG. 14 is a diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 15 is a flowchart illustrating an image decoding method by the image decoding apparatus of FIG. 14.
  • the image encoding apparatus 600 includes a spatial prediction execution unit 610, an integer transform execution unit 620, and a Mode Dependent Directional Transform (MDDT) 630.
  • the image encoding apparatus may further include a difference calculator, a quantizer, an inverse quantizer, a motion estimator, a motion compensator, etc. in addition to the illustrated components, but the components that are not directly related to an embodiment of the present invention Omitted to simplify the description.
  • the spatial prediction execution unit 610 executes the prediction for the target block using the template matching mode together with the directional intra prediction mode in the same frame, based on rate-distortion. Choose the lowest cost mode.
  • the spatial prediction execution unit 610 may be implemented as one component in the image encoding apparatus 600, but as illustrated, the intra prediction execution unit 612, the template prediction execution unit 614, and the mode selection unit may be implemented. 616 and the residual signal calculator 618 may be configured.
  • the intra prediction execution unit 612 performs the prediction on the target block by using the directional intra prediction mode. That is, the intra prediction execution unit 612 predicts pixel values according to each prediction mode from neighboring pixels of the target block in the same frame as shown in FIG. 4.
  • the template prediction execution unit 614 executes the prediction on the target block using the template matching mode.
  • the pixel value in the prediction frame for pixel p in the current frame can be determined by comparing the value N (p) of neighboring pixels in the current frame.
  • the value N (p) of the neighboring pixels to be compared is referred to as a template of the pixel p.
  • the search area 700 illustrates a search region adjacent to a 4 ⁇ 4 target block for which pixel values are to be predicted.
  • the search area 700 is composed of the width of the x pixels and the height of the y pixels among the pixels that are first reproduced, but the portion that is not reproduced is excluded as shown in the lower right.
  • the 4 ⁇ 4 target block 710 is further divided into 2 ⁇ 2 target subblocks 720, and template matching is performed in units of each target subblock.
  • the pixels in the same frame and adjacent to the target subblock 720 become the template 730.
  • Template matching calculates the SAD between the corresponding pixels among the group of pixels having the same shape as the template 730 (inverted L-shape in the drawing) in the search area 700, and selects the area with the smallest SAD as the candidate neighbor.
  • An area 740 is assumed.
  • the candidate subblock 750 in contact with the candidate neighboring region 740 is determined as a texture signal for the target subblock 720.
  • Template matching has been described using 4 x 4 blocks as an example to facilitate explanation, but is not limited thereto, and template matching is possible for various blocks.
  • the mode selector 616 selects a mode with the lowest cost based on rate-distortion among the prediction mode executed by the intra prediction execution unit 612 and the template matching mode executed by the template prediction execution unit 614. do. That is, if the target block is 4 x 4, the mode selector 616 may include nine directional intra prediction modes and the template prediction execution unit 614 executed by the intra prediction execution unit 612 according to the H. 264 standard. Of the template matching modes executed by, the mode with the lowest cost is selected.
  • cost C is not limited to the rate-distortion basis and can be defined in various ways.
  • Equation 2 E denotes the difference between the signal reconstructed by decoding the encoded bit and the original signal, and B denotes the amount of bits required for each coding.
  • is a Lagrangian coefficient and means a coefficient which can adjust the reflection ratio of E and B.
  • the residual signal calculator 618 calculates a residual signal between the prediction block and the target block according to the mode selected by the mode selector 616.
  • the integer transform execution unit 620 performs nine directional intra prediction modes and the template prediction execution unit 614 when the template matching mode is selected by the spatial prediction execution unit 610, that is, executed by the intra prediction execution unit 612. If the template matching mode is selected as the lowest cost by the mode selection unit 616 among the template matching modes performed by), integer conversion is performed on the residual signal of the image predicted by the template matching mode.
  • the template matching mode unlike the directional prediction mode, the adaptive transform described later is not defined, but the prediction block by the template matching mode may use an integer transform defined in the H. 264 standard.
  • the H. 264 standard adopts an integer transform, which may occur due to the lack of resolution when performing a transform operation. Mismatch was eliminated at the root.
  • the Discrete Cosine Transform (DCT) operation which is a transform used in the existing video and still image standards, adopts a floating point operation, and thus the result of the transform operation may vary depending on individual implementations. There was room left.
  • the conversion is defined only by integer and bit shift operations, and the digital system eliminates the possibility of error in operation during standardization.
  • the size of the macroblock defined in the H. 264 standard is defined as a set of pixels having a size of 16 ⁇ 16 as shown in FIG. 8.
  • the macroblock of FIG. 8 shows a state composed of four 8 ⁇ 8 partitions having indices of 0 to 3. FIG. This indicates that when encoding transform coefficients of four 8 x 8 partitions from 0 to 3, they are encoded in that order.
  • the H.264 standard defines whether to determine the coded block pattern for Y (CBPY) based on the presence or absence of nonzero transform coefficients in each 8 x 8 partition.
  • one macroblock is composed of sixteen 4 ⁇ 4 partitions. As described in FIG. 8, one macroblock is defined to be divided into four 8 ⁇ 8 partitions and processed through a specified order. Likewise, one 8 x 8 partition is defined to be divided into four 4 x 4 partitions and processed in the specified order.
  • This series of configurations is as shown in FIG.
  • the drawing shows that each DC component of the 16 4 x 4 compartments can be collected to reconstruct the 4 x 4 compartments.
  • the darker part on the upper left of each 4 x 4 partition is conceptually a part of indicating the DC among the conversion coefficients of each 4 x 4 partition, and it is possible to collect these DC coefficients to form a separate 4 x 4 partition. Done.
  • the 4 x 4 integer transform is a transform used for the compression of the residual signal of the 4 x 4 partition in the intra and inter modes. Since all transforms in H. 264 can be implemented by addition and bit shift operations only, every basis is defined by a power of 2 and 1 or 2 or 2 only.
  • the basic 4 x 4 integer transform is used to generate transform coefficients for performing a zig-zag scan on the 4 x 4 partition as shown in FIG.
  • Equation 4 Has the value By factoring Equation 3, Equation 4 can be obtained.
  • Equation 5 E is a scaling factor matrix
  • I a symbol that multiplies the values of (CXC T ) and the same position in the E matrix by each other.
  • d c / b-0.414.
  • Equation 5 Denotes the equation for forward integer conversion used in H. 264, which can be calculated as the product of the matrix.
  • the first and last matrices have only integer values of ⁇ 1 and ⁇ 2, and these values can be simply calculated by addition, subtraction, and shift operations. This is called 'multiplication-free' and can be used very efficiently in a reference encoder.
  • the MDDT execution unit 630 is any one of nine directional intra prediction modes selected by the spatial prediction execution unit 610, that is, any one of the directional intra prediction modes executed by the intra prediction execution unit 612. If is selected to have the lowest cost, execute the MDDT taking into account the direction.
  • MDDT Mode Dependent Directional Transform
  • KLT Karhunen Loeve Transform
  • This technique compresses the energy of the error block in the frequency domain. Since MDDT applies transform coding according to the direction of the intra prediction method, characteristics of quantized transform coefficients generated after quantization may also appear in different forms according to the direction. In order to encode these coefficients more efficiently, adaptive scanning may be used.
  • the MDDT may be selected as a set of transform functions classified according to the directional prediction mode, and such a set of transform functions may be considered as shown in Table 1 below.
  • f xy denotes the x-th transform function corresponding to the y-th prediction mode.
  • Table 1 describes that N + 1 functions are allocated to each prediction mode, but the present invention is not limited thereto, and the number of functions of each prediction mode may not be the same.
  • mode 0 may have N + 1 assigned transform functions
  • mode 1 may have N assigned transform functions
  • mode 2 may have N ⁇ 1 assigned transform functions.
  • the MDDT execution unit 630 converts the residual signal of the image predicted according to the preset corresponding transform function in response to the directional intra prediction mode selected by the mode selection unit 616 of the spatial prediction execution unit 610. .
  • FIG. 11 is a flowchart illustrating a spatial prediction method according to another embodiment of the present invention.
  • the spatial prediction execution unit 610 of FIG. 6 executes prediction on a target block using a template matching mode together with a directional intra prediction mode (S1101).
  • the spatial prediction execution unit 610 compares the costs of the directional intra prediction mode and the template matching mode, and selects the mode having the lowest cost as an optimal mode (S1103).
  • the optimal mode is selected from the directional intra prediction mode and the template matching mode as described above, the residual signal between the prediction block selected by the selected mode and the target block is calculated (S1105).
  • steps S1201 to S1205 calculate the residual signal using the same spatial prediction method as that of FIG. 11, detailed description thereof will be omitted.
  • the integer transform calculation unit 620 may perform the process between the prediction block and the target block executed by the template prediction execution unit 614. Integer conversion is performed on the residual signal (S1209).
  • the MDDT execution unit 630 selects the prediction selected from the preset conversion functions. A transform function corresponding to the mode is selected (S1211), and the residual signal between the prediction block executed by the intra prediction execution unit 612 and the target block is executed using the selected transform function (S1213).
  • FIG. 13 is a diagram illustrating an example of a structure of a bitstream generated by the video encoding apparatus 600 of FIG. 6.
  • bitstreams are encoded in slice units.
  • the bitstream includes a slice header 1310 and a slice date 1320, and the slice data 1320 includes a plurality of macroblock data (MBs) 1321 to 1324.
  • macroblock data 1323 may include an mb_type field 1330, an mb_pred field 1335, and a texture data field 1335.
  • a value indicating the type of macroblock is recorded in the mb_type field 1330. That is, it indicates whether the current macroblock is an intra macroblock or an inter macroblock.
  • a detailed prediction mode according to the type of macroblock is recorded.
  • information of a prediction mode selected during intra prediction is recorded, and in case of an inter macroblock, information of a reference frame number and a motion vector is recorded for each macroblock partition.
  • the template matching mode only a bit for informing it may be recorded and the remaining information may be omitted to notify the decoder that the current mode is the template matching mode. For example, when the mode of the current block is selected as the template matching mode, bit 1 is transmitted and the remaining information is omitted. Otherwise, the remaining mode information may be encoded after bit 0 is transmitted.
  • the mb-pred field 1335 is divided into a plurality of block information 1342 to 1344, and each block information 1342 is a value of the main mode described above. It is divided into a main_mode field 1345 for recording a sub-mode field 1346 for recording a value of the above-described sub-mode.
  • the encoded residual image that is, the texture data
  • the texture data field 1339 is recorded in the texture data field 1339.
  • an image decoding apparatus 1400 may include a mode type determination unit 1410, a template matching execution unit 1420, an inverse integer conversion execution unit 1430, and an inverse MDDT execution unit. 1440.
  • the mode type determination unit 1410 determines a mode type for the current block with respect to a bitstream encoded and input by spatial prediction encoding. That is, the mode type of the current block is read from the bitstream as shown in FIG. 13 to determine the mode type. For example, when bit 1 indicating that the mode type of the current block is a template matching mode is recorded in the input bitstream, it recognizes that the corresponding bitstream is encoded in the template matching mode and prepares decoding corresponding thereto. In addition, when bit 0 indicating that the mode type of the current block is the directional intra prediction mode is recorded in the input bitstream, decoding of the directional intra prediction block corresponding to the information recorded in the sub mode of the corresponding bitstream is referred to. Prepare.
  • the template matching unit 1420 divides the current block into units of N ⁇ N blocks and then divides each N ⁇ N block. Template matching is performed on the block. Preferably, the template matching unit 1420 divides the current block in units of 2 ⁇ 2 blocks and performs template matching on each of the divided 2 ⁇ 2 blocks.
  • the method for template matching is the SAD between the corresponding pixel among the group of pixels having the same shape as the template 730 (inverted L-shape in the figure) in the search area 700, as shown in FIG. Is calculated, and the area with the smallest SAD is used as the candidate neighboring area 740.
  • the candidate subblock 750 in contact with the candidate neighboring region 740 is determined as a texture signal for the target subblock 720.
  • the inverse integer transform execution unit 1430 executes an inverse integer transform on the residual signal between the prediction block matched by the template matching unit 1420 and the target block.
  • the inverse integer conversion execution unit 1430 may perform inverse integer conversion on the residual signal using Equation 5.
  • the inverse transform of the residual signal can be performed by inversely transforming the equation (5).
  • the inverse MDDT execution unit 1440 executes the inverse MDDT in consideration of the directionality of the input bitstream. . That is, when it is determined that the current block of the input bitstream is the directional intra prediction mode, the directional information is considered with reference to the directional information recorded in the sub mode of the bitstream, and the corresponding inverse MDDT is executed. For example, assuming that the set of transform functions is shown in Table 1, it can be seen that N + 1 transform functions are assigned to each prediction mode according to the direction, and the transform function and the directional information recorded in the bitstream Inverse MDDT can be executed based on. Here, the number of transform functions allocated to each prediction mode may be different depending on the direction.
  • FIG. 15 is a flowchart illustrating an image decoding method by the image decoding apparatus of FIG. 14.
  • the mode type determination unit 1410 determines the mode type of the current block from the input bitstream encoded and input by spatial predictive coding (S1501). That is, based on the structure of the bitstream as shown in FIG. 13, it is determined whether the mode type of the current block is a template matching mode or a directional intra prediction mode.
  • the mode type determination unit 1410 has been described as determining the mode type for the spatial predictive coding, but the present invention is not limited thereto. However, since temporal prediction coding is beyond the subject matter of the present invention, detailed description thereof is omitted.
  • the template matching unit 1420 divides the current block into units of N ⁇ N blocks, and then divides each of the divided N ⁇ N blocks. Template matching is performed on the target block (S1505). In this case, as shown in FIG. 7, the template matching performing unit 1420 divides the 4 ⁇ 4 target block into 2 ⁇ 2 target subblocks (S1505), and executes template matching on each target subblock unit. It is preferable to carry out (S1507).
  • Template matching calculates the SAD between the corresponding pixels among the group of pixels having the same shape as the template 730 (inverted L-shape in the drawing) in the search area 700, and selects the area with the smallest SAD as the candidate neighbor.
  • An area 740 is assumed.
  • the candidate subblock 750 in contact with the candidate neighboring region 740 is determined as a texture signal for the target subblock 720.
  • Template matching has been described using 4 x 4 blocks as an example to facilitate explanation, but is not limited thereto, and template matching is possible for various blocks.
  • the block obtained by template matching becomes a result of intra prediction, and the inverse integer transform unit 1430 performs inverse quantization and inverse integer transformation on the residual signal between the generated prediction block and the target block (S1509).
  • the result obtained through inverse quantization and inverse integer transformation is added to the template matching result to form a reconstructed image.
  • the inverse MDDT execution unit 1440 determines the directional intra prediction based on the structure of the input bitstream.
  • the direction of the mode is determined, and inverse quantization and inverse MDDT are performed in consideration of the direction (S1511).
  • the set of transform functions may be set as shown in Table 1, and the inverse MDDT may be executed based on the assigned transform function according to the direction of each prediction mode.
  • the embodiment of the present invention is applied to an intra prediction apparatus, an image encoding and decoding field, and compared to the H.264 standard, the intra prediction is performed while reducing the bit rate without greatly increasing the overhead of the bitstream generator. It is a very useful invention to produce an effect that can increase the accuracy of.

Abstract

The present invention relates to a spatial prediction apparatus and a predicting method thereof, an image encoding device and method using same, and an image decoding device and method using same. The image encoding device according to embodiments of the present invention comprises: a spatial prediction execution unit which predicts a target block using a directional intra prediction mode and a template matching mode and selects the most inexpensive mode based on rate distortion; and an integer conversion execution unit for executing integer conversion for the residual signals of the images predicted through the template matching mode when the template matching mode is selected by the spatial prediction execution unit. The present invention can enhance the accuracy and efficiency of the intra prediction and can minimize an increase of overhead in the video encoding.

Description

공간적 예측장치 및 그 예측방법, 그것을 이용한 영상 부호화 장치 및 방법, 및 영상 복호화 장치 및 방법Spatial prediction apparatus and prediction method thereof, image encoding apparatus and method using same, and image decoding apparatus and method
본 발명의 실시예는 공간적 예측장치 및 그 예측방법, 그것을 이용한 영상 부호화 장치 및 방법, 및 영상 복호화 장치 및 방법에 관한 것이다. 더욱 상세하게는, 동영상에 대한 동일 프레임 내의 예측에서 방향적 인트라 예측모드 이외에 템플릿 매칭 방법을 함께 사용함으로써, 예측 효율 및 정확성을 높이면서도 그에 따른 오버헤드의 증가를 최소화할 수 있는 공간적 예측장치 및 그 예측방법, 그것을 이용한 영상 부호화 장치 및 방법, 및 영상 복호화 장치 및 방법에 관한 것이다.An embodiment of the present invention relates to a spatial prediction apparatus and a prediction method thereof, an image encoding apparatus and method using the same, and an image decoding apparatus and method. More specifically, by using a template matching method in addition to the directional intra prediction mode in the prediction within the same frame for the video, the spatial prediction device that can increase the prediction efficiency and accuracy while minimizing the increase in the overhead thereof, and its A prediction method, an image encoding apparatus and method using the same, and an image decoding apparatus and method.
인터넷을 포함한 정보통신 기술이 발달함에 따라 문자, 음성뿐만 아니라 화상통신이 증가하고 있다. 기존의 문자 위주의 통신 방식으로는 소비자의 다양한 욕구를 충족시키기에는 부족하며, 이에 따라 문자, 영상, 음악 등 다양한 형태의 정보를 수용할 수 있는 멀티미디어 서비스가 증가하고 있다. 멀티미디어 데이터는 그 양이 방대하여 대용량의 저장매체를 필요로 하며 전송 시에 넓은 대역폭을 필요로 한다. 따라서 문자, 영상, 오디오를 포함한 멀티미디어 데이터를 전송하기 위해서는 압축코딩기법을 사용하는 것이 필수적이다.As information and communication technology including the Internet is developed, not only text and voice but also video communication are increasing. Conventional text-based communication methods are not enough to satisfy various needs of consumers, and accordingly, multimedia services that can accommodate various types of information such as text, video, and music are increasing. The multimedia data has a huge amount and requires a large storage medium and a wide bandwidth in transmission. Therefore, in order to transmit multimedia data including text, video, and audio, it is essential to use a compression coding technique.
데이터를 압축하는 기본적인 원리는 데이터의 중복(redundancy) 요소를 제거하는 과정이다. 이미지에서 동일한 색이나 객체가 반복되는 것과 같은 공간적 중복이나, 동영상 프레임에서 인접 프레임이 거의 변화가 없는 경우나 오디오에서 같은 음이 계속 반복되는 것과 같은 시간적 중복, 또는 인간의 시각 및 지각 능력이 높은 주파수에 둔감한 것을 고려한 심리시각 중복을 제거함으로써 데이터를 압축할 수 있다.The basic principle of compressing data is to eliminate redundancy in the data. Spatial overlap, such as the same color or object repeating in an image, temporal overlap, such as when there is almost no change in adjacent frames in a movie frame, or the same note over and over in audio, or high frequency of human vision and perception Data can be compressed by removing the psychological duplication taking into account the insensitive to.
이러한 동영상 압축 방법으로서, 최근에 MPEG-4(Moving Picture Experts Group-4)에 비해 압축 효율을 한층 향상시킨 H. 264/AVC에 대한 관심이 높아지고 있다. As such a video compression method, interest in H.264 / AVC, which has further improved compression efficiency compared to MPEG-4 (Moving Picture Experts Group-4), has recently increased.
H. 264는 매우 높은 데이터 압축률을 가지는 디지털 비디오 코덱 표준으로 MPEG-4 파트 10 또는 AVC(Advanced Video Coding)라고 부르기도 한다. 이 표준은 ITU-T(International Telecommunication Union Telecommunication Standardization Sector: 국제전기통신연합 전기통신 표준화 부문)의 VCEG(Video Coding Experts Group: 비디오 코딩 전문가 그룹)와 ISO/IEC(International Standardization Organization/International Electrotechnical Commission)의 MPEG가 공동으로 합동 비디오 팀(Joint Video Team)을 구성하고 표준화를 진행하여 나온 결과물이다.H.264 is a digital video codec standard that has a very high data compression ratio, also called MPEG-4 Part 10 or Advanced Video Coding (AVC). This standard is based on the Video Coding Experts Group (VCEG) of the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) and the International Standardization Organization / International Electrotechnical Commission (ISO / IEC). This is the result of MPEG jointly forming and standardizing a Joint Video Team.
압축 부호화 시의 압축 효율을 향상시키기 위하여 여러 가지 방법이 제안되고 있는데, 대표적인 것으로 시간적 예측(temporal prediction)을 이용하는 방법과 공간적 예측(spatial prediction)을 이용하는 방법이 있다. Various methods have been proposed to improve compression efficiency in compression encoding, and typical methods include a method using temporal prediction and a method using spatial prediction.
시간적 예측은 도 1에 도시한 바와 같이, 현재 프레임(110)의 현재 블록(112)을 예측할 때 시간적으로 인접하는 다른 프레임(120)의 참조 블록(reference block)(122)을 참조하여 예측하는 방식이다. 즉, 현재 프레임(110)의 현재 블록(112)을 인터 예측함에 있어서, 시간적으로 인접하는 참조 프레임(120)을 검색하고, 참조 프레임(120) 내에서 현재 블록(112)과 가장 유사한 참조 블록(122)을 검색한다. 여기서, 참조 블록(122)은 현재 블록(112)을 가장 잘 예측할 수 있는 블록으로서, 현재 블록(112)과의 SAD(Sum of Absolute Difference)가 가장 작은 블록이 참조 블록(122)이 될 수 있다. 참조 블록(122)은 현재 블록(112)의 예측 블록이 되며, 현재 블록(112)에서 참조 블록(122)을 감산하여 잔차 블록(residual block)을 생성한다. 생성된 잔차 블록이 부호화되어 비트스트림에 삽입된다. 이때, 현재 프레임(110)에서 현재 블록(112)의 위치와 참조 프레임(120)에서 참조 블록(122)의 위치 사이의 상대적인 차이는 움직임 벡터(130)라 하며, 움직임 벡터(130)도 잔차 블록과 같이 부호화된다. 시간적 예측은 인터 예측(inter prediction) 또는 화면간 예측이라고도 한다.As shown in FIG. 1, the temporal prediction is performed by referring to a reference block 122 of another temporal frame 120 that is adjacent in time when predicting the current block 112 of the current frame 110. to be. That is, in inter-prediction of the current block 112 of the current frame 110, the adjacent reference frame 120 is searched for in time, and the reference block (the most similar to the current block 112 in the reference frame 120) 122). Here, the reference block 122 is a block that can best predict the current block 112, and the block having the smallest sum of absolute difference (SAD) with the current block 112 may be the reference block 122. . The reference block 122 becomes a prediction block of the current block 112, and generates a residual block by subtracting the reference block 122 from the current block 112. The generated residual block is encoded and inserted into the bitstream. In this case, the relative difference between the position of the current block 112 in the current frame 110 and the position of the reference block 122 in the reference frame 120 is called a motion vector 130, and the motion vector 130 is also a residual block. Is encoded as follows. Temporal prediction is also referred to as inter prediction or inter prediction.
공간적 예측은 하나의 프레임 내에서 대상 블록에 인접한 참조 블록의 재구성 픽셀 값을 이용하여 대상 블록의 예측 픽셀 값을 구하는 것으로서, 방향적 인트라 예측(directional intra-prediction)(이하에서는 단순히 인트라 예측이라고 한다) 또는 화면 내 예측이라고도 한다. H. 264는 인트라 예측을 이용한 부호화/복호화를 규정하고 있다.Spatial prediction is to obtain the prediction pixel value of the target block by using the reconstructed pixel value of the reference block adjacent to the target block in one frame, and directional intra-prediction (hereinafter referred to simply as intra prediction) It is also called intra prediction. H. 264 specifies encoding / decoding using intra prediction.
인트라 예측은 하나의 서브 블록(sub-block)에 대해 상방향, 좌방향의 인접 픽셀들을 이용하여 정해진 방향으로 복사함으로써 현재 서브 블록의 값들을 예측하고, 그 차분만을 부호화하는 방법이다. H. 264 표준에 따른 인트라 예측 기법에 있어서, 현재 블록에 대한 예측 블록은 앞선 코딩 순서를 갖는 다른 블록을 기반으로 생성된다. 그리고, 현재 블록과 예측 블록을 뺀 값이 코딩된다. H. 264에 따른 비디오 인코더는 각각의 블록에 대하여, 예측 모드들 중에서 현재 블록과 예측 블록과의 차이가 최소가 되는 예측 모드를 선택한다.Intra prediction is a method of predicting values of a current subblock by copying in a predetermined direction by using adjacent pixels in up and left directions for one sub-block, and encoding only the difference. In the intra prediction technique according to the H. 264 standard, the prediction block for the current block is generated based on another block having the previous coding order. A value obtained by subtracting the current block and the prediction block is coded. The video encoder according to H. 264 selects, for each block, a prediction mode in which the difference between the current block and the prediction block is minimal among the prediction modes.
H. 264 표준에 따른 인트라 예측은, 4 x 4 휘도 블록 및 8 x 8 휘도 블록의 예측 픽셀 값을 생성하는 데 이용되는 인접 픽셀(adjacent pixels)의 위치 및 예측의 방향성을 고려하여 도 2에 도시한 바와 같은 9가지 예측 모드를 규정한다. 9가지 예측 모드는 그 예측 방향에 따라 Vertical 예측 모드(예측 모드 0), Horizontal 예측 모드(예측 모드 1), DC 예측 모드(예측 모드 2), Diagonal_Down_Left 예측 모드(예측 모드 3), Diagontal_Down_Right 예측 모드(예측 모드 4), Vertical_Right 예측 모드(예측 모드 5), Horizontal_Down 예측 모드(예측 모드 6), Vertical_Left 예측 모드(예측 모드 7) 및 Horizontal_Up 예측 모드(예측 모드 8)로 구분된다. 여기서, DC 예측 모드는 인접 8개의 픽셀의 평균 값을 사용한다.Intra prediction according to the H. 264 standard is illustrated in FIG. 2 in consideration of the position of adjacent pixels and the direction of the prediction used to generate predicted pixel values of 4 x 4 luma blocks and 8 x 8 luma blocks. Nine prediction modes as defined. The nine prediction modes are vertical prediction mode (prediction mode 0), horizontal prediction mode (prediction mode 1), DC prediction mode (prediction mode 2), Diagonal_Down_Left prediction mode (prediction mode 3), Diagontal_Down_Right prediction mode (depending on the prediction direction). Prediction mode 4), Vertical_Right prediction mode (prediction mode 5), Horizontal_Down prediction mode (prediction mode 6), Vertical_Left prediction mode (prediction mode 7), and Horizontal_Up prediction mode (prediction mode 8). Here, the DC prediction mode uses an average value of eight adjacent pixels.
그리고 16 x 16 휘도 블록에 대한 인트라 예측 처리에는 4가지 예측 모드가 사용되는데, Vertical 예측 모드(예측 모드 0), Horizontal 예측 모드(예측 모드 1), DC 예측 모드(예측 모드 2) 및 Plane 예측 모드(예측 모드 3)이 그것이다. 그리고 8 x 8 색도 블록에 대한 인트라 예측 처리에도 이와 동일한 4가지 예측 모드가 사용된다.In addition, four prediction modes are used for intra prediction processing for a 16 × 16 luma block, a vertical prediction mode (prediction mode 0), a horizontal prediction mode (prediction mode 1), a DC prediction mode (prediction mode 2), and a plane prediction mode. (Prediction mode 3) is that. The same four prediction modes are also used for intra prediction processing on 8 x 8 chroma blocks.
도 3은 도 2의 9가지 예측 모드를 설명하기 위한 라벨링의 예를 나타낸 것이다. 이 경우, 미리 디코딩되는 샘플들(A 내지 M)을 이용하여 현재 블록에 대한 예측 블록(a 내지 p를 포함하는 영역)을 생성한다. 만약, 여기서 E, F, G, H가 미리 디코딩될 수 없는 경우라면 그들의 위치에 D를 복사함으로써 E, F, G, H를 가상으로 생성할 수 있다.FIG. 3 shows an example of labeling for explaining the nine prediction modes of FIG. 2. In this case, a prediction block (region including a to p) for the current block is generated using the samples A to M that are decoded in advance. If E, F, G, and H cannot be decoded in advance, E, F, G, and H can be virtually generated by copying D to their positions.
도 4는 도 3을 이용하여 도 2의 9가지 예측 모드를 설명하기 위한 도면이다. 도면을 참조하면, 예측 모드 0인 경우에 예측 블록은 수직 라인 별로 동일한 픽셀 값으로 픽셀 값을 예측한다. 즉, 예측 블록의 픽셀들은 예측 블록의 위쪽에 위치한 참조 블록의 가장 인접한 픽셀들로부터 픽셀 값을 예측하는데, 인접 픽셀 A의 재구성 픽셀 값을 예측 블록의 제1열 픽셀 a, 픽셀 e, 픽셀 i 및 픽셀 m에 대한 예측 픽셀 값으로 설정한다. 또한, 동일한 방법으로 제2열 픽셀 b, 픽셀 f, 픽셀 j 및 픽셀 n은 인접 픽셀 B의 재구성 픽셀 값으로부터 예측하고, 제3열 픽셀 c, 픽셀 g, 픽셀 k 및 픽셀 o는 인접 픽셀 C의 재구성 픽셀 값으로부터 예측하며, 제4열 픽셀 d, 픽셀 h, 픽셀 l 및 픽셀 p는 인접 픽셀 D의 재구성 픽셀 값으로부터 예측한다. 그 결과, 도 5의 (a)에 도시한 바와 같이 각 열의 예측 픽셀 값이 픽셀 A, 픽셀 B, 픽셀 C 및 픽셀 D의 각 픽셀 값으로 이루어진 예측 블록이 생성된다.FIG. 4 is a diagram for describing nine prediction modes of FIG. 2 using FIG. 3. Referring to the figure, in the prediction mode 0, the prediction block predicts the pixel value with the same pixel value for each vertical line. That is, the pixels of the prediction block predict the pixel value from the nearest pixels of the reference block located above the prediction block, and the reconstructed pixel values of the adjacent pixel A are converted into the first column pixels a, pixel e, pixel i and Set to the predicted pixel value for pixel m. Further, in the same way, second column pixel b, pixel f, pixel j and pixel n are predicted from the reconstructed pixel values of adjacent pixel B, and third column pixel c, pixel g, pixel k and pixel o are Predicted from the reconstructed pixel values, fourth column pixel d, pixel h, pixel l and pixel p predicts from the reconstructed pixel values of adjacent pixel D. As a result, as shown in Fig. 5A, a prediction block is generated in which the prediction pixel values of each column are the pixel values of pixel A, pixel B, pixel C and pixel D.
또한, 예측 모드 1인 경우에 예측 블록은 수평 라인 별로 동일한 픽셀 값으로 픽셀 값을 예측한다. 즉, 예측 블록의 픽셀들은 예측 블록의 왼쪽에 위치한 참조 블록의 가장 인접한 픽셀들로부터 픽셀 값을 예측하는데, 인접 픽셀 I의 재구성 픽셀 값을 예측 블록의 제1행 픽셀 a, 픽셀 b, 픽셀 c 및 픽셀 d에 대한 예측 픽셀 값으로 설정한다. 또한, 동일한 방법으로 제2행 픽셀 e, 픽셀 f, 픽셀 g 및 픽셀 h는 인접 픽셀 J의 재구성 픽셀 값으로부터 예측하고, 제3행 픽셀 i, 픽셀 j, 픽셀 k 및 픽셀 l은 인접 픽셀 K의 재구성 픽셀 값으로부터 예측하며, 제4행 픽셀 m, 픽셀 n, 픽셀 o 및 픽셀 p는 인접 픽셀 D의 재구성 픽셀 값으로부터 예측한다. 그 결과, 도 5의 (b)에 도시한 바와 같이 각 행의 예측 픽셀 값이 픽셀 I, 픽셀 J, 픽셀 K 및 픽셀 L의 각 픽셀 값으로 이루어진 예측 블록이 생성된다.In addition, in the prediction mode 1, the prediction block predicts the pixel value with the same pixel value for each horizontal line. That is, the pixels of the prediction block predict the pixel value from the nearest pixels of the reference block located to the left of the prediction block, and the reconstructed pixel value of the adjacent pixel I is determined by the first row of pixels a, pixel b, pixel c and Set to the predicted pixel value for pixel d. Also, in the same way, the second row pixels e, pixel f, pixel g and pixel h are predicted from the reconstructed pixel values of adjacent pixel J, and the third row pixel i, pixel j, pixel k and pixel l are Predicted from the reconstructed pixel values, the fourth row pixel m, pixel n, pixel o and pixel p predicts from the reconstructed pixel values of adjacent pixel D. As a result, as shown in Fig. 5B, a prediction block is generated in which the prediction pixel values of each row are the pixel values of pixel I, pixel J, pixel K, and pixel L.
또한, 예측 모드 2인 경우에 예측 블록의 픽셀들은 상위 픽셀들 A, B, C 및 D와 좌측 픽셀들 I, J, K 및 L의 픽셀 값의 평균으로 동일하게 대치된다.Also, in prediction mode 2, the pixels of the prediction block are equally replaced by the average of the pixel values of the upper pixels A, B, C and D and the left pixels I, J, K and L.
한편, 예측 모드 3인 경우의 예측 블록의 픽셀들은 좌하(lower-left) 및 우상(upper-right) 사이에서 45°각도의 왼쪽 아래방향으로 내삽추정(interpolation)되고, 예측 모드 4인 경우의 예측 블록의 픽셀들은 45°각도의 오른쪽 아래방향으로 외삽추정된다. 또한, 예측 모드 5인 경우의 예측 블록의 픽셀들은 수직에서 약 26.6°각도(너비/높이 = 1/2)의 오른쪽 아래방향으로 외삽추정된다. 또한, 예측 모드 6인 경우의 예측 블록의 픽셀들은 수평에서 약 26.6°각도의 오른쪽 아래쪽 방향으로 외삽추정되고, 예측 모드 7인 경우의 예측 블록의 픽셀들은 수직에서 약 26.6°각도의 왼쪽 아래방향으로 외삽추정되며, 예측 모드 8인 경우의 예측 블록의 픽셀들은 수평에서 약 26.6°각도의 위쪽방향으로 내삽추정된다.On the other hand, the pixels of the prediction block in the prediction mode 3 are interpolated in the lower left direction at a 45 ° angle between the lower-left and the upper-right, and the prediction in the prediction mode 4 The pixels of the block are extrapolated in the lower right direction at a 45 ° angle. In addition, the pixels of the prediction block in the prediction mode 5 are extrapolated in the lower right direction at an angle of about 26.6 degrees (width / height = 1/2) from the vertical. In addition, the pixels of the prediction block in the prediction mode 6 are extrapolated in the lower right direction at an angle of about 26.6 ° horizontally, and the pixels of the prediction block in the prediction mode 7 are in the lower left direction at about 26.6 ° angle from the vertical Extrapolated, the pixels of the predictive block in the case of the prediction mode 8 are interpolated in an upward direction of about 26.6 degrees from the horizontal.
예측 모드 3 내지 예측 모드 8에서 예측 블록의 픽셀들은 미리 디코딩 되는 참조 블록의 픽셀들 A 내지 M의 가중 평균으로부터 생성될 수 있다. 예를 들어, 예측 모드 4의 경우, 예측 블록의 우 상단에 위치한 픽셀 d는 수학식 1과 같이 추정될 수 있다. 여기서, round() 함수는 정수 자리로 반올림하는 함수이다.In prediction mode 3 to 8, the pixels of the prediction block may be generated from a weighted average of pixels A to M of the reference block to be decoded in advance. For example, in the prediction mode 4, the pixel d located at the top right of the prediction block may be estimated as in Equation 1. Here, round () is a function that rounds to integer places.
[수학식 1][Equation 1]
Figure PCTKR2010008389-appb-I000001
Figure PCTKR2010008389-appb-I000001
한편, 휘도 성분에 대한 16×16 예측 모델에는 전술한 바와 같이 예측 모드 0, 예측 모드 1, 예측 모드 2 및 예측 모드 3의 네 가지 모드가 있다. Meanwhile, as described above, the 16 × 16 prediction model for the luminance component includes four modes of prediction mode 0, prediction mode 1, prediction mode 2, and prediction mode 3.
예측 모드 0의 경우, 예측 블록의 픽셀들은 상위 픽셀들로부터 외삽추정되고, 예측 모드 1의 경우에는 좌측 픽셀들로부터 외삽추정된다. 또한, 예측 모드 2의 경우에는, 예측 블록의 픽셀들은 상위 픽셀들 및 좌측 픽셀들의 평균으로 계산된다. 마지막으로, 예측 모드 3의 경우에는, 상위 픽셀들 및 좌측 픽셀들에 맞는 선형 "plane" 함수를 이용한다. 이 모드는 휘도가 부드럽게 변하는 영역에 보다 적합하다.In prediction mode 0, the pixels of the prediction block are extrapolated from the upper pixels, and in prediction mode 1, the pixels are extrapolated from the left pixels. In addition, in the prediction mode 2, the pixels of the prediction block are calculated as an average of upper pixels and left pixels. Finally, for prediction mode 3, a linear "plane" function is used that fits the upper and left pixels. This mode is more suitable for areas where the luminance changes smoothly.
이와 같이, H. 264 표준에서는 DC 모드를 제외한 각각의 예측 모드의 경우, 현재 부호화 하고자 하는 예측 블록의 인접 픽셀들에 기초하여 각 모드에 해당하는 방향에 따라 예측 블록의 픽셀 값을 생성하고 있다. As described above, in the H.264 standard, in each prediction mode except for the DC mode, the pixel value of the prediction block is generated according to the direction corresponding to each mode based on the adjacent pixels of the prediction block to be currently encoded.
그런데, 대부분의 경우에 있어서는 현재의 방향성 모드만으로도 충분할 수 있지만, 영상에 따라서는 각각의 예측 모드에 한계가 있기 때문에 부호화의 효율이 떨어져 예측 블록의 픽셀 값을 정확하게 예측할 수 없는 경우가 발생할 수 있다. 이러한 경우, 부정확한 인트라 예측으로 인하여 엔트로피 부호화의 이득을 제대로 볼 수 없게 되며, 이로 인해 비트율이 불필요하게 증가되는 문제점이 있다.However, in most cases, the current directional mode may be sufficient. However, since each prediction mode is limited depending on the image, the encoding efficiency may be poor, and thus the pixel value of the prediction block may not be accurately predicted. In this case, the gain of entropy coding cannot be properly seen due to incorrect intra prediction, which causes a problem that the bit rate is unnecessarily increased.
본 발명의 일 실시예는 전술한 문제점을 해결하기 위한 것으로서, 동영상에 대한 동일 프레임 내의 예측에서 방향적 인트라 예측모드 이외에 템플릿 매칭 방법을 함께 사용함으로써, 예측 효율 및 정확성을 높이면서도 그에 따른 오버헤드의 증가를 최소화할 수 있는 공간적 예측장치 및 그 예측방법, 그것을 이용한 영상 부호화 장치 및 방법, 및 영상 복호화 장치 및 방법을 제공하는 것을 목적으로 한다.One embodiment of the present invention is to solve the above-described problem, by using a template matching method in addition to the directional intra prediction mode in the prediction within the same frame for the video, thereby increasing the prediction efficiency and accuracy, An object of the present invention is to provide a spatial prediction apparatus and a prediction method thereof, an image encoding apparatus and method using the same, and an image decoding apparatus and method capable of minimizing the increase.
전술한 목적을 달성하기 위해 본 발명의 일 실시예에 따른 영상 부호화 장치는, 방향적 인트라 예측모드와 함께 템플릿 매칭(Template Matching) 모드를 사용하여 대상 블록에 대한 예측을 실행하며, 그 중 레이트-왜곡(rate-distortion)에 기반하는 비용이 가장 낮은 모드를 선택하는 공간적 예측 실행부; 및 공간적 예측 실행부에 의해 템플릿 매칭 모드가 선택된 경우, 템플릿 매칭 모드에 의해 예측되는 영상의 잔차 신호(residual signal)에 대하여 정수변환을 실행하는 정수변환 실행부를 포함하는 것을 특징으로 한다.In order to achieve the above object, an image encoding apparatus according to an embodiment of the present invention performs prediction on a target block using a template matching mode together with a directional intra prediction mode, among which A spatial prediction execution unit which selects a mode having the lowest cost based on distortion (distortion); And an integer conversion execution unit that performs integer conversion on the residual signal of the image predicted by the template matching mode when the template matching mode is selected by the spatial prediction execution unit.
여기서, 정수변환 실행부는 다음 식과 같이 정수변환할 수 있다.Here, the integer conversion execution unit may perform integer conversion as in the following equation.
Figure PCTKR2010008389-appb-I000002
Figure PCTKR2010008389-appb-I000002
여기서,
Figure PCTKR2010008389-appb-I000003
는 H. 264에서 사용되는 정 방향 정수변환의 수식이며, a, b, d의 값은 각각
Figure PCTKR2010008389-appb-I000004
의 값이다.
here,
Figure PCTKR2010008389-appb-I000003
Is the formula of the forward integer conversion used in H. 264, and the values of a, b, and d are respectively
Figure PCTKR2010008389-appb-I000004
Is the value of.
또한, 공간적 예측 실행부는 다음과 같은 식에 의해 비용이 낮은 모드를 선택할 수 있다.In addition, the spatial prediction execution unit may select a low cost mode by the following equation.
C = E + λBC = E + λB
여기서, C는 비용, E는 부호화된 비트를 디코딩할 경우 복원된 신호와 원 신호와의 차이, B는 각각의 코딩에 있어서 소요되는 비트량, 그리고 λ는 라그랑지안 계수로서 E와 B의 반영 비율을 조절할 수 있는 계수를 나타낸다.Where C is the cost, E is the difference between the reconstructed signal and the original signal when decoding the coded bits, B is the amount of bits required for each coding, and λ is the Lagrangian coefficient, which reflects the reflection ratio of E and B. Represents an adjustable coefficient.
또한, 영상 부호화 장치는, 공간적 예측 실행부에 의해 방향적 인트라 예측모드의 9개 모드 중 어느 하나가 선택된 경우, 방향성을 고려한 MDDT(Mode Dependent Directional Transform)를 실행하는 MDDT 실행부를 더 포함할 수 있다.The image encoding apparatus may further include an MDDT execution unit that executes a Mode Dependent Directional Transform (MDDT) in consideration of the directionality when any one of nine modes of the directional intra prediction mode is selected by the spatial prediction execution unit. .
이 경우, MDDT 실행부는, 방향적 인트라 예측모드에 대응하여 기 설정된 변환함수 중 선택된 모드에 대응하는 변환함수에 따라, 예측되는 영상의 잔차 신호를 변환하는 것이 바람직하다.In this case, it is preferable that the MDDT execution unit transforms the residual signal of the predicted image according to a transform function corresponding to a selected mode among the preset transform functions corresponding to the directional intra prediction mode.
전술한 목적을 달성하기 위해 본 발명의 실시예에 따른 공간적 예측장치는, 방향적 인트라 예측모드를 이용하여 대상 블록에 대한 예측을 실행하는 인트라 예측 실행부; 템플릿 매칭 모드를 이용하여 대상 블록에 대한 예측을 실행하는 템플릿 예측 실행부; 인트라 예측 실행부에 의해 실행되는 예측 모드 및 템플릿 예측 실행부에 의해 실행되는 템플릿 매칭 모드 중 레이트-왜곡에 기반하는 비용이 가장 낮은 모드를 선택하는 모드 선택부; 및 선택된 모드에 의한 예측 블록과 대상 블록 사이의 잔차 신호를 계산하는 잔차신호 계산부를 포함하는 것을 특징으로 한다.In order to achieve the above object, a spatial prediction apparatus according to an embodiment of the present invention, the intra prediction execution unit for performing the prediction for the target block using the directional intra prediction mode; A template prediction execution unit which executes the prediction on the target block using the template matching mode; A mode selection unit for selecting a mode having a lowest cost based on rate-distortion among a prediction mode executed by the intra prediction execution unit and a template matching mode executed by the template prediction execution unit; And a residual signal calculator configured to calculate a residual signal between the prediction block and the target block according to the selected mode.
또한, 전술한 목적을 달성하기 위해 본 발명의 실시예에 따른 영상 복호화 장치는, 공간적 예측 부호화에 의해 부호화되어 입력되는 비트스트림에 대하여 현재 블록에 대한 모드 타입을 판별하는 모드 타입 판별부; 모드 타입 판별부에 의해 현재 블록의 모드 타입이 템플릿 매칭 모드인 것으로 판별되면, 현재 블록을 N x N 블록단위로 분할한 후 분할된 각각의 N x N 블록에 대하여 템플릿 매칭을 수행하는 템플릿 매칭 수행부; 및 템플릿 매칭에 의한 예측 블록과 대상 블록 사이의 잔차 신호에 대하여 역정수변환을 실행하는 역정수변환 실행부를 포함하는 것을 특징으로 한다.In addition, in order to achieve the above object, an image decoding apparatus according to an embodiment of the present invention, a mode type determination unit for determining the mode type for the current block with respect to the bitstream encoded and input by spatial predictive encoding; If the mode type determination unit determines that the mode type of the current block is the template matching mode, the template matching is performed by dividing the current block into units of N × N blocks and performing template matching on each of the divided N × N blocks. part; And an inverse integer transform execution unit that performs inverse integer transform on the residual signal between the prediction block and the target block by the template matching.
여기서, 영상 복호화 장치는, 모드 타입 판별부에 의해 현재 블록의 모드 타입이 방향적 인트라 예측모드인 것으로 판별되면, 방향성을 고려하여 역 MDDT를 실행하는 역 MDDT 실행부를 더 포함하는 것이 바람직하다.Here, when it is determined by the mode type determination unit that the mode type of the current block is the directional intra prediction mode, the video decoding apparatus further includes an inverse MDDT execution unit that executes the inverse MDDT in consideration of the directionality.
또한, 템플릿 매칭 수행부는, 현재 블록을 2 x 2 블록단위로 분할한 후 각각의 2 x 2 블록에 대하여 템플릿 매칭을 수행하는 것이 바람직하다.In addition, the template matching execution unit may divide the current block into 2 x 2 block units and then perform template matching on each 2 x 2 block.
전술한 목적을 달성하기 위해 본 발명의 실시예에 따른 영상 부호화 방법은, 방향적 인트라 예측모드와 함께 템플릿 매칭 모드를 사용하여 대상 블록에 대한 예측을 실행하는 단계; 예측 실행단계에 의해 실행된 모드 중 비용이 가장 낮은 모드를 선택하는 단계; 선택단계에 의해 선택된 모드에 의해 생성된 예측 블록과 대상 블록 사이의 잔차 신호를 계산하는 단계; 및 선택단계에 의해 선택된 모드가 템플릿 매칭 모드인 경우 계산단계에 의해 계산된 잔차 신호에 대하여 정수변환을 실행하고, 선택단계에 의해 선택된 모드가 방향적 예측모드인 경우 계산단계에 의해 계산된 잔차 신호에 대하여 MDDT를 실행하는 단계를 포함하는 것을 특징으로 한다.In order to achieve the above object, an image encoding method according to an embodiment of the present invention includes: performing prediction on a target block using a template matching mode together with a directional intra prediction mode; Selecting a mode having the lowest cost among the modes executed by the predictive execution step; Calculating a residual signal between the prediction block and the target block generated by the mode selected by the selecting step; And perform integer conversion on the residual signal calculated by the calculation step when the mode selected by the selection step is the template matching mode, and calculate the residual signal calculated by the calculation step when the mode selected by the selection step is the directional prediction mode. It characterized in that it comprises the step of executing the MDDT for.
바람직하게는, 영상 부호화 방법은, 선택단계에 의해 선택된 모드가 방향적 예측모드인 경우, 기 설정된 변환함수 중 해당 예측모드에 대응하는 변환함수를 선택하는 단계를 더 포함할 수 있다. 이 경우, MDDT 실행단계는 선택된 변환함수에 따라 MDDT를 실행하는 것이 바람직하다.Preferably, the image encoding method may further include selecting a transform function corresponding to the prediction mode among preset transformation functions when the mode selected by the selecting step is a directional prediction mode. In this case, the MDDT execution step preferably executes the MDDT according to the selected conversion function.
전술한 목적을 달성하기 위해 본 발명의 실시예에 따른 공간적 예측방법은, 방향적 인트라 예측모드와 함께 템플릿 매칭 모드를 사용하여 대상 블록에 대한 예측을 실행하는 단계; 예측 실행단계에 의해 실행된 모드 중 비용이 가장 낮은 모드를 선택하는 단계; 및 선택단계에 의해 선택된 모드에 의해 생성된 예측 블록과 대상 블록 사이의 잔차 신호를 계산하는 단계를 포함하는 것을 특징으로 한다.In order to achieve the above object, a spatial prediction method according to an embodiment of the present invention, performing the prediction for the target block using a template matching mode with a directional intra prediction mode; Selecting a mode having the lowest cost among the modes executed by the predictive execution step; And calculating a residual signal between the prediction block and the target block generated by the mode selected by the selecting step.
전술한 목적을 달성하기 위해 본 발명의 실시예에 따른 영상 복호화 방법은, 공간적 예측 부호화에 의해 부호화되어 입력되는 비트스트림으로부터 현재 블록의 모드 타입을 판별하는 단계; 현재 블록의 모드 타입이 템플릿 매칭 모드인 것으로 판별되면, 현재 블록을 N x N 블록단위로 분할한 후 분할된 각각의 N x N 블록에 대하여 템플릿 매칭을 수행하는 단계; 및 템플릿 매칭에 의한 예측 블록과 대상 블록 사이의 잔차 신호에 대하여 역정수변환을 실행하는 단계를 포함하는 것을 특징으로 한다.In order to achieve the above object, an image decoding method according to an embodiment of the present invention comprises the steps of: determining a mode type of a current block from a bitstream encoded and input by spatial predictive encoding; If it is determined that the mode type of the current block is a template matching mode, dividing the current block into units of N × N blocks and performing template matching on each of the divided N × N blocks; And performing inverse integer transform on the residual signal between the prediction block and the target block by template matching.
바람직하게는, 영상 복호화 방법은, 현재 블록의 모드 타입이 방향적 인트라 예측모드인 것으로 판별되면, 방향성을 고려하여 역 MDDT를 실행하는 단계를 더 포함할 수 있다.Preferably, the image decoding method may further include executing the inverse MDDT in consideration of the directionality if it is determined that the mode type of the current block is the directional intra prediction mode.
이상에서 설명한 바와 같이 본 발명의 실시예에 의하면, H. 264 표준과 비교하여 비트스트림 생성서의 오버헤드를 크게 증가시키지 않고서도 비트율을 감소시키면서 인트라 예측의 정확성을 높일 수 있게 된다.As described above, according to the embodiment of the present invention, compared to the H.264 standard, it is possible to increase the accuracy of intra prediction while reducing the bit rate without significantly increasing the overhead of the bitstream generator.
도 1은 일반적인 인터 예측을 설명하기 위해 도시한 도면이다.1 is a diagram illustrating a general inter prediction.
도 2는 인트라 예측 모드의 방향성을 설명하기 위해 도시한 도면이다.2 is a diagram illustrating directionality of the intra prediction mode.
도 3은 도 2의 인트라 예측 모드를 설명하기 위한 라벨링의 예를 나타낸 도면이다.FIG. 3 is a diagram illustrating an example of labeling for explaining an intra prediction mode of FIG. 2.
도 4는 도 2의 인트라 예측 모드의 각각을 설명하기 위해 도시한 도면이다.FIG. 4 is a diagram illustrating each of the intra prediction modes of FIG. 2.
도 5의 (a)는 도 2의 인트라 예측 모드 중 예측 모드 0을 설명하기 위해 도시한 도면이며, 도 5의 (b)는 도 2의 인트라 예측 모드 중 예측 모드 1을 설명하기 위해 도시한 도면이다.FIG. 5A is a diagram illustrating the prediction mode 0 of the intra prediction modes of FIG. 2, and FIG. 5B is a diagram illustrating the prediction mode 1 of the intra prediction modes of FIG. 2. to be.
도 6은 본 발명의 일 실시예에 따른 영상 부호화 장치를 개략적으로 도시한 도면이다.6 is a diagram schematically illustrating an image encoding apparatus according to an embodiment of the present invention.
도 7은 본 발명의 실시예에 이용되는 템플릿 매칭을 설명하기 위해 도시한 도면이다.7 is a diagram illustrating template matching used in an embodiment of the present invention.
도 8은 4개의 8x8 구획으로 구성된 매크로블록의 구조 예를 나타낸 도면이다.8 is a diagram showing an example of the structure of a macroblock composed of four 8x8 partitions.
도 9는 16개의 4x4 구획으로 구성된 매크로블록의 구조 예를 나타낸 도면이다.9 is a diagram showing an example of the structure of a macroblock consisting of 16 4x4 partitions.
도 10은 4x4 구획의 변환 계수들에 대한 지그재그 스캔을 나타낸 도면이다.10 is a diagram illustrating a zigzag scan for transform coefficients of a 4x4 partition.
도 11은 본 발명의 일 실시예에 따른 공간적 예측방법을 나타낸 흐름도이다.11 is a flowchart illustrating a spatial prediction method according to an embodiment of the present invention.
도 12는 본 발명의 다른 실시예에 따른 영상 부호화 방법을 나타낸 흐름도이다.12 is a flowchart illustrating a video encoding method according to another embodiment of the present invention.
도 13은 도 6의 영상 부호화 장치에 의해 생성되는 비트스트림의 구조 예를 나타낸 도면이다.FIG. 13 is a diagram illustrating an example of a structure of a bitstream generated by the video encoding apparatus of FIG. 6.
도 14는 본 발명의 일 실시예에 따른 영상 복호화 장치를 나타낸 도면이다.14 is a diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
도 15는 도 14의 영상 복호화 장치에 의한 영상 복호화 방법을 나타낸 흐름도이다.FIG. 15 is a flowchart illustrating an image decoding method by the image decoding apparatus of FIG. 14.
이하, 본 발명의 일부 실시예들을 예시적인 도면을 통해 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다.Hereinafter, some embodiments of the present invention will be described in detail through exemplary drawings. In adding reference numerals to the components of each drawing, it should be noted that the same reference numerals are assigned to the same components as much as possible even though they are shown in different drawings. In addition, in describing the present invention, when it is determined that the detailed description of the related well-known configuration or function may obscure the gist of the present invention, the detailed description thereof will be omitted.
또한, 본 발명의 구성 요소를 설명하는 데 있어서, 제 1, 제 2, A, B, (a), (b) 등의 용어를 사용할 수 있다. 이러한 용어는 그 구성 요소를 다른 구성 요소와 구별하기 위한 것일 뿐, 그 용어에 의해 해당 구성 요소의 본질이나 차례 또는 순서 등이 한정되지 않는다. 어떤 구성 요소가 다른 구성요소에 "연결", "결합" 또는 "접속"된다고 기재된 경우, 그 구성 요소는 그 다른 구성요소에 직접적으로 연결되거나 접속될 수 있지만, 각 구성 요소 사이에 또 다른 구성 요소가 "연결", "결합" 또는 "접속"될 수도 있다고 이해되어야 할 것이다.In addition, in describing the component of this invention, terms, such as 1st, 2nd, A, B, (a), (b), can be used. These terms are only for distinguishing the components from other components, and the nature, order or order of the components are not limited by the terms. If a component is described as being "connected", "coupled" or "connected" to another component, that component may be directly connected or connected to that other component, but between components It will be understood that may be "connected", "coupled" or "connected".
도 6은 본 발명의 일 실시예에 따른 영상 부호화 장치를 개략적으로 도시한 도면이다. 도면을 참조하면, 영상 부호화 장치(600)는 공간적 예측 실행부(610), 정수변환 실행부(620) 및 MDDT(Mode Dependent Directional Transform)(630)를 구비한다. 여기서, 영상 부호화 장치는 도시한 구성요소 이외에 차분 계산부, 양자화부, 역 양자화부, 모션 추정부, 모션 보상부 등을 더 구비할 수 있으나, 본 발명의 실시예에 직접적인 관련이 없는 구성요소는 설명을 간소화하기 위하여 생략하였다.6 is a diagram schematically illustrating an image encoding apparatus according to an embodiment of the present invention. Referring to the drawings, the image encoding apparatus 600 includes a spatial prediction execution unit 610, an integer transform execution unit 620, and a Mode Dependent Directional Transform (MDDT) 630. Here, the image encoding apparatus may further include a difference calculator, a quantizer, an inverse quantizer, a motion estimator, a motion compensator, etc. in addition to the illustrated components, but the components that are not directly related to an embodiment of the present invention Omitted to simplify the description.
공간적 예측 실행부(610)는 동일한 프레임 내에서 방향적 인트라 예측모드와 함께 템플릿 매칭(Template Matching) 모드를 사용하여 대상 블록에 대한 예측을 실행하며, 그 중 레이트-왜곡(rate-distortion)에 기반하는 비용이 가장 낮은 모드를 선택한다. 여기서, 공간적 예측 실행부(610)는 영상 부호화 장치(600) 내에 하나의 구성요소로 구현될 수도 있지만, 도시한 바와 같이 인트라 예측 실행부(612), 템플릿 예측 실행부(614), 모드 선택부(616) 및 잔차 신호 계산부(618)를 포함하여 구성될 수도 있다.The spatial prediction execution unit 610 executes the prediction for the target block using the template matching mode together with the directional intra prediction mode in the same frame, based on rate-distortion. Choose the lowest cost mode. Here, the spatial prediction execution unit 610 may be implemented as one component in the image encoding apparatus 600, but as illustrated, the intra prediction execution unit 612, the template prediction execution unit 614, and the mode selection unit may be implemented. 616 and the residual signal calculator 618 may be configured.
인트라 예측 실행부(612)는 방향적 인트라 예측모드를 이용하여 대상 블록에 대한 예측을 실행한다. 즉, 인트라 예측 실행부(612)는 도 4에 도시한 바와 같이 동일한 프레임 내에서 대상 블록의 주변 픽셀들로부터 각각의 예측 모드에 따른 픽셀 값을 예측한다.The intra prediction execution unit 612 performs the prediction on the target block by using the directional intra prediction mode. That is, the intra prediction execution unit 612 predicts pixel values according to each prediction mode from neighboring pixels of the target block in the same frame as shown in FIG. 4.
또한, 템플릿 예측 실행부(614)는 템플릿 매칭 모드를 이용하여 대상 블록에 대한 예측을 실행한다. In addition, the template prediction execution unit 614 executes the prediction on the target block using the template matching mode.
현재 프레임 내의 픽셀 p에 대한 예측 프레임에서의 픽셀 값은 현재 프레임에서의 이웃 픽셀들의 값 N(p)를 비교하여 결정할 수 있다. 여기서, 비교되는 이웃 픽셀들의 값 N(p)는 픽셀 p의 템플릿이라고 한다.The pixel value in the prediction frame for pixel p in the current frame can be determined by comparing the value N (p) of neighboring pixels in the current frame. Here, the value N (p) of the neighboring pixels to be compared is referred to as a template of the pixel p.
도 7은 픽셀 값을 예측하고자 하는 4 x 4 대상 블록(target block)에 인접한 탐색 영역을 나타낸다. 도시한 바와 같이, 탐색 영역(700)은 먼저 재생된 픽셀들 중에서 x 픽셀들의 폭 및 y 픽셀들의 높이로 이루어지지만, 이 중 재생되지 않은 부분은 우측 하단에 나타낸 바와 같이 배제된다.7 illustrates a search region adjacent to a 4 × 4 target block for which pixel values are to be predicted. As shown, the search area 700 is composed of the width of the x pixels and the height of the y pixels among the pixels that are first reproduced, but the portion that is not reproduced is excluded as shown in the lower right.
4 x 4 대상 블록(710)은 다시 2 x 2의 대상 서브 블록(720)으로 나누어지며, 템플릿 매칭은 각각의 대상 서브 블록 단위로 실행된다. 이때, 대상 서브 블록(720)에 대해, 동일한 프레임 내에 있으며 대상 서브 블록(720)에 인접해 있는 픽셀이 템플릿(730)이 된다. The 4 × 4 target block 710 is further divided into 2 × 2 target subblocks 720, and template matching is performed in units of each target subblock. In this case, for the target subblock 720, the pixels in the same frame and adjacent to the target subblock 720 become the template 730.
템플릿 매칭은 탐색 영역(700) 내에서 템플릿(730)과 동일한 형상(도면의 경우 역 L자 형상)을 갖는 픽셀 군들 중에서, 대응하는 픽셀 사이의 SAD를 계산하고, SAD가 가장 작은 영역을 후보 이웃영역(740)으로 한다. 이때, 후보 이웃영역(740)에 접해있는 후보 서브 블록(750)이 대상 서브 블록(720)에 대한 텍스처 신호로 결정된다. 여기서 템플릿 매칭은 설명을 용이하게 하기 위하여 4 x 4 블록을 예로서 설명하였지만, 이에 한정되는 것은 아니며 다양한 블록에 대한 템플릿 매칭이 가능하다.Template matching calculates the SAD between the corresponding pixels among the group of pixels having the same shape as the template 730 (inverted L-shape in the drawing) in the search area 700, and selects the area with the smallest SAD as the candidate neighbor. An area 740 is assumed. In this case, the candidate subblock 750 in contact with the candidate neighboring region 740 is determined as a texture signal for the target subblock 720. Template matching has been described using 4 x 4 blocks as an example to facilitate explanation, but is not limited thereto, and template matching is possible for various blocks.
모드 선택부(616)는 인트라 예측 실행부(612)에 의해 실행되는 예측 모드 및 템플릿 예측 실행부(614)에 의해 실행되는 템플릿 매칭 모드 중, 레이트-왜곡에 기반하는 비용이 가장 낮은 모드를 선택한다. 즉, 모드 선택부(616)는 대상 블록이 4 x 4 인 경우, H. 264 표준에 따라 인트라 예측 실행부(612)에 의해 실행된 9개의 방향적 인트라 예측모드와 템플릿 예측 실행부(614)에 의해 실행된 템플릿 매칭 모드 중, 비용(cost)이 가장 낮은 모드를 선택한다. 그러나, 비용(C)은 레이트-왜곡 기반에 한정되지 않으며 여러 가지 방식으로 정의될 수 있다.The mode selector 616 selects a mode with the lowest cost based on rate-distortion among the prediction mode executed by the intra prediction execution unit 612 and the template matching mode executed by the template prediction execution unit 614. do. That is, if the target block is 4 x 4, the mode selector 616 may include nine directional intra prediction modes and the template prediction execution unit 614 executed by the intra prediction execution unit 612 according to the H. 264 standard. Of the template matching modes executed by, the mode with the lowest cost is selected. However, cost C is not limited to the rate-distortion basis and can be defined in various ways.
비용에 대한 대표적인 방법인 레이트-왜곡(rate-distortion)에 따를 경우, 수학식 2와 같이 계산될 수 있다. 여기서, E는 부호화된 비트를 디코딩하여 복원된 신호와 원 신호와의 차이를 의미하고, B는 각각의 코딩에 있어서 소요되는 비트량을 의미한다. 또한, λ는 라그랑지안 계수로서 E와 B의 반영 비율을 조절할 수 있는 계수를 의미한다.According to the rate-distortion which is a representative method for the cost, it can be calculated as Equation 2. Here, E denotes the difference between the signal reconstructed by decoding the encoded bit and the original signal, and B denotes the amount of bits required for each coding. In addition, λ is a Lagrangian coefficient and means a coefficient which can adjust the reflection ratio of E and B. FIG.
[수학식 2][Equation 2]
Figure PCTKR2010008389-appb-I000005
Figure PCTKR2010008389-appb-I000005
잔차 신호 계산부(618)는 모드 선택부(616)에 의해 선택된 모드에 의한 예측 블록과 대상 블록 사이의 잔차 신호(residual signal)를 계산한다.The residual signal calculator 618 calculates a residual signal between the prediction block and the target block according to the mode selected by the mode selector 616.
정수변환 실행부(620)는 공간적 예측 실행부(610)에 의해 템플릿 매칭 모드가 선택된 경우 즉, 인트라 예측 실행부(612)에 의해 실행된 9개의 방향적 인트라 예측모드와 템플릿 예측 실행부(614)에 의해 실행된 템플릿 매칭 모드 중, 모드 선택부(616)에 의해 템플릿 매칭 모드가 비용이 가장 낮은 것으로 선택된 경우, 템플릿 매칭 모드에 의해 예측되는 영상의 잔차 신호에 대하여 정수변환을 실행한다. 템플릿 매칭 모드의 경우, 방향적 예측 모드와는 달리 이후에서 설명하는 적응적 변환이 정의되지 않지만, 템플릿 매칭 모드에 의한 예측 블록은 H. 264 표준에서 정의하는 정수변환을 이용할 수 있다.The integer transform execution unit 620 performs nine directional intra prediction modes and the template prediction execution unit 614 when the template matching mode is selected by the spatial prediction execution unit 610, that is, executed by the intra prediction execution unit 612. If the template matching mode is selected as the lowest cost by the mode selection unit 616 among the template matching modes performed by), integer conversion is performed on the residual signal of the image predicted by the template matching mode. In the case of the template matching mode, unlike the directional prediction mode, the adaptive transform described later is not defined, but the prediction block by the template matching mode may use an integer transform defined in the H. 264 standard.
H. 264 표준은 H 261, H. 263, MPEG-1, MPEG-2, MPEG-4 등과는 달리 정수변환(integer transform)을 채택함으로써 변환 연산 수행 시에 부족한 분해능(resolution)에 따라서 발생할 수도 있는 오차(mismatch)를 근원적으로 제거하였다. 즉, 기존 동영상 및 정지영상 표준에서 사용하였던 변환인 이산 여산 변환(DCT: Discrete Cosine Transform) 연산은 부동 소수점 연산(floating point operation)을 채택함으로써 개개의 구현에 다라서 변환 연산의 결과가 달라질 수 있는 여지가 남겨져 있었다. 그러나 H. 264 표준에서는 정수 연산 및 비트 이동(bit shift) 연산만으로 변환을 정의함으로써 디지털 시스템에서 구현 시에 연산으로 인한 오차가 날 수 있는 여지를 표준화 작업 중에 근원적으로 제거하였다.Unlike the H 261, H. 263, MPEG-1, MPEG-2, and MPEG-4, the H. 264 standard adopts an integer transform, which may occur due to the lack of resolution when performing a transform operation. Mismatch was eliminated at the root. In other words, the Discrete Cosine Transform (DCT) operation, which is a transform used in the existing video and still image standards, adopts a floating point operation, and thus the result of the transform operation may vary depending on individual implementations. There was room left. However, in the H. 264 standard, the conversion is defined only by integer and bit shift operations, and the digital system eliminates the possibility of error in operation during standardization.
H. 264 표준에서 정의하고 있는 매크로블록(macroblock)의 크기는 도 8에 나타낸 바와 같이 16 x 16의 크기를 가지는 픽셀들의 집합으로 정의된다. 도 8의 매크로블록은 0 ~ 3까지의 인덱스(index)를 가지는 4개의 8 x 8의 구획으로 구성되어 있는 상태를 나타낸 것이다. 이것은 0~ 3까지의 4개의 8 x 8 구획들의 변환 계수들을 부호화할 때, 그 순서대로 부호화되는 것을 나타낸다. 또한, H. 264 표준은 CBPY(Coded Block Pattern for Y)를 결정하는 데 있어서 각각의 8 x 8 구획 내의 0이 아닌 변환계수들의 존재 여부에 따라서 하도록 정의하고 있다.The size of the macroblock defined in the H. 264 standard is defined as a set of pixels having a size of 16 × 16 as shown in FIG. 8. The macroblock of FIG. 8 shows a state composed of four 8 × 8 partitions having indices of 0 to 3. FIG. This indicates that when encoding transform coefficients of four 8 x 8 partitions from 0 to 3, they are encoded in that order. In addition, the H.264 standard defines whether to determine the coded block pattern for Y (CBPY) based on the presence or absence of nonzero transform coefficients in each 8 x 8 partition.
도 9는 하나의 매크로블록이 16개의 4 x 4 구획으로 구성되어 있음을 나타낸다. 도 8에서 설명한 바와 같이 하나의 매크로블록은 4개의 8 x 8 구획으로 나뉘어져 지정된 순서를 통해서 처리하도록 정의되어 있다. 또한, 이와 마찬가지로 하나의 8 x 8 구획은 4개의 4 x 4 구획으로 나뉘어져서 지정된 순서대로 처리되도록 정의된다. 이러한 일련의 구성은 도 9에 나타난 바와 같다. 또한, 도면에는 16개의 4 x 4 구획의 각 DC 성분을 모아서 4 x 4 구획을 다시 구성할 수 있음을 나타내었다. 즉, 각 4 x 4 구획의 왼쪽 윗부분에 진하게 표시된 부분은 개념적으로 각 4 x 4 구획의 변환 계수들 중 DC를 표시하는 부분이며, 이들 DC 계수들을 모아서 별도의 4 x 4 구획을 형성하는 것이 가능하게 된다. 9 shows that one macroblock is composed of sixteen 4 × 4 partitions. As described in FIG. 8, one macroblock is defined to be divided into four 8 × 8 partitions and processed through a specified order. Likewise, one 8 x 8 partition is defined to be divided into four 4 x 4 partitions and processed in the specified order. This series of configurations is as shown in FIG. In addition, the drawing shows that each DC component of the 16 4 x 4 compartments can be collected to reconstruct the 4 x 4 compartments. In other words, the darker part on the upper left of each 4 x 4 partition is conceptually a part of indicating the DC among the conversion coefficients of each 4 x 4 partition, and it is possible to collect these DC coefficients to form a separate 4 x 4 partition. Done.
한편, 4 x 4 정수변환은 인트라 및 인터 모드에서 4 x 4 구획의 잔류 신호(residual signal)의 압축을 위해서 사용하는 변환이다. H. 264의 모든 변환은 덧셈 및 비트 시프트(bit shift) 연산만으로 구현이 가능하기 때문에, 모든 기저는 1과 2 또는 2의 승수(power of 2)만으로 정의가 된다. 기본적인 4 x 4 정수변환은 도 10에 나타낸 바와 같이 4 x 4 구획에 대해서 지그재그(zig-zag) 스캔을 시행하기 위한 변환계수(transform coefficients)를 만들어 내기 위해서 사용된다.On the other hand, the 4 x 4 integer transform is a transform used for the compression of the residual signal of the 4 x 4 partition in the intra and inter modes. Since all transforms in H. 264 can be implemented by addition and bit shift operations only, every basis is defined by a power of 2 and 1 or 2 or 2 only. The basic 4 x 4 integer transform is used to generate transform coefficients for performing a zig-zag scan on the 4 x 4 partition as shown in FIG.
4 x 4 입력 X에 대한 DCT 변환 식은 수학식 3과 같다.The DCT transform for the 4 x 4 input X is given by equation (3).
[수학식 3][Equation 3]
Figure PCTKR2010008389-appb-I000006
Figure PCTKR2010008389-appb-I000006
여기서,
Figure PCTKR2010008389-appb-I000007
의 값을 가진다. 수학식 3을 인수분해 하면 수학식 4를 얻을 수 있다.
here,
Figure PCTKR2010008389-appb-I000007
Has the value By factoring Equation 3, Equation 4 can be obtained.
[수학식 4][Equation 4]
Figure PCTKR2010008389-appb-I000008
Figure PCTKR2010008389-appb-I000008
여기서, E는 스케일링 팩터(Scaling Factor) 행렬이며,
Figure PCTKR2010008389-appb-I000009
는 (CXCT)와 E 행렬의 같은 위치의 값을 서로 곱하는 기호이다. 그리고 d = c/b ?0.414를 갖는 상수이다. 수학식 4의 간략화를 위하여 d = 0.5로 가정하여 대입하면 수학식 5와 같은 행렬식으로 정리된다.
Where E is a scaling factor matrix,
Figure PCTKR2010008389-appb-I000009
Is a symbol that multiplies the values of (CXC T ) and the same position in the E matrix by each other. And d = c / b-0.414. For simplification of Equation 4, assuming that d = 0.5, it is arranged as a determinant like Equation 5.
[수학식 5][Equation 5]
Figure PCTKR2010008389-appb-I000010
Figure PCTKR2010008389-appb-I000010
여기서, a, b, d의 값은 각각
Figure PCTKR2010008389-appb-I000011
의 값을 갖는다. 또한, 수학식 5에서
Figure PCTKR2010008389-appb-I000012
는 H. 264에서 사용되는 정 방향 정수변환의 수식을 나타내며, 행렬의 곱으로 계산할 수 있다. 또한, 수학식 5에서 처음과 마지막 행렬은 ±1, ±2의 정수 값만을 가지고 있으며, 이 값들은 덧셈, 뺄셈, 쉬프트(shift) 연산으로 간단히 계산할 수 있다. 이것을 '곱셈이 없는 방법(Multiplication-free)'이라고 하며 참조 부호화기에서 매우 효율적으로 사용할 수 있다.
Here, the values of a, b, and d are respectively
Figure PCTKR2010008389-appb-I000011
Has the value of. Also, in Equation 5
Figure PCTKR2010008389-appb-I000012
Denotes the equation for forward integer conversion used in H. 264, which can be calculated as the product of the matrix. In addition, in Equation 5, the first and last matrices have only integer values of ± 1 and ± 2, and these values can be simply calculated by addition, subtraction, and shift operations. This is called 'multiplication-free' and can be used very efficiently in a reference encoder.
MDDT 실행부(630)는 공간적 예측 실행부(610)에 의해 9개의 방향적 인트라 예측모드 중의 어느 하나가 선택된 경우 즉, 인트라 예측 실행부(612)에 의해 실행된 방향적 인트라 예측모드 중의 어느 하나가 가장 낮은 비용을 갖는 것으로 선택된 경우, 방향성을 고려한 MDDT를 실행한다.The MDDT execution unit 630 is any one of nine directional intra prediction modes selected by the spatial prediction execution unit 610, that is, any one of the directional intra prediction modes executed by the intra prediction execution unit 612. If is selected to have the lowest cost, execute the MDDT taking into account the direction.
MDDT(Mode Dependent Directional Transform)는 인트라 예측이 수행되고 난 후 생성되는 예측 오차 블록에 대해서 인트라 예측방법의 방향성에 따라 KLT(Karhunen Loeve Transform)를 기반으로 설계된 기저 벡터(basis vector)를 이용하여, 예측 오차 블록의 에너지를 주파수 영역에서 압축하는 기술이다. MDDT는 인트라 예측방법의 방향성에 따라 변환 부호화를 적용하므로, 양자화 후에 생성되는 양자화된 변환 계수들의 특성 역시 방향성에 따라 다른 형태로 나타날 수 있다. 이러한 계수들을 보다 효율적으로 부호화하기 위해서 적응형 스캐닝(adaptive scanning)을 이용할 수 있다.Mode Dependent Directional Transform (MDDT) uses a basis vector designed based on the Karhunen Loeve Transform (KLT) according to the direction of the intra prediction method for a prediction error block generated after intra prediction is performed. This technique compresses the energy of the error block in the frequency domain. Since MDDT applies transform coding according to the direction of the intra prediction method, characteristics of quantized transform coefficients generated after quantization may also appear in different forms according to the direction. In order to encode these coefficients more efficiently, adaptive scanning may be used.
MDDT는 방향적 예측모드에 따라 구분되는 변환함수의 세트로 선택될 수 있는데, 이와 같은 변환함수의 세트는 표 1과 같이 간주될 수 있다.The MDDT may be selected as a set of transform functions classified according to the directional prediction mode, and such a set of transform functions may be considered as shown in Table 1 below.
표 1
Figure PCTKR2010008389-appb-T000001
Table 1
Figure PCTKR2010008389-appb-T000001
여기서, fxy는 y번째 예측모드에 일치하는 x번째 변환함수를 나타낸다. 표 1에는 각각의 예측모드에 N + 1 개의 함수가 할당되는 것으로 기재하였지만, 이에 한정된 것은 아니며, 각각의 예측모드의 함수의 수는 동일하지 않아도 된다. 예를 들면, 모드 0는 N + 1 개의 할당된 변환함수를 가지며, 모드 1은 N 개의 할당된 변환함수를 가지고, 모드 2는 N - 1 개의 할당된 변환함수를 가질 수도 있다.Here, f xy denotes the x-th transform function corresponding to the y-th prediction mode. Table 1 describes that N + 1 functions are allocated to each prediction mode, but the present invention is not limited thereto, and the number of functions of each prediction mode may not be the same. For example, mode 0 may have N + 1 assigned transform functions, mode 1 may have N assigned transform functions, and mode 2 may have N − 1 assigned transform functions.
MDDT 실행부(630)는 공간적 예측 실행부(610)의 모드 선택부(616)에 의해 선택된 방향적 인트라 예측모드에 대응하여, 기 설정된 대응하는 변환함수에 따라 예측되는 영상의 잔차 신호를 변환한다.The MDDT execution unit 630 converts the residual signal of the image predicted according to the preset corresponding transform function in response to the directional intra prediction mode selected by the mode selection unit 616 of the spatial prediction execution unit 610. .
도 11은 본 발명의 다른 실시예에 따른 공간적 예측방법을 나타낸 흐름도이다. 도면을 참조하면, 도 6의 공간적 예측 실행부(610)는 방향적 인트라 예측모드와 함께 템플릿 매칭 모드를 사용하여 대상 블록에 대한 예측을 실행한다(S1101). 이때, 공간적 예측 실행부(610)는 방향적 인트라 예측모드와 템플릿 매칭 모드에 의한 비용을 비교하며, 비용이 가장 작은 모드를 최적의 모드로 선택한다(S1103).11 is a flowchart illustrating a spatial prediction method according to another embodiment of the present invention. Referring to FIG. 6, the spatial prediction execution unit 610 of FIG. 6 executes prediction on a target block using a template matching mode together with a directional intra prediction mode (S1101). In this case, the spatial prediction execution unit 610 compares the costs of the directional intra prediction mode and the template matching mode, and selects the mode having the lowest cost as an optimal mode (S1103).
또한, 전술한 바와 같이 방향적 인트라 예측모드 및 템플릿 매칭 모드 중 최적의 모드가 선택되면, 선택된 모드에 의해 선택된 예측 블록과 대상 블록 사이의 잔차 신호를 계산한다(S1105).In addition, when the optimal mode is selected from the directional intra prediction mode and the template matching mode as described above, the residual signal between the prediction block selected by the selected mode and the target block is calculated (S1105).
도 12는 도 6의 영상 부호화 장치에 따른 영상 부호화 방법을 나타낸 흐름도이다. 여기서, 단계 S1201 내지 단계 S1205 단계는 도 11의 공간적 예측방법과 동일한 공간적 예측방법을 이용하여 잔차 신호를 계산하므로, 이에 대한 상세한 설명은 생략한다.12 is a flowchart illustrating an image encoding method according to the image encoding apparatus of FIG. 6. Here, since steps S1201 to S1205 calculate the residual signal using the same spatial prediction method as that of FIG. 11, detailed description thereof will be omitted.
공간적 예측 실행부(610)에 의해 템플릿 매칭 모드가 최적의 모드인 것으로 선택되면(S1207), 정수변환 계산부(620)는 템플릿 예측 실행부(614)에 의해 실행된 예측 블록과 대상 블록 사이의 잔차 신호에 대하여 정수변환을 실행한다(S1209).If the template matching mode is selected as the optimal mode by the spatial prediction execution unit 610 (S1207), the integer transform calculation unit 620 may perform the process between the prediction block and the target block executed by the template prediction execution unit 614. Integer conversion is performed on the residual signal (S1209).
만일, 공간적 예측 실행부(610)에 의해 템플릿 매칭 모드가 아닌 방향적 인트라 예측모드 중의 어느 하나가 최적의 모드인 것으로 선택되면(S1207), MDDT 실행부(630)는 기 설정된 변환함수 중 선택된 예측모드에 대응하는 변환함수를 선택하며(S1211), 선택된 변환함수를 이용하여, 인트라 예측 실행부(612)에 의해 실행된 예측 블록과 대상 블록 사이의 잔차 신호를 MDDT를 실행한다(S1213).If one of the directional intra prediction modes other than the template matching mode is selected as the optimal mode by the spatial prediction execution unit 610 (S1207), the MDDT execution unit 630 selects the prediction selected from the preset conversion functions. A transform function corresponding to the mode is selected (S1211), and the residual signal between the prediction block executed by the intra prediction execution unit 612 and the target block is executed using the selected transform function (S1213).
도 13은 도 6의 영상 부호화 장치(600)에 의해 생성되는 비트스트림의 구조의 예를 나타낸 도면이다. H.264에서는 비트스트림은 슬라이스(slice) 단위로 부호화된다. 비트스트림은 슬라이스 헤더(slice header)(1310)와, 슬라이스 데이터(slice date)(1320)를 포함하며, 슬라이스 데이터(1320)는 복수의 매크로블록 데이터들(MB)(1321 내지 1324)로 구성된다. 또한, 하나의 매크로블록 데이터(1323)는 mb_type 필드(1330)와, mb_pred 필드(1335)와, 텍스쳐 데이터(texture data) 필드(1339)로 구성될 수 있다.FIG. 13 is a diagram illustrating an example of a structure of a bitstream generated by the video encoding apparatus 600 of FIG. 6. In H.264, bitstreams are encoded in slice units. The bitstream includes a slice header 1310 and a slice date 1320, and the slice data 1320 includes a plurality of macroblock data (MBs) 1321 to 1324. . In addition, one macroblock data 1323 may include an mb_type field 1330, an mb_pred field 1335, and a texture data field 1335.
여기서, mb_type 필드(1330)에는 매크로블록의 종류를 나타내는 값이 기록된다. 즉, 현재 매크로블록이 인트라 매크로블록(intra macroblock)인지, 인터 매크로블록(inter macroblock)인지를 나타낸다.Here, a value indicating the type of macroblock is recorded in the mb_type field 1330. That is, it indicates whether the current macroblock is an intra macroblock or an inter macroblock.
그리고, mb_pred 필드(1335)에는 매크로블록의 종류에 따른 세부 예측 모드가 기록된다. 인트라 매크로블록의 경우에는 인트라 예측시 선택된 예측 모드의 정보가 기록되고, 인터 매크로블록의 경우에는 매크로블록 파티션 별로 참조 프레임 번호 및 모션 벡터의 정보가 기록된다. 또한, 템플릿 매칭 모드의 경우에는 그것을 알리기 위한 비트만을 기록하고 나머지 정보는 생략하여 현재 모드가 템플릿 매칭 모드라는 것을 복호화기에 통지할 수 있다. 예를 들어, 현재 블록의 모드가 템플릿 매칭 모드로 선택된 경우 비트 1을 전송하고 나머지 정보는 생략하며, 그렇지 않은 경우에는 비트 0을 전송한 후 나머지 모드 정보를 부호화할 수 있다.In the mb_pred field 1335, a detailed prediction mode according to the type of macroblock is recorded. In the case of an intra macroblock, information of a prediction mode selected during intra prediction is recorded, and in case of an inter macroblock, information of a reference frame number and a motion vector is recorded for each macroblock partition. In addition, in the case of the template matching mode, only a bit for informing it may be recorded and the remaining information may be omitted to notify the decoder that the current mode is the template matching mode. For example, when the mode of the current block is selected as the template matching mode, bit 1 is transmitted and the remaining information is omitted. Otherwise, the remaining mode information may be encoded after bit 0 is transmitted.
mb-type 필드(1330)가 인트라 매크로블록을 나타내는 경우, mb-pred 필드(1335)는 복수의 블록 정보(1341 내지 1344)로 나뉘어지고, 각각의 블록 정보(1342)는 전술한 메인 모드의 값을 기록하는 main_mode 필드(1345)와 전술한 서브 모드의 값을 기록하는 sub-mode 필드(1346)로 나뉘어진다.When the mb-type field 1330 indicates an intra macroblock, the mb-pred field 1335 is divided into a plurality of block information 1342 to 1344, and each block information 1342 is a value of the main mode described above. It is divided into a main_mode field 1345 for recording a sub-mode field 1346 for recording a value of the above-described sub-mode.
마지막으로, 텍스쳐 데이터 필드(1339)에는 부호화된 잔차 영상, 즉 텍스쳐 데이터가 기록된다.Finally, the encoded residual image, that is, the texture data, is recorded in the texture data field 1339.
도 14는 본 발명의 일 실시예에 따른 영상 복호화 장치를 개략적으로 도시한 도면이다. 도면을 참조하면, 본 발명의 일 실시예에 따른 영상 복호화 장치(1400)는, 모드 타입 판별부(1410), 템플릿 매칭 수행부(1420), 역정수변환 실행부(1430) 및 역 MDDT 실행부(1440)를 구비한다.14 is a diagram schematically illustrating an image decoding apparatus according to an embodiment of the present invention. Referring to the drawings, an image decoding apparatus 1400 according to an embodiment of the present invention may include a mode type determination unit 1410, a template matching execution unit 1420, an inverse integer conversion execution unit 1430, and an inverse MDDT execution unit. 1440.
모드 타입 판별부(1410)는 공간 예측 부호화에 의해 부호화되어 입력되는 비트스트림에 대하여, 현재 블록에 대한 모드 타입을 판별한다. 즉, 도 13과 같은 비트스트림으로부터 현재 블록에 대한 모드 정보를 읽고 모드 타입을 판별한다. 예를 들어, 입력되는 비트스트림에 현재 블록의 모드 타입이 템플릿 매칭 모드임을 나타내는 비트 1이 기록된 경우, 해당 비트스트림이 템플릿 매칭 모드로 부호화되었음을 인식하고 그에 대응하는 복호화를 준비한다. 또한, 입력되는 비트스트림에 현재 블록의 모드 타입이 방향적 인트라 예측모드임을 나타내는 비트 0이 기록된 경우, 해당 비트스트림의 서브 모드에 기록된 정보를 참조하여 그에 대응하는 방향적 인트라 예측 블록의 복호화를 준비한다.The mode type determination unit 1410 determines a mode type for the current block with respect to a bitstream encoded and input by spatial prediction encoding. That is, the mode type of the current block is read from the bitstream as shown in FIG. 13 to determine the mode type. For example, when bit 1 indicating that the mode type of the current block is a template matching mode is recorded in the input bitstream, it recognizes that the corresponding bitstream is encoded in the template matching mode and prepares decoding corresponding thereto. In addition, when bit 0 indicating that the mode type of the current block is the directional intra prediction mode is recorded in the input bitstream, decoding of the directional intra prediction block corresponding to the information recorded in the sub mode of the corresponding bitstream is referred to. Prepare.
모드 타입 판별부(1410)에 의해 현재 블록의 모드 타입이 템플릿 매칭 모드인 것으로 판별되면, 템플릿 매칭 수행부(1420)는 현재 블록을 N x N 블록단위로 분할한 후 분할된 각각의 N x N 블록에 대하여 템플릿 매칭을 수행한다. 바람직하게는, 템플릿 매칭 수행부(1420)는 현재 블록을 2 x 2 블록단위로 분할하며, 분할된 각각의 2 x 2 블록에 대하여 템플릿 매칭을 수행한다. 이때, 템플릿 매칭에 대한 방법은 도 7에 나타낸 바와 같이, 탐색 영역(700) 내에서 템플릿(730)과 동일한 형상(도면의 경우 역 L자 형상)을 갖는 픽셀 군들 중에서, 대응하는 픽셀 사이의 SAD를 계산하고, SAD가 가장 작은 영역을 후보 이웃영역(740)으로 한다. 이때, 후보 이웃영역(740)에 접해있는 후보 서브 블록(750)이 대상 서브 블록(720)에 대한 텍스처 신호로 결정된다.If the mode type determination unit 1410 determines that the mode type of the current block is the template matching mode, the template matching unit 1420 divides the current block into units of N × N blocks and then divides each N × N block. Template matching is performed on the block. Preferably, the template matching unit 1420 divides the current block in units of 2 × 2 blocks and performs template matching on each of the divided 2 × 2 blocks. At this time, the method for template matching is the SAD between the corresponding pixel among the group of pixels having the same shape as the template 730 (inverted L-shape in the figure) in the search area 700, as shown in FIG. Is calculated, and the area with the smallest SAD is used as the candidate neighboring area 740. In this case, the candidate subblock 750 in contact with the candidate neighboring region 740 is determined as a texture signal for the target subblock 720.
역 정수변환 실행부(1430)는 템플릿 매칭 수행부(1420)에 의해 매칭된 예측블록과 대상블록 사이의 잔차 신호에 대하여 역 정수변환을 실행한다. 이때, 역 정수변환 실행부(1430)는 수학식 5를 이용하여 잔차 신호에 대한 역 정수변환을 실행할 수 있다. 즉, 수학식 5를 역변환함으로써 잔차 신호에 대한 역 정수변한의 실행이 가능하다.The inverse integer transform execution unit 1430 executes an inverse integer transform on the residual signal between the prediction block matched by the template matching unit 1420 and the target block. In this case, the inverse integer conversion execution unit 1430 may perform inverse integer conversion on the residual signal using Equation 5. In other words, the inverse transform of the residual signal can be performed by inversely transforming the equation (5).
한편, 모드 타입 판별부(1410)에 의해 현재 블록의 모드 타입이 방향적 인트라 예측모드인 것으로 판단되면, 역 MDDT 실행부(1440)는 입력되는 비트스트림에 대하여 방향성을 고려하여 역 MDDT를 실행한다. 즉, 입력되는 비트스트림의 현재 블록이 방향적 인트라 예측모드인 것으로 판단되면, 비트스트림의 서브 모드에 기록된 방향성 정보를 참조하여 방향성을 고려하며, 그에 대응하는 역 MDDT를 실행한다. 예를 들어, 변환함수의 세트가 표 1과 같다고 가정하면, 각각의 예측모드에 방향성에 따라 N + 1 개의 변환함수가 할당된 것으로 볼 수 있으며, 이와 같은 변환함수 및 비트스트림에 기록된 방향성 정보에 기초하여 역 MDDT를 실행할 수 있다. 여기서, 각각의 예측모드에 할당된 변환함수의 개수는 방향성에 따라 서로 다를 수 있다.On the other hand, if the mode type determination unit 1410 determines that the mode type of the current block is the directional intra prediction mode, the inverse MDDT execution unit 1440 executes the inverse MDDT in consideration of the directionality of the input bitstream. . That is, when it is determined that the current block of the input bitstream is the directional intra prediction mode, the directional information is considered with reference to the directional information recorded in the sub mode of the bitstream, and the corresponding inverse MDDT is executed. For example, assuming that the set of transform functions is shown in Table 1, it can be seen that N + 1 transform functions are assigned to each prediction mode according to the direction, and the transform function and the directional information recorded in the bitstream Inverse MDDT can be executed based on. Here, the number of transform functions allocated to each prediction mode may be different depending on the direction.
도 15는 도 14의 영상 복호화 장치에 의한 영상 복호화 방법을 나타낸 흐름도이다.FIG. 15 is a flowchart illustrating an image decoding method by the image decoding apparatus of FIG. 14.
도면을 참조하면, 모드 타입 판별부(1410)는 공간적 예측 부호화에 의해 부호화되어 입력되는 비트스트림으로부터 현재 블록의 모드 타입을 판별한다(S1501). 즉, 도 13에 도시한 바와 같은 비트스트림의 구조에 기초하여 현재 블록의 모드 타입이 템플릿 매칭 모드인지 또는 방향적 인트라 예측모드인지를 판별한다. 여기서, 모드 타입 판별부(1410)는 공간적 예측 부호화에 대한 모드 타입을 판별하는 것으로 설명하였으나, 이에 한정되는 것은 아니다. 다만, 시간적 예측 부호화는 본 발명의 논지를 벗어나므로 그 상세한 설명은 생략하였다.Referring to the figure, the mode type determination unit 1410 determines the mode type of the current block from the input bitstream encoded and input by spatial predictive coding (S1501). That is, based on the structure of the bitstream as shown in FIG. 13, it is determined whether the mode type of the current block is a template matching mode or a directional intra prediction mode. Here, the mode type determination unit 1410 has been described as determining the mode type for the spatial predictive coding, but the present invention is not limited thereto. However, since temporal prediction coding is beyond the subject matter of the present invention, detailed description thereof is omitted.
입력되는 비트스트림의 현재 블록의 모드 타입이 템플릿 매칭 모드인 것으로 판별되면(S1503), 템플릿 매칭 수행부(1420)는 현재 블록을 N x N 블록단위로 분할한 후 분할된 각각의 N x N의 대상블록에 대하여 템플릿 매칭을 수행한다(S1505). 이때, 템플릿 매칭 수행부(1420)는 도 7에 도시한 바와 같이, 4 x 4의 대상 블록을 2 x 2의 대상 서브 블록으로 분할하고(S1505), 각각의 대상 서브 블록 단위로 템플릿 매칭을 실행하는 것이 바람직하다(S1507). If it is determined that the mode type of the current block of the input bitstream is the template matching mode (S1503), the template matching unit 1420 divides the current block into units of N × N blocks, and then divides each of the divided N × N blocks. Template matching is performed on the target block (S1505). In this case, as shown in FIG. 7, the template matching performing unit 1420 divides the 4 × 4 target block into 2 × 2 target subblocks (S1505), and executes template matching on each target subblock unit. It is preferable to carry out (S1507).
템플릿 매칭은 탐색 영역(700) 내에서 템플릿(730)과 동일한 형상(도면의 경우 역 L자 형상)을 갖는 픽셀 군들 중에서, 대응하는 픽셀 사이의 SAD를 계산하고, SAD가 가장 작은 영역을 후보 이웃영역(740)으로 한다. 이때, 후보 이웃영역(740)에 접해있는 후보 서브 블록(750)이 대상 서브 블록(720)에 대한 텍스처 신호로 결정된다. 여기서 템플릿 매칭은 설명을 용이하게 하기 위하여 4 x 4 블록을 예로서 설명하였지만, 이에 한정되는 것은 아니며 다양한 블록에 대한 템플릿 매칭이 가능하다.Template matching calculates the SAD between the corresponding pixels among the group of pixels having the same shape as the template 730 (inverted L-shape in the drawing) in the search area 700, and selects the area with the smallest SAD as the candidate neighbor. An area 740 is assumed. In this case, the candidate subblock 750 in contact with the candidate neighboring region 740 is determined as a texture signal for the target subblock 720. Template matching has been described using 4 x 4 blocks as an example to facilitate explanation, but is not limited thereto, and template matching is possible for various blocks.
템플릿 매칭으로 얻어진 블록은 화면 내 예측의 결과가 되며, 역 정수 변환부(1430)는 생성된 예측 블록과 대상 블록 사이의 잔차 신호에 대하여 역 양자화 및 역 정수변환을 실행한다(S1509). 역 양자화 및 역 정수변환을 통해 얻어진 결과는 템플릿 매칭 결과에 더해져 복원 영상으로 만들어진다.The block obtained by template matching becomes a result of intra prediction, and the inverse integer transform unit 1430 performs inverse quantization and inverse integer transformation on the residual signal between the generated prediction block and the target block (S1509). The result obtained through inverse quantization and inverse integer transformation is added to the template matching result to form a reconstructed image.
입력되는 비트스트림의 현재 블록의 모드타입이 방향적 인트라 예측모드인 것으로 판별되면, 역 MDDT 실행부(1440)는 도 13에 도시한 바와 같이, 입력되는 비트스트림의 구조에 기초하여 방향적 인트라 예측모드의 방향성을 판단하며, 그 방향성을 고려하여 역 양자화 및 역 MDDT를 실행한다(S1511). 이때, 변환함수의 세트는 표 1과 같이 설정될 수 있으며, 각각의 예측모드의 방향성에 따라 할당된 변환함수에 기초하여 역 MDDT를 실행할 수 있다.If it is determined that the mode type of the current block of the input bitstream is the directional intra prediction mode, as shown in FIG. 13, the inverse MDDT execution unit 1440 determines the directional intra prediction based on the structure of the input bitstream. The direction of the mode is determined, and inverse quantization and inverse MDDT are performed in consideration of the direction (S1511). In this case, the set of transform functions may be set as shown in Table 1, and the inverse MDDT may be executed based on the assigned transform function according to the direction of each prediction mode.
이상에서, 본 발명의 실시예를 구성하는 모든 구성 요소들이 하나로 결합하거나 결합하여 동작하는 것으로 설명되었다고 해서, 본 발명이 반드시 이러한 실시예에 한정되는 것은 아니다. 즉, 본 발명의 목적 범위 안에서라면, 그 모든 구성 요소들이 하나 이상으로 선택적으로 결합하여 동작할 수도 있다. 또한, 그 모든 구성 요소들이 각각 하나의 독립적인 하드웨어로 구현될 수 있지만, 각 구성 요소들의 그 일부 또는 전부가 선택적으로 조합되어 하나 또는 복수 개의 하드웨어에서 조합된 일부 또는 전부의 기능을 수행하는 프로그램 모듈을 갖는 컴퓨터 프로그램으로서 구현될 수도 있다. 그 컴퓨터 프로그램을 구성하는 코드들 및 코드 세그먼트들은 본 발명의 기술 분야의 당업자에 의해 용이하게 추론될 수 있을 것이다. 이러한 컴퓨터 프로그램은 컴퓨터가 읽을 수 있는 저장매체(Computer Readable Media)에 저장되어 컴퓨터에 의하여 읽혀지고 실행됨으로써, 본 발명의 실시예를 구현할 수 있다. 컴퓨터 프로그램의 저장매체로서는 자기 기록매체, 광 기록매체, 캐리어 웨이브 매체 등이 포함될 수 있다.In the above description, it is described that all the components constituting the embodiments of the present invention are combined or operated in one, but the present invention is not necessarily limited to these embodiments. In other words, within the scope of the present invention, all of the components may be selectively operated in combination with one or more. In addition, although all of the components may be implemented in one independent hardware, each or all of the components may be selectively combined to perform some or all functions combined in one or a plurality of hardware. It may be implemented as a computer program having a. Codes and code segments constituting the computer program may be easily inferred by those skilled in the art. Such a computer program may be stored in a computer readable storage medium and read and executed by a computer, thereby implementing embodiments of the present invention. The storage medium of the computer program may include a magnetic recording medium, an optical recording medium, a carrier wave medium, and the like.
또한, 이상에서 기재된 "포함하다", "구성하다" 또는 "가지다" 등의 용어는, 특별히 반대되는 기재가 없는 한, 해당 구성 요소가 내재할 수 있음을 의미하는 것이므로, 다른 구성 요소를 제외하는 것이 아니라 다른 구성 요소를 더 포함할 수 있는 것으로 해석되어야 한다. 기술적이거나 과학적인 용어를 포함한 모든 용어들은, 다르게 정의되지 않는 한, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미가 있다. 사전에 정의된 용어와 같이 일반적으로 사용되는 용어들은 관련 기술의 문맥상의 의미와 일치하는 것으로 해석되어야 하며, 본 발명에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.In addition, the terms "comprise", "comprise" or "having" described above mean that the corresponding component may be inherent unless specifically stated otherwise, and thus excludes other components. It should be construed that it may further include other components instead. All terms, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. Terms commonly used, such as terms defined in a dictionary, should be interpreted to coincide with the contextual meaning of the related art, and shall not be interpreted in an ideal or excessively formal sense unless explicitly defined in the present invention.
이상의 설명은 본 발명의 기술 사상을 예시적으로 설명한 것에 불과한 것으로서, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.The above description is merely illustrative of the technical idea of the present invention, and those skilled in the art to which the present invention pertains may make various modifications and changes without departing from the essential characteristics of the present invention. Therefore, the embodiments disclosed in the present invention are not intended to limit the technical idea of the present invention but to describe the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The protection scope of the present invention should be interpreted by the following claims, and all technical ideas within the equivalent scope should be interpreted as being included in the scope of the present invention.
이상에서 설명한 바와 같이 본 발명의 실시예는 인트라 예측장치, 영상 부호화 및 복호화 분야에 적용되어, H. 264 표준과 비교하여 비트스트림 생성서의 오버헤드를 크게 증가시키지 않고서도 비트율을 감소시키면서 인트라 예측의 정확성을 높일 수 있는 효과를 발생시키는 매우 유용한 발명이다.As described above, the embodiment of the present invention is applied to an intra prediction apparatus, an image encoding and decoding field, and compared to the H.264 standard, the intra prediction is performed while reducing the bit rate without greatly increasing the overhead of the bitstream generator. It is a very useful invention to produce an effect that can increase the accuracy of.
CROSS-REFERENCE TO RELATED APPLICATIONCROSS-REFERENCE TO RELATED APPLICATION
본 특허출원은 2009년 12월 04일 한국에 출원한 특허출원번호 제 10-2009-0119570 호에 대해 미국 특허법 119(a)조(35 U.S.C § 119(a))에 따라 우선권을 주장하면, 그 모든 내용은 참고문헌으로 본 특허출원에 병합된다. 아울러, 본 특허출원은 미국 이외에 국가에 대해서도 위와 동일한 동일한 이유로 우선권을 주장하면 그 모든 내용은 참고문헌으로 본 특허출원에 병합된다.This patent application claims priority under patent application number 119 (a) (35 USC § 119 (a)) to patent application No. 10-2009-0119570, filed in Korea on December 04, 2009. All content is incorporated by reference in this patent application. In addition, if this patent application claims priority for the same reason as above for a country other than the United States, all the contents thereof are incorporated into this patent application by reference.

Claims (14)

  1. 영상 부호화 장치에 있어서,In the video encoding apparatus,
    방향적 인트라 예측모드와 함께 템플릿 매칭(Template Matching) 모드를 사용하여 대상 블록에 대한 예측을 실행하며, 그 중 레이트-왜곡(rate-distortion)에 기반하는 비용이 가장 낮은 모드를 선택하는 공간적 예측 실행부; 및Performs prediction on the target block using Template Matching mode together with directional intra prediction mode, and performs spatial prediction to select the lowest cost mode based on rate-distortion. part; And
    상기 공간적 예측 실행부에 의해 상기 템플릿 매칭 모드가 선택된 경우, 상기 템플릿 매칭 모드에 의해 예측되는 영상의 잔차 신호(residual signal)에 대하여 정수변환을 실행하는 정수변환 실행부When the template matching mode is selected by the spatial prediction execution unit, an integer conversion execution unit that performs integer conversion on a residual signal of an image predicted by the template matching mode.
    를 포함하는 것을 특징으로 하는 영상 부호화 장치.An image encoding apparatus comprising a.
  2. 제 1항에 있어서,The method of claim 1,
    상기 정수변환 실행부는 다음의 수학식을 이용하여 정수변환 하되,The integer conversion execution unit converts an integer using the following equation,
    Figure PCTKR2010008389-appb-I000013
    Figure PCTKR2010008389-appb-I000013
    Figure PCTKR2010008389-appb-I000014
    는 H. 264에서 사용되는 정 방향 정수변환의 수식이며, a, b, d의 값은 각각
    Figure PCTKR2010008389-appb-I000015
    의 값인 것을 특징으로 하는 영상 부호화 장치.
    Figure PCTKR2010008389-appb-I000014
    Is the formula of the forward integer conversion used in H. 264, and the values of a, b, and d are respectively
    Figure PCTKR2010008389-appb-I000015
    Video encoding apparatus.
  3. 제 1항에 있어서,The method of claim 1,
    상기 공간적 예측 실행부는 다음과 같은 식에 의해 비용이 낮은 모드를 선택하는 것을 특징으로 하는 영상 부호화 장치:The spatial prediction executing unit selects a low cost mode by the following equation:
    C = E + λBC = E + λB
    여기서, C는 비용, E는 부호화된 비트를 디코딩할 경우 복원된 신호와 원 신호와의 차이, B는 각각의 코딩에 있어서 소요되는 비트량, 그리고 λ는 라그랑지안 계수로서 E와 B의 반영 비율을 조절할 수 있는 계수를 나타냄.Where C is the cost, E is the difference between the reconstructed signal and the original signal when decoding the coded bits, B is the amount of bits required for each coding, and λ is the Lagrangian coefficient, which reflects the reflection ratio of E and B. Indicates an adjustable factor.
  4. 제 1항에 있어서,The method of claim 1,
    상기 공간적 예측 실행부에 의해 상기 방향적 인트라 예측모드의 9개 모드 중 어느 하나가 선택된 경우, 방향성을 고려한 MDDT(Mode Dependent Directional Transform)를 실행하는 MDDT 실행부MDDT execution unit that executes a Mode Dependent Directional Transform (MDDT) in consideration of the directionality when any one of nine modes of the directional intra prediction mode is selected by the spatial prediction execution unit.
    를 더 포함하는 것을 특징으로 하는 영상 부호화 장치.The image encoding apparatus further comprises.
  5. 제 4항에 있어서,The method of claim 4, wherein
    상기 MDDT 실행부는, 상기 방향적 인트라 예측모드에 대응하여 기 설정된 변환함수 중 상기 선택된 모드에 대응하는 변환함수에 따라, 예측되는 영상의 잔차 신호를 변환하는 것을 특징으로 하는 영상 부호화 장치.And the MDDT executing unit converts the residual signal of the predicted image according to a transform function corresponding to the selected mode among preset transform functions corresponding to the directional intra prediction mode.
  6. 공간적 예측장치에 있어서,In the spatial prediction device,
    방향적 인트라 예측모드를 이용하여 대상 블록에 대한 예측을 실행하는 인트라 예측 실행부;An intra prediction execution unit that performs prediction on the target block using the directional intra prediction mode;
    템플릿 매칭 모드를 이용하여 상기 대상 블록에 대한 예측을 실행하는 템플릿 예측 실행부; A template prediction execution unit that executes prediction on the target block using a template matching mode;
    상기 인트라 예측 실행부에 의해 실행되는 예측 모드 및 상기 템플릿 예측 실행부에 의해 실행되는 템플릿 매칭 모드 중 레이트-왜곡에 기반하는 비용이 가장 낮은 모드를 선택하는 모드 선택부; 및A mode selection unit for selecting a mode having a lowest cost based on rate-distortion among a prediction mode executed by the intra prediction execution unit and a template matching mode executed by the template prediction execution unit; And
    상기 선택된 모드에 의한 예측 블록과 상기 대상 블록 사이의 잔차 신호를 계산하는 잔차신호 계산부Residual signal calculator for calculating a residual signal between the prediction block and the target block in the selected mode
    를 포함하는 것을 특징으로 하는 공간적 예측장치.Spatial prediction device comprising a.
  7. 영상 복호화 장치에 있어서,In the video decoding apparatus,
    공간적 예측 부호화에 의해 부호화되어 입력되는 비트스트림에 대하여 현재 블록에 대한 모드 타입을 판별하는 모드 타입 판별부;A mode type determination unit for determining a mode type of a current block with respect to a bitstream encoded and input by spatial prediction encoding;
    상기 모드 타입 판별부에 의해 상기 현재 블록의 모드 타입이 템플릿 매칭 모드인 것으로 판별되면, 상기 현재 블록을 N x N 블록단위로 분할한 후 분할된 각각의 상기 N x N 블록에 대하여 템플릿 매칭을 수행하는 템플릿 매칭 수행부; 및If it is determined by the mode type determination unit that the mode type of the current block is a template matching mode, the current block is divided into N x N block units and then template matching is performed on each of the divided N x N blocks. A template matching performing unit; And
    상기 템플릿 매칭에 의한 예측 블록과 대상 블록 사이의 잔차 신호에 대하여 역정수변환을 실행하는 역정수변환 실행부Inverse integer transform execution unit for performing inverse integer transform on the residual signal between the prediction block and the target block by the template matching
    를 포함하는 것을 특징으로 하는 영상 복호화 장치.Video decoding apparatus comprising a.
  8. 제 7항에 있어서,The method of claim 7, wherein
    상기 모드 타입 판별부에 의해 상기 현재 블록의 모드 타입이 방향적 인트라 예측모드인 것으로 판별되면, 방향성을 고려하여 역 MDDT를 실행하는 역 MDDT 실행부If the mode type determination unit determines that the mode type of the current block is a directional intra prediction mode, an inverse MDDT execution unit that executes an inverse MDDT in consideration of the directionality
    를 더 포함하는 것을 특징으로 하는 영상 복호화 장치.The video decoding apparatus further comprises.
  9. 제 7항에 있어서,The method of claim 7, wherein
    상기 템플릿 매칭 수행부는, 상기 현재 블록을 2 x 2 블록단위로 분할한 후 각각의 상기 2 x 2 블록에 대하여 템플릿 매칭을 수행하는 것을 특징으로 하는 영상 복호화 장치.The template matching execution unit divides the current block into units of 2 × 2 blocks and performs template matching on each of the 2 × 2 blocks.
  10. 영상 부호화 방법에 있어서,In the video encoding method,
    방향적 인트라 예측모드와 함께 템플릿 매칭 모드를 사용하여 대상 블록에 대한 예측을 실행하는 단계; Performing prediction for the target block using the template matching mode together with the directional intra prediction mode;
    상기 예측 실행단계에 의해 실행된 모드 중 비용이 가장 낮은 모드를 선택하는 단계;Selecting a mode having the lowest cost among the modes executed by the prediction execution step;
    상기 선택단계에 의해 선택된 모드에 의해 생성된 예측 블록과 상기 대상 블록 사이의 잔차 신호를 계산하는 단계; 및Calculating a residual signal between the prediction block generated by the mode selected by the selecting step and the target block; And
    상기 선택단계에 의해 선택된 모드가 상기 템플릿 매칭 모드인 경우 상기 계산단계에 의해 계산된 상기 잔차 신호에 대하여 정수변환을 실행하고, 상기 선택단계에 의해 선택된 모드가 상기 방향적 예측모드인 경우 상기 계산단계에 의해 계산된 상기 잔차 신호에 대하여 MDDT를 실행하는 단계If the mode selected by the selection step is the template matching mode, integer conversion is performed on the residual signal calculated by the calculation step; and when the mode selected by the selection step is the directional prediction mode, the calculation step Executing an MDDT on the residual signal calculated by
    를 포함하는 것을 특징으로 하는 영상 부호화 방법.Image encoding method comprising a.
  11. 제 10항에 있어서,The method of claim 10,
    상기 선택단계에 의해 선택된 모드가 상기 방향적 예측모드인 경우, 기 설정된 변환함수 중 해당 예측모드에 대응하는 변환함수를 선택하는 단계If the mode selected by the selecting step is the directional prediction mode, selecting a transform function corresponding to the corresponding prediction mode among preset conversion functions;
    를 더 포함하며, More,
    상기 MDDT 실행단계는 상기 선택된 변환함수에 따라 MDDT를 실행하는 것을 특징으로 하는 영상 부호화 방법.And executing the MDDT according to the selected transform function.
  12. 공간적 예측방법에 있어서,In the spatial prediction method,
    방향적 인트라 예측모드와 함께 템플릿 매칭 모드를 사용하여 대상 블록에 대한 예측을 실행하는 단계; Performing prediction for the target block using the template matching mode together with the directional intra prediction mode;
    상기 예측 실행단계에 의해 실행된 모드 중 비용이 가장 낮은 모드를 선택하는 단계; 및Selecting a mode having the lowest cost among the modes executed by the prediction execution step; And
    상기 선택단계에 의해 선택된 모드에 의해 생성된 예측 블록과 상기 대상 블록 사이의 잔차 신호를 계산하는 단계Calculating a residual signal between the prediction block generated by the mode selected by the selecting step and the target block;
    를 포함하는 것을 특징으로 하는 공간적 예측방법.Spatial prediction method comprising a.
  13. 영상 복호화 방법에 있어서,In the video decoding method,
    공간적 예측 부호화에 의해 부호화되어 입력되는 비트스트림으로부터 현재 블록의 모드 타입을 판별하는 단계;Determining a mode type of a current block from a bitstream encoded and input by spatial prediction encoding;
    상기 현재 블록의 모드 타입이 템플릿 매칭 모드인 것으로 판별되면, 상기 현재 블록을 N x N 블록단위로 분할한 후 분할된 각각의 상기 N x N 블록에 대하여 템플릿 매칭을 수행하는 단계; 및If it is determined that the mode type of the current block is a template matching mode, dividing the current block into units of N × N blocks and performing template matching on each of the divided N × N blocks; And
    상기 템플릿 매칭에 의한 예측 블록과 대상 블록 사이의 잔차 신호에 대하여 역정수변환을 실행하는 단계Performing inverse integer transform on the residual signal between the prediction block and the target block by the template matching;
    를 포함하는 것을 특징으로 하는 영상 복호화 방법.Image decoding method comprising a.
  14. 제 13항에 있어서,The method of claim 13,
    상기 현재 블록의 모드 타입이 방향적 인트라 예측모드인 것으로 판별되면, 방향성을 고려하여 역 MDDT를 실행하는 단계If it is determined that the mode type of the current block is a directional intra prediction mode, executing inverse MDDT in consideration of directionality;
    를 더 포함하는 것을 특징으로 하는 영상 복호화 방법.The video decoding method further comprising.
PCT/KR2010/008389 2009-12-04 2010-11-25 Spatial prediction apparatus and predicting method thereof, image encoding device and method using same, and image decoding device and method using same WO2011068332A2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020090119570A KR101601854B1 (en) 2009-12-04 2009-12-04 Spatial prediction apparatus and method video encoding apparatus and method and video decoding apparatus and method
KR10-2009-0119570 2009-12-04

Publications (2)

Publication Number Publication Date
WO2011068332A2 true WO2011068332A2 (en) 2011-06-09
WO2011068332A3 WO2011068332A3 (en) 2011-09-15

Family

ID=44115403

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2010/008389 WO2011068332A2 (en) 2009-12-04 2010-11-25 Spatial prediction apparatus and predicting method thereof, image encoding device and method using same, and image decoding device and method using same

Country Status (2)

Country Link
KR (1) KR101601854B1 (en)
WO (1) WO2011068332A2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017201141A1 (en) * 2016-05-17 2017-11-23 Arris Enterprises Llc Template matching for jvet intra prediction

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130003856A1 (en) * 2011-07-01 2013-01-03 Samsung Electronics Co. Ltd. Mode-dependent transforms for residual coding with low latency
KR101596085B1 (en) * 2012-12-18 2016-02-19 한양대학교 산학협력단 Apparatus and method for video coding/decoding using adaptive intra prediction
KR101911587B1 (en) * 2015-08-03 2018-10-24 한양대학교 산학협력단 Apparatus and method for video coding/decoding using adaptive intra prediction
KR20180064411A (en) * 2015-09-15 2018-06-14 디지털인사이트 주식회사 HDR quantization or masking method and apparatus
US11234003B2 (en) 2016-07-26 2022-01-25 Lg Electronics Inc. Method and apparatus for intra-prediction in image coding system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050067083A (en) * 2003-12-26 2005-06-30 가부시키가이샤 엔티티 도코모 Picture encoding apparatus, picture encoding method, picture encoding program, picture decoding apparatus, picture decoding method, and picture decoding program
KR20080019294A (en) * 2005-07-05 2008-03-03 가부시키가이샤 엔티티 도코모 Dynamic image encoding device, dynamic image encoding method, dynamic image encoding program, dynamic image decoding device, dynamic image decoding method, and dynamic image decoding program
KR20090008418A (en) * 2006-04-28 2009-01-21 가부시키가이샤 엔티티 도코모 Image predictive coding device, image predictive coding method, image predictive coding program, image predictive decoding device, image predictive decoding method and image predictive decoding program

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090003443A1 (en) * 2007-06-26 2009-01-01 Nokia Corporation Priority-based template matching intra prediction video and image coding

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050067083A (en) * 2003-12-26 2005-06-30 가부시키가이샤 엔티티 도코모 Picture encoding apparatus, picture encoding method, picture encoding program, picture decoding apparatus, picture decoding method, and picture decoding program
KR20080019294A (en) * 2005-07-05 2008-03-03 가부시키가이샤 엔티티 도코모 Dynamic image encoding device, dynamic image encoding method, dynamic image encoding program, dynamic image decoding device, dynamic image decoding method, and dynamic image decoding program
KR20090008418A (en) * 2006-04-28 2009-01-21 가부시키가이샤 엔티티 도코모 Image predictive coding device, image predictive coding method, image predictive coding program, image predictive decoding device, image predictive decoding method and image predictive decoding program

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017201141A1 (en) * 2016-05-17 2017-11-23 Arris Enterprises Llc Template matching for jvet intra prediction
US9948930B2 (en) 2016-05-17 2018-04-17 Arris Enterprises Llc Template matching for JVET intra prediction
US10375389B2 (en) 2016-05-17 2019-08-06 Arris Enterprises Llc Template matching for JVET intra prediction
US10554971B2 (en) 2016-05-17 2020-02-04 Arris Enterprises Llc Template matching for JVET intra prediction
US11310494B2 (en) 2016-05-17 2022-04-19 Arris Enterprises Llc Template matching for JVET intra prediction
US11659168B2 (en) 2016-05-17 2023-05-23 Arris Enterprises Llc Template matching for JVET intra prediction
US11936856B2 (en) 2016-05-17 2024-03-19 Arris Enterprises Llc Template matching for JVET intra prediction

Also Published As

Publication number Publication date
WO2011068332A3 (en) 2011-09-15
KR20110062748A (en) 2011-06-10
KR101601854B1 (en) 2016-03-10

Similar Documents

Publication Publication Date Title
WO2011068331A2 (en) Video encoding device and encoding method thereof, video decoding device and decoding method thereof, and directional intra-prediction method to be used thereto
CA2478691C (en) Method for coding motion in a video sequence
JP5026092B2 (en) Moving picture decoding apparatus and moving picture decoding method
AU728469B2 (en) Intra-macroblock DC and AC coefficient prediction for interlaced digital video
WO2011004986A2 (en) Image encoding/decoding method and apparatus
WO2011133002A2 (en) Image encoding device and method
WO2012018198A2 (en) Prediction block generating device
WO2013062196A1 (en) Image decoding apparatus
WO2009113791A2 (en) Image encoding device and image decoding device
WO2010087620A2 (en) Method and apparatus for encoding and decoding images by adaptively using an interpolation filter
WO2009157665A2 (en) Intra prediction method and apparatus using block transform, and image encoding/decoding method and apparatus using the same
WO2011087271A2 (en) Processing method and device for video signals
WO2011019246A2 (en) Method and apparatus for encoding/decoding image by controlling accuracy of motion vector
WO2013062195A1 (en) Method and apparatus for decoding intra prediction mode
WO2012018197A2 (en) Intra-prediction decoding device
WO2013069932A1 (en) Method and apparatus for encoding image, and method and apparatus for decoding image
WO2012134085A2 (en) Method for decoding image in intra prediction mode
WO2013062197A1 (en) Image decoding apparatus
WO2011126285A2 (en) Method and apparatus for encoding and decoding information on encoding modes
WO2012005558A2 (en) Image interpolation method and apparatus
WO2013062198A1 (en) Image decoding apparatus
WO2010044569A2 (en) Method and apparatus for generating a reference frame, and method and apparatus for image encoding/decoding using same
WO2011068332A2 (en) Spatial prediction apparatus and predicting method thereof, image encoding device and method using same, and image decoding device and method using same
WO2013062194A1 (en) Method and apparatus for generating reconstructed block
JP5475409B2 (en) Moving picture coding apparatus and moving picture coding method

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: 10834747

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS (EPO FORM 1205A DATED 14-09-2012)

122 Ep: pct application non-entry in european phase

Ref document number: 10834747

Country of ref document: EP

Kind code of ref document: A2