WO2012120910A1 - Moving image coding device and moving image coding method - Google Patents

Moving image coding device and moving image coding method Download PDF

Info

Publication number
WO2012120910A1
WO2012120910A1 PCT/JP2012/001671 JP2012001671W WO2012120910A1 WO 2012120910 A1 WO2012120910 A1 WO 2012120910A1 JP 2012001671 W JP2012001671 W JP 2012001671W WO 2012120910 A1 WO2012120910 A1 WO 2012120910A1
Authority
WO
WIPO (PCT)
Prior art keywords
code string
encoding
image
residual
coefficient
Prior art date
Application number
PCT/JP2012/001671
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 WO2012120910A1 publication Critical patent/WO2012120910A1/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/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • the present invention relates to a moving image encoding apparatus and a moving image encoding method for encoding an input moving image by dividing it into blocks.
  • each picture to be coded is divided into coding unit blocks, and the amount of information is compressed by reducing redundancy in the time direction and the spatial direction for each block.
  • inter-frame predictive coding for the purpose of reducing temporal redundancy, motion is detected and a predicted image is created in block units with reference to the front or rear picture, and the resulting predicted image and encoding target are obtained. A difference image from the input image of the block is acquired.
  • intra prediction encoding for the purpose of reducing spatial redundancy, a prediction image is generated from pixel information of surrounding encoded blocks, and the obtained prediction image and a block to be encoded are input. A difference image from the image is acquired.
  • a code string is generated using variable length coding, thereby compressing the information amount.
  • a coding method called CAVLC that generates a code string only by variable-length coding, and first, an intermediate code string is generated by variable-length coding (binarization), and an arithmetic code is further generated for the intermediate code string
  • CABAC an encoding method called CABAC that generates a code string by performing encoding.
  • prediction information and residual coefficient information are obtained by analyzing the code string generated by the encoding process, and prediction is performed by performing inter-screen prediction decoding and intra-screen prediction decoding using the prediction information.
  • An image is generated, a difference image is generated by performing inverse quantization and inverse orthogonal transform on the residual coefficient information, and a final output image is restored by adding the obtained predicted image and the difference image.
  • the maximum value of the generated code amount in block units is defined (specifically, 3200 bits). If the normal encoding process described above is performed, a code string exceeding the maximum value of the generated code amount may be generated depending on the properties of the input image and the conditions of the quantization process. By using the encoding mode, it is possible to always keep within the maximum value.
  • IPCM is a mode in which pixel values of an input image are described in a code string as they are as a bit string without generating a difference image by intra-screen / inter-screen prediction, or performing orthogonal transform / quantization. is there.
  • this mode for example, if the format of the input image is YUV 4: 2: 0 with 8 bits per pixel, the luminance component block is 16 ⁇ 16 pixels, and the two color difference component blocks are 8 ⁇ 8 pixels respectively. Therefore, the total is 384 bytes, and even if necessary information is included in the header, it can be surely stored within the maximum value of 3200 bits.
  • ITU-T H.264 Advanced video coding for generic audiovisual services (03/2010)
  • Such an encoding / decoding device has a configuration that enables a parallel operation called a pipeline in order to increase processing speed. Specifically, the processing proceeds simultaneously by starting the processing of the next block before the processing of one block is completed.
  • FIG. 13 (a) shows an example of a pipeline in encoding using CABAC.
  • each process of pixel reading, mode determination (determination of inter-screen prediction mode or intra-screen prediction mode), inter-screen / intra prediction, transform / quantization, and binary coding are applied in order, and the same processing is applied to block 2 as well.
  • the block 2 starts the processing immediately after the pixel reading of the block 1 is completed, thereby performing the processing in parallel while delaying the processing timing by one step.
  • Arithmetic coding is performed at an independent timing different from the pipeline.
  • H. In the H.264 or HEVC encoding / decoding process the process is performed while referring to the information of blocks previously encoded / decoded. Therefore, as shown in the figure, the block 2 needs to perform processing while referring to the prediction information, pixel information, encoding information, etc. determined in the block 1.
  • Fig. 13 (b) shows an example of a pipeline when switching to IPCM occurs.
  • switching to the IPCM is determined in the arithmetic coding process of block 1.
  • the encoding process of block 2 has already progressed while referring to prediction information, pixel information, and the like when block 1 performs normal encoding. For this reason, it is necessary to return to the mode determination of block 1 and update the information to be referred to by replacing the block 1 with the assumption that the block 1 has been encoded with the IPCM, and repeat the processing of the block 2.
  • the arithmetic encoding process is performed at an independent timing different from the pipeline in which the other processes are performed. For this reason, encoding processing of a large number of subsequent blocks has already progressed at the time when arithmetic coding of block 1 is performed, and a huge amount of processing may have to be traced.
  • FIG. 14A and FIG. 14B show examples of pipelines in encoding using CAVLC.
  • CAVLC In CAVLC, there is no arithmetic coding process. Therefore, even when switching to IPCM occurs, the amount of processing going back in the pipeline is constant, and the control is simple compared to CABAC.
  • FIG. 15A shows an example of a pipeline in decoding using CABAC.
  • Code block analysis, inverse transform / quantization, inter-screen / intra prediction, and output image generation are applied to block 1 in sequence, and similar processing is applied to block 2 as well.
  • the block 2 starts the processing immediately after the code string analysis of the block 1 is completed, thereby performing the processing in parallel while delaying the processing timing by one step.
  • Arithmetic decoding is performed at a timing independent from the pipeline.
  • the maximum code amount of a code string in block units is defined.
  • the code amount of the code string before arithmetic decoding is limited, and the code amount of the intermediate code string generated as a result of arithmetic decoding is not defined. Therefore, the code amount of the intermediate code string may become extremely large depending on conditions.
  • FIG. 15B shows an example of a pipeline when the code amount of the intermediate code string becomes extremely large in the block 2.
  • many intermediate code strings must be read and processed. For this reason, the time required for processing has increased compared to other processing. At this time, the processing of other blocks operating in parallel also cannot proceed to the next processing until the processing of the code string analysis of block 2 is completed.
  • the present invention solves the above-described problem, and in a coding apparatus corresponding to arithmetic coding having a pipeline structure, simplifies the process of tracing the pipeline in order to keep the generated code amount below a limit value.
  • a decoding apparatus that supports arithmetic decoding with a pipeline structure at the same time, the time required for the code string analysis process to read the intermediate code string after arithmetic decoding is always less than or equal to a certain time, It is an object of the present invention to provide a new control method that can avoid the occurrence of a line processing delay and replace the conventional method.
  • the moving image encoding device is a moving image encoding device that encodes an input encoding target image in units of blocks, and generates a predicted image corresponding to the encoding target image.
  • a prediction image generation unit, a subtracter that generates a difference image between the encoding target image and the generated prediction image, and an orthogonal transform process and a quantization process are performed on the output of the subtractor to generate a residual coefficient Generated by a prediction residual encoding unit, a prediction residual decoding unit that generates a residual decoded image by performing inverse quantization processing and inverse orthogonal transform processing on the residual coefficient, and a prediction image generation unit
  • An adder that generates a reconstructed image by adding the prediction image and the residual decoded image generated by the prediction residual decoding unit, and a variable coefficient for the residual coefficient generated by the prediction residual encoding unit
  • the moving image encoding device is a moving image encoding device that encodes an input encoding target image in units of blocks, and generates a predicted image corresponding to the encoding target image.
  • a prediction image generation unit, a subtracter that generates a difference image between the encoding target image and the generated prediction image, and an orthogonal transform process and a quantization process are performed on the output of the subtractor to generate a residual coefficient Generated by a prediction residual encoding unit, a prediction residual decoding unit that generates a residual decoded image by performing inverse quantization processing and inverse orthogonal transform processing on the residual coefficient, and a prediction image generation unit
  • An adder that generates a reconstructed image by adding the prediction image and the residual decoded image generated by the prediction residual decoding unit, and a residual generated by the prediction residual encoding unit in the first mode
  • the difference coefficient is variable-length encoded to generate a coefficient code string, and A header code sequence including at least prediction information used when generating an image is
  • the intermediate image signal obtained in the signal processing process of the encoding target image is directly used as a coefficient code string without variable length coding, and at least an identifier indicating that the coefficient code string and the coefficient code string are intermediate image signals
  • a binary encoding unit that outputs an intermediate code string including a header code string including the arithmetic code for the intermediate code string output in the first mode to generate an output code string;
  • the intermediate code sequence output in step 1 only the header code sequence is arithmetically encoded to generate an output code sequence composed of the header code sequence and the coefficient code sequence after the arithmetic encoding.
  • the binary encoding unit when outputting the intermediate code sequence to the arithmetic encoding unit, limits the code amount of the intermediate code sequence to a predetermined code amount or less. .
  • the present invention can also realize processing equivalent to each means included in such a moving image coding apparatus as a program or an integrated circuit.
  • the moving picture coding apparatus in each aspect of the present invention, even when an encoding method including arithmetic coding is realized using a pipeline structure, a specific code defined in advance at the time of generating an intermediate code string The amount can be controlled to be less than the amount. Therefore, it is possible to simplify the process of tracing back the pipeline in order to keep the generated code amount below the limit value. Also, in the corresponding video decoding device, since the code amount of the intermediate code string is limited to a predetermined specific code amount or less, in order to read the intermediate code string after arithmetic decoding in the code string analysis process It is possible to always set the time required for the time to a certain time or less. Therefore, it is possible to avoid the occurrence of pipeline processing delay in the video decoding process.
  • the process of going back the pipeline is simplified by limiting the code amount of the intermediate code string to a certain value or less, so the processing is realized even with an element having a lower capability than the conventional one in the moving picture coding apparatus. It becomes possible to do.
  • the conventional moving picture decoding apparatus in order to reduce the occurrence of processing delay such as code string analysis processing, it is necessary to use a high-capacity element for a portion that performs code string analysis processing or the like.
  • the moving picture decoding apparatus by limiting the code amount of the intermediate code string to a certain value or less, a delay hardly occurs in the video decoding device in the first place. Therefore, it is not necessary to use an element with a particularly high capability in the moving picture decoding apparatus, and the moving picture decoding apparatus can be simply configured.
  • FIG. 3 is a flowchart of a code string generation process according to the first embodiment.
  • 6 is a conceptual diagram for explaining an example of a syntax of a code string generated according to Embodiment 1.
  • FIG. It is a conceptual diagram for demonstrating the pipeline control of the moving image encoder which concerns on Embodiment 1.
  • FIG. 6 is a flowchart of a code string generation process according to another example of the first embodiment.
  • FIG. 10 is a flowchart of a code string generation process according to the second embodiment.
  • FIG. 10 is a conceptual diagram for explaining an example of a syntax of a code string generated by Embodiment 2.
  • FIG. It is a conceptual diagram for demonstrating the pipeline control of the moving image encoder which concerns on Embodiment 2.
  • FIG. It is a block diagram which shows the structure of the moving image decoding apparatus which concerns on Embodiment 3, 4.
  • FIG. 10 is a flowchart of code string analysis processing according to the third embodiment.
  • 10 is a flowchart of code string analysis processing according to the fourth embodiment.
  • It is a conceptual diagram for demonstrating the pipeline control of the conventional moving image encoder.
  • It is a conceptual diagram for demonstrating another pipeline control of the conventional moving image encoder.
  • It is a conceptual diagram for demonstrating the pipeline control of the conventional moving image decoding apparatus.
  • FIG. 1 is a block diagram illustrating a configuration of a video encoding device 100 according to the first embodiment.
  • the moving image encoding apparatus 100 divides a moving image input in units of pictures into blocks, performs an encoding process in units of blocks, and generates a code string.
  • the moving picture encoding apparatus 100 includes a picture memory 101, a prediction residual encoding unit 102, a prediction residual decoding unit 103, a local buffer 104, a prediction encoding unit 105, and a quantization value determination unit 106. And a binary encoding unit 107 and an arithmetic encoding unit 110.
  • the picture memory 101 stores the input image signal 151 input in units of pictures in the order of display by rearranging the pictures in the order of encoding.
  • the picture memory 101 receives a read command from the difference calculation unit 111 or the predictive coding unit 105, the picture memory 101 outputs an input image signal related to the read command.
  • each picture is divided into coding units composed of a plurality of pixels called coding units (hereinafter referred to as CU).
  • the CU is, for example, a horizontal 64 ⁇ vertical 64 pixel block, a horizontal 32 ⁇ vertical 32 pixel block, a horizontal 16 ⁇ vertical 16 pixel block, or the like. That is, any configuration may be used as long as it is a group of pixels composed of a plurality of pixels.
  • the block size is not limited to a square shape, and may be a rectangular block size.
  • the subsequent processing is performed in units of CUs.
  • the prediction residual encoding unit 102 performs orthogonal transformation on the difference image signal 152 output from the difference calculation unit 111. Further, the prediction residual encoding unit 102 compresses the image information by performing quantization on the obtained orthogonal transform coefficient of each frequency component, and generates a residual encoded signal 153. Then, the generated residual encoded signal 153 is output to the prediction residual decoding unit 103 and the coefficient code string generation unit 109. At this time, the prediction residual encoding unit 102 quantizes the orthogonal transform coefficient using the quantized value signal 158 determined by the quantized value determining unit 106.
  • the prediction residual decoding unit 103 generates a residual decoded signal 154 by performing inverse quantization and inverse orthogonal transform on the residual encoded signal 153 output from the prediction residual encoding unit 102. Then, the generated residual decoded signal 154 is output to the addition operation unit 112.
  • the local buffer 104 stores the reconstructed image signal 155 output from the addition operation unit 112.
  • the reconstructed image signal 155 is used for predictive coding processing in coding of a picture subsequent to a picture that is currently being coded. That is, the reconstructed image signal 155 is referred to as pixel data when a picture subsequent to the current picture to be coded is coded.
  • the local buffer 104 outputs the stored reconstructed image signal 155 to the prediction encoding unit 105 as pixel data in response to a read command from the prediction encoding unit 105.
  • the predictive encoding unit 105 generates a predictive image signal 156 using intra prediction or inter prediction based on the input image signal output from the picture memory 101. Then, the predictive encoding unit 105 outputs the generated predicted image signal 156 to the difference calculation unit 111 and the addition calculation unit 112. Note that the prediction encoding unit 105 uses the reconstructed image signal 155 of a past picture that has already been encoded and stored in the local buffer 104 when using inter-screen prediction. When using intra prediction, the reconstructed image signal 155 of the current picture of an already encoded CU adjacent to the encoding target CU is used. The mode determination method of using intra-screen prediction or inter-screen prediction is performed by predicting which prediction method can reduce the information amount of the residual signal.
  • the quantization value determination unit 106 sets a quantization value when the difference image signal 152 is quantized by the prediction residual encoding unit 102 based on information such as a picture stored in the picture memory 101. Then, the set quantization value is output to prediction residual encoding section 102 and header code string generation section 107.
  • a quantization value setting method in the quantization value determination unit 106 a quantization value is set so that the bit rate of the code string signal 160 approaches a target bit rate, so-called quantization based on rate control.
  • a value setting method or the like may be used.
  • the information for determining the quantization value in the above may include, for example, a virtual buffer retention amount, a preset bit rate, and the like.
  • the binarization encoding unit 107 includes a header code string generation unit 108 and a coefficient code string generation unit 109.
  • the binarization information generated by applying each process is used as an intermediate code string 159 as an arithmetic encoding unit. To 110.
  • the header code string generation unit 108 is a variable length code for the prediction information signal 157 output from the prediction encoding unit 105, the quantization value signal 158 output from the quantization value determination unit 106, and other control information related to encoding control.
  • the prediction information included in the prediction information signal 157 includes, for example, information indicating an intra prediction mode, information indicating an inter prediction mode, information indicating a motion vector, information indicating a reference picture, and the like.
  • the control information is information that can be acquired before the processing in the coefficient code string generation unit 109, and is information that indicates the encoding condition applied at the time of CU encoding. For example, information indicating a block encoding type, block Division information and the like are included.
  • the coefficient code string generation unit 109 performs variable-length coding on the residual encoded signal 153 output from the prediction residual encoding unit 102 to generate a coefficient intermediate code string. Then, the coefficient code string generation unit 109 generates the intermediate code string signal 159 by appending the generated coefficient intermediate code string after the header intermediate code string generated by the header code string generation unit 108 (hereinafter referred to as the first code string signal 159). Called mode).
  • the coefficient code string generation unit 109 converts the coefficient intermediate code string obtained without variable length encoding of the input image signal output from the picture memory 101 into the header intermediate code string generated by the header code string generation unit 108. Subsequently, the intermediate code string signal 159 is generated by additionally writing (hereinafter referred to as the second mode).
  • the arithmetic encoding unit 110 performs arithmetic encoding on a part of the intermediate code sequence 159 output from the binary encoding unit 107, and outputs a code that is output from the video encoding device 100 A column signal 160 is generated.
  • the difference calculation unit 111 generates a difference image signal 152 that is a difference value between the input image signal read from the picture memory 101 and the prediction image signal 156 that is the output of the prediction encoding unit 105, and generates a prediction residual code. To the conversion unit 102.
  • the addition operation unit 112 adds the residual decoded signal 154 output from the prediction residual decoding unit 103 and the prediction image signal 156 output from the prediction encoding unit 105 to add the reconstructed image signal 155. Generated and output to the local buffer 104 and the prediction encoding unit 105.
  • the binary encoding unit 107 uses the input residual encoded signal 153 to determine whether or not the intermediate code amount after binarization of the encoding target CU may exceed a specified value. Determination is made (S601).
  • step S601 If it is determined in step S601 that there is no possibility of exceeding, the prediction information signal 157, the quantized value signal 158, and other coding control information generated as a result of performing the normal coding process described above are input.
  • the input residual coded signal 153 is variable-length coded (Residual mode) to generate a coefficient intermediate code string (S603).
  • a header intermediate code string is generated by variable-length encoding only PCM mode information indicating that encoding has been performed in the PCM mode (S605).
  • a coefficient intermediate code string is generated by describing the input image signal as it is in the code string as it is without variable length coding (PCM mode) (S606).
  • the arithmetic encoding unit 110 performs final encoding by performing arithmetic encoding on the header intermediate code sequence and the coefficient intermediate code sequence.
  • a code string is generated (S604).
  • arithmetic encoding is performed on the header intermediate code sequence including only the PCM mode information, and arithmetic encoding is performed on the coefficient intermediate code sequence.
  • a final code string is generated by adding the code string as it is without performing the process (S607).
  • step S601 it is determined whether there is a possibility that the intermediate code amount of the encoding target CU exceeds the specified value using the input residual encoded signal 153, but other methods are used. It may be determined whether there is a possibility that the intermediate code amount exceeds the specified value. For example, there is a method of determining whether the code amount exceeds a predetermined value based on the generated intermediate code string signal 159. In this case, the determination is made when the processing of step S602 and step S603 is completed, and the intermediate code string has already been generated in the Residual mode. For this reason, if it is determined that the number has been exceeded, the intermediate code string generated is replaced with the intermediate code string regenerated in the PCM mode by performing the processing in steps S605 and S606 instead of the generated intermediate code string.
  • an input image signal is input to the coefficient code string generation unit 109, and in step S606, the input image signal is input to generate a coefficient intermediate code string in the PCM mode.
  • a reconstructed image is generated.
  • a signal intermediate code string may be generated in the PCM mode by inputting the signal 155.
  • the coefficient intermediate code sequence may be generated in the PCM mode by inputting the difference image signal 152 or the residual decoded signal 154.
  • the determination is performed in units of CUs in step S601, the determination may be performed in units of a plurality of CUs, blocks smaller than the CU, or other block units.
  • FIG. 3 is a diagram showing an example of the syntax: coding_unit () of the CU unit of the intermediate code string generated by the present embodiment.
  • FIG. 3A shows the syntax when the intermediate code string is generated in the Residual mode described with reference to FIG.
  • a code sequence generated by the header code sequence generation unit 108 which is variable length encoded information such as prediction mode: pred_mode, prediction information: prediction_unit (), quantization value: qp_value, is described. Yes.
  • a code string obtained by variable-length encoding the residual encoded signal 153 is described as residual_data ().
  • residual_data residual_data
  • FIG. 3B shows the syntax when the intermediate code string is generated in the PCM mode described with reference to FIG.
  • a code string obtained by variable-length encoding pred_mode which is PCM mode information indicating that encoding is performed in the PCM mode.
  • the input image signal is described as a code string that is not subjected to variable-length encoding but is a pixel bit string as it is.
  • the code amount of the generated intermediate code string cannot be uniquely specified in the Residual mode because the code length varies depending on the variable length coding conditions.
  • the PCM mode can be uniquely specified by the size of the CU except for pred_mode. For example, if the image format is YUV 4: 2: 0 with 8 bits for each pixel and the size of the encoding target CU is 32 ⁇ 32 pixels, the pixel value of the input image signal or the reconstructed image signal 155 is directly encoded. The amount of code required for describing as a column is 1536 bytes. Therefore, even if the maximum code amount and margin that can be generated when pred_mode is variable-length encoded, the entire CU does not exceed 12500 bits.
  • the specified value described in step S601 in FIG. 2 indicates that the pixel value of the input image signal of the encoding target CU is encoded as it is as a code string and is encoded in the PCM mode.
  • the generated intermediate code amount always uses the specified value. Guaranteed not to exceed.
  • the input image signal is described in pcm_data (), but the reconstructed image signal 155, the difference image signal 152, and the residual decoded signal 154 are input to the coefficient code string generation unit 109. If so, the reconstructed image signal 155, the difference image signal 152, and the residual decoded signal 154 are described in accordance with the input signal.
  • FIG. 4A is a diagram illustrating pipeline control when an intermediate code string is generated in the Residual mode as a result of the determination in step S601 of FIG. Processing is performed in exactly the same flow as in the conventional control described with reference to FIG.
  • FIG. 4B is a diagram illustrating pipeline control when an intermediate code string is generated in the PCM mode as a result of the determination in step S601 of FIG.
  • the PCM mode should be set at the time of the binary encoding process before the arithmetic encoding process.
  • a huge amount of retroactive processing has occurred in the previous pipeline.
  • the PCM mode since it is possible to determine that the PCM mode should be set at the time of the binary coding process, it is possible to reduce the amount of processing going back in the pipeline and make it constant.
  • the process control can be simplified.
  • the pipeline processing control in FIGS. 4A and 4B is controlled by the pipeline processing in the case of encoding using the CAVLC described in FIGS. 14A and 14B. It is exactly the same. That is, the moving picture coding apparatus 100 according to the present embodiment performs processing using exactly the same pipeline control method whether coding is performed using CABAC or coding is performed using CAVLC. It becomes possible to do.
  • the code sequence generated by the moving picture encoding apparatus 100 is guaranteed that the generated code amount of the intermediate code sequence is equal to or less than the specific code amount. For this reason, in the decoding pipeline described with reference to FIG. 15, the code amount of the intermediate code string read by the code string analysis process is less than or equal to the specific amount, and the processing time of the code string analysis process is always as shown in FIG. Can be kept within the prescribed value, and the occurrence of a delay in the decoding process can be avoided.
  • the moving picture coding apparatus 100 is not limited to the identification that is defined in advance at the time of generating the intermediate code string even when the coding method using arithmetic coding is realized using the pipeline structure. It is possible to control so as to be less than or equal to the code amount. Therefore, it is possible to simplify the process of tracing back the pipeline in order to keep the generated code amount below the limit value. Furthermore, in the decoding device that decodes the generated code string, the time required for the code string analysis process to read the intermediate code string after arithmetic decoding can always be less than or equal to a certain time. It is possible to avoid the occurrence of a pipeline processing delay in the processing apparatus.
  • the present invention simplifies the process of going back through the pipeline by limiting the code amount of the intermediate code string to a certain value or less, so the processing is realized even with an element having a lower capacity than the conventional one in the moving picture coding apparatus. It becomes possible to do.
  • the conventional moving picture decoding apparatus in order to reduce the occurrence of processing delay such as code string analysis processing, it is necessary to use a high-capacity element for a portion that performs code string analysis processing or the like.
  • the moving picture decoding apparatus by limiting the code amount of the intermediate code string to a certain value or less, a delay hardly occurs in the video decoding device in the first place. Therefore, it is not necessary to use an element having a particularly high capability in the moving picture decoding apparatus, and the moving picture decoding apparatus can be simply configured.
  • the moving image encoding apparatus 100 encodes an input encoding target image in units of blocks.
  • the moving image encoding device 100 includes a prediction encoding unit 105 that generates a prediction image corresponding to an encoding target image, a difference calculation unit 111 that generates a difference image between the encoding target image and the generated prediction image, A prediction residual encoding unit 102 that performs orthogonal transformation processing and quantization processing on the output of the difference calculation unit 111 to generate a residual coefficient, and performs inverse quantization processing and inverse orthogonal transformation processing on the residual coefficient.
  • a prediction residual decoding unit 103 that generates a residual decoded image, and adds the prediction image generated by the prediction encoding unit 105 and the residual decoded image generated by the prediction residual decoding unit 103
  • the addition operation unit 112 that generates a reconstructed image and the residual coefficient generated by the prediction residual encoding unit 102 are variable-length encoded to generate a coefficient code string
  • the prediction image is Prediction information used when generating A header code string including at least a header code string is generated and an intermediate code string 159 composed of a coefficient code string and a header code string is output.
  • the second mode in the signal processing process of an encoding target image instead of a residual coefficient
  • the obtained intermediate image signal is directly converted into a coefficient code string without variable length coding, and an intermediate code composed of the coefficient code string and a header code string including at least an identifier indicating that the coefficient code string is an intermediate image signal
  • a binary encoding unit 107 that outputs a sequence, and arithmetically encodes the intermediate code sequence output in the first mode to generate an output code sequence, while the intermediate code sequence output in the second mode
  • Arithmetic coding unit 110 that performs arithmetic coding only on the header code string and generates an output code string composed of the header code string and coefficient code string after arithmetic coding , Comprising a.
  • the binary coding unit 107 limits the code amount of the intermediate code string to a predetermined specific code amount or less.
  • the specific code amount defined in advance includes a code amount necessary for describing the pixel value of the intermediate image signal as it is as a code string, and all information that may be described in the header code string. Is a code amount that is a combination of the maximum code amount required for encoding and a margin amount.
  • the binarization encoding unit 107 uses the second mode when the code amount of the output intermediate code sequence 159 may exceed a predetermined specific code amount. Is output.
  • the binarization encoding unit 107 outputs the intermediate code string 159 in the first mode, and as a result, when the code amount of the intermediate code string 159 exceeds a predetermined code amount, Instead of the intermediate code sequence 159 generated in the first mode, the intermediate code sequence 159 generated using the second mode is output.
  • the intermediate code amount after binarization of the encoding target CU is set to a predetermined value or less by switching between the Residual mode and the PCM mode in the flowchart of FIG.
  • the intermediate code amount after binarization of the encoding target CU can be limited to a specified value or less without using the PCM mode.
  • the configuration of the moving image encoding apparatus is substantially the same as the configuration shown in FIG. 1 except that an input image signal input from the picture memory 101 to the coefficient code string generation unit 109 is not necessary.
  • the syntax is as shown in FIG.
  • a method of generating the code string signal 160 by the binary encoding unit 107 and the arithmetic encoding unit 110 will be described with reference to the flowchart of FIG.
  • the binary encoding unit 107 uses the input residual encoded signal 153 to determine whether or not the intermediate code amount after binarization of the encoding target CU may exceed a specified value. Determination is made (S1501).
  • step S1501 If it is determined in step S1501 that there is no possibility of exceeding, the prediction information signal 157, the quantized value signal 158, and other encoding control information generated as a result of performing the normal encoding process described above are input.
  • a header intermediate code string by performing variable length coding (S1502).
  • a coefficient intermediate code string is generated by variable-length encoding the input residual encoded signal 153 (Residual mode) in the same manner as in the conventional encoding (S1503).
  • step S1501 if it is determined in step S1501 that there is a possibility of exceeding, the prediction residual encoding process in the prediction residual encoding unit 102 is performed again (S1505). At this time, at least the quantization value used in the quantization process is updated to a value larger than the set value (large quantization width) and applied, so that the residual encoded signal 153 to be regenerated is less information amount Control to be The process of step S1501 is performed again using the updated residual encoded signal 153, and the process of step S1505 is repeated until it is determined that there is no possibility of exceeding.
  • the arithmetic encoding unit 110 generates a final code sequence by performing arithmetic encoding on the input header intermediate code sequence and the coefficient intermediate code sequence (S1504).
  • step S1501 it is determined whether or not the intermediate code amount of the CU to be encoded may exceed the specified value using the input residual encoded signal 153.
  • a method may be used to determine whether there is a possibility that the intermediate code amount exceeds a specified value. For example, there is a method of determining whether the code amount exceeds a predetermined value based on the generated intermediate code string signal 159. In this case, the determination is made when the processing of step S1502 and step S1503 is completed, and the intermediate code string has already been generated. For this reason, if it is determined that the number has been exceeded, it is replaced with the regenerated intermediate code string by performing the processing in step S1505 instead of the generated intermediate code string.
  • the moving image encoding apparatus 100 encodes an input encoding target image in units of blocks.
  • the moving image encoding device 100 includes a prediction encoding unit 105 that generates a prediction image corresponding to an encoding target image, a difference calculation unit 111 that generates a difference image between the encoding target image and the generated prediction image, An orthogonal transform process and a quantization process are performed on the output of the difference calculation unit 111 to generate a residual coefficient, and a dequantization process and an inverse orthogonal transform process are performed on the residual coefficient.
  • a prediction residual decoding unit 103 that generates a residual decoded image, and adds the prediction image generated by the prediction encoding unit 105 and the residual decoded image generated by the prediction residual decoding unit 103 Then, the addition calculation unit 112 that generates a reconstructed image and the residual coefficient generated by the prediction residual encoding unit 102 are variable-length encoded to generate a coefficient code string, which is used when generating a predicted image Including at least A binarization encoding unit 107 that generates a code sequence and outputs an intermediate code sequence composed of a coefficient code sequence and a header code sequence, and an intermediate code sequence output by the binarization encoding unit 107 An arithmetic encoding unit 110 that performs arithmetic encoding and generates an output code string. When the binary coding unit 107 outputs the intermediate code string to the arithmetic coding unit 110, the binary coding unit 107 limits the code amount of the intermediate code string to a predetermined specific code amount or less.
  • the intermediate code amount after binarization of the encoding target CU can be limited to a predetermined value or less without using the PCM mode.
  • the PCM mode since the PCM mode is not used, it is not necessary to mount a processing circuit related to the PCM mode, and the circuit configuration can be simplified.
  • Embodiment 2 Next, a moving picture coding apparatus according to Embodiment 2 will be described with reference to the drawings.
  • FIG. 6 is a block diagram of a moving image encoding device 100-1 according to the second embodiment.
  • the moving image encoding apparatus 100-1 divides a moving image input in units of pictures into blocks, performs encoding processing in units of blocks, and generates a code string.
  • This moving image coding apparatus 100-1 includes a binary coding unit 107, a header code string generation unit 108, a coefficient code string generation unit 109, and an arithmetic coding unit 110 of the moving image coding apparatus 100 according to the first embodiment. Instead of this, a binary coding section 107-1, a header code string generation section 108-1, a coefficient code string generation section 109-1, and an arithmetic coding section 110-1 are provided.
  • the binarization encoding unit 107-1 includes a header code sequence generation unit 108-1 and a coefficient code sequence generation unit 109-1, and converts the binarization information generated by applying each processing into an intermediate code sequence 159-1 is output to arithmetic coding section 110-1.
  • the header code string generation unit 108-1 changes the prediction information signal 157 output from the prediction encoding unit 105, the quantization value signal 158 output from the quantization value determination unit 106, and other control information related to encoding control.
  • a header intermediate code string is generated by performing long encoding.
  • the prediction information includes, for example, information indicating an intra-screen prediction mode, information indicating an inter-screen prediction mode, information indicating a motion vector, information indicating a reference picture, and the like.
  • the control information is information that can be acquired before processing in the coefficient code string generation unit 109-1, and is information that indicates the encoding conditions applied at the time of CU encoding. For example, information indicating the block encoding type , Block division information and the like are included.
  • the coefficient code sequence generation unit 109-1 performs variable length encoding on the residual encoded signal 153 output from the prediction residual encoding unit 102 to generate a coefficient intermediate code sequence. Then, the coefficient code string generation unit 109-1 generates the intermediate code string signal 159-1 by adding the generated coefficient intermediate code string after the header intermediate code string generated by the header code string generation unit 108-1. (Hereinafter referred to as the first mode).
  • the coefficient code string generation unit 109 generates the intermediate code string generated by the header code string generation unit 108 from the coefficient intermediate code string obtained without performing variable length coding on the reconstructed image signal 155 output from the addition calculation unit 112.
  • the code string is added after the code string to generate an intermediate code string signal 159-1 (hereinafter referred to as a second mode).
  • the arithmetic coding unit 110-1 performs arithmetic coding on the intermediate code string 159-1 output from the binary coding unit 107-1, and becomes an output of the moving picture coding apparatus 100-1.
  • a code string signal 160-1 is generated.
  • Code String Generation Method A method for generating the code string signal 160-1 in the binary coding section 107-1 and the arithmetic coding section 110-1 will be specifically described with reference to the flowchart of FIG.
  • the binary encoding unit 107-1 receives the prediction information signal 157, the quantized value signal 158, and other encoding control information generated as a result of the above encoding process, and performs variable length encoding. By doing so, a header intermediate code string is generated (S1001).
  • step S1002 If it is determined in step S1002 that there is no possibility of exceeding, the coefficient intermediate code string is obtained by variable-length encoding the residual encoded signal 153 (Residual mode) as in the conventional encoding. Generate (S1003).
  • step S1002 if it is determined in step S1002 that there is a possibility of exceeding, the intermediate code is obtained by describing the input reconstructed image signal 155 as it is in the code string without performing variable length coding (PCM mode). A column is generated (S1005).
  • the arithmetic encoding unit 110-1 performs arithmetic encoding on the header intermediate code sequence and the coefficient intermediate code sequence.
  • a final code string is generated (S1004).
  • the input intermediate code string is generated by the PCM mode, arithmetic coding is performed only on the header intermediate code string, and arithmetic coding is not performed on the coefficient intermediate code string.
  • the final code string is generated by adding the code string as it is (S1006).
  • step S1002 it is determined whether there is a possibility that the intermediate code amount of the encoding target CU exceeds the specified value using the input residual encoded signal 153.
  • a method may be used to determine whether there is a possibility that the intermediate code amount exceeds a specified value. For example, there is a method of determining whether the code amount exceeds a predetermined value based on the generated intermediate code string signal 159-1. In this case, the determination is made when the process of step S1003 is completed, and the coefficient intermediate code string has already been generated in the Residual mode. Therefore, if it is determined that the number has been exceeded, the processing is performed by replacing the generated coefficient intermediate code sequence with the coefficient intermediate code sequence regenerated in the PCM mode by performing the process of step S1005. Made.
  • the reconstructed image signal 155 is input to the coefficient code sequence generation unit 109, and the reconstructed image signal 155 is input in step S1005 to generate a coefficient intermediate code sequence in the PCM mode.
  • the coefficient intermediate code string may be generated in the PCM mode using the input image signal as an input.
  • the coefficient intermediate code sequence may be generated in the PCM mode with the difference image signal 152 or the residual decoded signal 154 as an input.
  • the determination is performed in units of CUs in step S1002 here, the determination may be performed in units of a plurality of CUs, blocks smaller than the CU, or other block units.
  • FIG. 8 is a diagram illustrating an example of the syntax: coding_unit () of the intermediate code string and the code string of the CU unit generated according to the present embodiment.
  • FIG. 8A shows the syntax when the intermediate code string is generated in the Residual mode described in FIG.
  • a code string generated by the header code string generation unit 108-1 is encoded with variable length coding of information such as prediction mode: pred_mode, prediction information: prediction_unit (), and quantization value: qp_value.
  • pcm_flag indicating whether the coefficient information is encoded in the Residual mode or the PCM mode is described, and further, a code string obtained by variable-length encoding the residual encoded signal 153 is described as residual_data (). ing.
  • FIG. 8B shows the syntax when the intermediate code string is generated in the PCM mode described in FIG.
  • information such as prediction mode: pred_mode, prediction information: prediction_unit (), quantization value: qp_value, etc., generated by the header code string generation unit 108-1, is used at the beginning of the syntax.
  • a variable-length encoded code string is described.
  • pcm_flag indicating whether the encoding is performed in the Residual mode or the PCM mode is described, and further, as the pcm_data (), the reconstructed image signal 155 is not subjected to variable length encoding, and is a pixel bit string as it is.
  • a code string is described.
  • the code amount of the generated intermediate code string is variable-length encoded for all information in the Residual mode. For this reason, the code length varies depending on the variable length coding conditions, and therefore cannot be uniquely identified.
  • pcm_data () is not variable-length coded and can be uniquely specified by the CU size. For example, when the image format is YUV 4: 2: 0 with 8 bits for each pixel and the size of the encoding target CU is 32 ⁇ 32 pixels, the pixel value of the input image signal or the reconstructed image signal is directly used as the code string. The code amount required when describing as 1536 bytes. Since the variable length coding is performed except for pcm_data (), the code length cannot be uniquely specified.
  • variable length encoding the number of pieces of information to be encoded using variable length encoding is limited, and the maximum amount of code that can be generated is not so large. In other words, even if the maximum code amount and margin that can be generated when variable length coding is performed on anything other than pcm_data () is added to the code amount of pcm_data (), the entire CU does not exceed 13000 bits.
  • the code amount necessary for describing the pixel value of the reconstructed image signal 155 of the encoding target CU as a code string as it is and the header information are variable-length encoded.
  • the reconstructed image signal 155 is described in pcm_data (), but the input image signal, the difference image signal 152, and the residual decoded signal 154 are included in the coefficient code string generation unit 109-1. Are input image signal, difference image signal 152, and residual decoded signal 154 according to the input signal.
  • FIG. 9A is a diagram illustrating pipeline control when an intermediate code string is generated in the Residual mode as a result of the determination in step S1002 of FIG. Processing is performed in exactly the same flow as in the conventional control described with reference to FIG.
  • FIG. 9B is a diagram illustrating pipeline control when the intermediate code string is generated using the reconstructed image signal 155 in the PCM mode as a result of the determination in step S1002 of FIG.
  • the PCM mode should be set at the time of the binary encoding process before the arithmetic encoding process.
  • the PCM mode should be set at the time of the binary encoding process.
  • the reconstructed image signal 155 is based on the same input image signal 151 as the residual encoded signal 153. Further, when the decoding apparatus decodes the residual encoded signal 153 using the prediction information of the signal and the set, the same signal as the reconstructed image signal 155 is obtained. That is, the pixel information of the reconstructed image signal finally generated in the decoding device is the same. For this reason, even if the block 1 is switched to the PCM mode, it is not necessary to change the prediction information described in the header code string or re-encode. For this reason, there is no influence on the processing of block 2 in which the encoding processing is proceeding while referring to them. Therefore, it is possible to generate the intermediate code string in the PCM mode without going back through the pipeline.
  • the input image signal from the picture memory 101 and the residual encoded signal 153 are based on the same input image signal 151. Therefore, even when the block 1 is switched to the PCM mode, it is not necessary to change the prediction information described in the header code string.
  • the decoding apparatus decodes the residual encoded signal 153 using the signal and a set of prediction information, a signal different from the input image signal is generated. Therefore, the pixel information of the reconstructed image signal finally obtained in the decoding apparatus differs between when encoded in the first mode and when encoded in the second mode.
  • the code sequence generated by the moving picture encoding apparatus 100 is guaranteed that the generated code amount of the intermediate code sequence is equal to or less than the specific code amount. For this reason, in the decoding pipeline described with reference to FIG. 15, the code amount of the intermediate code string read in the code string analysis process is equal to or less than the specific amount. Therefore, it is possible to always keep the processing time of the code string analysis processing within the specified value as shown in FIG. 15A, and it is possible to avoid the occurrence of delay in the decoding processing.
  • the moving picture coding apparatus 100-1 switches to the PCM mode without going back in the pipeline even when the coding method by arithmetic coding is realized using the pipeline structure. Encoding can be performed. Therefore, the generated code amount can be kept below the limit value without increasing the processing speed or increasing the processing amount. Furthermore, in a decoding apparatus that decodes a generated code string, the time required to read the intermediate code string after arithmetic decoding in the code string analysis process can always be set to a certain time or less. Therefore, it is possible to avoid the occurrence of pipeline processing delay.
  • the moving image encoding apparatus 100-1 in the present embodiment encodes an input encoding target image in units of blocks.
  • the moving image encoding apparatus 100-1 includes a prediction encoding unit 105 that generates a prediction image corresponding to an encoding target image, and a difference calculation unit 111 that generates a difference image between the encoding target image and the generated prediction image.
  • a prediction residual encoding unit 102 that performs orthogonal transformation processing and quantization processing on the output of the difference calculation unit 111 to generate a residual coefficient, and inverse quantization processing and inverse orthogonal transformation for the residual coefficient
  • a prediction residual decoding unit 103 that performs processing and generates a residual decoded image; a prediction image generated by the prediction encoding unit 105; a residual decoded image generated by the prediction residual decoding unit 103;
  • an addition operation unit 112 that generates a reconstructed image by adding, and in the first mode, a coefficient code string is generated by variable-length encoding the residual coefficient generated by the prediction residual encoding unit 102, and prediction Prediction used when generating the image Generating a header code string including at least information, and outputting a coefficient code string and an intermediate code string composed of the header code string, while in the second mode, a signal processing process of an encoding target image instead of a residual coefficient
  • the intermediate image signal obtained in the above is directly converted into a coefficient code string
  • the specific code amount defined in advance includes a code amount necessary for describing the pixel value of the intermediate image signal as it is as a code string, and all information that may be described in the header code string. Is a code amount that is a combination of the maximum code amount required for encoding and a margin amount.
  • the binary coding unit 107-1 uses the second mode when the code amount of the intermediate code string 159-1 to be output may exceed a predetermined specific code amount. To output an intermediate code string.
  • the binarization encoding unit 107-1 obtains a predetermined code amount as a code amount of the intermediate code string 159-1.
  • the intermediate code string 159-1 generated using the second mode is output instead of the intermediate code string 159-1 generated in the first mode.
  • Embodiment 3 A moving picture decoding apparatus according to Embodiment 3 will be described with reference to the drawings.
  • FIG. 10 is a block diagram illustrating a configuration of a video decoding device 200 according to the third embodiment.
  • the moving picture decoding apparatus 200 decodes the code string generated by the moving picture encoding apparatus described in Embodiment 1 in units of blocks called coding units (CUs), and generates an output image.
  • CUs coding units
  • the moving picture decoding apparatus 200 includes an arithmetic decoding unit 201, a binary decoding unit 202, a prediction residual decoding unit 205, a picture memory 206, a prediction decoding unit 207, and a quantization value determination. Part 208.
  • the arithmetic decoding unit 201 performs arithmetic decoding on the input code string signal 251 in units of blocks, and outputs the generated intermediate code string signal 252 to the binarization decoding unit 202.
  • the binarization decoding unit 202 includes a header code string analysis unit 203 and a coefficient code string analysis unit 204, and analyzes each code string by applying each process to the input intermediate code string 252. .
  • the header code string analysis unit 203 analyzes header information by performing variable length decoding on the header intermediate code string of the input intermediate code string signal 252. Then, the header code string analysis unit 203 outputs the prediction information signal 257 obtained by the analysis to the prediction decoding unit 207. Further, the header code string analysis unit 203 outputs the quantization value information 262 obtained by the analysis to the quantization value determination unit 208.
  • the coefficient code string analysis unit 204 performs a variable length decoding on the coefficient intermediate code string encoded subsequent to the header intermediate code string analyzed by the header code string analysis unit 203 to thereby generate a residual encoded signal. 253 is acquired. Then, the coefficient code string analysis unit 204 has a first mode for outputting the residual encoded signal 253 to the prediction residual decoding unit 205. Further, the coefficient code string analysis unit 204 reconstructs the reconstructed image signal without performing variable length decoding on the coefficient intermediate code string encoded subsequent to the header intermediate code string analyzed by the header code string analysis unit 203. 256 ′ is acquired, and the acquired reconstructed image signal 256 ′ is replaced with the reconstructed image signal 256 that is the output of the addition operation unit 209. When processing is performed using the second mode at this time, the generation process of the residual decoded signal 254 by the prediction residual decoding unit 205 and the generation process of the predicted image signal 255 by the prediction decoding unit 207 are described below. You don't have to.
  • the prediction residual decoding unit 205 generates a residual decoded signal 254 by performing inverse quantization and inverse orthogonal transform on the residual encoded signal 253 input from the coefficient code string analyzing unit 204. Then, the generated residual decoded signal 254 is output to the addition operation unit 209. At this time, the prediction residual decoding unit 205 dequantizes the residual encoded signal 253 using the quantized value signal 258 determined by the quantized value determining unit 208.
  • the predictive decoding unit 207 generates a predicted image signal 255 using intra prediction or inter prediction based on the prediction information signal 257 output from the header code string analysis unit 203, and outputs the prediction image signal 255 to the addition operation unit 209. .
  • the predictive decoding unit 207 uses the reconstructed image signal 256 of a past picture that has already been decoded and stored in the picture memory 206 when using inter-screen prediction. Further, when using intra prediction, the reconstructed image signal 256 of the current picture of a CU that has already been decoded and is adjacent to the decoding target CU is used. Whether to use intra prediction or inter prediction is determined according to the input prediction information signal 257.
  • the picture memory 206 stores the reconstructed image signal 256 sequentially input from the addition operation unit 209 or the coefficient code string analysis unit 204 in units of pictures, rearranges them in the order of output in units of pictures, and displays them as an output image signal 259. Output to.
  • the addition operation unit 209 adds the residual decoded signal 254 output from the prediction residual decoding unit 205 and the predicted image signal 255 output from the prediction decoding unit 207 to add the reconstructed image signal 256. Generate and output to the picture memory 206.
  • FIG. 11 is a flowchart when the code sequence signal generated by the video encoding apparatus 100 according to the first embodiment is analyzed.
  • the arithmetic decoding unit 201 analyzes PCM mode information described at the beginning of the input code string (S1301). Subsequently, according to the obtained PCM mode information, it is determined whether the target CU is encoded in the Residual mode or the PCM mode (S1302).
  • the intermediate code string is generated by performing arithmetic decoding on the header code string and the coefficient code string belonging to the input code string (S1303). .
  • step S1302 if it is determined in step S1302 that the encoding is performed in the PCM mode, the bit string acquired without performing arithmetic decoding on the coefficient code string belonging to the input code string is used as the code string as it is.
  • the intermediate code string is generated by describing the code string of the previously analyzed PCM mode information (S1306).
  • the binary decoding unit 202 analyzes header information by performing variable length decoding on the header intermediate code string.
  • the generated prediction information signal 257, quantization value information, and other decoding control information are output to each processing block of FIG. 10 (S1304).
  • the residual encoded signal 253 obtained by performing variable length decoding on the coefficient intermediate code string is output to the prediction residual decoding unit 205 (S1305).
  • the binary decoding unit 202 does not perform variable length decoding on the coefficient intermediate code string, and directly converts the acquired bit string.
  • the reconstructed image signal 256 ′ is output and replaced with the reconstructed image signal 256 output from the addition operation unit 209, and the subsequent processing is performed (S1307).
  • the intermediate code string does not include header information other than the PCM mode information, it is not necessary to analyze the header intermediate code string.
  • a moving picture coding apparatus that generates a code sequence corresponding to the moving picture decoding apparatus 200 according to the present embodiment can have the configuration described in the first embodiment.
  • the PCM mode can be determined at the time of the binary encoding process. Therefore, it is not necessary to consider the timing difference between the pipeline processing and the arithmetic coding processing, and the amount of processing going back in the pipeline can always be made constant. Therefore, it is possible to simplify the process control when the PCM mode occurs. Furthermore, it is guaranteed that the generated code amount of the generated intermediate code string is equal to or less than a specific code amount. Therefore, in the decoding pipeline described with reference to FIG. 15, it is possible to always keep the processing time of the code string analysis processing within the specified value as shown in FIG. That is, it is possible to avoid the occurrence of a delay in the decoding process.
  • Embodiment 4 A moving picture decoding apparatus according to Embodiment 4 will be described with reference to the drawings.
  • Configuration of Video Decoding Device The configuration of the video decoding device 200 according to the fourth embodiment is the same as the configuration of the video decoding device 200 according to the third embodiment described with reference to FIG. Therefore, explanation is omitted.
  • FIG. 12 is a flowchart when analysis is performed on a code string signal generated by the video encoding apparatus 100-1 according to the second embodiment. This flowchart is almost the same as the flowchart of FIG. 11, but steps S1401 and S1403 are used instead of steps S1301 and S1303, and step S1404 is newly added.
  • the arithmetic decoding unit 201 performs arithmetic decoding on the header code string belonging to the input code string to generate a header intermediate code string (S1401).
  • a signal indicating whether the target CU is encoded in the Residual mode or the PCM mode, which is information described in the header code string is sent to Step S1302 and used for the determination process.
  • step S1302 If it is determined in step S1302 that the encoding is performed in the Residual mode, arithmetic decoding is performed on the coefficient code string belonging to the input code string. Then, an intermediate code string is generated by describing the header intermediate code string generated earlier (S1403).
  • step S1302 if it is determined in step S1302 that the coding is performed in the PCM mode, the acquired bit string is directly used without performing arithmetic decoding on the coefficient code string belonging to the input code string.
  • An intermediate code string is generated by describing the generated header intermediate code string after the header intermediate code string (S1306).
  • the binary decoding unit 202 performs variable-length decoding on the header code string in the same manner whether the input intermediate code string is generated in the Residual mode or the PCM mode. Header information is analyzed. Then, the generated prediction information signal 257, quantization value information, and other decoding control information are output to each processing block of FIG. 10 (S1304 and S1404).
  • the prediction residual decoding unit converts the residual encoded signal 253 obtained by performing variable length decoding on the coefficient intermediate code sequence. It outputs to 205 (S1305).
  • the acquired bit string is output as it is as the reconstructed image signal 256 ′ without performing variable length decoding on the coefficient intermediate code string. Then, it is replaced with the reconstructed image signal 256 output from the addition operation unit 209, and the subsequent processing is performed (S1307).
  • a moving picture encoding apparatus that generates a code string corresponding to the moving picture decoding apparatus 200 can have the configuration described in the second embodiment.
  • the PCM mode can be determined at the time of the binary encoding process. Therefore, it is not necessary to consider the timing difference between pipeline processing and arithmetic coding processing. Further, it is not necessary to change the prediction information described in the header code string or the pixel information of the finally generated reconstructed image. Therefore, it is possible to perform processing control when the PCM mode occurs without going back in the pipeline. Furthermore, it is guaranteed that the generated code amount of the generated intermediate code string is equal to or less than a specific code amount. Therefore, in the decoding pipeline described with reference to FIG. 15, it is possible to always keep the processing time of the code string analysis processing within the specified value as shown in FIG. That is, it is possible to avoid the occurrence of a delay in the decoding process.
  • the processing shown in the form can be easily performed in an independent computer system.
  • the recording medium is not limited to a flexible disk, but may be any medium that can record a program, such as an optical disk, an IC card, and a ROM cassette.
  • the functions equivalent to the means included in the moving picture coding apparatus and the moving picture decoding apparatus shown in the above embodiments may be realized as an LSI which is an integrated circuit. These may be integrated into one chip so as to include a part or all of them.
  • An LSI may also be called an IC, a system LSI, a super LSI, or an ultra LSI depending on the degree of integration.
  • the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible.
  • An FPGA Field Programmable Gate Array
  • a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
  • the present invention is applied to a broadcast wave recording apparatus such as a DVD recorder or a BD recorder that compresses and records a broadcast wave broadcast from a broadcast station, including the above-described moving picture encoding apparatus and moving picture decoding apparatus. It doesn't matter.
  • the present invention for example, in a video camera, a digital camera, a video recorder, a mobile phone, a personal computer, etc., a moving image encoding device that encodes each picture constituting an input image and outputs it as moving image encoded data
  • the present invention is useful as a moving picture decoding apparatus that generates a decoded picture by decoding the moving picture encoded data.

