WO2020255820A1 - Image encoding device, image decoding device, method, and computer program - Google Patents

Image encoding device, image decoding device, method, and computer program Download PDF

Info

Publication number
WO2020255820A1
WO2020255820A1 PCT/JP2020/022818 JP2020022818W WO2020255820A1 WO 2020255820 A1 WO2020255820 A1 WO 2020255820A1 JP 2020022818 W JP2020022818 W JP 2020022818W WO 2020255820 A1 WO2020255820 A1 WO 2020255820A1
Authority
WO
WIPO (PCT)
Prior art keywords
subblock
pcm
image
coding
prediction
Prior art date
Application number
PCT/JP2020/022818
Other languages
French (fr)
Japanese (ja)
Inventor
真悟 志摩
Original Assignee
キヤノン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by キヤノン株式会社 filed Critical キヤノン株式会社
Publication of WO2020255820A1 publication Critical patent/WO2020255820A1/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/103Selection of coding mode or of prediction mode
    • 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/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • 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/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/46Embedding additional information in the video signal during the compression process

Definitions

  • the present invention relates to an image coding device, an image decoding device, a method, and a computer 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) has been adopted.
  • 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 that serve as units for prediction and conversion.
  • PCM a technique relating to a coding method using this PCM.
  • VVC Very Video Coding
  • the size of the subblock that is the standard for PCM coding in HEVC is assumed to be a square subblock, and is used as the standard for PCM coding when the length of one side of the subblock satisfies a specific condition. ..
  • VVC rectangular sub-block division is being considered. Therefore, there may be a case where the vertical length and the horizontal length of the divided subblocks are extremely different. In that case, both the vertical and horizontal lengths of the subblock must satisfy specific conditions, and for an elongated rectangular subblock whose vertical and horizontal lengths are extremely different, even if the pixels of the rectangular subblock are met. There are cases where even a large number does not serve as a reference for PCM coding.
  • the present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a technique capable of appropriately controlling PCM coding regardless of whether the shape of the subblock is square or rectangular.
  • the image coding apparatus of the present invention has the following configuration. That is, An image coding device that encodes an image.
  • a dividing means for dividing an image to be encoded into a plurality of basic blocks and further dividing the basic block into a plurality of sub-blocks.
  • a prediction means for obtaining a prediction error, which is the difference between the image of the subblock of interest obtained by the division means and the prediction image, and
  • a predictive coding means that encodes the prediction error of the subblock of interest
  • a PCM coding means for PCM coding the pixel value of the subblock of interest It has a control means for controlling whether the predictive coding means or the PCM coding means is used to generate the coded data of the subblock of interest.
  • control means When the size specified by the number of pixels included in the attention subblock is within a preset range, control is performed so as to use either the predictive coding means or the PCM coding means. When the size specified by the number of pixels included in the attention subblock is out of the range, it is characterized in that it is controlled to use the predictive coding means.
  • PCM coding can be appropriately controlled regardless of whether the shape of the subblock is square or rectangular.
  • the block block diagram of the image coding apparatus of this embodiment The block block diagram of the image decoding apparatus of this embodiment.
  • the flowchart which shows the coding process in the image coding apparatus of this embodiment.
  • the flowchart which shows the decoding process in the image decoding apparatus of this embodiment.
  • the block diagram which shows the hardware configuration example of the computer applicable to the image coding apparatus and decoding apparatus of this embodiment.
  • the figure which shows the example of the sub-block division used in this embodiment The figure which shows the example of the sub-block division used in this embodiment.
  • the figure which shows the example of the sub-block division used in this embodiment The figure which shows the example of the sub-block division used in this embodiment.
  • the figure which shows the example of the sub-block division used in this embodiment The figure which shows the example of the sub-block division used in this embodiment.
  • the figure which shows the index of the sub-block based on the number of pixels used in this embodiment The figure which shows the index of the sub-block based on the number of pixels used in this embodiment.
  • the figure which shows the index of the sub-block based on the number of pixels used in this embodiment The figure which shows the index of the sub-block based on the number of pixels used in this embodiment.
  • FIG. 1 is a block composition of the image coding apparatus of this embodiment.
  • the image coding device has a control unit 150 that controls the entire device.
  • the control unit 150 includes a CPU, a ROM for storing a program executed by the CPU, and a RAM used as a work area of the CPU.
  • the image coding device includes an input terminal 101, a block division unit 102, a generation unit 103, a prediction unit 104, a conversion / quantization unit 105, an inverse quantization / inverse conversion unit 106, an image reproduction unit 107, and a frame memory 108. It has an in-loop filter unit 109, a coding unit 110, an integrated coding unit 111, and an output terminal 112.
  • the input terminal 101 inputs the image data to be encoded generated by the image data source in frame units.
  • the image data generation source may be of any type, such as an image pickup device, a file server that stores image data to be encoded, a storage medium, and the like.
  • the output terminal 112 outputs the coded data to the output destination device, and the output destination device may be of any type such as a storage medium or a file server.
  • the block division unit 102 divides the input image into a plurality of basic blocks of a predetermined size, and outputs the image of the basic block unit to the prediction unit 104 in the subsequent stage.
  • the generation unit 103 generates and outputs information or the like that serves as a reference for PCM coding.
  • the reference information for PCM coding indicates an index generated based on the number of pixels of the subblock (hereinafter referred to as a PCM control index). Details of the PCM control index will be described later.
  • the prediction unit 104 further divides the image of the basic block from the block division unit 102 into sub-blocks, performs intra-frame prediction for intra-frame prediction, inter-frame prediction for inter-frame prediction, and the like, and obtains prediction image data. Generate. Further, the prediction unit 104 calculates and outputs a prediction error from the sub-block image data and the prediction image data. Further, the prediction unit 104 also outputs information necessary for prediction, for example, information such as sub-block division, prediction mode, motion vector, and the like together with the prediction error. Hereinafter, the information necessary for this prediction is referred to as prediction information.
  • PCM coding prevents an increase in the amount of data by encoding the pixel values without compressing them when it is determined that the amount of data will increase due to the subsequent coding process due to a large prediction error. Can be done.
  • the prediction unit 104 predicts a flag for identifying that the PCM coding has been performed (hereinafter referred to as a PCM flag) and a pixel value encoded in the subsequent stage. Output as information.
  • the conversion / quantization unit 105 performs orthogonal conversion of the prediction error in sub-block units, further performs quantization, and obtains a residual coefficient. However, when PCM coded, the conversion / quantization unit 105 does not perform orthogonal conversion and quantization processing.
  • the inverse quantization / inverse conversion unit 106 inversely quantizes the residual coefficient output from the conversion / quantization unit 105 to reproduce the conversion coefficient, and further performs inverse orthogonal conversion to reproduce the prediction error.
  • the inverse quantization / inverse conversion unit 106 does not perform the inverse quantization and the inverse orthogonal conversion processing.
  • the image reproduction unit 107 generates predicted image data by appropriately referring to the frame memory 108 based on the prediction information output from the prediction unit 104. Then, the image reproduction unit 107 generates the reproduction image data from the predicted image data and the input prediction error, and stores the reproduced image. However, in the case of PCM coding, the image reproduction unit 107 uses the pixel value input as the prediction information as the reproduction image data.
  • the in-loop filter unit 109 performs in-loop filter processing such as a deblocking filter and a sample adaptive offset on the reproduced image data stored in the frame memory 108, and re-stores the filtered image data in the frame memory 108. ..
  • the coding unit 110 inputs the residual coefficient from the conversion / quantization unit 105 and the prediction information from the prediction unit 104 to perform coding, and generates code data.
  • the integrated coding unit 111 generates header code data encoded in the header part of the sequence or picture, which is necessary for decoding the bit stream on the decoding side. Further, the integrated coding unit 111 forms a bit stream in which the code data output from the coding unit 110 is integrated with the header code data, and outputs the bit stream via the output terminal 112.
  • moving image data is input in frame units. However, it may be configured to input still image data for one frame.
  • the generation unit 103 Prior to encoding the image, the generation unit 103 generates a PCM control index, which is information that serves as a reference for PCM coding.
  • the PCM control index in the present embodiment is composed of two, a maximum PCM control index indicating the minimum subblock size for PCM coding and a minimum PCM control index indicating the maximum subblock size for PCM coding. These indexes are determined according to the number of pixels constituting the subblock. A description of how these indexes are used will be described later.
  • the method of generating the PCM control index is not particularly limited, but the user may input the PCM control index, the PCM control index may be calculated from the characteristics of the input image, or the PCM specified in advance as the initial value. A control index may be used.
  • the prediction unit 104 may make a determination based on the implementation limitation when determining whether or not to perform PCM coding.
  • the generated PCM control index is input to the prediction unit 104 and the integrated coding unit 111.
  • the image data is encoded.
  • Image data is supplied to the input terminal 101 from the outside in frame units.
  • the block division unit 102 divides the image data for one frame input via the input terminal 101 into a plurality of basic blocks, and outputs the image data for each basic block to the prediction unit 104.
  • the prediction unit 104 executes prediction processing on the image data input from the block division unit 102. Specifically, the prediction unit 104 first determines a subblock division method for dividing a basic block into finer subblocks.
  • FIGS. 7A to 7F An example of a basic block division method is shown with reference to FIGS. 7A to 7F.
  • the thick line frame of blocks 700 to 705 represents a basic block.
  • the size of the basic block in the embodiment is 32 ⁇ 32 pixel size.
  • Each rectangle in the thick line frame represents a subblock.
  • FIG. 7A is an example in which the basic block 700 is a subblock.
  • FIG. 7B shows an example of dividing the basic block 701 into four square sub-blocks, and the size of one sub-block is 16 ⁇ 16 pixels.
  • 7C to 7F show an example of rectangular subblock division.
  • FIG. 7C shows that the basic block 702 is divided into two sub-blocks (longitudinal in the vertical direction) having a size of 16 ⁇ 32 pixels.
  • FIG. 7C shows that the basic block 702 is divided into two sub-blocks (longitudinal in the vertical direction) having a size of 16 ⁇ 32 pixels.
  • the basic block 703 is divided into two subblocks (horizontally longitudinal) having a size of 32 ⁇ 16 pixels.
  • the basic blocks 704 and 705 of FIGS. 7E and 7F although the division directions are different, they are divided into three rectangular subblocks at a ratio of 1: 2: 1. In this way, not only squares but also rectangular sub-blocks are used for encoding processing.
  • the coding process is performed using not only squares but also rectangular sub-blocks. Further, the size of the subblock may be further smaller than that shown in the figure by repeating such division.
  • the information regarding the division type of such a basic block is encoded as the division information. Further, in order to obtain a hierarchical structure of sub-blocks as shown in the left side figures of FIGS. 9A to 9D described later, the division type information is layered and encoded.
  • the prediction unit 104 determines the prediction mode for each subblock to be processed. Specifically, the prediction unit 104 uses sub-prediction such as intra-prediction using pixels encoded in the same frame as the frame including each sub-block to be processed, or inter-prediction using pixels in different encoded frames. Determine the prediction mode for each block. Then, the prediction unit 104 generates prediction image data from the determined prediction mode and the encoded pixels, further generates a prediction error from the input image data and the prediction image data, and causes the conversion / quantization unit 105 to generate the prediction error. Output. Further, the prediction unit 104 outputs information such as subblock division and prediction mode as prediction information to the coding unit 110 and the image reproduction unit 107.
  • sub-prediction such as intra-prediction using pixels encoded in the same frame as the frame including each sub-block to be processed, or inter-prediction using pixels in different encoded frames. Determine the prediction mode for each block. Then, the prediction unit 104 generates prediction image data from the determined prediction mode and the encoded pixels, further generate
  • the prediction unit 104 may also select PCM coding if the index based on the number of pixels of the subblock satisfies the condition of the PCM control index input from the generation unit 103. In that case, the prediction unit 104 outputs the PCM flag as prediction information, and when PCM coding is selected in the subblock, further outputs the pixel value as prediction information. On the other hand, when the prediction unit 104 does not select PCM coding in the subblock, the prediction unit 104 outputs other prediction information and prediction error following the PCM flag.
  • Dn (n is a positive integer) described in each subblock indicates an index determined based on the number of pixels of the subblock.
  • D0, D1 and D2 indicate that the index is “0”, the index “1” and the index “2”, respectively.
  • the index is calculated based on the number of pixels after division.
  • the index for the basic block is "0", and when the number of pixels in the subblock is half the number of pixels in the basic block, the index based on the number of pixels is "1".
  • the index based on the number of pixels is "2".
  • FIG. 8B the quadtree division of the basic block is shown.
  • the index of each subblock in FIG. 8B is “2” (D2).
  • each index is “1” (D1).
  • FIGS. 8E and 8F are divided into three parts with respect to the basic block.
  • the index is "1" (D1).
  • the index is "2" (D2).
  • the sub-blocks divided with respect to the basic block are assigned indexes according to the number of pixels after the division.
  • FIGS. 9A to 9D how the subblocks that can be PCM encoded are determined according to the minimum PCM control index, the maximum PCM control index, and the index of the subblock to be processed based on the number of pixels. Will be described using.
  • the outermost thick square is shown as a basic block.
  • the left side shows the division of sub-blocks
  • the right side shows whether or not PCM coding is possible in each sub-block.
  • D0 and Dn (n is a positive integer) in each block in the figure on the left side indicate an index corresponding to the number of pixels of each subblock. For example, D0 indicates an index 0 and D4 indicates an index 4. It is shown and its meaning is as already explained.
  • FIG. 9B shows the case where the maximum PCM control index is “2”. Since it is the index D2 of the subblock located at the lower right of the basic block, this subblock can be PCM encoded. Therefore, in the case of FIG. 9B, the subblock located at the lower right of the basic block is "possible", and the other subblocks are "impossible".
  • FIG. 9C shows the case where the maximum PCM control index is “3”. Therefore, the subblock having D0 to D3 as an index is "possible” for PCM coding, and the subblock having an index of D4 or higher is "impossible” for PCM coding.
  • FIG. 9D shows the case where the maximum PCM control index is “4”. Therefore, the subblocks having D0 to D4 as indexes are "possible” for PCM coding, and the subblocks with indexes of D5 and above are “impossible” for PCM coding. In the case of the illustration, since all the sub-blocks are D4 or less, all the sub-blocks are "possible” for PCM coding.
  • the conversion / quantization unit 105 performs orthogonal conversion on the image data (pixel value) of the subblock that has been predicted by the prediction unit 104, further performs quantization, and generates a residual coefficient. Then, the conversion / quantization unit 105 outputs the generated residual coefficient to the inverse quantization / inverse conversion unit 106 and the coding unit 110. However, the conversion / quantization unit 105 does not perform this orthogonal conversion and quantization processing when the subblock of interest is PCM-encoded.
  • the inverse quantization / inverse conversion unit 106 inversely quantizes the input residual coefficient and reproduces the conversion coefficient.
  • the inverse quantization / inverse conversion unit 106 further performs inverse orthogonal conversion of the reproduced conversion coefficient to reproduce the prediction error, and outputs the prediction error to the image reproduction unit 107.
  • the inverse quantization / inverse conversion unit 106 does not perform the inverse quantization and inverse orthogonal transformation processing.
  • the image reproduction unit 107 appropriately refers to the frame memory 108 based on the prediction information input from the prediction unit 104, and reproduces the predicted image. Then, the image reproduction unit 107 reproduces the image data from the reproduced predicted image and the prediction error input from the inverse quantization / inverse conversion unit 106, and stores the image data in the frame memory 108.
  • the image reproduction unit 107 reproduces the image data using the pixel values input as the prediction information from the prediction unit 104 and stores the image data in the frame memory 108.
  • the in-loop filter unit 109 reads the reproduced image data from the frame memory 108 and performs in-loop filter processing such as a deblocking filter.
  • the in-loop filter unit 109 has a prediction mode of the prediction unit 104, a value of a quantization parameter used in the conversion / quantization unit 105, and a non-zero value in the processing subblock after quantization (hereinafter, a significance coefficient). ) Exists, or the in-loop filter processing is performed based on the subblock division information.
  • the in-loop filter unit 109 re-stores the filtered image data in the frame memory 108.
  • the in-loop filter unit 109 can skip this in-loop filter processing for the PCM-encoded sub-block. As a result, the amount of calculation for the processing of the in-loop filter can be reduced.
  • the coding unit 110 entropy-encodes the residual coefficient generated by the conversion / quantization unit 105 and the prediction information input from the prediction unit 104 in sub-block units to generate code data.
  • the encoding unit 110 sets the PCM flag. Encode.
  • "1" is entropy-encoded as the PCM flag input as prediction information, and the pixel value is further included in the code data.
  • the coding unit 110 entropy-encodes "0" as the PCM flag, and subsequently entropy-codes other prediction information and the residual coefficient. And generate code data.
  • the encoding unit 110 sets the PCM flag.
  • the coding of is omitted. That is, the coding unit 110 entropy-encodes the prediction information and the residual coefficient without encoding the PCM flag, and generates code data.
  • the method of entropy coding is not specified, but Golomb coding, arithmetic coding, Huffman coding, etc. can be used.
  • the coding unit 110 outputs the generated code data to the integrated coding unit 111.
  • the integrated coding unit 111 encodes information related to the PCM control index.
  • two PCM control indexes, a maximum PCM control index and a minimum index are used, so both are encoded.
  • the coding method is not particularly limited, but Golomb coding, arithmetic coding, Huffman coding, or the like can be used. It is also possible to encode one index and its difference instead of encoding both indexes. For example, when the minimum PCM control index is 2 and the maximum PCM control index is 4, instead of encoding 2 and 4, respectively, the minimum PCM control index “2” and the difference “2” are encoded. , The amount of data to be encoded can also be reduced. Further, these codes, code data input from the coding unit 110, and the like are multiplexed to form a bit stream. Eventually, the bitstream is output from terminal 112 to the outside.
  • FIG. 6A shows an example of a bitstream containing information about the encoded PCM control index.
  • Information about the PCM control index is included in any of the headers such as sequences and pictures.
  • the information regarding the PCM control index is included in the header portion of the picture.
  • the encoded position is not limited to this, and may be included in the header portion of the sequence as shown in FIG. 6B.
  • FIG. 3 is a flowchart showing a coding process in the image coding apparatus according to the present embodiment.
  • control unit 100 controls the block division unit 102 to divide the input attention frame into basic block units.
  • control unit 100 controls the generation unit 103 to determine the PCM control index indicating the unit to be PCM encoded.
  • the generation unit 103 supplies the determined PCM control index information to the integrated coding unit 111 in order to encode it.
  • control unit 100 controls the prediction unit 104 to generate prediction error and prediction information for the image data of the basic block unit generated in S301.
  • prediction process of the prediction unit 104 will be described in more detail.
  • the prediction unit 104 obtains the prediction error of the attention subblock and the prediction image data in pixel units, and outputs the prediction error and the prediction information. At this time, the prediction unit 104 does not include the PCM flag in the prediction information. This is because the subblock of interest is not PCM encoded and is guaranteed to be entropy encoded through prediction error, orthogonal transformation, and quantization.
  • the prediction unit 104 obtains the prediction error between the subblock of interest and the predicted image data, and obtains the prediction error.
  • the prediction error E may be obtained by squaring as in the following equation (2) instead of obtaining the absolute value in the above equation (1).
  • E ⁇ e (x) 2 / n ... (2)
  • the prediction unit 104 determines that the subblock of interest is to be PCM encoded.
  • the prediction unit 104 notifies the conversion / quantization unit 105 of the determination, and outputs prediction information including the PCM flag having a value of “1” to the coding unit 110 and the image reproduction unit 107.
  • This prediction information includes the pixel value of the subblock of interest.
  • the prediction unit 104 outputs the prediction error of the subblock of interest to the conversion / quantization unit 105, and outputs the prediction information including the PCM flag of the value “0” to the coding unit 110 and the image reproduction unit 107.
  • control unit 100 controls the conversion / quantization unit 105 to perform orthogonal conversion on the prediction error calculated in S303 to generate a conversion coefficient, and further perform quantization on the conversion coefficient. Generate a residual coefficient.
  • the prediction unit 104 notifies that the subblock of interest is PCM-encoded, the conversion / quantization unit 105 does not perform the orthogonal conversion and the quantization process.
  • control unit 100 controls the inverse quantization / inverse conversion unit 106, inversely quantizes and inversely orthogonally transforms the residual coefficient of the subblock of interest generated in S304, and reproduces the prediction error.
  • the inverse quantization / inverse conversion unit 106 does not perform this inverse quantization / inverse orthogonal conversion processing.
  • control unit 100 controls the image reproduction unit 107 to reproduce the image of the subblock of interest. Specifically, the image reproduction unit 107 reproduces image data from the prediction information generated in S303 and the prediction error generated in S305, and stores the image data in the frame memory 108. However, when the subblock of interest is PCM encoded, the image data is constructed with the pixels included in the prediction information from the prediction unit 104.
  • control unit 100 controls the coding unit 110 to encode the subblock of interest.
  • the coding unit 110 encodes the prediction information generated in S303 and the residual coefficient generated in S304 based on the size of the subblock of interest and the PCM control index information, and generates code data. ..
  • the coding unit 110 first encodes the PCM flag supplied from the prediction unit 104. Then, when the PCM flag is "1", the coding unit 110 PCM-encodes the attention subblock, and therefore includes the pixel value of the attention subblock in the code data. On the other hand, when the PCM flag of the attention subblock is "0", it means that the attention subblock is not PCM encoded. Therefore, the coding unit 110 entropy encodes the prediction information and the residual coefficient for the subblock of interest. A bitstream is generated including other code data.
  • control unit 100 determines whether or not the coding of all the basic blocks and all the sub-blocks in the frame of interest has been completed, and if it has finished, the process is set to S309, and if it has not finished, the process is next. The process is returned to S303 in order to encode the basic block or the next subblock of.
  • control unit 100 controls the in-loop filter unit 109, performs in-loop filter processing on the image data reproduced in S306, generates a filtered image, and ends the processing.
  • the in-loop filter processing may be skipped for the pixels belonging to the PCM-encoded subblock.
  • the configuration and operation related to the coding process of the image coding device in the embodiment have been described above.
  • the PCM coding process can be appropriately performed according to the number of pixels of the subblock. Can be.
  • the maximum PCM control index and the minimum PCM control index are used as the PCM control index, but the configuration is not limited to this, and only one may be used.
  • the maximum PCM control index upper limit
  • only the minimum size of the PCM-encoded subblock is shown.
  • only the minimum PCM index lower limit
  • only the maximum size of the subblock to be PCM encoded is shown. This is particularly effective when the maximum or minimum size for PCM encoding is obvious due to implementation restrictions, and the amount of data included in the header portion can be reduced.
  • FIG. 3 is an example of coding a one-frame image
  • the processing of S302 may be omitted from the second frame onward. ..
  • FIG. 2 is a block configuration diagram of an image decoding device that predictively decodes or PCM decodes an image in sub-block units from the coded image data generated by the image coding device.
  • the configuration and its operation related to the decoding process will be described with reference to the figure.
  • the image decoding device has a control unit 200 that controls the entire device.
  • the control unit 200 has a CPU, a ROM for storing programs executed by the CPU, and a RAM used as a work area of the CPU.
  • the image decoding device has 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, and an output terminal 208.
  • the input terminal 201 inputs a coded bit stream
  • the input source is, for example, a storage medium storing the coded stream, but it may be input from a network, and the type thereof does not matter.
  • the separation / decoding unit 202 separates the bitstream into information related to the decoding process and code data related to the residual coefficient, and decodes the code data existing in the header part of the bitstream.
  • the PCM control index information is decoded and set in the decoding unit 203 in the subsequent stage.
  • the separation / decoding unit 202 also performs the reverse operation of the integrated coding unit 111 of FIG.
  • the decoding unit 203 acquires the residual coefficient and the prediction information from the code data output from the separation decoding unit 202 (details will be described later).
  • the inverse quantization / inverse conversion unit 204 performs inverse quantization on the residual coefficient input in subblock units, and further performs inverse orthogonal transformation to obtain a prediction error.
  • the image reproduction unit 205 generates the predicted image data by appropriately referring to the frame memory 206 based on the input prediction information. Then, the image reproduction unit 205 generates the reproduction image data from the predicted image data and the prediction error supplied from the inverse quantization / inverse conversion unit 204, and stores the reproduced image data in the frame memory 206.
  • the in-loop filter unit 207 performs in-loop filter processing such as a deblocking filter on the reproduced image, and outputs the filtered image.
  • the image decoding operation in the above image decoding device will be described below.
  • the bit stream generated by the image coding apparatus described above is decoded.
  • the separation / decoding unit 202 separates the bitstream input via the input terminal 201 into code data related to information related to decoding processing and coefficients, and decodes the code data existing in the header part of the bitstream. Specifically, the separation / decoding unit 202 decodes the PCM control index information from the picture header of the bitstream shown in FIG. 6A. Then, the separation / decoding unit 202 sets the quantization control index information thus obtained in the decoding unit 203. Further, the separation / decoding unit 202 outputs the code data of the basic block unit of the picture data to the decoding unit 203.
  • the decoding unit 203 decodes the code data and acquires the residual coefficient and the prediction information. Specifically, the decoding unit 203 first acquires the information on the subblock division, acquires the information on the subblocks constituting the basic block, and then acquires the information on the prediction corresponding to each subblock. The decoding unit 203 determines whether or not the index based on the number of pixels of the subblock of interest to be decoded satisfies the condition indicated by the above-mentioned PCM control index. When this condition is satisfied, the decoding unit 203 acquires the PCM flag from the code data and determines whether or not the subblock is PCM encoded.
  • the decoding unit 203 acquires the PCM flag only when the index based on the number of pixels of the subblock to be decoded is equal to or greater than the minimum PCM control index and equal to or less than the maximum PCM control index. On the other hand, if the conditions for the PCM control index are not met, the PCM flag is unencoded. Therefore, the decoding unit 203 determines that the subblock is not PCM encoded. When the subblock is PCM encoded, the pixel value is acquired from the prediction information. Further, when the subblock of interest is not PCM-encoded, the decoding unit 203 acquires prediction information such as a prediction mode and a motion vector, and a residual coefficient.
  • the decoding unit 203 outputs the residual coefficient to the inverse quantization / inverse conversion unit 204, and outputs the acquired prediction information to the image reproduction unit 205.
  • information indicating whether or not the subblock to be decoded is PCM-encoded is output to the inverse quantization / inverse conversion unit 204 and the image reproduction unit 205.
  • the inverse quantization / inverse conversion unit 204 performs inverse quantization on the input residual coefficient to generate an orthogonal transformation coefficient, and further performs inverse orthogonal transformation to reproduce the prediction error. Then, the inverse quantization / inverse conversion unit 204 outputs the reproduced prediction error to the image reproduction unit 205. However, when the sub-block to be decoded is PCM-encoded, the inverse quantization / inverse conversion unit 204 does not perform the inverse quantization and the inverse orthogonal transformation processing.
  • the image reproduction unit 205 appropriately refers to the frame memory 206 based on the prediction information input from the decoding unit 203, and reproduces the predicted image. Then, the image reproduction unit 205 reproduces the image data from the predicted image and the prediction error input from the inverse quantization / inverse conversion unit 204, and stores the image data in the frame memory 206. The stored image data will be used as a reference when making a prediction. However, when the subblock to be decoded is PCM-encoded, the image reproduction unit 205 reproduces the image data using the pixel values input as the prediction information from the decoding unit 203, inputs the image data to the frame memory 206, and stores the image data. To do.
  • the in-loop filter unit 207 reads the reproduced image from the frame memory 206 and performs in-loop filter processing such as a deblocking filter and a sample adaptive offset. Then, the filtered image is input to the frame memory 206 again.
  • the in-loop filter unit 207 may skip the in-loop filter processing for the image reproduced from the PCM-encoded subblock. As a result, the amount of calculation for the processing of the in-loop filter can be reduced.
  • the reproduced image stored in the frame memory 206 is finally output from the output terminal 208 to the outside (for example, a display).
  • FIG. 4 is a flowchart showing a decoding process of the control unit 200 in the image decoding device. Hereinafter, the decoding process will be described with reference to the figure.
  • control unit 200 controls the separation / decoding unit 202, separates the bitstream into information related to decoding processing and code data related to coefficients, decodes the code data of the header portion, and acquires PCM control index information. Then, the control unit 200 sets the acquired PCM control index information in the decoding unit 203.
  • the control unit 200 controls the decoding unit 203 to decode the code data separated in S401, and acquire the subblock division information, the residual coefficient, and the prediction information.
  • the decoding unit 203 compares the index corresponding to the number of pixels of the subblock of interest to be decoded with the PCM control index acquired in S401, and determines whether or not the condition according to the PCM control index is satisfied.
  • the decoding unit 203 acquires the PCM flag from the coded data and determines whether or not the subblock is PCM-encoded based on the PCM flag.
  • the decoding unit 203 acquires the pixel value from the code data.
  • the decoding unit 203 acquires prediction information such as a prediction mode and a motion vector, and a residual coefficient.
  • control unit 200 controls the inverse quantization / inverse conversion unit 204, performs inverse quantization on the residual coefficient in subblock units, and further performs inverse orthogonal transformation to acquire a prediction error.
  • the inverse quantization / inverse conversion unit 204 does not perform the inverse quantization and inverse orthogonal transformation processing.
  • the control unit 200 controls the image reproduction unit 205 to reproduce the image. Specifically, the image reproduction unit 205 reproduces the predicted image based on the prediction information acquired in S402, and further reproduces the image data from the reproduced predicted image and the prediction error generated in S403. However, when the subblock to be decoded is PCM-encoded, the image reproduction unit 205 reproduces the image data using the pixel values included in the prediction information acquired in S402. The image reproduction unit 205 stores the reproduced image data in the frame memory 206.
  • control unit 200 determines whether or not the decoding of all the subblocks of all the basic blocks in the frame has been completed. If it is determined that the process is completed, the control unit 200 advances the process to S406, and if there is an undecoded subblock, the process returns to S402 in order to decode the next subblock.
  • control unit 200 controls the in-loop filter unit 207, performs in-loop filter processing on the image data stored in the frame memory 206, and re-stores the filtered image in the frame memory 206. Finish the process.
  • the in-loop filter unit 207 can skip the in-loop filter processing for the reproduced image of the PCM-encoded subblock.
  • the bit stream in which the quantization control index information is included in the picture header portion is decoded, but the coding position of this information is not limited to this. As shown in FIG. 6B, it may be encoded at the sequence header portion of the image, or it may be encoded at another position.
  • the maximum PCM control index and the minimum PCM control index are used as the PCM control index, but the configuration is not limited to this, and only one may be used.
  • the maximum PCM control index when only the maximum PCM control index is used, only the minimum size for PCM coding is shown, and the maximum size for PCM coding is the same as the size of the basic block.
  • the minimum PCM index when only the minimum PCM index is used, only the maximum size for PCM coding is shown, and the minimum size for PCM coding is the same as the minimum size for subblocks. This is particularly effective when the maximum or minimum size for PCM encoding is obvious due to implementation restrictions, and it is possible to decode a bit stream in which the amount of data included in the header portion is reduced.
  • Each processing unit included in the image coding device and the image decoding device of the first embodiment has been 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 coding device and the image decoding device according to the above embodiment.
  • the CPU 501 controls the entire computer by using the computer programs and data stored in the RAM 502 and the ROM 503, and executes each of the above-described processes as performed by the image processing device according to the above embodiment. That is, the CPU 501 functions as each processing unit shown in FIGS. 1 and 2.
  • the RAM 502 has an area for temporarily storing programs and data acquired from the outside via the external storage device 506 and the I / F (interface) 507. Further, the RAM 502 is also used as a work area used by the CPU 501 when executing various processes.
  • the RAM 502 can be allocated as a frame memory, for example, or various other areas can be provided as appropriate.
  • the ROM 503 stores the setting data of this computer, the boot program, and the like.
  • the operation unit 504 is composed of a keyboard, a mouse, and the like, and can be operated by a 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 (application program) for realizing the functions of the respective parts shown in FIGS. 1 and 2 in the CPU 501. Further, each image data as a processing target 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 according to the control by the CPU 501, and are processed by the CPU 501.
  • a network such as a LAN or the Internet, or other devices such as a projection device or a display device can be connected to the I / F 507, and the computer acquires and sends various information via the I / F 507. Can be done.
  • Reference numeral 508 is a bus connecting the above-mentioned parts.
  • the CPU 501 executes the boot program stored in the ROM 503, loads the OS stored in the external storage device 506 into the RAM 502, and executes the boot program. Then, under the control of the OS, the CPU 501 loads the application program related to encoding or decoding from the external storage device 506 into the RAM 502 and executes it.
  • the CPU 501 functions as each processing unit of FIG. 1 or 2, and the present device functions as an image coding device or an image decoding device.
  • the present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
  • a circuit for example, ASIC

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention suitably controls PCM encoding regardless of whether sub-blocks are square or rectangular in shape. To this end, an image encoding device according to the present invention comprises: a division unit that divides an image to be encoded into a plurality of basic blocks, and further divides the basic blocks into a plurality of sub-blocks; a prediction unit that finds a predicted error constituted by the difference between an image of a sub-block of interest obtained by the division unit and a predicted image; a predictive encoding unit that encodes the predicted error for the sub-block of interest; a PCM encoding unit that PCM encodes the pixel values of the sub-block of interest; and a control unit that controls whether to generate encoded data for the sub-block of interest by using either the predictive encoding unit or the PCM encoding unit. The control unit performs control such that either the predictive encoding unit or the PCM encoding unit is used if the size indicated by the number of pixels included in the sub-block of interest is within a preset prescribed range, and performs control such that the predictive encoding unit is used if the size indicated by the number of pixels included in the sub-block of interest is outside of said range.

