WO2012172667A1 - Video encoding method, video decoding method, and device - Google Patents

Video encoding method, video decoding method, and device Download PDF

Info

Publication number
WO2012172667A1
WO2012172667A1 PCT/JP2011/063737 JP2011063737W WO2012172667A1 WO 2012172667 A1 WO2012172667 A1 WO 2012172667A1 JP 2011063737 W JP2011063737 W JP 2011063737W WO 2012172667 A1 WO2012172667 A1 WO 2012172667A1
Authority
WO
WIPO (PCT)
Prior art keywords
prediction
transform
unit
intra
reference pixel
Prior art date
Application number
PCT/JP2011/063737
Other languages
French (fr)
Japanese (ja)
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 株式会社 東芝
Priority to PCT/JP2011/063737 priority Critical patent/WO2012172667A1/en
Publication of WO2012172667A1 publication Critical patent/WO2012172667A1/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/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/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • 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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • Embodiments described herein relate generally to an intra-screen prediction method, a moving image encoding method, a moving image decoding method, and an apparatus for encoding and decoding moving images.
  • H. H.264 adopts direction prediction in the spatial domain (pixel domain) and performs orthogonal transform based on discrete cosine transform (DCT) on the prediction error signal generated by the difference between the input image signal and the predicted image signal, thereby obtaining ISO / IEC.
  • DCT discrete cosine transform
  • Non-Patent Document 1 a separation type defined by a combination of two types of one-dimensional transformations with respect to a prediction error generated by weighted averaging of predicted images using two types of direction prediction.
  • JCT-VC Joint Collaborative Team on Video Coding
  • Non-Patent Document 1 possesses a prediction mode corresponding to one direction prediction and a look-up table (LUT) for one-dimensional conversion, and uses the property that the prediction error tends to be different for each prediction direction.
  • the prediction direction is mapped to four types of separate two-dimensional transformations including discrete cosine transformation (DCT) and predetermined orthogonal transformation (for example, discrete sine transformation (DST) and Karhunen-Loeve transformation (KLT)).
  • DCT discrete cosine transformation
  • DST discrete sine transformation
  • KLT Karhunen-Loeve transformation
  • a separation type two-dimensional transform corresponding to a prediction mode with a small prediction mode number is selected from the two prediction modes, but the two prediction modes of bi-directional prediction are different reference pixel lines. Is used, the prediction residual of bi-directional prediction is different from the tendency of any prediction error of these two unidirectional predictions, so that the coding efficiency may be reduced.
  • an object of the present embodiment is to provide a moving picture coding method, a moving picture decoding method, and an apparatus that can improve coding efficiency.
  • the moving image encoding method of the embodiment selects a combination of one-dimensional transformation only for the first orthogonal transformation when two or more prediction modes are intra-frame prediction processing using one or more reference pixel lines, A combination of the first orthogonal transform and the second orthogonal transform is selected when each of the two or more prediction modes is an intra-screen prediction process using one reference pixel line and the same reference pixel line.
  • a predicted image signal is generated using the two or more prediction modes.
  • a prediction coefficient signal derived from the prediction image signal is subjected to a two-dimensional conversion process using the selected combination of one-dimensional conversions to generate a conversion coefficient.
  • the prediction information indicating a combination of the two or more prediction modes and the transform coefficient are encoded.
  • FIG. 3 is a block diagram illustrating an intra bi-predictive image generation unit 109 according to the first embodiment.
  • FIG. 3 is a block diagram illustrating an intra bi-predictive image generation unit 109 according to the first embodiment.
  • FIG. 3 is a block diagram illustrating an orthogonal transform unit 102 according to the first embodiment.
  • Explanatory drawing which illustrates the relationship of unidirectional intra prediction and error distribution, and vertical conversion and horizontal conversion based on 1st Embodiment.
  • Explanatory drawing which illustrates the relationship of unidirectional intra prediction and error distribution, and vertical conversion and horizontal conversion based on 1st Embodiment.
  • Explanatory drawing which illustrates the relationship of unidirectional intra prediction and error distribution, and vertical conversion and horizontal conversion based on 1st Embodiment.
  • Explanatory drawing which illustrates the relationship between bidirectional
  • FIG. 3 is a block diagram illustrating an inverse orthogonal transform unit 105 according to the first embodiment.
  • the table figure which illustrates the relationship between the conversion index which concerns on 1st Embodiment, a vertical conversion index, and a horizontal conversion index.
  • the table figure which illustrates the conversion matrix name of the vertical conversion index which concerns on 1st Embodiment, and a horizontal conversion index.
  • Explanatory drawing which illustrates a reference pixel line and prediction direction derivation based on a 2nd embodiment.
  • the table figure which illustrates the relationship between prediction mode, bidirectional
  • Explanatory drawing of the slice header syntax based on 2nd Embodiment Explanatory drawing which shows an example of the prediction unit syntax based on 2nd Embodiment.
  • Explanatory drawing which shows an example of the prediction unit syntax based on 2nd Embodiment.
  • FIG. 26B is a table diagram following FIG.
  • FIG. 26B is a table diagram following FIG.
  • the first embodiment relates to an image encoding device.
  • a moving picture decoding apparatus corresponding to the picture encoding apparatus according to the present embodiment will be described in a third embodiment.
  • This image encoding device can be realized by hardware such as an LSI (Large-Scale Integration) chip, a DSP (Digital Signal Processor), or an FPGA (Field Programmable Gate Array).
  • the image encoding apparatus can also be realized by causing a computer to execute an image encoding program.
  • the image encoding device 100 includes a subtraction unit 101, an orthogonal transformation unit 102, a quantization unit 103, an inverse quantization unit 104, an inverse orthogonal transformation unit 105, an addition unit 106, and a reference.
  • Image memory 107 intra unidirectional prediction image generation unit 108, intra bidirectional prediction image generation unit 109, inter prediction image generation unit 110, prediction selection switch 111, conversion information setting unit 112, prediction selection unit 113, entropy encoding unit 114 And an output buffer 115.
  • the image coding apparatus in FIG. 1 divides each frame or each field constituting the input image 117 into a plurality of pixel blocks, performs predictive coding on the divided pixel blocks, and outputs coded data 128. To do.
  • pixel blocks are predictively encoded from the upper left to the lower right as shown in FIG. 2A.
  • the encoded pixel block p is located on the left side and the upper side of the encoding target pixel block c in the encoding processing target frame f.
  • the pixel block refers to a unit for processing an image such as an M ⁇ N size block (N and M are natural numbers), a coding tree block, a macro block, a sub block, and one pixel.
  • N and M are natural numbers
  • the pixel block is basically used in the sense of a coding tree block.
  • the pixel block can be interpreted in the above-described meaning by appropriately replacing the description.
  • the pixel block in the description of the prediction unit is interpreted as the pixel block of the prediction unit.
  • the coding tree block is typically a 16 ⁇ 16 pixel block shown in FIG. 2B, for example, but may be a 32 ⁇ 32 pixel block shown in FIG. 2C or a 64 ⁇ 64 pixel block shown in FIG.
  • the coding unit is not limited to a pixel block such as a coding tree block, and a frame, a field, a slice, or a combination thereof can be used.
  • FIG. 3A to 3D are diagrams showing specific examples of coding tree blocks.
  • N represents the size of the reference coding tree block.
  • the size when divided is defined as N, and the size when not divided is defined as 2N.
  • the coding tree block has a quadtree structure, and when divided, the four pixel blocks are indexed in the Z-scan order as shown in FIG. 3B.
  • An example in which the 64 ⁇ 64 pixel block of FIG. 3A is divided into quadtrees is shown in FIG. 3B. Further, it is possible to further divide the quadtree within the index of one quadtree of the coding tree block.
  • the unit having the largest coding tree block is called a large coding tree block, and the input image signal is encoded in this unit in raster scan order.
  • FIG. 3D shows an example in which the 32 ⁇ 32 pixel block of FIG. 3C is divided into quadtrees.
  • the image encoding apparatus in FIG. 1 performs intra prediction (also referred to as intra-frame prediction, intra-frame prediction, etc.) or inter prediction (inter-screen prediction) on a pixel block based on the encoding parameter input from the encoding control unit 116. Prediction, inter-frame prediction, motion compensation prediction, etc.) is performed to generate a predicted image 125.
  • This image coding apparatus orthogonally transforms and quantizes a prediction error (also called a prediction difference signal) 118 generated by subtracting an input image 117 divided into pixel blocks and a predicted image 125, performs entropy coding, and performs coding. Generated data 128 is output.
  • the image encoding device in FIG. 1 performs encoding by selectively applying a plurality of prediction modes having different block sizes and generation methods of the predicted image 125.
  • the generation method of the prediction image 125 is roughly classified into two types, that is, intra prediction in which prediction is performed in the encoding target frame and inter prediction in which prediction is performed using one or a plurality of reference frames that are temporally different. .
  • the subtractor 101 subtracts the corresponding prediction image 125 from the input image 117 divided into pixel blocks to obtain a prediction error 118.
  • the prediction error 118 output from the subtractor 101 is input to the orthogonal transform unit 102.
  • the orthogonal transform unit 102 performs, for example, discrete cosine transform (DCT) or discrete sine transform (DCT) on the prediction error 118 output from the subtractor 101 based on the transform information 127 output from the transform information setting unit 112 described later. DST) is performed to obtain a transform coefficient 119.
  • the transform coefficient 119 output from the orthogonal transform unit 102 is input to the quantization unit 103.
  • the quantization unit 103 performs a quantization process on the transform coefficient 119 output from the orthogonal transform unit 102 to obtain a quantized transform coefficient 120. Specifically, the quantization unit 103 performs quantization according to quantization information such as a quantization parameter and a quantization matrix specified by the encoding control unit 116 (quantization step size derived from the quantization coefficient by the transform information). Divide by). The quantization parameter indicates the fineness of quantization. The quantization matrix is used for weighting the fineness of quantization for each component of the transform coefficient. The quantization unit 103 inputs the quantized transform coefficient 120 to the entropy encoding unit 114 and the inverse quantization unit 104.
  • quantization information such as a quantization parameter and a quantization matrix specified by the encoding control unit 116 (quantization step size derived from the quantization coefficient by the transform information). Divide by).
  • the quantization parameter indicates the fineness of quantization.
  • the quantization matrix is used for weighting the fineness of quantization for each component of
  • the entropy encoding unit 114 performs various encoding parameters such as the quantized transform coefficient 120 from the quantization unit 103, the prediction information 126 from the prediction selection unit 113, and the quantization information specified by the encoding control unit 116.
  • Entropy encoding (for example, Huffman encoding, arithmetic encoding, etc.) is performed to generate encoded data.
  • the encoding parameter is a parameter necessary for decoding such as prediction information 126, information on the transform coefficient 120, information on quantization, and the like.
  • the encoding control unit 116 has an internal memory (not shown), the encoding parameter is held in this memory, and the encoding parameter of the adjacent already encoded pixel block is used when encoding the pixel block. It is good also as a structure. For example, H.M. In the H.264 intra prediction, the prediction value of the prediction mode of the pixel block can be derived from the prediction mode information of the encoded adjacent block.
  • the encoded data generated by the entropy encoding unit 114 is temporarily accumulated in the output buffer 115 through multiplexing, for example, and output as encoded data 128 according to an appropriate output timing managed by the encoding control unit 116. .
  • the encoded data 128 is output to, for example, a storage system (storage medium) or a transmission system (communication line) not shown.
  • the inverse quantization unit 104 performs an inverse quantization process on the quantized transform coefficient 120 output from the quantization unit 103 to obtain a restored transform coefficient 121. Specifically, the inverse quantization unit 104 performs inverse quantization according to the quantization information used in the quantization unit 103 (multiplies the quantization transform coefficient 120 by the quantization step size derived from the quantization information). . At this time, the quantization information used in the quantization unit 103 is loaded from an internal memory (not shown) of the encoding control unit 116 and used. The inverse quantization unit 104 inputs the restored transform coefficient 120 to the inverse orthogonal transform unit 105.
  • the inverse orthogonal transform unit 105 performs, for example, inverse discrete cosine transform (IDCT) or inverse discrete on the restored transform coefficient 121 from the inverse quantization unit 104 based on transform information 127 output from the transform information setting unit 112 described later.
  • An inverse orthogonal transformation corresponding to the orthogonal transformation performed in the orthogonal transformation unit 102 such as sine transformation (IDST) is performed to obtain a restored prediction error 122.
  • the reconstruction prediction error 122 output from the inverse orthogonal transform unit 105 is input to the addition unit 106.
  • the addition unit 106 adds the restored prediction error 122 and the corresponding prediction image 125 to generate a local decoded image 123.
  • the locally decoded image 123 is input to the reference image memory 107.
  • the reference image memory 107 stores the local decoded image 123 in the memory, and a prediction image is generated as necessary by the intra unidirectional prediction image generation unit 108, the intra bidirectional prediction image generation unit 109, and the inter prediction image generation unit 110. Is referred to as the reference image 124 each time.
  • the intra unidirectional predicted image generation unit 108 performs unidirectional intra prediction using the reference image 124 stored in the reference image memory 107.
  • pixel supplementation copying or copying
  • An intra prediction image is generated by performing an interpolation process (referring to a filter process or the like).
  • FIG. 4A shows a prediction direction of intra prediction in H.264 / MPEG-4 AVC.
  • FIG. 4B shows an arrangement relationship between reference pixel lines and encoding target pixels in H.264 / MPEG-4 AVC.
  • FIG. 4C shows a predicted image generation method in mode 1 (horizontal prediction), in which pixels I to L are copied in the prediction direction from the left reference pixel line.
  • FIG. 4D shows a predicted image generation method in mode 4 (diagonal lower right prediction).
  • the predicted value of the pixel position below the reference pixel B is derived by performing (1, 2, 1) 3-tap linear filter processing on the three reference pixels A, B, and C. The derived pixel values are also copied in the prediction direction shown in the figure.
  • FIG. 5 shows an example of the prediction angle and the prediction mode when the prediction mode is expanded up to 34 prediction modes.
  • FIG. 5 there are 33 different prediction directions for the vertical and horizontal coordinates indicated by the bold lines.
  • the direction of a typical prediction angle indicated by H.264 / MPEG-4 AVC is indicated by an arrow.
  • 33 types of prediction directions are prepared in a direction in which a line is drawn from the origin to a mark indicated by a circle.
  • DC prediction for prediction based on the average value of available reference pixels is added, and there are a total of 34 prediction modes.
  • IntraPredMode 4
  • IntraPredAngleIdL0 in FIG. 7A described later is ⁇ 4
  • An arrow indicated by a dotted line in FIG. 5 indicates a prediction mode whose prediction type is Intra_Vertical
  • an arrow indicated by a solid line indicates a prediction mode whose prediction type is Intra_Horizontal.
  • FIG. 6 shows the relationship between IntraPredAngleIdLX and intraPredAngle used for predictive image value generation.
  • 7A and 7B show the relationship between the prediction mode (PredMode), a bidirectional prediction flag (BipredFlag) described later, a prediction mode type (PredTypeL0, PredTypeL1), and a prediction angle (PredAngleIdL0, PredAngleIdL1).
  • intraPredAngle indicates the prediction angle that is actually used when the predicted value is generated.
  • a prediction value generation method in the case where the prediction type is Intra_Vertical and the intraPredAngle shown in FIGS. 7A and 7B is a positive value is expressed by the following equation (1).
  • BLK_SIZE indicates the size of the pixel block
  • ref [] indicates an array in which a reference image (also referred to as a reference pixel line) is stored.
  • pred (k, m) indicates the generated predicted image 125.
  • a predicted value can be generated by a similar method according to the tables of FIGS. 7A and 7B.
  • the intra bidirectional prediction image generation unit 109 performs bidirectional intra prediction using the reference image 124 stored in the reference image memory 107. For example, in Non-Patent Document 1 described above, after selecting two types of prediction modes from nine types of prediction modes defined in H.264 / MPEG-4 AVC and generating respective prediction image signals, The predicted image signal is generated by performing the filtering process every time.
  • Bidirectional prediction when the number of unidirectional prediction modes is expanded to 34 types will be described more specifically with reference to FIG.
  • the maximum number of modes is not limited, and bi-directional prediction can be easily expanded in any number of uni-directional predictions.
  • the 8 includes a weighted average unit 801, a first unidirectional intra predicted image generation unit 802, and a second unidirectional intra predicted image generation unit 803.
  • the functions of the first unidirectional intra predicted image generation unit 802 and the second unidirectional intra predicted image generation unit 803 are the same. These may be the same as the intra unidirectional predicted image generation unit 108. In this case, since the three processing units can have the same hardware configuration, the circuit scale can be reduced. Each of these generates a prediction image corresponding to the prediction mode given according to the prediction mode information controlled by the encoding control unit 116.
  • a first predicted image 851 is output from the first unidirectional intra predicted image generation unit 802, and a second predicted image 852 is output from the second unidirectional intra predicted image generation unit 803.
  • Each predicted image is input to the weighted average unit 801, and a weighted average process is performed.
  • a weighted average process is performed.
  • calculation based on the following formula (2) is performed.
  • the bidirectionally predicted image P [x, y] is expressed by the following equation.
  • W [x, y] represents a weighted table, and is set by a combination of two prediction modes used in bidirectional intra prediction.
  • Norm is a fixed number for normalization introduced in order to make Equation (2) an integer arithmetic process
  • Offset indicates an offset in rounding
  • Shift indicates a shift amount for division.
  • the Norm value is 1024
  • the Offset value is 512
  • the Shift value is 10.
  • Bidirectional intra prediction indicates that the BipedFlag shown in FIGS. 7A and 7B is 1.
  • two prediction mode types are defined, the prediction mode type corresponding to the first unidirectional intra prediction image generation unit 802 is PredTypeL0, and the prediction mode corresponding to the second unidirectional intra prediction image generation unit 803 is PredTypeL1. It is shown in The same applies to PredAngleIdLX, and the type and angle of each prediction mode are expressed by whether the X portion is 0 or 1.
  • FIG. 7A and FIG. 7B the combination of two prediction modes corresponding to bidirectional intra prediction is illustrated as a fixed combination. However, a special mode that uses a prediction mode held by an encoded adjacent pixel block is illustrated. A prediction mode may be added. In this case, since a combination of two prediction modes having a close spatial distance can be selected, a combination of bidirectional intra prediction that matches the characteristics of the image can be realized without depending on the number of fixed prediction modes. It is also possible to reduce the number of fixed prediction modes. Further, in the present embodiment of the present invention, an example in which the number of bidirectional intra prediction modes is 16 is shown, but the increase / decrease in the number of prediction modes can be easily changed.
  • the optimum number of prediction modes may be set in consideration of the balance between the number of prediction modes and coding efficiency. The above is the description of the intra bidirectional prediction image generation unit 109.
  • the inter prediction unit 110 uses the reference image 124 stored in the reference image memory 107 to perform inter prediction.
  • the inter prediction unit 110 performs an interpolation process (motion compensation) based on a motion shift amount (motion vector) between the prediction target block and the reference image 124 to generate an inter prediction image.
  • interpolation processing up to 1 ⁇ 4 pixel accuracy is possible.
  • the derived motion vector is entropy encoded as part of the prediction information 126.
  • the prediction selection switch 111 outputs the output terminal of the intra unidirectional prediction image generation unit 108, the output terminal of the intra bidirectional prediction image generation unit 109, or the output terminal of the inter prediction image generation unit 110 from the prediction selection unit 113.
  • the intra-predicted image or the inter-predicted image is selected as the predicted image 125 and input to the subtracting unit 101 and the adding unit 106.
  • the prediction selection switch 111 outputs from the intra unidirectional prediction image generation unit 108 or the intra bidirectional prediction image generation unit 109 according to the prediction mode shown in FIGS. 7A and 7B. Connect the switch to the end.
  • the prediction selection switch 111 connects a switch to the output terminal from the inter prediction unit 110.
  • the prediction selection unit 113 has a function of setting the prediction information 126 according to the prediction mode controlled by the encoding control unit 116. As described above, intra prediction or inter prediction can be selected to generate the predicted image 125, but a plurality of modes can be further selected for each of intra prediction and inter prediction.
  • the encoding control unit 116 selects one of a plurality of prediction modes of intra prediction and inter prediction as the optimal prediction mode, and the prediction selection unit 113 sets the prediction information 126 according to the determined optimal prediction mode. .
  • the intra unidirectional prediction image generation unit 108 or the intra bidirectional prediction image generation unit 109 is selected.
  • the encoding control unit 116 may specify the prediction mode information in order from the smallest prediction mode number, or may specify the prediction mode information in order from the largest. Further, the prediction mode may be limited according to the characteristics of the input image, or a predetermined prediction mode may be selected. It is not always necessary to specify all the prediction modes, and at least one prediction mode information may be specified for the encoding target block.
  • the encoding control unit 116 determines an optimal prediction mode using a cost function shown in the following mathematical formula (3).
  • OH represents an estimated amount of code amount (for example, the number of bits of a value representing a symbol in binary) related to the prediction information 126 (for example, prediction mode information, motion vector information, and prediction block size information), and SAD Indicates the sum of absolute differences between the prediction target block and the predicted image 125 (that is, the cumulative sum of the absolute values of the prediction errors 118).
  • represents a Lagrange undetermined multiplier determined based on the value of quantization information (quantization parameter)
  • K represents an encoding cost.
  • the prediction mode that minimizes the coding cost K is determined as the optimum prediction mode from the viewpoint of the generated code amount and the prediction error.
  • the encoding cost may be estimated from OH alone or SAD alone, or the encoding cost may be estimated using a value obtained by subjecting SAD to Hadamard transform or an approximate value thereof.
  • the encoding control unit 116 determines an optimal prediction mode using a cost function represented by the following mathematical formula (4).
  • Equation (4) D indicates a square error sum (ie, encoding distortion) between the prediction target block and the local decoded image, and R indicates a prediction error between the prediction target block and the prediction image 125 in the prediction mode.
  • provisional encoding processing and local decoding processing are required for each prediction mode, so that the circuit scale or the amount of calculation increases.
  • the encoding cost J is derived based on more accurate encoding distortion and code amount, it is easy to determine the optimal prediction mode with high accuracy and maintain high encoding efficiency.
  • the encoding cost may be estimated from only R or D, or the encoding cost may be estimated using an approximate value of R or D. These costs may be used hierarchically.
  • the encoding control unit 116 performs determination using Expression (3) or Expression (4) based on information obtained in advance regarding the prediction target block (prediction mode of surrounding pixel blocks, results of image analysis, and the like). The number of prediction mode candidates may be narrowed down in advance.
  • the conversion information setting unit 112 has a function of generating conversion information 127 used in orthogonal transformation based on the prediction information 126 output from the prediction selection unit 113 and input via the prediction selection switch 111.
  • the orthogonal transform unit 102 includes a selection switch A 901, a vertical conversion unit 906, a transposition unit 904, a selection switch B 905, and a horizontal conversion unit 907.
  • the vertical transform unit 906 includes a 1D discrete cosine transform unit 902 and a 1D discrete sine transform unit 903.
  • the horizontal conversion unit 907 includes a 1D discrete cosine conversion unit 902 and a 1D discrete cosine conversion unit 903.
  • the order of the vertical conversion unit 906 and the horizontal conversion unit 907 is an example, and these may be reversed.
  • the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903 have a common function in that the input matrix is multiplied by a discrete cosine transform or a 1D transform matrix for discrete sine transform, respectively.
  • the selection switch A 901 guides the prediction error 118 to one of the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903 according to the vertical transform index (Vertical_transform_idx) included in the 1D transform index 952.
  • the 1D discrete cosine transform unit 902 performs 1D discrete cosine transform on the input prediction error (matrix) 118 and outputs a temporary transform coefficient 951.
  • the 1D discrete sine transform unit 903 performs 1D discrete sine transform on the input prediction error (matrix) 118 and outputs a temporary transform coefficient 951.
  • the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903 perform a one-dimensional orthogonal transform represented by the following formula (5) to remove the vertical correlation of the prediction error (matrix) 118. To do.
  • Equation (5) X represents a matrix (N ⁇ N) of a prediction error (matrix) 118, and V comprehensively includes a 1D discrete cosine transform unit 902 and a 1D discrete sine transform unit 903 (both are N ⁇ N).
  • Y indicates an output matrix (N ⁇ N) of the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903.
  • the transformation matrix V is, for example, N ⁇ N in which discrete cosine transform bases or discrete sine transform bases prepared for removing the vertical correlation of the matrix X are arranged horizontally. Is the transformation matrix.
  • the transposition unit 904 transposes the output matrix (Y) of the vertical conversion unit 906, and gives the result to the selection switch B905.
  • the transposing unit 904 is an example, and corresponding hardware may not necessarily be prepared.
  • 1D orthogonal transformation one-dimensional orthogonal transformation
  • the vertical transformation unit 906 executes (each element of the output matrix of the vertical transformation unit 906) is held, and 1D orthogonal transformation is performed by the horizontal transformation unit 907
  • the transposition of the output matrix (Y) can be executed without preparing the hardware corresponding to the transposition unit 904.
  • the selection switch B 905 guides the input matrix from the transposing unit 904 to either the 1D discrete cosine transform unit 902 or the 1D discrete sine transform unit 903 according to the horizontal transform index (Horizontal_transform_idx) included in the 1D transform index 952.
  • the 1D discrete cosine transform unit 902 performs a discrete cosine transform on the input matrix and outputs a transform coefficient 119.
  • the 1D discrete sine transform unit 903 performs discrete sine transform on the input matrix and outputs a transform coefficient 119.
  • the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903 perform a one-dimensional orthogonal transform represented by the following formula (8) to generate a horizontal direction of the prediction error. Remove the correlation.
  • H comprehensively represents a 1D discrete cosine transform matrix and a 1D discrete sine transform matrix (both N ⁇ N), and Z represents a 1D discrete cosine transform unit 902 or a 1D discrete sine transform unit 903.
  • An output matrix (N ⁇ N) is shown, which refers to the transform coefficient 119.
  • the transformation matrix H is a transform matrix of N ⁇ N which the discrete cosine transform matrix or discrete sine transform matrix to remove the correlation in the vertical direction arranged horizontally in matrix Y T. That is, the discrete cosine transform matrix of Equation (6) or the discrete sine transform matrix of Equation (7) corresponds to each.
  • the orthogonal transform unit 102 performs the separation-type 2D orthogonal transform (two-dimensional orthogonal transform) on the prediction error (matrix) 118 according to the 1D transform index 952 output from the 1D transform setting unit 908.
  • a conversion coefficient (matrix) 119 is generated.
  • the 1D discrete cosine transform unit 902 may be replaced with a discrete cosine transform of H.264 / MPEG-4 ⁇ ⁇ AVC in a form that reuses an existing orthogonal transform.
  • the orthogonal transform unit 102 may implement various orthogonal transforms such as Hadamard transform and Karhunen-Loeve transform in addition to DCT.
  • Intra prediction modes supported by H.264 / MPEG-4 AVC, etc. are interpolated using a reference pixel group (reference pixel line) on a line adjacent to one or both of the left and upper sides of the prediction target block. Some of them generate a predicted image by copying processed pixel values (for example, filter processing) along the prediction direction. Since the prediction mode of the intra prediction uses the spatial correlation of the image, the prediction accuracy tends to decrease as the distance from the reference pixel to the prediction target pixel increases.
  • an intra prediction mode for example, mode 1 and mode 8 in FIG. 4A
  • interpolation processing for example, filter processing
  • the prediction error shows a tendency in the horizontal direction.
  • Intra prediction mode for example, mode 0, mode 3 and mode 7 in FIG. 4A, FIG.
  • the prediction error shows a tendency in the vertical direction.
  • a prediction mode for example, mode 4, mode 4 in FIG. 4A
  • the prediction error shows a tendency related to the horizontal direction and the vertical direction.
  • the tendency is related to the direction orthogonal to the line of the reference pixel group used for generating the predicted image.
  • the 1D discrete sine transform unit 903 has a higher coefficient density when performing 1D orthogonal transform in the orthogonal direction (vertical direction or horizontal direction) than the 1D discrete cosine transform unit 902 ( That is, the non-zero coefficient ratio in the quantized transform coefficient 121 is reduced).
  • the 1D discrete cosine transform unit 902 is a general-purpose transform matrix that does not have such properties. If 1D orthogonal transformation is performed in the orthogonal direction using 1D discrete sine transformation, the prediction error conversion efficiency of intra prediction is improved, and consequently the coding efficiency is improved.
  • a prediction error signal in mode 0 shows the above tendency in the vertical direction but does not show the above tendency in the horizontal direction. Therefore, by performing 1D orthogonal transform using the 1D discrete sine transform unit 903 in the vertical transform unit 906 and performing 1D orthogonal transform using the 1D discrete cosine transform unit 902 in the horizontal transform unit 907, efficient orthogonal transform is performed. realizable.
  • the predicted image 125 generated by the intra unidirectional predicted image generation unit 108 has an effect of removing the spatial direction correlation of the input image 117.
  • the spatial correlation of an image is higher as the distance is shorter, and decreases as the distance is longer. For this reason, the prediction error is smaller as the distance between the reference pixel and the prediction coping pixel is closer to the prediction direction, and the prediction error is larger as the distance is longer.
  • FIG. 10A shows an example of a general prediction error tendency statistically seen as a prediction direction corresponding to mode 0 in FIG. 4A.
  • the prediction error in the vertical direction increases as the distance from the reference pixel increases, while the prediction error in the horizontal direction has the same magnitude.
  • the spatial correlation can be efficiently removed by selecting DST as 1D vertical conversion and selecting DCT as 1D horizontal conversion.
  • FIG. 10B shows an example of a general prediction pixel tendency statistically seen as a prediction direction corresponding to mode 1 in FIG. 4A. It can be seen that while the vertical prediction error is the same size, the horizontal prediction error increases as the distance from the reference pixel increases. In this case, spatial correlation can be efficiently removed by selecting DCT as 1D vertical conversion and selecting DST as 1D horizontal conversion.
  • FIG. 10B shows an example of a general prediction pixel tendency statistically seen as a prediction direction corresponding to mode 1 in FIG. 4A. It can be seen that while the vertical prediction error is the same size, the horizontal prediction error increases as the distance from the reference pixel
  • 10C shows an example of the prediction direction corresponding to mode 4 in FIG. It can be seen that the prediction error in the vertical direction and the prediction error in the horizontal direction both increase as the distance from the reference pixel that is the starting point in the prediction direction increases. In this case, spatial correlation can be efficiently removed by selecting DST as 1D vertical conversion and selecting DST as 1D horizontal conversion.
  • the bidirectional prediction image generation unit 109 is a prediction image generation method that averages two prediction directions with weights. For this reason, there is an effect of removing the correlation that changes smoothly in space while maintaining the characteristics of the two prediction directions.
  • FIG. 10D shows an example of a general tendency of prediction error seen statistically when mode 1 and mode 8 in FIG. 4A are used. In any mode, the prediction is performed only from the line positioned to the left of the prediction target block as the reference pixel line. Therefore, it can be seen that the prediction error in the vertical direction is the same size, but the prediction error in the horizontal direction increases as the distance from the reference pixel increases. In this case, spatial correlation can be efficiently removed by selecting DCT as 1D vertical conversion and selecting DST as 1D horizontal conversion.
  • FIG. 10D shows an example of a general tendency of prediction error seen statistically when mode 1 and mode 8 in FIG. 4A are used. In any mode, the prediction is performed only from the line positioned to the left of the prediction target block as the reference pixel line. Therefore, it can be seen that
  • 10E shows an example of a general tendency of prediction error seen statistically when mode 0 and mode 1 in FIG. 4A are used.
  • Mode 0 uses a reference line located above the prediction target block
  • mode 1 uses a reference line located to the left of the prediction target block.
  • the prediction error in this case has a tendency similar to the prediction error of the intra unidirectional prediction described with reference to FIG. 10C
  • the prediction error in the vertical direction and the prediction error in the horizontal direction are the left and upper references that are the starting points of the prediction direction. It can be seen that both increase as the distance from the pixel increases.
  • Non-Patent Document 1 when 1D vertical conversion and 1D horizontal conversion are selected according to the two selected prediction modes, either the conversion of FIG. 10A or FIG.
  • Intra_DC indicates DC prediction that is predicted by the average value of available reference pixels.
  • the prediction error of DC prediction the directional error as described above does not occur statistically, so the DCT used in H.264 / MPEG-4 AVC is selected.
  • the tendency of the prediction error changes according to the prediction direction of the other prediction modes. Therefore, in such a case, it is possible to efficiently reduce the redundancy of the prediction error by setting TransformIdx determined in the other prediction mode. For example, as illustrated in FIGS.
  • the inverse orthogonal transform unit 105 includes a selection switch A 1201, a vertical inverse transform unit 1206, a transposition unit 1204, a selection switch B 1205, and a horizontal inverse transform unit 1207.
  • the vertical inverse transform unit 1206 includes a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform unit 1203.
  • the horizontal inverse transform unit 1207 includes a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform unit 1203. Note that the order of the vertical inverse transform unit 1206 and the horizontal inverse transform unit 1207 is an example, and these may be reversed.
  • the two 1D inverse discrete cosine transform units 1202 shown in the figure can also be realized by using physically identical hardware in a time division manner. The same applies to the 1D inverse discrete sine transform unit 1203.
  • the selection switch A 1201 converts the restored transform coefficient 121 of the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 according to the vertical transform index (Vertical_transform_idx) included in the 1D transform index 1252 output from the 1D transform setting unit 1208. Lead to one of them.
  • the 1D inverse discrete cosine transform unit 1202 multiplies the input restoration transform coefficient 121 (matrix format) by a transposed matrix of the discrete cosine transform matrix and outputs the result.
  • the 1D inverse discrete sine transform unit 1203 multiplies the input restoration transform coefficient 121 by the transposed matrix of the discrete sine transform matrix and outputs the result.
  • the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 perform a one-dimensional inverse orthogonal transform represented by the following equation (9).
  • Equation (9) a Z 'represents a matrix of restoring conversion coefficient 121 (N ⁇ N), V T is the transpose matrix of 1D inverse discrete cosine transform matrix and 1D inverse discrete sine transform matrix (both N ⁇ N) Y ′ indicates an output matrix (N ⁇ N) of the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203. That, V T is the discrete cosine transform matrix in Equation (6), or a discrete sine transform matrix equation (7) corresponds, respectively.
  • the transposition unit 1204 transposes the output matrix (Y ′) of the vertical inverse transform unit 1206 and supplies the transposition to the selection switch B 1205.
  • the transposition unit 1204 is an example, and corresponding hardware may not necessarily be prepared.
  • the result one element of the output matrix of the vertical inverse transform unit 1206) obtained by executing the 1D inverse orthogonal transform (one-dimensional inverse orthogonal transform) by the vertical inverse transform unit 1206 is held, and the 1D inverse by the horizontal inverse transform unit 1207 is held. If reading is performed in an appropriate order when performing orthogonal transformation, transposition of the output matrix (Y ′) can be performed without preparing hardware corresponding to the transposition unit 1204.
  • the selection switch B 1205 converts the input matrix from the transposition unit 1204 into the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform according to the horizontal transformation index (Horizontal_transform_idx) included in the 1D transformation index 1252 output from the 1D transformation setting unit 1208. Lead to one of the sections 1203.
  • the 1D inverse discrete cosine transform unit 1202 performs 1D inverse discrete cosine transform on the input matrix and outputs the result.
  • the 1D inverse discrete sine transform unit 1203 performs 1D inverse discrete sine transform on the input matrix and outputs the result.
  • the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 perform a one-dimensional inverse orthogonal transform represented by the following formula (10).
  • H T is 1D are generically indicates a transposed matrix of the discrete cosine transform matrix and 1D discrete sine transform matrix (both N ⁇ N), X 'is 1D inverse discrete cosine transform unit 1202 and 1D An output matrix (N ⁇ N) of the inverse discrete sine transform unit 1203 is shown, which indicates the restored prediction error 122. That, H T is the discrete cosine transform matrix in Equation (6), or a discrete sine transform matrix equation (7) corresponds, respectively.
  • the inverse orthogonal transform unit 105 performs inverse orthogonal transform on the reconstructed transform coefficient (matrix) 121 according to the input orthogonal transform information 127 to generate a reconstructed prediction error (matrix) 122.
  • the 1D inverse discrete cosine transform unit 1202 may be replaced with an inverse discrete cosine transform of H.264 / MPEG-4 AVC by reusing the existing inverse orthogonal transform.
  • the inverse orthogonal transform unit 105 may realize various inverse orthogonal transforms such as Hadamard transform and Karhunen-Loeve transform. In any case, an inverse orthogonal transform corresponding to the orthogonal transform unit 102 may be selected.
  • the 1D conversion setting unit 1208 selects a transformation matrix used for vertical orthogonal transformation and vertical inverse orthogonal transformation, and performs horizontal orthogonal transformation and horizontal inverse orthogonal transformation. And a function of setting a 1D conversion index for selecting a conversion matrix to be used.
  • the 1D transform index 1252 directly or indirectly indicates the orthogonal transform selected by the vertical orthogonal transform and the horizontal orthogonal transform, respectively.
  • the 1D transform index 1252 can be expressed by a transform index (TransformIdx) shown in FIG. 13A and a 1D orthogonal transform in the vertical or horizontal direction (Vertical_transform_idx and Horizontal_transform_idx, respectively).
  • a 1D transformation index (Vertical_transform_idx) for a vertical transformation unit and a 1D transformation index (Horizontal_transform_idx) for a horizontal transformation unit can be derived from the transformation index.
  • FIG. 13B shows whether each idx indicates discrete cosine transform or discrete sine transform.
  • idx When idx is “1”, it indicates a discrete sine transform matrix (DST), and when it is “0”, it indicates a discrete cosine transform matrix (DCT).
  • the corresponding 1D transform index 1252 is referenced based on TransformIdx included in the orthogonal transform information 127, and Vertical_transform_idx is output to the selection switch A and Horizontal_transform_idx is output to the selection switch B.
  • the selection switch when Vertical_transform_idx or Horizontal_transform_idx indicates DCT with reference to FIG. 13B, the selection switch connects the output end to the 1D inverse discrete cosine transform unit 1202 (or 1D discrete cosine transform unit 902).
  • the selection switch When Vertical_transform_idx or Horizontal_transform_idx indicates DST with reference to FIG. 13B, the selection switch connects the output end to the 1D inverse discrete sine transform unit 1203 (or 1D discrete sine transform unit 903).
  • the orthogonal transform information indirectly and directly indicates a transform index corresponding to the selected prediction mode with reference to a predetermined transform index and prediction mode map.
  • 11A and 11B show the relationship between the prediction mode and the conversion index.
  • 11A and 11B are obtained by adding TransformIdx to the intra prediction mode shown in FIGS. 7A and 7B. From this table, TransformIdx can be derived according to the selected prediction mode.
  • the prediction selection unit 113 determines whether the prediction mode is intra prediction based on the selection of the encoding control unit 116 (S1402). When the determination is No, the inter prediction process is performed as usual. If the determination is Yes, the prediction selection unit 113 next determines whether the prediction mode is bidirectional intra prediction (S1403). When the determination is No, the unidirectional prediction mode is output to the prediction selection unit 113 after being set (S1404) and input to the prediction selection switch 111.
  • the prediction selection switch 111 connects the input end of the switch to the intra unidirectional prediction image generation unit 108, and the prediction image 125 generated by the intra unidirectional prediction image generation unit 108 is output (S1405).
  • Prediction information 126 indicating the prediction mode of unidirectional prediction set by the prediction selection unit 113 is input to the conversion information setting unit 112.
  • the transformation information setting unit 112 refers to the LUT shown in FIGS. 11A and 11B and outputs the transformation information 127 (TransformIdx) of the selected prediction mode (S1406).
  • the prediction selection unit 113 sets two prediction modes (S1407) and outputs the prediction mode to the prediction selection switch 111.
  • two prediction modes are included in one PreMode indicating the prediction mode.
  • PredMode is 34
  • bidirectional intra prediction is performed in two prediction modes in which PredMode is 2 and PredMode is 0. That is, when calling the prediction mode, there are cases where two prediction modes are included, but here when referring to the prediction mode, there are two “PredTypeLX” (prediction type) and “PredAngleIdLX” (prediction angle). Indicates the specified mode.
  • the prediction selection switch 111 connects the input end of the switch to the intra bidirectional prediction image generation unit 109, and the prediction selection switch 111 connects the input end of the switch to the intra bidirectional prediction image generation unit 109.
  • the predicted image 125 generated by the directional predicted image generation unit 109 is output (S1408).
  • Prediction information 126 indicating the prediction mode of bidirectional prediction set by the prediction selection unit 113 is input to the conversion information setting unit 112.
  • the conversion information setting unit 112 determines whether the reference pixel lines in the two set prediction modes are different (S1409).
  • the prediction mode transformation information 127 (TransformIdx) is output so that Vertical_transform_idx and Horizontal_transform_idx select DST, respectively (S1410).
  • the conversion information setting unit 112 outputs the conversion information 127 (TransformIdx) possessed by the smaller of the two set prediction mode numbers (S1411).
  • the 1D transformation setting unit 908 in the orthogonal transformation unit 102 and the 1D transformation setting unit 1208 in the inverse orthogonal transformation unit 105 derive Vertical_transform_idx and Horizontal_transform_idx by referring to FIGS. 13A and 13B according to the inputted transformation information 127.
  • Vertical_transform_idx is input to the selection switches A 901 and 1201, and the output terminal of the switch is input to the 1D discrete cosine transform unit 902 (or 1D inverse discrete cosine transform unit 1202) or 1D discrete sine transform unit 903 (or 1D inverse discrete sine transform unit 1203). Connecting.
  • Horizontal_transform_idx is input to the selection switches B905 and 605, and the output end of the switch is input to the 1D discrete cosine transform unit 902 (or 1D inverse discrete cosine transform unit 1202) or 1D discrete sine transform unit 903 (or 1D inverse discrete sine transform unit 1203). Connect (S1412).
  • the prediction error 118 is input to the orthogonal transformation unit 102, and orthogonal transformation processing is performed using the set transformation matrix (S1413).
  • the transform coefficient 119 after the orthogonal transform is output to the quantization unit 103 (S1414).
  • the 1D transformation setting unit 1208 also sets Vertical_transform_idx and Horizontal_transform_idx in the same processing procedure for the inverse orthogonal transformation unit 105.
  • the restored transform coefficient 121 is input to the inverse orthogonal transform unit 105, and an inverse orthogonal transform process is performed using the set transform matrix. Thereafter, the restoration prediction error 122 is output to the adding unit 106.
  • the above is the description of the process flow of the predicted image generation process, the orthogonal transform process, and the inverse orthogonal transform process according to the present embodiment of the present invention.
  • FIG. 15 illustrates a syntax 1500 used by the image encoding device in FIG.
  • the syntax 1500 includes three parts: a high level syntax 1501, a slice level syntax 1502, and a coding tree level syntax 1503.
  • the high level syntax 1501 includes syntax information of a layer higher than the slice.
  • a slice refers to a rectangular area or a continuous area included in a frame or a field.
  • the slice level syntax 1502 includes information necessary for decoding each slice.
  • Coding tree level syntax 1503 includes information necessary to decode each coding tree (ie, each coding tree block). Each of these parts includes more detailed syntax.
  • the high level syntax 1501 includes sequence and picture level syntaxes such as a sequence parameter set syntax 1504 and a picture parameter set syntax 1505.
  • the slice level syntax 1502 includes a slice header syntax 1506, a slice data syntax 1507, and the like.
  • the coding tree level syntax 1503 includes a coding tree block syntax 1508, a prediction unit syntax 1509, and the like.
  • the coding tree block syntax 1508 can have a quadtree structure. Specifically, the coding tree block syntax 1508 can be recursively called as a syntax element of the coding tree block syntax 1508. That is, one coding tree block can be subdivided with a quadtree. Also, the coding tree block syntax 1508 includes a transform unit syntax 1510. The transform unit syntax 1510 is invoked at each coding tree block syntax 1508 at the extreme end of the quadtree. The transform unit syntax 1510 describes information related to inverse orthogonal transformation and quantization.
  • the transform unit syntax 1510 can have a quadtree structure. Specifically, the transform unit syntax 1510 can be further recursively called as a syntax element of the transform unit syntax 1510. That is, one transform unit can be subdivided with a quadtree.
  • FIG. 16 illustrates a slice header syntax 1506 according to the present embodiment.
  • the slice_bipred_intra_flag illustrated in FIG. 16 is a syntax element indicating, for example, the validity / invalidity of bidirectional intra prediction according to the present embodiment for the slice.
  • the prediction selection unit 113 does not set a prediction mode including bidirectional intra prediction, and the prediction selection switch 111 does not connect the output terminal of the switch to the intra bidirectional prediction image generation unit 109.
  • unidirectional intra prediction prediction in which BipedFlag [] in FIGS. 7A and 7B, FIG. 11A and FIG. 11B is 0, or intra prediction defined in H.264 / MPEG-4 AVC may be performed. Absent.
  • slice_bipred_intra_flag 1
  • the bidirectional intra prediction according to the present embodiment is valid in the entire area of the slice.
  • slice_bipred_intra_flag 1
  • the prediction validity / Invalidity may be specified.
  • the slice_directional_transform_intra_flag shown in FIG. 16 is a syntax element indicating, for example, the validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to this embodiment with respect to the slice.
  • the transformation information setting unit 112 When slice_directional_transform_intra_flag is 0, the discrete sine transform and the inverse discrete sine transform according to the present embodiment in the slice are invalid. Therefore, the transformation information setting unit 112 always sets TransformIdx to 3 and outputs it. Alternatively, the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx. As an example, when slice_directional_transform_intra_flag is 1, the discrete sine transform and the inverse discrete sine transform according to the present embodiment are effective over the entire area in the slice.
  • slice_directional_transform_intra_flag 1
  • the discrete sine transform according to the present embodiment for each local region in the slice in the syntax of a lower layer (coding tree block, transform unit, etc.)
  • the validity / invalidity of the inverse discrete sine transform may be defined.
  • FIG. 17 illustrates the coding tree block syntax 1508 according to the present embodiment.
  • Ctb_directional_transform_flag shown in FIG. 17 is a syntax element indicating whether the discrete sine transform and the inverse discrete sine transform according to the present embodiment are valid / invalid for the coding tree block.
  • pred_mode shown in FIG. 17 is one of syntax elements included in the prediction unit syntax 1509, and indicates the coding type in the coding tree block or macroblock. MODE_INTRA indicates that the encoding type is intra prediction.
  • ctb_directional_transform_flag is encoded only when the above-described slice_directional_transform_flag is 1 and the encoding type of the coding tree block is intra prediction.
  • CBP indicates Coded_Block_Pattern information, and is information indicating whether or not there is a transform coefficient in the coding tree block. If the information is 0, it indicates that there is no transform coefficient, and the decoder does not need to perform inverse transform processing, so ctb_directional_transform_flag is not encoded.
  • the transformation information setting unit 112 always sets TransformIdx to 3 and outputs it.
  • the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
  • ctb_directional_transform_flag is 1, the discrete sine transform and the inverse discrete sine transform according to the present embodiment are valid in the coding tree block.
  • the flag that defines the validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to the present embodiment is encoded, compared to the case where this flag is not encoded.
  • the information amount (code amount) increases.
  • this flag it is possible to perform optimal orthogonal transform for each local region (ie, coding tree block).
  • FIG. 18 illustrates a transform unit syntax 1510 according to this embodiment.
  • a tu_directional_transform_flag shown in FIG. 18 is a syntax element indicating validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to this embodiment with respect to the transform unit.
  • pred_mode shown in FIG. 18 is one of syntax elements included in the prediction unit syntax 1509, and indicates the coding type in the coding tree block or macroblock. MODE_INTRA indicates that the encoding type is intra prediction.
  • tu_directional_transform_flag is encoded only when slice_directional_transform_flag is 1 and the encoding type of the coding tree block is intra prediction.
  • coded_block_flag is 1-bit information indicating whether or not there is a transform coefficient in the transform unit. If the information is 0, it indicates that there is no transform coefficient, and the decoder does not need to perform inverse transform processing, so tu_directional_transform_flag is not encoded.
  • the transformation information setting unit 112 always sets TransformIdx to 3 and outputs it.
  • the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
  • the transform unit syntax 1510 when the flag that defines the validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to the present embodiment is encoded, compared to the case where this flag is not encoded. Thus, the information amount (code amount) increases. However, by encoding this flag, it is possible to perform optimal orthogonal transform for each local region (that is, transform unit).
  • FIG. 19 shows an example of the prediction unit syntax.
  • Pred_mode in FIG. 19 indicates the prediction type of the prediction unit.
  • MODE_INTRA indicates that the prediction type is intra prediction.
  • intra_split_flag is a flag indicating whether or not the prediction unit is further divided into four prediction units.
  • intra_split_flag is 1, a prediction unit is a prediction unit obtained by dividing the prediction unit into four in half in the vertical and horizontal sizes.
  • intra_split_flag is 0, the prediction unit is not divided.
  • Intra_luma_bipred_flag [i] is a flag indicating whether the prediction mode IntraPredMode applied to the prediction unit is a unidirectional intra prediction mode or a bidirectional intra prediction mode. i indicates the position of the divided prediction unit. When the intra_split_flag is 0, 0 is set, and when the intra_split_flag is 1, 0 to 3 are set. In the flag, the value of IntraBipredFlag of the prediction unit shown in FIGS. 9, 12, 13A, and 13B is set.
  • intra_luma_bipred_flag [i] When intra_luma_bipred_flag [i] is 1, this indicates that the prediction unit is bi-directional intra prediction, and is information that identifies the bi-directional intra prediction mode used from among the prepared bi-directional intra prediction modes.
  • Intra_luma_bipred_mode [i] is encoded.
  • intra_luma_bipred_mode [i] may be encoded with the isometric length according to the bidirectional intra prediction mode number IntraBipredNum shown in FIGS. 7A and 7B, FIG. 11A and FIG. 11B, or encoded using a predetermined code table. May be.
  • intra_luma_bipred_flag [i] When intra_luma_bipred_flag [i] is 0, it indicates that the prediction unit is unidirectional intra prediction, and predictive encoding is performed from adjacent blocks.
  • prev_intra_luma_unipred_idx [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. Details of the method of calculating MostProbableMode will be described later. When prev_intra_luma_unipred_idx [i] is not 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal.
  • prev_intra_luma_unipred_idx [i] When prev_intra_luma_unipred_idx [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_luma_unipred_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is encoded. . rem_intra_luma_unipred_mode [i] may be encoded with the same length according to the bidirectional intra prediction mode number IntraPredModeNum shown in FIGS. 7A and 7B, FIG. 11A and FIG. 11B, or may be encoded using a predetermined code table. May be. From intra prediction mode IntraPredMode, rem_intra_luma_unipred_mode [i] is calculated using the following equation.
  • numCand indicates the number of candidates for MostProbableMode
  • candModeList [cIdx] indicates the MostProbableMode that is actually a candidate.
  • numCand is set to 2
  • the candidate MostProbableMode is set to IntraPredMode of pixel blocks positioned on the upper and left sides that have already been predicted and are adjacent to the prediction target block.
  • candModeList [0] is indicated as MPM_L0
  • candModeList [1] is indicated as MPM_L1.
  • prev_intra_luma_unipred_idx [i] When prev_intra_luma_unipred_idx [i] is 1, a prediction mode of MPM_L0 is derived, and when prev_intra_luma_unipred_idx [i] is 2, a prediction mode of MPM_L1 is derived.
  • candModeList [cIdx] may be in the same prediction mode. In this case, since the redundant information is included in the information to be encoded, the redundant prediction mode is omitted and expressed as shown in Expression (11). For the code table for actual encoding, an optimum code table may be created in consideration of the maximum number of these prediction modes.
  • Min (x, y) is a parameter for outputting the smaller one of the inputs x and y.
  • IntraPredModeA and IntraPredModeB indicate the intra prediction modes of prediction units adjacent to the left and above the encoded prediction unit.
  • syntax elements not defined in this embodiment may be inserted between the lines of the syntax tables illustrated in FIGS. 16, 17, 18 and 19, and other conditional branch descriptions are included. It may be. Further, the syntax table may be divided into a plurality of tables, or a plurality of syntax tables may be integrated. Moreover, the term of each illustrated syntax element can be changed arbitrarily.
  • the image coding apparatus when using two reference pixel lines having different prediction directions, has a different prediction error tendency from either of the two prediction directions, and follows one prediction mode.
  • orthogonal transform is selected, the problem that the coding efficiency is lowered without taking advantage of the tendency of intra prediction in which the prediction accuracy is lowered as the distance between the reference pixel and the prediction pixel is increased is solved.
  • This image encoding apparatus classifies the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-described tendency, and adaptively performs 1D discrete cosine transform or 1D discrete sine transform for each of the vertical direction and horizontal direction. Apply.
  • the coefficient density is higher than the 1D discrete cosine transform (that is, quantization)
  • the ratio of the non-zero coefficient in the conversion coefficient 121 is reduced). Therefore, according to the image coding apparatus according to the present embodiment, high conversion efficiency is stably achieved as compared with a case where fixed orthogonal transformation such as DCT is uniformly applied to each prediction mode.
  • orthogonal transform unit 102 and the inverse orthogonal transform unit 105 according to the present embodiment are suitable for both hardware implementation and software implementation.
  • the above is the description of the image encoding device according to the first embodiment.
  • the image encoding device according to the second embodiment differs from the image encoding device according to the first embodiment described above in the details of the intra unidirectional prediction image generation unit 108 and the intra bidirectional prediction image generation unit 109.
  • the same parts as those in the first embodiment are denoted by the same reference numerals in the present embodiment, and different parts will be mainly described.
  • a moving picture decoding apparatus corresponding to the picture encoding apparatus according to the present embodiment will be described in a fourth embodiment.
  • FIG. 20 is a block diagram of an image encoding apparatus 2000 according to the second embodiment of the present invention.
  • a prediction direction deriving unit 2001 is newly added and that prediction direction deriving information 2051 is output from the prediction direction deriving unit 2001 to the prediction selecting unit 113.
  • the intra unidirectional prediction image generation unit 108 and the intra bidirectional prediction image generation unit 109 are extended to 128 directions. Specifically, it means that the angle gradient of 180 degrees used for direction prediction is divided into 128 pieces, and a prediction direction is assigned every 1.4 degrees.
  • the prediction modes of the unidirectional prediction described in the first embodiment are the same as those in FIGS. 7A and 7B and FIGS. 11A and 11B. Since the other configuration is the same as that of the first embodiment, description thereof is omitted.
  • intra prediction performed using the prediction direction deriving unit 2001 is referred to as a prediction direction derivation mode.
  • the reference image 124 output from the reference image memory 107 is input to the prediction direction deriving unit 2001.
  • the prediction direction deriving unit 2001 has a function of analyzing the input reference image 124 and generating prediction direction derivation information 2051.
  • the prediction direction deriving unit 2001 will be described with reference to FIG.
  • the prediction direction deriving unit 2001 includes a left reference pixel line edge deriving unit 2101, an upper reference pixel line edge deriving unit 2102, and a prediction direction deriving information generating unit 2103.
  • the left reference pixel line edge deriving unit 2101 has a function of performing edge detection processing on a reference pixel line located to the left of the prediction target pixel block and deriving an edge direction.
  • the upper reference pixel line edge deriving unit 2102 has a function of performing edge detection processing on a reference pixel line located above the prediction target pixel block and deriving an edge direction.
  • FIG. 22 shows an example of pixels used for the derivation of the left reference pixel line edge deriving unit 2101 and the upper reference pixel line edge deriving unit 2102.
  • the left reference pixel line edge deriving unit 2101 uses two lines indicated by diagonal lines from the upper right to the lower left located on the left side of the prediction target pixel block.
  • the upper reference pixel line edge deriving unit 2102 uses two lines indicated by diagonal lines from the upper left to the lower right located above the prediction target pixel block. In the present embodiment of the present invention, two lines have been described, but one line or three lines may be used, and more lines may be used. In the drawing, an example in which the edge direction is derived using the left reference pixel line is shown as A, and an example in which the edge direction is derived using the upper reference pixel line is shown as B.
  • both deriving units 2101 and 2102 perform edge intensity detection using an operator as shown in the following equation (13).
  • Gx represents the edge strength in the horizontal direction (x coordinate system)
  • Gy represents the edge strength in the vertical direction (y coordinate system).
  • any operator such as a Sobel operator, a Prewitt operator, or a Kirsch operator may be used as the edge detection operator.
  • Equation (13) When the operator of Equation (13) is applied to the reference pixel line, an edge direction vector is derived for each pixel.
  • the following formula (14) is used to derive the optimum edge direction from these edge vectors.
  • ⁇ a, b> represents the inner product of two vectors.
  • the unit vector and edge strength (direction vector) are respectively expressed by the following equations.
  • the edge strength of the following expression of each pixel line derived by the left reference pixel line edge deriving unit 2101 and the upper reference pixel line edge deriving unit 2102 is input to the prediction direction deriving information generating unit 2103.
  • the prediction direction derivation information generation unit 2103 calculates Equations (14) and (15) using all the input edge strengths, and derives a unidirectional representative edge angle.
  • both the expression edge (14) and the expression (15) are separately calculated with respect to the two representative edge angles of the left reference pixel line and the upper reference pixel line, and both have two representative edge angles.
  • the direction representative edge angle is derived.
  • the prediction direction derivation information generation unit 2103 derives a plurality of peripheral unidirectional representative edge angles that are angularly adjacent, starting from the unidirectional representative edge angle. For example, it is assumed that there are 128 types of edge angles and they are arranged in the order of angles.
  • the representative edge angle is RDM
  • the peripheral unidirectional representative edge angles are expressed as RDM-1, RDM + 1, RDM-2, RDM + 2,.
  • the peripheral unidirectional representative edge angle is 10 (for example, ⁇ 5).
  • FIG. 23 shows an example of the prediction direction derivation information 2051.
  • the unidirectional representative edge angle is indicated by RDM
  • the representative edge angle of the left reference pixel line of the bidirectional representative edge angle is indicated by RDM_L0
  • the representative edge angle of the upper reference pixel line of the bidirectional representative edge angle is It is indicated by RDM_L1.
  • RDMPredMode indicates the prediction mode derived by the prediction direction deriving unit 2001 in the present embodiment of the present invention.
  • RDMBipredFlag indicates whether the prediction mode derived by the prediction direction deriving unit 2001 in the present embodiment of the present invention is bidirectional prediction.
  • RDMPredAngleIdL0 and RDMPredAngleIdL1 indicate which prediction angle the prediction mode derived by the prediction direction deriving unit 2001 in the present embodiment of the present invention indicates.
  • the prediction direction derivation information 2051 includes two representative edge angles included in the unidirectional representative edge angle and the bidirectional representative edge angle, in addition to FIG. The relationship between these prediction modes and TransformIdx will be described later.
  • the prediction direction derivation information 2051 generated by the prediction direction derivation unit 2001 is input to the prediction selection unit 113.
  • a prediction image 125 is generated by the intra unidirectional prediction image generation unit 108 or the intra bidirectional prediction image generation unit 109 according to the prediction mode selected here. These predicted image generation units are the same as those in the first embodiment except that the number of predicted angles is expanded to 128. For example, when RDMPredMode is 1, the first predicted image signal 851 and the second predicted image signal 852 in FIG. 8 are generated at two unidirectional representative edge angles included in the bidirectional representative edge angle, and the weighted average An average process is performed in the unit 801, and the predicted image 125 is output.
  • the prediction direction deriving unit 2001 is added to change the configuration, so that the prediction direction, which is the conventional 33 directions, is expanded to 128 directions, and further based on the reference pixel line.
  • the prediction direction can be selected from the representative angle calculated by Expression (15). For example, by dividing 180 degrees into 128, quantizing the representative angle calculated by Equation (15), and mapping to a maximum 128 prediction directions, a more accurate prediction direction can be used.
  • the additional mode information required in the present embodiment is the 12 types shown in FIG. 23, and the overhead when encoding the prediction mode is significantly larger than when 128 types of prediction modes are simply added. Can be reduced.
  • TransformIdx is selected in units of coding tree blocks (or the first prediction unit included in the coding tree block). For example, assume that the N ⁇ N pixel block 0 shown in FIG. 2C is a prediction unit, and that a 2N ⁇ 2N pixel block is a coding tree block.
  • TransformIdx is selected using the information of the reference pixel line derived here.
  • TransformIdx [0] for following the TransformIdx of the head prediction unit is specified regardless of each prediction mode.
  • TransformIdx when the prediction mode described in FIG. 23 is selected in advance may be determined. For example, it is possible to easily set TransformIdx to 0 in order to reduce the process of deriving the predicted angle.
  • FIG. 24 illustrates a slice header syntax 1506 according to this embodiment.
  • the slice_derived_direction_intra_flag illustrated in FIG. 24 is a syntax element indicating, for example, the validity / invalidity of the prediction direction deriving method according to the present embodiment for the slice.
  • the prediction selection unit 113 does not set the prediction mode including the prediction direction derivation information 2051, and the prediction selection switch 111 connects the output terminals of the switches according to the first embodiment of the present invention.
  • slice_derived_direction_intra_flag 1
  • the prediction direction derivation mode according to the present embodiment is valid over the entire area in the slice.
  • the prediction direction derivation method is 1, the prediction according to the present embodiment is performed for each local region in the slice in the syntax of a lower layer (coding tree block, transform unit, etc.).
  • the validity / invalidity of the direction derivation mode may be defined.
  • FIG. 25A shows an example of the prediction unit syntax.
  • intra_derived_direction_flag [i] is a flag indicating whether the prediction mode IntraPredMode applied to the prediction unit is the first embodiment shown in FIGS. 11A and 11B or the second embodiment shown in FIG. It is. i indicates the position of the divided prediction unit.
  • intra_split_flag is 0, 0 is set, and when the intra_split_flag is 1, 0 to 3 are set.
  • intra_direction_mode [i] which is information identifying the used intra prediction mode, is encoded from among the prepared prediction modes. As shown in FIG. 23, in this mode, a bidirectional intra prediction mode and a unidirectional intra prediction are mixedly expressed. These prediction modes can be expressed as separate syntax elements and encoded.
  • intra_direction_mode [i] is described as an example corresponding to RDMPredMode, but the prediction mode expression method may be changed based on RDMPredAngleIdL0.
  • the prediction mode can also be expressed by dividing it into two types of syntax elements: a 1-bit flag representing a code and an index representing a change. It becomes. In this case, a new flag indicating whether or not bidirectional intra prediction is used may be prepared.
  • intra_direction_mode [i] may be encoded with the same length according to the number of prediction modes, or may be encoded using a predetermined code table. When intra_direction_mode [i] is 0, it indicates that the prediction unit does not use the prediction direction derivation method according to the present embodiment of the present invention, and is encoded according to the method described in the first embodiment.
  • FIG. 25B shows an example of the prediction unit syntax as another embodiment of the present invention.
  • intra_direction_mode [i] is expressed by being divided into prev_intra_direction_mode [i] and rem_intra_direction_mode [i]. These syntax elements introduce the prediction between prediction modes similarly to Formula (11) or (12).
  • prev_intra_direction_mode [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. When prev_intra_direction_mode [i] is 1, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal.
  • prev_intra_direction_mode [i] When prev_intra_direction_mode [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_direction_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is encoded. .
  • the rem_intra_direction_mode [i] may be encoded with an equal length according to the number of prediction modes, or may be encoded using a predetermined code table.
  • FIG. 25C shows an example of the prediction unit syntax as another embodiment of the present invention.
  • PredMode described in the first embodiment and PredMode described in the second embodiment are integrated and expressed as one PredMode table.
  • PredMode in this case is shown in FIGS. 26A, 26B, and 26C.
  • These syntax elements introduce the prediction between prediction modes similarly to Formula (11) or (12).
  • prev_intra_luma_unipred_idx [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same.
  • prev_intra_luma_unipred_idx [i] When prev_intra_luma_unipred_idx [i] is 1, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal. When prev_intra_luma_unipred_idx [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_luma_unipred_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is encoded. .
  • the rem_intra_luma_unipred_mode [i] may be encoded with the same length according to the number of prediction modes, or may be encoded using a predetermined code table.
  • the above is the detailed description of the image coding apparatus 2000 according to the second embodiment of the present invention.
  • the third embodiment relates to a moving picture decoding apparatus for decoding encoded data encoded by the first moving picture decoding apparatus. That is, the decoding apparatus according to the present embodiment decodes encoded data generated by, for example, the image encoding apparatus according to the first embodiment.
  • the moving picture decoding apparatus 2700 includes an input buffer 2701, an entropy decoding unit 2702, an inverse quantization unit 2703, an inverse orthogonal transform unit 2704, an addition unit 2705, and a reference image memory 2706. , An intra unidirectional prediction image generation unit 2707, an intra bidirectional prediction image generation unit 2708, an inter prediction image generation unit 2709, a prediction selection switch 2710, a conversion information setting unit 2711, an output buffer 2712, and a prediction selection unit 2714.
  • the encoded data 2725 is output from, for example, the image encoding device of FIG. 1 and the like, and is temporarily stored in the input buffer 2701 through a storage system or a transmission system (not shown).
  • the entropy decoding unit 2702 performs decoding based on the syntax for each frame or field for decoding the encoded data 2725.
  • the entropy decoding unit 2702 sequentially entropy-decodes the code string of each syntax, and reproduces the encoding parameters of the encoding target block such as prediction information 2721 including the prediction mode information and the quantized transform coefficient (sequence) 2715.
  • the coding parameters are all parameters necessary for decoding such as prediction information 2721, information on transform coefficients, information on quantization, and the like.
  • the inverse quantization unit 2703 performs inverse quantization on the quantized transform coefficient 2715 from the entropy decoding unit 2702 to obtain a restored transform coefficient 2716. Specifically, the inverse quantization unit 2703 performs inverse quantization according to the information regarding the quantization decoded by the entropy decoding unit 2702 (the quantization step width derived from the quantization information into the quantization transform coefficient 2715). Multiply). The inverse quantization unit 2703 inputs the restored transform coefficient 2716 to the inverse orthogonal transform unit 2704.
  • the inverse orthogonal transform unit 2704 performs inverse orthogonal transform corresponding to the orthogonal transform performed on the encoding side on the reconstructed transform coefficient 2716 from the inverse quantization unit 2703, and reconstructed prediction error (also referred to as a prediction difference signal). 2717 is obtained.
  • the inverse orthogonal transform unit 2704 inputs the restoration prediction error 2717 to the addition unit 2705.
  • the addition unit 2705 adds the restored prediction error 2717 and the corresponding predicted image 2722 to generate a decoded image 2718.
  • the decoded image 2718 is input to the reference image memory 2706.
  • the decoded image 2718 is then temporarily stored in the output buffer 2712 for the output image.
  • the decoded image 2718 temporarily stored in the output buffer 2712 is output to a display device system such as a display or a monitor (not shown) or a video device system according to the output timing managed by the decoding control unit 2713.
  • the decoded image signal 2718 stored in the reference image memory 2706 is used as a reference image 2719 by the intra unidirectional prediction image generation unit 2707, the intra bidirectional prediction image generation unit 2708, and the inter prediction image generation unit 2709 as a frame unit or as necessary. Referenced by field.
  • Inverse quantization unit 2703, inverse orthogonal transform unit 2704, addition unit 2705, reference image memory 2706, intra unidirectional prediction image generation unit 2707, intra bidirectional prediction image generation unit 2708, inter prediction image generation unit 2709, conversion information setting unit 2711 and the selection switch 2710 are the inverse quantization unit 104, the inverse orthogonal transform unit 105, the addition unit 106, the reference image memory 107, the intra unidirectional prediction image generation unit 108, the intra bidirectional prediction image generation unit 109, the inter
  • the predicted image generation unit 110, the conversion information setting unit 112, and the selection switch 111 are substantially the same or similar elements.
  • the intra unidirectional predicted image generation unit 2707 (108) performs unidirectional intra prediction using the reference image 2719 (124) stored in the reference image memory 2706 (107). For example, in H.264 / MPEG-4 AVC, pixel interpolation (copying or interpolation) is performed along a prediction direction such as a vertical direction or a horizontal direction using a decoded reference pixel line spatially adjacent to a prediction target block.
  • the intra prediction image is generated by performing processing (referring to filter processing or the like).
  • FIG. 4A shows a prediction direction of intra prediction in H.264 / MPEG-4 AVC.
  • FIG. 4B shows an arrangement relationship between reference pixel lines and encoding target pixels in H.264 / MPEG-4 AVC.
  • FIG. 4C shows a predicted image generation method in mode 1 (horizontal prediction), in which pixels I to L are copied in the prediction direction from the left reference pixel line.
  • FIG. 4D shows a predicted image generation method in mode 4 (diagonal lower right prediction). It is also possible to easily expand the prediction direction of H.264 / MPEG-4 AVC and increase the number of prediction modes. For example, the prediction mode is expanded to 34, the pixel position accuracy corresponding to the fractional position is determined as 32 pixel accuracy, and the prediction pixel value is created by performing linear interpolation (such as 3-tap filter processing). It is also possible.
  • FIG. 4C shows a predicted image generation method in mode 1 (horizontal prediction), in which pixels I to L are copied in the prediction direction from the left reference pixel line.
  • FIG. 4D shows a predicted image generation method in mode 4 (diagonal lower right prediction). It is also possible to easily expand the
  • FIG. 5 shows an example of the prediction angle and the prediction mode when the prediction mode is expanded up to 34 prediction modes.
  • FIG. 5 there are 33 different prediction directions for the vertical and horizontal coordinates indicated by the bold lines.
  • the direction of a typical prediction angle indicated by H.264 / MPEG-4 AVC is indicated by an arrow.
  • 33 types of prediction directions are prepared in a direction in which a line is drawn from the origin to a mark indicated by a circle.
  • DC prediction for prediction based on the average value of available reference pixels is added, and there are a total of 34 prediction modes.
  • IntraPredMode 4
  • IntraPredAngleIdL0 in FIGS. 7A and 7B 4
  • An arrow indicated by a dotted line in FIG. 5 indicates a prediction mode whose prediction type is Intra_Vertical
  • an arrow indicated by a solid line indicates a prediction mode whose prediction type is Intra_Horizontal.
  • FIG. 6 shows the relationship between IntraPredAngleIdLX and intraPredAngle used for predictive image value generation.
  • 7A and 7B show the relationship between the prediction mode (PredMode), the bidirectional prediction flag (BipredFlag), the prediction mode type (PredTypeL0, PredTypeL1), and the prediction angle (PredAngleIdL0, PredAngleIdL1).
  • IntraPredAngle indicates the prediction angle that is actually used when the predicted value is generated. For example, when a prediction value generation method in the case where the prediction type is Intra_Vertical and the intraPredAngle shown in FIGS. 7A and 7B is a positive value is expressed by a mathematical expression, it is expressed by the mathematical expression (1).
  • BLK_SIZE indicates the size of the pixel block
  • ref [] indicates an array in which a reference image (also referred to as a reference pixel line) is stored.
  • pred (k, m) indicates the generated predicted image 125.
  • a predicted value can be generated by a similar method according to the tables of FIGS. 7A and 7B.
  • the intra bidirectional prediction image generation unit 2708 (109) performs bidirectional intra prediction using the reference image 2719 (124) stored in the reference image memory 2706 (107). For example, in Non-Patent Document 1 described above, after selecting two types of prediction modes from nine types of prediction modes defined in H.264 / MPEG-4 AVC and generating respective prediction image signals, The predicted image signal is generated by performing the filtering process every time.
  • Bidirectional prediction when the number of unidirectional prediction modes is expanded to 34 types will be described more specifically with reference to FIG.
  • the maximum number of modes is not limited, and bi-directional prediction can be easily expanded in any number of uni-directional predictions.
  • the intra bidirectional prediction image generation unit 109 (2708) illustrated in FIG. 8 holds a weighted average unit 801, a first unidirectional intra prediction image generation unit 802, and a second unidirectional intra prediction image generation unit 803. .
  • the functions of the first unidirectional intra predicted image generation unit 802 and the second unidirectional intra predicted image generation unit 803 are the same. These may be the same as the intra unidirectional predicted image generation unit 108. In this case, since the three processing units can have the same hardware configuration, the circuit scale can be reduced.
  • the first prediction image 851 is output from the first unidirectional intra prediction image generation unit 802, and the second prediction image 852 is output from the second unidirectional intra prediction image generation unit 803.
  • Each predicted image is input to the weighted average unit 801, and a weighted average process is performed.
  • a weighted average process is performed.
  • calculation based on Expression (2) is performed.
  • the bidirectionally predicted image P [x, y] is expressed by Equation (2).
  • Bidirectional intra prediction indicates that the BipedFlag shown in FIGS. 7A and 7B is 1.
  • two prediction mode types are defined, the prediction mode type corresponding to the first unidirectional intra prediction image generation unit 802 is PredTypeL0, and the prediction mode corresponding to the second unidirectional intra prediction image generation unit 803 is PredTypeL1. It is shown in The same applies to PredAngleIdLX, and the type and angle of each prediction mode are expressed by whether the X portion is 0 or 1.
  • the inter prediction image generation unit 2709 (110) in FIG. 27 performs inter prediction using the reference image 2719 (124) stored in the reference image memory 2706 (107). Specifically, the inter prediction unit 2709 (110) performs interpolating processing (motion compensation) based on the amount of motion shift (motion vector) between the prediction target block and the reference image 2719 (124) to perform inter prediction. Generate an image. In H.264 / MPEG-4 AVC, interpolation processing up to 1 ⁇ 4 pixel accuracy is possible.
  • the derived motion vector is decoded by the entropy decoding unit 2702 as a part of the prediction information 2721 (126).
  • the prediction selection switch 2710 (111) is an output terminal of the intra unidirectional prediction image generation unit 2707 (108), an output terminal of the intra bidirectional prediction image generation unit 2708 (109), or the inter prediction image generation unit 2709 (110).
  • the output end is selected according to the prediction information 2721 (126) output from the entropy decoding unit 2702, and the intra prediction image or the inter prediction image is input to the addition unit 2705 (106) as the prediction image 2722 (125).
  • the prediction selection switch 2710 (111) causes the intra unidirectional prediction image generation unit 2707 (108) or both intra according to the prediction mode shown in FIGS. 7A and 7B.
  • a switch is connected to the output terminal from the direction prediction image generation unit 2708 (109).
  • the prediction selection switch 2710 (111) connects the switch to the output terminal from the inter prediction unit 2709 (110).
  • the prediction selection unit 2714 controls the output terminal of the switch to the prediction selection switch 2710 based on the prediction information 2721 sent from the entropy decoding unit 2702.
  • intra prediction or inter prediction can be selected to generate the predicted image 2722, but a plurality of modes are defined for each of intra prediction and inter prediction.
  • One prediction mode is input as prediction information 2721 from these.
  • substantially two prediction modes are selected as shown in FIGS. 11A and 11B.
  • the inverse orthogonal transform unit 2704 (105) includes a selection switch A 1201, a vertical inverse transform unit 1206, a transposition unit 1204, a selection switch B 1205, and a horizontal inverse transform unit 1207.
  • the vertical inverse transform unit 1206 includes a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform unit 1203.
  • the horizontal inverse transform unit 1207 includes a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform unit 1203. Note that the order of the vertical inverse transform unit 1206 and the horizontal inverse transform unit 1207 is an example, and these may be reversed.
  • the two 1D inverse discrete cosine transform units 1202 shown in FIG. 12 can also be realized by using physically identical hardware in a time division manner. The same applies to the 1D inverse discrete sine transform unit 1203.
  • the selection switch A 1201 converts the restored transform coefficient 121 of the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 according to the vertical transform index (Vertical_transform_idx) included in the 1D transform index 1252 output from the 1D transform setting unit 1208 Lead to one of them.
  • the 1D inverse discrete cosine transform unit 1202 multiplies the input restoration transform coefficient 121 (matrix format) by a transposed matrix of the discrete cosine transform matrix and outputs the result.
  • the 1D inverse discrete sine transform unit 1203 multiplies the input restoration transform coefficient 121 by the transposed matrix of the discrete sine transform matrix and outputs the result.
  • the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 perform one-dimensional inverse orthogonal transform represented by Expression (9).
  • Equation (9) a Z 'represents a matrix of restoring conversion coefficient 121 (N ⁇ N), V T is the transpose matrix of 1D inverse discrete cosine transform matrix and 1D inverse discrete sine transform matrix (both N ⁇ N) Y ′ indicates an output matrix (N ⁇ N) of the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203. That, V T is the discrete cosine transform matrix in Equation (6), or a discrete sine transform matrix equation (7) corresponds, respectively.
  • the transposition unit 1204 transposes the output matrix (Y ′) of the vertical inverse transform unit 1206 and supplies the transposition to the selection switch B 1205.
  • the transposition unit 1204 is an example, and corresponding hardware may not necessarily be prepared.
  • 1D inverse orthogonal transform by the vertical inverse transform unit 1206 is executed (each element of the output matrix of the vertical inverse transform unit 1206) is held, and 1D inverse orthogonal transform is performed by the horizontal inverse transform unit 1207 If read in an appropriate order, transposition of the output matrix (Y ′) can be executed without preparing hardware corresponding to the transposition unit 1204.
  • the selection switch B 1205 converts the input matrix from the transposition unit 1204 into a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform according to a horizontal transformation index (Horizontal_transform_idx) included in the 1D transformation index 1252 output from the 1D transformation setting unit 1208. Lead to one of the sections 1203.
  • the 1D inverse discrete cosine transform unit 1202 performs 1D inverse discrete cosine transform on the input matrix and outputs the result.
  • the 1D inverse discrete sine transform unit 1203 performs 1D inverse discrete sine transform on the input matrix and outputs the result.
  • the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 perform one-dimensional inverse orthogonal transform represented by Expression (10).
  • H T is 1D are generically indicates a transposed matrix of the discrete cosine transform matrix and 1D discrete sine transform matrix (both N ⁇ N), X 'is 1D inverse discrete cosine transform unit 1202 and 1D An output matrix (N ⁇ N) of the inverse discrete sine transform unit 1203 is shown, which indicates the restored prediction error 122. That, H T is the discrete cosine transform matrix in Equation (6), or a discrete sine transform matrix equation (7) corresponds, respectively.
  • the inverse orthogonal transform unit 105 performs inverse orthogonal transform on the reconstructed transform coefficient (matrix) 2716 (121) according to the input orthogonal transform information 2723 (127), and reconstructed prediction error (matrix) 2717. (122) is generated.
  • the 1D inverse discrete cosine transform unit 1202 may be replaced with an inverse discrete cosine transform of H.264 / MPEG-4 AVC by reusing the existing inverse orthogonal transform.
  • the inverse orthogonal transform unit 2704 (105) may realize various inverse orthogonal transforms such as Hadamard transform and Karhunen-Loeve transform. In any case, an inverse orthogonal transform corresponding to the orthogonal transform unit 102 of the image encoding device 100 shown in FIG. 1 may be selected.
  • the 1D conversion setting unit 1208 based on the orthogonal conversion information 2723 (127), a 1D conversion index for selecting a conversion matrix used for vertical orthogonal conversion and vertical inverse orthogonal conversion, horizontal orthogonal conversion and horizontal reverse It has a function of setting a 1D transform index for selecting a transform matrix used for orthogonal transform.
  • the 1D transform index 1252 directly or indirectly indicates the orthogonal transform selected by the vertical orthogonal transform and the horizontal orthogonal transform, respectively.
  • the 1D transform index 1252 can be expressed by a transform index (TransformIdx) shown in FIG. 13A and a 1D orthogonal transform in the vertical or horizontal direction (Vertical_transform_idx and Horizontal_transform_idx, respectively).
  • a 1D transformation index (Vertical_transform_idx) for a vertical transformation unit and a 1D transformation index (Horizontal_transform_idx) for a horizontal transformation unit can be derived from the transformation index.
  • FIG. 13B shows whether each idx indicates discrete cosine transform or discrete sine transform.
  • idx When idx is “1”, it indicates a discrete sine transform matrix (DST), and when it is “0”, it indicates a discrete cosine transform matrix (DCT).
  • DST discrete sine transform matrix
  • DCT discrete cosine transform matrix
  • the corresponding 1D transform index 1252 is referenced based on TransformIdx included in the orthogonal transform information 127, and Vertical_transform_idx is output to the selection switch A and Horizontal_transform_idx is output to the selection switch B.
  • the selection switch connects the output end to the 1D inverse discrete cosine transform unit 1202 (or 1D discrete cosine transform unit 902).
  • the selection switch When Vertical_transform_idx or Horizontal_transform_idx indicates DST with reference to FIG. 13B, the selection switch connects the output end to the 1D inverse discrete sine transform unit 1203 (or 1D discrete sine transform unit 903).
  • the orthogonal transform information indirectly and directly indicates a transform index corresponding to the selected prediction mode with reference to a predetermined transform index and prediction mode map.
  • 11A and 11B show the relationship between the prediction mode and the conversion index.
  • 11A and 11B are obtained by adding TransformIdx to the intra prediction mode shown in FIGS. 7A and 7B. From this table, TransformIdx can be derived according to the selected prediction mode.
  • Intra_DC indicates DC prediction that is predicted by the average value of available reference pixels.
  • the prediction error of DC prediction the directional error as described above does not occur statistically, so the DCT used in H.264 / MPEG-4 AVC is selected.
  • the tendency of the prediction error changes according to the prediction direction of the other prediction modes. Therefore, in such a case, it is possible to efficiently reduce the redundancy of the prediction error by setting TransformIdx determined in the other prediction mode. For example, as illustrated in FIGS.
  • FIG. 15 illustrates a syntax 1500 used by the video decoding apparatus in FIG.
  • the syntax 1500 includes three parts: a high level syntax 1501, a slice level syntax 1502, and a coding tree level syntax 1503.
  • the high level syntax 1501 includes syntax information of a layer higher than the slice.
  • a slice refers to a rectangular area or a continuous area included in a frame or a field.
  • the slice level syntax 1502 includes information necessary for decoding each slice.
  • Coding tree level syntax 1503 includes information necessary to decode each coding tree (ie, each coding tree block). Each of these parts includes more detailed syntax.
  • the high level syntax 1501 includes sequence and picture level syntaxes such as a sequence parameter set syntax 1504 and a picture parameter set syntax 1505.
  • the slice level syntax 1502 includes a slice header syntax 1506, a slice data syntax 1507, and the like.
  • the coding tree level syntax 1503 includes a coding tree block syntax 1508, a prediction unit syntax 1509, and the like.
  • the coding tree block syntax 1508 can have a quadtree structure. Specifically, the coding tree block syntax 1508 can be recursively called as a syntax element of the coding tree block syntax 1508. That is, one coding tree block can be subdivided with a quadtree. Also, the coding tree block syntax 1508 includes a transform unit syntax 1510. The transform unit syntax 1510 is invoked at each coding tree block syntax 1508 at the extreme end of the quadtree. The transform unit syntax 1510 describes information related to inverse orthogonal transformation and quantization.
  • the transform unit syntax 1510 can have a quadtree structure. Specifically, the transform unit syntax 1510 can be further recursively called as a syntax element of the transform unit syntax 1510. That is, one transform unit can be subdivided with a quadtree.
  • FIG. 16 illustrates a slice header syntax 1506 according to the present embodiment.
  • the slice_bipred_intra_flag illustrated in FIG. 16 is a syntax element indicating, for example, the validity / invalidity of bidirectional intra prediction according to the present embodiment for the slice.
  • the prediction selection switch 2710 does not connect the output terminal of the switch to the intra bidirectional prediction image generation unit 2708 (109).
  • BipedFlag [] in FIGS. 7A and 7B, FIG. 11A and FIG. 11B is 0, or intra prediction defined in H.264 / MPEG-4 AVC may be performed. Absent.
  • slice_bipred_intra_flag 1
  • the bidirectional intra prediction according to the present embodiment is valid in the entire area of the slice.
  • slice_bipred_intra_flag 1
  • the prediction validity / Invalidity may be specified.
  • the slice_directional_transform_intra_flag shown in FIG. 16 is a syntax element indicating the validity / invalidity of the inverse discrete sine transform according to the present embodiment with respect to the slice, for example.
  • the transformation information setting unit 2711 (112) always sets TransformIdx to 3 and outputs it.
  • the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
  • slice_directional_transform_intra_flag is 1, the inverse discrete sine transform according to the present embodiment is valid over the entire area in the slice.
  • slice_directional_transform_intra_flag 1
  • the inverse discrete sine transform according to the present embodiment for each local region in the slice in the syntax of a lower layer (coding tree block, transform unit, etc.)
  • the validity / invalidity may be defined.
  • FIG. 17 illustrates the coding tree block syntax 1508 according to the present embodiment.
  • Ctb_directional_transform_flag shown in FIG. 17 is a syntax element indicating validity / invalidity of the inverse discrete sine transform according to this embodiment with respect to the coding tree block.
  • pred_mode shown in FIG. 17 is one of syntax elements included in the prediction unit syntax 1509, and indicates the coding type in the coding tree block or macroblock. MODE_INTRA indicates that the encoding type is intra prediction.
  • ctb_directional_transform_flag is encoded only when the above-described slice_directional_transform_flag is 1 and the encoding type of the coding tree block is intra prediction.
  • CBP indicates Coded_Block_Pattern information, and is information indicating whether or not there is a transform coefficient in the coding tree block. If the information is 0, it indicates that there is no transform coefficient, and the decoder does not need to perform inverse transform processing, so ctb_directional_transform_flag is not decoded.
  • the transformation information setting unit 2711 (112) always sets TransformIdx to 3 and outputs it.
  • the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
  • ctb_directional_transform_flag is 1, the inverse discrete sine transform according to the present embodiment is valid in the coding tree block.
  • the coding tree block syntax 1508 encodes a flag that defines the validity / invalidity of the inverse discrete sine transform according to the present embodiment, so that each local region (ie, coding tree block) is encoded.
  • Optimal inverse orthogonal transform can be performed.
  • FIG. 18 illustrates a transform unit syntax 1510 according to this embodiment.
  • the tu_directional_transform_flag shown in FIG. 18 is a syntax element indicating validity / invalidity of the inverse discrete sine transform according to this embodiment with respect to the transform unit.
  • pred_mode shown in FIG. 18 is one of syntax elements included in the prediction unit syntax 1509, and indicates the coding type in the coding tree block or macroblock. MODE_INTRA indicates that the encoding type is intra prediction.
  • tu_directional_transform_flag is encoded only when slice_directional_transform_flag is 1 and the encoding type of the coding tree block is intra prediction.
  • coded_block_flag is 1-bit information indicating whether or not there is a transform coefficient in the transform unit. If the information is 0, it indicates that there is no transform coefficient, and the decoder does not need to perform inverse transform processing, so tu_directional_transform_flag is not decoded.
  • the transformation information setting unit 2711 (112) always sets TransformIdx to 3 and outputs it.
  • the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
  • tu_directional_transform_flag 1, the inverse discrete sine transform according to the present embodiment is valid in the coding tree block.
  • each local region ie, transform unit
  • FIG. 19 shows an example of the prediction unit syntax.
  • Pred_mode in FIG. 19 indicates the prediction type of the prediction unit.
  • MODE_INTRA indicates that the prediction type is intra prediction.
  • intra_split_flag is a flag indicating whether or not the prediction unit is further divided into four prediction units.
  • intra_split_flag is 1, a prediction unit is a prediction unit obtained by dividing the prediction unit into four in half in the vertical and horizontal sizes.
  • intra_split_flag is 0, the prediction unit is not divided.
  • Intra_luma_bipred_flag [i] is a flag indicating whether the prediction mode IntraPredMode applied to the prediction unit is a unidirectional intra prediction mode or a bidirectional intra prediction mode. i indicates the position of the divided prediction unit. When the intra_split_flag is 0, 0 is set, and when the intra_split_flag is 1, 0 to 3 are set. In the flag, the value of IntraBipredFlag of the prediction unit shown in FIGS. 9, 12, 13A, and 13B is set.
  • intra_luma_bipred_flag [i] When intra_luma_bipred_flag [i] is 1, this indicates that the prediction unit is bi-directional intra prediction, and is information that identifies the bi-directional intra prediction mode used from among the prepared bi-directional intra prediction modes.
  • intra_luma_bipred_mode [i] may be decoded in equal length according to the bidirectional intra prediction mode number IntraBipredNum shown in FIGS. 7A and 7B, FIG. 11A and FIG. 11B, or may be decoded using a predetermined code table. good.
  • intra_luma_bipred_flag [i] When intra_luma_bipred_flag [i] is 0, it indicates that the prediction unit is unidirectional intra prediction, and predictive decoding is performed from adjacent blocks.
  • Prev_intra_luma_unipred_idx [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. Details of the calculation method of MostProbableMode will be described later. When prev_intra_luma_unipred_idx [i] is not 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal.
  • prev_intra_luma_unipred_idx [i] When prev_intra_luma_unipred_idx [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_luma_unipred_mode [i] that specifies which intra prediction mode IntraPredMode is other than MostProbableMode is decoded.
  • rem_intra_luma_unipred_mode [i] may be decoded in equal length according to the bidirectional intra prediction mode number IntraPredModeNum shown in FIGS. 7A and 7B, FIG. 11A and FIG. 11B, or may be decoded using a predetermined code table. good. From intra prediction mode IntraPredMode, rem_intra_luma_unipred_mode [i] is calculated using Equation (11).
  • numCand indicates the number of candidates for MostProbableMode
  • candModeList [cIdx] indicates the MostProbableMode that is actually a candidate.
  • numCand is set to 2
  • the candidate MostProbableMode is set to IntraPredMode of pixel blocks positioned on the upper and left sides that have already been predicted and are adjacent to the prediction target block.
  • candModeList [0] is indicated as MPM_L0
  • candModeList [1] is indicated as MPM_L1.
  • prev_intra_luma_unipred_idx [i] a prediction mode of MPM_L0 is derived, and when prev_intra_luma_unipred_idx [i] is 2, a prediction mode of MPM_L1 is derived.
  • candModeList [cIdx] may be in the same prediction mode.
  • the redundant prediction mode is omitted and expressed as shown in Expression (11).
  • an optimum code table may be created in consideration of the maximum number of these prediction modes.
  • numCand is 1, MostProbableMode is calculated according to Equation (12).
  • Min (x, y) is a parameter that outputs the smaller of input x and y.
  • IntraPredModeA and IntraPredModeB indicate the intra prediction modes of prediction units adjacent to the left and above the encoded prediction unit.
  • syntax elements not defined in this embodiment may be inserted between the lines of the syntax tables illustrated in FIGS. 16, 17, 18 and 19, and other conditional branch descriptions are included. It may be. Further, the syntax table may be divided into a plurality of tables, or a plurality of syntax tables may be integrated. Moreover, the term of each illustrated syntax element can be changed arbitrarily.
  • the image coding apparatus when using two reference pixel lines having different prediction directions, has a different prediction error tendency from either of the two prediction directions, and follows one prediction mode.
  • orthogonal transform is selected, the problem that the coding efficiency is lowered without taking advantage of the tendency of intra prediction in which the prediction accuracy is lowered as the distance between the reference pixel and the prediction pixel is increased is solved.
  • This image encoding apparatus classifies the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-described tendency, and adaptively performs 1D discrete cosine transform or 1D discrete sine transform for each of the vertical direction and horizontal direction. Apply.
  • the coefficient density is higher than that of the 1D discrete cosine transform. Therefore, according to the image decoding apparatus according to the present embodiment, high conversion efficiency is stably achieved as compared with a case where fixed orthogonal transformation such as DCT is uniformly applied to each prediction mode.
  • the inverse orthogonal transform unit 105 is suitable for both hardware implementation and software implementation. The above is the description of the image encoding device according to the third embodiment.
  • the fourth embodiment relates to a moving picture decoding apparatus for decoding encoded data encoded by a second moving picture decoding apparatus. That is, the moving picture decoding apparatus according to the present embodiment decodes encoded data generated by, for example, the image encoding apparatus according to the second embodiment.
  • the moving picture decoding apparatus includes the moving picture decoding apparatus according to the third embodiment described above, an intra unidirectional prediction image generation unit 2707 (108), and an intra bidirectional prediction image generation unit 2708 ( 109) in detail.
  • an intra unidirectional prediction image generation unit 2707 108
  • an intra bidirectional prediction image generation unit 2708 109 in detail.
  • the same parts as those in the third embodiment are denoted by the same reference numerals, and different parts will be mainly described.
  • FIG. 28 is a block diagram of a moving image decoding apparatus 2800 according to the fourth embodiment of the present invention.
  • a prediction direction deriving unit 2801 (2001) is newly added and prediction direction deriving information 2851 (2051) from the prediction direction deriving unit 2801 (2001) to the prediction selection switch 2710 (111). This is the output point.
  • the intra unidirectional prediction image generation unit 2707 (108) and the intra bidirectional prediction image generation unit 2708 (109) are extended to 128 directions. Specifically, it means that the angle gradient of 180 degrees used for direction prediction is divided into 128 pieces, and a prediction direction is assigned every 1.4 degrees.
  • the prediction modes of the unidirectional prediction described in the third embodiment are the same as those in FIGS. 7A and 7B and FIGS. 11A and 11B. Since the other configuration is the same as that of the first embodiment, description thereof is omitted.
  • intra prediction performed using the prediction direction deriving unit 2801 (2001) is referred to as a prediction direction deriving mode.
  • the reference image 2719 (124) output from the reference image memory 2706 (107) is input to the prediction direction deriving unit 2801 (2001).
  • the prediction direction deriving unit 2801 (2001) has a function of analyzing the input reference image 2719 (124) and generating prediction direction deriving information 2851 (2051).
  • the prediction direction deriving unit 2801 (2001) will be described with reference to FIG. As shown in FIG. 21, the prediction direction deriving unit 2801 (2001) includes a left reference pixel line edge deriving unit 2101, an upper reference pixel line edge deriving unit 2102, and a prediction direction deriving information generating unit 2103.
  • the left reference pixel line edge deriving unit 2101 has a function of performing edge detection processing on a reference pixel line located to the left of the prediction target pixel block and deriving an edge direction.
  • the upper reference pixel line edge deriving unit 2102 has a function of performing edge detection processing on a reference pixel line located above the prediction target pixel block and deriving an edge direction.
  • FIG. 22 shows an example of pixels used for the derivation of the left reference pixel line edge deriving unit 2101 and the upper reference pixel line edge deriving unit 2102.
  • the left reference pixel line edge deriving unit 2101 uses two lines indicated by diagonal lines from the upper right to the lower left located on the left side of the prediction target pixel block.
  • the upper reference pixel line edge deriving unit 2102 uses two lines indicated by diagonal lines from the upper left to the lower right located above the prediction target pixel block. In the present embodiment of the present invention, two lines have been described, but one line or three lines may be used, and more lines may be used. In the drawing, an example in which the edge direction is derived using the left reference pixel line is shown as A, and an example in which the edge direction is derived using the upper reference pixel line is shown as B.
  • both processing units perform edge intensity detection using an operator as shown in Equation (13).
  • Gx indicates the edge strength in the horizontal direction (x coordinate system), and indicates the edge strength in Gy (y coordinate system).
  • any operator such as a Sobel operator, a Prewitt operator, or a Kirsch operator may be used as the edge detection operator.
  • Equation (13) When the operator of Equation (13) is applied to the reference pixel line, an edge direction vector is derived for each pixel. Equation (14) is used to derive the optimum edge direction from these edge vectors.
  • ⁇ a, b> represents the inner product of two vectors.
  • the unit vector and edge strength (direction vector) are respectively expressed by the following equations.
  • the representative edge angle can be calculated by optimizing Equation (13) using Equation (15).
  • the edge strength of the following expression of each pixel line derived by the left reference pixel line edge deriving unit 2101 and the upper reference pixel line edge deriving unit 2102 is input to the prediction direction deriving information generating unit 2103.
  • the prediction direction derivation information generation unit 2103 calculates Equations (14) and (15) using all the input edge strengths, and derives a unidirectional representative edge angle.
  • both the expression edge (14) and the expression (15) are separately calculated with respect to the two representative edge angles of the left reference pixel line and the upper reference pixel line, and both have two representative edge angles.
  • the direction representative edge angle is derived.
  • the prediction direction derivation information generation unit 2103 derives a plurality of peripheral unidirectional representative edge angles that are angularly adjacent, starting from the unidirectional representative edge angle. For example, it is assumed that there are 128 types of edge angles and they are arranged in the order of angles.
  • the representative edge angle is RDM
  • the peripheral unidirectional representative edge angles are expressed as RDM-1, RDM + 1, RDM-2, RDM + 2,.
  • the peripheral unidirectional representative edge angle is 10 (for example, ⁇ 5).
  • FIG. 23 shows an example of the prediction direction derivation information 2851 (2051).
  • the unidirectional representative edge angle is indicated by RDM
  • the representative edge angle of the left reference pixel line of the bidirectional representative edge angle is indicated by RDM_L0
  • the representative edge angle of the upper reference pixel line of the bidirectional representative edge angle is It is indicated by RDM_L1.
  • RDMPredMode indicates the prediction mode derived by the prediction direction deriving unit 2801 (2001) in the present embodiment of the present invention.
  • RDMBipredFlag indicates whether the prediction mode derived by the prediction direction deriving unit 2801 (2001) in the present embodiment of the present invention is bidirectional prediction.
  • RDMPredAngleIdL0 and RDMPredAngleIdL1 indicate which prediction angle the prediction mode derived by the prediction direction deriving unit 2801 (2001) in the present embodiment of the present invention indicates.
  • the prediction direction derivation information 2851 (2051) includes two representative edge angles included in the unidirectional representative edge angle and the bidirectional representative edge angle, in addition to FIG. The relationship between these prediction modes and TransformIdx will be described later.
  • the prediction direction derivation information 2851 (2051) generated by the prediction direction derivation unit 2801 (2001) is input to the prediction selection switch 2710 (111).
  • a prediction image 125 is generated by the intra unidirectional prediction image generation unit 2707 (108) or the intra bidirectional prediction image generation unit 2708 (109) according to the prediction mode selected here.
  • These predicted image generation units are the same as those in the first embodiment except that the number of predicted angles is expanded to 128. For example, when RDMPredMode is 1, the first predicted image signal 851 and the second predicted image signal 852 in FIG. 8 are generated at two unidirectional representative edge angles included in the bidirectional representative edge angle, and the weighted average An average process is performed in the unit 801, and a predicted image 2722 (125) is output.
  • the prediction selection unit 2714 controls the output terminal of the prediction selection switch 2710 based on the prediction information 2721 sent from the entropy decoding unit 2702 and the prediction direction derivation information 2851 input from the prediction direction derivation unit 2801.
  • intra prediction or inter prediction can be selected to generate the predicted image 2722, but a plurality of modes are defined for each of intra prediction and inter prediction.
  • One prediction mode is input as prediction information 2721 from these.
  • substantially two prediction modes are selected as shown in FIGS. 11A and 11B.
  • TransformIdx is selected in units of coding tree blocks (or the first prediction unit included in the coding tree block). For example, assume that the N ⁇ N pixel block 0 shown in FIG. 2C is a prediction unit, and that a 2N ⁇ 2N pixel block is a coding tree block.
  • TransformIdx is selected using the information of the reference pixel line derived here. .
  • TransformIdx [0] for following the TransformIdx of the head prediction unit is specified regardless of each prediction mode.
  • TransformIdx when the prediction mode described in FIG. 23 is selected in advance may be determined. For example, it is possible to easily set TransformIdx to 0 in order to reduce the process of deriving the predicted angle.
  • FIG. 24 illustrates a slice header syntax 1506 according to this embodiment.
  • the slice_derived_direction_intra_flag illustrated in FIG. 24 is a syntax element indicating, for example, the validity / invalidity of the prediction direction deriving method according to the present embodiment for the slice.
  • the prediction selection switch 2710 connects the output terminal of the switch according to the first embodiment of the present invention.
  • slice_derived_direction_intra_flag 1
  • the prediction direction derivation mode according to the present embodiment is valid over the entire area in the slice.
  • the prediction direction derivation method is 1, the prediction according to the present embodiment is performed for each local region in the slice in the syntax of a lower layer (coding tree block, transform unit, etc.).
  • the validity / invalidity of the direction derivation mode may be defined.
  • FIG. 25A shows an example of the prediction unit syntax.
  • intra_derived_direction_flag [i] is a flag indicating whether the prediction mode IntraPredMode applied to the prediction unit is the first embodiment shown in FIGS. 11A and 11B or the fourth embodiment shown in FIG. is there. i indicates the position of the divided prediction unit.
  • intra_split_flag is 0, 0 is set, and when the intra_split_flag is 1, 0 to 3 are set.
  • intra_direction_mode [i] which is information identifying the used intra prediction mode, is encoded from among the prepared prediction modes. As shown in FIG. 23, in this mode, a bidirectional intra prediction mode and a unidirectional intra prediction are mixedly expressed. These prediction modes can be expressed as separate syntax elements and encoded.
  • intra_direction_mode [i] is described as an example corresponding to RDMPredMode, but the prediction mode expression method may be changed based on RDMPredAngleIdL0.
  • the prediction mode is expressed by dividing it into two types of syntax elements: a 1-bit flag indicating a sign (+/ ⁇ ) and an index indicating a change. It is also possible. In this case, a new flag indicating whether or not bidirectional intra prediction is used may be prepared.
  • intra_direction_mode [i] may be decoded with an equal length according to the number of prediction modes, or may be decoded using a predetermined code table. When intra_direction_mode [i] is 0, it indicates that the prediction unit does not use the prediction direction deriving method according to the present embodiment of the present invention, and decoding is performed according to the method described in the first embodiment.
  • FIG. 25B shows an example of the prediction unit syntax as another embodiment of the present invention.
  • intra_direction_mode [i] is expressed by being divided into prev_intra_direction_mode [i] and rem_intra_direction_mode [i]. These syntax elements introduce the prediction between prediction modes similarly to Formula (11) or (12).
  • prev_intra_direction_mode [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. When prev_intra_direction_mode [i] is 1, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal.
  • prev_intra_direction_mode [i] When prev_intra_direction_mode [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_direction_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is decoded.
  • the rem_intra_direction_mode [i] may be decoded in equal length according to the number of prediction modes, or may be decoded using a predetermined code table.
  • FIG. 25C An example of the prediction unit syntax is shown in FIG. 25C as another embodiment of the present invention.
  • PredMode described in the first embodiment and PredMode described in the second embodiment are integrated and expressed as one PredMode table.
  • PredMode in this case is shown in FIGS. 26A, 26B, and 26C.
  • These syntax elements introduce the prediction between prediction modes similarly to Formula (11) or (12).
  • prev_intra_luma_unipred_idx [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same.
  • prev_intra_luma_unipred_idx [i] When prev_intra_luma_unipred_idx [i] is 1, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal. When prev_intra_luma_unipred_idx [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_luma_unipred_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is decoded.
  • the rem_intra_luma_unipred_mode [i] may be decoded in the same length according to the number of prediction modes, or may be decoded using a predetermined code table.
  • encoding and decoding may be performed sequentially from the upper right to the lower left, or encoding and decoding may be performed so as to draw a spiral from the screen end toward the center of the screen.
  • the position of the adjacent pixel block that can be referred to changes depending on the encoding order, the position may be changed to a usable position as appropriate.
  • the prediction target block is a uniform block. It does not have to be a shape.
  • the prediction target block size may be a 16 ⁇ 8 pixel block, an 8 ⁇ 16 pixel block, an 8 ⁇ 4 pixel block, a 4 ⁇ 8 pixel block, or the like.
  • the code amount for encoding or decoding the division information increases with the increase in the number of divisions. Therefore, it is desirable to select the block size in consideration of the balance between the code amount of the division information and the quality of the locally decoded image or the decoded image.
  • the color signal component has been described without distinguishing between the prediction process for the luminance signal and the color difference signal.
  • the same or different prediction methods may be used. If different prediction methods are used between the luminance signal and the chrominance signal, the prediction method selected for the chrominance signal can be encoded or decoded in the same manner as the luminance signal.
  • the color signal component is described without distinguishing between the orthogonal transformation process and the inverse orthogonal transformation process for the luminance signal and the color difference signal.
  • the orthogonal transformation process is different between the luminance signal and the color difference signal, the same or different orthogonal transformation methods may be used. If different orthogonal transformation methods are used between the luminance signal and the color difference signal, the orthogonal transformation method selected for the color difference signal can be encoded or decoded in the same manner as the luminance signal.
  • syntax elements that are not defined in the present invention can be inserted between the rows of the table shown in the syntax configuration, and descriptions relating to other conditional branches are included. It does not matter.
  • the syntax table can be divided and integrated into a plurality of tables. Moreover, it is not always necessary to use the same term, and it may be arbitrarily changed depending on the form to be used.
  • each embodiment realizes high-efficiency intra prediction and corresponding high-efficiency orthogonal transform and inverse orthogonal transform while alleviating the difficulty in hardware implementation and software implementation. Therefore, according to each embodiment, the encoding efficiency is improved, and the subjective image quality is also improved.
  • the storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk (CD-ROM, CD-R, DVD, etc.), magneto-optical disk (MO, etc.), semiconductor memory, etc.
  • the storage format may be any form.
  • the program for realizing the processing of each of the above embodiments may be stored on a computer (server) connected to a network such as the Internet and downloaded to the computer (client) via the network.
  • the instructions shown in the processing procedure shown in the above embodiment can be executed based on a program that is software.
  • a general-purpose computer system stores this program in advance, and by reading this program, it is also possible to obtain the same effects as those obtained by the video encoding device and video decoding device of the above-described embodiment. is there.
  • the instructions described in the above-described embodiments are, as programs that can be executed by a computer, magnetic disks (flexible disks, hard disks, etc.), optical disks (CD-ROM, CD-R, CD-RW, DVD-ROM, DVD). ⁇ R, DVD ⁇ RW, etc.), semiconductor memory, or a similar recording medium. As long as the recording medium is readable by the computer or the embedded system, the storage format may be any form.
  • the computer reads the program from the recording medium and causes the CPU to execute instructions described in the program based on the program
  • the computer is similar to the video encoding device and video decoding device of the above-described embodiment. Operation can be realized.
  • the computer acquires or reads the program, it may be acquired or read through a network.
  • the OS operating system
  • database management software database management software
  • MW middleware
  • a part of each process for performing may be executed.
  • the recording medium in the present invention is not limited to a medium independent of a computer or an embedded system, but also includes a recording medium in which a program transmitted via a LAN or the Internet is downloaded and stored or temporarily stored.
  • the program for realizing the processing of each of the above embodiments may be stored on a computer (server) connected to a network such as the Internet and downloaded to the computer (client) via the network.
  • the number of recording media is not limited to one, and when the processing in the present embodiment is executed from a plurality of media, it is included in the recording media in the present invention, and the configuration of the media may be any configuration.
  • the computer or the embedded system in the present invention is for executing each process in the present embodiment based on a program stored in a recording medium, and includes a single device such as a personal computer or a microcomputer, Any configuration such as a system in which apparatuses are connected to a network may be used.
  • the computer in the embodiment of the present invention is not limited to a personal computer, but includes an arithmetic processing device, a microcomputer, and the like included in an information processing device, and a device capable of realizing the functions in the embodiment of the present invention by a program, The device is a general term.
  • Restored transformation coefficient 122 ... Restored prediction error, 123 ... Restored image, 124 ... see Image, 125 ... Predictive image, 126 ... Prediction information, 127 ... Conversion information, 128 ... Encoded data, 801 ... Weighted average part, 802 ... First Direction intra predicted image generation unit, 803 ... second unidirectional intra predicted image generation unit, 851 ... first predicted image, 852 ... second predicted image, 901, 1201 ... selection switch A, 902 ... 1D discrete cosine transform unit, 903 ... 1D discrete sine transform unit, 904 ... transpose unit, 905, 1205 ... selection switch B, 906 ... vertical transform unit, 907 ...
  • Prediction direction derivation information 2715: Quantization transform coefficient (sequence), 2716: Restoration transform coefficient, 2717 ... Restoration prediction error, 2718 ... Decoded image, 2719 ... Reference image, 2721 ... Prediction information, 2722 ... Predicted image, 2724 ... Decoding Image, 2725 ... encoded data.

Abstract

In a video encoding method according to an embodiment, a combination of one-dimensional transformations, comprising first orthogonal transformations only, is selected when intra prediction is being performed in which two or more prediction modes use one or more reference pixel lines; and a combination of first orthogonal transformations and second orthogonal transformations is selected when intra prediction is being performed in which each of the two or more prediction modes uses one and the same reference pixel line. A prediction image signal is generated using the two or more prediction modes. Two-dimensional transformation is performed on a prediction differential signal derived from the prediction image signal, using the selected combination of the one-dimensional transformations to generate a transformation coefficient. The transformation coefficient and the prediction information representing the combination of two or more prediction modes are encoded.

Description

動画像符号化方法、動画像復号化方法及び装置Video encoding method, video decoding method and apparatus
 本発明の実施形態は、動画像の符号化及び復号化における画面内予測方法、動画像符号化方法、動画像復号化方法及び装置に関する。 Embodiments described herein relate generally to an intra-screen prediction method, a moving image encoding method, a moving image decoding method, and an apparatus for encoding and decoding moving images.
 近年、大幅に符号化効率を向上させた画像符号化方法がITU-TとISO/IECとの共同で、ITU-T REC. H.264及びISO/IEC 14496-10(以下、「H.264」という。)として勧告されている。H.264では空間領域(画素領域)での方向予測を取り入れ、入力画像信号と予測画像信号の差分によって生成される予測誤差信号に離散コサイン変換(DCT)に基づく直交変換を行うことにより、ISO/IEC MPEG-1,2,4における画面内符号化と比較して高い符号化効率を実現している。 
 また、H.264を上回る符号化効率を得るために、2種類の方向予測を利用して予測画像を重み付き平均し生成された予測誤差に対して、2種類の一次元変換の組み合わせで定められた分離型二次元直交変換を行う方式が非特許文献1として開示されている。
In recent years, an image coding method with greatly improved coding efficiency has been jointly developed by ITU-T and ISO / IEC. H. H.264 and ISO / IEC 14496-10 (hereinafter referred to as “H.264”). H. H.264 adopts direction prediction in the spatial domain (pixel domain) and performs orthogonal transform based on discrete cosine transform (DCT) on the prediction error signal generated by the difference between the input image signal and the predicted image signal, thereby obtaining ISO / IEC. Compared with the intra-picture encoding in MPEG-1, 2, 4, high encoding efficiency is realized.
H. In order to obtain an encoding efficiency exceeding H.264, a separation type defined by a combination of two types of one-dimensional transformations with respect to a prediction error generated by weighted averaging of predicted images using two types of direction prediction A method of performing two-dimensional orthogonal transformation is disclosed as Non-Patent Document 1.
 しかしながら、非特許文献1では1つの方向予測に対応した予測モードと一次元変換のルックアップテーブル(LUT)を所持し、予測方向毎に予測誤差の傾向が異なる性質を利用して、一次元の離散コサイン変換(DCT)と予め定められた直交変換(例えば離散サイン変換(DST)やカルーネン・レーベ変換(KLT)など)から成る4種類の分離型二次元変換と予測方向をマッピングしている。双方向予測が選択された時には、2つの予測モードの中で予測モード番号の小さい予測モードに対応した分離型二次元変換が選択されるが、双方向予測の2つの予測モードが異なる参照画素ラインを利用する場合、双方向予測の予測残差は、これら2つの単方向予測のいずれの予測誤差の傾向とも異なるため、符号化効率が低下する場合がある。 However, Non-Patent Document 1 possesses a prediction mode corresponding to one direction prediction and a look-up table (LUT) for one-dimensional conversion, and uses the property that the prediction error tends to be different for each prediction direction. The prediction direction is mapped to four types of separate two-dimensional transformations including discrete cosine transformation (DCT) and predetermined orthogonal transformation (for example, discrete sine transformation (DST) and Karhunen-Loeve transformation (KLT)). When bi-directional prediction is selected, a separation type two-dimensional transform corresponding to a prediction mode with a small prediction mode number is selected from the two prediction modes, but the two prediction modes of bi-directional prediction are different reference pixel lines. Is used, the prediction residual of bi-directional prediction is different from the tendency of any prediction error of these two unidirectional predictions, so that the coding efficiency may be reduced.
 従って、本実施形態は、符号化効率を向上可能な動画像符号化方法、動画像復号化方法及び装置を提供することを目的とする。 Therefore, an object of the present embodiment is to provide a moving picture coding method, a moving picture decoding method, and an apparatus that can improve coding efficiency.
 実施形態の動画像符号化方法は、2つ以上の予測モードが1以上の参照画素ラインを用いた画面内予測処理である場合に第一直交変換のみの一次元変換の組み合わせを選択し、前記2つ以上の予測モードがそれぞれ1つの参照画素ラインかつ同一の前記参照画素ラインを用いた画面内予測処理である場合に第一直交変換と第二直交変換との組み合わせを選択する。前記2つ以上の予測モードを用いて予測画像信号を生成する。前記予測画像信号から導出された予測差分信号に対して、前記選択された一次元変換の組み合わせを用いて二次元変換処理を行い、変換係数を生成する。前記2つ以上の予測モードの組み合わせを示す予測情報と、前記変換係数とを符号化する。 The moving image encoding method of the embodiment selects a combination of one-dimensional transformation only for the first orthogonal transformation when two or more prediction modes are intra-frame prediction processing using one or more reference pixel lines, A combination of the first orthogonal transform and the second orthogonal transform is selected when each of the two or more prediction modes is an intra-screen prediction process using one reference pixel line and the same reference pixel line. A predicted image signal is generated using the two or more prediction modes. A prediction coefficient signal derived from the prediction image signal is subjected to a two-dimensional conversion process using the selected combination of one-dimensional conversions to generate a conversion coefficient. The prediction information indicating a combination of the two or more prediction modes and the transform coefficient are encoded.
第1の実施形態に係る画像符号化装置を例示するブロック図。1 is a block diagram illustrating an image encoding device according to a first embodiment. 画素ブロックの予測符号化順の説明図。Explanatory drawing of the prediction encoding order of a pixel block. 画素ブロックサイズの一例の説明図。Explanatory drawing of an example of pixel block size. 画素ブロックサイズの別の例の説明図。Explanatory drawing of another example of pixel block size. 画素ブロックサイズの別の例の説明図。Explanatory drawing of another example of pixel block size. コーディングツリーブロックにおける画素ブロックの一例の説明図。FIG. 3 is an explanatory diagram illustrating an example of a pixel block in a coding tree block. コーディングツリーブロックにおける画素ブロックの別の例の説明図。Explanatory drawing of another example of the pixel block in a coding tree block. コーディングツリーブロックにおける画素ブロックの別の例の説明図。Explanatory drawing of another example of the pixel block in a coding tree block. コーディングツリーブロックにおける画素ブロックの別の例の説明図。Explanatory drawing of another example of the pixel block in a coding tree block. イントラ予測モードの説明図。Explanatory drawing of intra prediction mode. イントラ予測モードの参照画素と予測画素の説明図。Explanatory drawing of the reference pixel and prediction pixel of intra prediction mode. イントラ予測モードの水平予測モードの説明図。Explanatory drawing of the horizontal prediction mode of intra prediction mode. イントラ予測モードの直交右下予測モードの説明図。Explanatory drawing of the orthogonal lower right prediction mode of intra prediction mode. 第1の実施形態に係る予測方向を例示する説明図。Explanatory drawing which illustrates the prediction direction which concerns on 1st Embodiment. 第1の実施形態に係る、予測角度の指標と予測画像生成の際の予測角度との対応を例示するテーブル図。The table figure which illustrates a response | compatibility with the parameter | index of the prediction angle based on 1st Embodiment, and the prediction angle in the case of prediction image generation. 第1の実施形態に係る、予測モードと予測タイプと双方向イントラ予測、単方向イントラ予測の関係を例示するテーブル図。The table figure which illustrates the relationship of prediction mode, prediction type, bidirectional | two-way intra prediction, and unidirectional intra prediction based on 1st Embodiment. 図7Aに続くテーブル図。The table figure following FIG. 7A. 第1の実施形態に係るイントラ双方向予測画像生成部109を例示するブロック図。FIG. 3 is a block diagram illustrating an intra bi-predictive image generation unit 109 according to the first embodiment. 第1の実施形態に係る直交変換部102を例示するブロック図。FIG. 3 is a block diagram illustrating an orthogonal transform unit 102 according to the first embodiment. 第1の実施形態に係る、単方向イントラ予測と誤差分布、及び垂直変換と水平変換の関係を例示する説明図。Explanatory drawing which illustrates the relationship of unidirectional intra prediction and error distribution, and vertical conversion and horizontal conversion based on 1st Embodiment. 第1の実施形態に係る、単方向イントラ予測と誤差分布、及び垂直変換と水平変換の関係を例示する説明図。Explanatory drawing which illustrates the relationship of unidirectional intra prediction and error distribution, and vertical conversion and horizontal conversion based on 1st Embodiment. 第1の実施形態に係る、単方向イントラ予測と誤差分布、及び垂直変換と水平変換の関係を例示する説明図。Explanatory drawing which illustrates the relationship of unidirectional intra prediction and error distribution, and vertical conversion and horizontal conversion based on 1st Embodiment. 第1の実施形態に係る、双方向イントラ予測と誤差分布、及び垂直変換と水平変換の関係を例示する説明図。Explanatory drawing which illustrates the relationship between bidirectional | two-way intra prediction and error distribution, and vertical conversion and horizontal conversion based on 1st Embodiment. 第1の実施形態に係る、双方向イントラ予測と誤差分布、及び垂直変換と水平変換の関係を例示する説明図。Explanatory drawing which illustrates the relationship between bidirectional | two-way intra prediction and error distribution, and vertical conversion and horizontal conversion based on 1st Embodiment. 第1の実施形態に係る、予測モードと予測タイプと双方向イントラ予測、単方向イントラ予測、変換インデックスの関係を例示するテーブル図。The table figure which illustrates the relationship between prediction mode, a prediction type, bidirectional | two-way intra prediction, unidirectional intra prediction, and a conversion index based on 1st Embodiment. 図11Aに続くテーブル図。The table figure following FIG. 11A. 第1の実施形態に係る逆直交変換部105を例示するブロック図。FIG. 3 is a block diagram illustrating an inverse orthogonal transform unit 105 according to the first embodiment. 第1の実施形態に係る変換インデックスと垂直変換インデックス、水平変換インデックスの関係を例示するテーブル図。The table figure which illustrates the relationship between the conversion index which concerns on 1st Embodiment, a vertical conversion index, and a horizontal conversion index. 第1の実施形態に係る垂直変換インデックス、水平変換インデックスの変換行列名を例示するテーブル図。The table figure which illustrates the conversion matrix name of the vertical conversion index which concerns on 1st Embodiment, and a horizontal conversion index. 第1の実施形態に係る、予測画像生成処理と直交変換までのフローチャート図。The flowchart figure to the prediction image generation process and orthogonal transformation based on 1st Embodiment. シンタクス構造の説明図。Explanatory drawing of a syntax structure. 第1の実施形態に係る、スライスヘッダーシンタクスの説明図。Explanatory drawing of the slice header syntax based on 1st Embodiment. 第1の実施形態に係る、コーディングツリーブロックシンタクスの一例を示す説明図。Explanatory drawing which shows an example of the coding tree block syntax based on 1st Embodiment. 第1の実施形態に係る、トランスフォームユニットシンタクスの一例を示す説明図。Explanatory drawing which shows an example of the transform unit syntax based on 1st Embodiment. 第1の実施形態に係る、プレディクションユニットシンタクスの一例を示す説明図。Explanatory drawing which shows an example of the prediction unit syntax based on 1st Embodiment. 第2の実施形態に係る画像符号化装置を例示するブロック図。The block diagram which illustrates the picture coding device concerning a 2nd embodiment. 第2の実施形態に係る、予測方向導出部2001を例示するブロック図。The block diagram which illustrates the prediction direction derivation | leading-out part 2001 based on 2nd Embodiment. 第2の実施形態に係る、参照画素ラインと予測方向導出を例示する説明図。Explanatory drawing which illustrates a reference pixel line and prediction direction derivation based on a 2nd embodiment. 第2の実施形態に係る、予測モードと双方向イントラ予測、単方向イントラ予測、変換インデックスの関係を例示するテーブル図。The table figure which illustrates the relationship between prediction mode, bidirectional | two-way intra prediction, unidirectional intra prediction, and a conversion index based on 2nd Embodiment. 第2の実施形態に係る、スライスヘッダーシンタクスの説明図。Explanatory drawing of the slice header syntax based on 2nd Embodiment. 第2の実施形態に係る、プレディクションユニットシンタクスの一例を示す説明図。Explanatory drawing which shows an example of the prediction unit syntax based on 2nd Embodiment. 第2の実施形態に係る、プレディクションユニットシンタクスの一例を示す説明図。Explanatory drawing which shows an example of the prediction unit syntax based on 2nd Embodiment. 第2の実施形態に係る、プレディクションユニットシンタクスの一例を示す説明図。Explanatory drawing which shows an example of the prediction unit syntax based on 2nd Embodiment. 第2の実施形態に係る、予測モードと予測タイプと双方向イントラ予測、単方向イントラ予測、変換インデックスの関係を例示するテーブル図。The table figure which illustrates the relationship between prediction mode, a prediction type, bidirectional | two-way intra prediction, unidirectional intra prediction, and a conversion index based on 2nd Embodiment. 図26Aに続くテーブル図。FIG. 26B is a table diagram following FIG. 図26Bに続くテーブル図。FIG. 26B is a table diagram following FIG. 第3の実施形態に係る動画像復号化装置を例示するブロック図。The block diagram which illustrates the moving picture decoding device concerning a 3rd embodiment. 第4の実施形態に係る動画像復号化装置を例示するブロック図。The block diagram which illustrates the moving picture decoding device concerning a 4th embodiment.
 以下、図面を参照して、各実施形態について説明する。尚、以降の説明において、「画像」という用語は、「映像」「画素」「画像信号」「絵」、「画像データ」などの用語として適宜読み替えることができる。また、以下の実施形態では、同一の番号を付した部分については同様の動作を行うものとして、重ねての説明を省略する。 
 (第1の実施形態) 
 第1の実施形態は、画像符号化装置に関する。本実施形態に係る画像符号化装置に対応する動画像復号化装置は、第3の実施形態において説明する。この画像符号化装置は、LSI(Large-Scale Integration)チップやDSP(Digital Signal Processor)、FPGA(Field Programmable Gate Array)などのハードウェアにより実現可能である。また、この画像符号化装置は、コンピュータに画像符号化プログラムを実行させることによっても実現可能である。
Hereinafter, each embodiment will be described with reference to the drawings. In the following description, the term “image” can be appropriately read as terms such as “video”, “pixel”, “image signal”, “picture”, and “image data”. Moreover, in the following embodiment, the same number is attached | subjected about what performs the same operation | movement, and repeated description is abbreviate | omitted.
(First embodiment)
The first embodiment relates to an image encoding device. A moving picture decoding apparatus corresponding to the picture encoding apparatus according to the present embodiment will be described in a third embodiment. This image encoding device can be realized by hardware such as an LSI (Large-Scale Integration) chip, a DSP (Digital Signal Processor), or an FPGA (Field Programmable Gate Array). The image encoding apparatus can also be realized by causing a computer to execute an image encoding program.
 図1に示すように、本実施形態に係る画像符号化装置100は、減算部101、直交変換部102、量子化部103、逆量子化部104、逆直交変換部105、加算部106、参照画像メモリ107、イントラ単方向予測画像生成部108、イントラ双方向予測画像生成部109、インター予測画像生成部110、予測選択スイッチ111、変換情報設定部112、予測選択部113、エントロピー符号化部114及び出力バッファ115を有する。 As illustrated in FIG. 1, the image encoding device 100 according to the present embodiment includes a subtraction unit 101, an orthogonal transformation unit 102, a quantization unit 103, an inverse quantization unit 104, an inverse orthogonal transformation unit 105, an addition unit 106, and a reference. Image memory 107, intra unidirectional prediction image generation unit 108, intra bidirectional prediction image generation unit 109, inter prediction image generation unit 110, prediction selection switch 111, conversion information setting unit 112, prediction selection unit 113, entropy encoding unit 114 And an output buffer 115.
 図1の画像符号化装置は、入力画像117を構成する各フレームまたは各フィールドを複数の画素ブロックに分割し、これら分割した画素ブロックに対して予測符号化を行って、符号化データ128を出力する。以降の説明では、簡単化のために、図2Aに示されるように左上から右下に向かって画素ブロックの予測符号化が行われることを仮定する。図2Aでは、符号化処理対象のフレームfにおいて、符号化対象画素ブロックcよりも左側及び上側に符号化済み画素ブロックpが位置している。 The image coding apparatus in FIG. 1 divides each frame or each field constituting the input image 117 into a plurality of pixel blocks, performs predictive coding on the divided pixel blocks, and outputs coded data 128. To do. In the following description, for the sake of simplicity, it is assumed that pixel blocks are predictively encoded from the upper left to the lower right as shown in FIG. 2A. In FIG. 2A, the encoded pixel block p is located on the left side and the upper side of the encoding target pixel block c in the encoding processing target frame f.
 ここで、画素ブロックは、例えば、M×Nサイズのブロック(N及びMは自然数)、コーディングツリーブロック、マクロブロック、サブブロック、1画素などの画像を処理する単位を指す。尚、以降の説明では、画素ブロックをコーディングツリーブロックの意味で基本的に使用するが、説明を適宜読み替えることにより画素ブロックを上述した意味で解釈することも可能である。例えば、プレディクションユニットの説明における画素ブロックは、プレディクションユニットの画素ブロックと読み替えて解釈する。以下、コーディングツリーブロックは、典型的には、例えば図2Bに示す16×16画素ブロックであるが、図2Cに示す32×32画素ブロック、図2Dに示す64×64画素ブロックであってもよいし、図示しない8×8画素ブロック、4×4画素ブロックであってもよい。また、コーディングツリーブロックは必ずしも正方形である必要はない。以下、入力画像117の符号化対象ブロックもしくはコーディングツリーブロックを「予測対象ブロック」或いは「予測画素ブロック」と称することもある。また、符号化単位には、コーディングツリーブロックのような画素ブロックに限らず、フレームまたはフィールド、スライス、或いはこれらの組み合わせを用いることができる。 Here, the pixel block refers to a unit for processing an image such as an M × N size block (N and M are natural numbers), a coding tree block, a macro block, a sub block, and one pixel. In the following description, the pixel block is basically used in the sense of a coding tree block. However, the pixel block can be interpreted in the above-described meaning by appropriately replacing the description. For example, the pixel block in the description of the prediction unit is interpreted as the pixel block of the prediction unit. Hereinafter, the coding tree block is typically a 16 × 16 pixel block shown in FIG. 2B, for example, but may be a 32 × 32 pixel block shown in FIG. 2C or a 64 × 64 pixel block shown in FIG. 2D. However, an 8 × 8 pixel block (not shown) and a 4 × 4 pixel block may be used. Also, the coding tree block need not necessarily be square. Hereinafter, the encoding target block or coding tree block of the input image 117 may be referred to as a “prediction target block” or a “prediction pixel block”. The coding unit is not limited to a pixel block such as a coding tree block, and a frame, a field, a slice, or a combination thereof can be used.
 図3A~Dは、コーディングツリーブロックの具体例を示した図である。図3Aは、コーディングツリーブロックのサイズが64×64(N=32)の場合の例を示している。ここでNは、基準となるコーディングツリーブロックのサイズを表しており、分割された場合のサイズをNと定義し、分割されない場合を2Nと定義する。コーディングツリーブロックは四分木構造を持ち、分割された場合は、4つの画素ブロックに対して図3Bに示されるようにZスキャン順でインデックスが付される。図3Aの64x64画素ブロックを四分木分割した例が図3Bに示されている。また、コーディングツリーブロックの1つの四分木のインデックス内で更に四分木分割することが可能である。このように分割の深さをDepthで定義すると階層的に分割することができる。例えば、図3AはDepth=0の例を示している。図3CにDepth=1の場合の32×32(N=16)サイズのコーディングツリーブロックの例を示す。このようなコーディングツリーブロックの最も大きいユニットをラージコーディングツリーブロックと呼び、この単位で入力画像信号がラスタースキャン順に符号化される。また図3Dは、図3Cの32x32画素ブロックを四分木分割した例を示している。 3A to 3D are diagrams showing specific examples of coding tree blocks. FIG. 3A shows an example in which the size of the coding tree block is 64 × 64 (N = 32). Here, N represents the size of the reference coding tree block. The size when divided is defined as N, and the size when not divided is defined as 2N. The coding tree block has a quadtree structure, and when divided, the four pixel blocks are indexed in the Z-scan order as shown in FIG. 3B. An example in which the 64 × 64 pixel block of FIG. 3A is divided into quadtrees is shown in FIG. 3B. Further, it is possible to further divide the quadtree within the index of one quadtree of the coding tree block. In this way, if the depth of division is defined by Depth, it can be divided hierarchically. For example, FIG. 3A shows an example in which Depth = 0. FIG. 3C shows an example of a 32 × 32 (N = 16) size coding tree block in the case of Depth = 1. The unit having the largest coding tree block is called a large coding tree block, and the input image signal is encoded in this unit in raster scan order. FIG. 3D shows an example in which the 32 × 32 pixel block of FIG. 3C is divided into quadtrees.
 図1の画像符号化装置は、符号化制御部116から入力される符号化パラメータに基づいて、画素ブロックに対するイントラ予測(画面内予測、フレーム内予測などとも称される)またはインター予測(画面間予測、フレーム間予測、動き補償予測などとも称される)を行って、予測画像125を生成する。この画像符号化装置は、画素ブロックに分割された入力画像117と予測画像125を減算して生成した予測誤差(予測差分信号とも呼ぶ)118を直交変換及び量子化し、エントロピー符号化を行って符号化データ128を生成して出力する。 The image encoding apparatus in FIG. 1 performs intra prediction (also referred to as intra-frame prediction, intra-frame prediction, etc.) or inter prediction (inter-screen prediction) on a pixel block based on the encoding parameter input from the encoding control unit 116. Prediction, inter-frame prediction, motion compensation prediction, etc.) is performed to generate a predicted image 125. This image coding apparatus orthogonally transforms and quantizes a prediction error (also called a prediction difference signal) 118 generated by subtracting an input image 117 divided into pixel blocks and a predicted image 125, performs entropy coding, and performs coding. Generated data 128 is output.
 図1の画像符号化装置は、ブロックサイズ及び予測画像125の生成方法の異なる複数の予測モードを選択的に適用して符号化を行う。予測画像125の生成方法は、大別すると、符号化対象フレーム内で予測を行うイントラ予測と、時間的に異なる1つまたは複数の参照フレームを用いて予測を行うインター予測との2種類である。 The image encoding device in FIG. 1 performs encoding by selectively applying a plurality of prediction modes having different block sizes and generation methods of the predicted image 125. The generation method of the prediction image 125 is roughly classified into two types, that is, intra prediction in which prediction is performed in the encoding target frame and inter prediction in which prediction is performed using one or a plurality of reference frames that are temporally different. .
 以下、図1の画像符号化装置に含まれる各要素を説明する。 
 減算器101は、画素ブロックに分割された入力画像117から、対応する予測画像125を減算して予測誤差118を得る。減算器101から出力された予測誤差118は直交変換部102に入力される。
Hereinafter, each element included in the image encoding device in FIG. 1 will be described.
The subtractor 101 subtracts the corresponding prediction image 125 from the input image 117 divided into pixel blocks to obtain a prediction error 118. The prediction error 118 output from the subtractor 101 is input to the orthogonal transform unit 102.
 直交変換部102は、減算器101から出力された予測誤差118に対して、後述する変換情報設定部112から出力された変換情報127に基づいて、例えば離散コサイン変換(DCT)或いは離散サイン変換(DST)のような直交変換を行い、変換係数119を得る。直交変換部102から出力された変換係数119が量子化部103に入力される。 The orthogonal transform unit 102 performs, for example, discrete cosine transform (DCT) or discrete sine transform (DCT) on the prediction error 118 output from the subtractor 101 based on the transform information 127 output from the transform information setting unit 112 described later. DST) is performed to obtain a transform coefficient 119. The transform coefficient 119 output from the orthogonal transform unit 102 is input to the quantization unit 103.
 量子化部103は、直交変換部102から出力された変換係数119に対して量子化処理を行い、量子化変換係数120を得る。具体的には、量子化部103は、符号化制御部116によって指定される量子化パラメータ、量子化マトリクスなどの量子化情報に従って量子化(変換係数を量子化情報によって導出された量子化ステップサイズで除算)を行う。量子化パラメータは、量子化の細かさを示す。量子化マトリクスは、量子化の細かさを変換係数の成分毎に重み付けするために使用される。量子化部103は、量子化変換係数120をエントロピー符号化部114及び逆量子化部104に入力する。 The quantization unit 103 performs a quantization process on the transform coefficient 119 output from the orthogonal transform unit 102 to obtain a quantized transform coefficient 120. Specifically, the quantization unit 103 performs quantization according to quantization information such as a quantization parameter and a quantization matrix specified by the encoding control unit 116 (quantization step size derived from the quantization coefficient by the transform information). Divide by). The quantization parameter indicates the fineness of quantization. The quantization matrix is used for weighting the fineness of quantization for each component of the transform coefficient. The quantization unit 103 inputs the quantized transform coefficient 120 to the entropy encoding unit 114 and the inverse quantization unit 104.
 エントロピー符号化部114は、量子化部103からの量子化変換係数120、予測選択部113からの予測情報126、符号化制御部116によって指定される量子化情報などの様々な符号化パラメータに対してエントロピー符号化(例えば、ハフマン符号化、算術符号化など)を行い、符号化データを生成する。尚、符号化パラメータとは、予測情報126、変換係数120に関する情報、量子化に関する情報、などの復号に必要となるパラメータである。例えば、符号化制御部116が内部メモリ(図示しない)を持ち、このメモリに符号化パラメータが保持され、画素ブロックを符号化する際に隣接する既に符号化済みの画素ブロックの符号化パラメータを用いる構成としてもよい。例えば、H.264のイントラ予測では符号化済みの隣接ブロックの予測モード情報から、画素ブロックの予測モードの予測値を導出することが可能である。 The entropy encoding unit 114 performs various encoding parameters such as the quantized transform coefficient 120 from the quantization unit 103, the prediction information 126 from the prediction selection unit 113, and the quantization information specified by the encoding control unit 116. Entropy encoding (for example, Huffman encoding, arithmetic encoding, etc.) is performed to generate encoded data. The encoding parameter is a parameter necessary for decoding such as prediction information 126, information on the transform coefficient 120, information on quantization, and the like. For example, the encoding control unit 116 has an internal memory (not shown), the encoding parameter is held in this memory, and the encoding parameter of the adjacent already encoded pixel block is used when encoding the pixel block. It is good also as a structure. For example, H.M. In the H.264 intra prediction, the prediction value of the prediction mode of the pixel block can be derived from the prediction mode information of the encoded adjacent block.
 エントロピー符号化部114によって生成された符号化データは、例えば多重化を経て出力バッファ115に一時的に蓄積され、符号化制御部116が管理する適切な出力タイミングに従って符号化データ128として出力される。符号化データ128は、例えば、図示しない蓄積系(蓄積メディア)または伝送系(通信回線)へ出力される。 The encoded data generated by the entropy encoding unit 114 is temporarily accumulated in the output buffer 115 through multiplexing, for example, and output as encoded data 128 according to an appropriate output timing managed by the encoding control unit 116. . The encoded data 128 is output to, for example, a storage system (storage medium) or a transmission system (communication line) not shown.
 逆量子化部104は、量子化部103から出力された量子化変換係数120に対して逆量子化処理を行い、復元変換係数121を得る。具体的には、逆量子化部104は、量子化部103において使用された量子化情報に従って逆量子化を行う(量子化情報によって導出された量子化ステップサイズを量子化変換係数120に乗算)。この際、量子化部103において使用された量子化情報が、符号化制御部116の内部メモリ(図示しない)からロードされて利用される。逆量子化部104は、復元変換係数120を逆直交変換部105に入力する。 The inverse quantization unit 104 performs an inverse quantization process on the quantized transform coefficient 120 output from the quantization unit 103 to obtain a restored transform coefficient 121. Specifically, the inverse quantization unit 104 performs inverse quantization according to the quantization information used in the quantization unit 103 (multiplies the quantization transform coefficient 120 by the quantization step size derived from the quantization information). . At this time, the quantization information used in the quantization unit 103 is loaded from an internal memory (not shown) of the encoding control unit 116 and used. The inverse quantization unit 104 inputs the restored transform coefficient 120 to the inverse orthogonal transform unit 105.
 逆直交変換部105は、逆量子化部104からの復元変換係数121に対して、後述する変換情報設定部112から出力された変換情報127に基づいて例えば逆離散コサイン変換(IDCT)或いは逆離散サイン変換(IDST)などのような直交変換部102において行われた直交変換に対応する逆直交変換を行い、復元予測誤差122を得る。逆直交変換部105から出力された復元予測誤差122が加算部106に入力される。 The inverse orthogonal transform unit 105 performs, for example, inverse discrete cosine transform (IDCT) or inverse discrete on the restored transform coefficient 121 from the inverse quantization unit 104 based on transform information 127 output from the transform information setting unit 112 described later. An inverse orthogonal transformation corresponding to the orthogonal transformation performed in the orthogonal transformation unit 102 such as sine transformation (IDST) is performed to obtain a restored prediction error 122. The reconstruction prediction error 122 output from the inverse orthogonal transform unit 105 is input to the addition unit 106.
 加算部106は、復元予測誤差122と、対応する予測画像125とを加算し、局所復号画像123を生成する。局所復号画像123は、参照画像メモリ107へと入力される。 The addition unit 106 adds the restored prediction error 122 and the corresponding prediction image 125 to generate a local decoded image 123. The locally decoded image 123 is input to the reference image memory 107.
 参照画像メモリ107は、メモリに局所復号画像123を蓄積しており、イントラ単方向予測画像生成部108、イントラ双方向予測画像生成部109、及びインター予測画像生成部110によって必要に応じて予測画像を生成する際に、参照画像124として都度参照される。 The reference image memory 107 stores the local decoded image 123 in the memory, and a prediction image is generated as necessary by the intra unidirectional prediction image generation unit 108, the intra bidirectional prediction image generation unit 109, and the inter prediction image generation unit 110. Is referred to as the reference image 124 each time.
 <イントラ単方向予測画像生成部108> 
 イントラ単方向予測画像生成部108は、参照画像メモリ107に保存されている参照画像124を利用して単方向のイントラ予測を行う。例えば、H.264/MPEG-4 AVCでは、予測対象ブロックに空間的に隣接する符号化済みの参照画素ラインを利用して、垂直方向、水平方向などの予測方向に沿って画素補填(コピーまたは補間処理(フィルタ処理などを指す))を行うことによってイントラ予測画像を生成する。図4AにH.264/MPEG-4 AVCにおけるイントラ予測の予測方向を示す。また、図4BにH.264/MPEG-4 AVCにおける参照画素ラインと符号化対象画素との配置関係を示す。図中に示されるM及びA~Hは予測対象ブロックの上に位置する参照画素ラインを示している。また、M及びI~Lは予測対象ブロックの左に位置する参照画素ラインを示している。図4Cはモード1(水平予測)の予測画像生成方法を示しており、左の参照画素ラインの中からI~Lの画素が予測方向にコピーされている。図4Dはモード4(対角右下予測)の予測画像生成方法を示している。この場合、例えば参照画素Bの下の画素位置の予測値は、A,B,Cの3つの参照画素に対して(1,2,1)の3タップ線形フィルタ処理を行って導出される。また導出された画素値は、図中に示される予測方向に同じくコピーされる。
<Intra Unidirectional Prediction Image Generation Unit 108>
The intra unidirectional predicted image generation unit 108 performs unidirectional intra prediction using the reference image 124 stored in the reference image memory 107. For example, in H.264 / MPEG-4 AVC, pixel supplementation (copying or copying) is performed along a prediction direction such as a vertical direction or a horizontal direction using an encoded reference pixel line spatially adjacent to a prediction target block. An intra prediction image is generated by performing an interpolation process (referring to a filter process or the like). FIG. 4A shows a prediction direction of intra prediction in H.264 / MPEG-4 AVC. FIG. 4B shows an arrangement relationship between reference pixel lines and encoding target pixels in H.264 / MPEG-4 AVC. M and A to H shown in the figure indicate reference pixel lines located above the prediction target block. M and I to L indicate reference pixel lines located on the left of the prediction target block. FIG. 4C shows a predicted image generation method in mode 1 (horizontal prediction), in which pixels I to L are copied in the prediction direction from the left reference pixel line. FIG. 4D shows a predicted image generation method in mode 4 (diagonal lower right prediction). In this case, for example, the predicted value of the pixel position below the reference pixel B is derived by performing (1, 2, 1) 3-tap linear filter processing on the three reference pixels A, B, and C. The derived pixel values are also copied in the prediction direction shown in the figure.
 また、H.264/MPEG-4 AVCの予測方向を更に拡張し、予測モード数を増やすことも容易に可能である。例えば、予測モードを34個に拡張し、分数位置に該当する画素位置精度を32画素精度と定め、線形補間(3タップフィルタ処理など)を行うことで予測画素値を作成するような構成とすることも可能である。予測モードを最大34個まで拡張した場合の予測角度と予測モードの例が図5に示されている。図5では、太線で示される垂直方向、水平方向の座標に対して、33個の異なる予測方向を持つ。また、H.264/MPEG-4 AVCで示される代表的な予測角度の方向を矢印で示している。本発明の本実施の形態では、原点から円形で示されるマークまで線を引いた方向に33種類の予測方向が用意されている。また、H.264/MPEG-4 AVCと同様、利用可能な参照画素の平均値で予測するDC予測が追加されており、合計で34個の予測モードが存在する。 Also, it is possible to further expand the prediction direction of H.264 / MPEG-4 AVC and increase the number of prediction modes. For example, the prediction mode is expanded to 34, the pixel position accuracy corresponding to the fractional position is determined as 32 pixel accuracy, and the prediction pixel value is created by performing linear interpolation (such as 3-tap filter processing). It is also possible. FIG. 5 shows an example of the prediction angle and the prediction mode when the prediction mode is expanded up to 34 prediction modes. In FIG. 5, there are 33 different prediction directions for the vertical and horizontal coordinates indicated by the bold lines. In addition, the direction of a typical prediction angle indicated by H.264 / MPEG-4 AVC is indicated by an arrow. In the present embodiment of the present invention, 33 types of prediction directions are prepared in a direction in which a line is drawn from the origin to a mark indicated by a circle. Similarly to H.264 / MPEG-4 AVC, DC prediction for prediction based on the average value of available reference pixels is added, and there are a total of 34 prediction modes.
 IntraPredMode=4の場合、後述する図7AのIntraPredAngleIdL0が‐4であるため、図5におけるIntraPredMode=4で示される予測方向で予測画像125が生成される。図5における点線で示される矢印は、予測タイプがIntra_Verticalの予測モードを示しており、実線で示される矢印は予測タイプがIntra_Horizontalの予測モードを示している。 When IntraPredMode = 4, since IntraPredAngleIdL0 in FIG. 7A described later is −4, the prediction image 125 is generated in the prediction direction indicated by IntraPredMode = 4 in FIG. An arrow indicated by a dotted line in FIG. 5 indicates a prediction mode whose prediction type is Intra_Vertical, and an arrow indicated by a solid line indicates a prediction mode whose prediction type is Intra_Horizontal.
 図6は、IntraPredAngleIdLXと予測画像値生成に使われるintraPredAngleとの関係を示す。また、図7A及び図7Bは予測モード(PredMode)、後述する双方向予測フラグ(BipredFlag)、予測モードタイプ(PredTypeL0、PredTypeL1)、予測角度(PredAngleIdL0、PredAngleIdL1)の関係を示している。 FIG. 6 shows the relationship between IntraPredAngleIdLX and intraPredAngle used for predictive image value generation. 7A and 7B show the relationship between the prediction mode (PredMode), a bidirectional prediction flag (BipredFlag) described later, a prediction mode type (PredTypeL0, PredTypeL1), and a prediction angle (PredAngleIdL0, PredAngleIdL1).
 intraPredAngleは予測値生成の際に、実際に利用される予測角度を示している。例えば、予測タイプがIntra_Verticalで且つ、図7A及び図7Bで示されるintraPredAngleが正の値の場合の予測値の生成方法を数式で書くと次の数式(1)で表される。ここでBLK_SIZEは、当該画素ブロックのサイズを示しており、ref[]は参照画像(参照画素ラインとも呼ばれる)が格納された配列を示している。また、pred (k, m)は生成された予測画像125を示している。
Figure JPOXMLDOC01-appb-M000005
intraPredAngle indicates the prediction angle that is actually used when the predicted value is generated. For example, a prediction value generation method in the case where the prediction type is Intra_Vertical and the intraPredAngle shown in FIGS. 7A and 7B is a positive value is expressed by the following equation (1). Here, BLK_SIZE indicates the size of the pixel block, and ref [] indicates an array in which a reference image (also referred to as a reference pixel line) is stored. Further, pred (k, m) indicates the generated predicted image 125.
Figure JPOXMLDOC01-appb-M000005
 上記条件以外に関しても、図7A及び図7Bのテーブルに従って同様な方法で予測値が生成可能である。例えば、IntraPredMode=1で示される予測モードの予測値は、図4Cで示されるH.264/MPEG-4 AVCの水平予測と同一となる。 Even for conditions other than the above, a predicted value can be generated by a similar method according to the tables of FIGS. 7A and 7B. For example, the prediction value of the prediction mode indicated by IntraPredMode = 1 is the same as the H.264 / MPEG-4MAVC horizontal prediction shown in FIG. 4C.
 <イントラ双方向予測画像生成部109> 
 イントラ双方向予測画像生成部109は、参照画像メモリ107に保存されている参照画像124を利用して双方向のイントラ予測を行う。例えば上記の非特許文献1では、H.264/MPEG-4 AVCで定められている9種類の予測モードの中から2種類の予測モードを選択し、それぞれの予測画像信号を生成した後に、画素毎にフィルタ処理を行うことで予測画像信号を生成している。
<Intra bidirectional prediction image generation unit 109>
The intra bidirectional prediction image generation unit 109 performs bidirectional intra prediction using the reference image 124 stored in the reference image memory 107. For example, in Non-Patent Document 1 described above, after selecting two types of prediction modes from nine types of prediction modes defined in H.264 / MPEG-4 AVC and generating respective prediction image signals, The predicted image signal is generated by performing the filtering process every time.
 単方向の予測モード数を34種類に拡張した場合における双方向予測について図8を用いてより具体的に説明する。尚、本実施の形態では、モード数の最大数には制限を受けず、任意の数の単方向予測においても双方向予測は容易に拡張が可能である。 Bidirectional prediction when the number of unidirectional prediction modes is expanded to 34 types will be described more specifically with reference to FIG. In the present embodiment, the maximum number of modes is not limited, and bi-directional prediction can be easily expanded in any number of uni-directional predictions.
 図8で示されるイントラ双方向予測画像生成部109は、重み付き平均部801、第一単方向イントラ予測画像生成部802、第二単方向イントラ予測画像生成部803を保持している。第一単方向イントラ予測画像生成部802及び第二単方向イントラ予測画像生成部803の機能は同一である。また、これらはイントラ単方向予測画像生成部108と同一であってもよい。この場合、3つの処理部はハードウェア的に同一の構成とすることができるため、回路規模を小さくすることができる。これらはいずれも符号化制御部116で制御される予測モード情報に従って与えられた予測モードに対応する予測画像を生成する。 8 includes a weighted average unit 801, a first unidirectional intra predicted image generation unit 802, and a second unidirectional intra predicted image generation unit 803. The functions of the first unidirectional intra predicted image generation unit 802 and the second unidirectional intra predicted image generation unit 803 are the same. These may be the same as the intra unidirectional predicted image generation unit 108. In this case, since the three processing units can have the same hardware configuration, the circuit scale can be reduced. Each of these generates a prediction image corresponding to the prediction mode given according to the prediction mode information controlled by the encoding control unit 116.
 第一単方向イントラ予測画像生成部802から第一予測画像851が、第二単方向イントラ予測画像生成部803から第二予測画像852が出力される。それぞれの予測画像が重み付き平均部801に入力され、重み付き平均処理が行われる。重み付き平均部801では、次の数式(2)に基づいた計算が行われる。第一予測画像851をP1[x,y]、第二予測画像852をP2[x,y]とすると双方向予測の予測画像P[x,y]は次式で表される。
Figure JPOXMLDOC01-appb-M000006
A first predicted image 851 is output from the first unidirectional intra predicted image generation unit 802, and a second predicted image 852 is output from the second unidirectional intra predicted image generation unit 803. Each predicted image is input to the weighted average unit 801, and a weighted average process is performed. In the weighted average unit 801, calculation based on the following formula (2) is performed. When the first predicted image 851 is P1 [x, y] and the second predicted image 852 is P2 [x, y], the bidirectionally predicted image P [x, y] is expressed by the following equation.
Figure JPOXMLDOC01-appb-M000006
ここで、W[x,y]は重み付きテーブルを示しており、双方向イントラ予測で用いる2つの予測モードの組み合わせによって設定される。Normは数式(2)を整数演算処理とするために導入された正規化のための固定数であり、Offsetは丸め処理の際のオフセット、Shiftは除算のためのシフト量を示す。例えばW[x,y]を10ビット精度として上記演算を行うためには、Norm値が1024、Offset値が512、Shift値が10となる。 Here, W [x, y] represents a weighted table, and is set by a combination of two prediction modes used in bidirectional intra prediction. Norm is a fixed number for normalization introduced in order to make Equation (2) an integer arithmetic process, Offset indicates an offset in rounding, and Shift indicates a shift amount for division. For example, in order to perform the above calculation with W [x, y] as 10-bit precision, the Norm value is 1024, the Offset value is 512, and the Shift value is 10.
 双方向イントラ予測は、図7A及び図7Bで示されるBipredFlagが1であることを示す。この場合2つの予測モードタイプが定義されており、第一単方向イントラ予測画像生成部802に対応する予測モードタイプがPredTypeL0、第二単方向イントラ予測画像生成部803に対応する予測モードが、PredTypeL1で示されている。PredAngleIdLXも同様であり、X部分が0であるか1であるかでそれぞれの予測モードのタイプと角度が表現されている。 Bidirectional intra prediction indicates that the BipedFlag shown in FIGS. 7A and 7B is 1. In this case, two prediction mode types are defined, the prediction mode type corresponding to the first unidirectional intra prediction image generation unit 802 is PredTypeL0, and the prediction mode corresponding to the second unidirectional intra prediction image generation unit 803 is PredTypeL1. It is shown in The same applies to PredAngleIdLX, and the type and angle of each prediction mode are expressed by whether the X portion is 0 or 1.
 尚、ここでは図7A及び図7Bとして、双方向イントラ予測に対応する2つの予測モードの組み合わせを固定の組み合わせとして例示したが、符号化済みの隣接画素ブロックが保持する予測モードを利用する特別な予測モードを加えてもよい。この場合、空間的距離の近い2つの予測モードの組み合わせが選択できるようになるため、固定的な予測モード数に依存せず、画像の特徴にあった双方向イントラ予測の組み合わせが実現できる。また、固定的な予測モード数を削減することも可能となる。また、本発明の本実施の形態では、双方向イントラ予測のモード数を16個とした例を示しているが、これらの予測モード数の増減は容易に変更可能である。予測モード数を増やすと予測精度が高まる一方で、予測モードを符号化するためのオーバーヘッドが増加する。予測モード数と符号化効率のバランスを考慮して最適な予測モード数を設定すればよい。 
 以上が、イントラ双方向予測画像生成部109の説明である。
In FIG. 7A and FIG. 7B, the combination of two prediction modes corresponding to bidirectional intra prediction is illustrated as a fixed combination. However, a special mode that uses a prediction mode held by an encoded adjacent pixel block is illustrated. A prediction mode may be added. In this case, since a combination of two prediction modes having a close spatial distance can be selected, a combination of bidirectional intra prediction that matches the characteristics of the image can be realized without depending on the number of fixed prediction modes. It is also possible to reduce the number of fixed prediction modes. Further, in the present embodiment of the present invention, an example in which the number of bidirectional intra prediction modes is 16 is shown, but the increase / decrease in the number of prediction modes can be easily changed. Increasing the number of prediction modes increases prediction accuracy, while increasing the overhead for encoding the prediction mode. The optimum number of prediction modes may be set in consideration of the balance between the number of prediction modes and coding efficiency.
The above is the description of the intra bidirectional prediction image generation unit 109.
 図1のインター予測画像生成部110は、参照画像メモリ107に保存されている参照画像124を利用してインター予測を行う。具体的には、インター予測部110は、予測対象ブロックと参照画像124との間の動きのズレ量(動きベクトル)に基づいて補間処理(動き補償)を行ってインター予測画像を生成する。H.264/MPEG-4 AVCでは、1/4画素精度までの補間処理が可能である。導出された動きベクトルは予測情報126の一部としてエントロピー符号化される。 1 uses the reference image 124 stored in the reference image memory 107 to perform inter prediction. Specifically, the inter prediction unit 110 performs an interpolation process (motion compensation) based on a motion shift amount (motion vector) between the prediction target block and the reference image 124 to generate an inter prediction image. In H.264 / MPEG-4 AVC, interpolation processing up to ¼ pixel accuracy is possible. The derived motion vector is entropy encoded as part of the prediction information 126.
 予測選択スイッチ111は、イントラ単方向予測画像生成部108の出力端、イントラ双方向予測画像生成部109の出力端、またはインター予測画像生成部110の出力端を予測選択部113から出力される予測情報126に従って選択し、イントラ予測画像またはインター予測画像を予測画像125として減算部101及び加算部106に入力する。予測情報126がイントラ予測を示唆する場合には、予測選択スイッチ111は図7A及び図7Bに示される予測モードに従って、イントラ単方向予測画像生成部108もしくはイントラ双方向予測画像生成部109からの出力端にスイッチを接続する。一方、予測情報126がインター予測を示唆する場合には、予測選択スイッチ111はインター予測部110からの出力端にスイッチを接続する。 The prediction selection switch 111 outputs the output terminal of the intra unidirectional prediction image generation unit 108, the output terminal of the intra bidirectional prediction image generation unit 109, or the output terminal of the inter prediction image generation unit 110 from the prediction selection unit 113. The intra-predicted image or the inter-predicted image is selected as the predicted image 125 and input to the subtracting unit 101 and the adding unit 106. When the prediction information 126 suggests intra prediction, the prediction selection switch 111 outputs from the intra unidirectional prediction image generation unit 108 or the intra bidirectional prediction image generation unit 109 according to the prediction mode shown in FIGS. 7A and 7B. Connect the switch to the end. On the other hand, when the prediction information 126 suggests inter prediction, the prediction selection switch 111 connects a switch to the output terminal from the inter prediction unit 110.
 <予測選択部-符号化制御部モード判定> 
 予測選択部113は、符号化制御部116が制御する予測モードに従って、予測情報126を設定する機能を有する。前述のように、予測画像125の生成のためにイントラ予測またはインター予測が選択可能であるが、イントラ予測及びインター予測の夫々に複数のモードが更に選択可能である。符号化制御部116はイントラ予測及びインター予測の複数の予測モードのうち1つを最適な予測モードとして選択し、予測選択部113は判定された最適な予測モードに応じて予測情報126を設定する。
<Prediction selection unit-coding control unit mode determination>
The prediction selection unit 113 has a function of setting the prediction information 126 according to the prediction mode controlled by the encoding control unit 116. As described above, intra prediction or inter prediction can be selected to generate the predicted image 125, but a plurality of modes can be further selected for each of intra prediction and inter prediction. The encoding control unit 116 selects one of a plurality of prediction modes of intra prediction and inter prediction as the optimal prediction mode, and the prediction selection unit 113 sets the prediction information 126 according to the determined optimal prediction mode. .
 例えば、イントラ予測に関して、符号化制御部116から予測モード情報が図7A及び図7Bに示されるテーブルの中から選択されると、イントラ単方向予測画像生成部108或いはイントラ双方向予測画像生成部109はこの予測モード情報に従って予測画像125を生成する。符号化制御部116は、予測モードの番号が小さい方から順に予測モード情報を指定してもよいし、大きい方から順に予測モード情報を指定してもよい。また、入力画像の特性に従って予測モードを限定してもよいし、予め定められた予測モードを選択してもよい。必ずしも全ての予測モードを指定する必要はなく符号化対象ブロックに対して少なくとも1つの予測モード情報を指定すればよい。 For example, regarding the intra prediction, when the prediction mode information is selected from the table shown in FIGS. 7A and 7B from the encoding control unit 116, the intra unidirectional prediction image generation unit 108 or the intra bidirectional prediction image generation unit 109 is selected. Generates a prediction image 125 according to the prediction mode information. The encoding control unit 116 may specify the prediction mode information in order from the smallest prediction mode number, or may specify the prediction mode information in order from the largest. Further, the prediction mode may be limited according to the characteristics of the input image, or a predetermined prediction mode may be selected. It is not always necessary to specify all the prediction modes, and at least one prediction mode information may be specified for the encoding target block.
 例えば、符号化制御部116は、次の数式(3)に示すコスト関数を用いて最適な予測モードを判定する。 
Figure JPOXMLDOC01-appb-M000007
For example, the encoding control unit 116 determines an optimal prediction mode using a cost function shown in the following mathematical formula (3).
Figure JPOXMLDOC01-appb-M000007
 数式(3)において、OHは予測情報126(例えば、予測モード情報、動きベクトル情報、予測ブロックサイズ情報)に関する符号量の見積もり量(例えばシンボルを2値表現した値のビット数)を示し、SADは予測対象ブロックと予測画像125との間の差分絶対値和(即ち、予測誤差118の絶対値の累積和)を示す。また、λは量子化情報(量子化パラメータ)の値に基づいて決定されるラグランジュ未定乗数を示し、Kは符号化コストを示す。数式(3)を用いる場合には、符号化コストKを最小化する予測モードが発生符号量及び予測誤差の観点から最適な予測モードとして判定される。数式(3)の変形として、OHのみまたはSADのみから符号化コストを見積もってもよいし、SADにアダマール変換を施した値またはその近似値を利用して符号化コストを見積もってもよい。 In Equation (3), OH represents an estimated amount of code amount (for example, the number of bits of a value representing a symbol in binary) related to the prediction information 126 (for example, prediction mode information, motion vector information, and prediction block size information), and SAD Indicates the sum of absolute differences between the prediction target block and the predicted image 125 (that is, the cumulative sum of the absolute values of the prediction errors 118). Further, λ represents a Lagrange undetermined multiplier determined based on the value of quantization information (quantization parameter), and K represents an encoding cost. When Expression (3) is used, the prediction mode that minimizes the coding cost K is determined as the optimum prediction mode from the viewpoint of the generated code amount and the prediction error. As a modification of Equation (3), the encoding cost may be estimated from OH alone or SAD alone, or the encoding cost may be estimated using a value obtained by subjecting SAD to Hadamard transform or an approximate value thereof.
 また、図示しない仮符号化ユニットを用いることにより最適な予測モードを判定することも可能である。例えば、符号化制御部116は、次の数式(4)に示すコスト関数を用いて最適な予測モードを判定する。
Figure JPOXMLDOC01-appb-M000008
It is also possible to determine an optimal prediction mode by using a temporary encoding unit (not shown). For example, the encoding control unit 116 determines an optimal prediction mode using a cost function represented by the following mathematical formula (4).
Figure JPOXMLDOC01-appb-M000008
 数式(4)において、Dは予測対象ブロックと局所復号画像との間の二乗誤差和(即ち、符号化歪)を示し、Rは予測対象ブロックと予測モードの予測画像125との間の予測誤差について仮符号化によって見積もられた符号量を示し、Jは符号化コストを示す。数式(4)の符号化コストJを導出する場合には予測モード毎に仮符号化処理及び局部復号化処理が必要なので、回路規模または演算量が増大する。反面、より正確な符号化歪と符号量とに基づいて符号化コストJが導出されるので、最適な予測モードを高精度に判定して高い符号化効率を維持しやすい。尚、数式(4)の変形として、RのみまたはDのみから符号化コストを見積もってもよいし、RまたはDの近似値を利用して符号化コストを見積もってもよい。また、これらのコストを階層的に用いてもよい。符号化制御部116は、予測対象ブロックに関して事前に得られる情報(周囲の画素ブロックの予測モード、画像解析の結果など)に基づいて、数式(3)または数式(4)を用いた判定を行う予測モードの候補の数を、予め絞り込んでおいてもよい。 In Equation (4), D indicates a square error sum (ie, encoding distortion) between the prediction target block and the local decoded image, and R indicates a prediction error between the prediction target block and the prediction image 125 in the prediction mode. Indicates the amount of code estimated by provisional encoding, and J indicates the encoding cost. In order to derive the encoding cost J of Equation (4), provisional encoding processing and local decoding processing are required for each prediction mode, so that the circuit scale or the amount of calculation increases. On the other hand, since the encoding cost J is derived based on more accurate encoding distortion and code amount, it is easy to determine the optimal prediction mode with high accuracy and maintain high encoding efficiency. As a modification of Equation (4), the encoding cost may be estimated from only R or D, or the encoding cost may be estimated using an approximate value of R or D. These costs may be used hierarchically. The encoding control unit 116 performs determination using Expression (3) or Expression (4) based on information obtained in advance regarding the prediction target block (prediction mode of surrounding pixel blocks, results of image analysis, and the like). The number of prediction mode candidates may be narrowed down in advance.
 変換情報設定部112は、予測選択部113から出力され、予測選択スイッチ111を介して入力されてきた予測情報126を基に直交変換で用いる変換情報127を生成する機能を有する。 The conversion information setting unit 112 has a function of generating conversion information 127 used in orthogonal transformation based on the prediction information 126 output from the prediction selection unit 113 and input via the prediction selection switch 111.
 以上が、本発明の本実施の形態における画像符号化装置100の概略である。続いて、図9、図12、図13A、図13Bを用いて直交変換部102と逆直交変換部105の詳細説明を行い、図11A及び図11Bを用いて変換情報設定部112の詳細説明を行う。 The above is the outline of the image coding apparatus 100 in the present embodiment of the present invention. Subsequently, the orthogonal transform unit 102 and the inverse orthogonal transform unit 105 will be described in detail with reference to FIGS. 9, 12, 13A, and 13B, and the transform information setting unit 112 will be described in detail with reference to FIGS. 11A and 11B. Do.
 <直交変換部102> 
 直交変換部102は、選択スイッチA901、垂直変換部906、転置部904、選択スイッチB905及び水平変換部907を有する。垂直変換部906は、1D離散コサイン変換部902及び1D離散サイン変換部903を含む。水平変換部907は、1D離散コサイン変換部902及び1D離散サイン変換部903を含む。尚、垂直変換部906及び水平変換部907の順序は、一例であり、これらは逆順であっても構わない。
<Orthogonal transform unit 102>
The orthogonal transform unit 102 includes a selection switch A 901, a vertical conversion unit 906, a transposition unit 904, a selection switch B 905, and a horizontal conversion unit 907. The vertical transform unit 906 includes a 1D discrete cosine transform unit 902 and a 1D discrete sine transform unit 903. The horizontal conversion unit 907 includes a 1D discrete cosine conversion unit 902 and a 1D discrete cosine conversion unit 903. The order of the vertical conversion unit 906 and the horizontal conversion unit 907 is an example, and these may be reversed.
 1D離散コサイン変換部902と1D離散サイン変換部903は、入力される行列に対してそれぞれ離散コサイン変換或いは離散サイン変換のための1D変換行列を乗算する点で共通の機能を持つ。 The 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903 have a common function in that the input matrix is multiplied by a discrete cosine transform or a 1D transform matrix for discrete sine transform, respectively.
 選択スイッチA901は、1D変換インデックス952に含まれる垂直変換インデックス(Vertical_transform_idx)に従って、予測誤差118を1D離散コサイン変換部902及び1D離散サイン変換部903のうちのいずれか一方に導く。1D離散コサイン変換部902は、入力された予測誤差(行列)118に対して1D離散コサイン変換を行い、一時変換係数951を出力する。1D離散サイン変換部903は、入力された予測誤差(行列)118に対して1D離散サイン変換を行い、一時変換係数951を出力する。具体的には、1D離散コサイン変換部902及び1D離散サイン変換部903は、次の数式(5)に示す一次元の直交変換を行って、予測誤差(行列)118の垂直方向の相関を除去する。
Figure JPOXMLDOC01-appb-M000009
The selection switch A 901 guides the prediction error 118 to one of the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903 according to the vertical transform index (Vertical_transform_idx) included in the 1D transform index 952. The 1D discrete cosine transform unit 902 performs 1D discrete cosine transform on the input prediction error (matrix) 118 and outputs a temporary transform coefficient 951. The 1D discrete sine transform unit 903 performs 1D discrete sine transform on the input prediction error (matrix) 118 and outputs a temporary transform coefficient 951. Specifically, the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903 perform a one-dimensional orthogonal transform represented by the following formula (5) to remove the vertical correlation of the prediction error (matrix) 118. To do.
Figure JPOXMLDOC01-appb-M000009
ここで、1D離散コサイン変換部902は次の数式(6)で示される変換行列(i,j=0,1,2,…,N-1)を持ち、1D離散サイン変換部903は次の数式(7)で示される変換行列(i,j=1,2,3,…,N)を持つ。
Figure JPOXMLDOC01-appb-M000010
Figure JPOXMLDOC01-appb-M000011
Here, the 1D discrete cosine transform unit 902 has a transformation matrix (i, j = 0, 1, 2,..., N−1) represented by the following formula (6), and the 1D discrete cosine transform unit 903 has the following It has a transformation matrix (i, j = 1, 2, 3,..., N) expressed by Equation (7).
Figure JPOXMLDOC01-appb-M000010
Figure JPOXMLDOC01-appb-M000011
 数式(5)において、Xは予測誤差(行列)118の行列(N×N)を示し、Vは1D離散コサイン変換部902及び1D離散サイン変換部903(いずれもN×N)を包括的に示しており、Yは1D離散コサイン変換部902及び1D離散サイン変換部903の出力行列(N×N)を示す。数式(6)(7)に示される通り、変換行列Vは、例えば行列Xの垂直方向の相関を除去するために用意された離散コサイン変換基底或いは離散サイン変換基底を水平に並べたN×Nの変換行列である。 In Equation (5), X represents a matrix (N × N) of a prediction error (matrix) 118, and V comprehensively includes a 1D discrete cosine transform unit 902 and a 1D discrete sine transform unit 903 (both are N × N). Y indicates an output matrix (N × N) of the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903. As shown in the equations (6) and (7), the transformation matrix V is, for example, N × N in which discrete cosine transform bases or discrete sine transform bases prepared for removing the vertical correlation of the matrix X are arranged horizontally. Is the transformation matrix.
 転置部904は、垂直変換部906の出力行列(Y)の転置を行って、結果を選択スイッチB905に与える。但し、転置部904は、一例であって、対応するハードウェアを必ずしも用意しなくてもよい。例えば、垂直変換部906による1D直交変換(一次元直交変換)を実行した結果(垂直変換部906の出力行列の各要素)を保持しておき、水平変換部907による1D直交変換を実行するときに適切な順序で読み出せば、転置部904に対応するハードウェアを用意しなくても出力行列(Y)の転置を実行できる。 The transposition unit 904 transposes the output matrix (Y) of the vertical conversion unit 906, and gives the result to the selection switch B905. However, the transposing unit 904 is an example, and corresponding hardware may not necessarily be prepared. For example, when 1D orthogonal transformation (one-dimensional orthogonal transformation) by the vertical transformation unit 906 is executed (each element of the output matrix of the vertical transformation unit 906) is held, and 1D orthogonal transformation is performed by the horizontal transformation unit 907 If the data is read out in an appropriate order, the transposition of the output matrix (Y) can be executed without preparing the hardware corresponding to the transposition unit 904.
 選択スイッチB905は、1D変換インデックス952に含まれる水平変換インデックス(Horizontal_transform_idx)に従って、転置部904からの入力行列を1D離散コサイン変換部902及び1D離散サイン変換部903のうちのいずれか一方に導く。1D離散コサイン変換部902は、入力行列に対して離散コサイン変換を行い、変換係数119を出力する。1D離散サイン変換部903は、入力行列に対して離散サイン変換を行い、変換係数119を出力する。具体的には、1D離散コサイン変換部902及び1D離散サイン変換部903(即ち、水平変換部907)は、次の数式(8)に示す一次元の直交変換を行って、予測誤差の水平方向の相関を除去する。
Figure JPOXMLDOC01-appb-M000012
The selection switch B 905 guides the input matrix from the transposing unit 904 to either the 1D discrete cosine transform unit 902 or the 1D discrete sine transform unit 903 according to the horizontal transform index (Horizontal_transform_idx) included in the 1D transform index 952. The 1D discrete cosine transform unit 902 performs a discrete cosine transform on the input matrix and outputs a transform coefficient 119. The 1D discrete sine transform unit 903 performs discrete sine transform on the input matrix and outputs a transform coefficient 119. Specifically, the 1D discrete cosine transform unit 902 and the 1D discrete sine transform unit 903 (that is, the horizontal transform unit 907) perform a one-dimensional orthogonal transform represented by the following formula (8) to generate a horizontal direction of the prediction error. Remove the correlation.
Figure JPOXMLDOC01-appb-M000012
 数式(8)において、Hは1D離散コサイン変換行列及び1D離散サイン変換行列(いずれもN×N)を包括的に示しており、Zは1D離散コサイン変換部902或いは1D離散サイン変換部903の出力行列(N×N)を示しており、これは変換係数119を指す。具体的には、変換行列Hは、行列Yの垂直方向の相関を除去する離散コサイン変換行列若しくは離散サイン変換行列を水平に並べたN×Nの変換行列である。つまり、数式(6)の離散コサイン変換行列、若しくは数式(7)の離散サイン変換行列がそれぞれ対応する。 In Equation (8), H comprehensively represents a 1D discrete cosine transform matrix and a 1D discrete sine transform matrix (both N × N), and Z represents a 1D discrete cosine transform unit 902 or a 1D discrete sine transform unit 903. An output matrix (N × N) is shown, which refers to the transform coefficient 119. Specifically, the transformation matrix H is a transform matrix of N × N which the discrete cosine transform matrix or discrete sine transform matrix to remove the correlation in the vertical direction arranged horizontally in matrix Y T. That is, the discrete cosine transform matrix of Equation (6) or the discrete sine transform matrix of Equation (7) corresponds to each.
 以上のように、直交変換部102は、予測誤差(行列)118に対して、1D変換設定部908から出力された1D変換インデックス952に従って分離型の2D直交変換(二次元直交変換)を行い、変換係数(行列)119を生成する。尚、既存の直交変換を再利用する形で、1D離散コサイン変換部902をH.264/MPEG-4 AVCの離散コサイン変換に入れ替えてもよい。更に、直交変換部102は、DCTに加えて、アダマール変換、カルーネン・レーベ変換、などの種々の直交変換を実現してもよい。 As described above, the orthogonal transform unit 102 performs the separation-type 2D orthogonal transform (two-dimensional orthogonal transform) on the prediction error (matrix) 118 according to the 1D transform index 952 output from the 1D transform setting unit 908. A conversion coefficient (matrix) 119 is generated. Note that the 1D discrete cosine transform unit 902 may be replaced with a discrete cosine transform of H.264 / MPEG-4 変 換 AVC in a form that reuses an existing orthogonal transform. Further, the orthogonal transform unit 102 may implement various orthogonal transforms such as Hadamard transform and Karhunen-Loeve transform in addition to DCT.
 <直交変換の効果-イントラ単方向予測との関係> 
 ここで、1D離散コサイン変換部902と1D離散サイン変換部903との性質の差異について説明する。H.264/MPEG-4 AVCなどでサポートされるイントラ予測の予測モードには、予測対象ブロックの左側及び上側の一方または両方に隣接するライン上の参照画素群(参照画素ライン)を用いて補間処理(例えばフィルタ処理)した画素値を予測方向に沿ってコピーして予測画像を生成するものがある。係るイントラ予測の予測モードは、画像の空間的相関を利用するので、参照画素から予測対象画素の距離が大きくなるにつれて予測精度が低下する傾向にある。即ち、参照画素から予測対象画素の距離に応じて予測誤差の絶対値が増大し易い。尚、係る傾向は、予測方向によらず同様である。より具体的には、予測対象ブロックの左に隣接するライン上の参照画素群を用いて補間処理(例えばフィルタ処理)した画素値をコピーするイントラ予測モード(例えば、図4Aのモード1及びモード8、図5のIntraPredModeが1,8,9など)に関して、予測誤差は水平方向に係る傾向を示す。予測対象ブロックに上に隣接するライン上の参照画素群を用いて補間処理(例えばフィルタ処理)した画素値をコピーするイントラ予測モード(例えば、図4Aのモード0、モード3及びモード7、図5のIntraPredModeが0,5,6など)に関して、予測誤差は垂直方向に係る傾向を示す。更に、予測対象ブロックの左に隣接するライン及び上に隣接するライン上の参照画素群を用いて補間処理(例えばフィルタ処理)した画素値をコピーする予測モード(例えば、図4Aのモード4、モード5及びモード6、図5のIntraPredModeが3,4,7など)に関して、予測誤差は水平方向及び垂直方向に係る傾向を示す。概括すれば、予測画像の生成のために利用する参照画素群のラインと直交する方向に係る傾向を示すといえる。
<Effect of orthogonal transform-relationship with intra unidirectional prediction>
Here, the difference in properties between the 1D discrete cosine transform unit 902 and the 1D discrete cosine transform unit 903 will be described. Intra prediction modes supported by H.264 / MPEG-4 AVC, etc. are interpolated using a reference pixel group (reference pixel line) on a line adjacent to one or both of the left and upper sides of the prediction target block. Some of them generate a predicted image by copying processed pixel values (for example, filter processing) along the prediction direction. Since the prediction mode of the intra prediction uses the spatial correlation of the image, the prediction accuracy tends to decrease as the distance from the reference pixel to the prediction target pixel increases. That is, the absolute value of the prediction error tends to increase according to the distance from the reference pixel to the prediction target pixel. This tendency is the same regardless of the prediction direction. More specifically, an intra prediction mode (for example, mode 1 and mode 8 in FIG. 4A) for copying a pixel value subjected to interpolation processing (for example, filter processing) using a reference pixel group on a line adjacent to the left of the prediction target block. For IntraPredMode of FIG. 5, 1, 8, 9, etc.), the prediction error shows a tendency in the horizontal direction. Intra prediction mode (for example, mode 0, mode 3 and mode 7 in FIG. 4A, FIG. 5) that copies pixel values that have undergone interpolation processing (for example, filter processing) using a reference pixel group on a line adjacent to the prediction target block. IntraPredMode of 0, 5, 6, etc.), the prediction error shows a tendency in the vertical direction. Further, a prediction mode (for example, mode 4, mode 4 in FIG. 4A) that copies pixel values interpolated (for example, filtered) using the reference pixel group on the line adjacent to the left of the prediction target block and the line adjacent above. 5 and mode 6 and IntraPredMode in FIG. 5 is 3, 4, 7, etc.), the prediction error shows a tendency related to the horizontal direction and the vertical direction. In summary, it can be said that the tendency is related to the direction orthogonal to the line of the reference pixel group used for generating the predicted image.
 係る傾向を示す場合、1D離散サイン変換部903は、1D離散コサイン変換部902に比べて、上記直交する方向(垂直方向または水平方向)について1D直交変換を行う際の係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)特性を持つ。一方、1D離散コサイン変換部902は、このような性質を持たない汎用的な変換行列である。1D離散サイン変換を用いて、上記直交する方向について1D直交変換を行えば、イントラ予測の予測誤差の変換効率が向上し、ひいては符号化効率が向上する。例えば、モード0(垂直方向予測)の予測誤差信号は、垂直方向には上記傾向を示す一方、水平方向には上記傾向を示さない。故に、垂直変換部906において1D離散サイン変換部903を用いて1D直交変換を行い、水平変換部907において1D離散コサイン変換部902を用いて1D直交変換を行うことにより、効率的な直交変換を実現できる。 When showing such a tendency, the 1D discrete sine transform unit 903 has a higher coefficient density when performing 1D orthogonal transform in the orthogonal direction (vertical direction or horizontal direction) than the 1D discrete cosine transform unit 902 ( That is, the non-zero coefficient ratio in the quantized transform coefficient 121 is reduced). On the other hand, the 1D discrete cosine transform unit 902 is a general-purpose transform matrix that does not have such properties. If 1D orthogonal transformation is performed in the orthogonal direction using 1D discrete sine transformation, the prediction error conversion efficiency of intra prediction is improved, and consequently the coding efficiency is improved. For example, a prediction error signal in mode 0 (vertical prediction) shows the above tendency in the vertical direction but does not show the above tendency in the horizontal direction. Therefore, by performing 1D orthogonal transform using the 1D discrete sine transform unit 903 in the vertical transform unit 906 and performing 1D orthogonal transform using the 1D discrete cosine transform unit 902 in the horizontal transform unit 907, efficient orthogonal transform is performed. realizable.
 <単方向予測と双方向予測に対する直交変換の違い> 
 次に、図10A~Eを用いてイントラ単方向予測画像生成部108及び双方向予測画像生成部109で生成される予測画像125の特徴の違いと予測誤差の傾向について説明する。イントラ単方向予測画像生成部108で生成される予測画像125は、入力画像117の空間的な方向相関を除去する効果がある。一般的には画像の空間相関は距離が近いほど高く、距離が離れるほど低下する。このため、予測方向に対して参照画素と予測対処画素の距離が近いほど予測誤差は小さく、距離が遠いほど予測誤差は大きくなる。図10Aは図4Aのモード0に対応する予測方向と統計的にみられる一般的な予測誤差の傾向の一例を表している。前述の通り、垂直方向の予測誤差は、参照画素からの距離が離れるほど増大する一方、水平方向の予測誤差は同じ大きさであることが判る。この場合、1D垂直変換としてDSTを選択し、1D水平変換としてDCTを選択することで空間相関を効率良く除去することができる。図10Bは図4Aにおけるモード1に対応する予測方向と統計的にみられる一般的な予測画素の傾向の一例を表している。垂直方向の予測誤差は同じ大きさである一方で、水平方向の予測誤差は参照画素からの距離が離れるほど増大することが判る。この場合、1D垂直変換としてDCTを選択し、1D水平変換としてDSTを選択することで空間相関を効率良く除去することができる。図10Cは図4Aにおけるモード4に対応する予測方向と統計的にみられる一般的な予測誤差の傾向の一例を表している。垂直方向の予測誤差及び水平方向の予測誤差は、予測方向の起点となる参照画素からの距離が離れるに従ってともに増大していることが判る。この場合、1D垂直変換としてDSTを選択し、1D水平変換としてDSTを選択することで空間相関を効率良く除去することができる。
<Difference between orthogonal transformation for unidirectional prediction and bidirectional prediction>
Next, differences in characteristics of prediction images 125 generated by the intra unidirectional prediction image generation unit 108 and the bidirectional prediction image generation unit 109 and the tendency of prediction errors will be described with reference to FIGS. 10A to 10E. The predicted image 125 generated by the intra unidirectional predicted image generation unit 108 has an effect of removing the spatial direction correlation of the input image 117. In general, the spatial correlation of an image is higher as the distance is shorter, and decreases as the distance is longer. For this reason, the prediction error is smaller as the distance between the reference pixel and the prediction coping pixel is closer to the prediction direction, and the prediction error is larger as the distance is longer. FIG. 10A shows an example of a general prediction error tendency statistically seen as a prediction direction corresponding to mode 0 in FIG. 4A. As described above, the prediction error in the vertical direction increases as the distance from the reference pixel increases, while the prediction error in the horizontal direction has the same magnitude. In this case, the spatial correlation can be efficiently removed by selecting DST as 1D vertical conversion and selecting DCT as 1D horizontal conversion. FIG. 10B shows an example of a general prediction pixel tendency statistically seen as a prediction direction corresponding to mode 1 in FIG. 4A. It can be seen that while the vertical prediction error is the same size, the horizontal prediction error increases as the distance from the reference pixel increases. In this case, spatial correlation can be efficiently removed by selecting DCT as 1D vertical conversion and selecting DST as 1D horizontal conversion. FIG. 10C shows an example of the prediction direction corresponding to mode 4 in FIG. It can be seen that the prediction error in the vertical direction and the prediction error in the horizontal direction both increase as the distance from the reference pixel that is the starting point in the prediction direction increases. In this case, spatial correlation can be efficiently removed by selecting DST as 1D vertical conversion and selecting DST as 1D horizontal conversion.
 双方向予測画像生成部109は2つの予測方向を重み付き平均する予測画像生成手法である。このため、2つの予測方向の特性を維持しつつ空間的になだらかに変化する相関を除去する効果がある。図10Dは図4Aにおけるモード1とモード8を用いた場合の統計的にみられる一般的な予測誤差の傾向の一例を表している。いずれのモードも、参照画素ラインとして予測対象ブロックの左に位置するラインのみから予測される。このため、垂直方向の予測誤差は同じ大きさである一方で、水平方向の予測誤差は参照画素からの距離が離れるほど増大することが判る。この場合、1D垂直変換としてDCTを選択し、1D水平変換としてDSTを選択することで空間相関を効率良く除去することができる。図10Eは図4Aにおけるモード0とモード1を用いた場合の統計的にみられる一般的な予測誤差の傾向の一例を表している。モード0は、予測対象ブロックの上に位置する参照ラインを利用し、モード1は、予測対象ブロックの左に位置する参照ラインを利用する。この場合の予測誤差は、図10Cで説明したイントラ単方向予測の予測誤差と似た傾向を持ち、垂直方向の予測誤差及び水平方向の予測誤差は、予測方向の起点となる左及び上の参照画素からの距離が離れるに従ってともに増大していることが判る。しかし、非特許文献1に示されるように、選択された2つの予測モードに従って1D垂直変換と1D水平変換を選択した場合、図10A或いは図10Bのいずれかの変換が指定され、符号化効率が低下する問題が生じる。そこで、本発明の本実施の形態では、図10Eの右下の示されるように1D垂直変換としてDSTを選択し、1D水平変換としてDSTを選択することで空間相関を効率良く除去することができる。 The bidirectional prediction image generation unit 109 is a prediction image generation method that averages two prediction directions with weights. For this reason, there is an effect of removing the correlation that changes smoothly in space while maintaining the characteristics of the two prediction directions. FIG. 10D shows an example of a general tendency of prediction error seen statistically when mode 1 and mode 8 in FIG. 4A are used. In any mode, the prediction is performed only from the line positioned to the left of the prediction target block as the reference pixel line. Therefore, it can be seen that the prediction error in the vertical direction is the same size, but the prediction error in the horizontal direction increases as the distance from the reference pixel increases. In this case, spatial correlation can be efficiently removed by selecting DCT as 1D vertical conversion and selecting DST as 1D horizontal conversion. FIG. 10E shows an example of a general tendency of prediction error seen statistically when mode 0 and mode 1 in FIG. 4A are used. Mode 0 uses a reference line located above the prediction target block, and mode 1 uses a reference line located to the left of the prediction target block. The prediction error in this case has a tendency similar to the prediction error of the intra unidirectional prediction described with reference to FIG. 10C, and the prediction error in the vertical direction and the prediction error in the horizontal direction are the left and upper references that are the starting points of the prediction direction. It can be seen that both increase as the distance from the pixel increases. However, as shown in Non-Patent Document 1, when 1D vertical conversion and 1D horizontal conversion are selected according to the two selected prediction modes, either the conversion of FIG. 10A or FIG. 10B is specified, and the encoding efficiency is increased. The problem of deteriorating arises. Therefore, in the present embodiment of the present invention, as shown in the lower right of FIG. 10E, spatial correlation can be efficiently removed by selecting DST as 1D vertical conversion and selecting DST as 1D horizontal conversion. .
 <平面予測に関する直交変換の効果> 
 図11Aに示す通り、PredModeが2を示すときはIntra_DCが指定される。Intra_DCは、利用可能な参照画素の平均値で予測するDC予測を示している。DC予測の予測誤差は、統計的に上述したような方向性の誤差が生じないため、H.264/MPEG-4 AVCで用いられるDCTを選択する。一方、双方向イントラ予測の場合に、2つの予測モードのうちの1つがIntra_DCであった場合、それ以外の予測モードの予測方向に従って、予測誤差の傾向が変化する。そこで、このような場合は、もう一方の予測モードで定められたTransformIdxを設定することによって、予測誤差の冗長性を効率的に削減することが可能となる。例えば、図11A及び図11Bに示す通り、PredModeが34の場合、PredModeが2とPredModeが0の2つの予測モードで双方向イントラ予測が行われる。1つ目がIntra_DCであるため、もう片方のPredMode=0が保持するTransformIdx=2と同じTransformIdxがPredMode=34で選択される。ここでは、DC予測についてのみ説明したが、このような方向予測ではない予測モードが選択された場合にも同様な枠組みでTransformIdxを設定すればよい。尚、双方向イントラ予測の2つの予測モードがいずれも方向予測でない場合はDCTを選択する。
<Effect of orthogonal transformation on plane prediction>
As shown in FIG. 11A, when PredMode indicates 2, Intra_DC is designated. Intra_DC indicates DC prediction that is predicted by the average value of available reference pixels. As the prediction error of DC prediction, the directional error as described above does not occur statistically, so the DCT used in H.264 / MPEG-4 AVC is selected. On the other hand, in the case of bidirectional intra prediction, if one of the two prediction modes is Intra_DC, the tendency of the prediction error changes according to the prediction direction of the other prediction modes. Therefore, in such a case, it is possible to efficiently reduce the redundancy of the prediction error by setting TransformIdx determined in the other prediction mode. For example, as illustrated in FIGS. 11A and 11B, when PredMode is 34, bidirectional intra prediction is performed in two prediction modes with PredMode of 2 and PredMode of 0. Since the first is Intra_DC, the same TransformIdx as TransformIdx = 2 held by the other PredMode = 0 is selected with PredMode = 34. Although only DC prediction has been described here, TransformIdx may be set in a similar framework even when a prediction mode that is not such direction prediction is selected. Note that DCT is selected when the two prediction modes of bidirectional intra prediction are not directional prediction.
 <逆直交変換部105> 
 以下、図12を用いて本実施形態に係る逆直交変換部105の詳細を説明する。 
 逆直交変換部105は、選択スイッチA1201、垂直逆変換部1206、転置部1204、選択スイッチB1205及び水平逆変換部1207を有する。垂直逆変換部1206は、1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203を含む。水平逆変換部1207は、1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203を含む。尚、垂直逆変換部1206及び水平逆変換部1207の順序は、一例であり、これらは逆順であっても構わない。
<Inverse orthogonal transform unit 105>
Hereinafter, the details of the inverse orthogonal transform unit 105 according to the present embodiment will be described with reference to FIG.
The inverse orthogonal transform unit 105 includes a selection switch A 1201, a vertical inverse transform unit 1206, a transposition unit 1204, a selection switch B 1205, and a horizontal inverse transform unit 1207. The vertical inverse transform unit 1206 includes a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform unit 1203. The horizontal inverse transform unit 1207 includes a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform unit 1203. Note that the order of the vertical inverse transform unit 1206 and the horizontal inverse transform unit 1207 is an example, and these may be reversed.
 図中に示される2つの1D逆離散コサイン変換部1202は、物理的に同一のハードウェアを時分割で使用することによっても実現可能である。また、1D逆離散サイン変換部1203も同様である。 The two 1D inverse discrete cosine transform units 1202 shown in the figure can also be realized by using physically identical hardware in a time division manner. The same applies to the 1D inverse discrete sine transform unit 1203.
 選択スイッチA1201は、1D変換設定部1208から出力される1D変換インデックス1252に含まれる垂直変換インデックス(Vertical_transform_idx)に従って、復元変換係数121を1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203のうちのいずれか一方に導く。1D逆離散コサイン変換部1202は、入力された復元変換係数121(行列形式)に対して離散コサイン変換行列の転置行列を乗算して出力する。1D逆離散サイン変換部1203は、入力された復元変換係数121に対して離散サイン変換行列の転置行列を乗算して出力する。具体的には、1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203(即ち、垂直逆変換部1206)は、次の数式(9)に示す一次元の逆直交変換を行う。
Figure JPOXMLDOC01-appb-M000013
The selection switch A 1201 converts the restored transform coefficient 121 of the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 according to the vertical transform index (Vertical_transform_idx) included in the 1D transform index 1252 output from the 1D transform setting unit 1208. Lead to one of them. The 1D inverse discrete cosine transform unit 1202 multiplies the input restoration transform coefficient 121 (matrix format) by a transposed matrix of the discrete cosine transform matrix and outputs the result. The 1D inverse discrete sine transform unit 1203 multiplies the input restoration transform coefficient 121 by the transposed matrix of the discrete sine transform matrix and outputs the result. Specifically, the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 (that is, the vertical inverse transform unit 1206) perform a one-dimensional inverse orthogonal transform represented by the following equation (9).
Figure JPOXMLDOC01-appb-M000013
 数式(9)において、Z'は復元変換係数121の行列(N×N)を示し、Vは1D逆離散コサイン変換行列及び1D逆離散サイン変換行列(いずれもN×N)の転置行列を包括的に示しており、Y'は1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203の出力行列(N×N)を示す。つまり、Vは数式(6)の離散コサイン変換行列、若しくは数式(7)の離散サイン変換行列がそれぞれ対応する。 In Equation (9), a Z 'represents a matrix of restoring conversion coefficient 121 (N × N), V T is the transpose matrix of 1D inverse discrete cosine transform matrix and 1D inverse discrete sine transform matrix (both N × N) Y ′ indicates an output matrix (N × N) of the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203. That, V T is the discrete cosine transform matrix in Equation (6), or a discrete sine transform matrix equation (7) corresponds, respectively.
 転置部1204は、垂直逆変換部1206の出力行列(Y')の転置を行って、選択スイッチB1205に与える。但し、転置部1204は、一例であって、対応するハードウェアを必ずしも用意しなくてもよい。例えば、垂直逆変換部1206による1D逆直交変換(一次元逆直交変換)を実行した結果(垂直逆変換部1206の出力行列の各要素)を保持しておき、水平逆変換部1207による1D逆直交変換を実行するときに適切な順序で読み出せば、転置部1204に対応するハードウェアを用意しなくても出力行列(Y')の転置を実行できる。 The transposition unit 1204 transposes the output matrix (Y ′) of the vertical inverse transform unit 1206 and supplies the transposition to the selection switch B 1205. However, the transposition unit 1204 is an example, and corresponding hardware may not necessarily be prepared. For example, the result (one element of the output matrix of the vertical inverse transform unit 1206) obtained by executing the 1D inverse orthogonal transform (one-dimensional inverse orthogonal transform) by the vertical inverse transform unit 1206 is held, and the 1D inverse by the horizontal inverse transform unit 1207 is held. If reading is performed in an appropriate order when performing orthogonal transformation, transposition of the output matrix (Y ′) can be performed without preparing hardware corresponding to the transposition unit 1204.
 選択スイッチB1205は、1D変換設定部1208から出力される1D変換インデックス1252に含まれる水平変換インデックス(Horizontal_transform_idx)に従って、転置部1204からの入力行列を1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203のうちのいずれか一方に導く。1D逆離散コサイン変換部1202は、入力行列に対して1D逆離散コサイン変換を行い、結果を出力する。1D逆離散サイン変換部1203は、入力行列に対して1D逆離散サイン変換を行い、結果を出力する。具体的には、1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203(即ち、水平逆変換部1207)は、次の数式(10)に示す一次元の逆直交変換を行う。
Figure JPOXMLDOC01-appb-M000014
The selection switch B 1205 converts the input matrix from the transposition unit 1204 into the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform according to the horizontal transformation index (Horizontal_transform_idx) included in the 1D transformation index 1252 output from the 1D transformation setting unit 1208. Lead to one of the sections 1203. The 1D inverse discrete cosine transform unit 1202 performs 1D inverse discrete cosine transform on the input matrix and outputs the result. The 1D inverse discrete sine transform unit 1203 performs 1D inverse discrete sine transform on the input matrix and outputs the result. Specifically, the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 (that is, the horizontal inverse transform unit 1207) perform a one-dimensional inverse orthogonal transform represented by the following formula (10).
Figure JPOXMLDOC01-appb-M000014
 数式(10)において、Hは1D離散コサイン変換行列及び1D離散サイン変換行列(いずれもN×N)の転置行列を包括的に示しており、X'は1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203の出力行列(N×N)を示しており、これは復元予測誤差122を指す。つまり、Hは数式(6)の離散コサイン変換行列、若しくは数式(7)の離散サイン変換行列がそれぞれ対応する。 In Equation (10), H T is 1D are generically indicates a transposed matrix of the discrete cosine transform matrix and 1D discrete sine transform matrix (both N × N), X 'is 1D inverse discrete cosine transform unit 1202 and 1D An output matrix (N × N) of the inverse discrete sine transform unit 1203 is shown, which indicates the restored prediction error 122. That, H T is the discrete cosine transform matrix in Equation (6), or a discrete sine transform matrix equation (7) corresponds, respectively.
 以上のように、逆直交変換部105は、復元変換係数(行列)121に対して、入力された直交変換情報127に従って逆直交変換を行い、復元予測誤差(行列)122を生成する。尚、既存の逆直交変換を再利用する形で、1D逆離散コサイン変換部1202をH.264/MPEG-4 AVCの逆離散コサイン変換に入れ替えてもよい。更に、逆直交変換部105は、アダマール変換、カルーネン・レーベ変換、などの種々の逆直交変換を実現してもよい。いずれにしても直交変換部102と対応する逆直交変換が選択されればよい。 As described above, the inverse orthogonal transform unit 105 performs inverse orthogonal transform on the reconstructed transform coefficient (matrix) 121 according to the input orthogonal transform information 127 to generate a reconstructed prediction error (matrix) 122. Note that the 1D inverse discrete cosine transform unit 1202 may be replaced with an inverse discrete cosine transform of H.264 / MPEG-4 AVC by reusing the existing inverse orthogonal transform. Further, the inverse orthogonal transform unit 105 may realize various inverse orthogonal transforms such as Hadamard transform and Karhunen-Loeve transform. In any case, an inverse orthogonal transform corresponding to the orthogonal transform unit 102 may be selected.
 以下、未説明であった図9の1D変換設定部908及び図12の1D変換設定部1208についての詳細を説明する。これら2つは同一の機能を有するため、図12の1D変換設定部1208として説明する。1D変換設定部1208は、直交変換情報127に基づいて、垂直直交変換及び垂直逆直交変換のために使用される変換行列を選択するための1D変換インデックスと、水平直交変換及び水平逆直交変換のために使用される変換行列を選択するための1D変換インデックスとを設定する機能を有する。1D変換インデックス1252は、垂直直交変換及び水平直交変換でそれぞれ選択される直交変換を直接的または間接的に示す。 Hereinafter, details of the 1D conversion setting unit 908 in FIG. 9 and the 1D conversion setting unit 1208 in FIG. 12 that have not been described will be described. Since these two have the same function, they will be described as the 1D conversion setting unit 1208 in FIG. Based on the orthogonal transformation information 127, the 1D transformation setting unit 1208 selects a transformation matrix used for vertical orthogonal transformation and vertical inverse orthogonal transformation, and performs horizontal orthogonal transformation and horizontal inverse orthogonal transformation. And a function of setting a 1D conversion index for selecting a conversion matrix to be used. The 1D transform index 1252 directly or indirectly indicates the orthogonal transform selected by the vertical orthogonal transform and the horizontal orthogonal transform, respectively.
 例えば、1D変換インデックス1252は、図13Aに示す変換インデックス(TransformIdx)と垂直或いは水平方向の1D直交変換(それぞれVertical_transform_idx、Horizontal_transform_idx)で表現することができる。図13Aのテーブルを参照すれば、変換インデックスから垂直変換部のための1D変換インデックス(Vertical_transform_idx)及び水平変換部のための1D変換インデックス(Horizontal_transform_idx)を導出できる。また、図13Bでは、それぞれのidxが離散コサイン変換か離散サイン変換のいずれを指しているかを示している。idxが「1」の場合は、離散サイン変換行列(DST)を指し、「0」である場合は離散コサイン変換行列(DCT)を指す。本図において、例えば、直交変換情報127に含まれるTransformIdxに基づいて対応する1D変換インデックス1252が参照され、選択スイッチAにVertical_transform_idxが、選択スイッチBにHorizontal_transform_idxが出力される。例えば、Vertical_transform_idx或いはHorizontal_transform_idxが図13Bを参照してDCTを指す場合、選択スイッチは出力端を1D逆離散コサイン変換部1202(もしくは1D離散コサイン変換部902)へと接続する。Vertical_transform_idx或いはHorizontal_transform_idxが図13Bを参照してDSTを指す場合、選択スイッチは出力端を1D逆離散サイン変換部1203(もしくは1D離散サイン変換部903)へと接続する。 For example, the 1D transform index 1252 can be expressed by a transform index (TransformIdx) shown in FIG. 13A and a 1D orthogonal transform in the vertical or horizontal direction (Vertical_transform_idx and Horizontal_transform_idx, respectively). With reference to the table in FIG. 13A, a 1D transformation index (Vertical_transform_idx) for a vertical transformation unit and a 1D transformation index (Horizontal_transform_idx) for a horizontal transformation unit can be derived from the transformation index. Further, FIG. 13B shows whether each idx indicates discrete cosine transform or discrete sine transform. When idx is “1”, it indicates a discrete sine transform matrix (DST), and when it is “0”, it indicates a discrete cosine transform matrix (DCT). In this figure, for example, the corresponding 1D transform index 1252 is referenced based on TransformIdx included in the orthogonal transform information 127, and Vertical_transform_idx is output to the selection switch A and Horizontal_transform_idx is output to the selection switch B. For example, when Vertical_transform_idx or Horizontal_transform_idx indicates DCT with reference to FIG. 13B, the selection switch connects the output end to the 1D inverse discrete cosine transform unit 1202 (or 1D discrete cosine transform unit 902). When Vertical_transform_idx or Horizontal_transform_idx indicates DST with reference to FIG. 13B, the selection switch connects the output end to the 1D inverse discrete sine transform unit 1203 (or 1D discrete sine transform unit 903).
 次に、直交変換情報について説明する。直交変換情報は、予め定められた変換インデックスと予測モードのマップを参照して、選択された予測モードに対応する変換インデックスを間接的及び直接的に示す。図11A及び図11Bに予測モードと変換インデックスとの関係を示す。図11A及び図11Bは、図7A及び図7Bで示したイントラ予測モードにTransformIdxを追記したものである。この表から、選択された予測モードに従って、TransformIdxを導出することができる。各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D離散コサイン変換行列または1D離散サイン変換行列を適用することにより、安定的に高い変換効率が達成される。 Next, orthogonal transformation information will be described. The orthogonal transform information indirectly and directly indicates a transform index corresponding to the selected prediction mode with reference to a predetermined transform index and prediction mode map. 11A and 11B show the relationship between the prediction mode and the conversion index. 11A and 11B are obtained by adding TransformIdx to the intra prediction mode shown in FIGS. 7A and 7B. From this table, TransformIdx can be derived according to the selected prediction mode. By classifying the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-mentioned tendency, and adaptively applying a 1D discrete cosine transform matrix or 1D discrete sine transform matrix for each of the vertical direction and the horizontal direction, High conversion efficiency is achieved stably.
 <予測画像生成~直交変換の処理フロー> 
 次に、図14を用いて予測画像生成処理から直交変換処理までの処理を説明する。先ず(S1401)、符号化制御部116の選択によって予測選択部113で、当該予測モードがイントラ予測かどうかを判断する(S1402)。係る判断がNoの場合、従来通りインター予測処理が行われる。係る判断がYesの場合、予測選択部113は次に当該予測モードが双方向イントラ予測かどうかを判断する(S1403)。係る判断がNoの場合、単方向の予測モードが予測選択部113に設定後(S1404)に出力され、予測選択スイッチ111に入力される。予測選択スイッチ111は、スイッチの入力端をイントラ単方向予測画像生成部108へと接続し、イントラ単方向予測画像生成部108で生成された予測画像125が出力される(S1405)。予測選択部113で設定された単方向予測の予測モードを示す予測情報126は変換情報設定部112へと入力される。変換情報設定部112は、図11A及び図11Bに示されるLUTを参照し、選択された予測モードの変換情報127(TransformIdx)を出力する(S1406)。
<Prediction image generation to orthogonal transform processing flow>
Next, processing from predicted image generation processing to orthogonal transformation processing will be described with reference to FIG. First (S1401), the prediction selection unit 113 determines whether the prediction mode is intra prediction based on the selection of the encoding control unit 116 (S1402). When the determination is No, the inter prediction process is performed as usual. If the determination is Yes, the prediction selection unit 113 next determines whether the prediction mode is bidirectional intra prediction (S1403). When the determination is No, the unidirectional prediction mode is output to the prediction selection unit 113 after being set (S1404) and input to the prediction selection switch 111. The prediction selection switch 111 connects the input end of the switch to the intra unidirectional prediction image generation unit 108, and the prediction image 125 generated by the intra unidirectional prediction image generation unit 108 is output (S1405). Prediction information 126 indicating the prediction mode of unidirectional prediction set by the prediction selection unit 113 is input to the conversion information setting unit 112. The transformation information setting unit 112 refers to the LUT shown in FIGS. 11A and 11B and outputs the transformation information 127 (TransformIdx) of the selected prediction mode (S1406).
 S1403の係る判断がYesの場合、予測選択部113は、2つの予測モードを設定し(S1407)、予測選択スイッチ111に出力する。図11A及び図11Bを参照すると、双方向予測の場合には予測モードを示す1つのPreModeに2つの予測モードが含まれている。例えばPredModeが34の場合、PredModeが2とPredModeが0の2つの予測モードで双方向イントラ予測が行われる。すなわち、予測モードと呼ぶ場合には、2つの予測モードが含まれる場合があるが、ここでは予測モードと言う場合には「PredTypeLX」(予測タイプ)及び「PredAngleIdLX」(予測角度)の2つによって指定されるモードを示す。したがって、単方向予測の場合には1つのPredModeに対し1つの予測モードが指定され、双方向予測の場合には1つのPredModeに対し2つの予測モードが指定される。予測選択スイッチ111は、スイッチの入力端をイントラ双方向予測画像生成部109へと接続し、予測選択スイッチ111は、スイッチの入力端をイントラ双方向予測画像生成部109へと接続し、イントラ双方向予測画像生成部109で生成された予測画像125が出力される(S1408)。予測選択部113で設定された双方向予測の予測モードを示す予測情報126は変換情報設定部112へと入力される。変換情報設定部112は、設定された2つの予測モードの参照画素ラインが異なるかどうかを判断する(S1409)。係る判断がYesの場合、Vertical_transform_idxとHorizontal_transform_idxがそれぞれDSTを選択するように予測モードの変換情報127(TransformIdx)を出力する(S1410)。係る判断がNoの場合、変換情報設定部112は、設定された2つの予測モード番号の小さい方が持つ変換情報127(TransformIdx)を出力する(S1411)。 If the determination in S1403 is Yes, the prediction selection unit 113 sets two prediction modes (S1407) and outputs the prediction mode to the prediction selection switch 111. Referring to FIGS. 11A and 11B, in the case of bi-directional prediction, two prediction modes are included in one PreMode indicating the prediction mode. For example, when PredMode is 34, bidirectional intra prediction is performed in two prediction modes in which PredMode is 2 and PredMode is 0. That is, when calling the prediction mode, there are cases where two prediction modes are included, but here when referring to the prediction mode, there are two “PredTypeLX” (prediction type) and “PredAngleIdLX” (prediction angle). Indicates the specified mode. Therefore, in the case of unidirectional prediction, one prediction mode is designated for one PredMode, and in the case of bidirectional prediction, two prediction modes are designated for one PredMode. The prediction selection switch 111 connects the input end of the switch to the intra bidirectional prediction image generation unit 109, and the prediction selection switch 111 connects the input end of the switch to the intra bidirectional prediction image generation unit 109. The predicted image 125 generated by the directional predicted image generation unit 109 is output (S1408). Prediction information 126 indicating the prediction mode of bidirectional prediction set by the prediction selection unit 113 is input to the conversion information setting unit 112. The conversion information setting unit 112 determines whether the reference pixel lines in the two set prediction modes are different (S1409). If the determination is Yes, the prediction mode transformation information 127 (TransformIdx) is output so that Vertical_transform_idx and Horizontal_transform_idx select DST, respectively (S1410). When the determination is No, the conversion information setting unit 112 outputs the conversion information 127 (TransformIdx) possessed by the smaller of the two set prediction mode numbers (S1411).
 直交変換部102内の1D変換設定部908及び逆直交変換部105内の1D変換設定部1208は、入力されてきた変換情報127に従って、図13A及び図13Bを参照し、Vertical_transform_idxとHorizontal_transform_idxを導出する。Vertical_transform_idxは選択スイッチA901及び1201に入力され、スイッチの出力端を1D離散コサイン変換部902(若しくは1D逆離散コサイン変換部1202)或いは1D離散サイン変換部903(若しくは1D逆離散サイン変換部1203)に接続する。Horizontal_transform_idxは選択スイッチB905及び605に入力され、スイッチの出力端を1D離散コサイン変換部902(若しくは1D逆離散コサイン変換部1202)或いは1D離散サイン変換部903(若しくは1D逆離散サイン変換部1203)に接続する(S1412)。 The 1D transformation setting unit 908 in the orthogonal transformation unit 102 and the 1D transformation setting unit 1208 in the inverse orthogonal transformation unit 105 derive Vertical_transform_idx and Horizontal_transform_idx by referring to FIGS. 13A and 13B according to the inputted transformation information 127. . Vertical_transform_idx is input to the selection switches A 901 and 1201, and the output terminal of the switch is input to the 1D discrete cosine transform unit 902 (or 1D inverse discrete cosine transform unit 1202) or 1D discrete sine transform unit 903 (or 1D inverse discrete sine transform unit 1203). Connecting. Horizontal_transform_idx is input to the selection switches B905 and 605, and the output end of the switch is input to the 1D discrete cosine transform unit 902 (or 1D inverse discrete cosine transform unit 1202) or 1D discrete sine transform unit 903 (or 1D inverse discrete sine transform unit 1203). Connect (S1412).
 予測誤差118が直交変換部102に入力され、設定された変換行列を用いて直交変換処理が行われる(S1413)。直交変換後の変換係数119が量子化部103へと出力される(S1414)。 The prediction error 118 is input to the orthogonal transformation unit 102, and orthogonal transformation processing is performed using the set transformation matrix (S1413). The transform coefficient 119 after the orthogonal transform is output to the quantization unit 103 (S1414).
 ここでは、S1409にて2つの予測モードの参照画素ラインが異なるかどうかの判断を都度行うように説明したが、予測モードの組み合わせは予め定めておけばよく、図11A及び図11Bのように双方に対応したLUTを保持することで判断に必要な処理を省略することが可能である。 Here, it has been described in S1409 that it is determined whether or not the reference pixel lines of the two prediction modes are different from each other. However, the combination of the prediction modes may be determined in advance, as shown in FIGS. 11A and 11B. It is possible to omit the processing necessary for the determination by holding the LUT corresponding to.
 ここでは、直交変換処理の処理フローについて説明したが、逆直交変換部105についても同様の処理手順で1D変換設定部1208がVertical_transform_idxとHorizontal_transform_idxを設定する。復元変換係数121が逆直交変換部105に入力され、設定された変換行列を用いて逆直交変換処理が行われる。その後、復元予測誤差122が加算部106へと出力される。 
 以上が本発明の本実施の形態に関わる予測画像生成処理及び直交変換処理、逆直交変換処理の処理フローの説明である。
Here, the processing flow of the orthogonal transformation processing has been described, but the 1D transformation setting unit 1208 also sets Vertical_transform_idx and Horizontal_transform_idx in the same processing procedure for the inverse orthogonal transformation unit 105. The restored transform coefficient 121 is input to the inverse orthogonal transform unit 105, and an inverse orthogonal transform process is performed using the set transform matrix. Thereafter, the restoration prediction error 122 is output to the adding unit 106.
The above is the description of the process flow of the predicted image generation process, the orthogonal transform process, and the inverse orthogonal transform process according to the present embodiment of the present invention.
 <シンタクス構成> 
 以下、図1の画像符号化装置100が利用するシンタクスについて説明する。 
 シンタクスは、画像符号化装置が動画像データを符号化する際の符号化データ(例えば、図1の符号化データ128)の構造を示している。この符号化データを復号化する際に、同じシンタクス構造を参照して動画像復号化装置がシンタクス解釈を行う。図1の画像符号化装置が利用するシンタクス1500を図15に例示する。
<Syntax configuration>
Hereinafter, the syntax used by the image coding apparatus 100 in FIG. 1 will be described.
The syntax indicates the structure of encoded data (for example, encoded data 128 in FIG. 1) when the image encoding apparatus encodes moving image data. When decoding the encoded data, the moving picture decoding apparatus interprets the syntax with reference to the same syntax structure. FIG. 15 illustrates a syntax 1500 used by the image encoding device in FIG.
 シンタクス1500は、ハイレベルシンタクス1501、スライスレベルシンタクス1502及びコーディングツリーレベルシンタクス1503の3つのパートを含む。ハイレベルシンタクス1501は、スライスよりも上位のレイヤのシンタクス情報を含む。スライスとは、フレームまたはフィールドに含まれる矩形領域もしくは連続領域を指す。スライスレベルシンタクス1502は、各スライスを復号化するために必要な情報を含む。コーディングツリーレベルシンタクス1503は、各コーディングツリー(即ち、各コーディングツリーブロック)を復号化するために必要な情報を含む。これら各パートは、更に詳細なシンタクスを含む。 The syntax 1500 includes three parts: a high level syntax 1501, a slice level syntax 1502, and a coding tree level syntax 1503. The high level syntax 1501 includes syntax information of a layer higher than the slice. A slice refers to a rectangular area or a continuous area included in a frame or a field. The slice level syntax 1502 includes information necessary for decoding each slice. Coding tree level syntax 1503 includes information necessary to decode each coding tree (ie, each coding tree block). Each of these parts includes more detailed syntax.
 ハイレベルシンタクス1501は、シーケンスパラメータセットシンタクス1504及びピクチャパラメータセットシンタクス1505などの、シーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス1502は、スライスヘッダーシンタクス1506及びスライスデータシンタクス1507などを含む。コーディングツリーレベルシンタクス1503は、コーディングツリーブロックシンタクス1508及びプレディクションユニットシンタクス1509などを含む。 The high level syntax 1501 includes sequence and picture level syntaxes such as a sequence parameter set syntax 1504 and a picture parameter set syntax 1505. The slice level syntax 1502 includes a slice header syntax 1506, a slice data syntax 1507, and the like. The coding tree level syntax 1503 includes a coding tree block syntax 1508, a prediction unit syntax 1509, and the like.
 コーディングツリーブロックシンタクス1508は、四分木構造を持つことができる。具体的には、コーディングツリーブロックシンタクス1508のシンタクス要素として、更にコーディングツリーブロックシンタクス1508を再帰呼び出しすることができる。即ち、1つのコーディングツリーブロックを四分木で細分化することができる。また、コーディングツリーブロックシンタクス1508内にはトランスフォームユニットシンタクス1510が含まれている。トランスフォームユニットシンタクス1510は、四分木の最末端の各コーディングツリーブロックシンタクス1508において呼び出される。トランスフォームユニットシンタクス1510は、逆直交変換及び量子化などに関わる情報が記述されている。 The coding tree block syntax 1508 can have a quadtree structure. Specifically, the coding tree block syntax 1508 can be recursively called as a syntax element of the coding tree block syntax 1508. That is, one coding tree block can be subdivided with a quadtree. Also, the coding tree block syntax 1508 includes a transform unit syntax 1510. The transform unit syntax 1510 is invoked at each coding tree block syntax 1508 at the extreme end of the quadtree. The transform unit syntax 1510 describes information related to inverse orthogonal transformation and quantization.
 トランスフォームユニットシンタクス1510は、四分木構造を持つことができる。具体的には、トランスフォームユニットシンタクス1510のシンタクス要素として、更にトランスフォームユニットシンタクス1510を再帰呼び出しすることができる。即ち、1つのトランスフォームユニットを四分木で細分化することができる。 The transform unit syntax 1510 can have a quadtree structure. Specifically, the transform unit syntax 1510 can be further recursively called as a syntax element of the transform unit syntax 1510. That is, one transform unit can be subdivided with a quadtree.
 図16は、本実施形態に係るスライスヘッダーシンタクス1506を例示する。図16に示されるslice_bipred_intra_flagは、例えば、当該スライスに関して本実施形態に係る双方向イントラ予測の有効/無効を示すシンタクス要素である。 FIG. 16 illustrates a slice header syntax 1506 according to the present embodiment. The slice_bipred_intra_flag illustrated in FIG. 16 is a syntax element indicating, for example, the validity / invalidity of bidirectional intra prediction according to the present embodiment for the slice.
 slice_bipred_intra_flagが0である場合、当該スライス内での本実施形態に係る双方向イントラは無効である。故に、予測選択部113は双方向イントラ予測を含む予測モードを設定せず、予測選択スイッチ111は、スイッチの出力端をイントラ双方向予測画像生成部109に接続しない。単方向イントラ予測の一例として、図7A及び図7B,図11A及び図11B中のBipredFlag[]が0となる予測や、H.264/MPEG-4 AVCにおいて規定されるイントラ予測を行っても構わない。 When slice_bipred_intra_flag is 0, the bidirectional intra according to the present embodiment in the slice is invalid. Therefore, the prediction selection unit 113 does not set a prediction mode including bidirectional intra prediction, and the prediction selection switch 111 does not connect the output terminal of the switch to the intra bidirectional prediction image generation unit 109. As an example of unidirectional intra prediction, prediction in which BipedFlag [] in FIGS. 7A and 7B, FIG. 11A and FIG. 11B is 0, or intra prediction defined in H.264 / MPEG-4 AVC may be performed. Absent.
 一例として、slice_bipred_intra_flagが1である場合には、当該スライス内全域で本実施形態に係る双方向イントラ予測が有効となる。 
 また、別の例として、slice_bipred_intra_flagが1である場合には、より下位のレイヤ(コーディングツリーブロック、プレディクションユニットなど)のシンタクスにおいて当該スライス内部の局所領域毎に本実施形態に係る予測の有効/無効が規定されてもよい。
As an example, when slice_bipred_intra_flag is 1, the bidirectional intra prediction according to the present embodiment is valid in the entire area of the slice.
Further, as another example, when slice_bipred_intra_flag is 1, in the syntax of a lower layer (coding tree block, prediction unit, etc.), the prediction validity / Invalidity may be specified.
 図16に示されるslice_directional_transform_intra_flagは、例えば、当該スライスに関して本実施形態に係る離散サイン変換及び逆離散サイン変換の有効/無効を示すシンタクス要素である。 The slice_directional_transform_intra_flag shown in FIG. 16 is a syntax element indicating, for example, the validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to this embodiment with respect to the slice.
 slice_directional_transform_intra_flagが0である場合、当該スライス内での本実施形態に係る離散サイン変換及び逆離散サイン変換は無効である。故に、変換情報設定部112はTransformIdxを常に3に設定して出力する。或いは1D変換設定部908・1208は、TransformIdxの値に関わらず、Vertical_transform_idxとHorizontal_transform_idxを1に設定してもよい。一例として、slice_directional_transform_intra_flagが1である場合には、当該スライス内全域で本実施形態に係る離散サイン変換及び逆離散サイン変換が有効となる。 When slice_directional_transform_intra_flag is 0, the discrete sine transform and the inverse discrete sine transform according to the present embodiment in the slice are invalid. Therefore, the transformation information setting unit 112 always sets TransformIdx to 3 and outputs it. Alternatively, the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx. As an example, when slice_directional_transform_intra_flag is 1, the discrete sine transform and the inverse discrete sine transform according to the present embodiment are effective over the entire area in the slice.
 また、別の例として、slice_directional_transform_intra_flagが1である場合には、より下位のレイヤ(コーディングツリーブロック、トランスフォームユニットなど)のシンタクスにおいて当該スライス内部の局所領域毎に本実施形態に係る離散サイン変換及び逆離散サイン変換の有効/無効が規定されてもよい。 As another example, when slice_directional_transform_intra_flag is 1, the discrete sine transform according to the present embodiment for each local region in the slice in the syntax of a lower layer (coding tree block, transform unit, etc.) The validity / invalidity of the inverse discrete sine transform may be defined.
 図17は、本実施形態に係るコーディングツリーブロックシンタクス1508を例示する。図17に示されるctb_directional_transform_flagは、当該コーディングツリーブロックに関して本実施形態に係る離散サイン変換及び逆離散サイン変換の有効/無効を示すシンタクス要素である。また、図17に示されるpred_modeはプレディクションユニットシンタクス1509に含まれるシンタクス要素の1つであり、当該コーディングツリーブロックもしくはマクロブロック内の符号化タイプを示している。MODE_INTRAは、符号化タイプがイントラ予測であることを示す。ctb_directional_transform_flagは、前述のslice_directional_transform_flagが1であって、かつ、コーディングツリーブロックの符号化タイプがイントラ予測の時にのみ符号化される。CBPはCoded_Block_Pattern情報を示しており、当該コーディングツリーブロック内に変換係数があるかどうかを示す情報である。当該情報が0である場合は、変換係数が無いことを示しデコーダは逆変換処理を行う必要がないため、ctb_directional_transform_flagを符号化しない。 FIG. 17 illustrates the coding tree block syntax 1508 according to the present embodiment. Ctb_directional_transform_flag shown in FIG. 17 is a syntax element indicating whether the discrete sine transform and the inverse discrete sine transform according to the present embodiment are valid / invalid for the coding tree block. Also, pred_mode shown in FIG. 17 is one of syntax elements included in the prediction unit syntax 1509, and indicates the coding type in the coding tree block or macroblock. MODE_INTRA indicates that the encoding type is intra prediction. ctb_directional_transform_flag is encoded only when the above-described slice_directional_transform_flag is 1 and the encoding type of the coding tree block is intra prediction. CBP indicates Coded_Block_Pattern information, and is information indicating whether or not there is a transform coefficient in the coding tree block. If the information is 0, it indicates that there is no transform coefficient, and the decoder does not need to perform inverse transform processing, so ctb_directional_transform_flag is not encoded.
 ctb_directional_transform_flagが0である場合、当該コーディングツリーブロック内での本実施形態に係る離散サイン変換及び逆離散サイン変換は無効である。故に、変換情報設定部112はTransformIdxを常に3に設定して出力する。或いは1D変換設定部908・1208は、TransformIdxの値に関わらず、Vertical_transform_idxとHorizontal_transform_idxを1に設定してもよい。 
 一方、ctb_directional_transform_flagが1である場合、当該コーディングツリーブロック内で本実施形態に係る離散サイン変換及び逆離散サイン変換が有効となる。
When ctb_directional_transform_flag is 0, the discrete sine transform and the inverse discrete sine transform according to the present embodiment in the coding tree block are invalid. Therefore, the transformation information setting unit 112 always sets TransformIdx to 3 and outputs it. Alternatively, the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
On the other hand, when ctb_directional_transform_flag is 1, the discrete sine transform and the inverse discrete sine transform according to the present embodiment are valid in the coding tree block.
 図17の例のように、コーディングツリーブロックシンタクス1508において、本実施形態に係る離散サイン変換及び逆離散サイン変換の有効/無効を規定するフラグを符号化すると、このフラグを符号化しない場合に比べて情報量(符号量)は増大する。しかしながら、このフラグを符号化することにより、局所領域(即ち、コーディングツリーブロック)毎に最適な直交変換を行うことが可能となる。 As in the example of FIG. 17, in the coding tree block syntax 1508, when the flag that defines the validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to the present embodiment is encoded, compared to the case where this flag is not encoded. Thus, the information amount (code amount) increases. However, by encoding this flag, it is possible to perform optimal orthogonal transform for each local region (ie, coding tree block).
 図18は、本実施形態に係るトランスフォームユニットシンタクス1510を例示する。図18に示されるtu_directional_transform_flagは、当該トランスフォームユニットに関して本実施形態に係る離散サイン変換及び逆離散サイン変換の有効/無効を示すシンタクス要素である。また、図18に示されるpred_modeはプレディクションユニットシンタクス1509に含まれるシンタクス要素の1つであり、当該コーディングツリーブロックもしくはマクロブロック内の符号化タイプを示している。MODE_INTRAは、符号化タイプがイントラ予測であることを示す。tu_directional_transform_flagはslice_directional_transform_flagが1であって、かつ、コーディングツリーブロックの符号化タイプがイントラ予測の時にのみ符号化される。coded_block_flagは当該トランスフォームユニット内に変換係数があるかどうかを示す1ビットの情報である。当該情報が0である場合は、変換係数が無いことを示しデコーダは逆変換処理を行う必要がないため、tu_directional_transform_flagを符号化しない。 FIG. 18 illustrates a transform unit syntax 1510 according to this embodiment. A tu_directional_transform_flag shown in FIG. 18 is a syntax element indicating validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to this embodiment with respect to the transform unit. Further, pred_mode shown in FIG. 18 is one of syntax elements included in the prediction unit syntax 1509, and indicates the coding type in the coding tree block or macroblock. MODE_INTRA indicates that the encoding type is intra prediction. tu_directional_transform_flag is encoded only when slice_directional_transform_flag is 1 and the encoding type of the coding tree block is intra prediction. coded_block_flag is 1-bit information indicating whether or not there is a transform coefficient in the transform unit. If the information is 0, it indicates that there is no transform coefficient, and the decoder does not need to perform inverse transform processing, so tu_directional_transform_flag is not encoded.
 tu_directional_transform_flagが0である場合、当該トランスフォームユニット内での本実施形態に係る離散サイン変換及び逆離散サイン変換は無効である。故に、変換情報設定部112はTransformIdxを常に3に設定して出力する。或いは1D変換設定部908・1208は、TransformIdxの値に関わらず、Vertical_transform_idxとHorizontal_transform_idxを1に設定してもよい。 When tu_directional_transform_flag is 0, the discrete sine transform and the inverse discrete sine transform according to this embodiment in the transform unit are invalid. Therefore, the transformation information setting unit 112 always sets TransformIdx to 3 and outputs it. Alternatively, the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
 一方、tu_directional_transform_flagが1である場合、当該コーディングツリーブロック内で本実施形態に係る離散サイン変換及び逆離散サイン変換が有効となる。 On the other hand, when tu_directional_transform_flag is 1, the discrete sine transform and inverse discrete sine transform according to the present embodiment are valid in the coding tree block.
 図18の例のように、トランスフォームユニットシンタクス1510において、本実施形態に係る離散サイン変換及び逆離散サイン変換の有効/無効を規定するフラグを符号化すると、このフラグを符号化しない場合に比べて情報量(符号量)は増大する。しかしながら、このフラグを符号化することにより、局所領域(即ち、トランスフォームユニット)毎に最適な直交変換を行うことが可能となる。 As in the example of FIG. 18, in the transform unit syntax 1510, when the flag that defines the validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to the present embodiment is encoded, compared to the case where this flag is not encoded. Thus, the information amount (code amount) increases. However, by encoding this flag, it is possible to perform optimal orthogonal transform for each local region (that is, transform unit).
 図19に、プレディクションユニットシンタクスの一例を示す。図19中のpred_modeは当該プレディクションユニットの予測タイプをしている。MODE_INTRAは予測タイプがイントラ予測であることを示す。intra_split_flagは当該プレディクションユニットを更に4つのプレディクションユニットに分割するか否かを示すフラグである。intra_split_flagが1の場合、プレディクションユニットを、縦横のサイズ半分で4分割したものをプレディクションユニットとする。intra_split_flagが0の場合、プレディクションユニットを分割しない。 FIG. 19 shows an example of the prediction unit syntax. Pred_mode in FIG. 19 indicates the prediction type of the prediction unit. MODE_INTRA indicates that the prediction type is intra prediction. intra_split_flag is a flag indicating whether or not the prediction unit is further divided into four prediction units. When intra_split_flag is 1, a prediction unit is a prediction unit obtained by dividing the prediction unit into four in half in the vertical and horizontal sizes. When intra_split_flag is 0, the prediction unit is not divided.
 intra_luma_bipred_flag[i]は当該プレディクションユニットに適用した予測モードIntraPredModeが単方向イントラ予測モードか双方向イントラ予測モードであるかを示すフラグである。iは、分割されたプレディクションユニットの位置を示しており、前記intra_split_flagが0の場合には0、前記intra_split_flagが1の場合には0~3が設定される。当該フラグは、図9、図12、図13A及び図13Bに示される当該プレディクションユニットのIntraBipredFlagの値がセットされている。 Intra_luma_bipred_flag [i] is a flag indicating whether the prediction mode IntraPredMode applied to the prediction unit is a unidirectional intra prediction mode or a bidirectional intra prediction mode. i indicates the position of the divided prediction unit. When the intra_split_flag is 0, 0 is set, and when the intra_split_flag is 1, 0 to 3 are set. In the flag, the value of IntraBipredFlag of the prediction unit shown in FIGS. 9, 12, 13A, and 13B is set.
 intra_luma_bipred_flag[i]が1の場合、当該プレディクションユニットは双方向イントラ予測であることを示し、用意された複数の双方向イントラ予測モードの内、使用した双方向イントラ予測モードを特定する情報であるintra_luma_bipred_mode[i]を符号化する。intra_luma_bipred_mode[i]は、図7A及び図7B、図11A及び図11Bに示される双方向イントラ予測モード数IntraBipredNumに従って等長符号化されても良いし、予め決定された符号表を用いて符号化されても良い。intra_luma_bipred_flag[i]が0の場合、当該プレディクションユニットは単方向イントラ予測であることを示し、隣接ブロックから予測符号化を行う。 When intra_luma_bipred_flag [i] is 1, this indicates that the prediction unit is bi-directional intra prediction, and is information that identifies the bi-directional intra prediction mode used from among the prepared bi-directional intra prediction modes. Intra_luma_bipred_mode [i] is encoded. intra_luma_bipred_mode [i] may be encoded with the isometric length according to the bidirectional intra prediction mode number IntraBipredNum shown in FIGS. 7A and 7B, FIG. 11A and FIG. 11B, or encoded using a predetermined code table. May be. When intra_luma_bipred_flag [i] is 0, it indicates that the prediction unit is unidirectional intra prediction, and predictive encoding is performed from adjacent blocks.
 prev_intra_luma_unipred_idx[i]は、隣接ブロックから計算される予測モードの予測値MostProbableModeと当該プレディクションユニットのイントラ予測モードが同一であるか否かを示すフラグである。MostProbableModeの計算方法の詳細は後述する。prev_intra_luma_unipred_idx[i]が0でない場合、前記MostProbableModeとイントラ予測モードIntraPredModeが等しいことを示す。prev_intra_luma_unipred_idx[i]が0の場合、前記MostProbableModeとイントラ予測モードIntraPredModeは異なることを示し、イントラ予測モードIntraPredModeが更にMostProbableMode以外のいずれのモードであるかを特定する情報rem_intra_luma_unipred_mode[i]が符号化される。rem_intra_luma_unipred_mode[i]は、図7A及び図7B、図11A及び図11Bに示される双方向イントラ予測モード数IntraPredModeNumに従って等長符号化されても良いし、予め決定された符号表を用いて符号化されても良い。イントラ予測モードIntraPredModeからrem_intra_luma_unipred_mode[i]は下式を用いて計算される。
Figure JPOXMLDOC01-appb-M000015
prev_intra_luma_unipred_idx [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. Details of the method of calculating MostProbableMode will be described later. When prev_intra_luma_unipred_idx [i] is not 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal. When prev_intra_luma_unipred_idx [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_luma_unipred_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is encoded. . rem_intra_luma_unipred_mode [i] may be encoded with the same length according to the bidirectional intra prediction mode number IntraPredModeNum shown in FIGS. 7A and 7B, FIG. 11A and FIG. 11B, or may be encoded using a predetermined code table. May be. From intra prediction mode IntraPredMode, rem_intra_luma_unipred_mode [i] is calculated using the following equation.
Figure JPOXMLDOC01-appb-M000015
ここでnumCandは、MostProbableModeの候補数を示しており、candModeList[cIdx]は、実際に候補となるMostProbableModeを示している。ここではnumCandを2として、候補となるMostProbableModeは、予測対象ブロックに隣接する既に予測済みの上と左に位置する画素ブロックのIntraPredModeとする。この時、candModeList[0]をMPM_L0と示し、candModeList[1]をMPM_L1と示す。prev_intra_luma_unipred_idx[i]が1の場合はMPM_L0、prev_intra_luma_unipred_idx[i]が2の場合はMPM_L1の予測モードが導出される。numCandの数が複数の場合、candModeList[cIdx]同士が同じ予測モードとなる場合がある。この場合には、符号化する情報に冗長な表現が含まれるため、数式(11)で示されるように、冗長な予測モードを抜いて表現する。実際に符号化する際の符号表などは、これらの予測モードの最大数を考慮して最適な符号表を作ればよい。 Here, numCand indicates the number of candidates for MostProbableMode, and candModeList [cIdx] indicates the MostProbableMode that is actually a candidate. Here, numCand is set to 2, and the candidate MostProbableMode is set to IntraPredMode of pixel blocks positioned on the upper and left sides that have already been predicted and are adjacent to the prediction target block. At this time, candModeList [0] is indicated as MPM_L0, and candModeList [1] is indicated as MPM_L1. When prev_intra_luma_unipred_idx [i] is 1, a prediction mode of MPM_L0 is derived, and when prev_intra_luma_unipred_idx [i] is 2, a prediction mode of MPM_L1 is derived. When the number of numCand is plural, candModeList [cIdx] may be in the same prediction mode. In this case, since the redundant information is included in the information to be encoded, the redundant prediction mode is omitted and expressed as shown in Expression (11). For the code table for actual encoding, an optimum code table may be created in consideration of the maximum number of these prediction modes.
 numCandが1の場合、下記の数式に従ってMostProbableModeが計算される。
Figure JPOXMLDOC01-appb-M000016
When numCand is 1, MostProbableMode is calculated according to the following equation.
Figure JPOXMLDOC01-appb-M000016
なお、Min(x,y)は入力x、yのうち小さい方を出力するパラメータである。また、IntraPredModeA,IntraPredModeBは、符号化プレディクションユニットに対して左に及び上に隣接するプレディクションユニットのイントラ予測モードを示している。 Min (x, y) is a parameter for outputting the smaller one of the inputs x and y. IntraPredModeA and IntraPredModeB indicate the intra prediction modes of prediction units adjacent to the left and above the encoded prediction unit.
 ここでは、numCandが1及び2の場合について説明したが、予測対象ブロックに隣接する予測済みの画素ブロックを追加すれば更に候補数を増やすことも容易に実現可能である。また、図19のプレディクションユニットシンタクスは候補数に応じて容易に変更可能である。 Here, the case where numCand is 1 and 2 has been described, but it is also possible to easily increase the number of candidates by adding a predicted pixel block adjacent to the prediction target block. Also, the prediction unit syntax of FIG. 19 can be easily changed according to the number of candidates.
 尚、図16、図17、図18及び図19に例示するシンタクステーブルの行間には、本実施形態において規定していないシンタクス要素が挿入されてもよいし、その他の条件分岐に関する記述が含まれていてもよい。また、シンタクステーブルを複数のテーブルに分割したり、複数のシンタクステーブルを統合したりしてもよい。また、例示した各シンタクス要素の用語は、任意に変更可能である。 It should be noted that syntax elements not defined in this embodiment may be inserted between the lines of the syntax tables illustrated in FIGS. 16, 17, 18 and 19, and other conditional branch descriptions are included. It may be. Further, the syntax table may be divided into a plurality of tables, or a plurality of syntax tables may be integrated. Moreover, the term of each illustrated syntax element can be changed arbitrarily.
 以上説明したように、本実施形態に係る画像符号化装置は、2つの予測方向が異なる参照画素ラインを用いる場合に、予測誤差の傾向が2つの予測方向のいずれとも異なり、片方の予測モードに従って直交変換を選択すると参照画素と予測画素との距離が大きくなるにつれて予測精度が低下するイントラ予測の傾向を活かせずに符号化効率が低下する問題を解消する。この画像符号化装置は、各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D離散コサイン変換または1D離散サイン変換を適用する。1D離散サイン変換は、参照画素群のラインに直交する方向(垂直方向または水平方向)について1D直交変換を行う際に、1D離散コサイン変換と比較して係数集密度が高くなる(即ち、量子化変換係数121における非零係数の割合が小さくなる)。故に、本実施形態に係る画像符号化装置によれば、各予測モードに一律にDCTなどの固定的な直交変換を施す場合に比べて、安定的に高い変換効率が達成される。 As described above, the image coding apparatus according to the present embodiment, when using two reference pixel lines having different prediction directions, has a different prediction error tendency from either of the two prediction directions, and follows one prediction mode. When orthogonal transform is selected, the problem that the coding efficiency is lowered without taking advantage of the tendency of intra prediction in which the prediction accuracy is lowered as the distance between the reference pixel and the prediction pixel is increased is solved. This image encoding apparatus classifies the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-described tendency, and adaptively performs 1D discrete cosine transform or 1D discrete sine transform for each of the vertical direction and horizontal direction. Apply. In the 1D discrete sine transform, when the 1D orthogonal transform is performed in the direction orthogonal to the line of the reference pixel group (vertical direction or horizontal direction), the coefficient density is higher than the 1D discrete cosine transform (that is, quantization) The ratio of the non-zero coefficient in the conversion coefficient 121 is reduced). Therefore, according to the image coding apparatus according to the present embodiment, high conversion efficiency is stably achieved as compared with a case where fixed orthogonal transformation such as DCT is uniformly applied to each prediction mode.
 また、本実施形態に係る直交変換部102及び逆直交変換部105は、ハードウェア実装及びソフトウェア実装のいずれにも好適である。 
 以上が、第1の実施形態に係る画像符号化装置の説明である。
Further, the orthogonal transform unit 102 and the inverse orthogonal transform unit 105 according to the present embodiment are suitable for both hardware implementation and software implementation.
The above is the description of the image encoding device according to the first embodiment.
 (第2の実施形態) 
 第2の実施形態に係る画像符号化装置は、前述の第1の実施形態に係る画像符号化装置とイントラ単方向予測画像生成部108及びイントラ双方向予測画像生成部109の詳細において異なる。以降の説明では、本実施形態において第1の実施形態と同一部分には同一符号を付して示し、異なる部分を中心に説明する。本実施形態に係る画像符号化装置に対応する動画像復号化装置は、第4の実施形態において説明する。
(Second Embodiment)
The image encoding device according to the second embodiment differs from the image encoding device according to the first embodiment described above in the details of the intra unidirectional prediction image generation unit 108 and the intra bidirectional prediction image generation unit 109. In the following description, the same parts as those in the first embodiment are denoted by the same reference numerals in the present embodiment, and different parts will be mainly described. A moving picture decoding apparatus corresponding to the picture encoding apparatus according to the present embodiment will be described in a fourth embodiment.
 図20は本発明の第2の実施携帯に係る画像符号化装置2000のブロック図である。図1との違いは、新たに予測方向導出部2001が追加されている点と予測方向導出部2001から予測方向導出情報2051が予測選択部113に出力されている点である。また、イントラ単方向予測画像生成部108及びイントラ双方向予測画像生成部109が128方向まで拡張されていると仮定する。具体的には方向予測として利用される180度の角度勾配を128個に分割し、1.4度毎に予測方向が割り当てられていることを意味する。但し、第1の実施形態で説明した単方向予測の予測モードは図7A及び図7B、図11A及び図11Bと同一である。それ以外の構成は第1の実施形態と同一のため、説明を省略する。ここでは、予測方向導出部2001を用いて行われるイントラ予測を予測方向導出モードと呼称する。 FIG. 20 is a block diagram of an image encoding apparatus 2000 according to the second embodiment of the present invention. The difference from FIG. 1 is that a prediction direction deriving unit 2001 is newly added and that prediction direction deriving information 2051 is output from the prediction direction deriving unit 2001 to the prediction selecting unit 113. Further, it is assumed that the intra unidirectional prediction image generation unit 108 and the intra bidirectional prediction image generation unit 109 are extended to 128 directions. Specifically, it means that the angle gradient of 180 degrees used for direction prediction is divided into 128 pieces, and a prediction direction is assigned every 1.4 degrees. However, the prediction modes of the unidirectional prediction described in the first embodiment are the same as those in FIGS. 7A and 7B and FIGS. 11A and 11B. Since the other configuration is the same as that of the first embodiment, description thereof is omitted. Here, intra prediction performed using the prediction direction deriving unit 2001 is referred to as a prediction direction derivation mode.
 参照画像メモリ107から出力された参照画像124は、予測方向導出部2001に入力される。予測方向導出部2001は、入力された参照画像124を解析し、予測方向導出情報2051を生成する機能を有する。図21を用いて予測方向導出部2001を説明する。図21に示すように予測方向導出部2001は、左参照画素ラインエッジ導出部2101、上参照画素ラインエッジ導出部2102、予測方向導出情報生成部2103を含む。左参照画素ラインエッジ導出部2101は、予測対象画素ブロックの左に位置する参照画素ラインに対してエッジ検出処理を行い、エッジ方向を導出する機能を有する。一方、上参照画素ラインエッジ導出部2102は、予測対象画素ブロックの上に位置する参照画素ラインに対してエッジ検出処理を行い、エッジ方向を導出する機能を有する。 The reference image 124 output from the reference image memory 107 is input to the prediction direction deriving unit 2001. The prediction direction deriving unit 2001 has a function of analyzing the input reference image 124 and generating prediction direction derivation information 2051. The prediction direction deriving unit 2001 will be described with reference to FIG. As illustrated in FIG. 21, the prediction direction deriving unit 2001 includes a left reference pixel line edge deriving unit 2101, an upper reference pixel line edge deriving unit 2102, and a prediction direction deriving information generating unit 2103. The left reference pixel line edge deriving unit 2101 has a function of performing edge detection processing on a reference pixel line located to the left of the prediction target pixel block and deriving an edge direction. On the other hand, the upper reference pixel line edge deriving unit 2102 has a function of performing edge detection processing on a reference pixel line located above the prediction target pixel block and deriving an edge direction.
 図22に左参照画素ラインエッジ導出部2101と上参照画素ラインエッジ導出部2102の導出に利用する画素の一例を示す。左参照画素ラインエッジ導出部2101では、予測対象画素ブロックの左側に位置する右上から左下への斜線で示される2ラインを利用する。上参照画素ラインエッジ導出部2102は、予測対象画素ブロックの上側に位置する左上から右下への斜線で示される2ラインを利用する。尚、本発明の本実施の形態では、2ラインで説明したが、1ラインでも3ラインでもよく、より多くのラインを利用してもよい。尚、図中には左参照画素ラインを用いてエッジ方向を導出した例をA、上参照画素ラインを用いてエッジ方向を導出した例をBとして示している。 FIG. 22 shows an example of pixels used for the derivation of the left reference pixel line edge deriving unit 2101 and the upper reference pixel line edge deriving unit 2102. The left reference pixel line edge deriving unit 2101 uses two lines indicated by diagonal lines from the upper right to the lower left located on the left side of the prediction target pixel block. The upper reference pixel line edge deriving unit 2102 uses two lines indicated by diagonal lines from the upper left to the lower right located above the prediction target pixel block. In the present embodiment of the present invention, two lines have been described, but one line or three lines may be used, and more lines may be used. In the drawing, an example in which the edge direction is derived using the left reference pixel line is shown as A, and an example in which the edge direction is derived using the upper reference pixel line is shown as B.
 具体的なエッジ検出の例として、両導出部2101、2102は次の数式(13)に示されるようなオペレータを用いたエッジ強度検出を行う。
Figure JPOXMLDOC01-appb-M000017
As a specific example of edge detection, both deriving units 2101 and 2102 perform edge intensity detection using an operator as shown in the following equation (13).
Figure JPOXMLDOC01-appb-M000017
ここでGxは水平方向(x座標系)のエッジ強度を示し、Gyは垂直方向(y座標系)のエッジ強度を示している。また、エッジ検出オペレータとしてSobelオペレータ、PrewittオペレータやKirschオペレータなど、任意のオペレータを用いてもよい。 Here, Gx represents the edge strength in the horizontal direction (x coordinate system), and Gy represents the edge strength in the vertical direction (y coordinate system). Further, any operator such as a Sobel operator, a Prewitt operator, or a Kirsch operator may be used as the edge detection operator.
 数式(13)のオペレータを参照画素ラインに対して適用すると、画素毎にエッジ方向ベクトルが導出される。これらのエッジベクトルの中から最適なエッジ方向を導出するため次の数式(14)を用いる。
Figure JPOXMLDOC01-appb-M000018
When the operator of Equation (13) is applied to the reference pixel line, an edge direction vector is derived for each pixel. The following formula (14) is used to derive the optimum edge direction from these edge vectors.
Figure JPOXMLDOC01-appb-M000018
ここで、<a,b>は2つのベクトルの内積を表す。S(θ)は単位ベクトル上のエッジ強度(方向ベクトル)(i=1,2,…,N)の2乗和を示す。この単位ベクトル、エッジ強度(方向ベクトル)はそれぞれ次式で示される。
Figure JPOXMLDOC01-appb-M000019
Here, <a, b> represents the inner product of two vectors. S (θ) represents the sum of squares of edge strength (direction vector) (i = 1, 2,..., N) on the unit vector. The unit vector and edge strength (direction vector) are respectively expressed by the following equations.
Figure JPOXMLDOC01-appb-M000019
よって数式(13)を最適化することで、次式で示される代表エッジ角度が算出できる。
Figure JPOXMLDOC01-appb-M000020
Therefore, by optimizing the equation (13), the representative edge angle represented by the following equation can be calculated.
Figure JPOXMLDOC01-appb-M000020
 次に本発明の本実施形態における予測方向導出情報生成部2103について説明する。左参照画素ラインエッジ導出部2101及び上参照画素ラインエッジ導出部2102で導出された、各画素ラインの次式のエッジ強度が予測方向導出情報生成部2103に入力される。
Figure JPOXMLDOC01-appb-M000021
Next, the prediction direction derivation information generation unit 2103 in this embodiment of the present invention will be described. The edge strength of the following expression of each pixel line derived by the left reference pixel line edge deriving unit 2101 and the upper reference pixel line edge deriving unit 2102 is input to the prediction direction deriving information generating unit 2103.
Figure JPOXMLDOC01-appb-M000021
ここで、予測方向導出情報生成部2103は、入力されたエッジ強度をすべて利用して数式(14)及び数式(15)を計算して、単方向代表エッジ角度を導出する。一方、左参照画素ラインの代表エッジ角度と上参照画素ラインの代表エッジ角度の2つに対して、別々に数式(14)及び数式(15)を計算して、2つの代表エッジ角度を持つ双方向代表エッジ角度を導出する。更に、予測方向導出情報生成部2103は、単方向代表エッジ角度を起点として、角度的に隣接する複数の周辺単方向代表エッジ角度を導出する。例えば、エッジ角度が128種類あり、角度順に並んでいると仮定する。このとき、代表エッジ角度をRDMとすると、周辺単方向代表エッジ角度は、角度的に隣接する近い順にRDM-1、RDM+1、RDM-2、RDM+2・・・のように表現される。本実施の形態では、周辺単方向代表エッジ角度を10個(例えば±5個)とする。 Here, the prediction direction derivation information generation unit 2103 calculates Equations (14) and (15) using all the input edge strengths, and derives a unidirectional representative edge angle. On the other hand, both the expression edge (14) and the expression (15) are separately calculated with respect to the two representative edge angles of the left reference pixel line and the upper reference pixel line, and both have two representative edge angles. The direction representative edge angle is derived. Furthermore, the prediction direction derivation information generation unit 2103 derives a plurality of peripheral unidirectional representative edge angles that are angularly adjacent, starting from the unidirectional representative edge angle. For example, it is assumed that there are 128 types of edge angles and they are arranged in the order of angles. At this time, when the representative edge angle is RDM, the peripheral unidirectional representative edge angles are expressed as RDM-1, RDM + 1, RDM-2, RDM + 2,. In this embodiment, the peripheral unidirectional representative edge angle is 10 (for example, ± 5).
 次に、予測方向導出情報2051について説明する。予測方向導出情報2051では、単方向代表エッジ角度、双方向代表エッジ角度、周辺単方向代表エッジ角度が予測モードとして間接的に或いは直接的に関係付けられている。図23は、予測方向導出情報2051の一例を示している。図23において、単方向代表エッジ角度はRDMで示され、双方向代表エッジ角度の左参照画素ラインの代表エッジ角度はRDM_L0で示され、双方向代表エッジ角度の上参照画素ラインの代表エッジ角度はRDM_L1で示されている。RDMPredModeは、本発明の本実施形態における予測方向導出部2001で導出された予測モードを示している。RDMBipredFlagは、本発明の本実施形態における予測方向導出部2001で導出された予測モードが双方向予測かどうかを示している。RDMPredAngleIdL0とRDMPredAngleIdL1は、本発明の本実施形態における予測方向導出部2001で導出された予測モードがどの予測角度を指すかを示している。尚、予測方向導出情報2051には図23とは別に単方向代表エッジ角度、双方向代表エッジ角度に含まれる2つの代表エッジ角度が含まれる。これらの予測モードとTransformIdxの関係については後述する。 Next, the prediction direction derivation information 2051 will be described. In the prediction direction derivation information 2051, the unidirectional representative edge angle, the bidirectional representative edge angle, and the peripheral unidirectional representative edge angle are indirectly or directly related as the prediction mode. FIG. 23 shows an example of the prediction direction derivation information 2051. In FIG. 23, the unidirectional representative edge angle is indicated by RDM, the representative edge angle of the left reference pixel line of the bidirectional representative edge angle is indicated by RDM_L0, and the representative edge angle of the upper reference pixel line of the bidirectional representative edge angle is It is indicated by RDM_L1. RDMPredMode indicates the prediction mode derived by the prediction direction deriving unit 2001 in the present embodiment of the present invention. RDMBipredFlag indicates whether the prediction mode derived by the prediction direction deriving unit 2001 in the present embodiment of the present invention is bidirectional prediction. RDMPredAngleIdL0 and RDMPredAngleIdL1 indicate which prediction angle the prediction mode derived by the prediction direction deriving unit 2001 in the present embodiment of the present invention indicates. Note that the prediction direction derivation information 2051 includes two representative edge angles included in the unidirectional representative edge angle and the bidirectional representative edge angle, in addition to FIG. The relationship between these prediction modes and TransformIdx will be described later.
 予測方向導出部2001で生成された予測方向導出情報2051は予測選択部113へと入力される。ここで選択された予測モードに従ってイントラ単方向予測画像生成部108若しくはイントラ双方向予測画像生成部109で予測画像125が生成される。これらの予測画像生成部は、予測角度数が128個に拡張されている以外は、第1の実施の形態と同一である。例えば、RDMPredModeが1である場合には、双方向代表エッジ角度に含まれる2つの単方向代表エッジ角度で図8の第一予測画像信号851及び第二予測画像信号852が生成され、重み付き平均部801で平均処理が行われて、予測画像125が出力される。 The prediction direction derivation information 2051 generated by the prediction direction derivation unit 2001 is input to the prediction selection unit 113. A prediction image 125 is generated by the intra unidirectional prediction image generation unit 108 or the intra bidirectional prediction image generation unit 109 according to the prediction mode selected here. These predicted image generation units are the same as those in the first embodiment except that the number of predicted angles is expanded to 128. For example, when RDMPredMode is 1, the first predicted image signal 851 and the second predicted image signal 852 in FIG. 8 are generated at two unidirectional representative edge angles included in the bidirectional representative edge angle, and the weighted average An average process is performed in the unit 801, and the predicted image 125 is output.
 <予測方向導出部の効果> 
 本発明の第一の実施の形態に加えて、予測方向導出部2001を加えて構成を変更することによって、従来33方向であった予測方向を128方向に拡張し、更には参照画素ラインに基づいたエッジ検出を行うことで128方向すべての予測モードを設定する必要がなく、高精度な予測角度が選択できるようになる。ここで、予め導出できる角度が128方向と定めているので、数式(15)で算出された代表角度から予測方向を選択できる。例えば、180度を128分割し、数式(15)で算出された代表角度を量子化して最大128分割した予測方向にマッピングすることでより高精度な予測方向を利用できるようになる。本実施の形態で必要となる追加のモード情報は図23に示される12種類であり、単純に128種類の予測モードを追加する場合と比較して、予測モードを符号化する際のオーバーヘッドを大幅に削減できる。
<Effect of prediction direction deriving unit>
In addition to the first embodiment of the present invention, the prediction direction deriving unit 2001 is added to change the configuration, so that the prediction direction, which is the conventional 33 directions, is expanded to 128 directions, and further based on the reference pixel line. By performing edge detection, it is not necessary to set all 128 prediction modes, and a highly accurate prediction angle can be selected. Here, since the angle that can be derived in advance is determined to be 128 directions, the prediction direction can be selected from the representative angle calculated by Expression (15). For example, by dividing 180 degrees into 128, quantizing the representative angle calculated by Equation (15), and mapping to a maximum 128 prediction directions, a more accurate prediction direction can be used. The additional mode information required in the present embodiment is the 12 types shown in FIG. 23, and the overhead when encoding the prediction mode is significantly larger than when 128 types of prediction modes are simply added. Can be reduced.
 <予測方向導出部を追加した場合の直交変換> 
 予測方向導出部2001を追加した第2の実施形態では、参照画素ラインのエッジ検出を行い、単方向代表エッジ角度を導出しないと実際に予測で利用される参照画素ラインが特定できないという問題がある。そこで、第2の実施形態では、コーディングツリーブロック(もしくはコーディングツリーブロックに含まれる先頭のプレディクションユニット)単位でTransformIdxが選択される。例えば、図2Cで示されるNxN画素ブロック0番をプレディクションユニットと仮定し、2Nx2N画素ブロックをコーディングツリーブロックと仮定する。シンタクスの符号化はコーディングツリーブロック単位で行われるため、プレディクションユニット0以外は、当該プレディクションユニットにおいて利用される参照画素ラインが未符号化であるため、どの参照画素ラインが利用されるかを特定することができない。コーディングツリーブロックの先頭画素ブロックに対応するプレディクションユニット0番目は、隣接する上と左の画素について符号化済みであるため、ここで導出された参照画素ラインの情報を利用してTransformIdxが選択される。図23では、それぞれの予測モードに関わらず、先頭のプレディクションユニットのTransformIdxに従うためのTransformIdx[0]が明記されている。
<Orthogonal transformation when a prediction direction deriving unit is added>
In the second embodiment in which the prediction direction deriving unit 2001 is added, there is a problem that the reference pixel line that is actually used in the prediction cannot be specified unless the edge of the reference pixel line is detected and the unidirectional representative edge angle is derived. . Therefore, in the second embodiment, TransformIdx is selected in units of coding tree blocks (or the first prediction unit included in the coding tree block). For example, assume that the N × N pixel block 0 shown in FIG. 2C is a prediction unit, and that a 2N × 2N pixel block is a coding tree block. Since the syntax encoding is performed in units of coding tree blocks, the reference pixel lines used in the prediction unit other than the prediction unit 0 are uncoded, so which reference pixel line is used. It cannot be specified. Since the 0th prediction unit corresponding to the first pixel block of the coding tree block has already been encoded for the upper and left pixels, TransformIdx is selected using the information of the reference pixel line derived here. The In FIG. 23, TransformIdx [0] for following the TransformIdx of the head prediction unit is specified regardless of each prediction mode.
 尚、予め図23で説明した予測モードが選択されたときのTransformIdxを定めておいてもよい。例えば、予測角度を導出する処理を削減するために、常にTransformIdxを0に設定するなどとすることも容易に可能である。 Note that TransformIdx when the prediction mode described in FIG. 23 is selected in advance may be determined. For example, it is possible to easily set TransformIdx to 0 in order to reduce the process of deriving the predicted angle.
 <シンタクス> 
 図24は、本実施形態に係るスライスヘッダーシンタクス1506を例示する。図24に示されるslice_derived_direction_intra_flagは、例えば、当該スライスに関して本実施形態に係る予測方向導出手法の有効/無効を示すシンタクス要素である。
<Syntax>
FIG. 24 illustrates a slice header syntax 1506 according to this embodiment. The slice_derived_direction_intra_flag illustrated in FIG. 24 is a syntax element indicating, for example, the validity / invalidity of the prediction direction deriving method according to the present embodiment for the slice.
 slice_derived_direction_intra_flagが0である場合、当該スライス内での本実施形態に係る予測方向導出モードは無効である。故に、予測選択部113は予測方向導出情報2051を含む予測モードを設定せず、予測選択スイッチ111は、本発明の第1の実施の形態に従ってスイッチの出力端を接続する。一例として、slice_derived_direction_intra_flagが1である場合には、当該スライス内全域で本実施形態に係る予測方向導出モードが有効となる。 When slice_derived_direction_intra_flag is 0, the prediction direction derivation mode according to the present embodiment in the slice is invalid. Therefore, the prediction selection unit 113 does not set the prediction mode including the prediction direction derivation information 2051, and the prediction selection switch 111 connects the output terminals of the switches according to the first embodiment of the present invention. As an example, when slice_derived_direction_intra_flag is 1, the prediction direction derivation mode according to the present embodiment is valid over the entire area in the slice.
 また、別の例として、予測方向導出手法が1である場合には、より下位のレイヤ(コーディングツリーブロック、トランスフォームユニットなど)のシンタクスにおいて当該スライス内部の局所領域毎に本実施形態に係る予測方向導出モードの有効/無効が規定されてもよい。 As another example, when the prediction direction derivation method is 1, the prediction according to the present embodiment is performed for each local region in the slice in the syntax of a lower layer (coding tree block, transform unit, etc.). The validity / invalidity of the direction derivation mode may be defined.
 図25Aに、プレディクションユニットシンタクスの一例を示す。intra_derived_direction_flag[i]は、当該プレディクションユニットに適用した予測モードIntraPredModeが図11A及び図11Bに示される第1の実施形態であるか、図23に示される第2の実施形態であるかを示すフラグである。iは分割されたプレディクションユニットの位置を示しており、前記intra_split_flagが0の場合には0、前記intra_split_flagが1の場合には0~3が設定される。 FIG. 25A shows an example of the prediction unit syntax. intra_derived_direction_flag [i] is a flag indicating whether the prediction mode IntraPredMode applied to the prediction unit is the first embodiment shown in FIGS. 11A and 11B or the second embodiment shown in FIG. It is. i indicates the position of the divided prediction unit. When the intra_split_flag is 0, 0 is set, and when the intra_split_flag is 1, 0 to 3 are set.
 intra_derived_direction_flag[i]が1の場合、当該プレディクションユニットは図23に示される予測方向導出モードを用いることを示す。この場合、用意された複数の予測モードの内、使用したイントラ予測モードを特定する情報であるintra_direction_mode[i]を符号化する。図23に示されるように本モードには双方向イントラ予測のモードと単方向イントラ予測が混在して表現されている。これらの予測モードを別々のシンタクス要素として表現し、符号化することも可能である。また、本発明の第2の実施形態では、intra_direction_mode[i]がRDMPredModeに相当する例として説明しているが、RDMPredAngleIdL0に基づいて予測モードの表現方法を変えても構わない。例えば、RDMPredModeの1に相当する双方向イントラ予測を省いた場合に、予測モードを、符号を表す1ビットのフラグと変化分を表すインデックスとの2種類のシンタクス要素に分けて表現することも可能となる。この場合、新たに双方向イントラ予測かどうかのフラグを用意すればよい。また、intra_direction_mode[i]は、予測モード数に従って等長符号化されても良いし、予め決定された符号表を用いて符号化されても良い。intra_direction_mode[i]が0の場合、当該プレディクションユニットは本発明の本実施形態に係る予測方向導出手法を使わないことを示し、第1の実施形態で説明済みの方法に従って符号化される。 When intra_derived_direction_flag [i] is 1, it indicates that the prediction unit uses the prediction direction derivation mode shown in FIG. In this case, intra_direction_mode [i], which is information identifying the used intra prediction mode, is encoded from among the prepared prediction modes. As shown in FIG. 23, in this mode, a bidirectional intra prediction mode and a unidirectional intra prediction are mixedly expressed. These prediction modes can be expressed as separate syntax elements and encoded. In the second embodiment of the present invention, intra_direction_mode [i] is described as an example corresponding to RDMPredMode, but the prediction mode expression method may be changed based on RDMPredAngleIdL0. For example, when bi-directional intra prediction corresponding to 1 of RDMPredMode is omitted, the prediction mode can also be expressed by dividing it into two types of syntax elements: a 1-bit flag representing a code and an index representing a change. It becomes. In this case, a new flag indicating whether or not bidirectional intra prediction is used may be prepared. Also, intra_direction_mode [i] may be encoded with the same length according to the number of prediction modes, or may be encoded using a predetermined code table. When intra_direction_mode [i] is 0, it indicates that the prediction unit does not use the prediction direction derivation method according to the present embodiment of the present invention, and is encoded according to the method described in the first embodiment.
 本発明の別の実施形態として図25Bに、プレディクションユニットシンタクスの一例を示す。図25Bでは、intra_direction_mode[i]がprev_intra_direction_mode[i]とrem_intra_direction_mode[i]に分割されて表現されている。これらのシンタクス要素は、数式(11)或いは(12)と同様に、予測モード間の予測を導入している。prev_intra_direction_mode[i]は、隣接ブロックから計算される予測モードの予測値MostProbableModeと当該プレディクションユニットのイントラ予測モードが同一であるか否かを示すフラグである。prev_intra_direction_mode[i]が1の場合、前記MostProbableModeとイントラ予測モードIntraPredModeが等しいことを示す。prev_intra_direction_mode[i]が0の場合、前記MostProbableModeとイントラ予測モードIntraPredModeは異なることを示し、イントラ予測モードIntraPredModeが更にMostProbableMode以外のいずれのモードであるかを特定する情報rem_intra_direction_mode[i]が符号化される。rem_intra_direction_mode[i]は、予測モード数に従って等長符号化されても良いし、予め決定された符号表を用いて符号化されても良い。 FIG. 25B shows an example of the prediction unit syntax as another embodiment of the present invention. In FIG. 25B, intra_direction_mode [i] is expressed by being divided into prev_intra_direction_mode [i] and rem_intra_direction_mode [i]. These syntax elements introduce the prediction between prediction modes similarly to Formula (11) or (12). prev_intra_direction_mode [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. When prev_intra_direction_mode [i] is 1, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal. When prev_intra_direction_mode [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_direction_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is encoded. . The rem_intra_direction_mode [i] may be encoded with an equal length according to the number of prediction modes, or may be encoded using a predetermined code table.
 本発明の別の実施形態として図25Cに、プレディクションユニットシンタクスの一例を示す。本図では、第1の実施形態で説明したPredModeと第2の実施形態で説明したPredModeが統合されて1つのPredModeテーブルとして表現されている。この場合のPredModeは図26A、図26B及び図26Cで示されている。これらのシンタクス要素は、数式(11)或いは(12)と同様に、予測モード間の予測を導入している。prev_intra_luma_unipred_idx[i]は、隣接ブロックから計算される予測モードの予測値MostProbableModeと当該プレディクションユニットのイントラ予測モードが同一であるか否かを示すフラグである。prev_intra_luma_unipred_idx[i]が1の場合、前記MostProbableModeとイントラ予測モードIntraPredModeが等しいことを示す。prev_intra_luma_unipred_idx[i]が0の場合、前記MostProbableModeとイントラ予測モードIntraPredModeは異なることを示し、イントラ予測モードIntraPredModeが更にMostProbableMode以外のいずれのモードであるかを特定する情報rem_intra_luma_unipred_mode[i]が符号化される。rem_intra_luma_unipred_mode[i]は、予測モード数に従って等長符号化されても良いし、予め決定された符号表を用いて符号化されても良い。 
 以上が本発明の第2の実施形態に係る画像符号化装置2000の詳細説明である。
FIG. 25C shows an example of the prediction unit syntax as another embodiment of the present invention. In this figure, PredMode described in the first embodiment and PredMode described in the second embodiment are integrated and expressed as one PredMode table. PredMode in this case is shown in FIGS. 26A, 26B, and 26C. These syntax elements introduce the prediction between prediction modes similarly to Formula (11) or (12). prev_intra_luma_unipred_idx [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. When prev_intra_luma_unipred_idx [i] is 1, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal. When prev_intra_luma_unipred_idx [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_luma_unipred_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is encoded. . The rem_intra_luma_unipred_mode [i] may be encoded with the same length according to the number of prediction modes, or may be encoded using a predetermined code table.
The above is the detailed description of the image coding apparatus 2000 according to the second embodiment of the present invention.
 (第3の実施形態) 
 第3の実施形態は、第1の動画像復号化装置で符号化された符号化データを復号するための動画像復号化装置に関する。即ち、本実施形態に係る復号化装置は、例えば第1の実施形態に係る画像符号化装置によって生成された符号化データを復号化する。
(Third embodiment)
The third embodiment relates to a moving picture decoding apparatus for decoding encoded data encoded by the first moving picture decoding apparatus. That is, the decoding apparatus according to the present embodiment decodes encoded data generated by, for example, the image encoding apparatus according to the first embodiment.
 図27に示すように、本実施形態に係る動画像復号化装置2700は、入力バッファ2701、エントロピー復号化部2702、逆量子化部2703、逆直交変換部2704、加算部2705、参照画像メモリ2706、イントラ単方向予測画像生成部2707、イントラ双方向予測画像生成部2708、インター予測画像生成部2709、予測選択スイッチ2710、変換情報設定部2711、出力バッファ2712、予測選択部2714を含む。 As shown in FIG. 27, the moving picture decoding apparatus 2700 according to this embodiment includes an input buffer 2701, an entropy decoding unit 2702, an inverse quantization unit 2703, an inverse orthogonal transform unit 2704, an addition unit 2705, and a reference image memory 2706. , An intra unidirectional prediction image generation unit 2707, an intra bidirectional prediction image generation unit 2708, an inter prediction image generation unit 2709, a prediction selection switch 2710, a conversion information setting unit 2711, an output buffer 2712, and a prediction selection unit 2714.
 図27の動画像復号化装置は、入力バッファ2701に蓄積される符号化データ2725を復号し、復号画像2724を出力バッファ2712に蓄積して出力画像として出力する。符号化データ2725は、例えば図1の画像符号化装置などから出力され、図示しない蓄積系または伝送系を経て、入力バッファ2701に一時的に蓄積される。 27 decodes the encoded data 2725 stored in the input buffer 2701, stores the decoded image 2724 in the output buffer 2712, and outputs it as an output image. The encoded data 2725 is output from, for example, the image encoding device of FIG. 1 and the like, and is temporarily stored in the input buffer 2701 through a storage system or a transmission system (not shown).
 エントロピー復号化部2702は、符号化データ2725の復号化のために、1フレームまたは1フィールド毎にシンタクスに基づいて解読を行う。エントロピー復号化部2702は、各シンタクスの符号列を順次エントロピー復号化し、予測モード情報などを含む予測情報2721、量子化変換係数(列)2715などの符号化対象ブロックの符号化パラメータを再生する。符号化パラメータとは、予測情報2721、変換係数に関する情報、量子化に関する情報、などの復号に必要となるすべてのパラメータである。 The entropy decoding unit 2702 performs decoding based on the syntax for each frame or field for decoding the encoded data 2725. The entropy decoding unit 2702 sequentially entropy-decodes the code string of each syntax, and reproduces the encoding parameters of the encoding target block such as prediction information 2721 including the prediction mode information and the quantized transform coefficient (sequence) 2715. The coding parameters are all parameters necessary for decoding such as prediction information 2721, information on transform coefficients, information on quantization, and the like.
 逆量子化部2703は、エントロピー復号化部2702からの量子化変換係数2715に逆量子化を行って、復元変換係数2716を得る。具体的には、逆量子化部2703は、エントロピー復号化部2702によって復号化された量子化に関する情報に従って逆量子化を行う(量子化変換係数2715に量子化情報から導出された量子化ステップ幅を乗算する)。逆量子化部2703は、復元変換係数2716を逆直交変換部2704に入力する。 The inverse quantization unit 2703 performs inverse quantization on the quantized transform coefficient 2715 from the entropy decoding unit 2702 to obtain a restored transform coefficient 2716. Specifically, the inverse quantization unit 2703 performs inverse quantization according to the information regarding the quantization decoded by the entropy decoding unit 2702 (the quantization step width derived from the quantization information into the quantization transform coefficient 2715). Multiply). The inverse quantization unit 2703 inputs the restored transform coefficient 2716 to the inverse orthogonal transform unit 2704.
 逆直交変換部2704は、逆量子化部2703からの復元変換係数2716に対して、符号化側において行われた直交変換に対応する逆直交変換を行い、復元予測誤差(予測差分信号とも呼ぶ)2717を得る。逆直交変換部2704は、復元予測誤差2717を加算部2705に入力する。 The inverse orthogonal transform unit 2704 performs inverse orthogonal transform corresponding to the orthogonal transform performed on the encoding side on the reconstructed transform coefficient 2716 from the inverse quantization unit 2703, and reconstructed prediction error (also referred to as a prediction difference signal). 2717 is obtained. The inverse orthogonal transform unit 2704 inputs the restoration prediction error 2717 to the addition unit 2705.
 加算部2705は、復元予測誤差2717と、対応する予測画像2722とを加算し、復号画像2718を生成する。復号画像2718は、参照画像メモリ2706へと入力される。復号画像2718は、その後出力画像のために出力バッファ2712に一時的に蓄積される。出力バッファ2712に一時的に蓄積された復号画像2718は、復号化制御部2713によって管理される出力タイミングに従って、図示しないディスプレイやモニタなどの表示装置系または映像デバイス系へ出力される。参照画像メモリ2706に保存された復号画像信号2718は、参照画像2719としてイントラ単方向予測画像生成部2707、イントラ双方向予測画像生成部2708及びインター予測画像生成部2709によって必要に応じてフレーム単位またはフィールド単位で参照される。 The addition unit 2705 adds the restored prediction error 2717 and the corresponding predicted image 2722 to generate a decoded image 2718. The decoded image 2718 is input to the reference image memory 2706. The decoded image 2718 is then temporarily stored in the output buffer 2712 for the output image. The decoded image 2718 temporarily stored in the output buffer 2712 is output to a display device system such as a display or a monitor (not shown) or a video device system according to the output timing managed by the decoding control unit 2713. The decoded image signal 2718 stored in the reference image memory 2706 is used as a reference image 2719 by the intra unidirectional prediction image generation unit 2707, the intra bidirectional prediction image generation unit 2708, and the inter prediction image generation unit 2709 as a frame unit or as necessary. Referenced by field.
 逆量子化部2703、逆直交変換部2704、加算部2705、参照画像メモリ2706、イントラ単方向予測画像生成部2707、イントラ双方向予測画像生成部2708、インター予測画像生成部2709、変換情報設定部2711及び選択スイッチ2710は、図1の逆量子化部104、逆直交変換部105、加算部106、参照画像メモリ107、イントラ単方向予測画像生成部108、イントラ双方向予測画像生成部109、インター予測画像生成部110、変換情報設定部112、及び選択スイッチ111と実質的に同一または類似の要素である。 Inverse quantization unit 2703, inverse orthogonal transform unit 2704, addition unit 2705, reference image memory 2706, intra unidirectional prediction image generation unit 2707, intra bidirectional prediction image generation unit 2708, inter prediction image generation unit 2709, conversion information setting unit 2711 and the selection switch 2710 are the inverse quantization unit 104, the inverse orthogonal transform unit 105, the addition unit 106, the reference image memory 107, the intra unidirectional prediction image generation unit 108, the intra bidirectional prediction image generation unit 109, the inter The predicted image generation unit 110, the conversion information setting unit 112, and the selection switch 111 are substantially the same or similar elements.
 <イントラ単方向予測画像生成部2707(108)> 
 イントラ単方向予測画像生成部2707(108)は、参照画像メモリ2706(107)に保存されている参照画像2719(124)を利用して単方向のイントラ予測を行う。例えば、H.264/MPEG-4 AVCでは、予測対象ブロックに空間的に隣接する復号済みの参照画素ラインを利用して、垂直方向、水平方向などの予測方向に沿って画素補填(コピーまたは補間処理(フィルタ処理などを指す))を行うことによってイントラ予測画像を生成する。図4AにH.264/MPEG-4 AVCにおけるイントラ予測の予測方向を示す。また、図4BにH.264/MPEG-4 AVCにおける参照画素ラインと符号化対象画素との配置関係を示す。図4Cはモード1(水平予測)の予測画像生成方法を示しており、左の参照画素ラインの中からI~Lの画素が予測方向にコピーされている。図4Dはモード4(対角右下予測)の予測画像生成方法を示している。また、H.264/MPEG-4 AVCの予測方向を更に拡張し、予測モード数を増やすことも容易に可能である。例えば、予測モードを34個に拡張し、分数位置に該当する画素位置精度を32画素精度と定め、線形補間(3タップフィルタ処理など)を行うことで予測画素値を作成するような構成とすることも可能である。予測モードを最大34個まで拡張した場合の予測角度と予測モードの例が図5に示されている。図5では、太線で示される垂直方向、水平方向の座標に対して、33個の異なる予測方向を持つ。また、H.264/MPEG-4 AVCで示される代表的な予測角度の方向を矢印で示している。本発明の本実施の形態では、原点から円形で示されるマークまで線を引いた方向に33種類の予測方向が用意されている。また、H.264/MPEG-4 AVCと同様、利用可能な参照画素の平均値で予測するDC予測が追加されており、合計で34個の予測モードが存在する。
<Intra Unidirectional Prediction Image Generation Unit 2707 (108)>
The intra unidirectional predicted image generation unit 2707 (108) performs unidirectional intra prediction using the reference image 2719 (124) stored in the reference image memory 2706 (107). For example, in H.264 / MPEG-4 AVC, pixel interpolation (copying or interpolation) is performed along a prediction direction such as a vertical direction or a horizontal direction using a decoded reference pixel line spatially adjacent to a prediction target block. The intra prediction image is generated by performing processing (referring to filter processing or the like). FIG. 4A shows a prediction direction of intra prediction in H.264 / MPEG-4 AVC. FIG. 4B shows an arrangement relationship between reference pixel lines and encoding target pixels in H.264 / MPEG-4 AVC. FIG. 4C shows a predicted image generation method in mode 1 (horizontal prediction), in which pixels I to L are copied in the prediction direction from the left reference pixel line. FIG. 4D shows a predicted image generation method in mode 4 (diagonal lower right prediction). It is also possible to easily expand the prediction direction of H.264 / MPEG-4 AVC and increase the number of prediction modes. For example, the prediction mode is expanded to 34, the pixel position accuracy corresponding to the fractional position is determined as 32 pixel accuracy, and the prediction pixel value is created by performing linear interpolation (such as 3-tap filter processing). It is also possible. FIG. 5 shows an example of the prediction angle and the prediction mode when the prediction mode is expanded up to 34 prediction modes. In FIG. 5, there are 33 different prediction directions for the vertical and horizontal coordinates indicated by the bold lines. In addition, the direction of a typical prediction angle indicated by H.264 / MPEG-4 AVC is indicated by an arrow. In the present embodiment of the present invention, 33 types of prediction directions are prepared in a direction in which a line is drawn from the origin to a mark indicated by a circle. Similarly to H.264 / MPEG-4 AVC, DC prediction for prediction based on the average value of available reference pixels is added, and there are a total of 34 prediction modes.
 IntraPredMode=4の場合、図7A及び図7BのIntraPredAngleIdL0が-4であるため、図5におけるIntraPredMode=4で示される予測方向で予測画像2722(125)が生成される。図5における点線で示される矢印は、予測タイプがIntra_Verticalの予測モードを示しており、実線で示される矢印は予測タイプがIntra_Horizontalの予測モードを示している。 When IntraPredMode = 4, since IntraPredAngleIdL0 in FIGS. 7A and 7B is −4, a prediction image 2722 (125) is generated in the prediction direction indicated by IntraPredMode = 4 in FIG. An arrow indicated by a dotted line in FIG. 5 indicates a prediction mode whose prediction type is Intra_Vertical, and an arrow indicated by a solid line indicates a prediction mode whose prediction type is Intra_Horizontal.
 図6は、IntraPredAngleIdLXと予測画像値生成に使われるintraPredAngleとの関係を示す。また、図7A及び図7Bは予測モード(PredMode)、双方向予測フラグ(BipredFlag)、予測モードタイプ(PredTypeL0、PredTypeL1)、予測角度(PredAngleIdL0、PredAngleIdL1)の関係を示している。 FIG. 6 shows the relationship between IntraPredAngleIdLX and intraPredAngle used for predictive image value generation. 7A and 7B show the relationship between the prediction mode (PredMode), the bidirectional prediction flag (BipredFlag), the prediction mode type (PredTypeL0, PredTypeL1), and the prediction angle (PredAngleIdL0, PredAngleIdL1).
 intraPredAngleは予測値生成の際に、実際に利用される予測角度を示している。例えば、予測タイプがIntra_Verticalで且つ、図7A及び図7Bで示されるintraPredAngleが正の値の場合の予測値の生成方法を数式で書くと数式(1)で表される。ここでBLK_SIZEは、当該画素ブロックのサイズを示しており、ref[]は参照画像(参照画素ラインとも呼ばれる)が格納された配列を示している。また、pred (k, m)は生成された予測画像125を示している。 IntraPredAngle indicates the prediction angle that is actually used when the predicted value is generated. For example, when a prediction value generation method in the case where the prediction type is Intra_Vertical and the intraPredAngle shown in FIGS. 7A and 7B is a positive value is expressed by a mathematical expression, it is expressed by the mathematical expression (1). Here, BLK_SIZE indicates the size of the pixel block, and ref [] indicates an array in which a reference image (also referred to as a reference pixel line) is stored. Moreover, pred (k, m) indicates the generated predicted image 125.
 上記条件以外に関しても、図7A及び図7Bのテーブルに従って同様な方法で予測値が生成可能である。例えば、IntraPredMode=1で示される予測モードの予測値は、図4Cで示されるH.264/MPEG-4 AVCの水平予測と同一となる。 Even for conditions other than the above, a predicted value can be generated by a similar method according to the tables of FIGS. 7A and 7B. For example, the prediction value of the prediction mode indicated by IntraPredMode = 1 is the same as the H.264 / MPEG-4MAVC horizontal prediction shown in FIG. 4C.
 <イントラ双方向予測画像生成部109> 
 イントラ双方向予測画像生成部2708(109)は、参照画像メモリ2706(107)に保存されている参照画像2719(124)を利用して双方向のイントラ予測を行う。例えば上記の非特許文献1では、H.264/MPEG-4 AVCで定められている9種類の予測モードの中から2種類の予測モードを選択し、それぞれの予測画像信号を生成した後に、画素毎にフィルタ処理を行うことで予測画像信号を生成している。
<Intra bidirectional prediction image generation unit 109>
The intra bidirectional prediction image generation unit 2708 (109) performs bidirectional intra prediction using the reference image 2719 (124) stored in the reference image memory 2706 (107). For example, in Non-Patent Document 1 described above, after selecting two types of prediction modes from nine types of prediction modes defined in H.264 / MPEG-4 AVC and generating respective prediction image signals, The predicted image signal is generated by performing the filtering process every time.
 単方向の予測モード数を34種類に拡張した場合における双方向予測について図8を用いてより具体的に説明する。尚、本実施の形態では、モード数の最大数には制限を受けず、任意の数の単方向予測においても双方向予測は容易に拡張が可能である。 Bidirectional prediction when the number of unidirectional prediction modes is expanded to 34 types will be described more specifically with reference to FIG. In the present embodiment, the maximum number of modes is not limited, and bi-directional prediction can be easily expanded in any number of uni-directional predictions.
 図8で示されるイントラ双方向予測画像生成部109(2708)は、重み付き平均部801、第一単方向イントラ予測画像生成部802、第二単方向イントラ予測画像生成部803を保持している。第一単方向イントラ予測画像生成部802及び第二単方向イントラ予測画像生成部803の機能は同一である。また、これらはイントラ単方向予測画像生成部108と同一であってもよい。この場合、3つの処理部はハードウェア的に同一の構成とすることができるため、回路規模を小さくすることができる。 The intra bidirectional prediction image generation unit 109 (2708) illustrated in FIG. 8 holds a weighted average unit 801, a first unidirectional intra prediction image generation unit 802, and a second unidirectional intra prediction image generation unit 803. . The functions of the first unidirectional intra predicted image generation unit 802 and the second unidirectional intra predicted image generation unit 803 are the same. These may be the same as the intra unidirectional predicted image generation unit 108. In this case, since the three processing units can have the same hardware configuration, the circuit scale can be reduced.
 第一単方向イントラ予測画像生成部802から第一予測画像851が、第二単方向イントラ予測画像生成部803から第二予測画像852が出力される。それぞれの予測画像が重み付き平均部801に入力され、重み付き平均処理が行われる。重み付き平均部801では、数式(2)に基づいた計算が行われる。第一予測画像851をP1[x,y]、第二予測画像をP2[x,y]とすると双方向予測の予測画像P[x,y]は数式(2)で表される。 The first prediction image 851 is output from the first unidirectional intra prediction image generation unit 802, and the second prediction image 852 is output from the second unidirectional intra prediction image generation unit 803. Each predicted image is input to the weighted average unit 801, and a weighted average process is performed. In the weighted average unit 801, calculation based on Expression (2) is performed. When the first predicted image 851 is P1 [x, y] and the second predicted image is P2 [x, y], the bidirectionally predicted image P [x, y] is expressed by Equation (2).
 双方向イントラ予測は、図7A及び図7Bで示されるBipredFlagが1であることを示す。この場合2つの予測モードタイプが定義されており、第一単方向イントラ予測画像生成部802に対応する予測モードタイプがPredTypeL0、第二単方向イントラ予測画像生成部803に対応する予測モードが、PredTypeL1で示されている。PredAngleIdLXも同様であり、X部分が0であるか1であるかでそれぞれの予測モードのタイプと角度が表現されている。 Bidirectional intra prediction indicates that the BipedFlag shown in FIGS. 7A and 7B is 1. In this case, two prediction mode types are defined, the prediction mode type corresponding to the first unidirectional intra prediction image generation unit 802 is PredTypeL0, and the prediction mode corresponding to the second unidirectional intra prediction image generation unit 803 is PredTypeL1. It is shown in The same applies to PredAngleIdLX, and the type and angle of each prediction mode are expressed by whether the X portion is 0 or 1.
 尚、ここでは図7A及び図7Bとして、双方向イントラ予測に対応する2つの予測モードの組み合わせを固定の組み合わせとして例示したが、復号済みの隣接画素ブロックが保持する予測モードを利用する特別な予測モードを加えてもよい。この場合、空間的距離の近い2つの予測モードの組み合わせが選択できるようになるため、固定的な予測モード数に依存せず、画像の特徴にあった双方向イントラ予測の組み合わせが実現できる。また、固定的な予測モード数を削減することも可能となる。また、本発明の本実施の形態では、双方向イントラ予測のモード数を16個とした例を示しているが、これらの予測モード数の増減は容易に変更可能である。予測モード数を増やすと予測精度が高まる一方で、予測モードを復号するためのオーバーヘッドが増加する。予測モード数と符号化効率のバランスを考慮して最適な予測モード数を設定すればよい。 
 以上が、イントラ双方向予測画像生成部2708(109)の説明である。
7A and 7B exemplify the combination of two prediction modes corresponding to bidirectional intra prediction as a fixed combination, but a special prediction using a prediction mode held by a decoded adjacent pixel block Modes may be added. In this case, since a combination of two prediction modes having a close spatial distance can be selected, a combination of bidirectional intra prediction that matches the characteristics of the image can be realized without depending on the number of fixed prediction modes. It is also possible to reduce the number of fixed prediction modes. Further, in the present embodiment of the present invention, an example in which the number of bidirectional intra prediction modes is 16 is shown, but the increase / decrease in the number of prediction modes can be easily changed. Increasing the number of prediction modes increases prediction accuracy, while increasing the overhead for decoding the prediction mode. The optimum number of prediction modes may be set in consideration of the balance between the number of prediction modes and coding efficiency.
The above is the description of the intra bidirectional predicted image generation unit 2708 (109).
 図27のインター予測画像生成部2709(110)は、参照画像メモリ2706(107)に保存されている参照画像2719(124)を利用してインター予測を行う。具体的には、インター予測部2709(110)は、予測対象ブロックと参照画像2719(124)との間の動きのズレ量(動きベクトル)に基づいて補間処理(動き補償)を行ってインター予測画像を生成する。H.264/MPEG-4 AVCでは、1/4画素精度までの補間処理が可能である。導出された動きベクトルは予測情報2721(126)の一部としてエントロピー復号化部2702で復号される。 27. The inter prediction image generation unit 2709 (110) in FIG. 27 performs inter prediction using the reference image 2719 (124) stored in the reference image memory 2706 (107). Specifically, the inter prediction unit 2709 (110) performs interpolating processing (motion compensation) based on the amount of motion shift (motion vector) between the prediction target block and the reference image 2719 (124) to perform inter prediction. Generate an image. In H.264 / MPEG-4 AVC, interpolation processing up to ¼ pixel accuracy is possible. The derived motion vector is decoded by the entropy decoding unit 2702 as a part of the prediction information 2721 (126).
 予測選択スイッチ2710(111)は、イントラ単方向予測画像生成部2707(108)の出力端、イントラ双方向予測画像生成部2708(109)の出力端、またはインター予測画像生成部2709(110)の出力端をエントロピー復号化部2702から出力される予測情報2721(126)に従って選択し、イントラ予測画像またはインター予測画像を予測画像2722(125)として加算部2705(106)に入力する。予測情報2721(126)がイントラ予測を示唆する場合には、予測選択スイッチ2710(111)は図7A及び図7Bに示される予測モードに従って、イントラ単方向予測画像生成部2707(108)もしくはイントラ双方向予測画像生成部2708(109)からの出力端にスイッチを接続する。一方、予測情報2721(126)がインター予測を示唆する場合には、予測選択スイッチ2710(111)はインター予測部2709(110)からの出力端にスイッチを接続する。 The prediction selection switch 2710 (111) is an output terminal of the intra unidirectional prediction image generation unit 2707 (108), an output terminal of the intra bidirectional prediction image generation unit 2708 (109), or the inter prediction image generation unit 2709 (110). The output end is selected according to the prediction information 2721 (126) output from the entropy decoding unit 2702, and the intra prediction image or the inter prediction image is input to the addition unit 2705 (106) as the prediction image 2722 (125). When the prediction information 2721 (126) suggests intra prediction, the prediction selection switch 2710 (111) causes the intra unidirectional prediction image generation unit 2707 (108) or both intra according to the prediction mode shown in FIGS. 7A and 7B. A switch is connected to the output terminal from the direction prediction image generation unit 2708 (109). On the other hand, when the prediction information 2721 (126) suggests inter prediction, the prediction selection switch 2710 (111) connects the switch to the output terminal from the inter prediction unit 2709 (110).
 予測選択部2714は、エントロピー復号化部2702から送られてきた予測情報2721に基づいて予測選択スイッチ2710にスイッチの出力端を制御する。前述のように、予測画像2722の生成のためにイントラ予測またはインター予測が選択可能であるが、イントラ予測及びインター予測の夫々に複数のモードが規定されている。この中から1つの予測モードが、予測情報2721として入力される。イントラ双方向予測の場合には図11A及び図11Bに示したように実質的に2つの予測モードが選択される。 The prediction selection unit 2714 controls the output terminal of the switch to the prediction selection switch 2710 based on the prediction information 2721 sent from the entropy decoding unit 2702. As described above, intra prediction or inter prediction can be selected to generate the predicted image 2722, but a plurality of modes are defined for each of intra prediction and inter prediction. One prediction mode is input as prediction information 2721 from these. In the case of intra bidirectional prediction, substantially two prediction modes are selected as shown in FIGS. 11A and 11B.
 <逆直交変換部2704(105)> 
 以下、図12を用いて本実施形態に係る逆直交変換部2704(105)の詳細を説明する。 
 逆直交変換部2704(105)は、選択スイッチA1201、垂直逆変換部1206、転置部1204、選択スイッチB1205及び水平逆変換部1207を有する。垂直逆変換部1206は、1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203を含む。水平逆変換部1207は、1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203を含む。尚、垂直逆変換部1206及び水平逆変換部1207の順序は、一例であり、これらは逆順であっても構わない。
<Inverse orthogonal transform unit 2704 (105)>
Hereinafter, the details of the inverse orthogonal transform unit 2704 (105) according to the present embodiment will be described with reference to FIG.
The inverse orthogonal transform unit 2704 (105) includes a selection switch A 1201, a vertical inverse transform unit 1206, a transposition unit 1204, a selection switch B 1205, and a horizontal inverse transform unit 1207. The vertical inverse transform unit 1206 includes a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform unit 1203. The horizontal inverse transform unit 1207 includes a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform unit 1203. Note that the order of the vertical inverse transform unit 1206 and the horizontal inverse transform unit 1207 is an example, and these may be reversed.
 図12中に示される2つの1D逆離散コサイン変換部1202は、物理的に同一のハードウェアを時分割で使用することによっても実現可能である。また、1D逆離散サイン変換部1203も同様である。 The two 1D inverse discrete cosine transform units 1202 shown in FIG. 12 can also be realized by using physically identical hardware in a time division manner. The same applies to the 1D inverse discrete sine transform unit 1203.
 選択スイッチA1201は、1D変換設定部1208から出力される1D変換インデックス1252に含まれる垂直変換インデックス(Vertical_transform_idx)に従って、復元変換係数121を1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203のうちのいずれか一方に導く。1D逆離散コサイン変換部1202は、入力された復元変換係数121(行列形式)に対して離散コサイン変換行列の転置行列を乗算して出力する。1D逆離散サイン変換部1203は、入力された復元変換係数121に対して離散サイン変換行列の転置行列を乗算して出力する。具体的には、1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203(即ち、垂直逆変換部1206)は、数式(9)に示す一次元の逆直交変換を行う。 The selection switch A 1201 converts the restored transform coefficient 121 of the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 according to the vertical transform index (Vertical_transform_idx) included in the 1D transform index 1252 output from the 1D transform setting unit 1208 Lead to one of them. The 1D inverse discrete cosine transform unit 1202 multiplies the input restoration transform coefficient 121 (matrix format) by a transposed matrix of the discrete cosine transform matrix and outputs the result. The 1D inverse discrete sine transform unit 1203 multiplies the input restoration transform coefficient 121 by the transposed matrix of the discrete sine transform matrix and outputs the result. Specifically, the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 (that is, the vertical inverse transform unit 1206) perform one-dimensional inverse orthogonal transform represented by Expression (9).
 数式(9)において、Z'は復元変換係数121の行列(N×N)を示し、Vは1D逆離散コサイン変換行列及び1D逆離散サイン変換行列(いずれもN×N)の転置行列を包括的に示しており、Y'は1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203の出力行列(N×N)を示す。つまり、Vは数式(6)の離散コサイン変換行列、若しくは数式(7)の離散サイン変換行列がそれぞれ対応する。 In Equation (9), a Z 'represents a matrix of restoring conversion coefficient 121 (N × N), V T is the transpose matrix of 1D inverse discrete cosine transform matrix and 1D inverse discrete sine transform matrix (both N × N) Y ′ indicates an output matrix (N × N) of the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203. That, V T is the discrete cosine transform matrix in Equation (6), or a discrete sine transform matrix equation (7) corresponds, respectively.
 転置部1204は、垂直逆変換部1206の出力行列(Y')の転置を行って、選択スイッチB1205に与える。但し、転置部1204は、一例であって、対応するハードウェアを必ずしも用意しなくてもよい。例えば、垂直逆変換部1206による1D逆直交変換を実行した結果(垂直逆変換部1206の出力行列の各要素)を保持しておき、水平逆変換部1207による1D逆直交変換を実行するときに適切な順序で読み出せば、転置部1204に対応するハードウェアを用意しなくても出力行列(Y')の転置を実行できる。 The transposition unit 1204 transposes the output matrix (Y ′) of the vertical inverse transform unit 1206 and supplies the transposition to the selection switch B 1205. However, the transposition unit 1204 is an example, and corresponding hardware may not necessarily be prepared. For example, when 1D inverse orthogonal transform by the vertical inverse transform unit 1206 is executed (each element of the output matrix of the vertical inverse transform unit 1206) is held, and 1D inverse orthogonal transform is performed by the horizontal inverse transform unit 1207 If read in an appropriate order, transposition of the output matrix (Y ′) can be executed without preparing hardware corresponding to the transposition unit 1204.
 選択スイッチB1205は、1D変換設定部1208から出力される1D変換インデックス1252に含まれる水平変換インデックス(Horizontal_transform_idx)に従って、転置部1204からの入力行列を1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203のうちのいずれか一方に導く。1D逆離散コサイン変換部1202は、入力行列に対して1D逆離散コサイン変換を行い、結果を出力する。1D逆離散サイン変換部1203は、入力行列に対して1D逆離散サイン変換を行い、結果を出力する。具体的には、1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203(即ち、水平逆変換部1207)は、数式(10)に示す一次元の逆直交変換を行う。 The selection switch B 1205 converts the input matrix from the transposition unit 1204 into a 1D inverse discrete cosine transform unit 1202 and a 1D inverse discrete sine transform according to a horizontal transformation index (Horizontal_transform_idx) included in the 1D transformation index 1252 output from the 1D transformation setting unit 1208. Lead to one of the sections 1203. The 1D inverse discrete cosine transform unit 1202 performs 1D inverse discrete cosine transform on the input matrix and outputs the result. The 1D inverse discrete sine transform unit 1203 performs 1D inverse discrete sine transform on the input matrix and outputs the result. Specifically, the 1D inverse discrete cosine transform unit 1202 and the 1D inverse discrete sine transform unit 1203 (that is, the horizontal inverse transform unit 1207) perform one-dimensional inverse orthogonal transform represented by Expression (10).
 数式(10)において、Hは1D離散コサイン変換行列及び1D離散サイン変換行列(いずれもN×N)の転置行列を包括的に示しており、X'は1D逆離散コサイン変換部1202及び1D逆離散サイン変換部1203の出力行列(N×N)を示しており、これは復元予測誤差122を指す。つまり、Hは数式(6)の離散コサイン変換行列、若しくは数式(7)の離散サイン変換行列がそれぞれ対応する。 In Equation (10), H T is 1D are generically indicates a transposed matrix of the discrete cosine transform matrix and 1D discrete sine transform matrix (both N × N), X 'is 1D inverse discrete cosine transform unit 1202 and 1D An output matrix (N × N) of the inverse discrete sine transform unit 1203 is shown, which indicates the restored prediction error 122. That, H T is the discrete cosine transform matrix in Equation (6), or a discrete sine transform matrix equation (7) corresponds, respectively.
 以上のように、逆直交変換部105は、復元変換係数(行列)2716(121)に対して、入力された直交変換情報2723(127)に従って逆直交変換を行い、復元予測誤差(行列)2717(122)を生成する。尚、既存の逆直交変換を再利用する形で、1D逆離散コサイン変換部1202をH.264/MPEG-4 AVCの逆離散コサイン変換に入れ替えてもよい。更に、逆直交変換部2704(105)は、アダマール変換、カルーネン・レーベ変換、などの種々の逆直交変換を実現してもよい。いずれにしても図1に示される画像符号化装置100の直交変換部102と対応する逆直交変換が選択されればよい。 As described above, the inverse orthogonal transform unit 105 performs inverse orthogonal transform on the reconstructed transform coefficient (matrix) 2716 (121) according to the input orthogonal transform information 2723 (127), and reconstructed prediction error (matrix) 2717. (122) is generated. Note that the 1D inverse discrete cosine transform unit 1202 may be replaced with an inverse discrete cosine transform of H.264 / MPEG-4 AVC by reusing the existing inverse orthogonal transform. Further, the inverse orthogonal transform unit 2704 (105) may realize various inverse orthogonal transforms such as Hadamard transform and Karhunen-Loeve transform. In any case, an inverse orthogonal transform corresponding to the orthogonal transform unit 102 of the image encoding device 100 shown in FIG. 1 may be selected.
 以下、図12の1D変換設定部1208についての詳細を説明する。1D変換設定部1208は、直交変換情報2723(127)に基づいて、垂直直交変換及び垂直逆直交変換のために使用される変換行列を選択するための1D変換インデックスと、水平直交変換及び水平逆直交変換のために使用される変換行列を選択するための1D変換インデックスとを設定する機能を有する。1D変換インデックス1252は、垂直直交変換及び水平直交変換でそれぞれ選択される直交変換を直接的または間接的に示す。 Details of the 1D conversion setting unit 1208 in FIG. 12 will be described below. The 1D conversion setting unit 1208, based on the orthogonal conversion information 2723 (127), a 1D conversion index for selecting a conversion matrix used for vertical orthogonal conversion and vertical inverse orthogonal conversion, horizontal orthogonal conversion and horizontal reverse It has a function of setting a 1D transform index for selecting a transform matrix used for orthogonal transform. The 1D transform index 1252 directly or indirectly indicates the orthogonal transform selected by the vertical orthogonal transform and the horizontal orthogonal transform, respectively.
 例えば、1D変換インデックス1252は、図13Aに示す変換インデックス(TransformIdx)と垂直或いは水平方向の1D直交変換(それぞれVertical_transform_idx、Horizontal_transform_idx)で表現することができる。図13Aのテーブルを参照すれば、変換インデックスから垂直変換部のための1D変換インデックス(Vertical_transform_idx)及び水平変換部のための1D変換インデックス(Horizontal_transform_idx)を導出できる。また、図13Bでは、それぞれのidxが離散コサイン変換か離散サイン変換のいずれを指しているかを示している。idxが「1」の場合は、離散サイン変換行列(DST)を指し、「0」である場合は離散コサイン変換行列(DCT)を指す。図13Bにおいて、例えば、直交変換情報127に含まれるTransformIdxに基づいて対応する1D変換インデックス1252が参照され、選択スイッチAにVertical_transform_idxが、選択スイッチBにHorizontal_transform_idxが出力される。例えば、Vertical_transform_idx或いはH Horizontal_transform_idxが図13Bを参照してDCTを指す場合、選択スイッチは出力端を1D逆離散コサイン変換部1202(もしくは1D離散コサイン変換部902)へと接続する。Vertical_transform_idx或いはHorizontal_transform_idxが図13Bを参照してDSTを指す場合、選択スイッチは出力端を1D逆離散サイン変換部1203(もしくは1D離散サイン変換部903)へと接続する。 For example, the 1D transform index 1252 can be expressed by a transform index (TransformIdx) shown in FIG. 13A and a 1D orthogonal transform in the vertical or horizontal direction (Vertical_transform_idx and Horizontal_transform_idx, respectively). With reference to the table in FIG. 13A, a 1D transformation index (Vertical_transform_idx) for a vertical transformation unit and a 1D transformation index (Horizontal_transform_idx) for a horizontal transformation unit can be derived from the transformation index. Further, FIG. 13B shows whether each idx indicates discrete cosine transform or discrete sine transform. When idx is “1”, it indicates a discrete sine transform matrix (DST), and when it is “0”, it indicates a discrete cosine transform matrix (DCT). In FIG. 13B, for example, the corresponding 1D transform index 1252 is referenced based on TransformIdx included in the orthogonal transform information 127, and Vertical_transform_idx is output to the selection switch A and Horizontal_transform_idx is output to the selection switch B. For example, when Vertical_transform_idx or H Horizontal_transform_idx indicates DCT with reference to FIG. 13B, the selection switch connects the output end to the 1D inverse discrete cosine transform unit 1202 (or 1D discrete cosine transform unit 902). When Vertical_transform_idx or Horizontal_transform_idx indicates DST with reference to FIG. 13B, the selection switch connects the output end to the 1D inverse discrete sine transform unit 1203 (or 1D discrete sine transform unit 903).
 次に、直交変換情報について説明する。直交変換情報は、予め定められた変換インデックスと予測モードのマップを参照して、選択された予測モードに対応する変換インデックスを間接的及び直接的に示す。図11A及び図11Bに予測モードと変換インデックスとの関係を示す。図11A及び図11Bは、図7A及び図7Bで示したイントラ予測モードにTransformIdxを追記したものである。この表から、選択された予測モードに従って、TransformIdxを導出することができる。各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D離散コサイン変換行列または1D離散サイン変換行列を適用することにより、安定的に高い変換効率が達成される。 Next, orthogonal transformation information will be described. The orthogonal transform information indirectly and directly indicates a transform index corresponding to the selected prediction mode with reference to a predetermined transform index and prediction mode map. 11A and 11B show the relationship between the prediction mode and the conversion index. 11A and 11B are obtained by adding TransformIdx to the intra prediction mode shown in FIGS. 7A and 7B. From this table, TransformIdx can be derived according to the selected prediction mode. By classifying the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-mentioned tendency, and adaptively applying a 1D discrete cosine transform matrix or 1D discrete sine transform matrix for each of the vertical direction and the horizontal direction, High conversion efficiency is achieved stably.
 <平面予測に関する直交変換の効果> 
 図11Aに示す通り、PredModeが2を示すときはIntra_DCが指定される。Intra_DCは、利用可能な参照画素の平均値で予測するDC予測を示している。DC予測の予測誤差は、統計的に上述したような方向性の誤差が生じないため、H.264/MPEG-4 AVCで用いられるDCTを選択する。一方、双方向イントラ予測の場合に、2つの予測モードのうちの1つがIntra_DCであった場合、それ以外の予測モードの予測方向に従って、予測誤差の傾向が変化する。そこで、このような場合は、もう一方の予測モードで定められたTransformIdxを設定することによって、予測誤差の冗長性を効率的に削減することが可能となる。例えば、図11A及び図11Bに示す通り、PredModeが34の場合、PredModeが2とPredModeが0の2つの予測モードで双方向イントラ予測が行われる。1つ目がIntra_DCであるため、もう片方のPredMode=0が保持するTransformIdx=2と同じTransformIdxがPredMode=34で選択される。ここでは、DC予測についてのみ説明したが、このような方向予測ではない予測モードが選択された場合にも同様な枠組みでTransformIdxを設定すればよい。尚、双方向イントラ予測の2つの予測モードがいずれも方向予測でない場合はDCTを選択する。
<Effect of orthogonal transformation on plane prediction>
As shown in FIG. 11A, when PredMode indicates 2, Intra_DC is designated. Intra_DC indicates DC prediction that is predicted by the average value of available reference pixels. As the prediction error of DC prediction, the directional error as described above does not occur statistically, so the DCT used in H.264 / MPEG-4 AVC is selected. On the other hand, in the case of bidirectional intra prediction, if one of the two prediction modes is Intra_DC, the tendency of the prediction error changes according to the prediction direction of the other prediction modes. Therefore, in such a case, it is possible to efficiently reduce the redundancy of the prediction error by setting TransformIdx determined in the other prediction mode. For example, as illustrated in FIGS. 11A and 11B, when PredMode is 34, bidirectional intra prediction is performed in two prediction modes with PredMode of 2 and PredMode of 0. Since the first is Intra_DC, the same TransformIdx as TransformIdx = 2 held by the other PredMode = 0 is selected with PredMode = 34. Although only DC prediction has been described here, TransformIdx may be set in a similar framework even when a prediction mode that is not such direction prediction is selected. Note that DCT is selected when the two prediction modes of bidirectional intra prediction are not directional prediction.
 <シンタクス構成> 
 以下、図27の動画像復号化装置2700が利用するシンタクスについて説明する。 
 シンタクスは、画像符号化装置が動画像データを符号化する際の符号化データ(例えば、図27の符号化データ2725)の構造を示している。この符号化データを復号化する際に、同じシンタクス構造を参照して動画像復号化装置がシンタクス解釈を行う。図27の動画像復号化装置が利用するシンタクス1500を図15に例示する。
<Syntax configuration>
Hereinafter, the syntax used by the video decoding device 2700 in FIG. 27 will be described.
The syntax indicates the structure of encoded data (for example, encoded data 2725 in FIG. 27) when the image encoding apparatus encodes moving image data. When decoding the encoded data, the moving picture decoding apparatus interprets the syntax with reference to the same syntax structure. FIG. 15 illustrates a syntax 1500 used by the video decoding apparatus in FIG.
 シンタクス1500は、ハイレベルシンタクス1501、スライスレベルシンタクス1502及びコーディングツリーレベルシンタクス1503の3つのパートを含む。ハイレベルシンタクス1501は、スライスよりも上位のレイヤのシンタクス情報を含む。スライスとは、フレームまたはフィールドに含まれる矩形領域もしくは連続領域を指す。スライスレベルシンタクス1502は、各スライスを復号化するために必要な情報を含む。コーディングツリーレベルシンタクス1503は、各コーディングツリー(即ち、各コーディングツリーブロック)を復号化するために必要な情報を含む。これら各パートは、更に詳細なシンタクスを含む。 The syntax 1500 includes three parts: a high level syntax 1501, a slice level syntax 1502, and a coding tree level syntax 1503. The high level syntax 1501 includes syntax information of a layer higher than the slice. A slice refers to a rectangular area or a continuous area included in a frame or a field. The slice level syntax 1502 includes information necessary for decoding each slice. Coding tree level syntax 1503 includes information necessary to decode each coding tree (ie, each coding tree block). Each of these parts includes more detailed syntax.
 ハイレベルシンタクス1501は、シーケンスパラメータセットシンタクス1504及びピクチャパラメータセットシンタクス1505などの、シーケンス及びピクチャレベルのシンタクスを含む。スライスレベルシンタクス1502は、スライスヘッダーシンタクス1506及びスライスデータシンタクス1507などを含む。コーディングツリーレベルシンタクス1503は、コーディングツリーブロックシンタクス1508及びプレディクションユニットシンタクス1509などを含む。 The high level syntax 1501 includes sequence and picture level syntaxes such as a sequence parameter set syntax 1504 and a picture parameter set syntax 1505. The slice level syntax 1502 includes a slice header syntax 1506, a slice data syntax 1507, and the like. The coding tree level syntax 1503 includes a coding tree block syntax 1508, a prediction unit syntax 1509, and the like.
 コーディングツリーブロックシンタクス1508は、四分木構造を持つことができる。具体的には、コーディングツリーブロックシンタクス1508のシンタクス要素として、更にコーディングツリーブロックシンタクス1508を再帰呼び出しすることができる。即ち、1つのコーディングツリーブロックを四分木で細分化することができる。また、コーディングツリーブロックシンタクス1508内にはトランスフォームユニットシンタクス1510が含まれている。トランスフォームユニットシンタクス1510は、四分木の最末端の各コーディングツリーブロックシンタクス1508において呼び出される。トランスフォームユニットシンタクス1510は、逆直交変換及び量子化などに関わる情報が記述されている。 The coding tree block syntax 1508 can have a quadtree structure. Specifically, the coding tree block syntax 1508 can be recursively called as a syntax element of the coding tree block syntax 1508. That is, one coding tree block can be subdivided with a quadtree. Also, the coding tree block syntax 1508 includes a transform unit syntax 1510. The transform unit syntax 1510 is invoked at each coding tree block syntax 1508 at the extreme end of the quadtree. The transform unit syntax 1510 describes information related to inverse orthogonal transformation and quantization.
 トランスフォームユニットシンタクス1510は、四分木構造を持つことができる。具体的には、トランスフォームユニットシンタクス1510のシンタクス要素として、更にトランスフォームユニットシンタクス1510を再帰呼び出しすることができる。即ち、1つのトランスフォームユニットを四分木で細分化することができる。 The transform unit syntax 1510 can have a quadtree structure. Specifically, the transform unit syntax 1510 can be further recursively called as a syntax element of the transform unit syntax 1510. That is, one transform unit can be subdivided with a quadtree.
 図16は、本実施形態に係るスライスヘッダーシンタクス1506を例示する。図16に示されるslice_bipred_intra_flagは、例えば、当該スライスに関して本実施形態に係る双方向イントラ予測の有効/無効を示すシンタクス要素である。 FIG. 16 illustrates a slice header syntax 1506 according to the present embodiment. The slice_bipred_intra_flag illustrated in FIG. 16 is a syntax element indicating, for example, the validity / invalidity of bidirectional intra prediction according to the present embodiment for the slice.
 slice_bipred_intra_flagが0である場合、当該スライス内での本実施形態に係る双方向イントラは無効である。故に、予測選択スイッチ2710(111)は、スイッチの出力端をイントラ双方向予測画像生成部2708(109)に接続しない。単方向イントラ予測の一例として、図7A及び図7B,図11A及び図11B中のBipredFlag[]が0となる予測や、H.264/MPEG-4 AVCにおいて規定されるイントラ予測を行っても構わない。 When slice_bipred_intra_flag is 0, the bidirectional intra according to the present embodiment in the slice is invalid. Therefore, the prediction selection switch 2710 (111) does not connect the output terminal of the switch to the intra bidirectional prediction image generation unit 2708 (109). As an example of unidirectional intra prediction, prediction in which BipedFlag [] in FIGS. 7A and 7B, FIG. 11A and FIG. 11B is 0, or intra prediction defined in H.264 / MPEG-4 AVC may be performed. Absent.
 一例として、slice_bipred_intra_flagが1である場合には、当該スライス内全域で本実施形態に係る双方向イントラ予測が有効となる。 
 また、別の例として、slice_bipred_intra_flagが1である場合には、より下位のレイヤ(コーディングツリーブロック、トランスフォームユニットなど)のシンタクスにおいて当該スライス内部の局所領域毎に本実施形態に係る予測の有効/無効が規定されてもよい。
As an example, when slice_bipred_intra_flag is 1, the bidirectional intra prediction according to the present embodiment is valid in the entire area of the slice.
Further, as another example, when slice_bipred_intra_flag is 1, in the syntax of a lower layer (coding tree block, transform unit, etc.), the prediction validity / Invalidity may be specified.
 図16に示されるslice_directional_transform_intra_flagは、例えば、当該スライスに関して本実施形態に係る逆離散サイン変換の有効/無効を示すシンタクス要素である。 The slice_directional_transform_intra_flag shown in FIG. 16 is a syntax element indicating the validity / invalidity of the inverse discrete sine transform according to the present embodiment with respect to the slice, for example.
 slice_directional_transform_intra_flagが0である場合、当該スライス内での本実施形態に係る逆離散サイン変換は無効である。故に、変換情報設定部2711(112)はTransformIdxを常に3に設定して出力する。或いは1D変換設定部908・1208は、TransformIdxの値に関わらず、Vertical_transform_idxとHorizontal_transform_idxを1に設定してもよい。一例として、slice_directional_transform_intra_flagが1である場合には、当該スライス内全域で本実施形態に係る逆離散サイン変換が有効となる。 When slice_directional_transform_intra_flag is 0, the inverse discrete sine transform according to this embodiment in the slice is invalid. Therefore, the transformation information setting unit 2711 (112) always sets TransformIdx to 3 and outputs it. Alternatively, the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx. As an example, when slice_directional_transform_intra_flag is 1, the inverse discrete sine transform according to the present embodiment is valid over the entire area in the slice.
 また、別の例として、slice_directional_transform_intra_flagが1である場合には、より下位のレイヤ(コーディングツリーブロック、トランスフォームユニットなど)のシンタクスにおいて当該スライス内部の局所領域毎に本実施形態に係る逆離散サイン変換の有効/無効が規定されてもよい。 As another example, when slice_directional_transform_intra_flag is 1, the inverse discrete sine transform according to the present embodiment for each local region in the slice in the syntax of a lower layer (coding tree block, transform unit, etc.) The validity / invalidity may be defined.
 図17は、本実施形態に係るコーディングツリーブロックシンタクス1508を例示する。図17に示されるctb_directional_transform_flagは、当該コーディングツリーブロックに関して本実施形態に係る逆離散サイン変換の有効/無効を示すシンタクス要素である。また、図17に示されるpred_modeはプレディクションユニットシンタクス1509に含まれるシンタクス要素の1つであり、当該コーディングツリーブロックもしくはマクロブロック内の符号化タイプを示している。MODE_INTRAは、符号化タイプがイントラ予測であることを示す。ctb_directional_transform_flagは、前述のslice_directional_transform_flagが1であって、かつ、コーディングツリーブロックの符号化タイプがイントラ予測の時にのみ符号化される。CBPはCoded_Block_Pattern情報を示しており、当該コーディングツリーブロック内に変換係数があるかどうかを示す情報である。当該情報が0である場合は、変換係数が無いことを示しデコーダは逆変換処理を行う必要がないため、ctb_directional_transform_flagを復号しない。 FIG. 17 illustrates the coding tree block syntax 1508 according to the present embodiment. Ctb_directional_transform_flag shown in FIG. 17 is a syntax element indicating validity / invalidity of the inverse discrete sine transform according to this embodiment with respect to the coding tree block. Also, pred_mode shown in FIG. 17 is one of syntax elements included in the prediction unit syntax 1509, and indicates the coding type in the coding tree block or macroblock. MODE_INTRA indicates that the encoding type is intra prediction. ctb_directional_transform_flag is encoded only when the above-described slice_directional_transform_flag is 1 and the encoding type of the coding tree block is intra prediction. CBP indicates Coded_Block_Pattern information, and is information indicating whether or not there is a transform coefficient in the coding tree block. If the information is 0, it indicates that there is no transform coefficient, and the decoder does not need to perform inverse transform processing, so ctb_directional_transform_flag is not decoded.
 ctb_directional_transform_flagが0である場合、当該コーディングツリーブロック内での本実施形態に係る逆離散サイン変換は無効である。故に、変換情報設定部2711(112)はTransformIdxを常に3に設定して出力する。或いは1D変換設定部908・1208は、TransformIdxの値に関わらず、Vertical_transform_idxとHorizontal_transform_idxを1に設定してもよい。 
 一方、ctb_directional_transform_flagが1である場合、当該コーディングツリーブロック内で本実施形態に係る逆離散サイン変換が有効となる。
When ctb_directional_transform_flag is 0, the inverse discrete sine transform according to the present embodiment in the coding tree block is invalid. Therefore, the transformation information setting unit 2711 (112) always sets TransformIdx to 3 and outputs it. Alternatively, the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
On the other hand, when ctb_directional_transform_flag is 1, the inverse discrete sine transform according to the present embodiment is valid in the coding tree block.
 図17の例のように、コーディングツリーブロックシンタクス1508において、本実施形態に係る逆離散サイン変換の有効/無効を規定するフラグを符号化することにより、局所領域(即ち、コーディングツリーブロック)毎に最適な逆直交変換を行うことが可能となる。 As in the example of FIG. 17, the coding tree block syntax 1508 encodes a flag that defines the validity / invalidity of the inverse discrete sine transform according to the present embodiment, so that each local region (ie, coding tree block) is encoded. Optimal inverse orthogonal transform can be performed.
 図18は、本実施形態に係るトランスフォームユニットシンタクス1510を例示する。図18に示されるtu_directional_transform_flagは、当該トランスフォームユニットに関して本実施形態に係る逆離散サイン変換の有効/無効を示すシンタクス要素である。また、図18に示されるpred_modeはプレディクションユニットシンタクス1509に含まれるシンタクス要素の1つであり、当該コーディングツリーブロックもしくはマクロブロック内の符号化タイプを示している。MODE_INTRAは、符号化タイプがイントラ予測であることを示す。tu_directional_transform_flagはslice_directional_transform_flagが1であって、かつ、コーディングツリーブロックの符号化タイプがイントラ予測の時にのみ符号化される。coded_block_flagは当該トランスフォームユニット内に変換係数があるかどうかを示す1ビットの情報である。当該情報が0である場合は、変換係数が無いことを示しデコーダは逆変換処理を行う必要がないため、tu_directional_transform_flagを復号しない。 FIG. 18 illustrates a transform unit syntax 1510 according to this embodiment. The tu_directional_transform_flag shown in FIG. 18 is a syntax element indicating validity / invalidity of the inverse discrete sine transform according to this embodiment with respect to the transform unit. Further, pred_mode shown in FIG. 18 is one of syntax elements included in the prediction unit syntax 1509, and indicates the coding type in the coding tree block or macroblock. MODE_INTRA indicates that the encoding type is intra prediction. tu_directional_transform_flag is encoded only when slice_directional_transform_flag is 1 and the encoding type of the coding tree block is intra prediction. coded_block_flag is 1-bit information indicating whether or not there is a transform coefficient in the transform unit. If the information is 0, it indicates that there is no transform coefficient, and the decoder does not need to perform inverse transform processing, so tu_directional_transform_flag is not decoded.
 tu_directional_transform_flagが0である場合、当該トランスフォームユニット内での本実施形態に係る逆離散サイン変換は無効である。故に、変換情報設定部2711(112)はTransformIdxを常に3に設定して出力する。或いは1D変換設定部908・1208は、TransformIdxの値に関わらず、Vertical_transform_idxとHorizontal_transform_idxを1に設定してもよい。 
 一方、tu_directional_transform_flagが1である場合、当該コーディングツリーブロック内で本実施形態に係る逆離散サイン変換が有効となる。
When tu_directional_transform_flag is 0, the inverse discrete sine transform according to the present embodiment in the transform unit is invalid. Therefore, the transformation information setting unit 2711 (112) always sets TransformIdx to 3 and outputs it. Alternatively, the 1D conversion setting units 908 and 1208 may set Vertical_transform_idx and Horizontal_transform_idx to 1 regardless of the value of TransformIdx.
On the other hand, when tu_directional_transform_flag is 1, the inverse discrete sine transform according to the present embodiment is valid in the coding tree block.
 図18の例のように、トランスフォームユニットシンタクス1510において、本実施形態に係る離散サイン変換及び逆離散サイン変換の有効/無効を規定するフラグを復号すると、局所領域(即ち、トランスフォームユニット)毎に最適な逆直交変換を行うことが可能となる。 As in the example of FIG. 18, in the transform unit syntax 1510, when the flag that defines the validity / invalidity of the discrete sine transform and the inverse discrete sine transform according to the present embodiment is decoded, each local region (ie, transform unit) is decoded. It is possible to perform inverse orthogonal transform optimal for the above.
 図19に、プレディクションユニットシンタクスの一例を示す。図19中のpred_modeは当該プレディクションユニットの予測タイプをしている。MODE_INTRAは予測タイプがイントラ予測であることを示す。intra_split_flagは当該プレディクションユニットを更に4つのプレディクションユニットに分割するか否かを示すフラグである。intra_split_flagが1の場合、プレディクションユニットを、縦横のサイズ半分で4分割したものをプレディクションユニットとする。intra_split_flagが0の場合、プレディクションユニットを分割しない。 FIG. 19 shows an example of the prediction unit syntax. Pred_mode in FIG. 19 indicates the prediction type of the prediction unit. MODE_INTRA indicates that the prediction type is intra prediction. intra_split_flag is a flag indicating whether or not the prediction unit is further divided into four prediction units. When intra_split_flag is 1, a prediction unit is a prediction unit obtained by dividing the prediction unit into four in half in the vertical and horizontal sizes. When intra_split_flag is 0, the prediction unit is not divided.
 intra_luma_bipred_flag[i]は当該プレディクションユニットに適用した予測モードIntraPredModeが単方向イントラ予測モードか双方向イントラ予測モードであるかを示すフラグである。iは分割されたプレディクションユニットの位置を示しており、前記intra_split_flagが0の場合には0、前記intra_split_flagが1の場合には0~3が設定される。当該フラグは、図9、図12、図13A及び図13Bに示される当該プレディクションユニットのIntraBipredFlagの値がセットされている。 Intra_luma_bipred_flag [i] is a flag indicating whether the prediction mode IntraPredMode applied to the prediction unit is a unidirectional intra prediction mode or a bidirectional intra prediction mode. i indicates the position of the divided prediction unit. When the intra_split_flag is 0, 0 is set, and when the intra_split_flag is 1, 0 to 3 are set. In the flag, the value of IntraBipredFlag of the prediction unit shown in FIGS. 9, 12, 13A, and 13B is set.
 intra_luma_bipred_flag[i]が1の場合、当該プレディクションユニットは双方向イントラ予測であることを示し、用意された複数の双方向イントラ予測モードの内、使用した双方向イントラ予測モードを特定する情報であるintra_luma_bipred_mode[i]を復号する。intra_luma_bipred_mode[i]は、図7A及び図7B、図11A及び図11Bに示される双方向イントラ予測モード数IntraBipredNumに従って等長復号されても良いし、予め決定された符号表を用いて復号されても良い。intra_luma_bipred_flag[i]が0の場合、当該プレディクションユニットは単方向イントラ予測であることを示し、隣接ブロックから予測復号を行う。 When intra_luma_bipred_flag [i] is 1, this indicates that the prediction unit is bi-directional intra prediction, and is information that identifies the bi-directional intra prediction mode used from among the prepared bi-directional intra prediction modes. Decrypt intra_luma_bipred_mode [i]. intra_luma_bipred_mode [i] may be decoded in equal length according to the bidirectional intra prediction mode number IntraBipredNum shown in FIGS. 7A and 7B, FIG. 11A and FIG. 11B, or may be decoded using a predetermined code table. good. When intra_luma_bipred_flag [i] is 0, it indicates that the prediction unit is unidirectional intra prediction, and predictive decoding is performed from adjacent blocks.
 prev_intra_luma_unipred_idx[i]は、隣接ブロックから計算される予測モードの予測値MostProbableModeと当該プレディクションユニットのイントラ予測モードが同一であるか否かを示すフラグである。MostProbableModeの計算方法の詳細は後述する。prev_intra_luma_unipred_idx[i]が0でない場合、前記MostProbableModeとイントラ予測モードIntraPredModeが等しいことを示す。prev_intra_luma_unipred_idx[i]が0の場合、前記MostProbableModeとイントラ予測モードIntraPredModeは異なることを示し、イントラ予測モードIntraPredModeが更にMostProbableMode以外のいずれのモードであるかを特定する情報rem_intra_luma_unipred_mode[i]が復号される。rem_intra_luma_unipred_mode[i]は、図7A及び図7B、図11A及び図11Bに示される双方向イントラ予測モード数IntraPredModeNumに従って等長復号されても良いし、予め決定された符号表を用いて復号されても良い。イントラ予測モードIntraPredModeからrem_intra_luma_unipred_mode[i]は数式(11)を用いて計算される。 Prev_intra_luma_unipred_idx [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. Details of the calculation method of MostProbableMode will be described later. When prev_intra_luma_unipred_idx [i] is not 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal. When prev_intra_luma_unipred_idx [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_luma_unipred_mode [i] that specifies which intra prediction mode IntraPredMode is other than MostProbableMode is decoded. rem_intra_luma_unipred_mode [i] may be decoded in equal length according to the bidirectional intra prediction mode number IntraPredModeNum shown in FIGS. 7A and 7B, FIG. 11A and FIG. 11B, or may be decoded using a predetermined code table. good. From intra prediction mode IntraPredMode, rem_intra_luma_unipred_mode [i] is calculated using Equation (11).
 ここでnumCandは、MostProbableModeの候補数を示しており、candModeList[cIdx]は、実際に候補となるMostProbableModeを示している。ここではnumCandを2として、候補となるMostProbableModeは、予測対象ブロックに隣接する既に予測済みの上と左に位置する画素ブロックのIntraPredModeとする。この時、candModeList[0]をMPM_L0と示し、candModeList[1]をMPM_L1と示す。prev_intra_luma_unipred_idx[i]が1の場合はMPM_L0、prev_intra_luma_unipred_idx[i]が2の場合はMPM_L1の予測モードが導出される。numCandの数が複数の場合、candModeList[cIdx]同士が同じ予測モードとなる場合がある。この場合には、符号化する情報に冗長な表現が含まれるため、数式(11)で示されるように、冗長な予測モードを抜いて表現する。実際に符号化する際の符号表などは、これらの予測モードの最大数を考慮して最適な符号表を作ればよい。 
 numCandが1の場合、数式(12)に従ってMostProbableModeが計算される。
Here, numCand indicates the number of candidates for MostProbableMode, and candModeList [cIdx] indicates the MostProbableMode that is actually a candidate. Here, numCand is set to 2, and the candidate MostProbableMode is set to IntraPredMode of pixel blocks positioned on the upper and left sides that have already been predicted and are adjacent to the prediction target block. At this time, candModeList [0] is indicated as MPM_L0, and candModeList [1] is indicated as MPM_L1. When prev_intra_luma_unipred_idx [i] is 1, a prediction mode of MPM_L0 is derived, and when prev_intra_luma_unipred_idx [i] is 2, a prediction mode of MPM_L1 is derived. When the number of numCand is plural, candModeList [cIdx] may be in the same prediction mode. In this case, since the redundant information is included in the information to be encoded, the redundant prediction mode is omitted and expressed as shown in Expression (11). For the code table for actual encoding, an optimum code table may be created in consideration of the maximum number of these prediction modes.
When numCand is 1, MostProbableMode is calculated according to Equation (12).
 なお、Min(x,y)は入力x、yのうち小さい方を出力するパラメータである。また、IntraPredModeA,IntraPredModeBは、符号化プレディクションユニットに対して左に及び上に隣接するプレディクションユニットのイントラ予測モードを示している。 Min (x, y) is a parameter that outputs the smaller of input x and y. IntraPredModeA and IntraPredModeB indicate the intra prediction modes of prediction units adjacent to the left and above the encoded prediction unit.
 ここでは、numCandが1及び2の場合について説明したが、予測対象ブロックに隣接する予測済みの画素ブロックを追加すれば更に候補数を増やすことも容易に実現可能である。また、図19のプレディクションユニットシンタクスは候補数に応じて容易に変更可能である。 Here, the case where numCand is 1 and 2 has been described, but it is also possible to easily increase the number of candidates by adding a predicted pixel block adjacent to the prediction target block. Also, the prediction unit syntax of FIG. 19 can be easily changed according to the number of candidates.
 尚、図16、図17、図18及び図19に例示するシンタクステーブルの行間には、本実施形態において規定していないシンタクス要素が挿入されてもよいし、その他の条件分岐に関する記述が含まれていてもよい。また、シンタクステーブルを複数のテーブルに分割したり、複数のシンタクステーブルを統合したりしてもよい。また、例示した各シンタクス要素の用語は、任意に変更可能である。 It should be noted that syntax elements not defined in this embodiment may be inserted between the lines of the syntax tables illustrated in FIGS. 16, 17, 18 and 19, and other conditional branch descriptions are included. It may be. Further, the syntax table may be divided into a plurality of tables, or a plurality of syntax tables may be integrated. Moreover, the term of each illustrated syntax element can be changed arbitrarily.
 以上説明したように、本実施形態に係る画像符号化装置は、2つの予測方向が異なる参照画素ラインを用いる場合に、予測誤差の傾向が2つの予測方向のいずれとも異なり、片方の予測モードに従って直交変換を選択すると参照画素と予測画素との距離が大きくなるにつれて予測精度が低下するイントラ予測の傾向を活かせずに符号化効率が低下する問題を解消する。この画像符号化装置は、各予測モードの垂直方向及び水平方向を上記傾向の有無に従って2つのクラスに分類し、垂直方向及び水平方向の夫々について適応的に1D離散コサイン変換または1D離散サイン変換を適用する。1D離散サイン変換は、参照画素群のラインに直交する方向(垂直方向または水平方向)について1D直交変換を行う際に、1D離散コサイン変換と比較して係数集密度が高くなる。故に、本実施形態に係る画像復号装置によれば、各予測モードに一律にDCTなどの固定的な直交変換を施す場合に比べて、安定的に高い変換効率が達成される。 As described above, the image coding apparatus according to the present embodiment, when using two reference pixel lines having different prediction directions, has a different prediction error tendency from either of the two prediction directions, and follows one prediction mode. When orthogonal transform is selected, the problem that the coding efficiency is lowered without taking advantage of the tendency of intra prediction in which the prediction accuracy is lowered as the distance between the reference pixel and the prediction pixel is increased is solved. This image encoding apparatus classifies the vertical direction and horizontal direction of each prediction mode into two classes according to the presence or absence of the above-described tendency, and adaptively performs 1D discrete cosine transform or 1D discrete sine transform for each of the vertical direction and horizontal direction. Apply. In the 1D discrete sine transform, when the 1D orthogonal transform is performed in a direction orthogonal to the line of the reference pixel group (vertical direction or horizontal direction), the coefficient density is higher than that of the 1D discrete cosine transform. Therefore, according to the image decoding apparatus according to the present embodiment, high conversion efficiency is stably achieved as compared with a case where fixed orthogonal transformation such as DCT is uniformly applied to each prediction mode.
 また、本実施形態に係る逆直交変換部105は、ハードウェア実装及びソフトウェア実装のいずれにも好適である。 
 以上が、第3の実施形態に係る画像符号化装置の説明である。
Further, the inverse orthogonal transform unit 105 according to the present embodiment is suitable for both hardware implementation and software implementation.
The above is the description of the image encoding device according to the third embodiment.
 (第4の実施形態) 
 第4の実施形態は、第2の動画像復号化装置で符号化された符号化データを復号するための動画像復号化装置に関する。即ち、本実施形態に係る動画像復号化装置は、例えば第2の実施形態に係る画像符号化装置によって生成された符号化データを復号化する。
(Fourth embodiment)
The fourth embodiment relates to a moving picture decoding apparatus for decoding encoded data encoded by a second moving picture decoding apparatus. That is, the moving picture decoding apparatus according to the present embodiment decodes encoded data generated by, for example, the image encoding apparatus according to the second embodiment.
 第4の実施形態に係る動画像復号化装置は、前述の第3の実施形態に係る動画像復号化装置とイントラ単方向予測画像生成部2707(108)及びイントラ双方向予測画像生成部2708(109)の詳細において異なる。以降の説明では、本実施形態において第3の実施形態と同一部分には同一符号を付して示し、異なる部分を中心に説明する。 The moving picture decoding apparatus according to the fourth embodiment includes the moving picture decoding apparatus according to the third embodiment described above, an intra unidirectional prediction image generation unit 2707 (108), and an intra bidirectional prediction image generation unit 2708 ( 109) in detail. In the following description, in this embodiment, the same parts as those in the third embodiment are denoted by the same reference numerals, and different parts will be mainly described.
 図28は本発明の第4の実施携帯に係る動画像像復号化装置2800のブロック図である。図27との違いは、新たに予測方向導出部2801(2001)が追加されている点と予測方向導出部2801(2001)から予測方向導出情報2851(2051)が予測選択スイッチ2710(111)に出力されている点である。また、イントラ単方向予測画像生成部2707(108)及びイントラ双方向予測画像生成部2708(109)が128方向まで拡張されていると仮定する。具体的には方向予測として利用される180度の角度勾配を128個に分割し、1.4度毎に予測方向が割り当てられていることを意味する。但し、第3の実施形態で説明した単方向予測の予測モードは図7A及び図7B、図11A及び図11Bと同一である。それ以外の構成は第1の実施形態と同一のため、説明を省略する。ここでは、予測方向導出部2801(2001)を用いて行われるイントラ予測を予測方向導出モードと呼称する。 FIG. 28 is a block diagram of a moving image decoding apparatus 2800 according to the fourth embodiment of the present invention. The difference from FIG. 27 is that a prediction direction deriving unit 2801 (2001) is newly added and prediction direction deriving information 2851 (2051) from the prediction direction deriving unit 2801 (2001) to the prediction selection switch 2710 (111). This is the output point. In addition, it is assumed that the intra unidirectional prediction image generation unit 2707 (108) and the intra bidirectional prediction image generation unit 2708 (109) are extended to 128 directions. Specifically, it means that the angle gradient of 180 degrees used for direction prediction is divided into 128 pieces, and a prediction direction is assigned every 1.4 degrees. However, the prediction modes of the unidirectional prediction described in the third embodiment are the same as those in FIGS. 7A and 7B and FIGS. 11A and 11B. Since the other configuration is the same as that of the first embodiment, description thereof is omitted. Here, intra prediction performed using the prediction direction deriving unit 2801 (2001) is referred to as a prediction direction deriving mode.
 参照画像メモリ2706(107)から出力された参照画像2719(124)は、予測方向導出部2801(2001)に入力される。予測方向導出部2801(2001)は、入力された参照画像2719(124)を解析し、予測方向導出情報2851(2051)を生成する機能を有する。図21を用いて予測方向導出部2801(2001)を説明する。図21に示すように予測方向導出部2801(2001)は、左参照画素ラインエッジ導出部2101、上参照画素ラインエッジ導出部2102、予測方向導出情報生成部2103を含む。左参照画素ラインエッジ導出部2101は、予測対象画素ブロックの左に位置する参照画素ラインに対してエッジ検出処理を行い、エッジ方向を導出する機能を有する。一方、上参照画素ラインエッジ導出部2102は、予測対象画素ブロックの上に位置する参照画素ラインに対してエッジ検出処理を行い、エッジ方向を導出する機能を有する。 The reference image 2719 (124) output from the reference image memory 2706 (107) is input to the prediction direction deriving unit 2801 (2001). The prediction direction deriving unit 2801 (2001) has a function of analyzing the input reference image 2719 (124) and generating prediction direction deriving information 2851 (2051). The prediction direction deriving unit 2801 (2001) will be described with reference to FIG. As shown in FIG. 21, the prediction direction deriving unit 2801 (2001) includes a left reference pixel line edge deriving unit 2101, an upper reference pixel line edge deriving unit 2102, and a prediction direction deriving information generating unit 2103. The left reference pixel line edge deriving unit 2101 has a function of performing edge detection processing on a reference pixel line located to the left of the prediction target pixel block and deriving an edge direction. On the other hand, the upper reference pixel line edge deriving unit 2102 has a function of performing edge detection processing on a reference pixel line located above the prediction target pixel block and deriving an edge direction.
 図22に左参照画素ラインエッジ導出部2101と上参照画素ラインエッジ導出部2102の導出に利用する画素の一例を示す。左参照画素ラインエッジ導出部2101では、予測対象画素ブロックの左側に位置する右上から左下への斜線で示される2ラインを利用する。上参照画素ラインエッジ導出部2102は、予測対象画素ブロックの上側に位置する左上から右下への斜線で示される2ラインを利用する。尚、本発明の本実施の形態では、2ラインで説明したが、1ラインでも3ラインでもよく、より多くのラインを利用してもよい。尚、図中には左参照画素ラインを用いてエッジ方向を導出した例をA、上参照画素ラインを用いてエッジ方向を導出した例をBとして示している。 FIG. 22 shows an example of pixels used for the derivation of the left reference pixel line edge deriving unit 2101 and the upper reference pixel line edge deriving unit 2102. The left reference pixel line edge deriving unit 2101 uses two lines indicated by diagonal lines from the upper right to the lower left located on the left side of the prediction target pixel block. The upper reference pixel line edge deriving unit 2102 uses two lines indicated by diagonal lines from the upper left to the lower right located above the prediction target pixel block. In the present embodiment of the present invention, two lines have been described, but one line or three lines may be used, and more lines may be used. In the drawing, an example in which the edge direction is derived using the left reference pixel line is shown as A, and an example in which the edge direction is derived using the upper reference pixel line is shown as B.
 具体的なエッジ検出の例として、両処理部は数式(13)に示されるようなオペレータを用いたエッジ強度検出を行う。ここでGxは水平方向(x座標系)のエッジ強度を示し、Gy(y座標系)のエッジ強度を示している。また、エッジ検出オペレータとしてSobelオペレータ、PrewittオペレータやKirschオペレータなど、任意のオペレータを用いてもよい。 As a specific example of edge detection, both processing units perform edge intensity detection using an operator as shown in Equation (13). Here, Gx indicates the edge strength in the horizontal direction (x coordinate system), and indicates the edge strength in Gy (y coordinate system). Further, any operator such as a Sobel operator, a Prewitt operator, or a Kirsch operator may be used as the edge detection operator.
 数式(13)のオペレータを参照画素ラインに対して適用すると、画素毎にエッジ方向ベクトルが導出される。これらのエッジベクトルの中から最適なエッジ方向を導出するため数式(14)を用いる。ここで、<a,b>は2つのベクトルの内積を表す。S(θ)は単位ベクトル上のエッジ強度(方向ベクトル)(i=1,2,…,N)の2乗和を示す。この単位ベクトル、エッジ強度(方向ベクトル)はそれぞれ次式で示される。
Figure JPOXMLDOC01-appb-M000022
When the operator of Equation (13) is applied to the reference pixel line, an edge direction vector is derived for each pixel. Equation (14) is used to derive the optimum edge direction from these edge vectors. Here, <a, b> represents the inner product of two vectors. S (θ) represents the sum of squares of edge strength (direction vector) (i = 1, 2,..., N) on the unit vector. The unit vector and edge strength (direction vector) are respectively expressed by the following equations.
Figure JPOXMLDOC01-appb-M000022
よって数式(13)を、数式(15)を用いて最適化することで代表エッジ角度が算出できる。 Therefore, the representative edge angle can be calculated by optimizing Equation (13) using Equation (15).
 次に本発明の本実施形態における予測方向導出情報生成部2103について説明する。左参照画素ラインエッジ導出部2101及び上参照画素ラインエッジ導出部2102で導出された、各画素ラインの次式のエッジ強度が予測方向導出情報生成部2103に入力される。
Figure JPOXMLDOC01-appb-M000023
Next, the prediction direction derivation information generation unit 2103 in this embodiment of the present invention will be described. The edge strength of the following expression of each pixel line derived by the left reference pixel line edge deriving unit 2101 and the upper reference pixel line edge deriving unit 2102 is input to the prediction direction deriving information generating unit 2103.
Figure JPOXMLDOC01-appb-M000023
ここで、予測方向導出情報生成部2103は、入力されたエッジ強度をすべて利用して数式(14)及び数式(15)を計算して、単方向代表エッジ角度を導出する。一方、左参照画素ラインの代表エッジ角度と上参照画素ラインの代表エッジ角度の2つに対して、別々に数式(14)及び数式(15)を計算して、2つの代表エッジ角度を持つ双方向代表エッジ角度を導出する。更に、予測方向導出情報生成部2103は、単方向代表エッジ角度を起点として、角度的に隣接する複数の周辺単方向代表エッジ角度を導出する。例えば、エッジ角度が128種類あり、角度順に並んでいると仮定する。このとき、代表エッジ角度をRDMとすると、周辺単方向代表エッジ角度は、角度的に隣接する近い順にRDM-1、RDM+1、RDM-2、RDM+2・・・のように表現される。本実施の形態では、周辺単方向代表エッジ角度を10個(例えば±5個)とする。 Here, the prediction direction derivation information generation unit 2103 calculates Equations (14) and (15) using all the input edge strengths, and derives a unidirectional representative edge angle. On the other hand, both the expression edge (14) and the expression (15) are separately calculated with respect to the two representative edge angles of the left reference pixel line and the upper reference pixel line, and both have two representative edge angles. The direction representative edge angle is derived. Furthermore, the prediction direction derivation information generation unit 2103 derives a plurality of peripheral unidirectional representative edge angles that are angularly adjacent, starting from the unidirectional representative edge angle. For example, it is assumed that there are 128 types of edge angles and they are arranged in the order of angles. At this time, when the representative edge angle is RDM, the peripheral unidirectional representative edge angles are expressed as RDM-1, RDM + 1, RDM-2, RDM + 2,. In this embodiment, the peripheral unidirectional representative edge angle is 10 (for example, ± 5).
 次に、予測方向導出情報2851(2051)について説明する。予測方向導出情報2851(2051)では、単方向代表エッジ角度、双方向代表エッジ角度、周辺単方向代表エッジ角度が予測モードとして間接的に或いは直接的に関係付けられている。図23は、予測方向導出情報2851(2051)の一例を示している。本図において、単方向代表エッジ角度はRDMで示され、双方向代表エッジ角度の左参照画素ラインの代表エッジ角度はRDM_L0で示され、双方向代表エッジ角度の上参照画素ラインの代表エッジ角度はRDM_L1で示されている。RDMPredModeは、本発明の本実施形態における予測方向導出部2801(2001)で導出された予測モードを示している。RDMBipredFlagは、本発明の本実施形態における予測方向導出部2801(2001)で導出された予測モードが双方向予測かどうかを示している。RDMPredAngleIdL0とRDMPredAngleIdL1は、本発明の本実施形態における予測方向導出部2801(2001)で導出された予測モードがどの予測角度を指すかを示している。尚、予測方向導出情報2851(2051)には図23とは別に単方向代表エッジ角度、双方向代表エッジ角度に含まれる2つの代表エッジ角度が含まれる。これらの予測モードとTransformIdxの関係については後述する。 Next, the prediction direction derivation information 2851 (2051) will be described. In the prediction direction derivation information 2851 (2051), the unidirectional representative edge angle, the bidirectional representative edge angle, and the peripheral unidirectional representative edge angle are related indirectly or directly as the prediction mode. FIG. 23 shows an example of the prediction direction derivation information 2851 (2051). In this figure, the unidirectional representative edge angle is indicated by RDM, the representative edge angle of the left reference pixel line of the bidirectional representative edge angle is indicated by RDM_L0, and the representative edge angle of the upper reference pixel line of the bidirectional representative edge angle is It is indicated by RDM_L1. RDMPredMode indicates the prediction mode derived by the prediction direction deriving unit 2801 (2001) in the present embodiment of the present invention. RDMBipredFlag indicates whether the prediction mode derived by the prediction direction deriving unit 2801 (2001) in the present embodiment of the present invention is bidirectional prediction. RDMPredAngleIdL0 and RDMPredAngleIdL1 indicate which prediction angle the prediction mode derived by the prediction direction deriving unit 2801 (2001) in the present embodiment of the present invention indicates. Note that the prediction direction derivation information 2851 (2051) includes two representative edge angles included in the unidirectional representative edge angle and the bidirectional representative edge angle, in addition to FIG. The relationship between these prediction modes and TransformIdx will be described later.
 予測方向導出部2801(2001)で生成された予測方向導出情報2851(2051)は予測選択スイッチ2710(111)へと入力される。ここで選択された予測モードに従ってイントラ単方向予測画像生成部2707(108)若しくはイントラ双方向予測画像生成部2708(109)で予測画像125が生成される。これらの予測画像生成部は、予測角度数が128個に拡張されている以外は、第1の実施の形態と同一である。例えば、RDMPredModeが1である場合には、双方向代表エッジ角度に含まれる2つの単方向代表エッジ角度で図8の第一予測画像信号851及び第二予測画像信号852が生成され、重み付き平均部801で平均処理が行われて、予測画像2722(125)が出力される。 The prediction direction derivation information 2851 (2051) generated by the prediction direction derivation unit 2801 (2001) is input to the prediction selection switch 2710 (111). A prediction image 125 is generated by the intra unidirectional prediction image generation unit 2707 (108) or the intra bidirectional prediction image generation unit 2708 (109) according to the prediction mode selected here. These predicted image generation units are the same as those in the first embodiment except that the number of predicted angles is expanded to 128. For example, when RDMPredMode is 1, the first predicted image signal 851 and the second predicted image signal 852 in FIG. 8 are generated at two unidirectional representative edge angles included in the bidirectional representative edge angle, and the weighted average An average process is performed in the unit 801, and a predicted image 2722 (125) is output.
 予測選択部2714は、エントロピー復号化部2702から送られてきた予測情報2721と予測方向導出部2801から入力された予測方向導出情報2851に基づいて予測選択スイッチ2710にスイッチの出力端を制御する。前述のように、予測画像2722の生成のためにイントラ予測またはインター予測が選択可能であるが、イントラ予測及びインター予測の夫々に複数のモードが規定されている。この中から1つの予測モードが、予測情報2721として入力される。イントラ双方向予測の場合には図11A及び図11Bに示したように実質的に2つの予測モードが選択される。 The prediction selection unit 2714 controls the output terminal of the prediction selection switch 2710 based on the prediction information 2721 sent from the entropy decoding unit 2702 and the prediction direction derivation information 2851 input from the prediction direction derivation unit 2801. As described above, intra prediction or inter prediction can be selected to generate the predicted image 2722, but a plurality of modes are defined for each of intra prediction and inter prediction. One prediction mode is input as prediction information 2721 from these. In the case of intra bidirectional prediction, substantially two prediction modes are selected as shown in FIGS. 11A and 11B.
 <予測方向導出部を追加した場合の直交変換> 
 予測方向導出部2801(2001)を追加した第4の実施形態では、参照画素ラインのエッジ検出を行い、単方向代表エッジ角度を導出しないと実際に予測で利用される参照画素ラインが特定できないという問題がある。そこで、第4の実施形態では、コーディングツリーブロック(もしくはコーディングツリーブロックに含まれる先頭のプレディクションユニット)単位でTransformIdxが選択される。例えば、図2Cで示されるNxN画素ブロック0番をプレディクションユニットと仮定し、2Nx2N画素ブロックをコーディングツリーブロックと仮定する。シンタクスの符号化はコーディングツリーブロック単位で行われるため、プレディクションユニット0以外は、当該プレディクションユニットにおいて利用される参照画素ラインが未符号化であるため、どの参照画素ラインが利用されるかを特定することができない。コーディングツリーブロックの先頭画素ブロックに対応するプレディクションユニット0番目は、隣接する上と左の画素について復号済みであるため、ここで導出された参照画素ラインの情報を利用してTransformIdxが選択される。図23では、それぞれの予測モードに関わらず、先頭のプレディクションユニットのTransformIdxに従うためのTransformIdx[0]が明記されている。
<Orthogonal transformation when a prediction direction deriving unit is added>
In the fourth embodiment in which a prediction direction deriving unit 2801 (2001) is added, it is possible to detect a reference pixel line that is actually used in prediction unless edge detection of the reference pixel line is performed and a unidirectional representative edge angle is derived. There's a problem. Therefore, in the fourth embodiment, TransformIdx is selected in units of coding tree blocks (or the first prediction unit included in the coding tree block). For example, assume that the N × N pixel block 0 shown in FIG. 2C is a prediction unit, and that a 2N × 2N pixel block is a coding tree block. Since the syntax encoding is performed in units of coding tree blocks, the reference pixel lines used in the prediction unit other than the prediction unit 0 are uncoded, so which reference pixel line is used. It cannot be specified. Since the 0th prediction unit corresponding to the first pixel block of the coding tree block has been decoded for the adjacent upper and left pixels, TransformIdx is selected using the information of the reference pixel line derived here. . In FIG. 23, TransformIdx [0] for following the TransformIdx of the head prediction unit is specified regardless of each prediction mode.
 尚、予め図23で説明した予測モードが選択されたときのTransformIdxを定めておいてもよい。例えば、予測角度を導出する処理を削減するために、常にTransformIdxを0に設定するなどとすることも容易に可能である。 Note that TransformIdx when the prediction mode described in FIG. 23 is selected in advance may be determined. For example, it is possible to easily set TransformIdx to 0 in order to reduce the process of deriving the predicted angle.
 <シンタクス> 
 図24は、本実施形態に係るスライスヘッダーシンタクス1506を例示する。図24に示されるslice_derived_direction_intra_flagは、例えば、当該スライスに関して本実施形態に係る予測方向導出手法の有効/無効を示すシンタクス要素である。
<Syntax>
FIG. 24 illustrates a slice header syntax 1506 according to this embodiment. The slice_derived_direction_intra_flag illustrated in FIG. 24 is a syntax element indicating, for example, the validity / invalidity of the prediction direction deriving method according to the present embodiment for the slice.
 slice_derived_direction_intra_flagが0である場合、当該スライス内での本実施形態に係る予測方向導出モードは無効である。故に、予測選択スイッチ2710(111)は、本発明の第1の実施の形態に従ってスイッチの出力端を接続する。一例として、slice_derived_direction_intra_flagが1である場合には、当該スライス内全域で本実施形態に係る予測方向導出モードが有効となる。 When slice_derived_direction_intra_flag is 0, the prediction direction derivation mode according to the present embodiment in the slice is invalid. Therefore, the prediction selection switch 2710 (111) connects the output terminal of the switch according to the first embodiment of the present invention. As an example, when slice_derived_direction_intra_flag is 1, the prediction direction derivation mode according to the present embodiment is valid over the entire area in the slice.
 また、別の例として、予測方向導出手法が1である場合には、より下位のレイヤ(コーディングツリーブロック、トランスフォームユニットなど)のシンタクスにおいて当該スライス内部の局所領域毎に本実施形態に係る予測方向導出モードの有効/無効が規定されてもよい。 As another example, when the prediction direction derivation method is 1, the prediction according to the present embodiment is performed for each local region in the slice in the syntax of a lower layer (coding tree block, transform unit, etc.). The validity / invalidity of the direction derivation mode may be defined.
 図25Aに、プレディクションユニットシンタクスの一例を示す。 
 intra_derived_direction_flag[i]は当該プレディクションユニットに適用した予測モードIntraPredModeが図11A及び図11Bに示される第1の実施形態であるか、図23に示される第4の実施形態であるかを示すフラグである。iは分割されたプレディクションユニットの位置を示しており、前記intra_split_flagが0の場合には0、前記intra_split_flagが1の場合には0~3が設定される。
FIG. 25A shows an example of the prediction unit syntax.
intra_derived_direction_flag [i] is a flag indicating whether the prediction mode IntraPredMode applied to the prediction unit is the first embodiment shown in FIGS. 11A and 11B or the fourth embodiment shown in FIG. is there. i indicates the position of the divided prediction unit. When the intra_split_flag is 0, 0 is set, and when the intra_split_flag is 1, 0 to 3 are set.
 intra_derived_direction_flag[i]が1の場合、当該プレディクションユニットは図23に示される予測方向導出モードを用いることを示す。この場合、用意された複数の予測モードの内、使用したイントラ予測モードを特定する情報であるintra_direction_mode[i]を符号化する。図23に示されるように本モードには双方向イントラ予測のモードと単方向イントラ予測が混在して表現されている。これらの予測モードを別々のシンタクス要素として表現し、符号化することも可能である。また、本発明の第2の実施形態では、intra_direction_mode[i]がRDMPredModeに相当する例として説明しているが、RDMPredAngleIdL0に基づいて予測モードの表現方法を変えても構わない。例えば、RDMPredModeの1に相当する双方向イントラ予測を省いた場合に、予測モードを符号(+/-)を表す1ビットのフラグと変化分を表すインデックスの2種類のシンタクス要素に分けて表現することも可能となる。この場合、新たに双方向イントラ予測かどうかのフラグを用意すればよい。また、intra_direction_mode[i]は、予測モード数に従って等長復号されても良いし、予め決定された符号表を用いて復号されても良い。intra_direction_mode[i]が0の場合、当該プレディクションユニットは本発明の本実施形態に係る予測方向導出手法を使わないことを示し、第1の実施形態で説明済みの方法に従って復号される。 When intra_derived_direction_flag [i] is 1, it indicates that the prediction unit uses the prediction direction derivation mode shown in FIG. In this case, intra_direction_mode [i], which is information identifying the used intra prediction mode, is encoded from among the prepared prediction modes. As shown in FIG. 23, in this mode, a bidirectional intra prediction mode and a unidirectional intra prediction are mixedly expressed. These prediction modes can be expressed as separate syntax elements and encoded. In the second embodiment of the present invention, intra_direction_mode [i] is described as an example corresponding to RDMPredMode, but the prediction mode expression method may be changed based on RDMPredAngleIdL0. For example, when bi-directional intra prediction corresponding to 1 of RDMPredMode is omitted, the prediction mode is expressed by dividing it into two types of syntax elements: a 1-bit flag indicating a sign (+/−) and an index indicating a change. It is also possible. In this case, a new flag indicating whether or not bidirectional intra prediction is used may be prepared. Also, intra_direction_mode [i] may be decoded with an equal length according to the number of prediction modes, or may be decoded using a predetermined code table. When intra_direction_mode [i] is 0, it indicates that the prediction unit does not use the prediction direction deriving method according to the present embodiment of the present invention, and decoding is performed according to the method described in the first embodiment.
 本発明の別の実施形態として図25Bに、プレディクションユニットシンタクスの一例を示す。図25Bでは、intra_direction_mode[i]がprev_intra_direction_mode[i]とrem_intra_direction_mode[i]に分割されて表現されている。これらのシンタクス要素は、数式(11)或いは(12)と同様に、予測モード間の予測を導入している。prev_intra_direction_mode[i]は、隣接ブロックから計算される予測モードの予測値MostProbableModeと当該プレディクションユニットのイントラ予測モードが同一であるか否かを示すフラグである。prev_intra_direction_mode[i]が1の場合、前記MostProbableModeとイントラ予測モードIntraPredModeが等しいことを示す。prev_intra_direction_mode[i]が0の場合、前記MostProbableModeとイントラ予測モードIntraPredModeは異なることを示し、イントラ予測モードIntraPredModeが更にMostProbableMode以外のいずれのモードであるかを特定する情報rem_intra_direction_mode[i]が復号される。rem_intra_direction_mode[i]は、予測モード数に従って等長復号されても良いし、予め決定された符号表を用いて復号されても良い。 FIG. 25B shows an example of the prediction unit syntax as another embodiment of the present invention. In FIG. 25B, intra_direction_mode [i] is expressed by being divided into prev_intra_direction_mode [i] and rem_intra_direction_mode [i]. These syntax elements introduce the prediction between prediction modes similarly to Formula (11) or (12). prev_intra_direction_mode [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. When prev_intra_direction_mode [i] is 1, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal. When prev_intra_direction_mode [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_direction_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is decoded. The rem_intra_direction_mode [i] may be decoded in equal length according to the number of prediction modes, or may be decoded using a predetermined code table.
  本発明の別の実施形態として図25Cに、プレディクションユニットシンタクスの一例を示す。図25Cでは、第1の実施形態で説明したPredModeと第2の実施形態で説明したPredModeが統合されて1つのPredModeテーブルとして表現されている。この場合のPredModeは図26A、図26B及び図26Cで示されている。これらのシンタクス要素は、数式(11)或いは(12)と同様に、予測モード間の予測を導入している。prev_intra_luma_unipred_idx[i]は、隣接ブロックから計算される予測モードの予測値MostProbableModeと当該プレディクションユニットのイントラ予測モードが同一であるか否かを示すフラグである。prev_intra_luma_unipred_idx[i]が1の場合、前記MostProbableModeとイントラ予測モードIntraPredModeが等しいことを示す。prev_intra_luma_unipred_idx[i]が0の場合、前記MostProbableModeとイントラ予測モードIntraPredModeは異なることを示し、イントラ予測モードIntraPredModeが更にMostProbableMode以外のいずれのモードであるかを特定する情報rem_intra_luma_unipred_mode[i]が復号される。rem_intra_luma_unipred_mode[i]は、予測モード数に従って等長復号されても良いし、予め決定された符号表を用いて復号されても良い。 An example of the prediction unit syntax is shown in FIG. 25C as another embodiment of the present invention. In FIG. 25C, PredMode described in the first embodiment and PredMode described in the second embodiment are integrated and expressed as one PredMode table. PredMode in this case is shown in FIGS. 26A, 26B, and 26C. These syntax elements introduce the prediction between prediction modes similarly to Formula (11) or (12). prev_intra_luma_unipred_idx [i] is a flag indicating whether or not the prediction value MostProbableMode of the prediction mode calculated from the adjacent block and the intra prediction mode of the prediction unit are the same. When prev_intra_luma_unipred_idx [i] is 1, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are equal. When prev_intra_luma_unipred_idx [i] is 0, it indicates that the MostProbableMode and the intra prediction mode IntraPredMode are different, and information rem_intra_luma_unipred_mode [i] that specifies which mode other than the MostProbableMode is the intra prediction mode IntraPredMode is decoded. The rem_intra_luma_unipred_mode [i] may be decoded in the same length according to the number of prediction modes, or may be decoded using a predetermined code table.
 以上が本発明の第2の実施形態に係る画像符号化装置2000の詳細説明である。 The above is the detailed description of the image coding apparatus 2000 according to the second embodiment of the present invention.
 以下、各実施形態の変形例を列挙して紹介する。 
 第1乃至第4の実施形態において、フレームを16×16画素サイズなどの矩形ブロックに分割し、画面左上のブロックから右下に向かって順に符号化/復号化を行う例について説明している(図2Aを参照)。しかしながら、符号化順序及び復号化順序はこの例に限定されない。例えば、右下から左上に向かって順に符号化及び復号化が行われてもよいし、画面中央から画面端に向かって渦巻を描くように符号化及び復号化が行われてもよい。更に、右上から左下に向かって順に符号化及び復号化が行われてもよいし、画面端から画面中央に向かって渦巻きを描くように符号化及び復号化が行われてもよい。この場合、符号化順序によって参照できる隣接画素ブロックの位置が変わるので、適宜利用可能な位置に変更すればよい。
Hereinafter, modifications of each embodiment will be listed and introduced.
In the first to fourth embodiments, an example is described in which a frame is divided into rectangular blocks of 16 × 16 pixel size and the like, and encoding / decoding is sequentially performed from the upper left block to the lower right side of the screen ( (See FIG. 2A). However, the encoding order and the decoding order are not limited to this example. For example, encoding and decoding may be performed sequentially from the lower right to the upper left, or encoding and decoding may be performed so as to draw a spiral from the center of the screen toward the screen end. Furthermore, encoding and decoding may be performed sequentially from the upper right to the lower left, or encoding and decoding may be performed so as to draw a spiral from the screen end toward the center of the screen. In this case, since the position of the adjacent pixel block that can be referred to changes depending on the encoding order, the position may be changed to a usable position as appropriate.
 第1乃至第4の実施形態において、4×4画素ブロック、8×8画素ブロック、16×16画素ブロックなどの予測対象ブロックサイズを例示して説明を行ったが、予測対象ブロックは均一なブロック形状でなくてもよい。例えば、予測対象ブロックサイズは、16×8画素ブロック、8×16画素ブロック、8×4画素ブロック、4×8画素ブロックなどであってもよい。また、1つのコーディングツリーブロック内で全てのブロックサイズを統一させる必要はなく、複数の異なるブロックサイズを混在させてもよい。1つのコーディングツリーブロック内で複数の異なるブロックサイズを混在させる場合、分割数の増加に伴って分割情報を符号化または復号化するための符号量も増加する。そこで、分割情報の符号量と局部復号画像または復号画像の品質との間のバランスを考慮して、ブロックサイズを選択することが望ましい。 In the first to fourth embodiments, the description has been given by exemplifying the prediction target block size such as the 4 × 4 pixel block, the 8 × 8 pixel block, and the 16 × 16 pixel block. However, the prediction target block is a uniform block. It does not have to be a shape. For example, the prediction target block size may be a 16 × 8 pixel block, an 8 × 16 pixel block, an 8 × 4 pixel block, a 4 × 8 pixel block, or the like. Moreover, it is not necessary to unify all the block sizes within one coding tree block, and a plurality of different block sizes may be mixed. When a plurality of different block sizes are mixed in one coding tree block, the code amount for encoding or decoding the division information increases with the increase in the number of divisions. Therefore, it is desirable to select the block size in consideration of the balance between the code amount of the division information and the quality of the locally decoded image or the decoded image.
 第1乃至第4の実施形態において、簡単化のために、輝度信号と色差信号における予測処理とを区別せず、色信号成分に関して包括的な説明を記述した。しかしながら、予測処理が輝度信号と色差信号との間で異なる場合には、同一または異なる予測方法が用いられてよい。輝度信号と色差信号との間で異なる予測方法が用いられるならば、色差信号に対して選択した予測方法を輝度信号と同様の方法で符号化または復号化できる。 In the first to fourth embodiments, for the sake of simplification, a comprehensive description of the color signal component has been described without distinguishing between the prediction process for the luminance signal and the color difference signal. However, when the prediction process is different between the luminance signal and the color difference signal, the same or different prediction methods may be used. If different prediction methods are used between the luminance signal and the chrominance signal, the prediction method selected for the chrominance signal can be encoded or decoded in the same manner as the luminance signal.
 第1乃至第4の実施形態において、簡単化のために、輝度信号と色差信号における直交変換処理・逆直交変換処理とを区別せず、色信号成分に関して包括的な説明を記述した。しかしながら、直交変換処理が輝度信号と色差信号との間で異なる場合には、同一または異なる直交変換方法が用いられてよい。輝度信号と色差信号との間で異なる直交変換方法が用いられるならば、色差信号に対して選択した直交変換方法を輝度信号と同様の方法で符号化または復号化できる。 In the first to fourth embodiments, for the sake of simplification, a comprehensive description of the color signal component is described without distinguishing between the orthogonal transformation process and the inverse orthogonal transformation process for the luminance signal and the color difference signal. However, when the orthogonal transformation process is different between the luminance signal and the color difference signal, the same or different orthogonal transformation methods may be used. If different orthogonal transformation methods are used between the luminance signal and the color difference signal, the orthogonal transformation method selected for the color difference signal can be encoded or decoded in the same manner as the luminance signal.
 第1乃至第4の実施形態において、シンタクス構成に示す表の行間には、本発明で規定していないシンタクス要素が挿入されることも可能であるし、それ以外の条件分岐に関する記述が含まれていても構わない。或いは、シンタクステーブルを複数のテーブルに分割、統合することも可能である。また、必ずしも同一の用語を用いる必要は無く、利用する形態によって任意に変更しても構わない。 In the first to fourth embodiments, syntax elements that are not defined in the present invention can be inserted between the rows of the table shown in the syntax configuration, and descriptions relating to other conditional branches are included. It does not matter. Alternatively, the syntax table can be divided and integrated into a plurality of tables. Moreover, it is not always necessary to use the same term, and it may be arbitrarily changed depending on the form to be used.
 以上説明したように、各実施形態は、ハードウェア実装及びソフトウェア実装における困難性を緩和しつつ、高効率なイントラ予測とそれに対応する高効率な直交変換及び逆直交変換を実現する。故に、各実施形態によれば、符号化効率が向上し、ひいては主観画質も向上する。 As described above, each embodiment realizes high-efficiency intra prediction and corresponding high-efficiency orthogonal transform and inverse orthogonal transform while alleviating the difficulty in hardware implementation and software implementation. Therefore, according to each embodiment, the encoding efficiency is improved, and the subjective image quality is also improved.
 例えば、上記各実施形態の処理を実現するプログラムを、コンピュータで読み取り可能な記憶媒体に格納して提供することも可能である。記憶媒体としては、磁気ディスク、光ディスク(CD-ROM、CD-R、DVD等)、光磁気ディスク(MO等)、半導体メモリなど、プログラムを記憶でき、かつ、コンピュータが読み取り可能な記憶媒体であれば、その記憶形式は何れの形態であってもよい。 For example, it is possible to provide a program that realizes the processing of each of the above embodiments by storing it in a computer-readable storage medium. The storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk (CD-ROM, CD-R, DVD, etc.), magneto-optical disk (MO, etc.), semiconductor memory, etc. For example, the storage format may be any form.
 また、上記各実施形態の処理を実現するプログラムを、インターネットなどのネットワークに接続されたコンピュータ(サーバ)上に格納し、ネットワーク経由でコンピュータ(クライアント)にダウンロードさせてもよい。 Further, the program for realizing the processing of each of the above embodiments may be stored on a computer (server) connected to a network such as the Internet and downloaded to the computer (client) via the network.
 また、上述の実施形態の中で示した処理手順に示された指示は、ソフトウェアであるプログラムに基づいて実行されることが可能である。汎用の計算機システムが、このプログラムを予め記憶しておき、このプログラムを読み込むことにより、上述した実施形態の動画像符号化装置及び動画像復号化装置による効果と同様な効果を得ることも可能である。上述の実施形態で記述された指示は、コンピュータに実行させることのできるプログラムとして、磁気ディスク(フレキシブルディスク、ハードディスクなど)、光ディスク(CD-ROM、CD-R、CD-RW、DVD-ROM、DVD±R、DVD±RWなど)、半導体メモリ、またはこれに類する記録媒体に記録される。コンピュータまたは組み込みシステムが読み取り可能な記録媒体であれば、その記憶形式は何れの形態であってもよい。コンピュータは、この記録媒体からプログラムを読み込み、このプログラムに基づいてプログラムに記述されている指示をCPUで実行させれば、上述した実施形態の動画像符号化装置及び動画像復号化装置と同様な動作を実現することができる。もちろん、コンピュータがプログラムを取得する場合または読み込む場合はネットワークを通じて取得または読み込んでもよい。 
 また、記録媒体からコンピュータや組み込みシステムにインストールされたプログラムの指示に基づきコンピュータ上で稼働しているOS(オペレーティングシステム)や、データベース管理ソフト、ネットワーク等のMW(ミドルウェア)等が本実施形態を実現するための各処理の一部を実行してもよい。 
 さらに、本願発明における記録媒体は、コンピュータあるいは組み込みシステムと独立した媒体に限らず、LANやインターネット等により伝達されたプログラムをダウンロードして記憶または一時記憶した記録媒体も含まれる。また、上記各実施形態の処理を実現するプログラムを、インターネットなどのネットワークに接続されたコンピュータ(サーバ)上に格納し、ネットワーク経由でコンピュータ(クライアント)にダウンロードさせてもよい。 
 また、記録媒体は1つに限られず、複数の媒体から本実施形態における処理が実行される場合も、本発明における記録媒体に含まれ、媒体の構成は何れの構成であってもよい。
The instructions shown in the processing procedure shown in the above embodiment can be executed based on a program that is software. A general-purpose computer system stores this program in advance, and by reading this program, it is also possible to obtain the same effects as those obtained by the video encoding device and video decoding device of the above-described embodiment. is there. The instructions described in the above-described embodiments are, as programs that can be executed by a computer, magnetic disks (flexible disks, hard disks, etc.), optical disks (CD-ROM, CD-R, CD-RW, DVD-ROM, DVD). ± R, DVD ± RW, etc.), semiconductor memory, or a similar recording medium. As long as the recording medium is readable by the computer or the embedded system, the storage format may be any form. If the computer reads the program from the recording medium and causes the CPU to execute instructions described in the program based on the program, the computer is similar to the video encoding device and video decoding device of the above-described embodiment. Operation can be realized. Of course, when the computer acquires or reads the program, it may be acquired or read through a network.
In addition, the OS (operating system), database management software, MW (middleware) such as a network, etc. running on the computer based on the instructions of the program installed in the computer or embedded system from the recording medium implement this embodiment. A part of each process for performing may be executed.
Furthermore, the recording medium in the present invention is not limited to a medium independent of a computer or an embedded system, but also includes a recording medium in which a program transmitted via a LAN or the Internet is downloaded and stored or temporarily stored. Further, the program for realizing the processing of each of the above embodiments may be stored on a computer (server) connected to a network such as the Internet and downloaded to the computer (client) via the network.
Further, the number of recording media is not limited to one, and when the processing in the present embodiment is executed from a plurality of media, it is included in the recording media in the present invention, and the configuration of the media may be any configuration.
 なお、本願発明におけるコンピュータまたは組み込みシステムは、記録媒体に記憶されたプログラムに基づき、本実施形態における各処理を実行するためのものであって、パソコン、マイコン等の1つからなる装置、複数の装置がネットワーク接続されたシステム等の何れの構成であってもよい。 
 また、本願発明の実施形態におけるコンピュータとは、パソコンに限らず、情報処理機器に含まれる演算処理装置、マイコン等も含み、プログラムによって本発明の実施形態における機能を実現することが可能な機器、装置を総称している。
The computer or the embedded system in the present invention is for executing each process in the present embodiment based on a program stored in a recording medium, and includes a single device such as a personal computer or a microcomputer, Any configuration such as a system in which apparatuses are connected to a network may be used.
Further, the computer in the embodiment of the present invention is not limited to a personal computer, but includes an arithmetic processing device, a microcomputer, and the like included in an information processing device, and a device capable of realizing the functions in the embodiment of the present invention by a program, The device is a general term.
 本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 Although several embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.
 101…減算部、102…直交変換部、103…量子化部、104…逆量子化部、105…逆直交変換部、106…加算部、107…参照画像メモリ、108…イントラ単方向予測画像生成部、109…イントラ双方向予測画像生成部、110…インター予測画像生成部、111…予測選択スイッチ、112…変換情報設定部、113…予測選択スイッチ、114…エントロピー符号化部、115…出力バッファ、116…符号化制御部、117…入力画像、118…予測誤差、119…変換係数、120…量子化変換係数、121…復元変換係数、122…復元予測誤差、123…復元画像、124…参照画像、125…予測画像、126…予測情報、127…変換情報、128…符号化データ、801…重み付き平均部、802…第一単方向イントラ予測画像生成部、803…第二単方向イントラ予測画像生成部、851…第一予測画像、852…第二予測画像、901、1201…選択スイッチA、902…1D離散コサイン変換部、903…1D離散サイン変換部、904…転置部、905、1205…選択スイッチB、906…垂直変換部、907…水平変換部、908…1D変換設定部、951…一時変換係数、952…1D変換インデックス、1202…1D逆離散コサイン変換部、1203…1D逆離散サイン変換部、1204…転置部、1206…垂直逆変換部、1207…水平逆変換部、1252…1D変換インデックス、1500…シンタクス、1501…ハイレベルシンタクス、1502…スライスレベルシンタクス、1503…コーディングツリーレベルシンタクス、1504…シーケンスパラメータセットシンタクス、1505…ピクチャパラメータセットシンタクス、1506…スライスヘッダーシンタクス、1507…スライスデータシンタクス、1508…コーディングツリーブロックシンタクス、1509…プレディクションユニットシンタクス、2001…予測方向導出部、2051…予測方向導出情報、2101…左参照画素ラインエッジ導出部、2102…上参照画素ラインエッジ導出部、2103…予測方向導出情報生成部、2701…入力バッファ、2702…エントロピー復号化部、2703…逆量子化部、2704…逆直交変換部、2705…加算部、2706…参照画像メモリ、2707…イントラ単方向予測画像生成部、2708…イントラ双方向予測画像生成部、2709…インター予測画像生成部、2710…予測選択スイッチ、2711…変換情報設定部、2712…出力バッファ、2713…復号化制御部、2714…予測選択部、2801…予測方向導出部、2851…予測方向導出情報、2715…量子化変換係数(列)、2716…復元変換係数、2717…復元予測誤差、2718…復号画像、2719…参照画像、2721…予測情報、2722…予測画像、2724…復号画像、2725…符号化データ。 DESCRIPTION OF SYMBOLS 101 ... Subtraction part 102 ... Orthogonal transformation part 103 ... Quantization part 104 ... Inverse quantization part 105 ... Inverse orthogonal transformation part 106 ... Adder part 107 ... Reference image memory 108 ... Intra unidirectional prediction image generation 109: Intra bi-predictive image generation unit, 110: Inter prediction image generation unit, 111 ... Prediction selection switch, 112 ... Conversion information setting unit, 113 ... Prediction selection switch, 114 ... Entropy encoding unit, 115 ... Output buffer 116: Encoding control unit, 117: Input image, 118: Prediction error, 119 ... Transformation coefficient, 120 ... Quantization transformation coefficient, 121 ... Restored transformation coefficient, 122 ... Restored prediction error, 123 ... Restored image, 124 ... see Image, 125 ... Predictive image, 126 ... Prediction information, 127 ... Conversion information, 128 ... Encoded data, 801 ... Weighted average part, 802 ... First Direction intra predicted image generation unit, 803 ... second unidirectional intra predicted image generation unit, 851 ... first predicted image, 852 ... second predicted image, 901, 1201 ... selection switch A, 902 ... 1D discrete cosine transform unit, 903 ... 1D discrete sine transform unit, 904 ... transpose unit, 905, 1205 ... selection switch B, 906 ... vertical transform unit, 907 ... horizontal transform unit, 908 ... 1D transform setting unit, 951 ... temporary transform coefficient, 952 ... 1D transform index 1202... 1D inverse discrete cosine transform unit, 1203... 1D inverse discrete sine transform unit, 1204... Transpose unit, 1206... Vertical inverse transform unit, 1207 ... horizontal inverse transform unit, 1252. High level syntax, 1502 ... Slice level syntax, 1503 ... Coding tree 1504: Sequence parameter set syntax, 1505 ... Picture parameter set syntax, 1506 ... Slice header syntax, 1507 ... Slice data syntax, 1508 ... Coding tree block syntax, 1509 ... Prediction unit syntax, 2001 ... Prediction direction derivation unit, 2051 ... prediction direction derivation information, 2101 ... left reference pixel line edge derivation unit, 2102 ... upper reference pixel line edge derivation unit, 2103 ... prediction direction derivation information generation unit, 2701 ... input buffer, 2702 ... entropy decoding unit, 2703 ... inverse Quantization unit, 2704 ... inverse orthogonal transform unit, 2705 ... addition unit, 2706 ... reference image memory, 2707 ... intra unidirectional prediction image generation unit, 2708 ... intra bidirectional prediction image generation , 2709 ... inter prediction image generation part, 2710 ... prediction selection switch, 2711 ... conversion information setting part, 2712 ... output buffer, 2713 ... decoding control part, 2714 ... prediction selection part, 2801 ... prediction direction deriving part, 2851 ... Prediction direction derivation information, 2715: Quantization transform coefficient (sequence), 2716: Restoration transform coefficient, 2717 ... Restoration prediction error, 2718 ... Decoded image, 2719 ... Reference image, 2721 ... Prediction information, 2722 ... Predicted image, 2724 ... Decoding Image, 2725 ... encoded data.

Claims (18)

  1.  2つ以上の予測モードが1以上の参照画素ラインを用いた画面内予測処理である場合に第一直交変換のみの一次元変換の組み合わせを選択し、前記2つ以上の予測モードがそれぞれ1つの参照画素ラインかつ同一の前記参照画素ラインを用いた画面内予測処理である場合に第一直交変換と第二直交変換との組み合わせを選択し、
     前記2つ以上の予測モードを用いて予測画像信号を生成し、
     前記予測画像信号から導出された予測差分信号に対して、前記選択された一次元変換の組み合わせを用いて二次元変換処理を行い、変換係数を生成し、
     前記2つ以上の予測モードの組み合わせを示す予測情報と、前記変換係数とを符号化する、
    ことを具備する動画像符号化方法。
    When two or more prediction modes are intra-screen prediction processes using one or more reference pixel lines, a combination of one-dimensional transformation only for the first orthogonal transformation is selected, and each of the two or more prediction modes is 1 In the case of the intra prediction process using two reference pixel lines and the same reference pixel line, a combination of the first orthogonal transformation and the second orthogonal transformation is selected,
    Generating a predicted image signal using the two or more prediction modes;
    The prediction difference signal derived from the prediction image signal is subjected to a two-dimensional conversion process using the selected combination of one-dimensional conversion, and a conversion coefficient is generated,
    Encoding prediction information indicating a combination of the two or more prediction modes and the transform coefficient;
    A moving picture encoding method comprising:
  2.  前記第一直交変換は離散サイン変換であり、前記第二直交変換は離散コサイン変換である、ことを特徴とする請求項1記載の動画像符号化方法。 The moving image encoding method according to claim 1, wherein the first orthogonal transform is a discrete sine transform, and the second orthogonal transform is a discrete cosine transform.
  3.  前記2つ以上の予測モードがそれぞれ1つの参照画素ラインかつ同一の前記参照画素ラインを用いた画面内予測処理である場合、前記参照画素ラインが前記画素ブロックの上のラインのみを参照する場合は離散サイン変換、離散コサイン変換の順序での変換の組み合わせを選択し、前記参照画素ラインが前記画素ブロックの左のラインのみを参照する場合は離散コサイン変換、離散サイン変換の順序での変換の組み合わせを選択すること、をさらに具備すること、を特徴とする前記請求項2記載の動画像符号化方法。 When the two or more prediction modes are in-screen prediction processing using one reference pixel line and the same reference pixel line, respectively, the reference pixel line refers only to a line above the pixel block. When a combination of transforms in the order of discrete sine transform and discrete cosine transform is selected and the reference pixel line refers only to the left line of the pixel block, the combination of transforms in the order of discrete cosine transform and discrete sine transform The video encoding method according to claim 2, further comprising: selecting.
  4.  前記2つ以上の予測モードの中に、予測方向を持たない予測処理が含まれる場合は、離散コサイン変換のみの組み合わせを選択すること、をさらに具備すること、を特徴とする前記請求項2記載の動画像符号化方法。 The said 2 or more prediction mode WHEREIN: When the prediction process which does not have a prediction direction is contained, it further comprises selecting the combination only of discrete cosine transform, The said claim 2 characterized by the above-mentioned. A video encoding method.
  5.  前記予測方向を持たない予測処理は、参照画素ラインの平均値で予測するDC予測、参照画素ラインの画素位置毎に外挿または内挿処理を行う平面予測を含む、ことを特徴とする前記請求項4記載の動画像符号化方法。 The prediction process having no prediction direction includes DC prediction for prediction based on an average value of reference pixel lines, and planar prediction for performing extrapolation or interpolation processing for each pixel position of the reference pixel line. Item 5. A video encoding method according to Item 4.
  6.  前記参照画素ラインに対してエッジ検出処理を行い、エッジの方向に基づいて予測方向を導出し、
     前記導出した予測方向を利用する予測モードを符号化する、
    ことをさらに具備する、ことを特徴とする前記請求項2記載の動画像符号化方法。
    Perform edge detection processing on the reference pixel line, derive a prediction direction based on the direction of the edge,
    Encoding a prediction mode using the derived prediction direction;
    The moving picture coding method according to claim 2, further comprising:
  7.  前記第一直交変換は、少なくとも1つの前記参照画素ラインを用いて画面内予測画像を生成する予測モードの予測差分の絶対値が参照画素からの距離に応じて大きくなる傾向に基づいて、前記参照画素ラインと直交する方向の一次元変換を行った場合に、前記第二直交変換行列に比べて係数集密度が高くなるように予め定められた変換基底を含む、ことを特徴とする請求項1記載の動画像符号化方法。 The first orthogonal transform is based on a tendency that an absolute value of a prediction difference of a prediction mode for generating an intra-screen prediction image using at least one reference pixel line increases according to a distance from a reference pixel. A conversion base that is predetermined so that coefficient density is higher than that of the second orthogonal transformation matrix when one-dimensional transformation in a direction orthogonal to a reference pixel line is performed is included. The moving image encoding method according to 1.
  8.  前記第一直交変換は、ブロックサイズをN(Nは2以上の整数)として、N×Nの行列成分(i,j)が
    Figure JPOXMLDOC01-appb-M000001
    で示される変換行列を用い、前記第二直交変換は、N×Nの行列成分(i,j)が
    Figure JPOXMLDOC01-appb-M000002
    で示される変換行列を用いる、
    ことを特徴とする請求項7記載の動画像符号化方法。
    In the first orthogonal transform, the block size is N (N is an integer of 2 or more), and N × N matrix components (i, j) are
    Figure JPOXMLDOC01-appb-M000001
    In the second orthogonal transformation, an N × N matrix component (i, j) is
    Figure JPOXMLDOC01-appb-M000002
    Using the transformation matrix
    8. The moving picture encoding method according to claim 7, wherein:
  9.  2つ以上の予測モードが1以上の参照画素ラインを用いた画面内予測処理である場合に第一直交変換のみの一次元変換の組み合わせを選択し、前記2つ以上の予測モードがそれぞれ1つの参照画素ラインかつ同一の前記参照画素ラインを用いた画面内予測処理である場合に第一直交変換と第二直交変換との組み合わせを選択し、
     前記2つ以上の予測モードを用いて予測画像信号を生成し、
     前記選択された一次元変換の組み合わせを用いて、二次元逆変換処理を行い、予測差分信号を生成し、
     前記生成された予測差分信号と前記予測画像信号とを加算して復号画像信号を生成する、ことを具備することを特徴とする動画像復号化方法。
    When two or more prediction modes are intra-screen prediction processes using one or more reference pixel lines, a combination of one-dimensional transformation only for the first orthogonal transformation is selected, and each of the two or more prediction modes is 1 In the case of the intra prediction process using two reference pixel lines and the same reference pixel line, a combination of the first orthogonal transformation and the second orthogonal transformation is selected,
    Generating a predicted image signal using the two or more prediction modes;
    Using the combination of the selected one-dimensional transformation, a two-dimensional inverse transformation process is performed to generate a prediction difference signal,
    A moving picture decoding method comprising: adding the generated prediction difference signal and the prediction picture signal to generate a decoded picture signal.
  10.  前記第一直交変換は離散サイン変換であり、前記第二直交変換は離散コサイン変換である、ことを特徴とする請求項9記載の動画像復号化方法。 10. The moving picture decoding method according to claim 9, wherein the first orthogonal transform is a discrete sine transform, and the second orthogonal transform is a discrete cosine transform.
  11.  前記2つ以上の予測モードがそれぞれ1つの参照画素ラインかつ同一の前記参照画素ラインを用いた画面内予測処理である場合、前記参照画素ラインが前記画素ブロックの上のラインのみを参照する場合は離散サイン変換、離散コサイン変換の順序での変換の組み合わせを選択し、前記参照画素ラインが前記画素ブロックの左のラインのみを参照する場合は離散コサイン変換、離散サイン変換の順序での変換の組み合わせを選択すること、をさらに具備すること、を特徴とする前記請求項10記載の動画像復号化方法。 When the two or more prediction modes are in-screen prediction processing using one reference pixel line and the same reference pixel line, respectively, the reference pixel line refers only to a line above the pixel block. When a combination of transforms in the order of discrete sine transform and discrete cosine transform is selected and the reference pixel line refers only to the left line of the pixel block, the combination of transforms in the order of discrete cosine transform and discrete sine transform The video decoding method according to claim 10, further comprising: selecting.
  12.  前記2つ以上の予測モードの中に、予測方向を持たない予測処理が含まれる場合は、離散コサイン変換のみの組み合わせを選択すること、をさらに具備すること、を特徴とする前記請求項10記載の動画像復号化方法。 11. The method according to claim 10, further comprising selecting a combination of only discrete cosine transform when a prediction process having no prediction direction is included in the two or more prediction modes. Video decoding method.
  13.  前記予測方向を持たない予測処理は、参照画素ラインの平均値で予測するDC予測、参照画素ラインの画素位置毎に外挿または内挿処理を行う平面予測を含む、ことを特徴とする前記請求項12記載の動画像復号化方法。 The prediction process having no prediction direction includes DC prediction for prediction based on an average value of reference pixel lines, and planar prediction for performing extrapolation or interpolation processing for each pixel position of the reference pixel line. Item 13. The moving picture decoding method according to Item 12.
  14.  前記参照画素ラインに対してエッジ検出処理を行い、エッジの方向に基づいて予測方向を導出し、
     前記導出した予測方向を利用する予測モードを復号化する、
    ことをさらに具備する、ことを特徴とする前記請求項10記載の動画像復号化方法。
    Perform edge detection processing on the reference pixel line, derive a prediction direction based on the direction of the edge,
    Decoding a prediction mode using the derived prediction direction;
    The moving picture decoding method according to claim 10, further comprising:
  15.  前記第一直交変換は、少なくとも1つの前記参照画素ラインを用いて画面内予測画像を生成する予測モードの予測差分の絶対値が参照画素からの距離に応じて大きくなる傾向に基づいて、前記参照画素ラインと直交する方向の一次元変換を行った場合に、前記第二直交変換行列に比べて係数集密度が高くなるように予め定められた変換基底を含む、ことを特徴とする請求項9記載の動画像復号化方法。 The first orthogonal transform is based on a tendency that an absolute value of a prediction difference of a prediction mode for generating an intra-screen prediction image using at least one reference pixel line increases according to a distance from a reference pixel. A conversion base that is predetermined so that coefficient density is higher than that of the second orthogonal transformation matrix when one-dimensional transformation in a direction orthogonal to a reference pixel line is performed is included. 9. The moving picture decoding method according to 9.
  16.  前記第一直交変換は、ブロックサイズをN(Nは2以上の整数)として、N×Nの行列成分(i,j)が
    Figure JPOXMLDOC01-appb-M000003
    で示される変換行列を用い、前記第二直交変換は、N×Nの行列成分(i,j)が
    Figure JPOXMLDOC01-appb-M000004
    で示される変換行列を用いる、
    ことを特徴とする請求項15記載の動画像復号化方法。
    In the first orthogonal transform, the block size is N (N is an integer of 2 or more), and N × N matrix components (i, j) are
    Figure JPOXMLDOC01-appb-M000003
    In the second orthogonal transformation, an N × N matrix component (i, j) is
    Figure JPOXMLDOC01-appb-M000004
    Using the transformation matrix
    The moving picture decoding method according to claim 15, wherein:
  17.  2つ以上の予測モードが1以上の参照画素ラインを用いた画面内予測処理である場合に第一直交変換のみの一次元変換の組み合わせを選択し、前記2つ以上の予測モードがそれぞれ1つの参照画素ラインかつ同一の前記参照画素ラインを用いた画面内予測処理である場合に第一直交変換と第二直交変換との組み合わせを選択する選択部と、
     前記2つ以上の予測モードを用いて予測画像信号を生成する予測画像生成部と、
     前記予測画像信号から導出された予測差分信号に対して、前記選択された一次元変換の組み合わせを用いて二次元変換処理を行い、変換係数を生成する直交変換部と、
     前記2つ以上の予測モードの組み合わせを示す予測情報と、前記変換係数とを符号化する符号化部と、
    を具備する動画像符号化装置。
    When two or more prediction modes are intra-screen prediction processes using one or more reference pixel lines, a combination of one-dimensional transformation only for the first orthogonal transformation is selected, and each of the two or more prediction modes is 1 A selection unit that selects a combination of the first orthogonal transformation and the second orthogonal transformation in the case of intra prediction processing using two reference pixel lines and the same reference pixel line;
    A predicted image generation unit that generates a predicted image signal using the two or more prediction modes;
    An orthogonal transformation unit that performs a two-dimensional transformation process on the prediction difference signal derived from the prediction image signal using the selected one-dimensional transformation combination, and generates a transformation coefficient;
    An encoding unit that encodes prediction information indicating a combination of the two or more prediction modes and the transform coefficient;
    A video encoding device comprising:
  18.  2つ以上の予測モードが1以上の参照画素ラインを用いた画面内予測処理である場合に第一直交変換のみの一次元変換の組み合わせを選択し、前記2つ以上の予測モードがそれぞれ1つの参照画素ラインかつ同一の前記参照画素ラインを用いた画面内予測処理である場合に、第一直交変換と第二直交変換との組み合わせを選択する選択部と、
     前記2つ以上の予測モードを用いて予測画像信号を生成する予測画像生成部と、
     前記選択された一次元変換の組み合わせを用いて、二次元逆変換処理を行い、予測差分信号を生成する逆直交変換部と、
     前記生成された予測差分信号と前記予測画像信号とを加算して復号画像信号を生成する加算部と、を具備することを特徴とする動画像復号化装置。
    When two or more prediction modes are intra-screen prediction processes using one or more reference pixel lines, a combination of one-dimensional transformation only for the first orthogonal transformation is selected, and each of the two or more prediction modes is 1 A selection unit that selects a combination of the first orthogonal transformation and the second orthogonal transformation in the case of intra prediction processing using two reference pixel lines and the same reference pixel line;
    A predicted image generation unit that generates a predicted image signal using the two or more prediction modes;
    An inverse orthogonal transform unit that performs a two-dimensional inverse transform process and generates a prediction difference signal using the selected one-dimensional transform combination;
    A moving picture decoding apparatus comprising: an adding unit that adds the generated prediction difference signal and the predicted image signal to generate a decoded image signal.
PCT/JP2011/063737 2011-06-15 2011-06-15 Video encoding method, video decoding method, and device WO2012172667A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/063737 WO2012172667A1 (en) 2011-06-15 2011-06-15 Video encoding method, video decoding method, and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2011/063737 WO2012172667A1 (en) 2011-06-15 2011-06-15 Video encoding method, video decoding method, and device

Publications (1)

Publication Number Publication Date
WO2012172667A1 true WO2012172667A1 (en) 2012-12-20

Family

ID=47356693

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/063737 WO2012172667A1 (en) 2011-06-15 2011-06-15 Video encoding method, video decoding method, and device

Country Status (1)

Country Link
WO (1) WO2012172667A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113411580A (en) * 2016-05-13 2021-09-17 夏普株式会社 Image decoding device and method, image encoding device and method
JP2021180492A (en) * 2015-08-20 2021-11-18 日本放送協会 Image decoding device and image decoding method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100246672A1 (en) * 2009-03-31 2010-09-30 Sony Corporation Method and apparatus for hierarchical bi-directional intra-prediction in a video encoder

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100246672A1 (en) * 2009-03-31 2010-09-30 Sony Corporation Method and apparatus for hierarchical bi-directional intra-prediction in a video encoder

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
ANKUR SAXENA ET AL.: "Jointly optimal intra prediction and adaptive primary transform", JCTVC-C108, 7 October 2010 (2010-10-07) *
ANKUR SAXENA ET AL.: "Mode- dependent DCT/DST without 4*4 full matrix multiplication for intra prediction", JCTVC-E125, 20 March 2011 (2011-03-20) *
YAN YE ET AL.: "Improved h.264 intra coding based on bi-directional intra prediction, intra prediction, directional transform, and adaptive coefficient scanning", IMAGE PROCESSING, 2008. ICIP 2008. 15TH IEEE INTERNATIONAL CONFERENCE ON, 12 October 2008 (2008-10-12), pages 2116 - 2119 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021180492A (en) * 2015-08-20 2021-11-18 日本放送協会 Image decoding device and image decoding method
JP7242768B2 (en) 2015-08-20 2023-03-20 日本放送協会 Image decoding device and image decoding method
JP7445799B2 (en) 2015-08-20 2024-03-07 日本放送協会 Image decoding device and image decoding method
CN113411580A (en) * 2016-05-13 2021-09-17 夏普株式会社 Image decoding device and method, image encoding device and method
CN113411580B (en) * 2016-05-13 2024-01-30 夏普株式会社 Image decoding device and method, image encoding device and method

Similar Documents

Publication Publication Date Title
US11936858B1 (en) Constrained position dependent intra prediction combination (PDPC)
US11509936B2 (en) JVET coding block structure with asymmetrical partitioning
US11902519B2 (en) Post-filtering for weighted angular prediction
KR102628889B1 (en) Intra-mode JVET coding
US11463708B2 (en) System and method of implementing multiple prediction models for local illumination compensation
WO2011125256A1 (en) Image encoding method and image decoding method
KR20190123288A (en) In-loop filtering method based on adaptive pixel classification criteria
JP2016187211A (en) Picture decoding device
KR20200112964A (en) Method and apparatus for predicting residual code in transform domain
KR20200057082A (en) Adaptive non-equal weighted plane prediction
WO2012035640A1 (en) Moving picture encoding method and moving picture decoding method
WO2019126163A1 (en) System and method for constructing a plane for planar prediction
WO2012172667A1 (en) Video encoding method, video decoding method, and device
CN113812156A (en) Method for coding and decoding video using simplified residual data in video coding system and apparatus therefor
WO2012090286A1 (en) Video image encoding method, and video image decoding method
JP5367161B2 (en) Image encoding method, apparatus, and program
EP3446481B1 (en) Jvet coding block structure with asymmetrical partitioning
JP5649701B2 (en) Image decoding method, apparatus, and program

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11867621

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP