WO2020129489A1 - 画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム - Google Patents

画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム Download PDF

Info

Publication number
WO2020129489A1
WO2020129489A1 PCT/JP2019/044754 JP2019044754W WO2020129489A1 WO 2020129489 A1 WO2020129489 A1 WO 2020129489A1 JP 2019044754 W JP2019044754 W JP 2019044754W WO 2020129489 A1 WO2020129489 A1 WO 2020129489A1
Authority
WO
WIPO (PCT)
Prior art keywords
quantization matrix
quantization
image
sub
unit
Prior art date
Application number
PCT/JP2019/044754
Other languages
English (en)
French (fr)
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 CN201980083874.9A priority Critical patent/CN113228652B/zh
Priority to BR112021010308-2A priority patent/BR112021010308A2/pt
Priority to KR1020217021605A priority patent/KR20210096279A/ko
Priority to EP19897736.5A priority patent/EP3902254A4/en
Publication of WO2020129489A1 publication Critical patent/WO2020129489A1/ja
Priority to US17/346,849 priority patent/US20210306633A1/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/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/124Quantisation
    • H04N19/126Details of normalisation or weighting functions, e.g. normalisation matrices or variable uniform quantisers
    • 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
    • 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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/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/124Quantisation
    • 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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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/136Incoming video signal characteristics or properties
    • 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/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
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/18Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a set of transform coefficients
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • H04N19/463Embedding additional information in the video signal during the compression process by compressing encoding parameters before transmission