Description

画像符号化装置及び画像復号装置及び方法及びコンピュータプログラムImage coding device and image decoding device and method and computer program
 本発明は画像符号化装置及び画像復号装置及び方法及びコンピュータプログラムに関するものである。 The present invention relates to an image coding device, an image decoding device, a method, and a computer program.
 動画像の圧縮記録の符号化方式として、HEVC(High Efficiency Video Coding)符号化方式(以下、HEVCと記す)が知られている。HEVCでは符号化効率向上のため、従来のマクロブロック(16×16画素)より大きなサイズの基本ブロックが採用された。この大きなサイズの基本ブロックはCTU(Coding Tree Unit)と呼ばれ、そのサイズは最大64×64画素である。CTUはさらに予測や変換を行う単位となるサブブロックに分割される。HEVCにおいては、PCMと呼ばれる入力された画素を圧縮せずにそのままビットストリームに含める技術が採用されている。特許文献1は、このPCMを用いた符号化方式に関する技術が開示されている。 As a coding method for compressed recording of moving images, a HEVC (High Efficiency Video Coding) coding method (hereinafter referred to as HEVC) is known. In HEVC, in order to improve coding efficiency, a basic block having a size larger than that of a conventional macroblock (16 × 16 pixels) has been adopted. 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 that serve as units for prediction and conversion. In HEVC, a technique called PCM is adopted in which an input pixel is included in a bit stream as it is without being compressed. Patent Document 1 discloses a technique relating to a coding method using this PCM.
 近年、HEVCの後継としてさらに高効率な符号化方式の国際標準化を行う活動が開始された。JVET(Joint Video Experts Team)がISO・IECとITU-Tの間で設立され、VVC(Versatile Video Coding)符号化方式(以下、VVC)として標準化が進められている。符号化効率向上のため、従来の正方形サブブロックベースのイントラ予測・直交変換方法に加え、長方形サブブロックベースのイントラ予測・直交変換方法が検討されている。 In recent years, as a successor to HEVC, activities to carry out international standardization of more efficient coding methods have started. JVET (Joint Video Experts Team) was established between ISO / IEC and ITU-T, and is being standardized as a VVC (Versatile Video Coding) coding method (hereinafter referred to as VVC). In order to improve the coding efficiency, in addition to the conventional square subblock-based intra-prediction / orthogonal conversion method, a rectangular sub-block-based intra-prediction / orthogonal conversion method is being studied.