Landscapes

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

Abstract

A moving image coding device (100) generates a coefficient code string by variable-length coding a residual coefficient, generates a header code string including at least prediction information used when a prediction image is generated, and outputs an intermediate code string configured from the coefficient code string and the header code string in a binarization coding unit, and arithmetically codes the intermediate code string outputted by the binarization coding unit to generate an output code string in an arithmetic coding unit. When outputting the intermediate code string to the arithmetic coding unit, the binarization coding unit limits the code quantity of the intermediate code string to a predefined specific code quantity or less.

Description

動画像符号化装置および動画像符号化方法Moving picture coding apparatus and moving picture coding method
 本発明は、入力された動画像をブロックに分割して符号化する動画像符号化装置および動画像符号化方法に関するものである。 The present invention relates to a moving image encoding apparatus and a moving image encoding method for encoding an input moving image by dividing it into blocks.
 近年、マルチメディアアプリケーションの発展に伴い、画像、音声及びテキストなど、あらゆるメディアの情報を統一的に扱うことが一般的になってきた。また、ディジタル化された画像は膨大なデータ量を持つため、蓄積及び伝送のためには、画像の情報圧縮技術が不可欠である。一方で、圧縮した画像データを相互運用するためには、圧縮技術の標準化も重要である。例えば、画像圧縮技術の標準規格としては、ITU-T(国際電気通信連合 電気通信標準化部門)のH.261、H.263、H.264、ISO/IEC(国際標準化機構)のMPEG-1、MPEG-3、MPEG-4、MPEG-4AVCなどがある。また、現在は、ITU-TとISO/IECとの共同によるHEVCと呼ばれる次世代画面符号化方式の標準化活動が進んでいる。 In recent years, with the development of multimedia applications, it has become common to handle all media information such as images, sounds and texts in a unified manner. Also, since a digitized image has a huge amount of data, an image information compression technique is indispensable for storage and transmission. On the other hand, in order to interoperate compressed image data, standardization of compression technology is also important. For example, as a standard for image compression technology, H.264 of ITU-T (International Telecommunication Union, Telecommunication Standardization Division). 261, H.H. 263, H.M. H.264, ISO / IEC (International Organization for Standardization) MPEG-1, MPEG-3, MPEG-4, MPEG-4AVC, and the like. At present, standardization activities for a next-generation screen coding method called HEVC in cooperation with ITU-T and ISO / IEC are in progress.
 このような動画像の符号化では、符号化対象の各ピクチャを符号化単位ブロックに分割し、ブロック毎に時間方向および空間方向の冗長性を削減することによって情報量の圧縮を行う。時間的な冗長性の削減を目的とする画面間予測符号化では、前方または後方のピクチャを参照してブロック単位で動きの検出および予測画像の作成を行い、得られた予測画像と符号化対象のブロックの入力画像との差分画像を取得する。また空間的な冗長性の削減を目的とする画面内予測符号化では、周辺の符号化済みブロックの画素情報をから予測画像の生成を行い、得られた予測画像と符号化対象のブロックの入力画像との差分画像を取得する。さらに得られた差分画像に対して離散コサイン変換等の直交変換および量子化を行い、可変長符号化を用いて符号列を生成することで情報量が圧縮される。このとき、可変長符号化のみで符号列を生成するCAVLCと呼ばれる符合化方式と、まず可変長符号化によって中間符号列を生成し(2値化)、さらに前記中間符号列に対して算術符号化を行うことで符号列を生成するCABACと呼ばれる符合化方式とがある。 In such moving picture coding, each picture to be coded is divided into coding unit blocks, and the amount of information is compressed by reducing redundancy in the time direction and the spatial direction for each block. In inter-frame predictive coding for the purpose of reducing temporal redundancy, motion is detected and a predicted image is created in block units with reference to the front or rear picture, and the resulting predicted image and encoding target are obtained. A difference image from the input image of the block is acquired. In addition, in the intra prediction encoding for the purpose of reducing spatial redundancy, a prediction image is generated from pixel information of surrounding encoded blocks, and the obtained prediction image and a block to be encoded are input. A difference image from the image is acquired. Further, orthogonal transformation such as discrete cosine transformation and quantization are performed on the obtained difference image, and a code string is generated using variable length coding, thereby compressing the information amount. At this time, a coding method called CAVLC that generates a code string only by variable-length coding, and first, an intermediate code string is generated by variable-length coding (binarization), and an arithmetic code is further generated for the intermediate code string There is an encoding method called CABAC that generates a code string by performing encoding.
 また復号化では、前記符号化処理によって生成された符号列を解析して予測情報および残差係数情報を取得し、予測情報を用いて画面間予測復号化および画面内予測復号化を行って予測画像を生成し、残差係数情報に対して逆量子化および逆直交変換を行って差分画像を生成し、得られた予測画像と差分画像を加算することで最終的な出力画像を復元する。 In decoding, prediction information and residual coefficient information are obtained by analyzing the code string generated by the encoding process, and prediction is performed by performing inter-screen prediction decoding and intra-screen prediction decoding using the prediction information. An image is generated, a difference image is generated by performing inverse quantization and inverse orthogonal transform on the residual coefficient information, and a final output image is restored by adding the obtained predicted image and the difference image.
 H.264(非特許文献1)では、ブロック単位の処理量の上限を制約するために、ブロック単位の発生符号量の最大値が定義されている(具体的には3200ビット)。前述の通常の符号化処理を行うと、入力画像の性質や量子化処理の条件によって前記発生符号量の最大値を超過した符号列を生成してしまう可能性があるため、IPCMと呼ばれる特別な符号化モードを使用することによって常に最大値内に納めることを可能としている。 H. In H.264 (Non-Patent Document 1), in order to restrict the upper limit of the processing amount in block units, the maximum value of the generated code amount in block units is defined (specifically, 3200 bits). If the normal encoding process described above is performed, a code string exceeding the maximum value of the generated code amount may be generated depending on the properties of the input image and the conditions of the quantization process. By using the encoding mode, it is possible to always keep within the maximum value.
 IPCMは通常の符号化モードとは異なり、画面内・画面間予測による差分画像の生成や直交変換・量子化を行うことなく、入力画像の画素値をそのままのビット列として符号列に記述するモードである。このモードを使用すると、例えば入力画像のフォーマットが各画素8ビットのYUV4:2:0であった場合、輝度成分のブロックが16×16画素、2つの色差成分のブロックがそれぞれ8×8画素であるため、合計で384バイトとなり、ヘッダに必要な情報を含めても前記最大値の3200ビット以下に必ず納めることが可能となる。 Unlike the normal encoding mode, IPCM is a mode in which pixel values of an input image are described in a code string as they are as a bit string without generating a difference image by intra-screen / inter-screen prediction, or performing orthogonal transform / quantization. is there. Using this mode, for example, if the format of the input image is YUV 4: 2: 0 with 8 bits per pixel, the luminance component block is 16 × 16 pixels, and the two color difference component blocks are 8 × 8 pixels respectively. Therefore, the total is 384 bytes, and even if necessary information is included in the header, it can be surely stored within the maximum value of 3200 bits.
 ITU-T H.264 : Advanced video coding for generic audiovisual services (03/2010) ITU-T H.264: Advanced video coding for generic audiovisual services (03/2010)
 多くの動画像符号化・復号化装置はLSIと呼ばれる集積回路によって符号化・復号化処理を実現している。このような符号化・復号化装置では処理高速化のためにパイプラインと呼ばれる並列動作を可能とする構成を取っている。具体的には1つのブロックの処理が完了する前に次のブロックの処理を開始することで同時に処理が進行する。 Many moving image encoding / decoding devices realize encoding / decoding processing by an integrated circuit called LSI. Such an encoding / decoding device has a configuration that enables a parallel operation called a pipeline in order to increase processing speed. Specifically, the processing proceeds simultaneously by starting the processing of the next block before the processing of one block is completed.
 図13(a)にCABACを用いた符号化におけるパイプラインの例を示す。ブロック1に対して、画素読込み、モード判定(画面間予測モードとするか画面内予測モードとするかの判定)、画面間/内予測、変換/量子化、2値化符号化、の各処理が順に適用され、ブロック2に対しても同様の処理が適用されている。このとき、ブロック2はブロック1の画素読込みが完了した時点で直ぐに処理を開始することで、処理タイミングを1ステップずつ遅らせながら並行して処理を行う。また、算術符号化は前記パイプラインとは別の独立したタイミングで処理が行われる。H.264やHEVCの符号化・復号化処理では過去に符号化・復号化したブロックの情報を参照しながら処理が行われる。そのため、図にあるようにブロック1で確定した予測情報、画素情報、符号化情報等をブロック2が参照しながら処理を行う必要がある。 FIG. 13 (a) shows an example of a pipeline in encoding using CABAC. For block 1, each process of pixel reading, mode determination (determination of inter-screen prediction mode or intra-screen prediction mode), inter-screen / intra prediction, transform / quantization, and binary coding Are applied in order, and the same processing is applied to block 2 as well. At this time, the block 2 starts the processing immediately after the pixel reading of the block 1 is completed, thereby performing the processing in parallel while delaying the processing timing by one step. Arithmetic coding is performed at an independent timing different from the pipeline. H. In the H.264 or HEVC encoding / decoding process, the process is performed while referring to the information of blocks previously encoded / decoded. Therefore, as shown in the figure, the block 2 needs to perform processing while referring to the prediction information, pixel information, encoding information, etc. determined in the block 1.
 しかし、前述のブロック単位の発生符号量が最大値以下に納められているかどうかは、算術符号化が完了した時点での符号量を調べないと判断できない。そのため、もし最大値を超過すると判定された場合はその時点でIPCMに切替えて符号列を生成し直さなくてはならない。 However, it cannot be determined whether or not the generated code amount in units of blocks is within the maximum value unless the code amount at the time of completion of arithmetic coding is checked. Therefore, if it is determined that the maximum value is exceeded, the code string must be regenerated by switching to the IPCM at that time.
 図13(b)にIPCMへの切替えが発生した場合のパイプラインの例を示す。ブロック1の算術符号化処理においてIPCMへ切替えることが確定したとする。しかし、このとき既にブロック2はブロック1が通常の符号化を行った場合の予測情報、画素情報等を参照しながら符号化処理が進行してしまっている。そのため、ブロック1のモード判定まで戻って、ブロック1がIPCMで符号化された前提に置き直して参照する情報を更新してブロック2の処理をやり直さなくてはならない。しかも、算術符号化処理は、他の処理が行われているパイプラインとは別の独立したタイミングで処理が行われる。そのため、ブロック1の算術符号化を行う時点で既に後続する多数のブロックの符号化処理が進行してしまい、膨大な量の処理を遡らなくてはならない場合がある。 Fig. 13 (b) shows an example of a pipeline when switching to IPCM occurs. Assume that switching to the IPCM is determined in the arithmetic coding process of block 1. However, at this time, the encoding process of block 2 has already progressed while referring to prediction information, pixel information, and the like when block 1 performs normal encoding. For this reason, it is necessary to return to the mode determination of block 1 and update the information to be referred to by replacing the block 1 with the assumption that the block 1 has been encoded with the IPCM, and repeat the processing of the block 2. Moreover, the arithmetic encoding process is performed at an independent timing different from the pipeline in which the other processes are performed. For this reason, encoding processing of a large number of subsequent blocks has already progressed at the time when arithmetic coding of block 1 is performed, and a huge amount of processing may have to be traced.
 また、参考として、図14(a)および図14(b)にCAVLCを用いた符号化におけるパイプラインの例を示す。CAVLCでは算術符号化処理がない。そのため、たとえIPCMへの切替えが発生した場合でも、パイプラインを遡る処理の量は一定であり、CABACと比較すると制御が単純になっている。 For reference, FIG. 14A and FIG. 14B show examples of pipelines in encoding using CAVLC. In CAVLC, there is no arithmetic coding process. Therefore, even when switching to IPCM occurs, the amount of processing going back in the pipeline is constant, and the control is simple compared to CABAC.
 このようにCABACを用いた符号化においてIPCMが発生したときのパイプラインを遡る制御は非常に複雑な処理制御が必要となる。また対象ピクチャ内でIPCMが多数発生して遡る回数が増加すると処理速度遅延の原因となり、要求時間内に対象ピクチャの符号化処理を完了できなくなる。 As described above, when the IPCM occurs in the encoding using CABAC, the control going back in the pipeline requires very complicated processing control. In addition, if the number of IPCMs that occur in the target picture increases and the number of retroactive times increases, processing speed is delayed, and the encoding process of the target picture cannot be completed within the required time.
 一方、図15(a)にCABACを用いた復号化におけるパイプラインの例を示す。ブロック1に対して、符号列解析、逆変換/量子化、画面間/内予測、出力画像生成、の各処理が順に適用され、ブロック2に対しても同様の処理が適用されている。このとき、ブロック2はブロック1の符号列解析が完了した時点で直ぐに処理を開始することで、処理タイミングを1ステップずつ遅らせながら並行して処理を行う。また、算術復号化は前記パイプラインとは別の独立したタイミングで処理が行われる。 On the other hand, FIG. 15A shows an example of a pipeline in decoding using CABAC. Code block analysis, inverse transform / quantization, inter-screen / intra prediction, and output image generation are applied to block 1 in sequence, and similar processing is applied to block 2 as well. At this time, the block 2 starts the processing immediately after the code string analysis of the block 1 is completed, thereby performing the processing in parallel while delaying the processing timing by one step. Arithmetic decoding is performed at a timing independent from the pipeline.
 H.264では、前述の通りブロック単位の符号列の最大符号量が定義されている。しかし、制限されているのは算術復号化前の符号列の符号量のみであり、算術復号化の結果生成される中間符号列の符号量に関しては定義されていない。そのため、条件によっては中間符号列の符号量が極端に大きくなってしまう可能性がある。 H. In H.264, as described above, the maximum code amount of a code string in block units is defined. However, only the code amount of the code string before arithmetic decoding is limited, and the code amount of the intermediate code string generated as a result of arithmetic decoding is not defined. Therefore, the code amount of the intermediate code string may become extremely large depending on conditions.
 図15(b)にブロック2において中間符号列の符号量が極端に大きくなった場合のパイプラインの例を示す。ブロック2の符号列解析処理において、多くの中間符号列を読み込んで処理を行わなくてはならない。そのため、他の処理よりも処理に必要な時間が増加してしまっている。このとき並列に動作している他のブロックの処理も、ブロック2の符号列解析の処理が完了するまで次の処理に進めなくなる。 FIG. 15B shows an example of a pipeline when the code amount of the intermediate code string becomes extremely large in the block 2. In the code string analysis process of block 2, many intermediate code strings must be read and processed. For this reason, the time required for processing has increased compared to other processing. At this time, the processing of other blocks operating in parallel also cannot proceed to the next processing until the processing of the code string analysis of block 2 is completed.
 このようにCABACを用いた復号化において中間符号列の符号量が大きくなってしまうと、符号列解析処理の処理時間が増加してしまい、復号化処理全体の処理速度遅延の原因となり、要求時間内に対象ピクチャの復号化処理を完了できなくなってしまう。 Thus, if the code amount of the intermediate code string becomes large in decoding using CABAC, the processing time of the code string analysis process increases, causing a delay in the processing speed of the entire decoding process, and the required time. It becomes impossible to complete the decoding process of the target picture.
 本発明は上記課題を解決するものであり、パイプライン構造を持つ算術符号化に対応した符号化装置において、発生符号量を制限値以下に納めるためにパイプラインを遡る処理を単純化することを可能とし、同時にパイプライン構造を持つ算術復号化に対応した復号化装置において、符号列解析処理が算術復号化後の中間符号列を読み込むために要する時間を常に一定時間以下とすることで、パイプラインの処理遅延の発生を回避することを可能とする、従来の方法に代わる新しい制御方法を提供することを目的とする。 SUMMARY OF THE INVENTION The present invention solves the above-described problem, and in a coding apparatus corresponding to arithmetic coding having a pipeline structure, simplifies the process of tracing the pipeline in order to keep the generated code amount below a limit value. In a decoding apparatus that supports arithmetic decoding with a pipeline structure at the same time, the time required for the code string analysis process to read the intermediate code string after arithmetic decoding is always less than or equal to a certain time, It is an object of the present invention to provide a new control method that can avoid the occurrence of a line processing delay and replace the conventional method.
 本発明の第1の態様における動画像符号化装置は、入力される符号化対象画像をブロック単位で符号化する動画像符号化装置であって、符号化対象画像に対応する予測画像を生成する予測画像生成部と、符号化対象画像と生成された予測画像との差分画像を生成する減算器と、減算器の出力に対して直交変換処理および量子化処理を行い、残差係数を生成する予測残差符号化部と、残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成する予測残差復号化部と、予測画像生成部で生成された予測画像と予測残差復号化部で生成された残差復号化画像とを加算することで再構成画像を生成する加算器と、予測残差符号化部で生成された残差係数を可変長符号化して係数符号列を生成し、予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、係数符号列および、ヘッダ符号列から構成される中間符号列を出力する2値化符号化部と、2値化符号化部によって出力された中間符号列に対して算術符号化し、出力符号列を生成する算術符号化部と、を備え、2値化符号化部は、算術符号化部に中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する。 The moving image encoding device according to the first aspect of the present invention is a moving image encoding device that encodes an input encoding target image in units of blocks, and generates a predicted image corresponding to the encoding target image. A prediction image generation unit, a subtracter that generates a difference image between the encoding target image and the generated prediction image, and an orthogonal transform process and a quantization process are performed on the output of the subtractor to generate a residual coefficient Generated by a prediction residual encoding unit, a prediction residual decoding unit that generates a residual decoded image by performing inverse quantization processing and inverse orthogonal transform processing on the residual coefficient, and a prediction image generation unit An adder that generates a reconstructed image by adding the prediction image and the residual decoded image generated by the prediction residual decoding unit, and a variable coefficient for the residual coefficient generated by the prediction residual encoding unit When generating a coefficient code string by encoding and generating a prediction image A header code string including at least the prediction information used, and a binary code part that outputs a coefficient code string and an intermediate code string composed of the header code string and the binary code part An arithmetic encoding unit that arithmetically encodes the intermediate code sequence and generates an output code sequence, and the binarization encoding unit outputs the intermediate code sequence when outputting the intermediate code sequence to the arithmetic encoding unit. The code amount is limited to a predetermined specific code amount or less.
 本発明の第2の態様における動画像符号化装置は、入力される符号化対象画像をブロック単位で符号化する動画像符号化装置であって、符号化対象画像に対応する予測画像を生成する予測画像生成部と、符号化対象画像と生成された予測画像との差分画像を生成する減算器と、減算器の出力に対して直交変換処理および量子化処理を行い、残差係数を生成する予測残差符号化部と、残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成する予測残差復号化部と、予測画像生成部で生成された予測画像と予測残差復号化部で生成された残差復号化画像とを加算することで再構成画像を生成する加算器と、第1モードにおいて、予測残差符号化部で生成された残差係数を可変長符号化して係数符号列を生成し、予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、係数符号列および、ヘッダ符号列から構成される中間符号列を出力する一方、第2モードにおいて、残差係数の代わりに符号化対象画像の信号処理過程において得られる中間画像信号を可変長符号化せずにそのまま係数符号列とし、当該係数符号列および当該係数符号列が中間画像信号であることを示す識別子を少なくとも含むヘッダ符号列から構成される中間符号列を出力する2値化符号化部と、第1モードにおいて出力された中間符号列に対して算術符号化し、出力符号列を生成する一方、第2モードにおいて出力された中間符号列のうちヘッダ符号列に対してのみ算術符号化し、算術符号化後のヘッダ符号列と係数符号列から構成される出力符号列を生成する算術符号化部と、を備え、2値化符号化部は、算術符号化部に中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する。 The moving image encoding device according to the second aspect of the present invention is a moving image encoding device that encodes an input encoding target image in units of blocks, and generates a predicted image corresponding to the encoding target image. A prediction image generation unit, a subtracter that generates a difference image between the encoding target image and the generated prediction image, and an orthogonal transform process and a quantization process are performed on the output of the subtractor to generate a residual coefficient Generated by a prediction residual encoding unit, a prediction residual decoding unit that generates a residual decoded image by performing inverse quantization processing and inverse orthogonal transform processing on the residual coefficient, and a prediction image generation unit An adder that generates a reconstructed image by adding the prediction image and the residual decoded image generated by the prediction residual decoding unit, and a residual generated by the prediction residual encoding unit in the first mode The difference coefficient is variable-length encoded to generate a coefficient code string, and A header code sequence including at least prediction information used when generating an image is generated and an intermediate code sequence composed of a coefficient code sequence and a header code sequence is output. In the second mode, instead of a residual coefficient The intermediate image signal obtained in the signal processing process of the encoding target image is directly used as a coefficient code string without variable length coding, and at least an identifier indicating that the coefficient code string and the coefficient code string are intermediate image signals A binary encoding unit that outputs an intermediate code string including a header code string including the arithmetic code for the intermediate code string output in the first mode to generate an output code string; In the intermediate code sequence output in step 1, only the header code sequence is arithmetically encoded to generate an output code sequence composed of the header code sequence and the coefficient code sequence after the arithmetic encoding. The binary encoding unit, when outputting the intermediate code sequence to the arithmetic encoding unit, limits the code amount of the intermediate code sequence to a predetermined code amount or less. .
 なお、本発明は、このような動画像符号化装置に含まれる各手段と同等の処理をプログラムや集積回路としても実現することもできる。 Note that the present invention can also realize processing equivalent to each means included in such a moving image coding apparatus as a program or an integrated circuit.
 本発明の各態様における動画像符号化装置によれば、パイプライン構造を用いて算術符号化を含む符号化方法を実現した場合でも、中間符号列を生成する時点で予め定義された特定の符号量以下になるように制御することができる。そのため、発生符号量を制限値以下に納めるためにパイプラインを遡る処理を単純化することが可能となる。また対応する動画像復号化装置においては、中間符号列の符号量が予め定義された特定の符号量以下に制限されているため、符号列解析処理において算術復号化後の中間符号列を読み込むために要する時間を常に一定時間以下とすることができる。したがって、動画像復号化処理におけるパイプラインの処理遅延の発生を回避することが可能となる。 According to the moving picture coding apparatus in each aspect of the present invention, even when an encoding method including arithmetic coding is realized using a pipeline structure, a specific code defined in advance at the time of generating an intermediate code string The amount can be controlled to be less than the amount. Therefore, it is possible to simplify the process of tracing back the pipeline in order to keep the generated code amount below the limit value. Also, in the corresponding video decoding device, since the code amount of the intermediate code string is limited to a predetermined specific code amount or less, in order to read the intermediate code string after arithmetic decoding in the code string analysis process It is possible to always set the time required for the time to a certain time or less. Therefore, it is possible to avoid the occurrence of pipeline processing delay in the video decoding process.
 また、従来の動画像符号化装置においては、複雑なパイプラインを遡る処理を実現しようとすると、符号化処理全体において能力の高い素子を用いる必要があった。しかし、本発明では、中間符号列の符号量を一定値以下に制限することによりパイプラインを遡る処理が単純化されるため、動画像符号化装置において従来よりも能力の低い素子でも処理を実現することが可能となる。