Definitions

  • the present invention relates to an image encoding device, an image decoding device, a control method thereof, and a program.
  • HEVC High Efficiency Video Coding
  • HEVC High Efficiency Video Coding
  • a basic block having a size larger than that of a conventional macroblock (16 ⁇ 16 pixels) is adopted in order to improve coding efficiency.
  • This large-sized basic block is called a CTU (Coding Tree Unit), and its size is a maximum of 64 ⁇ 64 pixels.
  • the CTU is further divided into sub-blocks which are units for prediction and conversion.
  • Patent Document 1 discloses a technique for encoding such a quantization matrix.
  • HEVC uses a larger orthogonal transform than the conventional orthogonal transform of 8 ⁇ 8 pixels, such as 16 ⁇ 16 pixels and 32 ⁇ 32 pixels, and also uses a quantization matrix corresponding to such a large orthogonal transform. ..
  • the 64 elements are encoded and decoded. It is configured to be expanded by upsampling processing on the side.
  • the element at the upper left end position of the quantization matrix corresponding to the DC component in the frequency domain is separately encoded. For this reason, in HEVC, when a large orthogonal transform is used, there is a problem that the quantization processing of frequency components other than the DC component cannot be finely controlled.
  • the present invention has been made in order to solve the above-mentioned problems, and it is an object of the present invention to provide a technique for encoding an image while suppressing the code amount of a quantization matrix used for encoding.
  • An image encoding device for encoding image data comprising: The image data to be encoded is divided into basic blocks of a preset size, and the basic block is further divided into one or more subblocks using any of a plurality of preset subblock division patterns, First encoding means for performing frequency conversion, quantization, and entropy encoding for each sub-block, Holding means for holding a plurality of quantization matrices corresponding to the sizes of sub-blocks included in the sub-block division pattern used by the first encoding means; Second encoding means for encoding at least one of the plurality of quantization matrices held by the holding means, The coded data generated by the second coding means and the coded data obtained by the first coding means are integrated.
  • the holding means is For a quantization matrix having the same size as the horizontal or vertical size of the basic block, the elements in a predetermined range of positions from the storage position of the element corresponding to the DC component are held as independent values. However, at the position exceeding the predetermined range, the same element is held in a preset number unit.
  • FIG. 16 is a block diagram showing a hardware configuration example of a computer applicable as an image encoding device and a decoding device. The figure which shows an example of the bit stream structure produced
  • FIG. 6 is a diagram showing an example of sub-block division used in the embodiment.
  • FIG. 6 is a diagram showing an example of sub-block division used in the embodiment.
  • FIG. 6 is a diagram showing an example of sub-block division used in the embodiment.
  • FIG. 6 is a diagram showing an example of sub-block division used in the embodiment.
  • FIG. 6 is a diagram showing an example of sub-block division used in the embodiment.
  • FIG. 6 is a diagram showing an example of sub-block division used in the embodiment.
  • FIG. 6 is a diagram showing an example of sub-block division used in the embodiment.
  • FIG. 6 is a diagram showing an example of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing an example of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing an example of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing an example of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing an example of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing an example of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing a scanning method of elements of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing a scanning method of elements of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing a scanning method of elements of a quantization matrix used in the embodiment.
  • FIG. 6 is a diagram showing a scanning method of elements of a quantization matrix used in the embodiment.
  • generated by embodiment The figure which shows the difference value matrix of the quantization matrix produced
  • FIG. 1 is a block diagram showing the image coding apparatus according to the first embodiment.
  • the image coding apparatus has a control unit 150 that controls the components described below and controls the entire apparatus.
  • the control unit 150 includes a CPU, a ROM that stores programs executed by the CPU and various parameters, and a RAM that is used as a work area of the CPU.
  • the OS operating system
  • the program, and the parameters stored in the ROM or another nonvolatile storage device may be loaded into the RAM, and then the program may be executed under the control of the OS.
  • the image coding apparatus includes an input terminal 101, a block division unit 102, a quantization matrix holding unit 103, a prediction unit 104, a conversion/quantization unit 105, an inverse quantization/inverse conversion unit 106, an image reproduction unit 107, a frame.
  • the memory 108, the in-loop filter unit 109, the encoding unit 110, the integrated encoding unit 111, the output terminal 112, and the quantization matrix encoding unit 113 are included.
  • image data (for example, 30 frames/second) is supplied to the input terminal 101 of this device from an image generation source (not shown).
  • image generation source does not matter, but it is simply an image pickup unit or a video camera, or a hard disk or a storage medium for storing image data to be encoded.
  • the block division unit 102 divides the image data input via the input terminal 101 into a plurality of basic blocks, and supplies the image data in basic block units to the prediction unit 104 in the subsequent stage.
  • the quantization matrix holding unit 103 holds a plurality of types of quantization matrices used in quantization processing. Details of the method of generating the quantization matrix will be described later.
  • the prediction unit 104 receives the image data of the basic block unit from the block division unit 102, determines a division method into a plurality of smaller sub-blocks, intra prediction that is intra-frame prediction in each sub-block unit, and Inter prediction, which is inter-prediction, is performed to generate predicted image data. Further, the prediction unit 104 calculates and supplies prediction error data that is a difference between the image data of the sub block and the predicted image data. The prediction unit 104 also outputs information necessary for prediction, for example, information about sub-block division, prediction mode, motion vector, and the like together with the prediction error data. The information necessary for this prediction will be referred to as prediction information below.
  • the transform/quantization unit 105 obtains transform coefficients by performing orthogonal transform (frequency transform) on the prediction error data supplied from the prediction unit 104 in sub-block units. Then, the transform/quantization unit 105 quantizes the transform coefficient of the target sub-block by using the corresponding quantization matrix held by the quantization matrix holding unit 103 to obtain a quantized coefficient.
  • the inverse quantization/inverse transform unit 106 reproduces the transform coefficient by inversely quantizing the quantized coefficient input from the transform/quantization unit 105 using the corresponding quantization matrix held by the quantization matrix holding unit 103. Then, the transform coefficient is inversely orthogonally transformed to reproduce the prediction error data.
  • the image reproduction unit 107 appropriately refers to the frame memory 108 based on the prediction information input from the prediction unit 104 to generate predicted image data. Then, the image reproduction unit 107 generates reproduction image data from the generated prediction image data and the prediction error data from the inverse quantization/inverse conversion unit 106, and outputs the reproduction image data to the frame memory 108 again.
  • the in-loop filter unit 109 performs in-loop filter processing such as deblocking filter and sample adaptive offset on the reproduced image data from the image reproducing unit 107 stored in the frame memory 108, and outputs the image data after the filter processing. It is stored in the frame memory 109 again.
  • the encoding unit 110 encodes the quantized coefficient input from the transform/quantization unit 105 and the prediction information input from the prediction unit 104 to generate and output code data.
  • the quantization matrix encoding unit 113 encodes the quantization matrix input from the quantization matrix holding unit 103 to generate and output encoded data for quantization.
  • the integrated coding unit 111 uses the coded data of the quantization matrix coded by the quantization matrix coding unit 113 to generate header coded data. Further, the integrated encoding unit 111 forms a bitstream by combining the generated header code data with the code data of the image input from the encoding unit 110, and outputs the bitstream to the outside via the output terminal 112.
  • the output destination is not particularly limited, but it may be a storage device such as a recording medium or a file server on the network.
  • moving image data is input in frame units, but still image data for one frame may be input.
  • intra prediction coding process for the sake of simplicity, only the intra prediction coding process will be described, but the present invention is not limited to this and can be applied to the inter prediction coding process.
  • the size of the basic block for dividing the image of one frame in the block dividing unit 101 will be described as horizontal 16 pixels ⁇ vertical 16 pixels (hereinafter simply referred to as 16 ⁇ 16 pixels). However, this is merely an example, and other sizes may be used.
  • Quantization matrix encoding is performed prior to image encoding.
  • the quantization matrix holding unit 103 generates and holds a plurality of quantization matrices according to sub-blocks of a plurality of sizes used in encoding.
  • the thick frame denoted by reference numeral 800 in FIG. 8A is an example of a quantization matrix corresponding to a size of 8 ⁇ 8 pixels, and the values in the matrix indicate the elements.
  • the element at the 0th row and 0th column in the upper left corner of the quantization matrix 800 corresponds to the conversion coefficient of the DC component (DC component), and the other elements correspond to the conversion coefficient of the AC component (AC component), respectively. ..
  • the method of determining each element forming the quantization matrix is not particularly limited. For example, a predetermined initial value may be used or may be set individually. It may also be generated according to the characteristics of the image.
  • FIG. 8B is a quantization matrix 801 corresponding to the orthogonal transformation of 16 ⁇ 8 pixels in this embodiment.
  • An individual value such as "4" is set for the element in the 0th row and 0th column corresponding to the DC component, and "5" is set for the element in the 0th row and 1st column to the right of the element.
  • the element in the 0th row and 1st column of the quantization matrix 801 in FIG. 8B is an element corresponding to the transform coefficient of the AC component estimated to have the lowest frequency in the sub-block shape.
  • one value is set for two elements that are adjacent in the horizontal direction in order to reduce the code amount.
  • the same value of "9” is set for the elements of 0 row 2 column and 0 row 3 column
  • the same value of "10” is similarly set for the element of 1 row 2 column and 1 row 3 column.
  • FIG. 8C is a quantization matrix 802 corresponding to orthogonal transformation of 8 ⁇ 16 pixels in this embodiment.
  • An individual value such as "4" is set for the element of 0 row and 0 column corresponding to the DC component, and "5" is set for the element of 1 row and 0 column below it.
  • the element in the 1st row and 0th column of the quantization matrix 802 in FIG. 8C is an element corresponding to the transform coefficient of the AC component estimated to have the lowest frequency in the shape of the sub-block.
  • the remaining elements are configured such that one value is set for two vertically adjacent elements.
  • the same value of "9” is set for the elements in the 2nd row and 0th column and the 3rd row and 0th column
  • the same value of "10” is set for the elements in the 2nd row and 1st column and the 3rd row and 1st column.
  • FIG. 8D is a quantization matrix 803 corresponding to the orthogonal transformation of 16 ⁇ 16 pixels in this embodiment.
  • the element in the 0th row and 0th column corresponding to the DC component is “4”
  • the element on the 1st row and 0th column to the right of the DC component is “5”
  • the element at the 0th row and 1st column immediately below is “6”.
  • An individual value such as "is set as an element corresponding to the AC component adjacent to the DC component.
  • the remaining elements are configured such that one value is set for four horizontally and vertically adjacent 2 ⁇ 2 elements.
  • the elements corresponding to the DC component in the quantization matrix and the elements corresponding to the plurality of low frequency components in the vicinity thereof are set to individual values, and the remaining elements are set to the values in units of a plurality of elements.
  • the quantization matrix holding unit 103 holds the quantization matrices 800 to 803 thus generated.
  • the four types of quantization matrices 800 to 803 shown in FIGS. 8A to 8D are held in a two-dimensional shape, but each element in the quantization matrix is not limited to this. ..
  • a plurality of quantization matrices are held for orthogonal transforms of the same size depending on a prediction method described later, for example, whether intra prediction or inter prediction is used, or whether the coding target is a luminance block or a chrominance block. It is also possible.
  • the elements of the low frequency part corresponding to the upper left part of the quantization matrices 800 to 803 are small, and the lower right part is small.
  • the elements of the high frequency part corresponding to are large.
  • the quantization matrix coding unit 113 sequentially reads the quantization matrices 800 to 803 stored in the two-dimensional shape from the quantization matrix holding unit 106, scans each element, calculates the difference, and calculates the one-dimensional matrix. To generate.
  • each of the quantization matrices 800 to 803 shown in FIGS. 8A to 8D will be encoded.
  • the quantization matrix encoding unit 113 first uses the scanning method along the arrow shown in FIG. 10A for the quantization matrix 800 shown in FIG. The difference with is calculated. For example, the 8 ⁇ 8 pixel quantization matrix 800 shown in FIG. 8A is scanned by the diagonal scan shown in FIG. 10A, but the first element “4” located in the upper left corner is immediately below it.
  • the located element "9" is scanned and the difference +5 is calculated.
  • the first element (“4” in the present embodiment) of the quantization matrix is encoded by calculating the difference from a predetermined initial value (for example, “8”), but this is not a limitation. Instead, the difference from an arbitrary value or the value of the first element itself may be used.
  • the quantization matrix coding unit 113 uses the scanning method along the arrow shown in FIG. 10B, and for each element, the difference from the immediately preceding element in the scanning order. Shall be calculated.
  • the quantization matrix 801 for 16 ⁇ 8 pixels shown in FIG. 8B is scanned by the scanning method shown in FIG. 10B, but the first element “4” located at the upper left corner is immediately followed by the first element “4”.
  • the located element "5" is scanned and the difference +1 is encoded.
  • the element "9" located below it is then scanned and the difference +4 is encoded.
  • the 8 ⁇ 16 pixel quantization matrix 802 shown in FIG. 8C is scanned by the scanning method shown in FIG. 10C. After the first element "4" located at the upper left corner, the element "5" located immediately below it is scanned, and the difference +1 is encoded. Then, the element "9" located therebelow is scanned, and the difference +4 is encoded.
  • the 16 ⁇ 16 pixel quantization matrix 803 shown in FIG. 8D is scanned by the scanning method shown in FIG. 10D. After the first element 4 located at the upper left corner, the element 5 located immediately below it is scanned and the difference +1 is encoded. Next, the element 5 located on the right side of the upper left corner is scanned, and the difference 0 is encoded. Then, the element 6 located therebelow is scanned and the difference +1 is encoded.
  • the quantization matrices 800 to 803 of FIGS. 8A to 8D use the scanning method of FIGS. 10A to 10D, respectively, and the one-dimensional difference matrices 1000 to 1003 shown in FIGS. 11A to 11D are obtained. Is generated.
  • the quantization matrix coding unit 113 further codes the difference matrix to generate quantization matrix coded data.
  • the coding is performed using the coding table shown in FIG. 12A, but the coding table is not limited to this, and the coding table shown in FIG. 12B may be used, for example.
  • the quantization matrix code data generated in this way is supplied to the integrated coding unit 111 in the subsequent stage.
  • the integrated coding unit 111 codes the header information necessary for coding the image data, and integrates the coded data of the quantization matrix. Subsequently, encoding of image data will be described.
  • the block division unit 102 divides one frame of image data input from the input terminal 101 into a plurality of basic blocks, and supplies the image data in basic block units to the prediction unit 104.
  • the size of the basic block in this embodiment is 16 ⁇ 16 pixels.
  • the prediction unit 104 performs a prediction process on the image data in basic block units input from the block division unit 102. Specifically, the prediction unit 104 determines a subblock division method for dividing a basic block into smaller subblocks, and further determines an intra prediction mode such as horizontal prediction or vertical prediction in subblock units. The sub-block division method is determined based on the encoded data amount of the immediately preceding frame and the like.
  • FIGS. 7C and 7D show examples of sub-block division patterns.
  • Reference numeral 700 which indicates a thick frame on the outer side of the figure, represents a basic block, and has a size of 16 ⁇ 16 pixels in the embodiment. The rectangle in the thick frame represents the sub block.
  • FIG. 7B shows an example of conventional square sub-block division, in which a basic block of 16 ⁇ 16 pixels is divided into four sub-blocks of 8 ⁇ 8 pixel size.
  • FIGS. 7C and 7D show an example of rectangular sub-block division.
  • the basic block is two vertically long sub blocks of 8 ⁇ 16 pixels
  • FIG. 7D two horizontally long sub blocks of 16 ⁇ 8 pixels. It is divided into blocks.
  • the basic block of 16 ⁇ 16 pixels is not divided (FIG. 7A), divided into two vertically elongated sub-blocks (FIG. 7C), and horizontally divided into two vertically elongated sub-blocks. Either (FIG. 7D) or quadtree partitioning (FIG. 7B) is determined.
  • the sub-block division method is not limited to this. As shown in FIGS. 7E and 7F, ternary tree partitioning in which the ratio is 1:2:1 may be used.
  • Predicted image data is generated from the determined intra prediction mode and encoded pixels. Then, the prediction unit 104 generates prediction error data that is the difference between the input image data and the generated prediction image data in sub-block units, and supplies the prediction error data to the conversion/quantization unit 105. .. Further, information such as sub-block division and intra prediction mode is supplied to the encoding unit 110 and the image reproducing unit 107 as prediction information.
  • the transform/quantization unit 105 performs orthogonal transform/quantization on the input prediction error data to generate a quantized coefficient. Specifically, the transform/quantization unit 105 first performs an orthogonal transform process corresponding to the size of the sub-block to generate an orthogonal transform coefficient. Then, the transform/quantization unit 105 quantizes the orthogonal transform coefficient in sub-block units using the quantization matrix of the corresponding size stored in the quantization matrix holding unit 103 to generate the quantized coefficient. .. In this embodiment, it is assumed that the quantization matrix of FIG. 8D is used for subblock division of 16 ⁇ 16 pixels corresponding to FIG. 7A. Similarly, the quantization matrix of FIG. 8C is used for the 8 ⁇ 16 pixel sub-block division of FIG.
  • the transform/quantization unit 105 supplies the generated quantized coefficient (transformed coefficient after quantization) to the encoding unit 110 and the inverse quantization/inverse transform unit 106.
  • the inverse quantization/inverse transform unit 106 inversely quantizes the input quantized coefficient for each sub-block by using the corresponding quantization matrix stored in the quantization matrix holding unit 103. Regenerate the transform coefficients. Then, the inverse quantization/inverse transform unit 106 inversely orthogonally transforms the reproduced transform coefficient in sub-block units to reproduce the prediction error data, and supplies the reproduced prediction error data to the image reproducing unit 107.
  • the image reproduction unit 107 appropriately refers to the frame memory 108 based on the prediction information input from the prediction unit 104 in sub-block units, and reproduces the predicted image data.
  • the image reproduction unit 107 reproduces and reproduces the image data of the sub-block by adding the reproduced prediction image data and the prediction error data input from the inverse quantization/inverse conversion unit 106 for each sub-block.
  • the image data is stored in the frame memory 108.
  • the in-loop filter unit 109 reads the reproduced image data from the frame memory 108 in sub-block units and performs in-loop filter processing such as deblocking filter. Then, the in-loop filter unit 109 re-stores the filtered image data in the frame memory 108.
  • the encoding unit 110 entropy-encodes the quantized coefficient generated by the transform/quantization unit 105 and the prediction information input from the prediction unit 104 in sub-block units to generate code data.
  • the method of entropy coding is not particularly limited, but Golomb coding, arithmetic coding, Huffman coding, or the like can be used.
  • the generated code data is supplied to the integrated coding unit 111.
  • the integrated coding unit 111 multiplexes the code data of the header and the code data input from the coding unit 110 to form a bitstream. Finally, the bit stream is output from the terminal 112 to the outside.
  • FIG. 6A shows an example of the data structure of the bitstream output in the first embodiment.
  • the sequence header includes code data corresponding to the quantization matrices 800 to 803 of FIGS. 8A to 8D, and is composed of the coding result of each element.
  • the encoded position is not limited to this, and it goes without saying that the encoded position may be encoded in the picture header portion or other header portions.
  • the quantization matrix is changed in one sequence, it is possible to update it by newly encoding the quantization matrix. At this time, all the quantization matrices may be rewritten, or a part of them may be changed by specifying the conversion block size of the rewritten quantization matrix.
  • the quantization matrix holding unit 103 Prior to image coding, in S301, the quantization matrix holding unit 103 generates and holds a plurality of types of quantization matrices.
  • the quantization matrix holding unit 103 is assumed to generate and hold the four types of quantization matrices 800 to 803 shown in FIGS. 8A to 8D.
  • the quantization matrix encoding unit 113 scans the quantization matrix generated and held at S301 to calculate the difference between each element, and generates a one-dimensional difference matrix.
  • the quantization matrix encoding unit 113 obtains the difference values of two consecutive elements from the quantization matrices 800 to 803 of FIGS. 8A to 8D in the scanning order of FIGS. 10A to 10D, A one-dimensional matrix of difference values shown in FIGS. 11A to 11D is generated.
  • the quantization matrix coding unit 113 generates a binary code for each difference value in the generated matrix by referring to the coding table shown in FIG. 12A (or FIG. 12B), and generates coded data. I will do it.
  • the integrated encoding unit 111 generates and outputs the header information necessary for encoding the image data, together with the generated quantization matrix code data.
  • the block dividing unit 102 divides the input image in frame units into basic block units. Then, in S305, the prediction unit 104 inputs the image data of one basic block generated in S304, and converts the image data into one or more sub-blocks. Then, the prediction unit 104 executes prediction processing for each sub-block, and generates prediction information such as sub-block division information and intra prediction mode, and predicted image data. Then, the prediction unit 104 calculates prediction error data from the image data of each sub block and the predicted image data.
  • the transform/quantization unit 105 orthogonally transforms the prediction error data of each sub-block calculated at S305 to generate transform coefficients. Further, the transform/quantization unit 105 quantizes the prediction error data of each sub-block using the quantization matrix generated/held in S301 to generate a quantized coefficient.
  • the quantization matrix 803 of FIG. 8D is used for each sub-block obtained by sub-block division corresponding to FIG. 7A.
  • the quantization matrix 802 of FIG. 8C is used for each sub-block obtained by the sub-block division of FIG. 7C.
  • the quantization matrix 801 of FIG. 8B is used for each sub-block obtained by the sub-block division of FIG. 7D.
  • the quantization matrix 800 shown in FIG. 8A is used for four quadtree-divided sub-blocks as shown in FIG. 7B.
  • step S307 the inverse quantization/inverse transform unit 106 inversely quantizes the quantized coefficient of each sub-block generated in step S305 using the quantization matrix generated/held in step S301 to obtain the transformed coefficient. To play. Then, the inverse quantization/inverse transform unit 106 further performs inverse orthogonal transform on the transform coefficient of each sub-block to reproduce the prediction error data for each sub-block.
  • the image reproducing unit 107 reproduces the predicted image data for each sub-block based on the prediction information generated in S305.
  • the image reproduction unit 107 reproduces the image data for each sub-block by adding the prediction error data of the corresponding sub-block generated in S307 to the reproduced prediction image data of each sub-block.
  • the encoding unit 110 encodes the prediction information generated in S305 and the quantized coefficient generated in S306 for each subblock to generate coded data. In addition, a bit stream including other code data is generated.
  • control unit 150 determines whether or not the coding of all the basic blocks in the frame is completed, and if so, the process proceeds to S311. If not, the next basic block is targeted. In order to perform the encoding, the process returns to S305.
  • step S311 the in-loop filter unit 109 performs in-loop filter processing on the image data reproduced in step S308, generates a filtered image, and ends the processing.
  • a predetermined number of elements (elements for DC components and elements for relatively low-frequency components adjacent thereto) at the beginning of the quantization matrix are individually encoded, and the remaining elements are pluralized.
  • the coding amount of the quantization matrix can be reduced by performing the coding on the element-by-element basis. Further, it is possible to finely control the quantization of the low frequency part, which is sensitive to human vision.
  • the configuration is such that all four types of quantization matrices 800 to 803 in FIGS. 8A to 8D are encoded.
  • the other quantization matrix may be used to generate the quantization matrix.
  • the quantization matrix of FIG. Some elements are thinned out from 803 to generate the quantization matrix 801 in FIG. 8B.
  • the quantization matrix 800 can be used to generate the quantization matrix 801 of FIG. 8B and the quantization matrix 802 of FIG. 8C.
  • the calculation method in this case is not particularly limited, and it may be calculated by adding a specific difference value (+1 in this embodiment) to the element “4” in the 0th row and 0th column, or by interpolation with surrounding elements. You may calculate using. In FIG. 8C, +1 is added to the element corresponding to the DC component of the elements on the right and lower sides of the element corresponding to the DC component of the transform coefficient, and +2 is added to the element of the lower right.
  • the element “5” in row 0 and column 1 in FIG. 8B and the element “5” in row 1 and column 0 in FIG. 8C may be encoded together with the elements in the 16 ⁇ 16 quantization matrix.
  • each quantization matrix is generated from another quantization matrix or each element is encoded, and the identifier is encoded in the header.
  • information indicating whether each element of the quantization matrix is generated from another quantization matrix or individually encoded is encoded in the header portion as a quantization matrix encoding method information code and is shown in FIG. 6B. It may be configured to generate a bitstream. As a result, it is possible to selectively generate a bitstream in which image quality control according to the size of a sub-block is prioritized or a bitstream with a smaller quantization matrix code amount.
  • the quantization matrix of FIGS. 8A to 8D corresponding to the sub-block division/orthogonal transformation of FIGS. 7A to 7D is used, but the orthogonal transformation size and the quantization matrix used are not limited to this. Not done.
  • the quantization matrices 900 and 901 of FIGS. 9A and 9B may be further used.
  • the quantization matrix holding unit 103 As described above, in the quantization matrix holding unit 103 according to the embodiment, only one of the horizontal and vertical directions of the basic block (16 ⁇ 16 in the embodiment) has the same size, and the other has the same size.
  • the long side directions of the quantization matrices 801, 802 as shown in different FIGS. 8B, 8C within a predetermined range (range of distance “1” in the embodiment) preset from the storage position of the element corresponding to the DC component. , An element for each position corresponding to each conversion coefficient is held independently, and at a position exceeding a predetermined range in the long side direction, the same element is held in a unit of a preset number of conversion coefficients (two in the embodiment). To do.
  • the short side direction of the quantization matrix as shown in FIGS. 8B and 8C, the elements of the quantization matrix are arranged for each transform coefficient.
  • the code amount of the quantization matrix can be suppressed and the image quality deterioration can be suppressed.
  • the “predetermined range” may be defined based on the scanning order as shown in FIGS. 10A to 10D when encoding the elements of the quantization matrix.
  • 8 ⁇ 16 or 16 ⁇ 8 transform coefficient block size For the block size, the scanning in FIGS. 10B and 10C is performed for encoding/decoding the elements of the quantization matrix.
  • an element obtained by performing one scan (range of distance “1”) from the element corresponding to the DC component of the transform coefficient is assigned for each transform coefficient, and thereafter. Will be assigned one element for every two transform coefficients. That is, the quantization matrices 801 and 802 as shown in FIGS. 8B and 8C are obtained in the processing of the decoding device.
  • an element obtained by performing three scans (range of distance “3”) from the element corresponding to the DC component of the transform coefficient is assigned to each transform coefficient, and thereafter, 4 elements are assigned.
  • One element will be assigned for each transform coefficient. That is, the quantization matrix 803 as shown in FIG. 8D is obtained.
  • the elements obtained by all the scans from the elements corresponding to the DC component of the transform coefficient are assigned for each transform coefficient. That is, the quantization matrix 800 as shown in FIG. 8A is obtained in the processing of the decoding device.
  • the allocation of elements to transform coefficients may be adaptively changed for the size of the quantization matrix based on the scanning for the quantization matrix. In this case, it is not necessary to consider the positional relationship between the elements.
  • FIG. 2 is a block diagram of the image decoding apparatus.
  • the image decoding device has a control unit 250 that controls the components described below and controls the entire device.
  • the control unit 250 includes a CPU, a ROM that stores programs executed by the CPU and various parameters, and a RAM that is used as a work area of the CPU.
  • the OS operating system
  • the program, and the parameters stored in the ROM or another nonvolatile storage device may be loaded into the RAM, and then the program may be executed under the control of the OS.
  • the image decoding apparatus includes an input terminal 201, a separation decoding unit 202, a decoding unit 203, an inverse quantization/inverse conversion unit 204, an image reproduction unit 205, a frame memory 206, an in-loop filter unit 207, an output terminal 208, and The quantization matrix decoding unit 209 is included.
  • the configuration and operation of the image decoding device in the configuration of the above image decoding device will be described below.
  • the image decoding apparatus is configured to input the bitstream generated by the image encoding apparatus described above in frame units, but may be configured to input a still image bitstream for one frame. Further, in the second embodiment, only the intra prediction decoding process will be described for ease of description, but the present invention is not limited to this and can be applied to an inter prediction decoding process.
  • the separating/decoding unit 202 inputs the coded bitstream via the input terminal 201, separates the coded bitstream into coded data related to decoding information and coefficients, and decodes coded data existing in the header part of the bitstream. ..
  • the separation/decoding unit 202 of the present embodiment separates the encoded data of the quantization matrix from the encoded bitstream, and supplies the encoded data to the quantization matrix decoding unit 209. Further, the separation/decoding unit 202 separates the encoded data of the image data from the encoded bitstream, and supplies the encoded data to the decoding unit 203. In short, the demultiplexing/decoding unit 202 performs an operation reverse to that of the integrated coding unit 111 in FIG. 1.
  • the quantization matrix decoding unit 209 decodes the encoded data of the quantization matrix supplied from the separation decoding unit 202, and reproduces and holds the quantization matrices 800 to 803.
  • the decoding unit 203 decodes the coded data of the image data input from the separation decoding unit 202, and reproduces the quantization coefficient and the prediction information.
  • the inverse quantization/inverse transform unit 204 performs inverse quantization on the quantized coefficient using any of the reconstructed quantization matrices 800 to 803, and transforms it, as with the inverse quantization/inverse transform unit 106 in FIG. The coefficient is obtained, the inverse orthogonal transform is further performed, and the prediction error data is reproduced.
  • the image reproducing unit 205 appropriately refers to the frame memory 206 based on the input prediction information to generate predicted image data. Then, the image reproduction unit 205 reproduces the image data by adding the prediction error data reproduced by the inverse quantization/inverse conversion unit 204 to this predicted image data, and stores the image data in the frame memory 206.
  • the in-loop filter unit 207 similar to the in-loop filter unit 109 in FIG. 1, performs in-loop filter processing such as deblocking filter on the reproduced image data stored in the frame memory 207 and outputs the filtered image data. Restore in frame memory. Then, the output terminal 208 outputs the reproduced image data to an external device (for example, a display device).
  • in-loop filter processing such as deblocking filter
  • the output terminal 208 outputs the reproduced image data to an external device (for example, a display device).
  • bitstream generated in the first embodiment is input in frame units, but a still image bitstream for one frame may be input.
  • intra-prediction decoding process only the intra-prediction decoding process will be described for ease of description, but the present invention is not limited to this and can be applied to an inter-prediction decoding process.
  • the one-frame bit stream input via the input terminal 201 is supplied to the separation decoding unit 202.
  • the separating/decoding unit 202 separates the bitstream into code data related to the decoding process and code data, and decodes the code data existing in the header of the bitstream. More specifically, the separation decoding unit 202 reproduces the coded data of the quantization matrix.
  • the separation decoding unit 202 of this embodiment first extracts the coded data of the quantization matrix from the sequence header of the bit stream shown in FIG. 6A and supplies it to the quantization matrix decoding unit 209. Subsequently, the separation decoding unit 202 reproduces the code data in sub-block units of the basic block of the picture data, and supplies it to the decoding unit 203.
  • the quantization matrix decoding unit 209 first decodes the input coded data of the quantization matrix and reproduces a plurality of one-dimensional difference matrices. In the present embodiment, similar to the first embodiment, decoding is performed using the coding table shown in FIG. 12A (or FIG. 12B), but the coding table is not limited to this, and the first embodiment Other encoding tables may be used as long as the same format is used. Further, the quantization matrix decoding unit 209 reversely scans the reproduced one-dimensional difference matrices to reproduce a plurality of two-dimensional quantization matrices. Here, the operation opposite to the scanning of the quantization matrix encoding unit 113 of the first embodiment is performed.
  • the quantization matrix decoding unit 209 of the present embodiment uses the scanning methods shown in FIGS. 10A to 10D to calculate the difference matrices 1000 to 1003 shown in FIGS. 11A to 11D, respectively. Regenerate and hold the conversion matrices 800 to 803.
  • the quantization matrix decoding unit 209 reproduces the quantization matrix shown in FIG. 8B from the difference matrix 1001 shown in FIG. 11B using the scanning method shown in FIG. 10B.
  • the quantization matrix decoding unit 209 calculates the first element "4" from the initial value "8" and the initial difference value "-4" in FIG. 11B, and at the first scanning position in FIG. 10B.
  • the value "4" of the element at a position of row 0, column 0 is determined, and the element "4" is arranged in the portion of row 0, column 0 of FIG. 8B.
  • the quantization matrix decoding unit 209 calculates the element “4” in the 0th row and 0th column of FIG. 8B and the second element “5” from the second difference value “1” in FIG. 11B, “5” is arranged at the 0th row and 1st column which is the second scanning position in FIG. 10B.
  • the third element “9” is calculated from the element "5" in the 0th row and 1st column of FIG. 8B and the third difference value "4" in FIG. 10B, and the third scanning position in FIG. 8B. “9” is arranged in the 1st row and 0th column and the 1st row and 1st column. The same process can be repeated to reproduce the quantization matrix 801 shown in FIG. 8B.
  • the decoding unit 203 decodes the code data of each sub-block in the basic block and reproduces the quantized coefficient and the prediction information.
  • the decoding unit 203 supplies the reproduced quantized coefficient to the inverse quantization/inverse transform unit 204, and the reproduced prediction information to the image reproducing unit 205, respectively.
  • the inverse quantizing/inverse transforming unit 204 uses the one of the quantization matrices 800 to 803 reproduced and held by the quantization matrix decoding unit 209 for the input quantized coefficient in sub-block units. And orthogonal transformation coefficients are generated. The inverse quantization/inverse transform unit 204 further performs inverse orthogonal transform on the generated orthogonal transform coefficient in sub-block units to reproduce prediction error data, and supplies the prediction error data to the image reproduction unit 205.
  • the quantization matrix to be used is determined according to the size of the sub-block to be decoded, and in this embodiment, the quantization matrix 803 of FIG. 8D is used for the sub-block division corresponding to FIG. 7A. And Similarly, the quantization matrix 802 of FIG.
  • FIG. 8C is used for the sub-block division of FIG. 7C. It is assumed that the quantization matrix 801 of FIG. 8B is used for the sub-block division of FIG. 7D. Further, the quantization matrix shown in FIG. 8A is used for subblock division of the quadtree of FIG. 7B.
  • the image reproducing unit 205 appropriately refers to the frame memory 206 based on the prediction information input from the decoding unit 203 for each sub-block, and reproduces the predicted image data. Then, the image reproducing unit 205 reproduces the image data of the sub-block by adding the prediction error data supplied from the inverse quantization/inverse transforming unit 204 to this predicted image data, and stores it in the frame memory 206. .. The image data stored in the frame memory 206 becomes a prediction reference candidate when decoding another sub-block.
  • the in-loop filter unit 207 reads the reproduced image data from the frame memory 206 in sub-block units and performs in-loop filter processing such as deblocking filter. Then, the in-loop filter unit 207 stores the filtered image in the frame memory 206 again.
  • the reproduced image stored in the frame memory 206 is finally output from the terminal 208 to the outside.
  • step S ⁇ b>401 the separation decoding unit 202 separates the information related to the decoding process and the code data related to the coefficient from the bit stream, and decodes the code data of the header part. More specifically, the quantization matrix reproduces the code data.
  • the quantization matrix decoding unit 209 decodes the coded data of the quantization matrix reproduced in S401, and reproduces the one-dimensional difference matrix 1000 to 1003 as shown in FIGS. 11A to 11D. Further, the quantization matrix decoding unit 209 reversely scans the reproduced one-dimensional difference matrix 1000 to 1003 to reproduce the two-dimensional quantization matrix. That is, the quantization matrix decoding unit 209 uses the scanning methods shown in FIGS. 10A to 10D for the difference matrices 1000 to 1003 shown in FIGS. 11A to 11D, respectively, and the quantization matrixes 800 to 8D shown in FIGS. Play and hold 803. It is assumed that the scanning method and the allocation of the elements of the quantization matrix to the transform coefficients shown in FIGS.
  • each element of the quantization matrix is assigned to the transform coefficient according to the distance from the element corresponding to the DC component of the transform coefficient. That is, only one of the horizontal and vertical directions of the basic block (16 ⁇ 16 size in the embodiment) has the same size, and the other has a different direction in the long side direction of the quantization matrix as shown in FIGS. 8B and 8C.
  • the quantization matrix decoding unit 209 sets the element for each position corresponding to each transform coefficient.
  • One element is assigned and the same element is assigned to a preset number unit (two in the embodiment) of the conversion coefficient at a position exceeding a predetermined range in the long side direction.
  • the elements of the quantization matrix are assigned to each transform coefficient.
  • the quantization matrix decoding unit 209 indicates the position of the element corresponding to the DC component and its position.
  • four elements adjacent to the right, the bottom, and the bottom right are individually assigned for each corresponding conversion coefficient.
  • one same element is assigned to every four transform coefficients adjacent to each other.
  • an element is held for each transform coefficient.
  • the code amount of the quantization matrix can be suppressed and the image quality deterioration can be suppressed.
  • the “predetermined range” may be defined based on the scanning order as shown in FIGS. 10A to 10D when decoding the elements of the quantization matrix.
  • Block size of 8 ⁇ 16 or 16 ⁇ 8 transform coefficient For block size, the scanning of FIGS. 10B and 10C is performed for decoding the elements of the quantization matrix.
  • the quantization matrix decoding unit 209 assigns, for each transform coefficient, an element obtained by performing one scan (range of distance “1”) from the element corresponding to the DC component of the transform coefficient, and thereafter, two elements are assigned. Assign one element for each transform coefficient. That is, the quantization matrices 801, 802 as shown in FIGS. 8B, 8C are obtained.
  • the quantization matrix decoding unit 209 determines, for each transform coefficient, an element obtained by performing three scans (range of distance “3”) from the element corresponding to the DC component of the transform coefficient. Allocation is performed, and thereafter, one element is allocated for each of the four transform coefficients. That is, the quantization matrix 803 as shown in FIG. 8D is obtained. Further, in the case of a block size of transform coefficients of 8 ⁇ 8, the quantization matrix decoding unit 209 allocates, for each transform coefficient, elements obtained by all scanning from the elements corresponding to the DC component of the transform coefficient. That is, the quantization matrix as shown in FIG. 8A is obtained. In this way, the allocation of elements to transform coefficients may be adaptively changed for the size of the quantization matrix based on the scanning for the quantization matrix. In this case, it is not necessary to consider the positional relationship between the elements.
  • the decoding unit 203 decodes the code data separated in S401, and reproduces the quantization coefficient and prediction information for each subblock.
  • step S404 the inverse quantization/inverse transform unit 204 performs inverse quantization and transforms the quantized coefficient for each subblock using one of the quantization matrices 800 to 803 reproduced in step S402. Get the coefficient.
  • the inverse quantization/inverse transform unit 204 further performs inverse orthogonal transform on the transform coefficient to reproduce the prediction error data of each sub-block.
  • the image reproduction unit 205 reproduces the prediction information and predicted image data for each sub-block generated in S403. Then, the image reproducing unit 205 reproduces the image data by adding the prediction error data generated in S404 to the reproduced predicted image data for each sub-block.
  • control unit 250 determines whether or not the decoding of all the basic blocks in the frame is completed, and if so, the process proceeds to S407, and if not, the next basic block is decoded. Therefore, the process returns to S403.
  • step S407 the in-loop filter unit 207 performs in-loop filter processing on the image data reproduced in step S405, generates a filtered image, and ends the processing.
  • all four types of quantization matrices 800 to 803 shown in FIGS. 8A to 8D are decoded from the bit stream, but instead, one quantum decoded from the bit stream is used.
  • Other quantization matrices may be generated from the quantization matrix.
  • the 16 ⁇ 8 quantization matrix itself may not be decoded from the bitstream, but may be generated using the 16 ⁇ 16 quantization matrix decoded from the bitstream.
  • some elements are thinned out from the quantization matrix of FIG. 8D to generate the quantization matrix of FIG. 8B.
  • the quantization matrix 800 may be used to generate the quantization matrices 801 and 802 in FIGS. 8B and 8C.
  • the calculation method in this case is not particularly limited, and it may be calculated by adding a specific difference value (+1 in the present embodiment) to the element “4” in the 0th row and 0th column, or interpolation with peripheral elements may be performed. You may calculate using.
  • the element “5” in row 0 and column 1 of FIG. 8B or the element “5” in row 1 and column 0 of FIG. 8C may be decoded from the bitstream. By this means, it is possible to decode a bitstream in which the code amount of the quantization matrix is further reduced.
  • an identifier for selecting whether to generate each quantization matrix from another quantization matrix or to decode each element may be decoded from the header. For example, information indicating whether each element of the quantization matrix is generated from another quantization matrix or individually decoded is decoded as a quantization matrix coding method information code from the header part of the bit stream shown in FIG. 6B. It may be configured to. By this means, it is possible to decode a bitstream in which it is selected whether to give priority to image quality control according to the size of a sub block or to reduce the code amount of the quantization matrix.
  • the quantization matrices 800 to 803 in FIGS. 8A to 8D corresponding to the sub-block division/orthogonal transformation in FIGS. 7A to 7D are used, but the orthogonal transformation size and the quantization matrix used are It is not limited to this.
  • the quantization matrices 900 and 901 of FIGS. 9A and 9B may be further used.
  • each processing unit shown in FIGS. 1 and 2 is described as being configured by hardware. However, the processing performed by each processing unit shown in these figures may be configured by a computer program.
  • FIG. 5 is a block diagram showing a configuration example of computer hardware applicable to the image display device according to each of the above-described embodiments.
  • the CPU 501 controls the entire computer by using the computer programs and data stored in the RAM 502 and the ROM 503, and also executes the above-described processes as those performed by the image processing apparatus according to each of the above embodiments. That is, the CPU 501 functions as each processing unit shown in FIGS.
  • the RAM 502 has an area for temporarily storing a computer program or data loaded from an external storage device 506, data acquired from the outside via an I/F (interface) 507, and the like. Further, the RAM 502 has a work area used when the CPU 501 executes various processes. That is, the RAM 502 can be allocated as, for example, a frame memory or can appropriately provide other various areas.
  • the ROM 503 stores setting data of the computer, a boot program, and the like.
  • the operation unit 504 is composed of a keyboard, a mouse and the like, and can be operated by the user of the computer to input various instructions to the CPU 501.
  • the display unit 505 displays the processing result by the CPU 501.
  • the display unit 505 is composed of, for example, a liquid crystal display.
  • the external storage device 506 is a large-capacity information storage device represented by a hard disk drive device.
  • the external storage device 506 stores an OS (operating system) and a computer program for causing the CPU 501 to realize the functions of the units illustrated in FIGS. 1 and 2. Furthermore, each image data to be processed may be stored in the external storage device 506.
  • the computer programs and data stored in the external storage device 506 are appropriately loaded into the RAM 502 under the control of the CPU 501 and are subject to processing by the CPU 501.
  • the I/F 507 can be connected to a network such as a LAN or the Internet, and other devices such as a projection device and a display device, and the computer acquires and sends various information via the I/F 507.
  • the CPU 501 executes the boot program of the ROM 503, loads the OS stored in the external storage device 506 into the RAM 502, and activates the OS.
  • this device can communicate via the interface 507 and functions as an information processing device.
  • the CPU 501 loads an application related to image encoding (corresponding to FIG. 3) from the external storage device 506 to the RAM 502 and executes it, so that the CPU 501 functions as various processing units shown in FIG. Therefore, the present device functions as an image encoding device.
  • the CPU 501 loads an application related to image decoding (corresponding to FIG. 4) from the external storage device 506 to the RAM 502 and executes it, the CPU 501 functions as various processing units shown in FIG. It will function as an image decoding device.
  • the present invention supplies a program that implements one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program. It can also be realized by the processing. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
  • ASIC application specific integrated circuit