特開2014-011637号公報Japanese Unexamined Patent Publication No. 2014-011637
 HEVCにおいては、正方形のサブブロックだけが使用されていた。従って、HEVCにおけるPCM符号化する基準となるサブブロックのサイズは、正方形のサブブロックを想定したものであり、サブブロックの一辺の長さが特定の条件を満たす場合にPCM符号化する基準としていた。一方、VVCでは長方形のサブブロック分割が検討されている。そのため、分割後のサブブロックの縦の長さと横の長さが極端に異なるケースが発生する。その場合、サブブロックの縦と横の長さが両方とも特定の条件を満たす必要があり、縦と横の長さが極端に異なる細長い長方形サブブロックに対しては、例え当該長方形サブブロックの画素数が多くともPCM符号化する基準とならないケースが存在する。 In HEVC, only square subblocks were used. Therefore, the size of the subblock that is the standard for PCM coding in HEVC is assumed to be a square subblock, and is used as the standard for PCM coding when the length of one side of the subblock satisfies a specific condition. .. On the other hand, in VVC, rectangular sub-block division is being considered. Therefore, there may be a case where the vertical length and the horizontal length of the divided subblocks are extremely different. In that case, both the vertical and horizontal lengths of the subblock must satisfy specific conditions, and for an elongated rectangular subblock whose vertical and horizontal lengths are extremely different, even if the pixels of the rectangular subblock are met. There are cases where even a large number does not serve as a reference for PCM coding.
 本発明は上述した課題を解決するためになされたものであり、サブブロックの形状が正方形、長方形を問わず、適切にPCM符号化の制御を可能とする技術を提供しようとするものである。 The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a technique capable of appropriately controlling PCM coding regardless of whether the shape of the subblock is square or rectangular.
 この課題を解決するため、例えば本発明の画像符号化装置は以下の構成を備える。すなわち、
 画像を符号化する画像符号化装置であって、
 符号化対象の画像を複数の基本ブロックに分割し、当該基本ブロックを更に複数のサブブロックに分割する分割手段と、
 該分割手段で得た注目サブブロックの画像と予測画像との差である予測誤差を求める予測手段と、
 注目サブブロックの前記予測誤差を符号化する予測符号化手段と、
 前記注目サブブロックの画素値をPCM符号化するPCM符号化手段と、
 前記予測符号化手段、前記PCM符号化手段のいずれを用いて前記注目サブブロックの符号化データを生成するかを制御する制御手段とを有し、
 前記制御手段は、
   前記注目サブブロックに含まれる画素数で特定されるサイズが予め設定した範囲である場合は前記予測符号化手段、前記PCM符号化手段のいずれかを利用するように制御し、
   前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲を外れる場合は、前記予測符号化手段を利用するように制御することを特徴とする。
In order to solve this problem, for example, the image coding apparatus of the present invention has the following configuration. That is,
An image coding device that encodes an image.
A dividing means for dividing an image to be encoded into a plurality of basic blocks and further dividing the basic block into a plurality of sub-blocks.
A prediction means for obtaining a prediction error, which is the difference between the image of the subblock of interest obtained by the division means and the prediction image, and
A predictive coding means that encodes the prediction error of the subblock of interest,
A PCM coding means for PCM coding the pixel value of the subblock of interest,
It has a control means for controlling whether the predictive coding means or the PCM coding means is used to generate the coded data of the subblock of interest.
The control means
When the size specified by the number of pixels included in the attention subblock is within a preset range, control is performed so as to use either the predictive coding means or the PCM coding means.
When the size specified by the number of pixels included in the attention subblock is out of the range, it is characterized in that it is controlled to use the predictive coding means.
 本発明によれば、サブブロックの形状が正方形、長方形を問わず、適切にPCM符号化の制御が可能になる。 According to the present invention, PCM coding can be appropriately controlled regardless of whether the shape of the subblock is square or rectangular.
 本発明のその他の特徴及び利点は、添付図面を参照とした以下の説明により明らかになるであろう。なお、添付図面においては、同じ若しくは同様の構成には、同じ参照番号を付す。 Other features and advantages of the present invention will be clarified by the following description with reference to the accompanying drawings. In the attached drawings, the same or similar configurations are designated by the same reference numbers.
 添付図面は明細書に含まれ、その一部を構成し、本発明の実施の形態を示し、その記述と共に本発明の原理を説明するために用いられる。
本実施形態の画像符号化装置のブロック構成図。 本実施形態の画像復号装置のブロック構成図。 本実施形態の画像符号化装置における符号化処理を示すフローチャート。 本実施形態の画像復号装置における復号処理を示すフローチャート。 本実施形態の画像符号化装置、復号装置に適用可能なコンピュータのハードウェア構成例を示すブロック図。 ビットストリームのデータ構造を示す図。 ビットストリームのデータ構造を示す図。 本実施形態で用いられるサブブロック分割の例を示す図。 本実施形態で用いられるサブブロック分割の例を示す図。 本実施形態で用いられるサブブロック分割の例を示す図。 本実施形態で用いられるサブブロック分割の例を示す図。 本実施形態で用いられるサブブロック分割の例を示す図。 本実施形態で用いられるサブブロック分割の例を示す図。 本実施形態で用いられる画素数に基づいたサブブロックのインデックスを示す図。 本実施形態で用いられる画素数に基づいたサブブロックのインデックスを示す図。 本実施形態で用いられる画素数に基づいたサブブロックのインデックスを示す図。 本実施形態で用いられる画素数に基づいたサブブロックのインデックスを示す図。 本実施形態で用いられる画素数に基づいたサブブロックのインデックスを示す図。 本実施形態で用いられる画素数に基づいたサブブロックのインデックスを示す図。 本実施形態におけるPCM制御インデックスと処理対象サブブロックの画素数に基づいたインデックスとの比較を示す図。 本実施形態におけるPCM制御インデックスと処理対象サブブロックの画素数に基づいたインデックスとの比較を示す図。 本実施形態におけるPCM制御インデックスと処理対象サブブロックの画素数に基づいたインデックスとの比較を示す図。 本実施形態におけるPCM制御インデックスと処理対象サブブロックの画素数に基づいたインデックスとの比較を示す図。
The accompanying drawings are included in the specification, form a part thereof, show an embodiment of the present invention, and are used together with the description to explain the principle of the present invention.
The block block diagram of the image coding apparatus of this embodiment. The block block diagram of the image decoding apparatus of this embodiment. The flowchart which shows the coding process in the image coding apparatus of this embodiment. The flowchart which shows the decoding process in the image decoding apparatus of this embodiment. The block diagram which shows the hardware configuration example of the computer applicable to the image coding apparatus and decoding apparatus of this embodiment. The figure which shows the data structure of a bit stream. The figure which shows the data structure of a bit stream. The figure which shows the example of the sub-block division used in this embodiment. The figure which shows the example of the sub-block division used in this embodiment. The figure which shows the example of the sub-block division used in this embodiment. The figure which shows the example of the sub-block division used in this embodiment. The figure which shows the example of the sub-block division used in this embodiment. The figure which shows the example of the sub-block division used in this embodiment. The figure which shows the index of the sub-block based on the number of pixels used in this embodiment. The figure which shows the index of the sub-block based on the number of pixels used in this embodiment. The figure which shows the index of the sub-block based on the number of pixels used in this embodiment. The figure which shows the index of the sub-block based on the number of pixels used in this embodiment. The figure which shows the index of the sub-block based on the number of pixels used in this embodiment. The figure which shows the index of the sub-block based on the number of pixels used in this embodiment. The figure which shows the comparison of the PCM control index and the index based on the number of pixels of the processing target subblock in this embodiment. The figure which shows the comparison of the PCM control index and the index based on the number of pixels of the processing target subblock in this embodiment. The figure which shows the comparison of the PCM control index and the index based on the number of pixels of the processing target subblock in this embodiment. The figure which shows the comparison of the PCM control index and the index based on the number of pixels of the processing target subblock in this embodiment.
 以下、添付図面を参照して実施形態を詳しく説明する。尚、以下の実施形態は特許請求の範囲に係る発明を限定するものでない。実施形態には複数の特徴が記載されているが、これらの複数の特徴の全てが発明に必須のものとは限らず、また、複数の特徴は任意に組み合わせられてもよい。さらに、添付図面においては、同一若しくは同様の構成に同一の参照番号を付し、重複した説明は省略する。 Hereinafter, embodiments will be described in detail with reference to the attached drawings. The following embodiments do not limit the invention according to the claims. Although a plurality of features are described in the embodiment, not all of the plurality of features are essential to the invention, and the plurality of features may be arbitrarily combined. Further, in the attached drawings, the same or similar configurations are designated by the same reference numbers, and duplicate description is omitted.
 [第1の実施形態]
 図1は本実施形態の画像符号化装置のブロック構図である。画像符号化装置は、装置全体の制御を司る制御部150を有する。この制御部150は、CPU、CPUが実行するプログラムを格納するROM、CPUのワークエリアとして利用するRAMを有する。また、画像符号化装置は、入力端子101、ブロック分割部102、生成部103、予測部104、変換・量子化部105、逆量子化・逆変換部106、画像再生部107、フレームメモリ108、インループフィルタ部109、符号化部110、統合符号化部111、出力端子112を有する。