また、従来の動画像復号化装置においては、符号列解析処理等の処理遅延の発生を少なくしようとすると、符号列解析処理等を行う部分に能力の高い素子を用いる必要があった。しかし、本発明では、中間符号列の符号量を一定値以下に制限することによりそもそも動画像復号化装置において遅延が生じにくい。そのため、動画像復号化装置において特別に能力の高い素子等を用いる必要がなく、動画像復号化装置を簡易に構成できる。
In addition, in the conventional moving image encoding device, it is necessary to use a high-capacity element in the entire encoding process in order to realize a process that goes back through a complicated pipeline. However, in the present invention, the process of going back the pipeline is simplified by limiting the code amount of the intermediate code string to a certain value or less, so the processing is realized even with an element having a lower capability than the conventional one in the moving picture coding apparatus. It becomes possible to do.
Further, in the conventional moving picture decoding apparatus, in order to reduce the occurrence of processing delay such as code string analysis processing, it is necessary to use a high-capacity element for a portion that performs code string analysis processing or the like. However, in the present invention, by limiting the code amount of the intermediate code string to a certain value or less, a delay hardly occurs in the video decoding device in the first place. Therefore, it is not necessary to use an element with a particularly high capability in the moving picture decoding apparatus, and the moving picture decoding apparatus can be simply configured.
実施形態1に係る動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder which concerns on Embodiment 1. FIG. 実施形態1に係る符号列生成処理のフローチャートである。3 is a flowchart of a code string generation process according to the first embodiment. 実施形態1によって生成される符号列のシンタックスの一例を説明するための概念図である。6 is a conceptual diagram for explaining an example of a syntax of a code string generated according to Embodiment 1. FIG. 実施形態1に係る動画像符号化装置のパイプライン制御を説明するための概念図である。It is a conceptual diagram for demonstrating the pipeline control of the moving image encoder which concerns on Embodiment 1. FIG. 実施形態1の他の例に係る符号列生成処理のフローチャートである。6 is a flowchart of a code string generation process according to another example of the first embodiment. 実施形態2に係る動画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image encoder which concerns on Embodiment 2. FIG. 実施形態2に係る符号列生成処理のフローチャートである。10 is a flowchart of a code string generation process according to the second embodiment. 実施形態2によって生成される符号列のシンタックスの一例を説明するための概念図である。10 is a conceptual diagram for explaining an example of a syntax of a code string generated by Embodiment 2. FIG. 実施形態2に係る動画像符号化装置のパイプライン制御を説明するための概念図である。It is a conceptual diagram for demonstrating the pipeline control of the moving image encoder which concerns on Embodiment 2. FIG. 実施形態3、4に係る動画像復号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the moving image decoding apparatus which concerns on Embodiment 3, 4. FIG. 実施形態3に係る符号列解析処理のフローチャートである。10 is a flowchart of code string analysis processing according to the third embodiment. 実施形態4に係る符号列解析処理のフローチャートである。10 is a flowchart of code string analysis processing according to the fourth embodiment. 従来の動画像符号化装置のパイプライン制御を説明するための概念図である。It is a conceptual diagram for demonstrating the pipeline control of the conventional moving image encoder. 従来の動画像符号化装置の別のパイプライン制御を説明するための概念図である。It is a conceptual diagram for demonstrating another pipeline control of the conventional moving image encoder. 従来の動画像復号化装置のパイプライン制御を説明するための概念図である。It is a conceptual diagram for demonstrating the pipeline control of the conventional moving image decoding apparatus.
(実施形態1)
 以下、実施の形態1について、図面を参照しながら説明する。