Abstract

本発明は、符号化で利用する量子化マトリクスの符号量を抑制しつつ、画像の符号化を行う。このため、この発明の、画像データを符号化する画像符号化装置は、符号化対象の画像データを予め設定されたサイズの基本ブロックに分割し、当該基本ブロックを、予め設定された複数のサブブロック分割パターンの何れかを用いて1以上のサブブロックに更に分割し、各サブブロック単位に周波数変換、量子化、エントロピー符号化を行う第1の符号化部と、該第1の画像符号化部で利用するサブブロック分割パターンに含まれるサブブロックのサイズに対応する複数の量子化マトリクスを保持する保持部と、該保持部で保持される複数の量子化マトリクスを符号化する第2の符号化部と、該第2の符号化部で生成された符号化データと、第1の符号化部で得た符号化データとを統合する統合部とを有する。ここで、保持部は、基本ブロックの水平、垂直方向のいずれかのサイズと同じサイズを有する量子化マトリクスについては、直流成分の要素の格納位置から予め設定された所定範囲の位置の要素を独立した値として保持し、所定範囲を超える位置では予め設定された個数単位に同じ要素を保持する。

Description

画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム
 本発明は、画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム
に関するものである。
 動画像の圧縮記録の符号化方式として、HEVC(High Efficiency Video Coding)符号化方式(以下、HEVCと記す)が知られている。HEVCでは符号化効率向上のため、従来のマクロブロック(16×16画素)より大きなサイズの基本ブロックが採用された。この大きなサイズの基本ブロックはCTU(Coding Tree Unit)と呼ばれ、そのサイズは最大64×64画素である。CTUはさらに予測や変換を行う単位となるサブブロックに分割される。
 また、HEVCにおいては、量子化マトリクスと呼ばれる、直交変換を施した後の係数(以下、直交変換係数と記す)を、周波数成分に応じて重み付けをする処理が用いられている。人間の視覚には劣化が目立ちにくい高周波成分のデータをより削減することで、画質を維持しながら圧縮効率を高めることが可能となっている。特許文献1には、このような量子化マトリクスを符号化する技術が開示されている。