[First Embodiment]
FIG. 1 is a block composition of the image coding apparatus of this embodiment. The image coding device has a control unit 150 that controls the entire device. The control unit 150 includes a CPU, a ROM for storing a program executed by the CPU, and a RAM used as a work area of the CPU. Further, the image coding device includes an input terminal 101, a block division unit 102, a generation unit 103, a prediction unit 104, a conversion / quantization unit 105, an inverse quantization / inverse conversion unit 106, an image reproduction unit 107, and a frame memory 108. It has an in-loop filter unit 109, a coding unit 110, an integrated coding unit 111, and an output terminal 112.
 入力端子101は、画像データ発生源で発生した符号化対象の画像データをフレーム単位に入力する。画像データ発生源は、撮像装置、符号化対象の画像データを記憶したファイルサーバや記憶媒体等、その種類は問わない。また、出力端子112は、符号化データを出力先装置に出力するが、その出力先装置も記憶媒体、ファイルサーバ等、その種類は特に問わない。 The input terminal 101 inputs the image data to be encoded generated by the image data source in frame units. The image data generation source may be of any type, such as an image pickup device, a file server that stores image data to be encoded, a storage medium, and the like. Further, the output terminal 112 outputs the coded data to the output destination device, and the output destination device may be of any type such as a storage medium or a file server.
 ブロック分割部102は、入力画像を複数の所定サイズの基本ブロックに分割し、基本ブロック単位の画像を後段の予測部104に出力する。 The block division unit 102 divides the input image into a plurality of basic blocks of a predetermined size, and outputs the image of the basic block unit to the prediction unit 104 in the subsequent stage.
 生成部103は、PCM符号化する基準となる情報などを生成し、出力する。本実施形態において、PCM符号化する基準となる情報とは、サブブロックの画素数に基づいて生成されるインデックス(以下PCM制御インデックスとする)を示す。PCM制御インデックスについての詳細は後述する。 The generation unit 103 generates and outputs information or the like that serves as a reference for PCM coding. In the present embodiment, the reference information for PCM coding indicates an index generated based on the number of pixels of the subblock (hereinafter referred to as a PCM control index). Details of the PCM control index will be described later.
 予測部104は、ブロック分割部102からの基本ブロックの画像を更にサブブロックに分割し、サブブロック単位でフレーム内予測であるイントラ予測やフレーム間予測であるインター予測などを行い、予測画像データを生成する。さらに、予測部104は、サブブロックの画像データと、予測画像データから予測誤差を算出し、出力する。また、予測部104は、予測に必要な情報、例えばサブブロック分割、予測モードや動きベクトル等の情報も予測誤差と併せて出力される。以下ではこの予測に必要な情報を予測情報と呼称する。また、当該サブブロックのサイズが前述のPCM制御インデックスにより示される条件を満たし、かつイントラ予測やインター予測により算出される予測誤差が大きいと判断された場合、PCM符号化を選択することもできる。PCM符号化は、予測誤差が大きく、後段の符号化処理によりデータ量がかえって増加してしまうと判断された場合に、画素値を圧縮せずに符号化することでデータ量の増大を防ぐことができる。予測部104は、PCM符号化が選択された場合にはPCM符号化が行われたことを特定するためのフラグ(以下、PCMフラグと記す)、並びに、後段で符号化される画素値を予測情報として出力する。 The prediction unit 104 further divides the image of the basic block from the block division unit 102 into sub-blocks, performs intra-frame prediction for intra-frame prediction, inter-frame prediction for inter-frame prediction, and the like, and obtains prediction image data. Generate. Further, the prediction unit 104 calculates and outputs a prediction error from the sub-block image data and the prediction image data. Further, the prediction unit 104 also outputs information necessary for prediction, for example, information such as sub-block division, prediction mode, motion vector, and the like together with the prediction error. Hereinafter, the information necessary for this prediction is referred to as prediction information. Further, when it is determined that the size of the subblock satisfies the condition indicated by the above-mentioned PCM control index and the prediction error calculated by the intra prediction or the inter prediction is large, PCM coding can be selected. PCM coding prevents an increase in the amount of data by encoding the pixel values without compressing them when it is determined that the amount of data will increase due to the subsequent coding process due to a large prediction error. Can be done. When the PCM coding is selected, the prediction unit 104 predicts a flag for identifying that the PCM coding has been performed (hereinafter referred to as a PCM flag) and a pixel value encoded in the subsequent stage. Output as information.
 変換・量子化部105は、サブブロック単位で予測誤差の直交変換を行い、さらに量子化を行い、残差係数を得る。ただし、PCM符号化される場合、変換・量子化部105は直交変換および量子化処理を実施しない。 The conversion / quantization unit 105 performs orthogonal conversion of the prediction error in sub-block units, further performs quantization, and obtains a residual coefficient. However, when PCM coded, the conversion / quantization unit 105 does not perform orthogonal conversion and quantization processing.
 逆量子化・逆変換部106は、変換・量子化部105から出力された残差係数を逆量子化して変換係数を再生し、さらに逆直交変換して予測誤差を再生する。PCM符号化される場合、逆量子化・逆変換部106は、逆量子化および逆直交変換処理を実施しない。 The inverse quantization / inverse conversion unit 106 inversely quantizes the residual coefficient output from the conversion / quantization unit 105 to reproduce the conversion coefficient, and further performs inverse orthogonal conversion to reproduce the prediction error. In the case of PCM coding, the inverse quantization / inverse conversion unit 106 does not perform the inverse quantization and the inverse orthogonal conversion processing.
 画像再生部107は、予測部104から出力された予測情報に基づいて、フレームメモリ108を適宜参照して予測画像データを生成する。そして、画像再生部107は、この予測画像データと入力した予測誤差とから再生画像データを生成し、再生画像を格納する。ただし、PCM符号化される場合には、画像再生部107は、予測情報として入力された画素値を再生画像データとして用いる。 The image reproduction unit 107 generates predicted image data by appropriately referring to the frame memory 108 based on the prediction information output from the prediction unit 104. Then, the image reproduction unit 107 generates the reproduction image data from the predicted image data and the input prediction error, and stores the reproduced image. However, in the case of PCM coding, the image reproduction unit 107 uses the pixel value input as the prediction information as the reproduction image data.
 インループフィルタ部109は、フレームメモリ108に格納された再生画像データに対し、デブロッキングフィルタやサンプルアダプティブオフセットなどのインループフィルタ処理を行い、フィルタ処理後の画像データをフレームメモリ108に再格納する。 The in-loop filter unit 109 performs in-loop filter processing such as a deblocking filter and a sample adaptive offset on the reproduced image data stored in the frame memory 108, and re-stores the filtered image data in the frame memory 108. ..
 符号化部110は、変換・量子化部105からの残差係数、及び、予測部104からの予測情報を入力して符号化を行い、符号データを生成する。 The coding unit 110 inputs the residual coefficient from the conversion / quantization unit 105 and the prediction information from the prediction unit 104 to perform coding, and generates code data.
 統合符号化部111は、復号側でビットストリームの復号に必要となる、シーケンスやピクチャのヘッダ部分に符号化されるヘッダ符号データを生成する。さらに統合符号化部111は、ヘッダ符号データに、符号化部110から出力された符号データを統合したビットストリームを形成し、出力端子112を介して出力する。 The integrated coding unit 111 generates header code data encoded in the header part of the sequence or picture, which is necessary for decoding the bit stream on the decoding side. Further, the integrated coding unit 111 forms a bit stream in which the code data output from the coding unit 110 is integrated with the header code data, and outputs the bit stream via the output terminal 112.
 ここで、画像符号化装置における画像の符号化動作をより詳しく以下に説明する。本実施形態では動画像データをフレーム単位に入力する構成とする。ただし、1フレーム分の静止画像データを入力する構成としても構わない。 Here, the image coding operation in the image coding device will be described in more detail below. In the present embodiment, moving image data is input in frame units. However, it may be configured to input still image data for one frame.
 画像の符号化に先立ち、生成部103はPCM符号化する基準となる情報であるPCM制御インデックスを生成する。本実施形態におけるPCM制御インデックスは、PCM符号化を行う最小サブブロックサイズを示す最大PCM制御インデックスと、PCM符号化を行う最大サブブロックサイズを示す最小PCM制御インデックスの2つから構成される。これらのインデックスはサブブロックを構成する画素数に対応して決定される。これらのインデックスがどのように用いられるかの説明は後述する。PCM制御インデックスの生成方法については特に問わないが、ユーザがPCM制御インデックスを入力してもよいし、入力画像の特性からPCM制御インデックスを算出してもよいし、初期値としてあらかじめ指定されたPCM制御インデックスを使用してもよい。また、予測部104において、PCM符号化するか否かを判断する際の実装上の制限に基づいて決定してもよい。生成されたPCM制御インデックスは、予測部104および統合符号化部111に入力される。 Prior to encoding the image, the generation unit 103 generates a PCM control index, which is information that serves as a reference for PCM coding. The PCM control index in the present embodiment is composed of two, a maximum PCM control index indicating the minimum subblock size for PCM coding and a minimum PCM control index indicating the maximum subblock size for PCM coding. These indexes are determined according to the number of pixels constituting the subblock. A description of how these indexes are used will be described later. The method of generating the PCM control index is not particularly limited, but the user may input the PCM control index, the PCM control index may be calculated from the characteristics of the input image, or the PCM specified in advance as the initial value. A control index may be used. Further, the prediction unit 104 may make a determination based on the implementation limitation when determining whether or not to perform PCM coding. The generated PCM control index is input to the prediction unit 104 and the integrated coding unit 111.
 上記のようにして、PCM制御インデックスが生成された後、画像データの符号化が行われることになる。 As described above, after the PCM control index is generated, the image data is encoded.
 入力端子101には、外部からフレーム単位に画像データが供給される。ブロック分割部102では、入力端子101を介して入力した1フレーム分の画像データを複数の基本ブロックに分割し、基本ブロック単位の画像データを予測部104に出力する。 Image data is supplied to the input terminal 101 from the outside in frame units. The block division unit 102 divides the image data for one frame input via the input terminal 101 into a plurality of basic blocks, and outputs the image data for each basic block to the prediction unit 104.
 予測部104は、ブロック分割部102から入力した画像データに対し、予測処理を実行する。具体的には、予測部104は、まず、基本ブロックをさらに細かいサブブロックへのサブブロック分割法を決定する。 The prediction unit 104 executes prediction processing on the image data input from the block division unit 102. Specifically, the prediction unit 104 first determines a subblock division method for dividing a basic block into finer subblocks.
 図7A乃至7Fを参照して、基本ブロックの分割法の例を示す。ブロック700乃至705の太線の枠は基本ブロックを表している。説明を簡易にするため、実施形態における基本ブロックのサイズは32×32画素サイズとする。太線の枠内の各四角形はサブブロックを表している。図7Aは、基本ブロック700がサブブロックである例である。図7Bは、基本ブロック701を4個の正方形のサブブロックへの分割例を示しており、1つのサブブロックのサイズは16×16画素である。図7C~7Fは長方形サブブロック分割の一例を表している。図7Cは、基本ブロック702が16×32画素サイズの2個のサブブロック(垂直方向に長手)に分割されることを示している。図7Dは、基本ブロック703が、32×16画素サイズの2個のサブブロック(水平方向に長手)に分割されることを示している。図7E,7Fの基本ブロック704、705の場合、分割方向が異なるものの、1:2:1の比で3つの長方形サブブロックに分割されている。このように正方形だけではなく、長方形のサブブロックも用いて符号化処理を行っている。本実施形態では、このように正方形だけではなく、長方形のサブブロックを用いて符号化処理が行われる。また、サブブロックのサイズは、このような分割を繰り返すことで、図示に示したよりも更に小さくても構わない。そして、本実施形態では、このような基本ブロックの分割種類に関する情報が分割情報として符号化される。さらには、後述の図9A~9Dの左側の図に示すようなサブブロックの階層構造を得るために、分割種類の情報が階層化されて符号化される。 An example of a basic block division method is shown with reference to FIGS. 7A to 7F. The thick line frame of blocks 700 to 705 represents a basic block. For the sake of simplicity, the size of the basic block in the embodiment is 32 × 32 pixel size. Each rectangle in the thick line frame represents a subblock. FIG. 7A is an example in which the basic block 700 is a subblock. FIG. 7B shows an example of dividing the basic block 701 into four square sub-blocks, and the size of one sub-block is 16 × 16 pixels. 7C to 7F show an example of rectangular subblock division. FIG. 7C shows that the basic block 702 is divided into two sub-blocks (longitudinal in the vertical direction) having a size of 16 × 32 pixels. FIG. 7D shows that the basic block 703 is divided into two subblocks (horizontally longitudinal) having a size of 32 × 16 pixels. In the case of the basic blocks 704 and 705 of FIGS. 7E and 7F, although the division directions are different, they are divided into three rectangular subblocks at a ratio of 1: 2: 1. In this way, not only squares but also rectangular sub-blocks are used for encoding processing. In the present embodiment, the coding process is performed using not only squares but also rectangular sub-blocks. Further, the size of the subblock may be further smaller than that shown in the figure by repeating such division. Then, in the present embodiment, the information regarding the division type of such a basic block is encoded as the division information. Further, in order to obtain a hierarchical structure of sub-blocks as shown in the left side figures of FIGS. 9A to 9D described later, the division type information is layered and encoded.
 予測部104は、処理対象の各サブブロックに対し、予測モードを決定する。具体的には、予測部104は、処理対象の各サブブロックを含むフレームと同一フレームで符号化済の画素を用いるイントラ予測、あるいは、符号化済の異なるフレームの画素を用いるインター予測などのサブブロック単位の予測モードを決定する。そして、予測部104は、決定した予測モードおよび符号化済の画素から予測画像データを生成し、さらに入力された画像データと予測画像データから、予測誤差を生成し、変換・量子化部105に出力する。また、予測部104は、サブブロック分割や予測モードなどの情報を予測情報として、符号化部110、画像再生部107に出力する。ただし、予測部104は、当該サブブロックの画素数に基づいたインデックスが生成部103から入力されたPCM制御インデックスによる条件を満たす場合は、PCM符号化を選択することもできる。その場合、予測部104は、PCMフラグを予測情報として出力し、当該サブブロックでPCM符号化を選択した場合、画素値をさらに予測情報として出力する。一方、予測部104は、当該サブブロックでPCM符号化を選択しなかった場合、PCMフラグに続いて他の予測情報や予測誤差を出力する。 The prediction unit 104 determines the prediction mode for each subblock to be processed. Specifically, the prediction unit 104 uses sub-prediction such as intra-prediction using pixels encoded in the same frame as the frame including each sub-block to be processed, or inter-prediction using pixels in different encoded frames. Determine the prediction mode for each block. Then, the prediction unit 104 generates prediction image data from the determined prediction mode and the encoded pixels, further generates a prediction error from the input image data and the prediction image data, and causes the conversion / quantization unit 105 to generate the prediction error. Output. Further, the prediction unit 104 outputs information such as subblock division and prediction mode as prediction information to the coding unit 110 and the image reproduction unit 107. However, the prediction unit 104 may also select PCM coding if the index based on the number of pixels of the subblock satisfies the condition of the PCM control index input from the generation unit 103. In that case, the prediction unit 104 outputs the PCM flag as prediction information, and when PCM coding is selected in the subblock, further outputs the pixel value as prediction information. On the other hand, when the prediction unit 104 does not select PCM coding in the subblock, the prediction unit 104 outputs other prediction information and prediction error following the PCM flag.
 ここで、画素数に基づいたインデックスの算出について、図8A~8Fを参照して説明する。図8A~8Fがサブブロックの分割の種類を示す。また、各サブブロック中に記載されているDn(nは正の整数)はサブブロックの画素数に基づいて決定されるインデックスを示す。図8A~8Fにおける、D0、D1、D2は、それぞれ、インデックス“0”、インデックス“1”及びインデックス“2”であることを示している。当該インデックスは分割後の画素数に基づいて算出される。基本ブロックに対するインデックスは“0”とし、サブブロックの画素数が基本ブロックの画素数の2分の1である場合は、画素数に基づくインデックスは“1”となる。また、分割後のサブブロックの画素数が基本ブロックの4分の1である場合は、画素数に基づくインデックスは“2”となる。 Here, the calculation of the index based on the number of pixels will be described with reference to FIGS. 8A to 8F. 8A to 8F show the types of subblock division. Further, Dn (n is a positive integer) described in each subblock indicates an index determined based on the number of pixels of the subblock. In FIGS. 8A to 8F, D0, D1 and D2 indicate that the index is “0”, the index “1” and the index “2”, respectively. The index is calculated based on the number of pixels after division. The index for the basic block is "0", and when the number of pixels in the subblock is half the number of pixels in the basic block, the index based on the number of pixels is "1". When the number of pixels of the sub-block after division is one-fourth of that of the basic block, the index based on the number of pixels is "2".
 よって、図8Bの場合、基本ブロックの4分木分割を示している。図8Bの各サブブロックのインデックスは“2”(D2)となる。図8Cおよび8Dの場合、各サブブロックは基本ブロックに対し2分木分割されたものなので、それぞれのインデックスは“1”(D1)となる。また、図8Eおよび8Fは基本ブロックに対し3分木分割されている。分割後のサブブロックの画素数が2分の1である場合は、インデックスは“1”(D1)となる。一方で、分割後のサブブロックの画素数が4分の1である場合は、インデックスは“2”(D2)となる。このように、実施形態では、基本ブロックに対し分割されたサブブロックは、分割後の画素数に応じたインデックスが割り当てられる。 Therefore, in the case of FIG. 8B, the quadtree division of the basic block is shown. The index of each subblock in FIG. 8B is “2” (D2). In the case of FIGS. 8C and 8D, since each subblock is divided into two branches with respect to the basic block, each index is “1” (D1). Further, FIGS. 8E and 8F are divided into three parts with respect to the basic block. When the number of pixels of the sub-block after division is half, the index is "1" (D1). On the other hand, when the number of pixels of the sub-block after division is one-fourth, the index is "2" (D2). As described above, in the embodiment, the sub-blocks divided with respect to the basic block are assigned indexes according to the number of pixels after the division.
 次に、最小PCM制御インデックスおよび最大PCM制御インデックスと、画素数に基づいた処理対象サブブロックのインデックスに応じて、どのようにPCM符号化されうるサブブロックが決定されるかを、図9A~9Dを用いて説明する。図9A~9Dにおいて、一番外側の太枠の正方形が基本ブロックであることを示す。また、図9A~9Dのそれぞれにおいて、左側がサブブロックの分割を示しており、右側は各々のサブブロックにおいてPCM符号化することが可能か否かを示している。また、左側の図中の各ブロック内のD0、Dn(nは正の整数)は各サブブロックの画素数に対応するインデックスを示しており、例えばD0はインデックス0を示し、D4はインデックス4を示し、その意味するところは既に説明した通りである。 Next, it is shown in FIGS. 9A to 9D how the subblocks that can be PCM encoded are determined according to the minimum PCM control index, the maximum PCM control index, and the index of the subblock to be processed based on the number of pixels. Will be described using. In FIGS. 9A-9D, the outermost thick square is shown as a basic block. Further, in each of FIGS. 9A to 9D, the left side shows the division of sub-blocks, and the right side shows whether or not PCM coding is possible in each sub-block. Further, D0 and Dn (n is a positive integer) in each block in the figure on the left side indicate an index corresponding to the number of pixels of each subblock. For example, D0 indicates an index 0 and D4 indicates an index 4. It is shown and its meaning is as already explained.
 一方、右側の図中の「可」は当該サブブロックにおいてPCM符号化を行うことが可能であることを示し、「不可」は当該サブブロックにおいてPCM符号化を行うことが不可能(対象外)であることを示す。図9A~9Dは、最小PCM制御インデックスが0であり、最大PCM制御インデックスがそれぞれ1、2、3、4の場合を示している。 On the other hand, "OK" in the figure on the right indicates that PCM coding can be performed in the sub-block, and "impossible" indicates that PCM coding cannot be performed in the sub-block (not applicable). Indicates that. 9A-9D show the case where the minimum PCM control index is 0 and the maximum PCM control index is 1, 2, 3, 4 respectively.
 図9Aの場合、すなわち最小PCM制御インデックスが“0”で最大PCM制御インデックスが“1”であり、全てのサブブロックのインデックスが最大PCM制御インデックスよりも大きいため、いずれのサブブロックでもPCM符号化を行うことはできない。それ故、図9Aの場合、全サブブロックのPCM符号化は“不可”となっている。 In the case of FIG. 9A, that is, the minimum PCM control index is “0”, the maximum PCM control index is “1”, and the indexes of all subblocks are larger than the maximum PCM control index. Therefore, all subblocks are PCM encoded. Cannot be done. Therefore, in the case of FIG. 9A, PCM coding of all subblocks is "impossible".
 図9Bは、最大PCM制御インデックスが“2”場合を示している。基本ブロックの右下に位置するサブブロックのインデックスD2であるので、このサブブロックはPCM符号化を行うことができる。それ故、図9Bの場合、基本ブロックの右下に位置するサブブロックは“可”であり、それ以外のサブブロックは“不可”となっている。 FIG. 9B shows the case where the maximum PCM control index is “2”. Since it is the index D2 of the subblock located at the lower right of the basic block, this subblock can be PCM encoded. Therefore, in the case of FIG. 9B, the subblock located at the lower right of the basic block is "possible", and the other subblocks are "impossible".
 図9Cは、最大PCM制御インデックスが“3”の場合を示している。したがってD0~D3をインデックスとして持つサブブロックはPCM符号化が“可”となり、D4以上のインデックスのサブブロックのPCM符号化は“不可”となる。 FIG. 9C shows the case where the maximum PCM control index is “3”. Therefore, the subblock having D0 to D3 as an index is "possible" for PCM coding, and the subblock having an index of D4 or higher is "impossible" for PCM coding.
 図9Dは、最大PCM制御インデックスが“4”の場合を示している。したがってD0~D4をインデックスとして持つサブブロックはPCM符号化が“可”となり、D5以上のインデックスのサブブロックのPCM符号化は“不可”となる。図示の場合、全てのサブブロックはD4以下であるので、全サブブロックはPCM符号化が“可”となっている。 FIG. 9D shows the case where the maximum PCM control index is “4”. Therefore, the subblocks having D0 to D4 as indexes are "possible" for PCM coding, and the subblocks with indexes of D5 and above are "impossible" for PCM coding. In the case of the illustration, since all the sub-blocks are D4 or less, all the sub-blocks are "possible" for PCM coding.
 図1の説明に戻る。変換・量子化部105は、予測部104によって予測処理が行われたサブブロックの画像データ(画素値)に対して直交変換を行い、さらに量子化を行い、残差係数を生成する。そして、変換・量子化部105は、生成した残差係数を逆量子化・逆変換部106および符号化部110に出力する。ただし、変換・量子化部105は、注目サブブロックがPCM符号化される場合は、この直交変換および量子化処理を実施しない。 Return to the explanation in Fig. 1. The conversion / quantization unit 105 performs orthogonal conversion on the image data (pixel value) of the subblock that has been predicted by the prediction unit 104, further performs quantization, and generates a residual coefficient. Then, the conversion / quantization unit 105 outputs the generated residual coefficient to the inverse quantization / inverse conversion unit 106 and the coding unit 110. However, the conversion / quantization unit 105 does not perform this orthogonal conversion and quantization processing when the subblock of interest is PCM-encoded.
 逆量子化・逆変換部106は、入力された残差係数を逆量子化して変換係数を再生する。逆量子化・逆変換部106は、さらに、再生された変換係数を逆直交変換して予測誤差を再生し、その予測誤差を画像再生部107に出力する。ただし、注目サブブロックがPCM符号化される場合、逆量子化・逆変換部106は、この逆量子化および逆直交変換の処理は実施しない。 The inverse quantization / inverse conversion unit 106 inversely quantizes the input residual coefficient and reproduces the conversion coefficient. The inverse quantization / inverse conversion unit 106 further performs inverse orthogonal conversion of the reproduced conversion coefficient to reproduce the prediction error, and outputs the prediction error to the image reproduction unit 107. However, when the subblock of interest is PCM encoded, the inverse quantization / inverse conversion unit 106 does not perform the inverse quantization and inverse orthogonal transformation processing.
 画像再生部107は、予測部104から入力される予測情報に基づいて、フレームメモリ108を適宜参照し、予測画像を再生する。そして画像再生部107は、再生された予測画像と、逆量子化・逆変換部106から入力した予測誤差とから画像データを再生し、フレームメモリ108に格納する。ここで、注目サブブロックがPCM符号化される場合、画像再生部107は、予測部104から予測情報として入力された画素値を用いて画像データを再生し、フレームメモリ108に格納する。 The image reproduction unit 107 appropriately refers to the frame memory 108 based on the prediction information input from the prediction unit 104, and reproduces the predicted image. Then, the image reproduction unit 107 reproduces the image data from the reproduced predicted image and the prediction error input from the inverse quantization / inverse conversion unit 106, and stores the image data in the frame memory 108. Here, when the subblock of interest is PCM-encoded, the image reproduction unit 107 reproduces the image data using the pixel values input as the prediction information from the prediction unit 104 and stores the image data in the frame memory 108.
 インループフィルタ部109は、フレームメモリ108から再生画像データを読み出しデブロッキングフィルタなどのインループフィルタ処理を行う。インループフィルタ部109は、予測部104の予測モードや変換・量子化部105で利用される量子化パラメータの値、さらに量子化後の処理サブブロックに非ゼロの値(以下、有意係数とする)が存在の有無、あるいはサブブロック分割情報に基づいてインループフィルタ処理を行うことになる。インループフィルタ部109は、フィルタ処理された画像データをフレームメモリ108に再格納する。 The in-loop filter unit 109 reads the reproduced image data from the frame memory 108 and performs in-loop filter processing such as a deblocking filter. The in-loop filter unit 109 has a prediction mode of the prediction unit 104, a value of a quantization parameter used in the conversion / quantization unit 105, and a non-zero value in the processing subblock after quantization (hereinafter, a significance coefficient). ) Exists, or the in-loop filter processing is performed based on the subblock division information. The in-loop filter unit 109 re-stores the filtered image data in the frame memory 108.
 また、インループフィルタの処理対象のサブブロックがPCM符号化されている場合には、再生画像に劣化が生じていない。そのため、インループフィルタ部109は、PCM符号化されているサブブロックについては、このインループフィルタ処理をスキップすることも可能である。これにより、インループフィルタの処理分の演算量を低減させることもできる。 Further, when the subblock to be processed by the in-loop filter is PCM-encoded, the reproduced image is not deteriorated. Therefore, the in-loop filter unit 109 can skip this in-loop filter processing for the PCM-encoded sub-block. As a result, the amount of calculation for the processing of the in-loop filter can be reduced.
 符号化部110は、サブブロック単位に、変換・量子化部105で生成された残差係数、予測部104から入力された予測情報をエントロピー符号化し、符号データを生成する。注目サブブロックが上述のPCM制御インデックスによる条件を満たす場合、すなわち当該サブブロックの画素数に応じたインデックスが最大PCM制御インデックス以下かつ最小PCM制御インデックス以上の場合、符号化部110は、PCMフラグを符号化する。注目サブブロックがPCM符号化される場合には、予測情報として入力したPCMフラグとして“1”をエントロピー符号化し、さらに画素値を符号データに含める。一方、注目サブブロックがPCM符号化されない場合(予測符号化された場合)、符号化部110は、PCMフラグとして“0”をエントロピー符号化し、続いて他の予測情報や残差係数をエントロピー符号化し、符号データを生成する。 The coding unit 110 entropy-encodes the residual coefficient generated by the conversion / quantization unit 105 and the prediction information input from the prediction unit 104 in sub-block units to generate code data. When the subblock of interest satisfies the condition of the above-mentioned PCM control index, that is, when the index corresponding to the number of pixels of the subblock is equal to or less than the maximum PCM control index and equal to or more than the minimum PCM control index, the encoding unit 110 sets the PCM flag. Encode. When the subblock of interest is PCM-encoded, "1" is entropy-encoded as the PCM flag input as prediction information, and the pixel value is further included in the code data. On the other hand, when the subblock of interest is not PCM-encoded (predictively encoded), the coding unit 110 entropy-encodes "0" as the PCM flag, and subsequently entropy-codes other prediction information and the residual coefficient. And generate code data.
 一方、注目サブブロックが上述の条件を満たさない場合、すなわち当該サブブロックの画素数に応じたインデックスが最大PCM制御インデックスより大きい、あるいは最小PCM制御インデックスより小さい場合は、符号化部110はPCMフラグの符号化を省略する。つまり、符号化部110は、PCMフラグを符号化せずに、予測情報や残差係数をエントロピー符号化し、符号データを生成する。 On the other hand, when the subblock of interest does not satisfy the above conditions, that is, when the index corresponding to the number of pixels of the subblock is larger than the maximum PCM control index or smaller than the minimum PCM control index, the encoding unit 110 sets the PCM flag. The coding of is omitted. That is, the coding unit 110 entropy-encodes the prediction information and the residual coefficient without encoding the PCM flag, and generates code data.
 エントロピー符号化の方法は特に指定しないが、ゴロム符号化、算術符号化、ハフマン符号化などを用いることができる。符号化部110は、生成した符号データを統合符号化部111に出力する。 The method of entropy coding is not specified, but Golomb coding, arithmetic coding, Huffman coding, etc. can be used. The coding unit 110 outputs the generated code data to the integrated coding unit 111.
 統合符号化部111は、PCM制御インデックスに関する情報を符号化する。本実施形態では、PCM制御インデックスとして、最大PCM制御インデックスおよび最小インデックスの2つが用いられているため、両方を符号化する。符号化の方法は特に特に問わないが、ゴロム符号化、算術符号化、ハフマン符号化などを用いることができる。また、両方のインデックスを符号化する代わりに、片方のインデックスとその差分を符号化することも可能である。例えば、最小PCM制御インデックスが2で最大PCM制御インデックスが4である場合、2と4をそれぞれ符号化する代わりに、最小PCM制御インデックス“2”と、差分の“2”を符号化することにより、符号化するデータ量を削減することもできる。また、これらの符号や符号化部110から入力された符号データなどを多重化してビットストリームを形成する。最終的には、ビットストリームは端子112から外部に出力される。 The integrated coding unit 111 encodes information related to the PCM control index. In the present embodiment, two PCM control indexes, a maximum PCM control index and a minimum index, are used, so both are encoded. The coding method is not particularly limited, but Golomb coding, arithmetic coding, Huffman coding, or the like can be used. It is also possible to encode one index and its difference instead of encoding both indexes. For example, when the minimum PCM control index is 2 and the maximum PCM control index is 4, instead of encoding 2 and 4, respectively, the minimum PCM control index “2” and the difference “2” are encoded. , The amount of data to be encoded can also be reduced. Further, these codes, code data input from the coding unit 110, and the like are multiplexed to form a bit stream. Eventually, the bitstream is output from terminal 112 to the outside.
 図6Aに符号化されたPCM制御インデックスに関する情報を含んだビットストリームの例を示す。PCM制御インデックスに関する情報はシーケンス、ピクチャ等のヘッダのいずれかに含まれる。本実施形態では、図6Aに示されるように、PCM制御インデックスに関する情報がピクチャのヘッダ部分に含まれるものとする。ただし、符号化される位置はこれに限られず、図6Bに示されるように、シーケンスのヘッダ部分に含まれても構わない。 FIG. 6A shows an example of a bitstream containing information about the encoded PCM control index. Information about the PCM control index is included in any of the headers such as sequences and pictures. In the present embodiment, as shown in FIG. 6A, it is assumed that the information regarding the PCM control index is included in the header portion of the picture. However, the encoded position is not limited to this, and may be included in the header portion of the sequence as shown in FIG. 6B.
 図3は、本実施形態に係る画像符号化装置における符号化処理を示すフローチャートである。 FIG. 3 is a flowchart showing a coding process in the image coding apparatus according to the present embodiment.
 S301にて、制御部100はブロック分割部102を制御し、入力した注目フレームを基本ブロック単位に分割させる。 In S301, the control unit 100 controls the block division unit 102 to divide the input attention frame into basic block units.
 S302にて、制御部100は生成部103を制御し、PCM符号化する単位を示すPCM制御インデックスを決定させる。生成部103は、決定したPCM制御インデックス情報を符号化させるため、統合符号化部111に供給する。 In S302, the control unit 100 controls the generation unit 103 to determine the PCM control index indicating the unit to be PCM encoded. The generation unit 103 supplies the determined PCM control index information to the integrated coding unit 111 in order to encode it.
 S303にて、制御部100は予測部104を制御し、S301にて生成された基本ブロック単位の画像データに対する予測誤差、予測情報を発生させる。以下、予測部104の予測処理を更に詳しく説明する。 In S303, the control unit 100 controls the prediction unit 104 to generate prediction error and prediction information for the image data of the basic block unit generated in S301. Hereinafter, the prediction process of the prediction unit 104 will be described in more detail.