(Embodiment 1)
Hereinafter, Embodiment 1 will be described with reference to the drawings.
1.動画像符号化装置の構成
 図1は、実施形態1に係る動画像符号化装置100の構成を示すブロック図である。動画像符号化装置100は、ピクチャ単位で入力された動画像をブロックに分割し、ブロック単位で符号化処理を行い符号列を生成する。
1. Configuration of Video Encoding Device FIG. 1 is a block diagram illustrating a configuration of a video encoding device 100 according to the first embodiment. The moving image encoding apparatus 100 divides a moving image input in units of pictures into blocks, performs an encoding process in units of blocks, and generates a code string.
 この動画像符号化装置100は、ピクチャメモリ101と、予測残差符号化部102と、予測残差復号化部103と、ローカルバッファ104と、予測符号化部105と、量子化値決定部106と、2値化符号化部107と、算術符号化部110とを備えている。 The moving picture encoding apparatus 100 includes a picture memory 101, a prediction residual encoding unit 102, a prediction residual decoding unit 103, a local buffer 104, a prediction encoding unit 105, and a quantization value determination unit 106. And a binary encoding unit 107 and an arithmetic encoding unit 110.
 ピクチャメモリ101は、表示を行う順にピクチャ単位で入力される入力画像信号151を、符号化を行う順にピクチャの並び替えを行って蓄積する。次に、ピクチャメモリ101は、差分演算部111または予測符号化部105からの読出し命令を受け付けると当該読出し命令に係る入力画像信号をそれぞれ出力する。このとき、各々のピクチャはコーディングユニット(以下、CUと称す)と呼ばれる複数の画素から構成される符号化単位に分割される。このCUは、例えば水平64×垂直64画素のブロック、水平32×垂直32画素のブロック、水平16×垂直16画素のブロック等である。つまり、複数の画素から構成されるひとまとまりの画素集合であれば、どのような構成でも構わない。上記のように正方形状のブロックサイズに限定されるものではなく、長方形状のブロックサイズであっても構わない。なお、本実施形態における動画像符号化装置100では、CU単位で以降の処理が行われる。 The picture memory 101 stores the input image signal 151 input in units of pictures in the order of display by rearranging the pictures in the order of encoding. Next, when the picture memory 101 receives a read command from the difference calculation unit 111 or the predictive coding unit 105, the picture memory 101 outputs an input image signal related to the read command. At this time, each picture is divided into coding units composed of a plurality of pixels called coding units (hereinafter referred to as CU). The CU is, for example, a horizontal 64 × vertical 64 pixel block, a horizontal 32 × vertical 32 pixel block, a horizontal 16 × vertical 16 pixel block, or the like. That is, any configuration may be used as long as it is a group of pixels composed of a plurality of pixels. As described above, the block size is not limited to a square shape, and may be a rectangular block size. In the moving picture encoding apparatus 100 according to the present embodiment, the subsequent processing is performed in units of CUs.
 予測残差符号化部102は、差分演算部111から出力される差分画像信号152に対して直交変換を行う。さらに、予測残差符号化部102は、得られた各周波数成分の直交変換係数に対し量子化を行うことで画像情報の圧縮を行い、残差符号化信号153を生成する。そして、生成した残差符号化信号153を予測残差復号化部103および係数符号列生成部109に出力する。このとき予測残差符号化部102は、量子化値決定部106において決定された量子化値信号158を用いて、直交変換係数を量子化する。 The prediction residual encoding unit 102 performs orthogonal transformation on the difference image signal 152 output from the difference calculation unit 111. Further, the prediction residual encoding unit 102 compresses the image information by performing quantization on the obtained orthogonal transform coefficient of each frequency component, and generates a residual encoded signal 153. Then, the generated residual encoded signal 153 is output to the prediction residual decoding unit 103 and the coefficient code string generation unit 109. At this time, the prediction residual encoding unit 102 quantizes the orthogonal transform coefficient using the quantized value signal 158 determined by the quantized value determining unit 106.
 予測残差復号化部103は、予測残差符号化部102から出力される残差符号化信号153に対して、逆量子化および逆直交変換することで残差復号化信号154を生成する。そして、生成した残差復号化信号154を加算演算部112に出力する。 The prediction residual decoding unit 103 generates a residual decoded signal 154 by performing inverse quantization and inverse orthogonal transform on the residual encoded signal 153 output from the prediction residual encoding unit 102. Then, the generated residual decoded signal 154 is output to the addition operation unit 112.
 ローカルバッファ104は、加算演算部112から出力される再構成画像信号155を格納する。この再構成画像信号155は、現在符号化対象となっているピクチャ以降のピクチャの符号化における予測符号化処理に用いられる。つまり、再構成画像信号155は、現在符号化対象となっているピクチャ以降のピクチャを符号化する際、画素データとして参照される。ローカルバッファ104は、予測符号化部105からの読出し命令に応じて、格納する再構成画像信号155を画素データとして予測符号化部105に出力する。 The local buffer 104 stores the reconstructed image signal 155 output from the addition operation unit 112. The reconstructed image signal 155 is used for predictive coding processing in coding of a picture subsequent to a picture that is currently being coded. That is, the reconstructed image signal 155 is referred to as pixel data when a picture subsequent to the current picture to be coded is coded. The local buffer 104 outputs the stored reconstructed image signal 155 to the prediction encoding unit 105 as pixel data in response to a read command from the prediction encoding unit 105.
 予測符号化部105は、ピクチャメモリ101から出力される入力画像信号を基に、画面内予測、または画面間予測を用いて予測画像信号156を生成する。そして、予測符号化部105は、生成した予測画像信号156を差分演算部111および加算演算部112に出力する。なお、予測符号化部105は、画面間予測を用いる際は、ローカルバッファ104に蓄積されている既に符号化済みの過去のピクチャの再構成画像信号155を用いる。また、画面内予測を用いる際は、符号化対象CUに隣接する既に符号化済みのCUの現在のピクチャの再構成画像信号155を用いる。画面内予測を用いるか画面間予測を用いるかのモード判定方法については、どちらの予測方法がより残差信号の情報量を少なくすることができるかを予測して行われる。 The predictive encoding unit 105 generates a predictive image signal 156 using intra prediction or inter prediction based on the input image signal output from the picture memory 101. Then, the predictive encoding unit 105 outputs the generated predicted image signal 156 to the difference calculation unit 111 and the addition calculation unit 112. Note that the prediction encoding unit 105 uses the reconstructed image signal 155 of a past picture that has already been encoded and stored in the local buffer 104 when using inter-screen prediction. When using intra prediction, the reconstructed image signal 155 of the current picture of an already encoded CU adjacent to the encoding target CU is used. The mode determination method of using intra-screen prediction or inter-screen prediction is performed by predicting which prediction method can reduce the information amount of the residual signal.
 量子化値決定部106は、ピクチャメモリ101に格納されているピクチャ等の情報に基づいて、予測残差符号化部102において差分画像信号152を量子化する際の量子化値を設定する。そして、設定した量子化値を予測残差符号化部102およびヘッダ符号列生成部107に出力する。なお、量子化値決定部106における量子化値の設定方法としては、符号列信号160のビットレートが目標とするするビットレートに近づくように量子化値を設定する、いわゆるレート制御に基づく量子化値の設定方法等を利用しても構わない。なお、上記において量子化値を決定するための情報には、たとえば仮想バッファの滞留量、あらかじめ設定されるビットレート等が含まれても構わない。 The quantization value determination unit 106 sets a quantization value when the difference image signal 152 is quantized by the prediction residual encoding unit 102 based on information such as a picture stored in the picture memory 101. Then, the set quantization value is output to prediction residual encoding section 102 and header code string generation section 107. As a quantization value setting method in the quantization value determination unit 106, a quantization value is set so that the bit rate of the code string signal 160 approaches a target bit rate, so-called quantization based on rate control. A value setting method or the like may be used. Note that the information for determining the quantization value in the above may include, for example, a virtual buffer retention amount, a preset bit rate, and the like.
 2値化符号化部107は、ヘッダ符号列生成部108と係数符号列生成部109とを含み、各々の処理を適用して生成された2値化情報を中間符号列159として算術符号化部110に出力する。 The binarization encoding unit 107 includes a header code string generation unit 108 and a coefficient code string generation unit 109. The binarization information generated by applying each process is used as an intermediate code string 159 as an arithmetic encoding unit. To 110.
 ヘッダ符号列生成部108は、予測符号化部105が出力する予測情報信号157と、量子化値決定部106が出力する量子化値信号158と、その他の符号化制御に関する制御情報を可変長符号化することでヘッダ中間符号列を生成する。なお、予測情報信号157に含まれる予測情報には、例えば画面内予測モードを示す情報、画面間予測モードを示す情報、動きベクトルを示す情報、参照ピクチャを示す情報等が含まれる。また、制御情報は係数符号列生成部109における処理前までに取得可能な情報であって、CUの符号化時に適用した符号化条件を示す情報であり、例えばブロック符号化タイプを示す情報、ブロック分割情報等が含まれる。 The header code string generation unit 108 is a variable length code for the prediction information signal 157 output from the prediction encoding unit 105, the quantization value signal 158 output from the quantization value determination unit 106, and other control information related to encoding control. To generate a header intermediate code string. Note that the prediction information included in the prediction information signal 157 includes, for example, information indicating an intra prediction mode, information indicating an inter prediction mode, information indicating a motion vector, information indicating a reference picture, and the like. Further, the control information is information that can be acquired before the processing in the coefficient code string generation unit 109, and is information that indicates the encoding condition applied at the time of CU encoding. For example, information indicating a block encoding type, block Division information and the like are included.
 係数符号列生成部109は、予測残差符号化部102が出力する残差符号化信号153を可変長符号化して係数中間符号列を生成する。そして、係数符号列生成部109は、生成した係数中間符号列をヘッダ符号列生成部108が生成したヘッダ中間符号列に続けて追記することで中間符号列信号159を生成する(以下、第1モードと称す)。 The coefficient code string generation unit 109 performs variable-length coding on the residual encoded signal 153 output from the prediction residual encoding unit 102 to generate a coefficient intermediate code string. Then, the coefficient code string generation unit 109 generates the intermediate code string signal 159 by appending the generated coefficient intermediate code string after the header intermediate code string generated by the header code string generation unit 108 (hereinafter referred to as the first code string signal 159). Called mode).
 一方、係数符号列生成部109は、ピクチャメモリ101から出力される入力画像信号を可変長符号化せずに得られる係数中間符号列を、ヘッダ符号列生成部108が生成したヘッダ中間符号列に続けて追記することで中間符号列信号159を生成する(以下、第2モードと称す)。 On the other hand, the coefficient code string generation unit 109 converts the coefficient intermediate code string obtained without variable length encoding of the input image signal output from the picture memory 101 into the header intermediate code string generated by the header code string generation unit 108. Subsequently, the intermediate code string signal 159 is generated by additionally writing (hereinafter referred to as the second mode).
 算術符号化部110は、2値化符号化部107から出力される中間符号列159のうち一部の符号列に対して算術符号化を行い、当該動画像符号化装置100の出力となる符号列信号160を生成する。 The arithmetic encoding unit 110 performs arithmetic encoding on a part of the intermediate code sequence 159 output from the binary encoding unit 107, and outputs a code that is output from the video encoding device 100 A column signal 160 is generated.
 差分演算部111は、ピクチャメモリ101から読み出された入力画像信号と、予測符号化部105の出力である予測画像信号156との差分値である差分画像信号152を生成し、予測残差符号化部102に出力する。 The difference calculation unit 111 generates a difference image signal 152 that is a difference value between the input image signal read from the picture memory 101 and the prediction image signal 156 that is the output of the prediction encoding unit 105, and generates a prediction residual code. To the conversion unit 102.
 加算演算部112は、予測残差復号化部103から出力される残差復号化信号154と、予測符号化部105から出力される予測画像信号156とを加算することにより再構成画像信号155を生成し、ローカルバッファ104及び予測符号化部105に出力する。 The addition operation unit 112 adds the residual decoded signal 154 output from the prediction residual decoding unit 103 and the prediction image signal 156 output from the prediction encoding unit 105 to add the reconstructed image signal 155. Generated and output to the local buffer 104 and the prediction encoding unit 105.
2.符号列信号の生成方法
 2値化符号化部107および算術符号化部110において符号列信号160を生成する方法について、図2のフローチャートを用いて具体的に説明する。
2. Code String Signal Generation Method A method of generating the code string signal 160 in the binary coding section 107 and the arithmetic coding section 110 will be specifically described with reference to the flowchart of FIG.
 まず、2値化符号化部107は、入力された残差符号化信号153を用いて、符号化対象CUの2値化後の中間符号量が規定値を超過する可能性があるかどうかを判定する(S601)。 First, the binary encoding unit 107 uses the input residual encoded signal 153 to determine whether or not the intermediate code amount after binarization of the encoding target CU may exceed a specified value. Determination is made (S601).
 ステップS601において、超過する可能性がないと判断された場合は、前述の通常の符号化処理を行った結果生成された予測情報信号157、量子化値信号158、その他の符号化制御情報を入力として可変長符号化を行うことによってヘッダ中間符号列を生成する(S602)。さらに、従来の符号化と同様に、入力された残差符号化信号153を可変長符号化する(Residualモード)ことで係数中間符号列を生成する(S603)。 If it is determined in step S601 that there is no possibility of exceeding, the prediction information signal 157, the quantized value signal 158, and other coding control information generated as a result of performing the normal coding process described above are input. To generate a header intermediate code string by performing variable length coding (S602). Further, similarly to the conventional coding, the input residual coded signal 153 is variable-length coded (Residual mode) to generate a coefficient intermediate code string (S603).
 一方、ステップS601において、超過する可能性があると判断された場合は、PCMモードで符号化したことを示すPCMモード情報のみを可変長符号化することによってヘッダ中間符号列を生成する(S605)。さらに、入力された入力画像信号を可変長符号化せずにそのまま符号列に記述する(PCMモード)ことで係数中間符号列を生成する(S606)。 On the other hand, if it is determined in step S601 that there is a possibility of exceeding, a header intermediate code string is generated by variable-length encoding only PCM mode information indicating that encoding has been performed in the PCM mode (S605). . Further, a coefficient intermediate code string is generated by describing the input image signal as it is in the code string as it is without variable length coding (PCM mode) (S606).
 つづいて、算術符号化部110は、入力された中間符号列がResidualモードによって生成されている場合は、前記ヘッダ中間符号列および前記係数中間符号列に対して算術符号化を行うことによって最終的な符号列を生成する(S604)。また、入力された中間符号列がPCMモードによって生成されている場合は、前記PCMモード情報のみのヘッダ中間符号列に対して算術符号化を行い、係数中間符号列に対しては算術符号化を行うことなくそのまま符号列に追記することで最終的な符号列を生成する(S607)。 Subsequently, when the input intermediate code sequence is generated in the Residual mode, the arithmetic encoding unit 110 performs final encoding by performing arithmetic encoding on the header intermediate code sequence and the coefficient intermediate code sequence. A code string is generated (S604). When the input intermediate code sequence is generated by the PCM mode, arithmetic encoding is performed on the header intermediate code sequence including only the PCM mode information, and arithmetic encoding is performed on the coefficient intermediate code sequence. A final code string is generated by adding the code string as it is without performing the process (S607).
 なお、ステップS601において、入力された残差符号化信号153を用いて符号化対象CUの中間符号量が規定値を超過する可能性があるかどうかを判定しているが、それ以外の方法を用いて中間符号量が規定値を超過する可能性があるかどうかを判定してもよい。例えば、生成した中間符号列信号159に基づいて符号量が既定値を超過しているか判定する方法がある。この場合、ステップS602およびステップS603の処理が完了した時点で判定を行うことになり、既にResidualモードで中間符号列が生成されてしまっている。そのため、もし超過していると判定された場合は、生成済みの当該中間符号列に代えて、ステップS605およびステップS606の処理を行ってPCMモードで再生成された中間符号列に置き換える。 In step S601, it is determined whether there is a possibility that the intermediate code amount of the encoding target CU exceeds the specified value using the input residual encoded signal 153, but other methods are used. It may be determined whether there is a possibility that the intermediate code amount exceeds the specified value. For example, there is a method of determining whether the code amount exceeds a predetermined value based on the generated intermediate code string signal 159. In this case, the determination is made when the processing of step S602 and step S603 is completed, and the intermediate code string has already been generated in the Residual mode. For this reason, if it is determined that the number has been exceeded, the intermediate code string generated is replaced with the intermediate code string regenerated in the PCM mode by performing the processing in steps S605 and S606 instead of the generated intermediate code string.
 なお、係数符号列生成部109には入力画像信号を入力し、ステップS606では入力画像信号を入力としてPCMモードで係数中間符号列を生成しているが、入力画像信号の代わりに、再構成画像信号155を入力してPCMモードで係数中間符号列を生成してもよい。もしくは、差分画像信号152や残差復号化信号154を入力してPCMモードで係数中間符号列を生成してもよい。 Note that an input image signal is input to the coefficient code string generation unit 109, and in step S606, the input image signal is input to generate a coefficient intermediate code string in the PCM mode. However, instead of the input image signal, a reconstructed image is generated. A signal intermediate code string may be generated in the PCM mode by inputting the signal 155. Alternatively, the coefficient intermediate code sequence may be generated in the PCM mode by inputting the difference image signal 152 or the residual decoded signal 154.
 また、ステップS601においてCU単位で判定を行っているが、複数のCU単位、CUよりも小さなブロック単位、もしくはその他のブロック単位で判定を行ってもよい。 Further, although the determination is performed in units of CUs in step S601, the determination may be performed in units of a plurality of CUs, blocks smaller than the CU, or other block units.