特開2013-38758号公報
 HEVCでは、16×16画素や32×32画素といった、従来の8×8画素の直交変換よりも大きな直交変換が用いられており、またそういった大きな直交変換に対応した量子化マトリクスも用いられている。量子化マトリクスの符号量自体の増大を防ぐため、16×16画素の直交変換に対応する256個の量子化マトリクスの要素全てを符号化する代わりに、64個分の要素のみを符号化し、復号側でアップサンプリング処理により拡張する構成としている。また、周波数領域でDC成分に相当する量子化マトリクスの左上端位置にあたる要素は別途符号化される。このためHEVCにおいては、大きな直交変換を使用した際に、DC成分以外の周波数成分の量子化処理を細かく制御できないという課題があった。
 本発明は上述した課題を解決するためになされたものであり、符号化で利用する量子化マトリクスの符号量を抑制しつつ、画像の符号化を行う技術を提供しようとするものである。
 この課題を解決するため、例えば本発明の画像符号化装置は以下の構成を備える。すなわち、
 画像データを符号化する画像符号化装置であって、
 符号化対象の画像データを予め設定されたサイズの基本ブロックに分割し、当該基本ブロックを、予め設定された複数のサブブロック分割パターンの何れかを用いて1以上のサブブロックに更に分割し、各サブブロック単位に周波数変換、量子化、エントロピー符号化を行う第1の符号化手段と、
 該第1の符号化手段で利用する前記サブブロック分割パターンに含まれるサブブロックのサイズに対応する複数の量子化マトリクスを保持する保持手段と、
 該保持手段で保持される複数の量子化マトリクスのうちの少なくとも1つを符号化する第2の符号化手段と、
 該第2の符号化手段で生成された符号化データと、第1の符号化手段で得た符号化データとを統合する統合手段とを有し、
 前記保持手段は、
   前記基本ブロックの水平、垂直方向のいずれかのサイズと同じサイズを有する量子化マトリクスについては、直流成分に対応する要素の格納位置から予め設定された所定範囲の位置の要素を独立した値として保持し、前記所定範囲を超える位置では予め設定された個数単位に同じ要素を保持することを特徴とする。
 本発明によれば、符号化で利用する量子化マトリクスの符号量を抑制しつつ、画像の符号化を行うことが可能になる。
 本発明のその他の特徴及び利点は、添付図面を参照とした以下の説明により明らかになるであろう。なお、添付図面においては、同じ若しくは同様の構成には、同じ参照番号を付す。
 添付図面は明細書に含まれ、その一部を構成し、本発明の実施の形態を示し、その記述と共に本発明の原理を説明するために用いられる。