(i)符号化しようとする注目サブブロックのインデックスがS302で生成されたPCM制御インデックスの条件を満たさない場合
 これは、注目サブブロックのインデックスが、最小PCM制御インデックスより小さい、もしくは、最大PCM制御インデックスよりも大きい場合に相当する。要するに、注目サブブロックが図9A~9Dにおける“不可”に対応する場合である。
(I) When the index of the attention subblock to be encoded does not satisfy the condition of the PCM control index generated in S302 This means that the index of the attention subblock is smaller than the minimum PCM control index or the maximum PCM control. Corresponds to the case where it is larger than the index. In short, it is the case where the subblock of interest corresponds to "impossible" in FIGS. 9A-9D.
 予測部104は、注目サブブロックと予測画像データとの画素単位の予測誤差を求め、その予測誤差と予測情報を出力する。このとき、予測部104は、予測情報にPCMフラグを含めない。注目サブブロックは、PCM符号化されず、必ず予測誤差、直交変換、量子化を経てエントロピー符号化されるのが約束されるからである。 The prediction unit 104 obtains the prediction error of the attention subblock and the prediction image data in pixel units, and outputs the prediction error and the prediction information. At this time, the prediction unit 104 does not include the PCM flag in the prediction information. This is because the subblock of interest is not PCM encoded and is guaranteed to be entropy encoded through prediction error, orthogonal transformation, and quantization.
(ii)符号化しようとする注目サブブロックのインデックスがS302で生成されたPCM制御インデックスによる条件を満たす場合
 これは、注目サブブロックのインデックスが、最小PCM制御インデックス、最大PCM制御インデックスの範囲内にあることを意味する。要するに、注目サブブロックが図9A~9Dにおける“可”に対応する場合である。
(Ii) When the index of the attention subblock to be encoded satisfies the condition by the PCM control index generated in S302, this means that the index of the attention subblock is within the range of the minimum PCM control index and the maximum PCM control index. It means that there is. In short, it is the case where the subblock of interest corresponds to "OK" in FIGS. 9A-9D.
 予測部104は、注目サブブロックと予測画像データとの予測誤差を求め、その予測誤差を求める。 The prediction unit 104 obtains the prediction error between the subblock of interest and the predicted image data, and obtains the prediction error.
 注目サブブロック内の画素数を“n”とし、各画素位置の予測誤差をe(x)(x=0、1、…、n-1)と表したとき、予測部104は次式(1)に従って1画素当たりの予測誤差Eを求める。
E=Σ|e(x)|/n  …(1)
ここで、|x|は実数xの絶対値を示している。そして、予測部104は、求めた1画素当たりの誤差Eと、予め設定した閾値Thとを比較する。そして、予測部104は、この比較結果に基づき、次の(ii-1)、(ii-2)のずれかの処理を行う。
When the number of pixels in the subblock of interest is "n" and the prediction error of each pixel position is expressed as e (x) (x = 0, 1, ..., N-1), the prediction unit 104 uses the following equation (1). ), The prediction error E per pixel is obtained.
E = Σ | e (x) | / n ... (1)
Here, | x | indicates the absolute value of the real number x. Then, the prediction unit 104 compares the obtained error E per pixel with the preset threshold value Th. Then, the prediction unit 104 performs the following processing of deviation between (ii-1) and (ii-2) based on the comparison result.
 なお、予測誤差の大小を判定できれば良いので、上記式(1)における絶対値を求める代わりに次式(2)のように二乗して予測誤差Eを求めてもよい。
E=Σe(x)2/n  …(2)
Since it is only necessary to determine the magnitude of the prediction error, the prediction error E may be obtained by squaring as in the following equation (2) instead of obtaining the absolute value in the above equation (1).
E = Σe (x) 2 / n ... (2)
(ii-1)  誤差Eが閾値より大きいとき(E>Thのとき)
 これは、注目サブブロックの符号量の削減が困難な状態であることを示している。故に、予測部104は、注目サブブロックについては、PCM符号化を行うものとして決定する。予測部104は、その決定を変換・量子化部105に通知し、値“1”のPCMフラグを含む予測情報を符号化部110や画像再生部107に出力する。この予測情報には、注目サブブロックの画素値が含まれる。
(ii-2)  誤差Eが閾値以下のとき(E≦Thのとき)
 これは、注目サブブロックを十分にその符号量の削減できることを示している。故に、予測部104は、注目サブブロックの予測誤差を変換・量子化部105に出力し、値“0”のPCMフラグを含む予測情報を符号化部110や画像再生部107に出力する。