3.シンタックス
 図3は本実施の形態によって生成される中間符号列のCU単位のシンタックス:coding_unit()の一例を示した図である。
3. Syntax FIG. 3 is a diagram showing an example of the syntax: coding_unit () of the CU unit of the intermediate code string generated by the present embodiment.
 図3(a)は図2で説明したResidualモードで中間符号列を生成した場合のシンタックスである。シンタックスの先頭には、ヘッダ符号列生成部108によって生成された、予測モード:pred_mode、予測情報:prediction_unit()、量子化値:qp_value等の情報を可変長符号化した符号列が記述されている。つづいて、residual_data()として残差符号化信号153を可変長符号化した符号列が記述されている。
 なお、下記図5で説明するResidualモードで中間符号列を生成した場合のシンタックスについても、同様である。
FIG. 3A shows the syntax when the intermediate code string is generated in the Residual mode described with reference to FIG. At the beginning of the syntax, a code sequence generated by the header code sequence generation unit 108, which is variable length encoded information such as prediction mode: pred_mode, prediction information: prediction_unit (), quantization value: qp_value, is described. Yes. Subsequently, a code string obtained by variable-length encoding the residual encoded signal 153 is described as residual_data ().
The same applies to the syntax when the intermediate code string is generated in the Residual mode described in FIG.
 図3(b)は図2で説明したPCMモードで中間符号列を生成した場合のシンタックスである。シンタックスの先頭には、PCMモードで符号化したことを示すPCMモード情報であるpred_modeを可変長符号化した符号列が記述されている。つづいて、pcm_data()には、入力画像信号を可変長符号化せず、画素のビット列そのままである符号列として記述されている。 FIG. 3B shows the syntax when the intermediate code string is generated in the PCM mode described with reference to FIG. At the beginning of the syntax, a code string obtained by variable-length encoding pred_mode, which is PCM mode information indicating that encoding is performed in the PCM mode, is described. Subsequently, in pcm_data (), the input image signal is described as a code string that is not subjected to variable-length encoding but is a pixel bit string as it is.
 このとき、発生する中間符号列の符号量は、Residualモードについては可変長符号化の条件によって符号長が変わるため一意に特定できない。しかし、PCMモードについてはpred_mode以外はCUのサイズによって一意に特定できる。例えば、画像のフォーマットが各画素8ビットのYUV4:2:0であり、符号化対象CUのサイズが32×32画素であった場合、入力画像信号もしくは再構成画像信号155の画素値をそのまま符号列として記述する際に必要となる符号量は1536バイトとなる。よって、pred_modeを可変長符号化したときに発生しうる最大の符号量および余裕量を加えても、CU全体で12500ビットを超過することはない。 At this time, the code amount of the generated intermediate code string cannot be uniquely specified in the Residual mode because the code length varies depending on the variable length coding conditions. However, the PCM mode can be uniquely specified by the size of the CU except for pred_mode. For example, if the image format is YUV 4: 2: 0 with 8 bits for each pixel and the size of the encoding target CU is 32 × 32 pixels, the pixel value of the input image signal or the reconstructed image signal 155 is directly encoded. The amount of code required for describing as a column is 1536 bytes. Therefore, even if the maximum code amount and margin that can be generated when pred_mode is variable-length encoded, the entire CU does not exceed 12500 bits.
 つまり、図2のステップS601で説明した規定値として、符号化対象CUの入力画像信号の画素値をそのまま符号列として記述する際に必要となる符号量と、PCMモードで符号化したことを示す情報を可変長符号化したときに発生しうる最大の符号量と、余裕量とを加算した値(前述の例では12500ビット)とすることで、生成される中間符号量が常に前記規定値を超過しないことが保証される。 That is, the specified value described in step S601 in FIG. 2 indicates that the pixel value of the input image signal of the encoding target CU is encoded as it is as a code string and is encoded in the PCM mode. By setting the maximum code amount that can be generated when information is variable-length encoded and the margin amount (12500 bits in the above example), the generated intermediate code amount always uses the specified value. Guaranteed not to exceed.
 なお、上記シンタックスの説明では、pcm_data()には、入力画像信号を記述するとしたが、再構成画像信号155、差分画像信号152、残差復号化信号154が係数符号列生成部109に入力される場合は、入力される信号に応じて、再構成画像信号155、差分画像信号152、残差復号化信号154を記述する。 In the above description of the syntax, the input image signal is described in pcm_data (), but the reconstructed image signal 155, the difference image signal 152, and the residual decoded signal 154 are input to the coefficient code string generation unit 109. If so, the reconstructed image signal 155, the difference image signal 152, and the residual decoded signal 154 are described in accordance with the input signal.
 なお、図3で説明したシンタックス、および前記規定値の説明に使用した数値は、本実施の形態を説明するための一例であり、ここに記載されているものと異なるシンタックス、および数値を用いて同様の機能を実現してもよい。 It should be noted that the syntax described in FIG. 3 and the numerical values used in the description of the specified values are examples for explaining the present embodiment, and the syntax and numerical values different from those described here are used. May be used to implement similar functions.
4.パイプライン改善効果
 図4を用いて本実施の形態に係る動画像符号化装置100のパイプラインの例を示す。
4). Pipeline Improvement Effect An example of a pipeline of the moving picture coding apparatus 100 according to the present embodiment will be shown using FIG.
 図4(a)は図2のステップS601の判定の結果、Residualモードで中間符号列を生成した場合のパイプラインの制御を示す図である。図13(a)で説明した従来の制御と全く同様の流れで処理が行われている。 FIG. 4A is a diagram illustrating pipeline control when an intermediate code string is generated in the Residual mode as a result of the determination in step S601 of FIG. Processing is performed in exactly the same flow as in the conventional control described with reference to FIG.
 一方、図4(b)は図2のステップS601の判定の結果、PCMモードで中間符号列を生成した場合のパイプラインの制御を示す図である。図13(b)で説明した従来の制御と異なり、算術符号化処理の前の2値化符号化処理の時点でPCMモードとすべきことが確定できる。従来においては、算術符号化処理の時点で、PCMモードとすべきことが確定されるため、それ以前のパイプラインにおいて膨大な遡り処理が発生していた。しかし、本実施形態では、2値化符号化処理の時点でPCMモードとすべきことが確定できるので、パイプラインを遡る処理の量を減少させて一定にすることが可能となり、PCMモード発生時の処理制御を単純化することができる。 On the other hand, FIG. 4B is a diagram illustrating pipeline control when an intermediate code string is generated in the PCM mode as a result of the determination in step S601 of FIG. Unlike the conventional control described with reference to FIG. 13B, it can be determined that the PCM mode should be set at the time of the binary encoding process before the arithmetic encoding process. Conventionally, since it is determined that the PCM mode should be set at the time of arithmetic coding processing, a huge amount of retroactive processing has occurred in the previous pipeline. However, in this embodiment, since it is possible to determine that the PCM mode should be set at the time of the binary coding process, it is possible to reduce the amount of processing going back in the pipeline and make it constant. The process control can be simplified.
 また、図4(a)および図4(b)のパイプライン処理の制御は、図14(a)および図14(b)で説明したCAVLCを用いて符号化した場合のパイプライン処理の制御と全く同様である。つまり、本実施の形態に係る動画像符号化装置100は、CABACを用いて符号化を行った場合も、CAVLCを用いて符号化を行った場合も、全く同様のパイプラインの制御方法で処理することが可能となる。 In addition, the pipeline processing control in FIGS. 4A and 4B is controlled by the pipeline processing in the case of encoding using the CAVLC described in FIGS. 14A and 14B. It is exactly the same. That is, the moving picture coding apparatus 100 according to the present embodiment performs processing using exactly the same pipeline control method whether coding is performed using CABAC or coding is performed using CAVLC. It becomes possible to do.
 さらに、本実施の形態に係る動画像符号化装置100により生成される符号列は中間符号列の発生符号量が特定の符号量以下になることが保証されている。そのため、図15を用いて説明した復号化におけるパイプラインにおいて、符号列解析処理が読み込む中間符号列の符号量が特定量以下となり、常に図15(a)のように符号列解析処理の処理時間を規定値内に納めることが可能となり、復号化処理の遅延の発生を回避することが可能となる。 Furthermore, the code sequence generated by the moving picture encoding apparatus 100 according to the present embodiment is guaranteed that the generated code amount of the intermediate code sequence is equal to or less than the specific code amount. For this reason, in the decoding pipeline described with reference to FIG. 15, the code amount of the intermediate code string read by the code string analysis process is less than or equal to the specific amount, and the processing time of the code string analysis process is always as shown in FIG. Can be kept within the prescribed value, and the occurrence of a delay in the decoding process can be avoided.
 このように、本実施の形態に係る動画像符号化装置100は、パイプライン構造を用いて算術符号化による符号化方法を実現した場合でも、中間符号列を生成する時点で予め定義された特定の符号量以下になるように制御することができる。そのため、発生符号量を制限値以下に納めるためにパイプラインを遡る処理を単純化することが可能となる。さらに、生成される符号列を復号化する復号化装置において、符号列解析処理が算術復号化後の中間符号列を読み込むために要する時間を常に一定時間以下とすることができるため、動画像復号化装置におけるパイプラインの処理遅延の発生を回避することが可能となる。 As described above, the moving picture coding apparatus 100 according to the present embodiment is not limited to the identification that is defined in advance at the time of generating the intermediate code string even when the coding method using arithmetic coding is realized using the pipeline structure. It is possible to control so as to be less than or equal to the code amount. Therefore, it is possible to simplify the process of tracing back the pipeline in order to keep the generated code amount below the limit value. Furthermore, in the decoding device that decodes the generated code string, the time required for the code string analysis process to read the intermediate code string after arithmetic decoding can always be less than or equal to a certain time. It is possible to avoid the occurrence of a pipeline processing delay in the processing apparatus.
 また、従来の動画像符号化装置においては、複雑なパイプラインを遡る処理を実現しようとすると、符号化処理全体において能力の高い素子を用いる必要があった。しかし、本発明では、中間符号列の符号量を一定値以下に制限することによりパイプラインを遡る処理が単純化されるため、動画像符号化装置において従来よりも能力の低い素子でも処理を実現することが可能となる。
また、従来の動画像復号化装置においては、符号列解析処理等の処理遅延の発生を少なくしようとすると、符号列解析処理等を行う部分に能力の高い素子を用いる必要があった。しかし、本発明では、中間符号列の符号量を一定値以下に制限することによりそもそも動画像復号化装置において遅延が生じにくい。そのため、動画像復号化装置において特別に能力の高い素子等を用いる必要がなく、動画像復号化装置を簡易に構成できる。
In addition, in the conventional moving image encoding apparatus, it is necessary to use a high-performance element in the entire encoding process in order to realize a process that goes back through a complicated pipeline. However, the present invention simplifies the process of going back through the pipeline by limiting the code amount of the intermediate code string to a certain value or less, so the processing is realized even with an element having a lower capacity than the conventional one in the moving picture coding apparatus. It becomes possible to do.
Further, in the conventional moving picture decoding apparatus, in order to reduce the occurrence of processing delay such as code string analysis processing, it is necessary to use a high-capacity element for a portion that performs code string analysis processing or the like. However, in the present invention, by limiting the code amount of the intermediate code string to a certain value or less, a delay hardly occurs in the video decoding device in the first place. Therefore, it is not necessary to use an element having a particularly high capability in the moving picture decoding apparatus, and the moving picture decoding apparatus can be simply configured.
5.まとめ
 本実施形態における動画像符号化装置100は、入力される符号化対象画像をブロック単位で符号化する。動画像符号化装置100は、符号化対象画像に対応する予測画像を生成する予測符号化部105と、符号化対象画像と生成された予測画像との差分画像を生成する差分演算部111と、差分演算部111の出力に対して直交変換処理および量子化処理を行い、残差係数を生成する予測残差符号化部102と、残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成する予測残差復号化部103と、予測符号化部105で生成された予測画像と予測残差復号化部103で生成された残差復号化画像とを加算することで再構成画像を生成する加算演算部112と、第1モードにおいて、予測残差符号化部102で生成された残差係数を可変長符号化して係数符号列を生成し、予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、係数符号列および、ヘッダ符号列から構成される中間符号列159を出力する一方、第2モードにおいて、残差係数の代わりに符号化対象画像の信号処理過程において得られる中間画像信号を可変長符号化せずにそのまま係数符号列とし、当該係数符号列および当該係数符号列が中間画像信号であることを示す識別子を少なくとも含むヘッダ符号列から構成される中間符号列を出力する2値化符号化部107と、第1モードにおいて出力された中間符号列に対して算術符号化し、出力符号列を生成する一方、第2モードにおいて出力された中間符号列のうちヘッダ符号列に対してのみ算術符号化し、算術符号化後のヘッダ符号列と係数符号列から構成される出力符号列を生成する算術符号化部110と、を備える。2値化符号化部107は、算術符号化部110に中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する。
5. Summary The moving image encoding apparatus 100 according to the present embodiment encodes an input encoding target image in units of blocks. The moving image encoding device 100 includes a prediction encoding unit 105 that generates a prediction image corresponding to an encoding target image, a difference calculation unit 111 that generates a difference image between the encoding target image and the generated prediction image, A prediction residual encoding unit 102 that performs orthogonal transformation processing and quantization processing on the output of the difference calculation unit 111 to generate a residual coefficient, and performs inverse quantization processing and inverse orthogonal transformation processing on the residual coefficient. A prediction residual decoding unit 103 that generates a residual decoded image, and adds the prediction image generated by the prediction encoding unit 105 and the residual decoded image generated by the prediction residual decoding unit 103 In addition, in the first mode, the addition operation unit 112 that generates a reconstructed image and the residual coefficient generated by the prediction residual encoding unit 102 are variable-length encoded to generate a coefficient code string, and the prediction image is Prediction information used when generating A header code string including at least a header code string is generated and an intermediate code string 159 composed of a coefficient code string and a header code string is output. In the second mode, in the signal processing process of an encoding target image instead of a residual coefficient The obtained intermediate image signal is directly converted into a coefficient code string without variable length coding, and an intermediate code composed of the coefficient code string and a header code string including at least an identifier indicating that the coefficient code string is an intermediate image signal A binary encoding unit 107 that outputs a sequence, and arithmetically encodes the intermediate code sequence output in the first mode to generate an output code sequence, while the intermediate code sequence output in the second mode Arithmetic coding unit 110 that performs arithmetic coding only on the header code string and generates an output code string composed of the header code string and coefficient code string after arithmetic coding , Comprising a. When the binary coding unit 107 outputs the intermediate code string to the arithmetic coding unit 110, the binary coding unit 107 limits the code amount of the intermediate code string to a predetermined specific code amount or less.
 また好ましくは、予め定義された特定の符号量は、中間画像信号の画素値をそのまま符号列として記述する際に必要となる符号量と、ヘッダ符号列に記述される可能性のある全ての情報を符号化する際に必要となる最大の符号量と、余裕量とを合わせた符号量である。 Preferably, the specific code amount defined in advance includes a code amount necessary for describing the pixel value of the intermediate image signal as it is as a code string, and all information that may be described in the header code string. Is a code amount that is a combination of the maximum code amount required for encoding and a margin amount.
 また好ましくは、2値化符号化部107は、出力する中間符号列159の符号量が、予め定義された特定の符号量を超過する可能性がある場合、第2モードを用いて中間符号列を出力する。 Preferably, the binarization encoding unit 107 uses the second mode when the code amount of the output intermediate code sequence 159 may exceed a predetermined specific code amount. Is output.
 また好ましくは、2値化符号化部107は、第1モードで中間符号列159を出力した結果、当該中間符号列159の符号量が予め定義された特定の符号量を超過した場合、当該第1モードで生成した中間符号列159に代えて、第2モードを用いて生成した中間符号列159を出力する。 Preferably, the binarization encoding unit 107 outputs the intermediate code string 159 in the first mode, and as a result, when the code amount of the intermediate code string 159 exceeds a predetermined code amount, Instead of the intermediate code sequence 159 generated in the first mode, the intermediate code sequence 159 generated using the second mode is output.
6.他の例
 なお、本実施形態では、図2のフローチャートにおいて、ResidualモードとPCMモードとを切り替えることで符号化対象CUの2値化後の中間符号量を規定値以下にする。しかし、PCMモードを使用せずに、符号化対象CUの2値化後の中間符号量を規定値以下に制限することも可能である。以下、この例について説明する。なお、動画像符号化装置としての構成は、図1に示す構成とほぼ同様であるが、ピクチャメモリ101から係数符号列生成部109に入力される入力画像信号が不要となる点において異なる。シンタックスは、図3(a)に示すものとなる。以下、本例において、2値化符号化部107および算術符号化部110で符号列信号160を生成する方法について、図5のフローチャートを参照して説明する。
6). Other Examples In the present embodiment, the intermediate code amount after binarization of the encoding target CU is set to a predetermined value or less by switching between the Residual mode and the PCM mode in the flowchart of FIG. However, the intermediate code amount after binarization of the encoding target CU can be limited to a specified value or less without using the PCM mode. This example will be described below. The configuration of the moving image encoding apparatus is substantially the same as the configuration shown in FIG. 1 except that an input image signal input from the picture memory 101 to the coefficient code string generation unit 109 is not necessary. The syntax is as shown in FIG. Hereinafter, in this example, a method of generating the code string signal 160 by the binary encoding unit 107 and the arithmetic encoding unit 110 will be described with reference to the flowchart of FIG.
 まず、2値化符号化部107は、入力された残差符号化信号153を用いて、符号化対象CUの2値化後の中間符号量が規定値を超過する可能性があるかどうかを判定する(S1501)。 First, the binary encoding unit 107 uses the input residual encoded signal 153 to determine whether or not the intermediate code amount after binarization of the encoding target CU may exceed a specified value. Determination is made (S1501).
 ステップS1501において、超過する可能性がないと判断された場合は、前述の通常の符号化処理を行った結果生成された予測情報信号157、量子化値信号158、その他の符号化制御情報を入力として可変長符号化を行うことによってヘッダ中間符号列を生成する(S1502)。さらに、従来の符号化と同様に入力された残差符号化信号153を可変長符号化する(Residualモード)ことで係数中間符号列を生成する(S1503)。 If it is determined in step S1501 that there is no possibility of exceeding, the prediction information signal 157, the quantized value signal 158, and other encoding control information generated as a result of performing the normal encoding process described above are input. To generate a header intermediate code string by performing variable length coding (S1502). Furthermore, a coefficient intermediate code string is generated by variable-length encoding the input residual encoded signal 153 (Residual mode) in the same manner as in the conventional encoding (S1503).
 一方、ステップS1501において、超過する可能性があると判断された場合は、予測残差符号化部102における予測残差符号化処理を再度実施する(S1505)。このとき少なくとも量子化処理において用いる量子化値を設定された値よりも大きな値(大きな量子化幅)に更新して適用することにより、再生成される残差符号化信号153がより少ない情報量となるように制御する。更新された残差符号化信号153を用いて再度ステップS1501の処理を行い、超過する可能性がないと判断されるまでステップS1505の処理を繰り返す。 On the other hand, if it is determined in step S1501 that there is a possibility of exceeding, the prediction residual encoding process in the prediction residual encoding unit 102 is performed again (S1505). At this time, at least the quantization value used in the quantization process is updated to a value larger than the set value (large quantization width) and applied, so that the residual encoded signal 153 to be regenerated is less information amount Control to be The process of step S1501 is performed again using the updated residual encoded signal 153, and the process of step S1505 is repeated until it is determined that there is no possibility of exceeding.
 つづいて、算術符号化部110は、入力された前記ヘッダ中間符号列および前記係数中間符号列に対して算術符号化を行うことによって最終的な符号列を生成する(S1504)。 Subsequently, the arithmetic encoding unit 110 generates a final code sequence by performing arithmetic encoding on the input header intermediate code sequence and the coefficient intermediate code sequence (S1504).
 なお、ここではステップS1501において、入力された残差符号化信号153を用いて符号化対象CUの中間符号量が規定値を超過する可能性があるかどうかを判定しているが、それ以外の方法を用いて中間符号量が規定値を超過する可能性があるかどうかを判定してもよい。例えば、生成した中間符号列信号159に基づいて符号量が既定値を超過しているか判定する方法がある。この場合、ステップS1502およびステップS1503の処理が完了した時点で判定を行うことになり、既に中間符号列が生成されてしまっている。そのため、もし超過していると判定された場合は、生成済みの当該中間符号列に代えて、ステップS1505の処理を行うことで再生成された中間符号列に置き換える。 Here, in step S1501, it is determined whether or not the intermediate code amount of the CU to be encoded may exceed the specified value using the input residual encoded signal 153. A method may be used to determine whether there is a possibility that the intermediate code amount exceeds a specified value. For example, there is a method of determining whether the code amount exceeds a predetermined value based on the generated intermediate code string signal 159. In this case, the determination is made when the processing of step S1502 and step S1503 is completed, and the intermediate code string has already been generated. For this reason, if it is determined that the number has been exceeded, it is replaced with the regenerated intermediate code string by performing the processing in step S1505 instead of the generated intermediate code string.
 本他の例に係る動画像符号化装置100は、入力される符号化対象画像をブロック単位で符号化する。動画像符号化装置100は、符号化対象画像に対応する予測画像を生成する予測符号化部105と、符号化対象画像と生成された予測画像との差分画像を生成する差分演算部111と、差分演算部111の出力に対して直交変換処理および量子化処理を行い、残差係数を生成する予測残差符号化部102と、残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成する予測残差復号化部103と、予測符号化部105で生成された予測画像と予測残差復号化部103で生成された残差復号化画像とを加算することで再構成画像を生成する加算演算部112と、予測残差符号化部102で生成された残差係数を可変長符号化して係数符号列を生成し、予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、係数符号列および、ヘッダ符号列から構成される中間符号列を出力する2値化符号化部107と、2値化符号化部107によって出力された中間符号列に対して算術符号化し、出力符号列を生成する算術符号化部110と、を備える。2値化符号化部107は、算術符号化部110に中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する。 The moving image encoding apparatus 100 according to this other example encodes an input encoding target image in units of blocks. The moving image encoding device 100 includes a prediction encoding unit 105 that generates a prediction image corresponding to an encoding target image, a difference calculation unit 111 that generates a difference image between the encoding target image and the generated prediction image, An orthogonal transform process and a quantization process are performed on the output of the difference calculation unit 111 to generate a residual coefficient, and a dequantization process and an inverse orthogonal transform process are performed on the residual coefficient. A prediction residual decoding unit 103 that generates a residual decoded image, and adds the prediction image generated by the prediction encoding unit 105 and the residual decoded image generated by the prediction residual decoding unit 103 Then, the addition calculation unit 112 that generates a reconstructed image and the residual coefficient generated by the prediction residual encoding unit 102 are variable-length encoded to generate a coefficient code string, which is used when generating a predicted image Including at least A binarization encoding unit 107 that generates a code sequence and outputs an intermediate code sequence composed of a coefficient code sequence and a header code sequence, and an intermediate code sequence output by the binarization encoding unit 107 An arithmetic encoding unit 110 that performs arithmetic encoding and generates an output code string. When the binary coding unit 107 outputs the intermediate code string to the arithmetic coding unit 110, the binary coding unit 107 limits the code amount of the intermediate code string to a predetermined specific code amount or less.
 本例によれば、PCMモードを使用せずに、符号化対象CUの2値化後の中間符号量を規定値以下に制限することが可能となる。特に、PCMモードを使用しないので、PCMモードに関わる処理回路を搭載する必要がなくなり、回路構成の単純化することができる。 According to this example, the intermediate code amount after binarization of the encoding target CU can be limited to a predetermined value or less without using the PCM mode. In particular, since the PCM mode is not used, it is not necessary to mount a processing circuit related to the PCM mode, and the circuit configuration can be simplified.