第1の実施形態における画像符号化装置のブロック構成図。 第2の実施形態における画像復号装置のブロック構成図 第1の実施形態に係る画像符号化装置における画像符号化処理を示すフローチャート。 第2の実施形態に係る画像復号装置における画像復号処理を示すフローチャート。 画像符号化装置、復号装置として適用可能なコンピュータのハードウェア構成例を示すブロック図。 第1の実施形態によって生成されるビットストリーム構造の一例を示す図。 第1の実施形態によって生成されるビットストリーム構造の一例を示す図。 実施形態で用いられるサブブロック分割の一例を示す図。 実施形態で用いられるサブブロック分割の一例を示す図。 実施形態で用いられるサブブロック分割の一例を示す図。 実施形態で用いられるサブブロック分割の一例を示す図。 実施形態で用いられるサブブロック分割の一例を示す図。 実施形態で用いられるサブブロック分割の一例を示す図。 実施形態で用いられる量子化マトリクスの一例を示す図。 実施形態で用いられる量子化マトリクスの一例を示す図。 実施形態で用いられる量子化マトリクスの一例を示す図。 実施形態で用いられる量子化マトリクスの一例を示す図。 実施形態で用いられる量子化マトリクスの一例を示す図。 実施形態で用いられる量子化マトリクスの一例を示す図。 実施形態で用いられる量子化マトリクスの要素の走査方法を示す図。 実施形態で用いられる量子化マトリクスの要素の走査方法を示す図。 実施形態で用いられる量子化マトリクスの要素の走査方法を示す図。 実施形態で用いられる量子化マトリクスの要素の走査方法を示す図。 実施形態で生成される量子化マトリクスの差分値行列を示す図。 実施形態で生成される量子化マトリクスの差分値行列を示す図。 実施形態で生成される量子化マトリクスの差分値行列を示す図。 実施形態で生成される量子化マトリクスの差分値行列を示す図。 量子化マトリクスの差分値の符号化に用いられる符号化テーブルの一例を示す図。 量子化マトリクスの差分値の符号化に用いられる符号化テーブルの一例を示す図。
 以下、添付図面に従って本発明に係る実施形態を詳細に説明する。なお、以下に示す実施形態における構成は一例に過ぎず、本発明は図示された構成に限定されるものではない。
 [第1の実施形態]
 図1は第1の実施形態の画像符号化装置を示すブロック構成図である。画像符号化装置は、以下に説明する構成要素を制御し、装置全体の制御を司る制御部150を有する。この制御部150は、CPU、CPUが実行するプログラムや各種パラメータ等を記憶しているROM、CPUのワークエリアとして使用されるRAMを含む。なお、ROMや他の不揮発性記憶装置に格納されたOS(オペレーティングシステム)、プログラム、パラメータをRAMにロードした後に、OSの制御下でプログラムを実行するようにしてもよい。
 また、画像符号化装置は、入力端子101、ブロック分割部102、量子化マトリクス保持部103、予測部104、変換・量子化部105、逆量子化・逆変換部106、画像再生部107、フレームメモリ108、インループフィルタ部109、符号化部110、統合符号化部111、出力端子112、及び、量子化マトリクス符号化部113を有する。
 上記構成において、不図示の画像発生源から画像データ(例えば30フレーム/秒)が、本装置の入力端子101に供給される。なお、画像発生源の種類は問わないが、簡単には撮像部もしくはビデオカメラ、或いは、符号化対象の画像データを記憶するハードディスクや記憶媒体である。
 ブロック分割部102は、入力端子101を介して入力した画像データを複数の基本ブロックに分割し、基本ブロック単位の画像データを後段の予測部104に供給する。
 量子化マトリクス保持部103は、量子化処理で用いる複数種類の量子化マトリクスを保持している。この量子化マトリクスの生成方法の詳細については後述する。
 予測部104は、ブロック分割部102からの基本ブロック単位の画像データを入力し、より小さい複数のサブブロックへの分割法を決定し、各サブブロック単位でフレーム内予測であるイントラ予測や、フレーム間予測であるインター予測などを行い、予測画像データを生成する。さらに、予測部104は、サブブロックの画像データと、その予測画像データとの差分である予測誤差データを算出し、供給する。また、予測部104は、予測に必要な情報、例えばサブブロック分割に関する情報、予測モードや動きベクトル等の情報も、予測誤差データと併せて出力する。以下ではこの予測に必要な情報を予測情報と呼称する。
 変換・量子化部105は、予測部104から供給された予測誤差データをサブブロック単位で直交変換(周波数変換)して変換係数を得る。そして、変換・量子化部105は、着目サブブロックの変換係数を、量子化マトリクス保持部103が保持する該当量子化マトリクスを用いて量子化を行い、量子化係数を得る。
 逆量子化・逆変換部106は、変換・量子化部105から入力した量子化係数を、量子化マトリクス保持部103が保持する該当量子化マトリクスを用いて逆量子化することいで変換係数を再生し、さらにその変換係数を逆直交変換して予測誤差データを再生する。
 画像再生部107は、予測部104から入力した予測情報に基づいて、フレームメモリ108を適宜参照して予測画像データを生成する。そして、画像再生部107は、生成した予測画像データと、逆量子化・逆変換部106からの予測誤差データとから、再生画像データを生成し、再びフレームメモリ108に出力する。
 インループフィルタ部109は、フレームメモリ108に格納された画像再生部107からの再生画像データに対し、デブロッキングフィルタやサンプルアダプティブオフセットなどのインループフィルタ処理を行い、フィルタ処理後の画像データを、再びフレームメモリ109に格納する。
 符号化部110は、変換・量子化部105から入力した量子化係数および予測部104から入力した予測情報を符号化して、符号データを生成し出力する。
 量子化マトリクス符号化部113は、量子化マトリクス保持部103から入力した量子化マトリクスを符号化して、量子化の符号化データを生成し出力する。
 統合符号化部111は、量子化マトリクス符号化部113で符号化された量子化マトリクスの符号化データを用いて、ヘッダ符号データを生成する。さらに統合符号化部111は、生成したヘッダ符号データに、符号化部110から入力した画像の符号データを結合することでビットストリームを形成し、出力端子112を介して外部に出力する。
 なお、出力先は特に問わないが、記録媒体などの記憶装置や、ネットワーク上のファイルサーバ等で構わない。
 以下、実施形態の画像符号化装置における画像の符号化動作を更に詳しく説明する。
 本実施形態では動画像データをフレーム単位に入力する構成とするが、1フレーム分の静止画像データを入力する構成としても構わない。また、本実施形態では、説明を容易にするため、イントラ予測符号化の処理のみを説明するが、これに限定されずインター予測符号化の処理においても適用可能である。さらに本実施形態では説明のため、ブロック分割部101においては1フレームの画像を分割する基本ブロックのサイズを水平16画素×垂直16画素(以下、単に16×16画素と表記する)として説明するが、これはあくまで例示であり、他のサイズであっても構わない。
 画像の符号化に先立ち、量子化マトリクスの符号化が行われる。
 最初に、量子化マトリクス保持部103は、符号化で利用する複数のサイズのサブブロックに応じた、複数の量子化マトリクスを生成し、保持する。図8Aの参照符号800が示す太枠は、8×8画素のサイズに対応する量子化マトリクスの一例であり、マトリクス内の値はその要素を示している。量子化マトリクス800の左上隅の0行0列の要素がDC成分(直流成分)の変換係数に対応しており、それ以外の要素はAC成分(交流成分)の変換係数にそれぞれ対応している。この量子化マトリクスを構成する各要素の決定方法は特に限定しない。例えば、所定の初期値を用いても良いし、個別に設定しても良い。また、画像の特性に応じて生成されても構わない。
 同様に、量子化マトリクス保持部103は、他のサブブロックのサイズに応じた量子化マトリクスも生成する。図8Bは、本実施形態における16×8画素の直交変換に対応する量子化マトリクス801である。DC成分に対応する0行0列の要素は“4”、その右隣の0行1列の要素は“5”といった個別の値が設定されている。図8Bの量子化マトリクス801の0行1列の要素は、サブブロックの形状において最も低周波であると推定されるAC成分の変換係数に対応する要素である。一方、残りの要素は符号量削減のため、水平方向に隣接する2つの要素に対して1つの値が設定されるような構成となっている。例えば、0行2列および0行3列の要素には“9”という同じ値が設定され、同様に1行2列および1行3列の要素には“10”という同じ値が設定されている。
 図8Cは、本実施形態における8×16画素の直交変換に対応する量子化マトリクス802である。DC成分に対応する0行0列の要素は“4”、その下の1行0列の要素は“5”といった個別の値が設定されている。図8Cの量子化マトリクス802の1行0列の要素は、サブブロックの形状において最も低周波であると推定されるAC成分の変換係数に対応する要素である。一方、残りの要素は符号量削減のため、垂直方向に隣接する2つの要素に対して1つの値が設定されるような構成となっている。例えば、2行0列および3行0列の要素には“9”という同じ値が設定され、同様に2行1列および3行1列の要素には“10”という同じ値が設定されている。
 図8Dは、本実施形態における16×16画素の直交変換に対応する量子化マトリクス803である。DC成分に対応する0行0列の要素は“4”、その右隣の1行0列および直下の0行1列の要素は“5”、右下の1行1列の要素は“6”といった個別の値がDC成分に隣接したAC成分に対応する要素として設定されている。一方、残りの要素は符号量削減のため、水平及び垂直に隣接する2×2の4つの要素に対して1つの値が設定されるような構成となっている。
 上記のごとく、量子化マトリクス内のDC成分に対応する要素と、その付近の複数の低周波成分に対応する要素は個別の値を設定し、残りの要素には複数の要素単位で値を設定することで、量子化マトリクスの符号量が削減され易くなり、且つ、人間の視覚が敏感な低周波部分の量子化を細かく制御することができる。
 量子化マトリクス保持部103は、このようにして生成された量子化マトリクス800~803が保持されている。本実施形態では、図8A~8Dに示された四種の量子化マトリクス800~803が二次元の形状で保持されているものとするが、量子化マトリクス内の各要素はもちろんこれに限定されない。また、後述の予測方法、例えばイントラ予測を用いるかインター予測を用いるかによって、あるいは符号化対象が輝度ブロックか色差ブロックかによって、同じ大きさの直交変換に対して複数の量子化マトリクスを保持することも可能である。一般的に、人間の視覚特性に応じた量子化処理を実現するため、図8A~8Dに示すように量子化マトリクス800~803の左上部分に相当する低周波部分の要素は小さく、右下部分に相当する高周波部分の要素は大きくなっている。
 量子化マトリクス符号化部113は、二次元形状で格納されている量子化マトリクス800~803を量子化マトリクス保持部106から順に読み出し、各要素を走査して差分を計算し、一次元の行列を生成する。本実施形態では、図8A~8Dに示された量子化マトリクス800~803それぞれが符号化されることになる。具体的には、量子化マトリクス符号化部113は、まず図8Aに示された量子化マトリクス800については、図10A示された矢印に沿った走査方法を用い、要素ごとに走査順に隣り合う要素との差分を計算していく。例えば図8Aで示された8×8画素分の量子化マトリクス800は図10Aで示された対角線スキャンによって走査されるが、左上隅に位置する最初の要素“4”の次はそのすぐ下に位置する要素“9”が走査され、差分である+5が計算される。また、量子化マトリクスの最初の要素(本実施形態では“4”)の符号化には、所定の初期値(例えば“8”)との差分を計算するものとするが、もちろんこれに限定されず、任意の値との差分や、最初の要素の値そのものを用いても良い。
 同様に、量子化マトリクス符号化部113は、図8Bに示された量子化マトリクス801については、図10Bに示される矢印に沿った走査方法を用い、要素ごとに走査順に直前の要素との差分を計算するものとする。例えば図8Bに示された16×8画素分の量子化マトリクス801は図10Bに示された走査方法によって走査されるが、左上端に位置する最初の要素「4」の次はそのすぐ右に位置する要素「5」が走査され、差分である+1が符号化される。次にその下に位置する要素「9」が走査され、差分である+4が符号化される。
 図8Cに示された8×16画素分の量子化マトリクス802は図10Cに示された走査方法によって走査される。左上端に位置する最初の要素「4」の次はそのすぐ下に位置する要素「5」が走査され、差分である+1が符号化される。そしてその下に位置する要素「9」が走査され、差分である+4が符号化される。
 図8Dに示された16×16画素分の量子化マトリクス803においては、図10Dに示された走査方法によって走査される。左上端に位置する最初の要素4の次は、そのすぐ下に位置する要素5が走査され、差分である+1が符号化される。次に左上端の右隣に位置する要素5が走査され、差分である0が符号化される。そして、その下に位置する要素6が走査され、差分である+1が符号化される。
 このようにして、本実施形態では、図8A~8Dの量子化マトリクス800~803は、それぞれ図10A~10Dの走査方法を用い、図11A~11Dに示される一次元の差分行列1000~1003が生成される。量子化マトリクス符号化部113はさらに前記差分行列を符号化して量子化マトリクス符号データを生成する。本実施形態では図12Aに示される符号化テーブルを用いて符号化するものとするが、符号化テーブルはこれに限定されず、例えば図12Bに示される符号化テーブルを用いても良い。このようにして生成された量子化マトリクス符号データは後段の統合符号化部111に供給される。
 図1に戻り、統合符号化部111は、画像データの符号化に必要なヘッダ情報を符号化し、量子化マトリクスの符号データを統合する。続いて、画像データの符号化を説明する。
 ブロック分割部102は、入力端子101から入力された1フレーム分の画像データを、複数の基本ブロックに分割し、基本ブロック単位の画像データを予測部104に供給する。先に説明したように本実施形態での基本ブロックのサイズは16×16画素である。
 予測部104は、ブロック分割部102から入力された基本ブロック単位の画像データに対し予測処理を実行する。具体的には、予測部104は、基本ブロックをさらに細かいサブブロックに分割するサブブロック分割法を決定し、さらにサブブロック単位で水平予測や垂直予測などのイントラ予測モードを決定する。なお、サブブロック分割法は、直前のフレームの符号化データ量等から決定するものとする。
 図7A~7Dはサブブロック分割パターンの例を示している。同図の外側の太枠を示す参照符号700が基本ブロックを表しており、実施形態の場合は16×16画素のサイズである。そして、太枠内の矩形がサブブロックを表している。図7Aは、基本ブロック=1サブブロックの例を示している。図7Bは従来の正方形サブブロック分割の一例を表しており、16×16画素の基本ブロックは、8×8画素サイズの4つのサブブロックに分割されている。一方、図7C,7Dは長方形サブブロック分割の一例を表しており、図7Cでは基本ブロックが8×16画素の縦長の2つのサブブロックに、図7Dでは16×8画素の横長の2つのサブブロックに分割されている。
 本実施形態では、16×16画素の基本ブロックを、分割しない(図7A)、垂直方向に長手の2つのサブブロックに分割する(図7C)、水平方向に長手の2つのサブブロックに分割する(図7D)、及び、四分木分割する(図7B)のいずれかが決定されるものとする。ただし、サブブロック分割方法はこれに限定されない。図7E,7Fのように1:2:1の比で分割する三分木分割を用いても構わない。
 決定したイントラ予測モードおよび符号化済の画素から予測画像データが生成される。そして、予測部104は、サブブロック単位に、入力された画像データと、生成した予測画像データとの差分である予測誤差データを生成し、その予測誤差データを変換・量子化部105に供給する。また、サブブロック分割やイントラ予測モードなどの情報は予測情報として、符号化部110、画像再生部107に供給される。
 変換・量子化部105では、入力された予測誤差データに対して直交変換・量子化を行い、量子化係数を生成する。具体的には、変換・量子化部105は、まず、サブブロックのサイズに対応した直交変換処理を施し、直交変換係数を生成する。そして、変換・量子化部105は、サブブロック単位に、直交変換係数を量子化マトリクス保持部103に格納されている、対応するサイズの量子化マトリクスを用いて量子化し、量子化係数を生成する。本実施形態では、図7Aに対応した16×16画素のサブブロック分割に対しては図8Dの量子化マトリクスが用いられるものとする。同様にして、図7Cの8×16画素のサブブロック分割に対しては図8C、図7Dの16×8のサブブロック分割に対しては図8Bの量子化マトリクスが用いられるものとする。また、図7Bに示す、垂直、水平とも基本ブロックの1/2のサイズのサブブロック分割(四分木分割)には、図8Aで示される量子化マトリクスが用いられるものとする。変換・量子化部105は、生成された量子化係数(量子化後の変換係数)を符号化部110および逆量子化・逆変換部106に供給する。
 逆量子化・逆変換部106は、サブブロック単位に、入力された量子化係数を、量子化マトリクス保持部103に格納されている、対応する量子化マトリクスを用いて逆量子化することで、変換係数を再生する。そして、逆量子化・逆変換部106は、サブブロック単位に、再生された変換係数を逆直交変換して予測誤差データを再生し、再生された予測誤差データを画像再生部107に供給する。
 画像再生部107は、サブブロック単位に、予測部104から入力される予測情報に基づいて、フレームメモリ108を適宜参照し、予測画像データを再生する。画像再生部107は、サブブロック単位に、再生された予測画像データと、逆量子化・逆変換部106から入力した予測誤差データとを加算することで、サブブロックの画像データを再生し、再生した画像データをフレームメモリ108に格納する。
 インループフィルタ部109は、サブブロック単位に、フレームメモリ108から再生画像データを読み出し、デブロッキングフィルタなどのインループフィルタ処理を行う。そして、インループフィルタ部109は、フィルタ処理された画像データをフレームメモリ108に再格納する。
 符号化部110は、サブブロック単位に、変換・量子化部105で生成された量子化係数、予測部104から入力された予測情報をエントロピー符号化し、符号データを生成する。エントロピー符号化の方法は特に問わないが、ゴロム符号化、算術符号化、ハフマン符号化などを用いることができる。生成された符号データは統合符号化部111に供給される。
 統合符号化部111では、前述のヘッダの符号データとともに符号化部110から入力された符号データなどを多重化してビットストリームを形成する。最終的には、ビットストリームは端子112から外部に出力される。
 図6Aは第1の実施形態で出力されるビットストリームのデータ構造例を示している。シーケンスヘッダに図8A~8Dの量子化マトリクス800~803に対応する符号データが含まれ、各要素の符号化結果で構成されている。ただし、符号化される位置はこれに限定されず、ピクチャヘッダ部やその他のヘッダ部に符号化される構成をとってももちろん構わない。また、1つのシーケンスの中で量子化マトリクスの変更を行う場合、量子化マトリクスを新たに符号化することで更新することも可能である。この際、全ての量子化マトリクスを書き換えても良いし、書き換える量子化マトリクスの変換ブロックサイズを指定することでその一部を変更するようにすることも可能である。
 以下、第1の実施形態に係る画像符号化装置における1フレームの符号化処理の処理手順を図3のフローチャートを参照して説明する。なお、以下の説明における各工程は、その主体が制御部150による制御下にてそれぞれの処理を実行するものとする。
 まず、画像の符号化に先立ち、S301にて、量子化マトリクス保持部103は、複数種類の量子化マトリクスを生成し、保持する。本実施形態では、量子化マトリクス保持部103は図8A~8Dに示された4種類の量子化マトリクス800~803を生成し、保持するものとする。
 S302にて、量子化マトリクス符号化部113は、S301にて生成・保持された量子化マトリクスを走査して各要素の差分を算出し、1次元の差分行列を生成する。本実施形態では、量子化マトリクス符号化部113は、図8A~8Dの量子化マトリクス800~803を、図10A~10Dの走査順に沿って、連続する2つの要素の差分値を求めていき、図11A~11Dに示される差分値の1次元行列を生成する。そして、量子化マトリクス符号化部113は、生成された行列における個々の差分値を、図12A(又は図12B)に示す符号化テーブルを参照して二進符号を生成し、符号化データを生成していく。
 S303にて、統合符号化部111は、生成された量子化マトリクス符号データとともに、画像データの符号化に必要なヘッダ情報を生成し、出力する。
 S304にて、ブロック分割部102は、フレーム単位の入力画像を基本ブロック単位に分割する。そして、S305にて、予測部104は、S304にて生成された1つの基本ブロックの画像データを入力し、1以上のサブブロックへの変換を行う。そして、予測部104は、各サブブロックについての予測処理を実行し、サブブロック分割情報やイントラ予測モードなどの予測情報および予測画像データを生成する。そして、予測部104は、各サブブロックの画像データとその予測画像データから予測誤差データを算出する。
 S306にて、変換・量子化部105は、S305で算出された各サブブロックの予測誤差データそれぞれを直交変換して変換係数を生成する。更に、変換・量子化部105は、S301にて生成・保持された量子化マトリクスを用いて、各サブブロックの予測誤差データを量子化し、量子化係数を生成する。本実施形態では、図7Aに対応したサブブロック分割で得た各サブロックに対しては図8Dの量子化マトリクス803が用いられるものとする。同様にして、図7Cのサブブロック分割で得た各サブブロックに対しては図8Cの量子化マトリクス802が用いられる。図7Dのサブブロック分割で得た各サブブロックに対しては図8Bの量子化マトリクス801が用いられる。さらに、図7Bのように四分木分割された4つサブブロックに対しては図8Aに示される量子化マトリクス800が用いられるものとする。
 S307にて、逆量子化・逆変換部106は、S305で生成された各サブブロックの量子化係数を、S301にて生成・保持された量子化マトリクスを用いて逆量子化を行い、変換係数を再生する。そして、逆量子化・逆変換部106は、さらに、各サブブロックの変換係数に対して逆直交変換し、サブブロック毎の予測誤差データを再生する。
 S308にて、画像再生部107は、S305で生成された予測情報に基づいて、サブブロックごとの予測画像データを再生する。画像再生部107は、さらに再生された各サブブロックの予測画像データに、S307で生成された対応するサブブロックの予測誤差データを加算することで、サブブロック毎の画像データを再生する。
 S309にて、符号化部110は、サブブロックごとに、S305で生成された予測情報、および、S306で生成された量子化係数を符号化し、符号データを生成する。また、他の符号データも含め、ビットストリームを生成する。
 S310にて、制御部150は、フレーム内の全ての基本ブロックの符号化が終了したか否かの判定を行い、終了していればS311に進み、そうでなければ次の基本ブロックを対象とする符号化を行うため、処理をS305に戻す。
 S311にて、インループフィルタ部109は、S308で再生された画像データに対し、インループフィルタ処理を行い、フィルタ処理された画像を生成し、処理を終了する。
 上記の処理において、動画像の2つ目以降のフレームの符号化を行う場合には、S304乃至S311を、符号化すべき最後のフレームの入力まで繰り返すことになる。
 以上の構成と動作により、特にS302において量子化マトリクスの初め所定数の要素(DC成分用の要素及びそれに隣接する比較的低周波成分用の要素)については個別に符号化し、残りの要素を複数の要素単位で符号化することで、量子化マトリクスの符号量を削減することができる。さらに、人間の視覚が敏感な低周波部分の量子化を細かく制御することもできる。
 なお、本実施形態では、図8A~8Dの4種類の量子化マトリクス800~803の全てを符号化する構成としたが、4種類の量子化マトリクスを独立して符号化する代わりに、復号側の装置において、他の量子化マトリクスを用いて当該量子化マトリクスを生成する構成としても構わない。例えば、16×8の量子化マトリクス自体を符号化せずに、符号化された16×16の量子化マトリクスを用いて生成する構成とした場合、復号側の装置において、図8Dの量子化マトリクス803から一部の要素を間引き図8Bの量子化マトリクス801を生成することとなる。同様に、復号側の装置において、図8Dの量子化マトリクス803から一部の要素を間引いて図8Cの量子化マトリクス802を生成することも可能である。また、図8Bの0行1列の要素「5」や図8Cの1行0列の要素「5」の算出方法を符号化側および復号側の装置間において定めておけば、図8Aの量子化マトリクス800を用いて図8Bの量子化マトリクス801や図8Cの量子化マトリクス802を生成することも可能である。この場合の算出方法は特に限定されず、0行0列の要素「4」に特定の差分値(本実施形態では+1)を加算して算出しても良いし、周辺の要素との補間を用いて算出しても良い。なお、図8Cについては、変換係数のDC成分に対応する要素の右側および下側の要素については、DC成分に対応する要素に+1を加え、右下の要素については+2を加えている。
 また、16×16の量子化マトリクスの要素とともに、図8Bの0行1列の要素「5」や図8Cの1行0列の要素「5」自体を符号化してもよい。
 これにより、量子化マトリクスの符号量をさらに削減したビットストリームを符号化することができる。
 さらには、量子化マトリクスごとに別の量子化マトリクスから生成するか、各要素を符号化するかを選択し、識別子をヘッダ内に符号化する構成としても構わない。例えば、量子化マトリクスの各要素を他の量子化マトリクスから生成するか、個別に符号化するかを示す情報を、量子化マトリクス符号化方法情報符号としてヘッダ部分に符号化し、図6Bに示されるビットストリームを生成する構成としても良い。これにより、サブブロックの大きさに応じた画質制御を優先したビットストリームか、量子化マトリクスの符号量がより少ないビットストリームかを選択的に生成することができる。
 また本実施形態では、図7A~7Dのサブブロック分割・直交変換に対応する図8A~8Dの量子化マトリクスが用いられる構成としたが、使用される直交変換サイズや量子化マトリクスはこれに限定されない。例えば、図7E,7Fのように1:2:1の比で分割する三分木分割がさらに用いられた場合、図9A,9Bの量子化マトリクス900,901をさらに用いる構成としても構わない。
 以上の説明したように、実施形態における量子化マトリクス保持部103は、基本ブロック(実施形態では16×16のサイズ)の水平、垂直方向のいずれかの一方のみが同じサイズを有し、他方が異なる図8B,8Cに示すような量子化マトリクス801,802の長辺方向については、直流成分に対応する要素の格納位置から予め設定された所定範囲(実施形態では距離“1”の範囲)では、各変換係数に対応する位置毎の要素を独立して保持し、長辺方向における所定範囲を超える位置では、変換係数の予め設定された個数単位(実施形態では2個)に同じ要素を保持する。一方、図8B、8Cに示すような量子化マトリクスの短辺方向については、変換係数ごとに量子化マトリクスの要素が配置される。
 そして、水平、垂直方向のいずれも基本ブロックのサイズと同じサイズである量子化マトリクスについては、図8Dに示すように、直流成分に対応する要素の位置およびその位置に対して、右、下、右下に隣接する4つの要素(実施形態では距離“1”の範囲)を対応する変換係数ごとに個別に保持する。そして、それ以外の変換係数ついては、互いに隣接する4つの変換係数ごとに1つの同じ要素を保持する。そして、図8Aに示すような8x8のサイズの量子化マトリクスの場合、変換係数ごとに要素を保持することになる。
 このように量子化マトリクスのサイズに従って、変換係数に対する要素の割り当てを適応的に変えているため、量子化マトリクスの符号量を抑制でき、且つ、画質劣化を抑制できるようになる。
 なお、量子化マトリクスの要素を符号化する際の図10A~10Dに示すような走査順に基づいて「所定範囲」を定義してもよい。8x16あるいは16x8の変換係数のブロックサイズブロックサイズついては、図10B,10Cの走査が量子化マトリクスの要素の符号化/復号のために行われることになる。この際、以降に記載される復号装置の処理において、変換係数のDC成分に対応する要素から1走査(距離“1”の範囲)して得られる要素を変換係数ごとに割り当てを行い、それ以降は2つの変換係数ごとに1つの要素が割り当てられることになる。すなわち、図8B,8Cに示すような量子化マトリクス801,802が復号装置の処理において得られることになる。また、16x16の変換係数のブロックサイズの場合、変換係数のDC成分に対応する要素から3走査(距離“3”の範囲)して得られる要素を変換係数ごとに割り当てを行い、それ以降は4つの変換係数ごとに1つの要素が割り当てられることになる。すなわち、図8Dに示すような量子化マトリクス803が得られることになる。また、8x8の変換係数のブロックサイズの場合、変換係数のDC成分に対応する要素から全ての走査によって得られる要素が変換係数ごとに割り当てられることになる。すなわち、図8Aに示すような量子化マトリクス800が復号装置の処理において得られることになる。このように、量子化マトリクスに対する走査に基づいて、量子化マトリクスのサイズついて適応的に変換係数に対する要素の割り当てを変えてもよい。この場合、要素間の位置関係を特別に考慮する必要がなくなる。
 [第2の実施形態]
 第2の実施形態では、上記第1の実施形態の画像符号化装置で生成された符号化データを復号する画像復号装置を説明する。図2は、その画像復号装置のブロック構成図である。
 画像復号装置は、以下に説明する構成要素を制御し、装置全体の制御を司る制御部250を有する。この制御部250は、CPU、CPUが実行するプログラムや各種パラメータ等を記憶しているROM、CPUのワークエリアとして使用されるRAMを含む。なお、ROMや他の不揮発性記憶装置に格納されたOS(オペレーティングシステム)、プログラム、パラメータをRAMにロードした後に、OSの制御下でプログラムを実行するようにしてもよい。
 また、画像復号装置は、入力端子201、分離復号部202、復号部203、逆量子化・逆変換部204、画像再生部205、フレームメモリ206、インループフィルタ部207、出力端子208、及び、量子化マトリクス復号部209を有する。
 上記画像復号装置の構成における画像復号装置の構成とその動作を以下に説明する。なお、画像復号装置は、先に説明した画像符号化装置が生成したビットストリームをフレーム単位で入力する構成となっているが、1フレーム分の静止画像ビットストリームを入力する構成としても構わない。また、本第2の実施形態では説明を容易にするため、イントラ予測復号処理のみを説明するが、これに限定されずインター予測復号処理においても適用可能である。
 分離復号部202は、入力端子201を介して符号化ビットストリームを入力し、ビットストリームから復号処理に関する情報や係数に関する符号データに分離し、またビットストリームのヘッダ部に存在する符号データを復号する。本実施形態の分離復号部202は、符号化ビットストリームから量子化マトリクスの符号化データを分離し、その符号化データを量子化マトリクス復号部209に供給する。また、分離復号部202は、符号化ビットストリームから画像データの符号化データを分離し、復号部203に供給する。要するに、分離復号部202は、図1の統合符号化部111と逆の動作を行う。
 量子化マトリクス復号部209は、分離復号部202から供給された量子化マトリクスの符号化データを復号し、量子化マトリクス800~803を再生、保持する。
 復号部203は、分離復号部202から入力した画像データの符号データを復号し、量子化係数および予測情報を再生する。
 逆量子化・逆変換部204は、図1の逆量子化・逆変換部106と同様、再生された量子化マトリクス800~803のいずれかを用いて量子化係数に逆量子化を行って変換係数を得、さらに逆直交変換を行い、予測誤差データを再生する。
 画像再生部205は、入力された予測情報に基づいてフレームメモリ206を適宜参照して予測画像データを生成する。そして、画像再生部205は、この予測画像データに、逆量子化・逆変換部204で再生された予測誤差データを加算することで、画像データを再生し、フレームメモリ206に格納する。
 インループフィルタ部207は、図1のインループフィルタ部109と同様、フレームメモリ207に格納された再生画像データに対し、デブロッキングフィルタなどのインループフィルタ処理を行い、フィルタ処理された画像データをフレームメモリに再格納する。そして、出力端子208は、再生された画像データを外部装置(例えば表示装置)に出力する。
 次に、図2の画像復号装置における各構成要素の動作を更に詳しく説明する。
 本第2の実施形態では、第1の実施形態で生成されたビットストリームをフレーム単位で入力する構成となっているが、1フレーム分の静止画像ビットストリームを入力する構成としても構わない。また、本実施形態では説明を容易にするため、イントラ予測復号処理のみを説明するが、これに限定されずインター予測復号処理においても適用可能である。
 入力端子201を介して入力された1フレーム分のビットストリームは分離復号部202に供給される。分離復号部202は、ビットストリームから復号処理に関する情報や係数に関する符号データに分離し、ビットストリームのヘッダ部に存在する符号データを復号する。より具体的には、分離復号部202は、量子化マトリクスの符号データを再生する。本実施形態の分離復号部202は、まず、図6Aに示されるビットストリームのシーケンスヘッダから量子化マトリクスの符号データを抽出し、量子化マトリクス復号部209に供給する。分離復号部202は、続いて、ピクチャデータの基本ブロックのサブブロック単位の符号データを再生し、復号部203に供給する。
 量子化マトリクス復号部209は、まず入力された量子化マトリクスの符号データを復号し、複数の一次元の差分行列を再生する。本実施形態では、第1の実施形態と同様、図12A(又は図12B)に示される符号化テーブルを用いて復号するものとするが、符号化テーブルはこれに限定されず、第1の実施形態と同じものを用いる限りは他の符号化テーブルを用いても良い。さらに量子化マトリクス復号部209は、再生された複数の一次元の差分行列を逆走査し、複数の二次元の量子化マトリクスを再生する。ここでは第1の実施形態の量子化マトリクス符号化部113の走査とは逆の動作を行う。すなわち、本実施形態の量子化マトリクス復号部209は、図11A~11Dに示される差分行列1000~1003はそれぞれ、図10A~10Dに示される走査方法を用いて、図8A~8Dに示される量子化マトリクス800~803を再生し、保持する。
 本実施形態での具体的な量子化マトリクスの復号処理を、図8Bの16×8の量子化マトリクス801の復号処理を例にとって説明する。量子化マトリクス復号部209は、図11Bに示された差分行列1001を図10Bに示される走査方法を用いて、図8Bに示される量子化マトリクスを再生する。量子化マトリクス復号部209は、初期値である“8”と、図11Bの最初の差分値“-4”から、最初の要素である「4」を算出し、図10Bの最初の走査位置である0行0列の位置の要素の値“4”を決定し、図8Bの0行0列の部分に要素“4”を配置する。次に、量子化マトリクス復号部209は、図8Bの0行0列の要素“4”と、図11Bの二番目の差分値“1”から二番目の要素である“5”を算出し、図10Bの2番目の走査位置である0行1列の部分に“5”を配置する。同様にして、図8Bの0行1列の要素“5”と図10Bの三番目の差分値“4”から三番目の要素である“9”を算出し、図8Bの3番目の走査位置である1行0列および1行1列の部分に“9”を配置する。同様の処理を繰り返し、図8Bに示される量子化マトリクス801を再生することができる。
 こうして、量子化マトリクスの低周波成分に対応する複数の要素に個別の値を配置し、残りの要素には複数の要素単位で値を配置することで、符号量を削減しつつ、人間の視覚が敏感な低周波部分の量子化を細かく制御したビットストリームを復号することができる。
 図2に戻り、復号部203は、基本ブロック内の各サブブロックの符号データを復号し、量子化係数および予測情報を再生する。復号部203は、再生された量子化係数を逆量子化・逆変換部204に、再生された予測情報を画像再生部205にそれぞれ供給する。
 逆量子化・逆変換部204は、サブブロック単位に、入力した量子化係数に対し、量子化マトリクス復号部209で再生、保持している量子化マトリクス800~803の1つを用いて逆量子化を行い、直交変換係数を生成する。逆量子化・逆変換部204は更に、サブブロック単位に、生成した直交変換係数に対して逆直交変換を施して予測誤差データを再生し、画像再生部205に供給する。この際、復号対象のサブブロックの大きさに応じて用いられる量子化マトリクスが定まり、本実施形態では、図7Aに対応したサブブロック分割に対しては図8Dの量子化マトリクス803が用いられるものとする。同様にして、図7Cのサブブロック分割に対しては図8Cの量子化マトリクス802が用いられる。図7Dのサブブロック分割に対しては図8Bの量子化マトリクス801が用いられるものとする。また、図7Bの四分木のサブブロック分割には図8Aで示される量子化マトリクスが用いられるものとする。
 画像再生部205は、サブブロック単位に、復号部203から入力した予測情報に基づいて、フレームメモリ206を適宜参照し、予測画像データを再生する。そして、画像再生部205は、この予測画像データに、逆量子化・逆変換部204から供給された予測誤差データを加算することで、サブブロックの画像データを再生し、フレームメモリ206に格納する。このフレームメモリ206に格納された画像データは、他のサブブロックを復号する際の予測参照候補となる。
 インループフィルタ部207は、図1のインループフィルタ部109と同様、サブブロック単位に、フレームメモリ206から再生画像データを読み出し、デブロッキングフィルタなどのインループフィルタ処理を行う。そして、インループフィルタ部207は、フィルタ処理された画像は再びフレームメモリ206に格納する。
 フレームメモリ206に格納された再生画像は、最終的には端子208から外部に出力される。
 以下、第2の実施形態に係る画像復号装置における1フレームの復号処理の処理手順を図4のフローチャートを参照して説明する。なお、以下の説明における各工程は、その主体が制御部250による制御下にて、それぞれの処理を実行するものとする。
 まず、S401にて、分離復号部202は、ビットストリームから復号処理に関する情報や係数に関する符号データに分離して、ヘッダ部分の符号データを復号する。より具体的には、量子化マトリクスを符号データを再生する。
 S402にて、量子化マトリクス復号部209は、S401で再生された量子化マトリクスの符号データを復号し、図11A~11Dで示されたような一次元の差分行列1000~1003を再生する。さらに量子化マトリクス復号部209は、再生された一次元の差分行列1000~1003を逆走査し、二次元の量子化マトリクスを再生する。すなわち、量子化マトリクス復号部209は、図11A~11Dに示される差分行列1000~1003をそれぞれ、図10A~10Dに示される走査方法を用いて、図8A~8Dに示される量子化マトリクス800~803を再生し、保持する。なお、図10A~10Dに示される走査方法および量子化マトリクスの要素の変換係数に対する割り当ては復号側装置において既知のものとする。すなわち、変換係数のDC成分に対応する要素からの距離に従って、量子化マトリクスの各要素が変換係数に割り当てられる。
 すなわち、基本ブロック(実施形態では16×16のサイズ)の水平、垂直方向のいずれかの一方のみが同じサイズを有し、他方が異なる図8B,8Cに示すような量子化マトリクスの長辺方向については、直流成分に対応する要素の格納位置から予め設定された所定範囲(実施形態では距離“1” の範囲)では、量子化マトリクス復号部209は、各変換係数に対応する位置毎に要素1つの要素を割り当て、長辺方向における所定範囲を超える位置では、変換係数の予め設定された個数単位(実施形態では2個)に同じ要素を割り当てる。一方、図8B,8Cに示すような量子化マトリクスの短辺方向については、変換係数ごとに量子化マトリクスの要素を割り当てる。
 そして、水平、垂直方向のいずれも基本ブロックのサイズと同じサイズである量子化マトリクスについては、量子化マトリクス復号部209は、図8Dに示すように、直流成分に対応する要素の位置およびその位置に対して、右、下、右下に隣接する4つの要素(実施形態では距離“1” の範囲)を対応する変換係数ごとに個別に割り当てる。そして、それ以外の変換係数ついては、互いに隣接する4つの変換係数ごとに1つの同じ要素を割り当てる。そして、図8Aに示すような8x8のサイズの量子化マトリクス800の場合、変換係数ごとに要素を保持することになる。
 このように量子化マトリクスのサイズに従って、変換係数に対する要素の割り当てを適応的に変えているため、量子化マトリクスの符号量を抑制でき、且つ、画質劣化を抑制できるようになる。
 なお、量子化マトリクスの要素を復号する際の図10A~10Dに示すような走査順に基づいて「所定範囲」を定義してもよい。8x16あるいは16x8の変換係数のブロックサイズブロックサイズついては、図10B,10Cの走査が量子化マトリクスの要素の復号のために行われることになる。この際、量子化マトリクス復号部209は、変換係数のDC成分に対応する要素から1走査(距離“1”の範囲)して得られる要素を変換係数ごとに割り当てを行い、それ以降は2つの変換係数ごとに1つの要素を割り当てる。すなわち、図8B,8Cに示すような量子化マトリクス801,802が得られることになる。また、16x16の変換係数のブロックサイズの場合、量子化マトリクス復号部209は、変換係数のDC成分に対応する要素から3走査(距離“3”の範囲)して得られる要素を変換係数ごとに割り当てを行い、それ以降は4つの変換係数ごとに1つの要素を割り当てる。すなわち、図8Dに示すような量子化マトリクス803が得られることになる。また、8x8の変換係数のブロックサイズの場合、量子化マトリクス復号部209は、変換係数のDC成分に対応する要素から全ての走査によって得られる要素を変換係数ごとに割り当てる。すなわち、図8Aに示すような量子化マトリクスが得られることになる。このように、量子化マトリクスに対する走査に基づいて、量子化マトリクスのサイズついて適応的に変換係数に対する要素の割り当てを変えてもよい。この場合、要素間の位置関係を特別に考慮する必要がなくなる。
 S403にて、復号部203は、S401で分離された符号データを復号し、サブブロック毎の量子化係数および予測情報を再生する。
 S404にて、逆量子化・逆変換部204は、サブブロック毎に、量子化係数に対してS402で再生された量子化マトリクス800~803の1つを用いて、逆量子化を行って変換係数を得る。逆量子化・逆変換部204は、更に、変換係数に対して逆直交変換を行い、各サブブロックの予測誤差データを再生する。
 S405にて、画像再生部205は、S403で生成されたサブブロック毎の予測情報や予測画像データを再生する。そして、画像再生部205は、サブブロック毎に、再生された予測画像データに、S404で生成された予測誤差データを加算することで、画像データを再生する。
 S406にて、制御部250は、フレーム内の全ての基本ブロックの復号が終了したか否かの判定を行い、終了していればS407に進み、そうでなければ次の基本ブロックの復号を行うため、処理をS403に戻す。
 S407にて、インループフィルタ部207は、S405で再生された画像データに対し、インループフィルタ処理を行い、フィルタ処理された画像を生成し、処理を終了する。
 なお、動画像の2フレーム目以降を復号する場合には、S403乃至S407の処理を、符号化ビットストリームの最後まで、もしくは、不図示の操作部を介したユーザから停止指示があるまで繰り返すことになる。
 以上の構成と動作により、第1の実施形態で生成された、量子化マトリクスの初めの複数の要素のみが個別に符号化され、残りの要素は複数の要素単位で符号化された量子化マトリクスの符号量を削減したビットストリームを復号することができる。
 なお、本第2の実施形態では、図8A~8Dの4種類の量子化マトリクス800~803の全てをビットストリームから復号する構成としたが、その代わりに、ビットストリームから復号された1つの量子化マトリクスから他の量子化マトリクスを生成する構成としても構わない。例えば、16×8の量子化マトリクス自体をビットストリームから復号せずに、ビットストリームから復号された16×16の量子化マトリクスを用いて生成してもよい。この場合、図8Dの量子化マトリクスから一部の要素を間引き図8Bの量子化マトリクスを生成することとなる。同様に、図Dの量子化マトリクスから一部の要素を間引いて図8Cの量子化マトリクスを生成することも可能である。また、前述の「所定範囲」であるところの図8Bの0行1列の要素「5」や図8Cの1行0列の要素「5」の算出方法を定めておけば、図8Aの量子化マトリクス800を用いて図8Bや図8Cの量子化マトリクス801、802を生成することも可能である。この場合の算出方法は特に限定されず、0行0列の要素「4」に特定の差分値(本実施形態では+1)を加算して算出しても良いし、周辺の要素との補間を用いて算出しても良い。また、16×16の量子化マトリクスの要素とともに、図8Bの0行1列の要素「5」や図8Cの1行0列の要素「5」自体をビットストリームから復号してもよい。これにより、量子化マトリクスの符号量をさらに削減したビットストリームを復号することができる。
 さらには、量子化マトリクスごとに別の量子化マトリクスから生成するか、各要素を復号するかを選択する識別子をヘッダから復号する構成としても構わない。例えば、量子化マトリクスの各要素を他の量子化マトリクスから生成するか、個別に復号するかを示す情報を、図6Bに示されるビットストリームのヘッダ部分から量子化マトリクス符号化方法情報符号として復号する構成としても良い。これにより、サブブロックの大きさに応じた画質制御を優先するか、量子化マトリクスの符号量がより少なくするかが選択されたビットストリームを復号することができる。
 また本実施形態では、図7A~7Dのサブブロック分割・直交変換に対応する図8A~8Dの量子化マトリクス800~803が用いられる構成としたが、使用される直交変換サイズや量子化マトリクスはこれに限定されない。例えば、図7E,7Fのように1:2:1の比で分割する三分木分割がさらに用いられた場合、図9A,9Bの量子化マトリクス900,901をさらに用いる構成としても構わない。
 [第3の実施形態]
 図1、図2に示した各処理部はハードウェアでもって構成しているものとして上記実施形態では説明した。しかし、これらの図に示した各処理部で行う処理をコンピュータプログラムでもって構成しても良い。
 図5は、上記各実施形態に係る画像表示装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図である。
 CPU501は、RAM502やROM503に格納されているコンピュータプログラムやデータを用いてコンピュータ全体の制御を行うと共に、上記各実施形態に係る画像処理装置が行うものとして上述した各処理を実行する。即ち、CPU501は、図1、図2に示した各処理部として機能することになる。
 RAM502は、外部記憶装置506からロードされたコンピュータプログラムやデータ、I/F(インターフェース)507を介して外部から取得したデータなどを一時的に記憶するためのエリアを有する。更に、RAM502は、CPU501が各種の処理を実行する際に用いるワークエリアを有する。即ち、RAM502は、例えば、フレームメモリとして割り当てたり、その他の各種のエリアを適宜提供したりすることができる。
 ROM503には、本コンピュータの設定データや、ブートプログラムなどが格納されている。操作部504は、キーボードやマウスなどにより構成されており、本コンピュータのユーザが操作することで、各種の指示をCPU501に対して入力することができる。表示部505は、CPU501による処理結果を表示する。また表示部505は例えば液晶ディスプレイで構成される。
 外部記憶装置506は、ハードディスクドライブ装置に代表される、大容量情報記憶装置である。外部記憶装置506には、OS(オペレーティングシステム)や、図1、図2に示した各部の機能をCPU501に実現させるためのコンピュータプログラムが保存されている。更には、外部記憶装置506には、処理対象としての各画像データが保存されていても良い。
 外部記憶装置506に保存されているコンピュータプログラムやデータは、CPU501による制御に従って適宜、RAM502にロードされ、CPU501による処理対象となる。I/F507には、LANやインターネット等のネットワーク、投影装置や表示装置などの他の機器を接続することができ、本コンピュータはこのI/F507を介して様々な情報を取得したり、送出したりすることができる。508は上述の各部を繋ぐバスである。
 上記構成において、本装置の電源がONになると、CPU501はROM503のブートプログラムを実行して、外部記憶装置506に格納されたOSをRAM502にロードし、OSを起動する。この結果、本装置が、インターフェース507を介した通信が可能となり、情報処理装置として機能する。そして、OSの制御下で、CPU501は画像符号化に係るアプリケーション(図3に相当する)を外部記憶装置506からRAM502にロードして実行することで、CPU501が図1に示す各種処理部として機能することになり、本装置が画像符号化装置として機能することになる。一方、CPU501は画像復号に係るアプリケーション(図4に相当する)を外部記憶装置506からRAM502にロードして実行した場合、CPU501は図2に示す各種処理部として機能することになり、本装置が画像復号装置として機能することになる。
 (その他の実施例)
 本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
 本発明は上記実施の形態に制限されるものではなく、本発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、本発明の範囲を公にするために、以下の請求項を添付する。
 本願は、2018年12月17日提出の日本国特許出願特願2018-235910を基礎として優先権を主張するものであり、その記載内容の全てを、ここに援用する。