(Ii-1) When the error E is larger than the threshold value (when E> Th)
This indicates that it is difficult to reduce the code amount of the subblock of interest. Therefore, the prediction unit 104 determines that the subblock of interest is to be PCM encoded. The prediction unit 104 notifies the conversion / quantization unit 105 of the determination, and outputs prediction information including the PCM flag having a value of “1” to the coding unit 110 and the image reproduction unit 107. This prediction information includes the pixel value of the subblock of interest.
(Ii-2) When the error E is equal to or less than the threshold value (when E ≦ Th)
This indicates that the subblock of interest can be sufficiently reduced in code amount. Therefore, the prediction unit 104 outputs the prediction error of the subblock of interest to the conversion / quantization unit 105, and outputs the prediction information including the PCM flag of the value “0” to the coding unit 110 and the image reproduction unit 107.
 以上が実施形態における予測部104の処理である。図3のフローチャートの説明に戻る。 The above is the processing of the prediction unit 104 in the embodiment. Returning to the description of the flowchart of FIG.
 S304にて、制御部100は変換・量子化部105を制御して、S303で算出された予測誤差に対して直交変換して変換係数を生成させ、さらに変換係数に対して量子化を行って残差係数を生成させる。ただし、注目サブブロックがPCM符号化されることが、予測部104より通知されている場合、変換・量子化部105は直交変換および量子化処理を実施しない。 In S304, the control unit 100 controls the conversion / quantization unit 105 to perform orthogonal conversion on the prediction error calculated in S303 to generate a conversion coefficient, and further perform quantization on the conversion coefficient. Generate a residual coefficient. However, when the prediction unit 104 notifies that the subblock of interest is PCM-encoded, the conversion / quantization unit 105 does not perform the orthogonal conversion and the quantization process.
 S305にて、制御部100は逆量子化・逆変換部106を制御し、S304で生成された注目サブブロックの残差係数を逆量子化・逆直交変換し、予測誤差を再生させる。ただし、注目サブブロックがPCM符号化される場合、逆量子化・逆変換部106は、この逆量子化・逆直交変換処理を実施しない。 In S305, the control unit 100 controls the inverse quantization / inverse conversion unit 106, inversely quantizes and inversely orthogonally transforms the residual coefficient of the subblock of interest generated in S304, and reproduces the prediction error. However, when the subblock of interest is PCM-encoded, the inverse quantization / inverse conversion unit 106 does not perform this inverse quantization / inverse orthogonal conversion processing.
 S306にて、制御部100は画像再生部107を制御し、注目サブブロックの画像を再生させる。具体的には、画像再生部107は、S303で生成された予測情報と、S305で生成された予測誤差から画像データを再生し、その画像データをフレームメモリ108に格納する。ただし、注目サブブロックがPCM符号化される場合、予測部104からの予測情報に含まれる画素で画像データを構築する。 In S306, the control unit 100 controls the image reproduction unit 107 to reproduce the image of the subblock of interest. Specifically, the image reproduction unit 107 reproduces image data from the prediction information generated in S303 and the prediction error generated in S305, and stores the image data in the frame memory 108. However, when the subblock of interest is PCM encoded, the image data is constructed with the pixels included in the prediction information from the prediction unit 104.
 S307にて、制御部100は符号化部110を制御し、注目サブブロックの符号化を行わせる。具体的には、符号化部110は、注目サブブロックのサイズと、PCM制御インデックス情報に基づき、S303で生成された予測情報およびS304で生成された残差係数を符号化し、符号データを生成する。 In S307, the control unit 100 controls the coding unit 110 to encode the subblock of interest. Specifically, the coding unit 110 encodes the prediction information generated in S303 and the residual coefficient generated in S304 based on the size of the subblock of interest and the PCM control index information, and generates code data. ..
 ただし、注目サブブロックのインデックスが、S302で生成されたPCM制御インデックスによる条件を満たす場合、符号化部110は、予測部104から供給されたPCMフラグをまず符号化する。そして、符号化部110は、PCMフラグが“1”である場合は、注目サブブロックをPCM符号化することになるので、注目サブブロックの画素値を符号データに含める。一方、注目サブブロックのPCMフラグが“0”である場合は、注目サブブロックはPCM符号化されないことを意味する。故に、符号化部110は、注目サブブロックに対する予測情報や残差係数をエントロピー符号化する。さらに他の符号データも含め、ビットストリームを生成する。 However, if the index of the subblock of interest satisfies the condition of the PCM control index generated in S302, the coding unit 110 first encodes the PCM flag supplied from the prediction unit 104. Then, when the PCM flag is "1", the coding unit 110 PCM-encodes the attention subblock, and therefore includes the pixel value of the attention subblock in the code data. On the other hand, when the PCM flag of the attention subblock is "0", it means that the attention subblock is not PCM encoded. Therefore, the coding unit 110 entropy encodes the prediction information and the residual coefficient for the subblock of interest. A bitstream is generated including other code data.
 S308にて、制御部100は、注目フレーム内の全ての基本ブロック、全サブブロックの符号化を終了したか否かを判定し、終了していれば処理をS309に、未終了であれば次の基本ブロックもしくは次のサブブロックを符号化対象とするため、処理をS303に戻す。 In S308, the control unit 100 determines whether or not the coding of all the basic blocks and all the sub-blocks in the frame of interest has been completed, and if it has finished, the process is set to S309, and if it has not finished, the process is next. The process is returned to S303 in order to encode the basic block or the next subblock of.
 S309にて、制御部100はインループフィルタ部109を制御し、S306で再生された画像データに対し、インループフィルタ処理を行い、フィルタ処理された画像を生成し、処理を終了する。PCM符号化されたサブブロックに属する画素に対しては、インループフィルタ処理をスキップしても良い。 In S309, the control unit 100 controls the in-loop filter unit 109, performs in-loop filter processing on the image data reproduced in S306, generates a filtered image, and ends the processing. The in-loop filter processing may be skipped for the pixels belonging to the PCM-encoded subblock.
 以上実施形態における画像符号化装置の符号化処理に係る構成とその動作を説明した。上記実施形態によれば、特にS303において、S302において生成されたPCM制御インデックス情報に基づいてPCM符号化サブブロックを選択することで、サブブロックの画素数に応じて適切にPCM符号化処理を可能にすることができる。 The configuration and operation related to the coding process of the image coding device in the embodiment have been described above. According to the above embodiment, particularly in S303, by selecting the PCM coded subblock based on the PCM control index information generated in S302, the PCM coding process can be appropriately performed according to the number of pixels of the subblock. Can be.
 なお、本実施形態では、PCM制御インデックスとして、最大PCM制御インデックスと最小PCM制御インデックスの2つを用いる構成としたが、これに限定されず、1つのみを用いる構成としても良い。例えば、最大PCM制御インデックス(上限)のみを用いる場合は、PCM符号化を行うサブブロックの最小サイズのみが示される。一方、最小PCMインデックス(下限)のみを用いる場合は、PCM符号化を行うサブブロックの最大サイズのみが示される。これは、特に実装上の制限からPCM符号化を行う最大もしくは最小サイズが自明である場合に有効であり、ヘッダ部分に含めるデータ量を削減することができる。 In the present embodiment, the maximum PCM control index and the minimum PCM control index are used as the PCM control index, but the configuration is not limited to this, and only one may be used. For example, when only the maximum PCM control index (upper limit) is used, only the minimum size of the PCM-encoded subblock is shown. On the other hand, when only the minimum PCM index (lower limit) is used, only the maximum size of the subblock to be PCM encoded is shown. This is particularly effective when the maximum or minimum size for PCM encoding is obvious due to implementation restrictions, and the amount of data included in the header portion can be reduced.
 また、図3のフローチャートは1フレーム画像の符号化の例であったが、PCM制御インデックスを動画像の符号化中に変更しないのであれば、2フレーム目以降はS302の処理は無くしても良い。 Further, although the flowchart of FIG. 3 is an example of coding a one-frame image, if the PCM control index is not changed during coding of the moving image, the processing of S302 may be omitted from the second frame onward. ..
 図2は、上記画像符号化装置で生成された符号化画像データから、サブブロック単位に画像を予測復号、もしくは、PCM復号する画像復号装置のブロック構成図である。以下、同図を参照し、復号処理に係る構成とその動作を説明する。 FIG. 2 is a block configuration diagram of an image decoding device that predictively decodes or PCM decodes an image in sub-block units from the coded image data generated by the image coding device. Hereinafter, the configuration and its operation related to the decoding process will be described with reference to the figure.
 画像復号装置は、装置全体の制御を司る制御部200を有する。この制御部200は、CPU、CPUが実行するプログラムを格納するROM、CPUのワークエリアとして利用するRAMを有する。また、画像復号装置は、入力端子201、分離復号部202、復号部203、逆量子化・逆変換部204、画像再生部205、フレームメモリ206、インループフィルタ部207、出力端子208を有する。 The image decoding device has a control unit 200 that controls the entire device. The control unit 200 has a CPU, a ROM for storing programs executed by the CPU, and a RAM used as a work area of the CPU. Further, the image decoding device has 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, and an output terminal 208.
 入力端子201は、符号化されたビットストリームを入力するものであり、入力源は例えば符号化ストリームを格納した記憶媒体であるが、ネットワークから入力しても良く、その種類は問わない。 The input terminal 201 inputs a coded bit stream, and the input source is, for example, a storage medium storing the coded stream, but it may be input from a network, and the type thereof does not matter.
 分離復号部202は、ビットストリームから復号処理に関する情報や残差係数に関する符号データに分離し、またビットストリームのヘッダ部に存在する符号データを復号する。本実施形態では、PCM制御インデックス情報を復号し、後段の復号部203に設定する。なお、分離復号部202は、図1の統合符号化部111と逆の動作を行うものでもある。 The separation / decoding unit 202 separates the bitstream into information related to the decoding process and code data related to the residual coefficient, and decodes the code data existing in the header part of the bitstream. In the present embodiment, the PCM control index information is decoded and set in the decoding unit 203 in the subsequent stage. The separation / decoding unit 202 also performs the reverse operation of the integrated coding unit 111 of FIG.
 復号部203は、分離復号部202から出力された符号データから、残差係数および予測情報を取得する(詳細後述)。 The decoding unit 203 acquires the residual coefficient and the prediction information from the code data output from the separation decoding unit 202 (details will be described later).
 逆量子化・逆変換部204は、サブブロック単位で入力された残差係数に対して逆量子化を行い、さらに逆直交変換を行うことにより予測誤差を得る。 The inverse quantization / inverse conversion unit 204 performs inverse quantization on the residual coefficient input in subblock units, and further performs inverse orthogonal transformation to obtain a prediction error.
 画像再生部205は、入力された予測情報に基づいて、フレームメモリ206を適宜参照して予測画像データを生成する。そして、画像再生部205は、この予測画像データと、逆量子化・逆変換部204から供給された予測誤差から再生画像データを生成し、フレームメモリ206に格納する。 The image reproduction unit 205 generates the predicted image data by appropriately referring to the frame memory 206 based on the input prediction information. Then, the image reproduction unit 205 generates the reproduction image data from the predicted image data and the prediction error supplied from the inverse quantization / inverse conversion unit 204, and stores the reproduced image data in the frame memory 206.
 インループフィルタ部207は、図1のインループフィルタ部109同様、再生画像に対し、デブロッキングフィルタなどのインループフィルタ処理を行い、フィルタ処理された画像を出力する。 Similar to the in-loop filter unit 109 in FIG. 1, the in-loop filter unit 207 performs in-loop filter processing such as a deblocking filter on the reproduced image, and outputs the filtered image.
 次に上記画像復号装置における画像の復号動作を以下に説明する。本実施形態では、先に説明した画像符号化装置により生成されたビットストリームを復号する。 Next, the image decoding operation in the above image decoding device will be described below. In the present embodiment, the bit stream generated by the image coding apparatus described above is decoded.
 分離復号部202は、入力端子201を介して入力したビットストリームから復号処理に関する情報や係数に関する符号データに分離し、ビットストリームのヘッダ部に存在する符号データを復号する。具体的には、分離復号部202は、図6Aに示されるビットストリームのピクチャヘッダからPCM制御インデックス情報を復号する。そして、分離復号部202は、このようにして得られた量子化制御インデックス情報を復号部203に設定する。さらに、分離復号部202は、ピクチャデータの基本ブロック単位の符号データを復号部203に出力する。 The separation / decoding unit 202 separates the bitstream input via the input terminal 201 into code data related to information related to decoding processing and coefficients, and decodes the code data existing in the header part of the bitstream. Specifically, the separation / decoding unit 202 decodes the PCM control index information from the picture header of the bitstream shown in FIG. 6A. Then, the separation / decoding unit 202 sets the quantization control index information thus obtained in the decoding unit 203. Further, the separation / decoding unit 202 outputs the code data of the basic block unit of the picture data to the decoding unit 203.
 復号部203は、符号データを復号し、残差係数および予測情報を取得する。具体的には、復号部203は、まずサブブロック分割の情報を取得し、基本ブロックを構成するサブブロックの情報を取得し、次に各サブブロックに対応する予測に関する情報を取得する。復号部203は、復号対象の注目サブブロックの画素数に基づいたインデックスが前述のPCM制御インデックスにより示される条件を満たすか否かを判定する。この条件を満たす場合、復号部203は、符号データからPCMフラグを取得し、当該サブブロックがPCM符号化されているか否かを判定する。すなわち、復号部203は、復号対象のサブブロックの画素数に基づいたインデックスが、最小PCM制御インデックス以上かつ最大PCM制御インデックス以下である場合にのみPCMフラグを取得する。一方、PCM制御インデックスに関する条件を満たさない場合は、PCMフラグは符号化されていない。そのため、復号部203は、当該サブブロックはPCM符号化されていないものと判定する。当該サブブロックがPCM符号化されている場合、予測情報から画素値を取得する。また、注目サブブロックがPCM符号化されていない場合、復号部203は、予測モードや動きベクトルなどの予測情報や残差係数を取得する。そして、復号部203は、残差係数を逆量子化・逆変換部204に出力し、取得された予測情報を画像再生部205に出力する。また、このとき、復号対象のサブブロックがPCM符号化されているか否かを示す情報を逆量子化・逆変換部204及び画像再生部205に出力する。 The decoding unit 203 decodes the code data and acquires the residual coefficient and the prediction information. Specifically, the decoding unit 203 first acquires the information on the subblock division, acquires the information on the subblocks constituting the basic block, and then acquires the information on the prediction corresponding to each subblock. The decoding unit 203 determines whether or not the index based on the number of pixels of the subblock of interest to be decoded satisfies the condition indicated by the above-mentioned PCM control index. When this condition is satisfied, the decoding unit 203 acquires the PCM flag from the code data and determines whether or not the subblock is PCM encoded. That is, the decoding unit 203 acquires the PCM flag only when the index based on the number of pixels of the subblock to be decoded is equal to or greater than the minimum PCM control index and equal to or less than the maximum PCM control index. On the other hand, if the conditions for the PCM control index are not met, the PCM flag is unencoded. Therefore, the decoding unit 203 determines that the subblock is not PCM encoded. When the subblock is PCM encoded, the pixel value is acquired from the prediction information. Further, when the subblock of interest is not PCM-encoded, the decoding unit 203 acquires prediction information such as a prediction mode and a motion vector, and a residual coefficient. Then, the decoding unit 203 outputs the residual coefficient to the inverse quantization / inverse conversion unit 204, and outputs the acquired prediction information to the image reproduction unit 205. At this time, information indicating whether or not the subblock to be decoded is PCM-encoded is output to the inverse quantization / inverse conversion unit 204 and the image reproduction unit 205.
 逆量子化・逆変換部204は、入力された残差係数に対し逆量子化を行って直交変換係数を生成し、さらに逆直交変換を施して予測誤差を再生する。そして、逆量子化・逆変換部204は、再生した予測誤差を画像再生部205に出力する。ただし、復号対象のサブブロックがPCM符号化されている場合には、逆量子化・逆変換部204は逆量子化および逆直交変換の処理は実施しない。 The inverse quantization / inverse conversion unit 204 performs inverse quantization on the input residual coefficient to generate an orthogonal transformation coefficient, and further performs inverse orthogonal transformation to reproduce the prediction error. Then, the inverse quantization / inverse conversion unit 204 outputs the reproduced prediction error to the image reproduction unit 205. However, when the sub-block to be decoded is PCM-encoded, the inverse quantization / inverse conversion unit 204 does not perform the inverse quantization and the inverse orthogonal transformation processing.
 画像再生部205は、復号部203から入力された予測情報に基づいて、フレームメモリ206を適宜参照し、予測画像を再生する。そして、画像再生部205は、この予測画像と逆量子化・逆変換部204から入力された予測誤差から画像データを再生し、フレームメモリ206に格納する。格納された画像データは予測の際の参照に用いられることになる。ただし、復号対象のサブブロックがPCM符号化されている場合、画像再生部205は、復号部203から予測情報として入力した画素値を用いて画像データを再生し、フレームメモリ206に入力し、格納する。 The image reproduction unit 205 appropriately refers to the frame memory 206 based on the prediction information input from the decoding unit 203, and reproduces the predicted image. Then, the image reproduction unit 205 reproduces the image data from the predicted image and the prediction error input from the inverse quantization / inverse conversion unit 204, and stores the image data in the frame memory 206. The stored image data will be used as a reference when making a prediction. However, when the subblock to be decoded is PCM-encoded, the image reproduction unit 205 reproduces the image data using the pixel values input as the prediction information from the decoding unit 203, inputs the image data to the frame memory 206, and stores the image data. To do.
 インループフィルタ部207は、図1のインループフィルタ部109と同様、フレームメモリ206から再生画像を読み出し、デブロッキングフィルタやサンプルアダプティブオフセットなどのインループフィルタ処理を行う。そして、フィルタ処理された画像は再びフレームメモリ206に入力される。なお、処理対象の画素が属するサブブロックがPCM符号化されている場合には、再生画像に劣化が生じていない。このため、インループフィルタ部207は、PCM符号化されたサブブロックから再生した画像に対しては、インループフィルタ処理をスキップしても良い。これにより、インループフィルタの処理分の演算量を低減させることができる。 Similar to the in-loop filter unit 109 in FIG. 1, the in-loop filter unit 207 reads the reproduced image from the frame memory 206 and performs in-loop filter processing such as a deblocking filter and a sample adaptive offset. Then, the filtered image is input to the frame memory 206 again. When the sub-block to which the pixel to be processed belongs is PCM-encoded, the reproduced image is not deteriorated. Therefore, the in-loop filter unit 207 may skip the in-loop filter processing for the image reproduced from the PCM-encoded subblock. As a result, the amount of calculation for the processing of the in-loop filter can be reduced.
 フレームメモリ206に格納された再生画像は、最終的には出力端子208から外部(例えばディスプレイ)に出力される。 The reproduced image stored in the frame memory 206 is finally output from the output terminal 208 to the outside (for example, a display).
 図4は、画像復号装置における制御部200の復号処理を示すフローチャートである。以下、同図を参照して、復号処理を説明する。 FIG. 4 is a flowchart showing a decoding process of the control unit 200 in the image decoding device. Hereinafter, the decoding process will be described with reference to the figure.
 S401にて、制御部200は分離復号部202を制御し、ビットストリームから復号処理に関する情報や係数に関する符号データに分離して、ヘッダ部分の符号データを復号し、PCM制御インデックス情報を取得する。そして、制御部200は、取得したPCM制御インデックス情報を復号部203に設定する。 In S401, the control unit 200 controls the separation / decoding unit 202, separates the bitstream into information related to decoding processing and code data related to coefficients, decodes the code data of the header portion, and acquires PCM control index information. Then, the control unit 200 sets the acquired PCM control index information in the decoding unit 203.
 S402にて、制御部200は復号部203を制御し、S401で分離された符号データの復号を行わせ、サブブロックの分割情報、残差係数、予測情報を取得させる。このとき、復号部203は、復号しようとしている注目サブブロックの画素数に応じたインデックスと、S401で取得したPCM制御インデックスとを比較し、PCM制御インデックスによる条件を満たすか否かを判定する。PCM制御インデックスによる条件を満たす場合、復号部203は、符号化データからPCMフラグを取得し、このPCMフラグに基づき当該サブブロックがPCM符号化されているか否かを判定する。当該サブブロックがPCM符号化されている場合、復号部203は、符号データから画素値を取得する。一方、当該サブブロックがPCM符号化されていない場合、復号部203は、予測モードや動きベクトルなどの予測情報や残差係数を取得する。 In S402, the control unit 200 controls the decoding unit 203 to decode the code data separated in S401, and acquire the subblock division information, the residual coefficient, and the prediction information. At this time, the decoding unit 203 compares the index corresponding to the number of pixels of the subblock of interest to be decoded with the PCM control index acquired in S401, and determines whether or not the condition according to the PCM control index is satisfied. When the condition by the PCM control index is satisfied, the decoding unit 203 acquires the PCM flag from the coded data and determines whether or not the subblock is PCM-encoded based on the PCM flag. When the subblock is PCM-encoded, the decoding unit 203 acquires the pixel value from the code data. On the other hand, when the sub-block is not PCM-encoded, the decoding unit 203 acquires prediction information such as a prediction mode and a motion vector, and a residual coefficient.
 S403にて、制御部200は逆量子化・逆変換部204を制御し、サブブロック単位で残差係数に対し逆量子化を行い、さらに逆直交変換を行うことにより、予測誤差を取得させる。ただし、復号対象のサブブロックがPCM符号化されている場合には、逆量子化・逆変換部204は、逆量子化および逆直交変換の処理を実施しない。 In S403, the control unit 200 controls the inverse quantization / inverse conversion unit 204, performs inverse quantization on the residual coefficient in subblock units, and further performs inverse orthogonal transformation to acquire a prediction error. However, when the subblock to be decoded is PCM-encoded, the inverse quantization / inverse conversion unit 204 does not perform the inverse quantization and inverse orthogonal transformation processing.
 S404にて、制御部200は画像再生部205を制御し画像を再生させる。具体的には、画像再生部205は、S402で取得された予測情報に基づいて予測画像を再生し、さらに再生された予測画像とS403で生成された予測誤差から画像データを再生する。ただし、復号対象のサブブロックがPCM符号化されている場合には、画像再生部205は、S402で取得された予測情報に含まれる画素値を用いて画像データを再生する。画像再生部205は再生した画像データをフレームメモリ206に格納する。 In S404, the control unit 200 controls the image reproduction unit 205 to reproduce the image. Specifically, the image reproduction unit 205 reproduces the predicted image based on the prediction information acquired in S402, and further reproduces the image data from the reproduced predicted image and the prediction error generated in S403. However, when the subblock to be decoded is PCM-encoded, the image reproduction unit 205 reproduces the image data using the pixel values included in the prediction information acquired in S402. The image reproduction unit 205 stores the reproduced image data in the frame memory 206.
 S405にて、制御部200は、フレーム内の全ての基本ブロックの全サブブロックの復号が終了したか否かを判定する。終了していると判定した場合、制御部200は処理をS406に進め、未復号のサブブロックが存在する場合には、次のサブブロックを復号するため、処理をS402に戻す。 In S405, the control unit 200 determines whether or not the decoding of all the subblocks of all the basic blocks in the frame has been completed. If it is determined that the process is completed, the control unit 200 advances the process to S406, and if there is an undecoded subblock, the process returns to S402 in order to decode the next subblock.
 S406にて、制御部200はインループフィルタ部207を制御し、フレームメモリ206に格納された画像データに対し、インループフィルタ処理を行い、フィルタ処理された画像をフレームメモリ206に再格納し、処理を終える。ただし、処理対象の画素が属するサブブロックがPCM符号化されている場合には、再生画像に劣化が生じていない。このため、インループフィルタ部207は、PCM符号化されたサブブロックの再生画像に対しては、インループフィルタ処理をスキップすることも可能である。 In S406, the control unit 200 controls the in-loop filter unit 207, performs in-loop filter processing on the image data stored in the frame memory 206, and re-stores the filtered image in the frame memory 206. Finish the process. However, when the subblock to which the pixel to be processed belongs is PCM-encoded, the reproduced image is not deteriorated. Therefore, the in-loop filter unit 207 can skip the in-loop filter processing for the reproduced image of the PCM-encoded subblock.
 以上の構成と動作により、PCM制御インデックス情報に基づいて、サブブロックの画素数に応じて適切にPCM符号化が制御されたビットストリームを復号することができる。 With the above configuration and operation, it is possible to decode a bit stream whose PCM coding is appropriately controlled according to the number of pixels of the subblock based on the PCM control index information.
 なお、画像復号装置において、図6Aに示すように、量子化制御インデックス情報がピクチャヘッダ部分に含まれているビットストリームを復号するものとしたが、この情報の符号化位置はこれに限定されない。図6Bに示されるように画像のシーケンスヘッダ部分で符号化されていても良いし、他の位置で符号化されていても構わない。 In the image decoding device, as shown in FIG. 6A, the bit stream in which the quantization control index information is included in the picture header portion is decoded, but the coding position of this information is not limited to this. As shown in FIG. 6B, it may be encoded at the sequence header portion of the image, or it may be encoded at another position.
 また、本実施形態では、PCM制御インデックスとして、最大PCM制御インデックスと最小PCM制御インデックスの2つを用いる構成としたが、これに限定されず、1つのみを用いる構成としても良い。例えば、最大PCM制御インデックスのみを用いる場合は、PCM符号化を行う最小サイズのみが示され、PCM符号化を行う最大サイズは基本ブロックのサイズと同じになるといった具合である。一方、最小PCMインデックスのみを用いる場合は、PCM符号化を行う最大サイズのみが示され、PCM符号化を行う最小サイズはサブブロックの最小サイズと同じになる。これは、特に実装上の制限からPCM符号化を行う最大もしくは最小サイズが自明である場合に有効であり、ヘッダ部分に含めるデータ量を削減したビットストリームを復号することができる。 Further, in the present embodiment, the maximum PCM control index and the minimum PCM control index are used as the PCM control index, but the configuration is not limited to this, and only one may be used. For example, when only the maximum PCM control index is used, only the minimum size for PCM coding is shown, and the maximum size for PCM coding is the same as the size of the basic block. On the other hand, when only the minimum PCM index is used, only the maximum size for PCM coding is shown, and the minimum size for PCM coding is the same as the minimum size for subblocks. This is particularly effective when the maximum or minimum size for PCM encoding is obvious due to implementation restrictions, and it is possible to decode a bit stream in which the amount of data included in the header portion is reduced.
 [第2の実施形態]
 上記第1の実施形態の画像符号化装置及び画像復号装置が有する各処理部は、ハードウェアでもって構成しているものとして説明した。しかし、これらの図に示した各処理部で行う処理を、コンピュータプログラムでもって構成しても良い。
[Second Embodiment]
Each processing unit included in the image coding device and the image decoding device of the first embodiment has been 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.
 図5は、上記実施形態に係る画像符号化装置、画像復号装置に適用可能なコンピュータのハードウェアの構成例を示すブロック図である。 FIG. 5 is a block diagram showing a configuration example of computer hardware applicable to the image coding device and the image decoding device according to the above embodiment.
 CPU501は、RAM502やROM503に格納されているコンピュータプログラムやデータを用いてコンピュータ全体の制御を行うと共に、上記実施形態に係る画像処理装置が行うものとして上述した各処理を実行する。即ち、CPU501は、図1、図2に示した各処理部として機能することになる。 The CPU 501 controls the entire computer by using the computer programs and data stored in the RAM 502 and the ROM 503, and executes each of the above-described processes as performed by the image processing device according to the above embodiment. That is, the CPU 501 functions as each processing unit shown in FIGS. 1 and 2.
 RAM502は、外部記憶装置506、I/F(インターフェース)507を介して外部から取得したプログラムやデータなどを一時的に記憶するためのエリアを有する。更に、RAM502は、CPU501が各種の処理を実行する際に用いるワークエリアとしても利用される。RAM502は、例えば、フレームメモリとして割り当てたり、その他の各種のエリアを適宜提供したりすることができる。 The RAM 502 has an area for temporarily storing programs and data acquired from the outside via the external storage device 506 and the I / F (interface) 507. Further, the RAM 502 is also used as a work area used by the CPU 501 when executing various processes. The RAM 502 can be allocated as a frame memory, for example, or various other areas can be provided as appropriate.
 ROM503には、本コンピュータの設定データや、ブートプログラムなどが格納されている。操作部504は、キーボードやマウスなどにより構成されており、本コンピュータのユーザが操作することで、各種の指示をCPU501に対して入力することができる。表示部505は、CPU501による処理結果を表示する。また表示部505は例えば液晶ディスプレイで構成される。 The ROM 503 stores the setting data of this computer, the boot program, and the like. The operation unit 504 is composed of a keyboard, a mouse, and the like, and can be operated by a 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.
 外部記憶装置506は、ハードディスクドライブ装置に代表される、大容量情報記憶装置である。外部記憶装置506には、OS(オペレーティングシステム)や、図1、図2に示した各部の機能をCPU501に実現させるためのコンピュータプログラム(アプリケーションプログラム)が保存されている。更には、外部記憶装置506には、処理対象としての各画像データが保存されていても良い。 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 (application program) for realizing the functions of the respective parts shown in FIGS. 1 and 2 in the CPU 501. Further, each image data as a processing target may be stored in the external storage device 506.
 外部記憶装置506に保存されているコンピュータプログラムやデータは、CPU501による制御に従って適宜、RAM502にロードされ、CPU501による処理対象となる。I/F507には、LANやインターネット等のネットワーク、投影装置や表示装置などの他の機器を接続することができ、本コンピュータはこのI/F507を介して様々な情報を取得したり、送出したりすることができる。508は上述の各部を繋ぐバスである。 The computer programs and data stored in the external storage device 506 are appropriately loaded into the RAM 502 according to the control by the CPU 501, and are processed by the CPU 501. A network such as a LAN or the Internet, or other devices such as a projection device or a display device can be connected to the I / F 507, and the computer acquires and sends various information via the I / F 507. Can be done. Reference numeral 508 is a bus connecting the above-mentioned parts.
 上記構成において、本装置に電源が投入されると、CPU501はROM503に格納されたブートプログラムを実行し、外部記憶装置506に格納されたOSをRAM502にロードし実行する。そして、CPU501は、OSの制御下にて、外部記憶装置506から符号化、或いは、復号に係るアプリケーションプログラムをRAM502にロードし、実行する。この結果、CPU501は、図1或いは図2の各処理部として機能し、本装置が画像符号化装置、或いは、画像復号装置として機能することになる。 In the above configuration, when the power is turned on to the present device, the CPU 501 executes the boot program stored in the ROM 503, loads the OS stored in the external storage device 506 into the RAM 502, and executes the boot program. Then, under the control of the OS, the CPU 501 loads the application program related to encoding or decoding from the external storage device 506 into the RAM 502 and executes it. As a result, the CPU 501 functions as each processing unit of FIG. 1 or 2, and the present device functions as an image coding device or an image decoding device.
 (その他の実施例)
 本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。
(Other Examples)
The present invention supplies a program that realizes one or more functions of the above-described embodiment to a system or device via a network or storage medium, and one or more processors in the computer of the system or device reads and executes the program. It can also be realized by the processing to be performed. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.
 発明は上記実施形態に制限されるものではなく、発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、発明の範囲を公にするために請求項を添付する。 The invention is not limited to the above embodiment, and various modifications and modifications can be made without departing from the spirit and scope of the invention. Therefore, a claim is attached to make the scope of the invention public.
 本願は、2019年6月20日提出の日本国特許出願特願2019-114935を基礎として優先権を主張するものであり、その記載内容の全てを、ここに援用する。 This application claims priority based on Japanese Patent Application No. 2019-114935 submitted on June 20, 2019, and all the contents thereof are incorporated herein by reference.

Claims (14)

  1.  画像を符号化する画像符号化装置であって、
     符号化対象の画像を複数の基本ブロックに分割し、当該基本ブロックを更に複数のサブブロックに分割する分割手段と、
     該分割手段で得た注目サブブロックの画像と予測画像との差である予測誤差を求める予測手段と、
     注目サブブロックの前記予測誤差を符号化する予測符号化手段と、
     前記注目サブブロックの画素値をPCM符号化するPCM符号化手段と、
     前記予測符号化手段、前記PCM符号化手段のいずれを用いて前記注目サブブロックの符号化データを生成するかを制御する制御手段とを有し、
     前記制御手段は、
       前記注目サブブロックに含まれる画素数で特定されるサイズが予め設定した所定の範囲である場合は前記予測符号化手段、前記PCM符号化手段のいずれかを利用するように制御し、
       前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲を外れる場合は、前記予測符号化手段を利用するように制御する
     ことを特徴とする画像符号化装置。
    An image coding device that encodes an image.
    A dividing means for dividing an image to be encoded into a plurality of basic blocks and further dividing the basic block into a plurality of sub-blocks.
    A prediction means for obtaining a prediction error, which is the difference between the image of the subblock of interest obtained by the division means and the prediction image, and
    A predictive coding means that encodes the prediction error of the subblock of interest,
    A PCM coding means for PCM coding the pixel value of the subblock of interest,
    It has a control means for controlling whether the predictive coding means or the PCM coding means is used to generate the coded data of the subblock of interest.
    The control means
    When the size specified by the number of pixels included in the attention subblock is within a predetermined range set in advance, control is performed so as to use either the predictive coding means or the PCM coding means.
    An image coding apparatus, characterized in that when the size specified by the number of pixels included in the attention subblock is out of the range, control is performed so as to use the predictive coding means.
  2.  前記制御手段は、前記予測誤差に基づき前記予測符号化手段、前記PCM符号化手段のいずれを用いて前記注目サブブロックの符号化データを生成するかを制御する
    ことを特徴とする請求項1に記載の画像符号化装置。
    The first aspect of the present invention is characterized in that the control means controls whether the prediction coding means or the PCM coding means is used to generate the coded data of the subblock of interest based on the prediction error. The image encoding device described.
  3.  前記制御手段は、
      前記注目サブブロックに含まれる画素数で特定されるサイズが予め設定した範囲に属し、且つ、前記予測誤差が予め設定された閾値以下である場合は前記予測符号化手段を利用するように制御し、
      前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲に属し、且つ、前記予測誤差が前記閾値より大きい場合は前記PCM符号化手段を利用するように制御し、
      前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲を外れる場合は、前記予測符号化手段を利用するように制御する
     ことを特徴とする請求項2に記載の画像符号化装置。
    The control means
    When the size specified by the number of pixels included in the attention subblock belongs to a preset range and the prediction error is equal to or less than a preset threshold value, the prediction coding means is controlled to be used. ,
    When the size specified by the number of pixels included in the attention subblock belongs to the range and the prediction error is larger than the threshold value, the PCM coding means is controlled to be used.
    The image coding apparatus according to claim 2, wherein when the size specified by the number of pixels included in the attention subblock is out of the range, the prediction coding means is controlled to be used.
  4.  前記サブブロックに含まれる画素数に応じて、当該サブブロックを、前記基本ブロックのサイズから小さくなるにつれて大きい値のインデックスを付け、当該インデックスを用いて前記範囲を設定する設定手段を更に備えることを特徴とする請求項1に記載の画像符号化装置。 According to the number of pixels included in the sub-block, the sub-block is indexed with a larger value as it becomes smaller than the size of the basic block, and a setting means for setting the range using the index is further provided. The image coding apparatus according to claim 1.
  5.  前記設定手段は、前記インデックスの取り得る範囲の最小のインデックスと最大のインデックスにより、前記範囲を設定することを特徴とする請求項4に記載の画像符号化装置。 The image coding apparatus according to claim 4, wherein the setting means sets the range by the minimum index and the maximum index of the possible range of the index.
  6.  前記設定手段は、前記インデックスの取り得る範囲の下限を設定することで前記範囲を設定することを特徴とする請求項4に記載の画像符号化装置。 The image coding apparatus according to claim 4, wherein the setting means sets the range by setting a lower limit of a range that the index can take.
  7.  前記設定手段は、前記インデックスの取り得る範囲の上限を設定することで前記範囲を設定することを特徴とする請求項4に記載の画像符号化装置。 The image coding apparatus according to claim 4, wherein the setting means sets the range by setting an upper limit of a range that the index can take.
  8.  前記予測符号化手段は、前記予測誤差を直交変換し、当該直交変換で得た変換係数を量子化し、量子化後の変換係数をエントロピー符号化することを特徴とする請求項1乃至7のいずれか1項に記載の画像符号化装置。 Any of claims 1 to 7, wherein the prediction coding means orthogonally transforms the prediction error, quantizes the conversion coefficient obtained by the orthogonal transformation, and entropy-codes the conversion coefficient after quantization. The image coding apparatus according to item 1.
  9.  前記制御手段は、
       前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲に属する場合は、前記PCM符号化手段、前記予測符号化手段のいずれで符号化されたのかを示すためのフラグを前記注目サブブロックの符号データに含め、
       前記注目サブブロックに含まれる画素数で特定されるサイズが前記所定の範囲に属しない場合は、前記フラグを前記注目サブブロックの符号データに含めない
     ことを特徴とする請求項1乃至8のいずれか1項に記載の画像符号化装置。
    The control means
    When the size specified by the number of pixels included in the attention subblock belongs to the range, a flag for indicating whether the size is encoded by the PCM coding means or the prediction coding means is set as the attention sub. Included in the block code data
    Any of claims 1 to 8, wherein the flag is not included in the code data of the attention subblock when the size specified by the number of pixels included in the attention subblock does not belong to the predetermined range. The image coding apparatus according to item 1.
  10.  フレーム画像から予め設定されたサイズの基本ブロックに分離し、当該基本ブロックを更に分割したサブブロックを単位として符号化された画像データを復号する画像復号装置であって、
     符号化対象のビットストリームから、前記サブブロックの符号化データを分離する分離手段と、
     該分離手段で得た注目サブブロックの符号化データを、予測復号する予測復号手段と、
     前記注目サブブロックの符号化データをPCM復号するPCM復号手段と、
     前記注目サブブロックの符号化データに基づいて、前記予測復号手段、前記PCM復号手段のいずれを用いるかを制御する制御手段とを有し、
     前記制御手段は、
       前記注目サブブロックに含まれる画素数で特定されるサイズが予め設定した範囲にある場合は、前記注目サブブロックの符号化データに含まれる所定のフラグで特定される、前記予測復号手段、前記PCM復号手段の一方を用いて復号し、
       前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲から外れる場合は、前記注目サブブロックの符号化データを、前記予測復号手段を用いて復号する
     ことを特徴とする画像復号装置。
    An image decoding device that separates a frame image into basic blocks of a preset size and decodes the encoded image data in units of subblocks obtained by further dividing the basic block.
    A separation means for separating the coded data of the subblock from the bit stream to be encoded, and
    A predictive decoding means for predictively decoding the coded data of the subblock of interest obtained by the separation means,
    A PCM decoding means for PCM decoding the coded data of the subblock of interest,
    It has a control means for controlling whether to use the predictive decoding means or the PCM decoding means based on the encoded data of the attention subblock.
    The control means
    When the size specified by the number of pixels included in the attention subblock is within a preset range, the predictive decoding means and the PCM specified by a predetermined flag included in the coded data of the attention subblock. Decrypt using one of the decoding means,
    An image decoding apparatus characterized in that when the size specified by the number of pixels included in the attention subblock is out of the range, the coded data of the attention subblock is decoded by using the predictive decoding means.
  11.  画像を符号化する画像符号化方法であって、
     符号化対象の画像を複数の基本ブロックに分割し、当該基本ブロックを更に複数のサブブロックに分割する分割工程と、
     該分割工程で得た注目サブブロックの画像と予測画像との差である予測誤差を求める予測工程と、
     注目サブブロックの前記予測誤差を符号化する予測符号化工程と、
     前記注目サブブロックの画素値をPCM符号化するPCM符号化工程と、
     前記予測符号化工程、前記PCM符号化工程のいずれを用いて前記注目サブブロックの符号化データを生成するかを制御する制御工程とを有し、
     前記制御工程では、
       前記注目サブブロックに含まれる画素数で特定されるサイズが予め設定した所定の範囲である場合は前記予測符号化工程、前記PCM符号化工程のいずれかを利用するように制御し、
       前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲を外れる場合は、前記予測符号化工程を利用するように制御する
     ことを特徴とする画像符号化方法。
    An image coding method that encodes an image.
    A division step of dividing an image to be encoded into a plurality of basic blocks and further dividing the basic block into a plurality of sub-blocks.
    A prediction step for obtaining a prediction error, which is the difference between the image of the subblock of interest obtained in the division step and the prediction image, and
    A prediction coding step that encodes the prediction error of the subblock of interest,
    A PCM coding step of PCM coding the pixel value of the subblock of interest,
    It has a control step of controlling whether the prediction coding step or the PCM coding step is used to generate the coded data of the subblock of interest.
    In the control step,
    When the size specified by the number of pixels included in the attention subblock is within a predetermined range set in advance, control is performed so as to use either the prediction coding step or the PCM coding step.
    An image coding method characterized in that when the size specified by the number of pixels included in the attention subblock is out of the range, control is performed so as to use the predictive coding step.
  12.  フレーム画像から予め設定されたサイズの基本ブロックに分離し、当該基本ブロックを更に分割したサブブロックを単位として符号化された画像データを復号する画像復号方法であって、
     符号化対象のビットストリームから、前記サブブロックの符号化データを分離する分離工程と、
     該分離工程で得た注目サブブロックの符号化データを、予測復号する予測復号工程と、
     前記注目サブブロックの符号化データをPCM復号するPCM復号工程と、
     前記注目サブブロックの符号化データに基づいて、前記予測復号工程、前記PCM復号工程のいずれを用いるかを制御する制御工程とを有し、
     前記制御工程では、
       前記注目サブブロックに含まれる画素数で特定されるサイズが予め設定した範囲にある場合は、前記注目サブブロックの符号化データに含まれる所定のフラグで特定される、前記予測復号工程、前記PCM復号工程の一方を用いて復号し、
       前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲から外れる場合は、前記注目サブブロックの符号化データを、前記予測復号工程を用いて復号する
     ことを特徴とする画像復号方法。
    It is an image decoding method that separates a frame image into a basic block of a preset size and decodes the encoded image data in units of subblocks obtained by further dividing the basic block.
    A separation step of separating the coded data of the subblock from the bit stream to be encoded, and
    A predictive decoding step of predictively decoding the coded data of the subblock of interest obtained in the separation step,
    A PCM decoding step of PCM decoding the coded data of the subblock of interest, and
    It has a control step of controlling whether to use the predictive decoding step or the PCM decoding step based on the encoded data of the attention subblock.
    In the control step,
    When the size specified by the number of pixels included in the attention subblock is within a preset range, the predictive decoding step, the PCM, which is specified by a predetermined flag included in the coded data of the attention subblock. Decrypt using one of the decoding steps
    An image decoding method, characterized in that, when the size specified by the number of pixels included in the attention subblock is out of the range, the encoded data of the attention subblock is decoded by using the predictive decoding step.
  13.  コンピュータが読み込み実行することで、前記コンピュータに、画像符号化方法の工程を実行させるためのプログラムであって、前記方法は、
     符号化対象の画像を複数の基本ブロックに分割し、当該基本ブロックを更に複数のサブブロックに分割する分割工程と、
     該分割工程で得た注目サブブロックの画像と予測画像との差である予測誤差を求める予測工程と、
     注目サブブロックの前記予測誤差を符号化する予測符号化工程と、
     前記注目サブブロックの画素値をPCM符号化するPCM符号化工程と、
     前記予測符号化工程、前記PCM符号化工程のいずれを用いて前記注目サブブロックの符号化データを生成するかを制御する制御工程とを有し、
     前記制御工程では、
       前記注目サブブロックに含まれる画素数で特定されるサイズが予め設定した所定の範囲である場合は前記予測符号化工程、前記PCM符号化工程のいずれかを利用するように制御し、
       前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲を外れる場合は、前記予測符号化工程を利用するように制御する
     ことを特徴とするコンピュータプログラム。
    A program for causing the computer to execute the process of the image coding method by being read and executed by the computer.
    A division step of dividing an image to be encoded into a plurality of basic blocks and further dividing the basic block into a plurality of sub-blocks.
    A prediction step for obtaining a prediction error, which is the difference between the image of the subblock of interest obtained in the division step and the prediction image, and
    A prediction coding step that encodes the prediction error of the subblock of interest,
    A PCM coding step of PCM coding the pixel value of the subblock of interest,
    It has a control step of controlling whether the prediction coding step or the PCM coding step is used to generate the coded data of the subblock of interest.
    In the control step,
    When the size specified by the number of pixels included in the attention subblock is within a predetermined range set in advance, control is performed so as to use either the prediction coding step or the PCM coding step.
    A computer program characterized in that when the size specified by the number of pixels included in the attention subblock is out of the range, control is performed so as to use the predictive coding step.
  14.  コンピュータが読み込み実行することで、前記コンピュータに、フレーム画像から予め設定されたサイズの基本ブロックに分離し、当該基本ブロックを更に分割したサブブロックを単位として符号化された画像データを復号する画像復号方法の各工程を実行させるためのプログラムであって、前記方法は、
     符号化対象のビットストリームから、前記サブブロックの符号化データを分離する分離工程と、
     該分離工程で得た注目サブブロックの符号化データを、予測復号する予測復号工程と、
     前記注目サブブロックの符号化データをPCM復号するPCM復号工程と、
     前記注目サブブロックの符号化データに基づいて、前記予測復号工程、前記PCM復号工程のいずれを用いるかを制御する制御工程とを有し、
     前記制御工程では、
       前記注目サブブロックに含まれる画素数で特定されるサイズが予め設定した範囲にある場合は、前記注目サブブロックの符号化データに含まれる所定のフラグで特定される、前記予測復号工程、前記PCM復号工程の一方を用いて復号し、
       前記注目サブブロックに含まれる画素数で特定されるサイズが前記範囲から外れる場合は、前記注目サブブロックの符号化データを、前記予測復号工程を用いて復号する
     ことを特徴とするコンピュータプログラム。
    When the computer reads and executes the image, the computer separates the frame image into a basic block having a preset size, and decodes the encoded image data in units of subblocks obtained by further dividing the basic block. A program for executing each step of the method, wherein the method is
    A separation step of separating the coded data of the subblock from the bit stream to be encoded, and
    A predictive decoding step of predictively decoding the coded data of the subblock of interest obtained in the separation step,
    A PCM decoding step of PCM decoding the coded data of the subblock of interest, and
    It has a control step of controlling whether to use the predictive decoding step or the PCM decoding step based on the encoded data of the attention subblock.
    In the control step,
    When the size specified by the number of pixels included in the attention subblock is within a preset range, the predictive decoding step, the PCM, which is specified by a predetermined flag included in the coded data of the attention subblock. Decrypt using one of the decoding steps
    A computer program characterized in that when the size specified by the number of pixels included in the attention subblock is out of the range, the coded data of the attention subblock is decoded by using the predictive decoding step.
PCT/JP2020/022818 2019-06-20 2020-06-10 Image encoding device, image decoding device, method, and computer program WO2020255820A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019114935A JP2021002724A (en) 2019-06-20 2019-06-20 Image encoding device, image decoding device, method, and program
JP2019-114935 2019-06-20

Publications (1)

Publication Number Publication Date
WO2020255820A1 true WO2020255820A1 (en) 2020-12-24

Family

ID=73995161

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/022818 WO2020255820A1 (en) 2019-06-20 2020-06-10 Image encoding device, image decoding device, method, and computer program

Country Status (2)

Country Link
JP (1) JP2021002724A (en)
WO (1) WO2020255820A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140092984A1 (en) * 2012-10-01 2014-04-03 General Instrument Corporation Processing of pulse code modulation (pcm) parameters

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140092984A1 (en) * 2012-10-01 2014-04-03 General Instrument Corporation Processing of pulse code modulation (pcm) parameters

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BROSS B; CHEN J; LIU S: "Versatile Video Coding (Draft 5)", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/ SC 29/WG 11, JVET-N1001 (VERSION 7), 14TH MEETING, no. JVET-N1001-v7, 29 May 2019 (2019-05-29), Geneva, CH, pages 32 - 34 , 53-57, 72-80, 108-114, XP030205196 *
KEIICHI CHONO; HIROFUMI AOKI; YUZO SENDA (NEC): "Pulse code modulation mode for HEVC", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JGT-VC) OF ITU-T SG 16 WP3 AND ISO/IEC JTCI/SC29/WG11, JCTVC- E057-R3, 5TH MEETING, no. JCTVC-E057-R3- m19565, 10 March 2011 (2011-03-10), Geneva, CH, pages 1 - 22, XP030008563 *
Y-C SUN; AN J; LOU (ALIBABA) J: "PCM mode with dual tree partition", JOINT VIDEO EXPERTS TEAM (JVET) OF ITU-T SC 16 WP 3 AND ISO/IEC JTC I/SC 29/ WG 11, JVET-L0209-V3, 12TH MEETING, no. JVET-L0209-v3, 5 October 2018 (2018-10-05), Macao, CN, pages 1 - 3, XP030251157 *

Also Published As

Publication number Publication date
JP2021002724A (en) 2021-01-07

Similar Documents

Publication Publication Date Title
WO2020184229A1 (en) Image encoding device, image encoding method, and program
JP2024015184A (en) Image decoding device and method, and program
JP2023181542A (en) Image encoding device, image decoding device, control method thereof, and program
WO2021053986A1 (en) Image encoding device, image encoding method, image decoding device, image decoding method, and program
WO2020255820A1 (en) Image encoding device, image decoding device, method, and computer program
WO2020255688A1 (en) Image encoding device, image decoding device and method, and program
WO2020184223A1 (en) Image decoder, image decoding method, and program
WO2020184227A1 (en) Image decoder, image decoding method, and program
KR102599267B1 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method and program
WO2020003740A1 (en) Image coding device, image decoding device, control methods therefor, and program
WO2020179365A1 (en) Image encoding device, image encoding method, image decoding device, and image decoding method
WO2021187023A1 (en) Image encoding device, image encoding method and program, image decoding device, and image decoding method and program
JP7508675B2 (en) Image encoding device, image encoding method, and program, image decoding device, image decoding method, and program
WO2020255689A1 (en) Image coding device, image decoding device, method, and program
WO2021054011A1 (en) Image encoding device, image encoding method and program, image decoding device, image decoding method, and program
JP7508676B2 (en) Image encoding device, image encoding method, and program, image decoding device, image decoding method, and program
WO2021054012A1 (en) Image encoding device, image decoding device, control method therefor, and program
WO2021049277A1 (en) Image coding device and image decoding device
WO2020183859A1 (en) Image coding device, image decoding device, image coding method, image decoding method, and program
JP2021150723A (en) Image encoding device, image encoding method and program, and image decoding device, image decoding method and program

Legal Events

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

Ref document number: 20827487

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20827487

Country of ref document: EP

Kind code of ref document: A1