(実施形態2)
 次に、実施形態2に係る動画像符号化装置にについて、図面を参照しながら説明する。
(Embodiment 2)
Next, a moving picture coding apparatus according to Embodiment 2 will be described with reference to the drawings.
1.動画像符号化装置の構成
 図6は、実施形態2に係る動画像符号化装置100-1のブロック図である。動画像符号化装置100-1は、ピクチャ単位で入力された動画像をブロックに分割し、ブロック単位で符号化処理を行い符号列を生成する。
1. Configuration of Moving Image Encoding Device FIG. 6 is a block diagram of a moving image encoding device 100-1 according to the second embodiment. The moving image encoding apparatus 100-1 divides a moving image input in units of pictures into blocks, performs encoding processing in units of blocks, and generates a code string.
 この動画像符号化装置100-1は、実施の形態1の動画像符号化装置100の2値化符号化部107、ヘッダ符号列生成部108、係数符号列生成部109、算術符号化部110の代わりに、2値化符号化部107-1、ヘッダ符号列生成部108-1、係数符号列生成部109-1、算術符号化部110-1を備えている。 This moving image coding apparatus 100-1 includes a binary coding unit 107, a header code string generation unit 108, a coefficient code string generation unit 109, and an arithmetic coding unit 110 of the moving image coding apparatus 100 according to the first embodiment. Instead of this, a binary coding section 107-1, a header code string generation section 108-1, a coefficient code string generation section 109-1, and an arithmetic coding section 110-1 are provided.
 以下、説明の便宜上、本実施形態1と同様の構成についてはその詳細な説明を省略する。さらに、図6では、図1と同様の機能を有するブロックについては同じ番号を付す。 Hereinafter, for convenience of explanation, detailed description of the same configuration as that of the first embodiment will be omitted. Further, in FIG. 6, the same numbers are assigned to blocks having the same functions as those in FIG.
 2値化符号化部107-1は、ヘッダ符号列生成部108-1と係数符号列生成部109-1とを含み、各々の処理を適用して生成された2値化情報を中間符号列159-1として算術符号化部110-1に出力する。 The binarization encoding unit 107-1 includes a header code sequence generation unit 108-1 and a coefficient code sequence generation unit 109-1, and converts the binarization information generated by applying each processing into an intermediate code sequence 159-1 is output to arithmetic coding section 110-1.
 ヘッダ符号列生成部108-1は、予測符号化部105が出力する予測情報信号157と、量子化値決定部106が出力する量子化値信号158と、その他の符号化制御に関する制御情報を可変長符号化することでヘッダ中間符号列を生成する。なお、予測情報には、例えば画面内予測モードを示す情報、画面間予測モードを示す情報、動きベクトルを示す情報、参照ピクチャを示す情報等が含まれる。また、制御情報は係数符号列生成部109-1における処理前までに取得可能な情報であって、CUの符号化時に適用した符号化条件を示す情報であり、例えばブロック符号化タイプを示す情報、ブロック分割情報等が含まれる。 The header code string generation unit 108-1 changes the prediction information signal 157 output from the prediction encoding unit 105, the quantization value signal 158 output from the quantization value determination unit 106, and other control information related to encoding control. A header intermediate code string is generated by performing long encoding. Note that the prediction information includes, for example, information indicating an intra-screen prediction mode, information indicating an inter-screen prediction mode, information indicating a motion vector, information indicating a reference picture, and the like. Further, the control information is information that can be acquired before processing in the coefficient code string generation unit 109-1, and is information that indicates the encoding conditions applied at the time of CU encoding. For example, information indicating the block encoding type , Block division information and the like are included.
 係数符号列生成部109-1は、予測残差符号化部102が出力する残差符号化信号153を可変長符号化して係数中間符号列を生成する。そして、係数符号列生成部109-1は、生成した係数中間符号列をヘッダ符号列生成部108-1が生成したヘッダ中間符号列に続けて追記することで中間符号列信号159-1を生成する(以下、第1モードと称す)。 The coefficient code sequence generation unit 109-1 performs variable length encoding on the residual encoded signal 153 output from the prediction residual encoding unit 102 to generate a coefficient intermediate code sequence. Then, the coefficient code string generation unit 109-1 generates the intermediate code string signal 159-1 by adding the generated coefficient intermediate code string after the header intermediate code string generated by the header code string generation unit 108-1. (Hereinafter referred to as the first mode).
 一方、係数符号列生成部109は、加算演算部112から出力される再構成画像信号155を可変長符号化せずに得られる係数中間符号列を、ヘッダ符号列生成部108が生成したヘッダ中間符号列に続けて追記し、中間符号列信号159-1を生成する(以下、第2モードと称す)。 On the other hand, the coefficient code string generation unit 109 generates the intermediate code string generated by the header code string generation unit 108 from the coefficient intermediate code string obtained without performing variable length coding on the reconstructed image signal 155 output from the addition calculation unit 112. The code string is added after the code string to generate an intermediate code string signal 159-1 (hereinafter referred to as a second mode).
 算術符号化部110-1は、2値化符号化部107-1から出力される中間符号列159-1に対して算術符号化を行い、当該動画像符号化装置100-1の出力となる符号列信号160-1を生成する。 The arithmetic coding unit 110-1 performs arithmetic coding on the intermediate code string 159-1 output from the binary coding unit 107-1, and becomes an output of the moving picture coding apparatus 100-1. A code string signal 160-1 is generated.
2.符号列の生成方法
 2値化符号化部107-1および算術符号化部110-1において符号列信号160-1を生成する方法について、図7のフローチャートを用いて具体的に説明する。
2. Code String Generation Method A method for generating the code string signal 160-1 in the binary coding section 107-1 and the arithmetic coding section 110-1 will be specifically described with reference to the flowchart of FIG.
 まず、2値化符号化部107-1は、前述の符号化処理を行った結果生成された予測情報信号157、量子化値信号158、その他の符号化制御情報を入力として可変長符号化を行うことによってヘッダ中間符号列を生成する(S1001)。 First, the binary encoding unit 107-1 receives the prediction information signal 157, the quantized value signal 158, and other encoding control information generated as a result of the above encoding process, and performs variable length encoding. By doing so, a header intermediate code string is generated (S1001).
 次に、入力された残差符号化信号153を用いて、符号化対象CUの中間符号量が規定値を超過する可能性があるかどうかを判定する(S1002)。 Next, it is determined by using the input residual encoded signal 153 whether there is a possibility that the intermediate code amount of the encoding target CU exceeds the specified value (S1002).
 ステップS1002において、超過する可能性がないと判断された場合は、従来の符号化と同様に入力された残差符号化信号153を可変長符号化する(Residualモード)ことで係数中間符号列を生成する(S1003)。 If it is determined in step S1002 that there is no possibility of exceeding, the coefficient intermediate code string is obtained by variable-length encoding the residual encoded signal 153 (Residual mode) as in the conventional encoding. Generate (S1003).
 一方、ステップS1002において、超過する可能性があると判断された場合は、入力された再構成画像信号155を可変長符号化せずにそのまま符号列に記述する(PCMモード)ことで係数中間符号列を生成する(S1005)。 On the other hand, if it is determined in step S1002 that there is a possibility of exceeding, the intermediate code is obtained by describing the input reconstructed image signal 155 as it is in the code string without performing variable length coding (PCM mode). A column is generated (S1005).
 つづいて、算術符号化部110-1は、入力された中間符号列がResidualモードによって生成されている場合は、前記ヘッダ中間符号列および前記係数中間符号列に対して算術符号化を行うことによって最終的な符号列を生成する(S1004)。また、入力された中間符号列がPCMモードによって生成されている場合は、前記ヘッダ中間符号列のみに対して算術符号化を行い、前記係数中間符号列に対しては算術符号化を行うことなくそのまま符号列に追記することで最終的な符号列を生成する(S1006)。 Subsequently, when the input intermediate code sequence is generated in the Residual mode, the arithmetic encoding unit 110-1 performs arithmetic encoding on the header intermediate code sequence and the coefficient intermediate code sequence. A final code string is generated (S1004). Further, when the input intermediate code string is generated by the PCM mode, arithmetic coding is performed only on the header intermediate code string, and arithmetic coding is not performed on the coefficient intermediate code string. The final code string is generated by adding the code string as it is (S1006).
 なお、ここではステップS1002において、入力された残差符号化信号153を用いて符号化対象CUの中間符号量が規定値を超過する可能性があるかどうかを判定しているが、それ以外の方法を用いて中間符号量が規定値を超過する可能性があるかどうかを判定してもよい。例えば、生成した中間符号列信号159-1に基づいて符号量が既定値を超過しているか判定する方法がある。この場合、ステップS1003の処理が完了した時点で判定を行うことになり、既にResidualモードで係数中間符号列が生成されてしまっている。そのため、もし超過していると判定された場合は、生成済みの当該係数中間符号列に代えて、ステップS1005の処理を行ってPCMモードで再生成された係数中間符号列に置き換えることで処理がなされる。 Here, in step S1002, it is determined whether there is a possibility that the intermediate code amount of the encoding target CU exceeds the specified value using the input residual encoded signal 153. A method may be used to determine whether there is a possibility that the intermediate code amount exceeds a specified value. For example, there is a method of determining whether the code amount exceeds a predetermined value based on the generated intermediate code string signal 159-1. In this case, the determination is made when the process of step S1003 is completed, and the coefficient intermediate code string has already been generated in the Residual mode. Therefore, if it is determined that the number has been exceeded, the processing is performed by replacing the generated coefficient intermediate code sequence with the coefficient intermediate code sequence regenerated in the PCM mode by performing the process of step S1005. Made.
 なお、係数符号列生成部109には再構成画像信号155を入力し、ステップS1005において再構成画像信号155を入力としてPCMモードで係数中間符号列を生成しているが、再構成画像信号155の代わりに、入力画像信号を入力としてPCMモードで係数中間符号列を生成してもよい。もしくは、差分画像信号152や残差復号化信号154を入力としてPCMモードで係数中間符号列を生成してもよい。 Note that the reconstructed image signal 155 is input to the coefficient code sequence generation unit 109, and the reconstructed image signal 155 is input in step S1005 to generate a coefficient intermediate code sequence in the PCM mode. Alternatively, the coefficient intermediate code string may be generated in the PCM mode using the input image signal as an input. Alternatively, the coefficient intermediate code sequence may be generated in the PCM mode with the difference image signal 152 or the residual decoded signal 154 as an input.
 なお、ここではステップS1002においてCU単位で判定を行っているが、複数のCU単位、CUよりも小さなブロック単位、もしくはその他のブロック単位で判定を行ってもよい。 Note that although the determination is performed in units of CUs in step S1002 here, the determination may be performed in units of a plurality of CUs, blocks smaller than the CU, or other block units.
3.シンタックス
 図8は本実施の形態によって生成される中間符号列および符号列のCU単位のシンタックス:coding_unit()の一例を示した図である。
3. Syntax FIG. 8 is a diagram illustrating an example of the syntax: coding_unit () of the intermediate code string and the code string of the CU unit generated according to the present embodiment.
 図8(a)は図7で説明したResidualモードで中間符号列を生成した場合のシンタックスである。シンタックスの先頭には、ヘッダ符号列生成部108-1によって生成された、予測モード:pred_mode、予測情報:prediction_unit()、量子化値:qp_value等の情報を可変長符号化した符号列が記述されている。つづいて、係数情報をResidualモードで符号化したかPCMモードで符号化したかを示すpcm_flagが記述され、さらに、residual_data()として残差符号化信号153を可変長符号化した符号列が記述されている。 FIG. 8A shows the syntax when the intermediate code string is generated in the Residual mode described in FIG. At the top of the syntax, a code string generated by the header code string generation unit 108-1 is encoded with variable length coding of information such as prediction mode: pred_mode, prediction information: prediction_unit (), and quantization value: qp_value. Has been. Subsequently, pcm_flag indicating whether the coefficient information is encoded in the Residual mode or the PCM mode is described, and further, a code string obtained by variable-length encoding the residual encoded signal 153 is described as residual_data (). ing.
 図8(b)は図7で説明したPCMモードで中間符号列を生成した場合のシンタックスである。図8(a)と同様に、シンタックスの先頭には、ヘッダ符号列生成部108-1によって生成された、予測モード:pred_mode、予測情報:prediction_unit()、量子化値:qp_value等の情報を可変長符号化した符号列が記述されている。つづいて、Residualモードで符号化したかPCMモードで符号化したかを示すpcm_flagが記述され、さらに、pcm_data()として、再構成画像信号155を可変長符号化していない、画素のビット列そのままである符号列が記述されている。 FIG. 8B shows the syntax when the intermediate code string is generated in the PCM mode described in FIG. Similarly to FIG. 8A, information such as prediction mode: pred_mode, prediction information: prediction_unit (), quantization value: qp_value, etc., generated by the header code string generation unit 108-1, is used at the beginning of the syntax. A variable-length encoded code string is described. Subsequently, pcm_flag indicating whether the encoding is performed in the Residual mode or the PCM mode is described, and further, as the pcm_data (), the reconstructed image signal 155 is not subjected to variable length encoding, and is a pixel bit string as it is. A code string is described.
 なお、発生する中間符号列の符号量は、Residualモードについては全ての情報が可変長符号化される。そのため、可変長符号化の条件によって符号長が変わるため一意に特定できない。しかし、PCMモードにおいては、pcm_data()は可変長符号化されないためCUのサイズによって一意に特定できる。例えば、画像のフォーマットが各画素8ビットのYUV4:2:0であり、符号化対象CUのサイズが32×32画素であった場合、入力画像信号もしくは再構成画像信号の画素値をそのまま符号列として記述する際に必要となる符号量は1536バイトとなる。pcm_data()以外は可変長符号化されるため符号長を一意に特定することはできない。しかし、可変長符号化を用いて符号化する情報の個数は限られており、発生しうる最大の符号量はそれほど大きくはない。つまり、pcm_data()の符号量に、pcm_data()以外を可変長符号化したときに発生しうる最大の符号量および余裕量を加えても、CU全体で13000ビットを超過することはない。 Note that the code amount of the generated intermediate code string is variable-length encoded for all information in the Residual mode. For this reason, the code length varies depending on the variable length coding conditions, and therefore cannot be uniquely identified. However, in the PCM mode, pcm_data () is not variable-length coded and can be uniquely specified by the CU size. For example, when the image format is YUV 4: 2: 0 with 8 bits for each pixel and the size of the encoding target CU is 32 × 32 pixels, the pixel value of the input image signal or the reconstructed image signal is directly used as the code string. The code amount required when describing as 1536 bytes. Since the variable length coding is performed except for pcm_data (), the code length cannot be uniquely specified. However, the number of pieces of information to be encoded using variable length encoding is limited, and the maximum amount of code that can be generated is not so large. In other words, even if the maximum code amount and margin that can be generated when variable length coding is performed on anything other than pcm_data () is added to the code amount of pcm_data (), the entire CU does not exceed 13000 bits.
 つまり、図7のステップS1002で説明した規定値として、符号化対象CUの再構成画像信号155の画素値をそのまま符号列として記述する際に必要となる符号量と、ヘッダ情報を可変長符号化したときに発生しうる最大の符号量と、余裕量とを加算した値(前述の例では13000ビット)とすることで、生成される中間符号量が常に前記規定値を超過しないことが保証される。 That is, as the specified value described in step S1002 of FIG. 7, the code amount necessary for describing the pixel value of the reconstructed image signal 155 of the encoding target CU as a code string as it is and the header information are variable-length encoded. By adding the maximum code amount that can be generated and the margin amount (13000 bits in the above example), it is guaranteed that the generated intermediate code amount does not always exceed the specified value. The
 なお、上記シンタックスの説明では、pcm_data()には、再構成画像信号155を記述するとしたが、入力画像信号、差分画像信号152、残差復号化信号154が係数符号列生成部109-1に入力される場合は、入力される信号に応じて、入力画像信号、差分画像信号152、残差復号化信号154を記述する。 In the above description of the syntax, the reconstructed image signal 155 is described in pcm_data (), but the input image signal, the difference image signal 152, and the residual decoded signal 154 are included in the coefficient code string generation unit 109-1. Are input image signal, difference image signal 152, and residual decoded signal 154 according to the input signal.
 なお、図8で説明したシンタックス、および前記規定値の説明に使用した数値は、本実施の形態を説明するための一例であり、ここに記載されているものと異なるシンタックス、および数値を用いて同様の機能を実現してもよい。 Note that the syntax described in FIG. 8 and the numerical values used in the description of the specified values are examples for explaining the present embodiment, and the syntax and numerical values different from those described here are used. May be used to implement similar functions.
4.パイプライン改善効果
 図9を用いて本実施の形態に係る動画像符号化装置100-1のパイプラインの例を示す。
4). Pipeline Improvement Effect An example of a pipeline of the moving picture coding apparatus 100-1 according to the present embodiment will be shown using FIG.
 図9(a)は図7のステップS1002の判定の結果、Residualモードで中間符号列を生成した場合のパイプラインの制御を示す図である。図13(a)で説明した従来の制御と全く同様の流れで処理が行われている。 FIG. 9A is a diagram illustrating pipeline control when an intermediate code string is generated in the Residual mode as a result of the determination in step S1002 of FIG. Processing is performed in exactly the same flow as in the conventional control described with reference to FIG.
 一方、図9(b)は図7のステップS1002の判定の結果、PCMモードで再構成画像信号155を用いて中間符号列を生成した場合のパイプラインの制御を示す図である。図13(b)で説明した従来の制御と異なり、算術符号化処理の前の2値化符号化処理の時点でPCMモードとすべきことを確定できる。従来においては、算術符号化処理の時点でPCMモードとすべきことが確定されるため、それ以前のパイプラインにおいて膨大な遡り処理が発生していた。しかし、本実施形態では、2値化符号化処理の時点でPCMモードとすべきことが確定できる。ここで、再構成画像信号155は、残差符号化信号153とは同一の入力画像信号151に基づくものである。また、復号化装置において残差符号化信号153を当該信号とセットの予測情報を用いて復号化すると、再構成画像信号155と同一の信号が得られる。つまり、復号化装置において最終的に生成される再構成画像信号の画素情報は、同一となる。そのため、ブロック1がPCMモードに切り替わっても、ヘッダ符号列に記述されている予測情報の変更や、再度の符号化は不要である。そのため、それらを参照しながら符号化処理が進行しているブロック2の処理には全く影響を与えない。よって、パイプラインを遡ることなくそのままPCMモードで中間符号列を生成することが可能となる。 On the other hand, FIG. 9B is a diagram illustrating pipeline control when the intermediate code string is generated using the reconstructed image signal 155 in the PCM mode as a result of the determination in step S1002 of FIG. Unlike the conventional control described with reference to FIG. 13B, it can be determined that the PCM mode should be set at the time of the binary encoding process before the arithmetic encoding process. Conventionally, since it is determined that the PCM mode should be set at the time of arithmetic coding processing, a huge amount of retroactive processing has occurred in the previous pipeline. However, in the present embodiment, it can be determined that the PCM mode should be set at the time of the binary encoding process. Here, the reconstructed image signal 155 is based on the same input image signal 151 as the residual encoded signal 153. Further, when the decoding apparatus decodes the residual encoded signal 153 using the prediction information of the signal and the set, the same signal as the reconstructed image signal 155 is obtained. That is, the pixel information of the reconstructed image signal finally generated in the decoding device is the same. For this reason, even if the block 1 is switched to the PCM mode, it is not necessary to change the prediction information described in the header code string or re-encode. For this reason, there is no influence on the processing of block 2 in which the encoding processing is proceeding while referring to them. Therefore, it is possible to generate the intermediate code string in the PCM mode without going back through the pipeline.
 なお、図7のステップS1005において、再構成画像信号155の代わりにピクチャメモリ101からの入力画像信号を用いて処理した場合、以下の通りとなる。つまり、ピクチャメモリ101からの入力画像信号と残差符号化信号153は同一の入力画像信号151に基づくものである。そのため、ブロック1がPCMモードに切り替わった場合でも、ヘッダ符号列に記述されている予測情報の変更は不要である。しかし、復号化装置において残差符号化信号153を当該信号とセットの予測情報を用いて復号化した場合、入力画像信号とは異なる信号が生成される。そのため、第1モードで符号化したときと、第2モードで符号化したときとで、復号化装置において最終的に得られる再構成画像信号の画素情報が異なるものとなる。そのため、ブロック1の画素情報を参照しながら既に進行しているブロック2の符号化処理について、画素情報を置き換えて処理をやり直さなくてはならない。その結果、ブロック1の画面間/内予測の処理まで遡る必要がある。しかし、実施の形態1において図4(b)を用いて説明したパイプラインよりも遡る処理の量が少なくなり、さらに処理速度の遅延を抑制することが可能となる。 In addition, when processing is performed using the input image signal from the picture memory 101 instead of the reconstructed image signal 155 in step S1005 of FIG. That is, the input image signal from the picture memory 101 and the residual encoded signal 153 are based on the same input image signal 151. Therefore, even when the block 1 is switched to the PCM mode, it is not necessary to change the prediction information described in the header code string. However, when the decoding apparatus decodes the residual encoded signal 153 using the signal and a set of prediction information, a signal different from the input image signal is generated. Therefore, the pixel information of the reconstructed image signal finally obtained in the decoding apparatus differs between when encoded in the first mode and when encoded in the second mode. For this reason, the encoding process of block 2 that has already progressed while referring to the pixel information of block 1 must be performed again by replacing the pixel information. As a result, it is necessary to go back to the inter-screen / intra prediction processing of block 1. However, the amount of processing going back from the pipeline described with reference to FIG. 4B in the first embodiment is reduced, and further, it is possible to suppress a delay in processing speed.
 さらに、本実施の形態に係る動画像符号化装置100により生成される符号列は中間符号列の発生符号量が特定の符号量以下になることが保証されている。そのため、図15を用いて説明した復号化におけるパイプラインにおいて、符号列解析処理で読み込む中間符号列の符号量が特定量以下となる。したがって、常に図15(a)のように符号列解析処理の処理時間を規定値内に納めることが可能となり、復号化処理の遅延の発生を回避することが可能となる。 Furthermore, the code sequence generated by the moving picture encoding apparatus 100 according to the present embodiment is guaranteed that the generated code amount of the intermediate code sequence is equal to or less than the specific code amount. For this reason, in the decoding pipeline described with reference to FIG. 15, the code amount of the intermediate code string read in the code string analysis process is equal to or less than the specific amount. Therefore, it is possible to always keep the processing time of the code string analysis processing within the specified value as shown in FIG. 15A, and it is possible to avoid the occurrence of delay in the decoding processing.
 このように、本実施の形態に係る動画像符号化装置100-1は、パイプライン構造を用いて算術符号化による符号化方法を実現した場合でも、パイプラインを遡ることなくPCMモードに切替えて符号化を行うことができる。そのため、処理速度の遅延もしくは処理量を増加させることなく、発生符号量を制限値以下に納めることが可能となる。さらに、生成される符号列を復号化する復号化装置において、符号列解析処理で算術復号化後の中間符号列を読み込むために要する時間を常に一定時間以下とすることができる。そのため、パイプラインの処理遅延の発生を回避することが可能となる。 As described above, the moving picture coding apparatus 100-1 according to the present embodiment switches to the PCM mode without going back in the pipeline even when the coding method by arithmetic coding is realized using the pipeline structure. Encoding can be performed. Therefore, the generated code amount can be kept below the limit value without increasing the processing speed or increasing the processing amount. Furthermore, in a decoding apparatus that decodes a generated code string, the time required to read the intermediate code string after arithmetic decoding in the code string analysis process can always be set to a certain time or less. Therefore, it is possible to avoid the occurrence of pipeline processing delay.