Claims (7)

  1.  画像データを符号化する画像符号化装置であって、
     符号化対象の画像データを予め設定されたサイズの基本ブロックに分割し、当該基本ブロックを、予め設定された複数のサブブロック分割パターンの何れかを用いて1以上のサブブロックに更に分割し、各サブブロック単位に周波数変換、量子化、エントロピー符号化を行う第1の符号化手段と、
     該第1の符号化手段で利用する前記サブブロック分割パターンに含まれるサブブロックのサイズに対応する複数の量子化マトリクスを保持する保持手段と、
     該保持手段で保持される複数の量子化マトリクスのうちの少なくとも1つを符号化する第2の符号化手段と、
     該第2の符号化手段で生成された符号化データと、第1の符号化手段で得た符号化データとを統合する統合手段とを有し、
     前記保持手段は、
       前記基本ブロックの水平、垂直方向のいずれかのサイズと同じサイズを有する量子化マトリクスについては、直流成分に対応する要素の格納位置から予め設定された所定範囲の位置の要素を独立した値として保持し、前記所定範囲を超える位置では予め設定された個数単位に同じ要素を保持する
     ことを特徴とする画像符号化装置。
  2.  前記保持手段は、
       水平、垂直方向のいずれか一方が前記基本ブロックのサイズと同じであり、他方が前記基本ブロックのサイズより小さい量子化マトリクスについては、前記直流成分の格納位置を含み、前記基本ブロックと同じサイズとなる方向に隣接する位置の2つの要素を個別に保持し、それ以外の前記同じサイズとなる方向に隣接する2つについて同じ要素を保持し、
       水平、垂直方向のいずれも前記基本ブロックのサイズと同じである量子化マトリクスについては、前記直流成分の格納位置を含み、水平、垂直方向に隣接する4つの要素を個別に保持し、それ以外の前記水平、垂直に隣接する4つについて同じ要素を保持する
     ことを特徴とする請求項1に記載の画像符号化装置。
  3.  前記保持手段は、更に、前記基本ブロックの水平、垂直方向とも1/2のサイズの量子化マトリクスを保持し、当該量子化マトリクスについては、個々の位置毎に要素を保持することを特徴とする請求項2に記載の画像符号化装置。
  4.  画像データを符号化する画像符号化装置の制御方法であって、
     符号化対象の画像データを予め設定されたサイズの基本ブロックに分割し、当該基本ブロックを、予め設定された複数のサブブロック分割パターンの何れかを用いて1以上のサブブロックに更に分割し、各サブブロック単位に周波数変換、量子化、エントロピー符号化を行う第1の符号化工程と、
     該第1の画像符号化工程で利用する前記サブブロック分割パターンに含まれるサブブロックのサイズに対応する複数の量子化マトリクスを保持する保持工程と、
     該保持工程で保持される複数の量子化マトリクスのうち少なくとも1つを符号化する第2の符号化工程と、
     該第2の符号化工程で生成された符号化データと、第1の符号化工程で得た符号化データとを統合する統合工程とを有し、
     前記保持工程は、
       前記基本ブロックの水平、垂直方向のいずれかのサイズと同じサイズを有する量子化マトリクスについては、直流成分の要素の格納位置から予め設定された所定範囲の位置の要素を独立した値として保持し、前記所定範囲を超える位置では予め設定された個数単位に同じ要素を保持する
     ことを特徴とする画像符号化装置の制御方法。
  5.  請求項1乃至3のいずれか1項に記載の画像符号化装置で生成された符号化データを復号する画像復号装置であって、
     符号化データから、量子化マトリクスの符号化データと、画像データの符号化データとを分離する分離手段と、
     該分離手段で分離された量子化マトリクスの符号化データを復号し、各サブブロックのサイズに対応する複数の量子化マトリクスを生成し、保持する第1の復号手段と、
     前記分離手段で分離された画像データの符号化データを、前記第1の復号手段より得た各サブブロックの量子化マトリクスを用いて復号し、画像データを再生する第2の復号手段と
     を有することを特徴とする画像復号装置。
  6.  請求項4に記載の制御方法で生成された符号化データを復号する画像復号装置の制御方法であって、
     符号化データから、量子化マトリクスの符号化データと、画像データの符号化データとを分離する分離工程と、
     該分離工程で分離された量子化マトリクスの符号化データを復号し、各サブブロックのサイズに対応する複数の量子化マトリクスを生成し、保持する第1の復号工程と、
     前記分離工程で分離された画像データの符号化データを、前記第1の復号工程より得た各サブブロックの量子化マトリクスを用いて復号し、画像データを再生する第2の復号工程と
     を有することを特徴とする画像復号装置の制御方法。
  7.  コンピュータが読み込み実行することで、前記コンピュータに、請求項4又は6に記載の制御方法の各工程を実行させるためのプログラム。
PCT/JP2019/044754 2018-12-17 2019-11-14 画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム WO2020129489A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
CN201980083874.9A CN113228652B (zh) 2018-12-17 2019-11-14 图像编码装置和方法、图像解码装置和方法以及存储介质
BR112021010308-2A BR112021010308A2 (pt) 2018-12-17 2019-11-14 Dispositivo de codificação de imagem, dispositivo de decodificação de imagem, e método e programa para controlar os mesmos
KR1020217021605A KR20210096279A (ko) 2018-12-17 2019-11-14 화상 부호화 장치 및 화상 복호 장치 및 그것들의 제어 방법 및 프로그램
EP19897736.5A EP3902254A4 (en) 2018-12-17 2019-11-14 IMAGE ENCODING DEVICE, IMAGE DECODING DEVICE, AND METHOD AND PROGRAM FOR CONTROLLING THEM
US17/346,849 US20210306633A1 (en) 2018-12-17 2021-06-14 Image encoding apparatus, image decoding apparatus, control methods and non-transitory computer-readable storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018235910A JP2020098984A (ja) 2018-12-17 2018-12-17 画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム
JP2018-235910 2018-12-17

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/346,849 Continuation US20210306633A1 (en) 2018-12-17 2021-06-14 Image encoding apparatus, image decoding apparatus, control methods and non-transitory computer-readable storage medium

Publications (1)

Publication Number Publication Date
WO2020129489A1 true WO2020129489A1 (ja) 2020-06-25

Family

ID=71101173

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/044754 WO2020129489A1 (ja) 2018-12-17 2019-11-14 画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム

Country Status (8)

Country Link
US (1) US20210306633A1 (ja)
EP (1) EP3902254A4 (ja)
JP (2) JP2020098984A (ja)
KR (1) KR20210096279A (ja)
CN (1) CN113228652B (ja)
BR (1) BR112021010308A2 (ja)
TW (3) TW202312733A (ja)
WO (1) WO2020129489A1 (ja)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013038758A (ja) 2011-07-13 2013-02-21 Canon Inc 画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラム
JP2014535250A (ja) * 2011-11-07 2014-12-25 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオコード化のための量子化行列の信号伝達
WO2016044842A1 (en) * 2014-09-19 2016-03-24 Futurewei Technologies, Inc. Method and apparatus for non-uniform mapping for quantization matrix coefficients between different sizes of matrices

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008044511A1 (en) * 2006-10-12 2008-04-17 Kabushiki Kaisha Toshiba Method and apparatus for encoding image
JP2011029956A (ja) * 2009-07-27 2011-02-10 Sony Corp 画像符号化装置および画像符号化方法
JP5741076B2 (ja) * 2010-12-09 2015-07-01 ソニー株式会社 画像処理装置及び画像処理方法
US9641840B2 (en) * 2011-05-20 2017-05-02 Sony Corporation Processing device and image processing method for encoding and decoding image
JP2013146038A (ja) * 2011-12-13 2013-07-25 Canon Inc 画像量子化装置、画像量子化方法及びプログラム、画像逆量子化装置、画像逆量子化方法及びプログラム
WO2013094385A1 (ja) * 2011-12-19 2013-06-27 ソニー株式会社 画像処理装置および方法
EP3432582B1 (en) * 2012-02-29 2020-04-01 Sony Corporation Image processing device and method
CN111147852B (zh) * 2012-04-16 2022-05-31 韩国电子通信研究院 图像解码方法和图像编码方法
CN104919798B (zh) * 2012-04-16 2018-12-14 华为技术有限公司 量化矩阵编码的方法和装置
GB2501535A (en) * 2012-04-26 2013-10-30 Sony Corp Chrominance Processing in High Efficiency Video Codecs
JPWO2016103542A1 (ja) * 2014-12-26 2017-10-19 パナソニックIpマネジメント株式会社 符号化方法、復号方法、符号化装置および復号装置
CN104796609B (zh) * 2015-04-17 2018-01-05 南京理工大学 基于最优哈达玛编码的大视场高分辨率显微成像方法
JP6566865B2 (ja) * 2015-12-28 2019-08-28 Kddi株式会社 動画像復号装置、動画像復号方法、動画像符号化装置、動画像符号化方法及びコンピュータ可読記録媒体
CN106612439A (zh) * 2016-02-04 2017-05-03 四川用联信息技术有限公司 一种自适应快速分形图像压缩方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013038758A (ja) 2011-07-13 2013-02-21 Canon Inc 画像符号化装置、画像符号化方法及びプログラム、画像復号装置、画像復号方法及びプログラム
JP2014535250A (ja) * 2011-11-07 2014-12-25 クゥアルコム・インコーポレイテッドQualcomm Incorporated ビデオコード化のための量子化行列の信号伝達
WO2016044842A1 (en) * 2014-09-19 2016-03-24 Futurewei Technologies, Inc. Method and apparatus for non-uniform mapping for quantization matrix coefficients between different sizes of matrices

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3902254A4

Also Published As

Publication number Publication date
TWI788268B (zh) 2022-12-21
TW202312733A (zh) 2023-03-16
CN113228652B (zh) 2024-04-12
TW202029759A (zh) 2020-08-01
BR112021010308A2 (pt) 2021-08-24
US20210306633A1 (en) 2021-09-30
KR20210096279A (ko) 2021-08-04
JP2020098984A (ja) 2020-06-25
TW202239207A (zh) 2022-10-01
EP3902254A1 (en) 2021-10-27
EP3902254A4 (en) 2022-08-31
CN113228652A (zh) 2021-08-06
JP2024023793A (ja) 2024-02-21
TWI770441B (zh) 2022-07-11

Similar Documents

Publication Publication Date Title
JP2023105156A (ja) 画像符号化装置、画像符号化方法、及びプログラム
WO2020246125A1 (ja) 画像符号化装置及び画像復号装置及び方法及びプログラム
WO2020003740A1 (ja) 画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム
WO2020129489A1 (ja) 画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム
WO2020184227A1 (ja) 画像復号装置、画像復号方法、及びプログラム
WO2020184223A1 (ja) 画像復号装置、画像復号方法、及びプログラム
WO2020129407A1 (ja) 画像符号化装置及び画像復号装置及びそれらの制御方法及びプログラム
WO2023181546A1 (ja) 画像符号化装置、画像復号装置、画像符号化方法、および画像復号方法
WO2021054012A1 (ja) 画像符号化装置、画像復号装置及びそれらの制御方法及びプログラム
WO2020183859A1 (ja) 画像符号化装置、画像復号装置、画像符号化方法、画像復号方法、及びプログラム
WO2020129498A1 (ja) 画像符号化装置、画像符号化方法、画像復号装置、画像復号方法
WO2020255688A1 (ja) 画像符号化装置及び画像復号装置及び方法及びプログラム
JP7090490B2 (ja) 画像符号化装置、画像復号装置、画像符号化方法、画像復号方法
JP2021150723A (ja) 画像符号化装置、画像符号化方法、及びプログラム、画像復号装置、画像復号方法、及びプログラム

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

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 122022022665

Country of ref document: BR

REG Reference to national code

Ref country code: BR

Ref legal event code: B01A

Ref document number: 112021010308

Country of ref document: BR

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20217021605

Country of ref document: KR

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2019897736

Country of ref document: EP

Effective date: 20210719

ENP Entry into the national phase

Ref document number: 112021010308

Country of ref document: BR

Kind code of ref document: A2

Effective date: 20210527