5.まとめ
 本実施形態における動画像符号化装置100-1は、入力される符号化対象画像をブロック単位で符号化する。動画像符号化装置100-1は、符号化対象画像に対応する予測画像を生成する予測符号化部105と、符号化対象画像と生成された予測画像との差分画像を生成する差分演算部111と、差分演算部111の出力に対して直交変換処理および量子化処理を行い、残差係数を生成する予測残差符号化部102と、残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成する予測残差復号化部103と、予測符号化部105で生成された予測画像と予測残差復号化部103で生成された残差復号化画像とを加算することで再構成画像を生成する加算演算部112と、第1モードにおいて、予測残差符号化部102で生成された残差係数を可変長符号化して係数符号列を生成し、予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、係数符号列および、ヘッダ符号列から構成される中間符号列を出力する一方、第2モードにおいて、残差係数の代わりに符号化対象画像の信号処理過程において得られる中間画像信号を可変長符号化せずにそのまま係数符号列とし、予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、係数符号列およびヘッダ符号列から構成される中間符号列を出力する2値化符号化部107-1と、第1モードにおいて出力された中間符号列に対して算術符号化し、出力符号列を生成する一方、第2モードにおいて出力された中間符号列のうちヘッダ符号列に対してのみ算術符号化し、算術符号化後のヘッダ符号列と係数符号列から構成される出力符号列を生成する算術符号化部110-1と、を備え、2値化符号化部107-1は、算術符号化部110-1に中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する。
5. Summary The moving image encoding apparatus 100-1 in the present embodiment encodes an input encoding target image in units of blocks. The moving image encoding apparatus 100-1 includes a prediction encoding unit 105 that generates a prediction image corresponding to an encoding target image, and a difference calculation unit 111 that generates a difference image between the encoding target image and the generated prediction image. A prediction residual encoding unit 102 that performs orthogonal transformation processing and quantization processing on the output of the difference calculation unit 111 to generate a residual coefficient, and inverse quantization processing and inverse orthogonal transformation for the residual coefficient A prediction residual decoding unit 103 that performs processing and generates a residual decoded image; a prediction image generated by the prediction encoding unit 105; a residual decoded image generated by the prediction residual decoding unit 103; And an addition operation unit 112 that generates a reconstructed image by adding, and in the first mode, a coefficient code string is generated by variable-length encoding the residual coefficient generated by the prediction residual encoding unit 102, and prediction Prediction used when generating the image Generating a header code string including at least information, and outputting a coefficient code string and an intermediate code string composed of the header code string, while in the second mode, a signal processing process of an encoding target image instead of a residual coefficient The intermediate image signal obtained in the above is directly converted into a coefficient code string without variable length coding, and a header code string including at least prediction information used when generating a predicted image is generated, and is composed of the coefficient code string and the header code string A binary encoding unit 107-1 for outputting the intermediate code string to be output, and arithmetic coding the intermediate code string output in the first mode to generate an output code string, while outputting in the second mode Arithmetic coding that generates only the header code string of the intermediate code string and generates an output code string composed of the header code string and coefficient code string after the arithmetic coding 110-1 and the binary encoding unit 107-1, when outputting the intermediate code string to the arithmetic encoding unit 110-1, the code amount of the intermediate code string is defined as a predetermined specific code amount. Restrict to:
 また好ましくは、予め定義された特定の符号量は、中間画像信号の画素値をそのまま符号列として記述する際に必要となる符号量と、ヘッダ符号列に記述される可能性のある全ての情報を符号化する際に必要となる最大の符号量と、余裕量とを合わせた符号量である。 Preferably, the specific code amount defined in advance includes a code amount necessary for describing the pixel value of the intermediate image signal as it is as a code string, and all information that may be described in the header code string. Is a code amount that is a combination of the maximum code amount required for encoding and a margin amount.
 また好ましくは、2値化符号化部107-1は、出力する中間符号列159-1の符号量が、予め定義された特定の符号量を超過する可能性がある場合、第2モードを用いて中間符号列を出力する。 Further preferably, the binary coding unit 107-1 uses the second mode when the code amount of the intermediate code string 159-1 to be output may exceed a predetermined specific code amount. To output an intermediate code string.
 また好ましくは、2値化符号化部107-1は、第1モードで中間符号列159-1を出力した結果、当該中間符号列159-1の符号量が予め定義された特定の符号量を超過した場合、当該第1モードで生成した中間符号列159-1に代えて、第2モードを用いて生成した中間符号列159-1を出力する。 Further preferably, as a result of outputting the intermediate code string 159-1 in the first mode, the binarization encoding unit 107-1 obtains a predetermined code amount as a code amount of the intermediate code string 159-1. In the case of exceeding, the intermediate code string 159-1 generated using the second mode is output instead of the intermediate code string 159-1 generated in the first mode.
(実施形態3)
 実施形態3に係る動画像復号化装置について、図面を参照しながら説明する。
(Embodiment 3)
A moving picture decoding apparatus according to Embodiment 3 will be described with reference to the drawings.
1.動画像復号化装置の構成
 図10は、実施形態3に係る動画像復号化装置200の構成を示すブロック図である。動画像復号化装置200は、実施の形態1で説明した動画像符号化装置によって生成された符号列に対し、コーディングユニット(CU)と呼ばれるブロック単位で復号化処理し、出力画像を生成する。
1. Configuration of Video Decoding Device FIG. 10 is a block diagram illustrating a configuration of a video decoding device 200 according to the third embodiment. The moving picture decoding apparatus 200 decodes the code string generated by the moving picture encoding apparatus described in Embodiment 1 in units of blocks called coding units (CUs), and generates an output image.
 この動画像復号化装置200は、算術復号化部201と、2値化復号化部202と、予測残差復化部205と、ピクチャメモリ206と、予測復号化部207と、量子化値決定部208とを備えている。 The moving picture decoding apparatus 200 includes an arithmetic decoding unit 201, a binary decoding unit 202, a prediction residual decoding unit 205, a picture memory 206, a prediction decoding unit 207, and a quantization value determination. Part 208.
 算術復号化部201は、入力されたブロック単位の符号列信号251に対して算術復号化を行い、生成された中間符号列信号252を2値化復号化部202へ出力する。 The arithmetic decoding unit 201 performs arithmetic decoding on the input code string signal 251 in units of blocks, and outputs the generated intermediate code string signal 252 to the binarization decoding unit 202.
 2値化復号化部202は、ヘッダ符号列解析部203と係数符号列解析部204とを含み、入力された中間符号列252に対して各々の処理を適用することで符号列の解析を行う。 The binarization decoding unit 202 includes a header code string analysis unit 203 and a coefficient code string analysis unit 204, and analyzes each code string by applying each process to the input intermediate code string 252. .
 ヘッダ符号列解析部203は、入力された中間符号列信号252のヘッダ中間符号列に対して可変長復号化を施すことによりヘッダ情報の解析を行う。そして、ヘッダ符号列解析部203は、解析して得られる予測情報信号257を予測復号化部207へ出力する。さらに、ヘッダ符号列解析部203は、解析して得られる量子化値情報262を量子化値決定部208へ出力する。 The header code string analysis unit 203 analyzes header information by performing variable length decoding on the header intermediate code string of the input intermediate code string signal 252. Then, the header code string analysis unit 203 outputs the prediction information signal 257 obtained by the analysis to the prediction decoding unit 207. Further, the header code string analysis unit 203 outputs the quantization value information 262 obtained by the analysis to the quantization value determination unit 208.
 係数符号列解析部204は、ヘッダ符号列解析部203によって解析されたヘッダ中間符号列に続いて符号化されている係数中間符号列に対して可変長復号化を施すことにより残差符号化信号253を取得する。そして、係数符号列解析部204は、当該残差符号化信号253を予測残差復号化部205へ出力する第1モードを有する。さらに、係数符号列解析部204は、ヘッダ符号列解析部203によって解析されたヘッダ中間符号列に続いて符号化されている係数中間符号列に対して可変長復号化せずに再構成画像信号256′を取得し、取得した当該再構成画像信号256′を加算演算部209の出力である再構成画像信号256に置き換える第2モードを有する。このとき第2モードを用いて処理した場合は、以降で説明する予測残差復号化部205による残差復号化信号254の生成処理、および予測復号化部207による予測画像信号255の生成処理は行なわなくても構わない。 The coefficient code string analysis unit 204 performs a variable length decoding on the coefficient intermediate code string encoded subsequent to the header intermediate code string analyzed by the header code string analysis unit 203 to thereby generate a residual encoded signal. 253 is acquired. Then, the coefficient code string analysis unit 204 has a first mode for outputting the residual encoded signal 253 to the prediction residual decoding unit 205. Further, the coefficient code string analysis unit 204 reconstructs the reconstructed image signal without performing variable length decoding on the coefficient intermediate code string encoded subsequent to the header intermediate code string analyzed by the header code string analysis unit 203. 256 ′ is acquired, and the acquired reconstructed image signal 256 ′ is replaced with the reconstructed image signal 256 that is the output of the addition operation unit 209. When processing is performed using the second mode at this time, the generation process of the residual decoded signal 254 by the prediction residual decoding unit 205 and the generation process of the predicted image signal 255 by the prediction decoding unit 207 are described below. You don't have to.
 予測残差復号化部205は、係数符号列解析部204から入力された残差符号化信号253に対して、逆量子化および逆直交変換することで残差復号化信号254を生成する。そして、生成した残差復号化信号254を加算演算部209に出力する。このとき予測残差復号化部205は、量子化値決定部208において決定された量子化値信号258を用いて残差符号化信号253を逆量子化する。 The prediction residual decoding unit 205 generates a residual decoded signal 254 by performing inverse quantization and inverse orthogonal transform on the residual encoded signal 253 input from the coefficient code string analyzing unit 204. Then, the generated residual decoded signal 254 is output to the addition operation unit 209. At this time, the prediction residual decoding unit 205 dequantizes the residual encoded signal 253 using the quantized value signal 258 determined by the quantized value determining unit 208.
 予測復号化部207は、ヘッダ符号列解析部203から出力された予測情報信号257を基に、画面内予測、または画面間予測を用いて予測画像信号255を生成し加算演算部209に出力する。なお、予測復号化部207は、画面間予測を用いる際は、ピクチャメモリ206に蓄積されている既に復号化済みの過去のピクチャの再構成画像信号256を用いる。また、画面内予測を用いる際は、復号化対象CUに隣接する既に復号化済みのCUの現在のピクチャの再構成画像信号256を用いる。画面内予測を用いるか画面間予測を用いるかの判定については、入力される予測情報信号257に従って行われる。 The predictive decoding unit 207 generates a predicted image signal 255 using intra prediction or inter prediction based on the prediction information signal 257 output from the header code string analysis unit 203, and outputs the prediction image signal 255 to the addition operation unit 209. . Note that the predictive decoding unit 207 uses the reconstructed image signal 256 of a past picture that has already been decoded and stored in the picture memory 206 when using inter-screen prediction. Further, when using intra prediction, the reconstructed image signal 256 of the current picture of a CU that has already been decoded and is adjacent to the decoding target CU is used. Whether to use intra prediction or inter prediction is determined according to the input prediction information signal 257.
 ピクチャメモリ206は、加算演算部209または係数符号列解析部204から順に入力される再構成画像信号256をピクチャ単位で蓄積し、ピクチャ単位で出力する順番に並び替えて出力画像信号259として表示装置に出力する。 The picture memory 206 stores the reconstructed image signal 256 sequentially input from the addition operation unit 209 or the coefficient code string analysis unit 204 in units of pictures, rearranges them in the order of output in units of pictures, and displays them as an output image signal 259. Output to.
 加算演算部209では、予測残差復号化部205から出力される残差復号化信号254と、予測復号化部207から出力される予測画像信号255とを加算することによって再構成画像信号256を生成し、ピクチャメモリ206に出力する。 The addition operation unit 209 adds the residual decoded signal 254 output from the prediction residual decoding unit 205 and the predicted image signal 255 output from the prediction decoding unit 207 to add the reconstructed image signal 256. Generate and output to the picture memory 206.
 ここで、算術復号化部201および2値化復号化部202において符号列信号251の解析を行う方法について、図11のフローチャートを用いて具体的に説明する。 Here, a method of analyzing the code string signal 251 in the arithmetic decoding unit 201 and the binary decoding unit 202 will be specifically described with reference to the flowchart of FIG.
2.符号列の解析方法
 図11は、実施形態1に係わる動画像符号化装置100によって生成された符号列信号に対して解析を行うときのフローチャートである。
2. Code Sequence Analysis Method FIG. 11 is a flowchart when the code sequence signal generated by the video encoding apparatus 100 according to the first embodiment is analyzed.
 まず、算術復号化部201は、入力された符号列の先頭に記述されているPCMモード情報の解析を行う(S1301)。つづいて、得られたPCMモード情報に従って、対象のCUがResidualモードで符号化されているか、もしくはPCMモードで符号化されているかの判定を行う(S1302)。 First, the arithmetic decoding unit 201 analyzes PCM mode information described at the beginning of the input code string (S1301). Subsequently, according to the obtained PCM mode information, it is determined whether the target CU is encoded in the Residual mode or the PCM mode (S1302).
 ステップS1302において、Residualモードで符号化されていると判断された場合は、入力された符号列に属するヘッダ符号列および係数符号列に対して算術復号化を行い中間符号列を生成する(S1303)。 If it is determined in step S1302 that the encoding is performed in the Residual mode, the intermediate code string is generated by performing arithmetic decoding on the header code string and the coefficient code string belonging to the input code string (S1303). .
 一方、ステップS1302において、PCMモードで符号化されていると判断された場合は、入力された符号列に属する係数符号列に対して算術復号化を行わずに取得したビット列をそのままの符号列として、先に解析されたPCMモード情報の符号列に続けて記述することで中間符号列を生成する(S1306)。 On the other hand, if it is determined in step S1302 that the encoding is performed in the PCM mode, the bit string acquired without performing arithmetic decoding on the coefficient code string belonging to the input code string is used as the code string as it is. The intermediate code string is generated by describing the code string of the previously analyzed PCM mode information (S1306).
 次に、2値化復号化部202は、入力された中間符号列がResidualモードによって生成されている場合は、ヘッダ中間符号列に対して可変長復号化を施すことによりヘッダ情報の解析を行い、生成された予測情報信号257、量子化値情報、その他の復号化制御情報を図10の各処理ブロックへ出力する(S1304)。 Next, when the input intermediate code string is generated in the Residual mode, the binary decoding unit 202 analyzes header information by performing variable length decoding on the header intermediate code string. The generated prediction information signal 257, quantization value information, and other decoding control information are output to each processing block of FIG. 10 (S1304).
 つづいて、係数中間符号列に対して可変長復号化を施すことによって取得した残差符号化信号253を予測残差復号化部205に出力する(S1305)。 Subsequently, the residual encoded signal 253 obtained by performing variable length decoding on the coefficient intermediate code string is output to the prediction residual decoding unit 205 (S1305).
 一方、2値化復号化部202は、入力された中間符号列がPCMモードによって生成されている場合は、係数中間符号列に対して可変長復号化を施すこととなく、取得したビット列をそのまま再構成画像信号256′として出力し、加算演算部209から出力される再構成画像信号256に置き換えて以降の処理を行う(S1307)。このとき、当該中間符号列にはPCMモード情報以外のヘッダ情報を含まないためヘッダ中間符号列の解析は必要ない。 On the other hand, when the input intermediate code string is generated in the PCM mode, the binary decoding unit 202 does not perform variable length decoding on the coefficient intermediate code string, and directly converts the acquired bit string. The reconstructed image signal 256 ′ is output and replaced with the reconstructed image signal 256 output from the addition operation unit 209, and the subsequent processing is performed (S1307). At this time, since the intermediate code string does not include header information other than the PCM mode information, it is not necessary to analyze the header intermediate code string.
 なお、実施の形態1で説明した動画像符号化装置100において、図2のステップS606で、入力画像信号の代わりに再構成画像信号155を用いて符号列を生成した場合においても、当該符号列に対する復号化処理としては全く区別する必要はない。つまり、ステップS1307において再構成画像信号として出力し以降の処理を行うことが可能である。 Note that in the video encoding apparatus 100 described in Embodiment 1, even when a code string is generated using the reconstructed image signal 155 instead of the input image signal in step S606 in FIG. It is not necessary to distinguish at all as a decoding process for. That is, it is possible to output as a reconstructed image signal in step S1307 and perform subsequent processing.
3.シンタックス
 本実施の形態において復号化処理を行う符号列のシンタックスおよび生成される中間符号列の最大符号量は、実施形態1と全く同様である。
3. Syntax In this embodiment, the syntax of the code string to be decoded and the maximum code amount of the generated intermediate code string are exactly the same as those in the first embodiment.
4.パイプライン改善効果
 本実施の形態による動画像復号化装置200を用いることにより、これに対応する符号列を生成する動画像符号化装置は、実施の形態1で説明したような構成をとることが可能となり、図4(b)のように、2値化符号化処理の時点でPCMモードとすることが確定できる。そのため、パイプライン処理と算術符号化処理のタイミングのずれを考慮する必要がなく、パイプラインを遡る処理の量を常に一定にすることが可能となる。よって、PCMモード発生時の処理制御を単純化することができる。さらに、生成される中間符号列の発生符号量が特定の符号量以下になることが保証される。そのため、図15を用いて説明した復号化におけるパイプラインにおいて、図15(a)のように符号列解析処理の処理時間を常に規定値内に納めることが可能となる。つまり、復号化処理の遅延の発生を回避することが可能となる。
4). Pipeline Improvement Effect A moving picture coding apparatus that generates a code sequence corresponding to the moving picture decoding apparatus 200 according to the present embodiment can have the configuration described in the first embodiment. As shown in FIG. 4B, the PCM mode can be determined at the time of the binary encoding process. Therefore, it is not necessary to consider the timing difference between the pipeline processing and the arithmetic coding processing, and the amount of processing going back in the pipeline can always be made constant. Therefore, it is possible to simplify the process control when the PCM mode occurs. Furthermore, it is guaranteed that the generated code amount of the generated intermediate code string is equal to or less than a specific code amount. Therefore, in the decoding pipeline described with reference to FIG. 15, it is possible to always keep the processing time of the code string analysis processing within the specified value as shown in FIG. That is, it is possible to avoid the occurrence of a delay in the decoding process.
(実施形態4)
 実施形態4に係る動画像復号化装置について、図面を参照しながら説明する。
(Embodiment 4)
A moving picture decoding apparatus according to Embodiment 4 will be described with reference to the drawings.
1.動画像復号化装置の構成
 実施形態4に係る動画像復号化装置200の構成は、図10を用いて説明した実施形態3に係る動画像復号化装置200の構成と同一である。そのため、説明を省略する。
1. Configuration of Video Decoding Device The configuration of the video decoding device 200 according to the fourth embodiment is the same as the configuration of the video decoding device 200 according to the third embodiment described with reference to FIG. Therefore, explanation is omitted.
2.符号列の解析方法
 図12は、実施形態2に係わる動画像符号化装置100-1によって生成された符号列信号に対して解析を行うときのフローチャートである。このフローチャートは図11のフローチャートとほぼ同様であるが、ステップS1301、ステップS1303の代わりに、ステップS1401、ステップS1403が用いられ、またステップS1404が新たに追加されている。
2. Code Sequence Analysis Method FIG. 12 is a flowchart when analysis is performed on a code string signal generated by the video encoding apparatus 100-1 according to the second embodiment. This flowchart is almost the same as the flowchart of FIG. 11, but steps S1401 and S1403 are used instead of steps S1301 and S1303, and step S1404 is newly added.
 まず、算術復号化部201は、入力された符号列に属するヘッダ符号列に対して算術復号化を行いヘッダ中間符号列を生成する(S1401)。このときヘッダ符号列に記述されている情報である、対象のCUがResidualモードで符号化されているか、もしくはPCMモードで符号化されているかの信号をステップS1302に送り判定処理に用いる。 First, the arithmetic decoding unit 201 performs arithmetic decoding on the header code string belonging to the input code string to generate a header intermediate code string (S1401). At this time, a signal indicating whether the target CU is encoded in the Residual mode or the PCM mode, which is information described in the header code string, is sent to Step S1302 and used for the determination process.
 ステップS1302において、Residualモードで符号化されていると判断された場合は、入力された符号列に属する係数符号列に対して算術復号化を行う。そして、先に生成されたヘッダ中間符号列に続けて記述することで中間符号列を生成する(S1403)。 If it is determined in step S1302 that the encoding is performed in the Residual mode, arithmetic decoding is performed on the coefficient code string belonging to the input code string. Then, an intermediate code string is generated by describing the header intermediate code string generated earlier (S1403).
 一方、ステップS1302において、PCMモードで符号化されていると判断された場合は、入力された符号列に属する係数符号列に対して算術復号化を行わずに、取得したビット列をそのまま、先に生成されたヘッダ中間符号列に続けて記述することで中間符号列を生成する(S1306)。 On the other hand, if it is determined in step S1302 that the coding is performed in the PCM mode, the acquired bit string is directly used without performing arithmetic decoding on the coefficient code string belonging to the input code string. An intermediate code string is generated by describing the generated header intermediate code string after the header intermediate code string (S1306).
 次に、2値化復号化部202は、入力された中間符号列がResidualモードによって生成されている場合もPCMモードによって生成される場合も全く同様に、ヘッダ符号列に対して可変長復号化を施すことによりヘッダ情報の解析を行う。そして、生成された予測情報信号257、量子化値情報、その他の復号化制御情報を図10の各処理ブロックへ出力する(S1304およびS1404)。 Next, the binary decoding unit 202 performs variable-length decoding on the header code string in the same manner whether the input intermediate code string is generated in the Residual mode or the PCM mode. Header information is analyzed. Then, the generated prediction information signal 257, quantization value information, and other decoding control information are output to each processing block of FIG. 10 (S1304 and S1404).
 つづいて、入力された中間符号列がResidualモードによって生成されている場合は、係数中間符号列に対して可変長復号化を施すことによって取得した残差符号化信号253を予測残差復号化部205に出力する(S1305)。 Subsequently, when the input intermediate code sequence is generated by the Residual mode, the prediction residual decoding unit converts the residual encoded signal 253 obtained by performing variable length decoding on the coefficient intermediate code sequence. It outputs to 205 (S1305).
 一方、入力された中間符号列がPCMモードによって生成されている場合は、係数中間符号列に対して可変長復号化を施すことなく、取得したビット列をそのまま再構成画像信号256′として出力する。そして、加算演算部209から出力される再構成画像信号256に置き換えて以降の処理を行う(S1307)。 On the other hand, when the input intermediate code string is generated by the PCM mode, the acquired bit string is output as it is as the reconstructed image signal 256 ′ without performing variable length decoding on the coefficient intermediate code string. Then, it is replaced with the reconstructed image signal 256 output from the addition operation unit 209, and the subsequent processing is performed (S1307).
 なお、実施の形態2で説明した動画像符号化装置100-1において、図7のステップS1005で、再構成画像信号155の代わりに入力画像信号を用いて符号列を生成した場合においても、当該符号列に対する復号化処理としては全く区別する必要はない。つまり、ステップS1307において再構成画像信号として出力し以降の処理を行うことが可能である。 Note that in the moving picture encoding apparatus 100-1 described in the second embodiment, even when a code string is generated using an input image signal instead of the reconstructed image signal 155 in step S1005 in FIG. It is not necessary to distinguish the decoding process for the code string. That is, it is possible to output as a reconstructed image signal in step S1307 and perform subsequent processing.
3.シンタックス
 本実施の形態において復号化処理を行う符号列のシンタックスおよび生成される中間符号列の最大符号量は、実施形態1と全く同様である。
3. Syntax In this embodiment, the syntax of the code string to be decoded and the maximum code amount of the generated intermediate code string are exactly the same as those in the first embodiment.
4.パイプライン改善効果
 本実施の形態による動画像復号化装置200を用いることにより、これに対応する符号列を生成する動画像符号化装置は、実施の形態2で説明したような構成をとることが可能となり、図9(b)のように、2値化符号化処理の時点でPCMモードとすることが確定できる。そのため、パイプライン処理と算術符号化処理のタイミングのずれを考慮する必要がない。また、ヘッダ符号列に記述されている予測情報や最終的に生成される再構成画像の画素情報の変更は必要ない。よって、パイプラインを遡ることなくPCMモード発生時の処理制御を行うことができる。さらに、生成される中間符号列の発生符号量が特定の符号量以下になることが保証される。そのため、図15を用いて説明した復号化におけるパイプラインにおいて、図15(a)のように符号列解析処理の処理時間を常に規定値内に納めることが可能となる。つまり、復号化処理の遅延の発生を回避することが可能となる。
4). Pipeline improvement effect By using the moving picture decoding apparatus 200 according to the present embodiment, a moving picture encoding apparatus that generates a code string corresponding to the moving picture decoding apparatus 200 can have the configuration described in the second embodiment. As shown in FIG. 9B, the PCM mode can be determined at the time of the binary encoding process. Therefore, it is not necessary to consider the timing difference between pipeline processing and arithmetic coding processing. Further, it is not necessary to change the prediction information described in the header code string or the pixel information of the finally generated reconstructed image. Therefore, it is possible to perform processing control when the PCM mode occurs without going back in the pipeline. Furthermore, it is guaranteed that the generated code amount of the generated intermediate code string is equal to or less than a specific code amount. Therefore, in the decoding pipeline described with reference to FIG. 15, it is possible to always keep the processing time of the code string analysis processing within the specified value as shown in FIG. That is, it is possible to avoid the occurrence of a delay in the decoding process.
(その他の実施形態)
 上記各実施形態で示した動画像符号化装置および動画像復号化装置に含まれる各手段と同等の機能を備えるプログラムを、フレキシブルディスク等の記録媒体に記録するようにすることにより、上記実施の形態で示した処理を、独立したコンピュータシステムにおいて簡単に実施することが可能となる。なお、記録媒体は、フレキシブルディスクに限らず、光ディスク、ICカード、ROMカセット等、プログラムを記録できるものであればよい。
(Other embodiments)
By recording a program having the same function as each unit included in the moving image encoding device and the moving image decoding device described in each of the above embodiments on a recording medium such as a flexible disk, The processing shown in the form can be easily performed in an independent computer system. The recording medium is not limited to a flexible disk, but may be any medium that can record a program, such as an optical disk, an IC card, and a ROM cassette.
 また、上記実施の形態で示した動画像符号化装置および動画像復号化装置に含まれる各手段と同等の機能を集積回路であるLSIとして実現してもよい。これらは一部または全てを含むように1チップ化されてもよい。またLSIは集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと称されることもある。 Also, the functions equivalent to the means included in the moving picture coding apparatus and the moving picture decoding apparatus shown in the above embodiments may be realized as an LSI which is an integrated circuit. These may be integrated into one chip so as to include a part or all of them. An LSI may also be called an IC, a system LSI, a super LSI, or an ultra LSI depending on the degree of integration.
 また、集積回路化の手法はLSIに限るものではなく、専用回路または汎用プロセッサで実現しても良い。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用しても良い。 Further, the method of circuit integration is not limited to LSI, and implementation with a dedicated circuit or a general-purpose processor is also possible. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI, or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
 さらには、半導体技術の進歩または派生する別技術によりLSIなどに置き換わる集積回路の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。 Furthermore, if integrated circuit technology that replaces LSI or the like appears due to progress in semiconductor technology or other derived technology, the functional blocks may naturally be integrated using this technology.
 また、本発明は、上述した動画像符号化装置および動画像復号化装置を含む、放送局から放送される放送波を圧縮し、記録を行うDVDレコーダー、BDレコーダー等の放送波記録装置に適用しても構わない。 Further, the present invention is applied to a broadcast wave recording apparatus such as a DVD recorder or a BD recorder that compresses and records a broadcast wave broadcast from a broadcast station, including the above-described moving picture encoding apparatus and moving picture decoding apparatus. It doesn't matter.
 また、上記実施の形態に係る、動画像符号化装置および動画像復号化装置、またはその変形例の機能のうち少なくとも一部を組み合わせてもよい。 Further, at least a part of the functions of the moving picture coding apparatus and the moving picture decoding apparatus according to the above-described embodiment, or a modification thereof may be combined.
 本発明は、例えば、ビデオカメラ、デジタルカメラ、ビデオレコーダ、携帯電話、及びパーソナルコンピューター等における、入力画像を構成する各ピクチャを符号化して動画像符号化データとして出力する動画像符号化装置や、前記動画像符号化データを復号化して復号化画像を生成する動画像復号化装置として有用である。 The present invention, for example, in a video camera, a digital camera, a video recorder, a mobile phone, a personal computer, etc., a moving image encoding device that encodes each picture constituting an input image and outputs it as moving image encoded data, The present invention is useful as a moving picture decoding apparatus that generates a decoded picture by decoding the moving picture encoded data.
 100、100-1 動画像符号化装置
 101 ピクチャメモリ
 102 予測残差符号化部
 103 予測残差復号化部
 104 ローカルバッファ
 105 予測符号化部
 106 量子化値決定部
 107、107-1 2値化符号化部
 108、108-1 ヘッダ符号列生成部
 109、109-1 係数符号列生成部
 110、110-1 算術符号化部
 111 差分演算部
 112 加算演算部
 151 入力画像信号
 152 差分画像信号
 153 残差符号化信号
 154 残差復号化信号
 155 再構成画像信号
 156 予測画像信号
 157 予測情報信号
 158 量子化値信号
 159、159-1 中間符号列信号
 160、160-1 符号列信号
 200 動画像復号化装置
 201 算術復号化部
 202 2値化復号化部
 203 ヘッダ符号列解析部
 204 係数符号列解析部
 205 予測残差復号化部
 206 ピクチャメモリ
 207 予測復号化部
 208 量子化値決定部
 209 加算演算部
 251 符号列信号
 252 中間符号列信号
 253 残差符号化信号
 254 残差復号化信号
 255 予測画像信号
 256 再構成画像信号
 257 予測情報信号
 258 量子化値信号
 259 出力画像信号
100, 100-1 Video coding apparatus 101 Picture memory 102 Prediction residual encoding unit 103 Prediction residual decoding unit 104 Local buffer 105 Prediction encoding unit 106 Quantized value determination unit 107, 107-1 Binary code Conversion unit 108, 108-1 header code sequence generation unit 109, 109-1 coefficient code sequence generation unit 110, 110-1 arithmetic encoding unit 111 difference calculation unit 112 addition calculation unit 151 input image signal 152 difference image signal 153 residual Coded signal 154 Residual decoded signal 155 Reconstructed image signal 156 Predicted image signal 157 Predicted information signal 158 Quantized value signal 159, 159-1 Intermediate code sequence signal 160, 160-1 Code sequence signal 200 Video decoding device 201 Arithmetic decoding unit 202 Binary decoding unit 203 Header code string analysis unit 204 Coefficient code Sequence analysis unit 205 Prediction residual decoding unit 206 Picture memory 207 Prediction decoding unit 208 Quantized value determination unit 209 Addition operation unit 251 Code sequence signal 252 Intermediate code sequence signal 253 Residual encoded signal 254 Residual decoded signal 255 Predicted image signal 256 Reconstructed image signal 257 Predicted information signal 258 Quantized value signal 259 Output image signal

Claims (9)

  1.  入力される符号化対象画像をブロック単位で符号化する動画像符号化装置であって、
     前記符号化対象画像に対応する予測画像を生成する予測画像生成部と、
     前記符号化対象画像と前記生成された予測画像との差分画像を生成する減算器と、
     前記減算器の出力に対して直交変換処理および量子化処理を行い、残差係数を生成する予測残差符号化部と、
     前記残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成する予測残差復号化部と、
     前記予測画像生成部で生成された予測画像と前記予測残差復号化部で生成された残差復号化画像とを加算することで再構成画像を生成する加算器と、
     前記予測残差符号化部で生成された残差係数を可変長符号化して係数符号列を生成し、前記予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、前記係数符号列および、前記ヘッダ符号列から構成される中間符号列を出力する2値化符号化部と、
     前記2値化符号化部によって出力された中間符号列に対して算術符号化し、出力符号列を生成する算術符号化部と、を備え、
     前記2値化符号化部は、前記算術符号化部に中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する、
    動画像符号化装置。
    A video encoding device that encodes an input encoding target image in units of blocks,
    A predicted image generation unit that generates a predicted image corresponding to the encoding target image;
    A subtractor that generates a difference image between the encoding target image and the generated predicted image;
    A prediction residual encoding unit that performs orthogonal transform processing and quantization processing on the output of the subtractor to generate a residual coefficient;
    A prediction residual decoding unit that performs an inverse quantization process and an inverse orthogonal transform process on the residual coefficient to generate a residual decoded image;
    An adder that generates a reconstructed image by adding the prediction image generated by the prediction image generation unit and the residual decoded image generated by the prediction residual decoding unit;
    The residual coefficient generated by the prediction residual encoding unit is variable-length encoded to generate a coefficient code string, and a header code string including at least prediction information used when generating the predicted image is generated, A binary coding unit that outputs a coefficient code string and an intermediate code string composed of the header code string;
    An arithmetic encoding unit that arithmetically encodes the intermediate code sequence output by the binary encoding unit and generates an output code sequence, and
    When the binary coding unit outputs an intermediate code string to the arithmetic coding unit, the code amount of the intermediate code string is limited to a predetermined specific code amount or less.
    Video encoding device.
  2.  前記2値化符号化部は、出力する中間符号列の符号量が、前記予め定義された特定の符号量を超過する可能性がある場合、前記予測残差符号化部においてより大きな量子化幅を適用して量子化処理を再度行うことで残差係数を再生成し、前記再生成された残差係数を用いて中間符号列を出力する、
    請求項1に記載の動画像符号化装置。
    When the code amount of the intermediate code string to be output may exceed the predetermined specific code amount, the binarization encoding unit has a larger quantization width in the prediction residual encoding unit. To regenerate the residual coefficient by performing the quantization process again, and output an intermediate code string using the regenerated residual coefficient,
    The moving image encoding apparatus according to claim 1.
  3.  前記2値化符号化部は、前記中間符号列を出力した結果、中間符号列の符号量が前記予め定義された特定の符号量を超過した場合、前記予測残差符号化部においてより大きな量子化幅を適用して量子化処理を再度行うことで残差係数を再生成し、前記出力した中間符号列に代えて、前記再生成された残差係数を用いて生成した中間符号列を出力する請求項1に記載の動画像符号化装置。 When the code amount of the intermediate code sequence exceeds the predetermined specific code amount as a result of outputting the intermediate code sequence, the binary coding unit outputs a larger quantum in the prediction residual coding unit. A residual coefficient is regenerated by performing quantization processing again by applying a quantization width, and an intermediate code string generated using the regenerated residual coefficient is output instead of the output intermediate code string The moving picture encoding apparatus according to claim 1.
  4.  入力される符号化対象画像をブロック単位で符号化する動画像符号化装置であって、
     前記符号化対象画像に対応する予測画像を生成する予測画像生成部と、
     前記符号化対象画像と前記生成された予測画像との差分画像を生成する減算器と、
     前記減算器の出力に対して直交変換処理および量子化処理を行い、残差係数を生成する予測残差符号化部と、
     前記残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成する予測残差復号化部と、
     前記予測画像生成部で生成された予測画像と前記予測残差復号化部で生成された残差復号化画像とを加算することで再構成画像を生成する加算器と、
     第1モードにおいて、前記予測残差符号化部で生成された残差係数を可変長符号化して係数符号列を生成し、前記予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、前記係数符号列および、前記ヘッダ符号列から構成される中間符号列を出力する一方、第2モードにおいて、前記残差係数の代わりに前記符号化対象画像の信号処理過程において得られる中間画像信号を可変長符号化せずにそのまま係数符号列とし、当該係数符号列および当該係数符号列が中間画像信号であることを示す識別子を少なくとも含むヘッダ符号列から構成される中間符号列を出力する2値化符号化部と、
     前記第1モードにおいて出力された中間符号列に対して算術符号化し、出力符号列を生成する一方、前記第2モードにおいて出力された中間符号列のうち前記ヘッダ符号列に対してのみ算術符号化し、算術符号化後のヘッダ符号列と前記係数符号列から構成される出力符号列を生成する算術符号化部と、を備え、
     前記2値化符号化部は、前記算術符号化部に中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する、動画像符号化装置。
    A video encoding device that encodes an input encoding target image in units of blocks,
    A predicted image generation unit that generates a predicted image corresponding to the encoding target image;
    A subtractor that generates a difference image between the encoding target image and the generated predicted image;
    A prediction residual encoding unit that performs orthogonal transform processing and quantization processing on the output of the subtractor to generate a residual coefficient;
    A prediction residual decoding unit that performs an inverse quantization process and an inverse orthogonal transform process on the residual coefficient to generate a residual decoded image;
    An adder that generates a reconstructed image by adding the prediction image generated by the prediction image generation unit and the residual decoded image generated by the prediction residual decoding unit;
    In the first mode, a header code string including at least prediction information used when generating a coefficient code string by variable-length coding the residual coefficient generated by the prediction residual coding unit and generating the predicted image And the intermediate code string composed of the coefficient code string and the header code string is output, and obtained in the signal processing process of the encoding target image instead of the residual coefficient in the second mode. An intermediate code sequence composed of a header code sequence including at least an identifier indicating that the coefficient code sequence and the coefficient code sequence are intermediate image signals without changing the length of the intermediate image signal. A binary encoding unit to output;
    The intermediate code string output in the first mode is arithmetically encoded to generate an output code string, while the intermediate code string output in the second mode is arithmetically encoded only for the header code string An arithmetic coding unit that generates an output code string composed of a header code string after arithmetic coding and the coefficient code string,
    The binary coding unit is a moving picture coding device that restricts a code amount of an intermediate code string to a predetermined code amount or less when outputting the intermediate code string to the arithmetic coding unit.
  5.  前記予め定義された特定の符号量は、前記中間画像信号の画素値をそのまま符号列として記述する際に必要となる符号量と、前記ヘッダ符号列に記述される可能性のある全ての情報を符号化する際に必要となる最大の符号量と、余裕量とを合わせた符号量である請求項1から4のいずれか1項に記載の動画像符号化装置。 The specific code amount defined in advance includes a code amount required when the pixel value of the intermediate image signal is directly described as a code string, and all information that may be described in the header code string. 5. The moving picture encoding apparatus according to claim 1, wherein the encoding amount is a code amount that is a sum of a maximum code amount necessary for encoding and a margin amount. 6.
  6.  前記2値化符号化部は、出力する中間符号列の符号量が、前記予め定義された特定の符号量を超過する可能性がある場合、前記第2モードを用いて中間符号列を出力する請求項4に記載の動画像符号化装置。 The binarization encoding unit outputs the intermediate code sequence using the second mode when the code amount of the output intermediate code sequence may exceed the predetermined specific code amount. The moving image encoding apparatus according to claim 4.
  7.  前記2値化符号化部は、前記第1モードで中間符号列を出力した結果、当該中間符号列の符号量が前記予め定義された特定の符号量を超過した場合、当該第1モードで生成した中間符号列に代えて、前記第2モードを用いて生成した中間符号列を出力する請求項4に記載の動画像符号化装置。 When the code amount of the intermediate code sequence exceeds the predetermined specific code amount as a result of outputting the intermediate code sequence in the first mode, the binarization encoding unit generates the first code mode. The moving picture coding apparatus according to claim 4, wherein an intermediate code string generated using the second mode is output instead of the intermediate code string.
  8.  入力される符号化対象画像をブロック単位で符号化する動画像符号化方法であって、
     前記符号化対象画像に対応する予測画像を生成し、
     前記符号化対象画像と前記生成された予測画像との差分画像を生成し、
     前記減算器の出力に対して直交変換処理および量子化処理を行い、残差係数を生成し、
     前記残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成し、
     前記生成された予測画像と前記生成された残差復号化画像とを加算することで再構成画像を生成し、
     前記生成された残差係数を可変長符号化して係数符号列を生成し、前記予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、前記係数符号列および、前記ヘッダ符号列から構成される中間符号列を出力し、
     前記出力された中間符号列に対して算術符号化し、出力符号列を生成し、
     前記中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する動画像符号化方法。
    A moving image encoding method for encoding an input encoding target image in units of blocks,
    Generating a predicted image corresponding to the encoding target image;
    Generating a difference image between the encoding target image and the generated predicted image;
    An orthogonal transformation process and a quantization process are performed on the output of the subtractor to generate a residual coefficient,
    Performing an inverse quantization process and an inverse orthogonal transform process on the residual coefficient to generate a residual decoded image;
    Generating a reconstructed image by adding the generated predicted image and the generated residual decoded image;
    The generated residual coefficient is variable-length encoded to generate a coefficient code string, a header code string including at least prediction information used when generating the predicted image is generated, the coefficient code string, and the header Output an intermediate code sequence consisting of code sequences,
    Arithmetically encoding the output intermediate code string to generate an output code string;
    A moving picture encoding method for limiting the code amount of an intermediate code sequence to a predetermined code amount or less when outputting the intermediate code sequence.
  9.  入力される符号化対象画像をブロック単位で符号化する動画像符号化方法であって、
     前記符号化対象画像に対応する予測画像を生成し、
     前記符号化対象画像と前記生成された予測画像との差分画像を生成し、
     前記差分画像に対して直交変換処理および量子化処理を行い、残差係数を生成し、
     前記残差係数に対して逆量子化処理および逆直交変換処理を行い、残差復号化画像を生成し、
     前記生成された予測画像と前記生成された残差復号化画像とを加算することで再構成画像を生成し、
     第1モードにおいて、前記生成された残差係数を可変長符号化して係数符号列を生成し、前記予測画像を生成する際に利用した予測情報を少なくとも含むヘッダ符号列を生成し、前記係数符号列および、前記ヘッダ符号列から構成される中間符号列を出力する一方、第2モードにおいて、前記残差係数の代わりに前記符号化対象画像の信号処理過程において得られる中間画像信号を可変長符号化せずにそのまま係数符号列とし、当該係数符号列および当該係数符号列が中間画像信号であることを示す識別子を少なくとも含むヘッダ符号列から構成される中間符号列を出力し、
     前記第1モードにおいて出力された中間符号列に対して算術符号化し、出力符号列を生成する一方、前記第2モードにおいて出力された中間符号列のうち前記ヘッダ符号列に対してのみ算術符号化し、算術符号化後のヘッダ符号列と前記係数符号列から構成される出力符号列を生成し、
     前記中間符号列を出力する際、中間符号列の符号量を予め定義された特定の符号量以下に制限する動画像符号化方法。
    A moving image encoding method for encoding an input encoding target image in units of blocks,
    Generating a predicted image corresponding to the encoding target image;
    Generating a difference image between the encoding target image and the generated predicted image;
    An orthogonal transformation process and a quantization process are performed on the difference image to generate a residual coefficient,
    Performing an inverse quantization process and an inverse orthogonal transform process on the residual coefficient to generate a residual decoded image;
    Generating a reconstructed image by adding the generated predicted image and the generated residual decoded image;
    In the first mode, the generated residual coefficient is variable-length encoded to generate a coefficient code string, a header code string including at least prediction information used when generating the predicted image is generated, and the coefficient code Output an intermediate code sequence composed of a sequence and the header code sequence, and in the second mode, instead of the residual coefficient, an intermediate image signal obtained in a signal processing process of the encoding target image is a variable-length code Output an intermediate code string composed of a header code string including at least an identifier indicating that the coefficient code string and the coefficient code string are intermediate image signals,
    The intermediate code string output in the first mode is arithmetically encoded to generate an output code string, while the intermediate code string output in the second mode is arithmetically encoded only for the header code string Generating an output code string composed of the header code string after arithmetic coding and the coefficient code string;
    A moving picture coding method for restricting a code amount of an intermediate code sequence to a predetermined code amount or less when outputting the intermediate code sequence.
PCT/JP2012/001671 2011-03-10 2012-03-09 Moving image coding device and moving image coding method WO2012120910A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-053080 2011-03-10
JP2011053080A JP2014103429A (en) 2011-03-10 2011-03-10 Moving image encoder and moving image encoding method

Publications (1)

Publication Number Publication Date
WO2012120910A1 true WO2012120910A1 (en) 2012-09-13

Family

ID=46797881

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/001671 WO2012120910A1 (en) 2011-03-10 2012-03-09 Moving image coding device and moving image coding method

Country Status (2)

Country Link
JP (1) JP2014103429A (en)
WO (1) WO2012120910A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014220810A (en) * 2013-05-09 2014-11-20 株式会社イノワイアレスInnowireless Co.,Ltd I/q data compression and decompression method between du and ru in cran

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10091530B2 (en) * 2014-10-01 2018-10-02 Qualcomm Incorporated Pipelined intra-prediction hardware architecture for video coding

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004135251A (en) * 2002-10-10 2004-04-30 Sony Corp Method of encoding image information, and method of decoding the image information
JP2009100125A (en) * 2007-10-15 2009-05-07 Toshiba Corp Encoding apparatus

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004135251A (en) * 2002-10-10 2004-04-30 Sony Corp Method of encoding image information, and method of decoding the image information
JP2009100125A (en) * 2007-10-15 2009-05-07 Toshiba Corp Encoding apparatus

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014220810A (en) * 2013-05-09 2014-11-20 株式会社イノワイアレスInnowireless Co.,Ltd I/q data compression and decompression method between du and ru in cran

Also Published As

Publication number Publication date
JP2014103429A (en) 2014-06-05

Similar Documents

Publication Publication Date Title
JP5395307B2 (en) Moving picture decoding apparatus and moving picture decoding method
US11849124B2 (en) Device and method of video encoding with first and second encoding code
JP5909305B2 (en) Encoding method and encoding apparatus
JP5848289B2 (en) Video compression and decoding system
WO2012120910A1 (en) Moving image coding device and moving image coding method
JP2012191397A (en) Moving image encoding device and moving image encoding method
JP2012191491A (en) Moving image decoding device and moving image decoding method
JP2012191247A (en) Moving image encoding device and moving image encoding method
JP2012235293A (en) Moving image encoder
JP2012235294A (en) Moving image decoder
JP2012249221A (en) Video encoder and video encoding method
JP2012249222A (en) Video encoder and video encoding method

Legal Events

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

Ref document number: 12755271

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP