WO2005112427A1 - 画像符号化装置 - Google Patents

画像符号化装置 Download PDF

Info

Publication number
WO2005112427A1
WO2005112427A1 PCT/JP2004/006974 JP2004006974W WO2005112427A1 WO 2005112427 A1 WO2005112427 A1 WO 2005112427A1 JP 2004006974 W JP2004006974 W JP 2004006974W WO 2005112427 A1 WO2005112427 A1 WO 2005112427A1
Authority
WO
WIPO (PCT)
Prior art keywords
coding
encoding
code
path
pass
Prior art date
Application number
PCT/JP2004/006974
Other languages
English (en)
French (fr)
Inventor
Ikuro Ueno
Toshiyuki Takahashi
Masayuki Yoshida
Fuminobu Ogawa
Original Assignee
Mitsubishi Denki Kabushiki Kaisha
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 Mitsubishi Denki Kabushiki Kaisha filed Critical Mitsubishi Denki Kabushiki Kaisha
Priority to US11/579,453 priority Critical patent/US20080260275A1/en
Priority to PCT/JP2004/006974 priority patent/WO2005112427A1/ja
Priority to JP2006513488A priority patent/JP4322920B2/ja
Publication of WO2005112427A1 publication Critical patent/WO2005112427A1/ja

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/41Bandwidth or redundancy reduction
    • 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/63Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding using sub-band based transform, e.g. wavelets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/115Selection of the code volume for a coding unit prior to coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output

Definitions

  • the present invention relates to an image encoding device that performs entropy encoding.
  • the EG 2000 project has been started by a joint organization of ISO and ITU.In February 2000, the first part of the JPEG 2000 algorithm, The main technical content has been determined. The following is a recommendation (ISO / ITU15444-1: 20).
  • an input image signal is subjected to two-dimensional ⁇ ⁇ transform by a wavelet transform unit, and is divided into a plurality of sub-bands, and a V-wavelet transform coefficient in each sub-band is generated.
  • the two-dimensional wavelet transform is realized as a combination of one-dimensional wavelet transform.That is, the process of sequentially performing one-dimensional wavelet transform in the vertical direction for each column and one-dimensional wavelet transform in the horizontal direction are performed. This is a process performed sequentially for each line.
  • FIG. 1 is a diagram showing a wavelet transform in the prior art.
  • the one-dimensional wavelet transform is realized by a low-pass filter, a high-pass filter, and a downsampler having predetermined characteristics, as shown in Fig.
  • each sub-band is divided into bands by 2D wavelet transform.
  • the low-frequency component is L and the high-frequency component is H.
  • the horizontal conversion is represented by the first character, and the vertical sub-scanning conversion is two characters. By visual representation, they are represented as LL, HL, LH, and HH, as shown in Fig. 1 (b).
  • the low-frequency components (LL components) in the horizontal and vertical directions are recursively subjected to wavelet transform.
  • the number of wavelet transformations performed recursively is called the decomposition level, and this is the number written before LL, HL, LH, and HH in Fig. 1 (b). In other words, when the number of wavelet transform decompositions is 2, the decomposition level of the lowest resolution component is 2, and conversely, the decomposition level of HL, LH, and HH of the highest resolution component is 1.
  • the wavelet transform coefficients in each subband are quantized according to the quantization step size set for each subband.
  • each bit plane is harmed to three coding paths Significant Propagation Decoding Pass, Magnitude Refinement Pass, and Closeup Pass.
  • the binary signals output from the three encoding paths are subjected to context modeling for each of the encoding paths, and are subjected to event-to-point encoding.
  • the code amount and the coding distortion for each coding pass are calculated for each code block.
  • rate control for adjusting the code amount to a target code size or less is performed.
  • the rate control method is not standardized, and any method can be used according to the abridgement. However, the following recommendation (IS OZ I TU 15 444-1: 20000) ) The outline of the mechanism of the rate control unit described as reference information in J.14.3 is explained.
  • the Lagrange multiplier method when the truncation point in each code block i is ni, the code amount up to each truncation point is R (i, ni), and the coding distortion is D (i, ni), the Lagrange multiplier method is used. And the rate control parameter ⁇ until the total code amount R sum of the entire screen caused by the truncation point ni that maximizes the following expression is within the range of the target code amount Rmax. adjust.
  • the coding distortion D indicates how much the mean square error of the reproduced image has been reduced when the code up to a certain coding pass is sent, compared to when the code is not transmitted. Strictly speaking, this is the amount of reduction in coding distortion. Therefore, before coding, the coding distortion D is 0, and when coding is performed up to the last bit plane, the coding distortion D is equal to the mean square error.
  • FIG. 2 is a diagram for explaining the derivation of an optimal coding path in the prior art.
  • the tangent line This is equivalent to finding a truncation point where the slope of ⁇ is 1 which is the reciprocal of the rate control parameter.
  • k is a variable representing a truncated boin h ni.
  • R (i, k) is corrected in advance so that it decreases monotonically with respect to k.
  • the processing is performed as follows. Here, it is a variable that represents the truncation point n i
  • This process optimization cut for rate control parameters given lambda disposable Te point, S (i, k)> ⁇ 1 may be the maximum of k in N i satisfying.
  • FIG. 3 is a flowchart showing a monotonous phenomenon correction process of the slope of the RD curve in the related art.
  • the monotone correction processing of the above steps (1) to (3) is summarized in the flowchart shown in FIG. In Fig. 3, i, which indicates a code block, is omitted.
  • Step ST 13 in FIG. 3 corresponds to “Ifkbelongsto Ni” in step (3) above
  • step ST 16 in FIG. 3 corresponds to “rem 0 V epfromni” in step (3) above. This corresponds to the work of removing p from among the candidates N i.
  • the same processing is realized for the truncated point in FIG. 3 by using the flag (f1ag) indicating validity or invalidity.
  • code data is created to achieve the target code amount Rmax.
  • a rate control parameter that gives the maximum total code amount R sum that satisfies R sum ⁇ Rmax for the total code amount R sum of the entire screen for a certain rate control parameter ⁇ . become.
  • the total code amount R sum for a certain rate control parameter ⁇ can be found only when the truncation point is uniquely obtained in each code block and the sum of the code data up to the truncation point is calculated.
  • the total code amount R s um for a plurality of candidates for the rate control parameter ⁇ is usually Then, a rate control parameter that gives a total code amount R sum close to a desired value is calculated by convergence calculation.
  • code data up to the cutoff point corresponding to the rate control parameter ⁇ is collected from all code blocks, and the number of coding passes in each code block is added as additional information. , Constitute the final code. In this way, it is possible to generate code data that minimizes the coding distortion D under the target code amount Rmax.
  • JPEG 2000 international standard can be obtained through standardization organizations such as ISO and ITU-T. Also, the latest information on JPEG200 can be obtained by referring to http: //ztp.ZZwww.j ⁇ eg.org.
  • the total code amount R sum for a certain rate control parameter ⁇ can be found only when a truncation point is uniquely obtained in each code block and the sum of code data up to the truncation point is calculated. Therefore, when calculating the rate control parameter ⁇ that gives the maximum total code amount R sum that satisfies R sum ⁇ Rmax, the rate control parameter ⁇ Since it is necessary to calculate the total code amount R sum for a plurality of candidates and search for the rate control parameter ⁇ that gives the total code amount R sum close to the desired value many times by convergence calculation, the calculation required for rate control There was a problem that would lead to an increase in volume.
  • the present invention has been made to solve the above-described problems, and has as its object to provide an image coding apparatus capable of reducing the amount of calculation required for edge-to-peak coding and rate control. Disclosure of the invention
  • An image coding apparatus divides a quantized wavelet transform coefficient in each sub-band divided by a wavelet transform into code blocks, converts each code block into a bit plane, and converts the code block into a bit plane.
  • the total code amount indicating the sum of the code amounts or the sum of the coding distortions of each code block, the distortion difference of the coding distortion when each coding path and the previous coding path are coded, and the Based on the slope of the RD curve calculated from the number of output bytes of the code amount, and the reciprocal of a given set of rate control parameters where each value is monotonically decreasing.
  • Rate control information extracting means for judging up to which coding pass in which code block the entropy coding means performs coding, and outputting a coding end path at which coding ends, and the rate control information extracting means
  • Code data extracting means for reading out the code data up to the coding pass determined by the coding end pass outputted from the code memory, adding the number of coding passes in each code block, and outputting as a code stream. It is provided. According to the present invention, there is an effect that calculations required for entropy coding and rate control can be reduced.
  • FIG. 1 is a diagram showing a wavelet transform in the prior art.
  • FIG. 2 is a diagram for explaining the derivation of an optimal coding path in the prior art.
  • FIG. 3 is a flowchart showing a monotonous phenomenon correction process of the slope of the RD curve in the related art.
  • FIG. 4 is a block diagram showing a configuration of an image encoding device according to Embodiment 1 of the present invention.
  • FIG. 5 is a block diagram showing an internal configuration of the rate control information extracting means of the image encoding device according to Embodiment 1 of the present invention.
  • FIG. 6 is a diagram showing subbands when the wavelet transform means of the image coding apparatus according to the first embodiment of the present invention performs wavelet transform up to the decomposition level 2.
  • FIG. 7 is a diagram for explaining a bit plane in the image encoding device according to Embodiment 1 of the present invention.
  • FIG. 8 is a diagram for explaining decomposition of a bit plane into an encoding path in the image encoding device according to the first embodiment of the present invention.
  • FIG. 9 is a flowchart showing a processing flow of the image coding apparatus according to Embodiment 1 of the present invention.
  • FIG. 10 is a diagram showing an encoding order of an encoding pass in the image encoding device according to the first embodiment of the present invention.
  • FIG. 11 is a block diagram showing the internal configuration of the rate control information extracting means of the image coding apparatus according to Embodiment 2 of the present invention.
  • FIG. 12 is a diagram showing a data structure of an RD table stored in a rate distortion memory of an image coding apparatus according to Embodiment 2 of the present invention.
  • FIG. 13 is a flowchart showing a processing flow of the image coding apparatus according to the second embodiment of the present invention.
  • FIG. 14 is a diagram showing the correction of the slope of the RD curve in the image encoding device according to Embodiment 2 of the present invention.
  • FIG. 15 is a block diagram showing the internal configuration of the rate control information extracting means of the image coding apparatus according to Embodiment 3 of the present invention.
  • FIG. 16 is a diagram showing a data structure of an RD table stored in a rate distortion memory of an image encoding device according to Embodiment 3 of the present invention.
  • FIG. 17 is a flowchart showing a processing flow of the image coding apparatus according to the third embodiment of the present invention.
  • FIG. 4 is a block diagram showing a configuration of an image encoding device according to Embodiment 1 of the present invention.
  • This image coding apparatus comprises a wavelet transform means 101, a quantizing means 102, an entropy coding means 103, a code memory 104, a rate control information extracting means 105 and a code data extracting means. 106 is provided.
  • a wavelet transform unit 101 recursively performs a two-dimensional wavelet transform on an input image signal, divides it into subbands, and generates a wavelet transform coefficient in each subband.
  • the quantizing means 102 is a waveform generated by the wavelet transform means 101.
  • the blur transform coefficient is quantized at a preset quantization step size.
  • the entropy encoding means 103 divides the quantized wavelet transform coefficients into code blocks, converts each code block into a bit plane, divides the bit plane into an encoding path, and performs an encoding for each encoding path.
  • the output data is output after performing the peak-to-peak coding.
  • the code memory 104 temporarily stores the code data for each coding pass that has been subjected to the event P-code.
  • the rate control information extracting means 105 is a total code amount indicating the sum of the code amounts R of the respective code blocks, and the distortion of the encoding distortion D when each encoding path and the preceding encoding path are encoded.
  • the slope S of the RD curve calculated from the difference AD and the number of output bytes ⁇ R of the code amount R of each coding path, and the reciprocal of the given rate control parameters over which the values are monotonically decreasing
  • the entropy encoding unit 103 determines which encoding pass in which code block is to be encoded, and outputs an encoding end path that is the end of encoding.
  • the code data extracting means 106 reads the code data from the code memory 104 up to the coding pass determined by the coding end path output from the rate control information extracting means 105 from the code memory 104, and performs coding in each code block. The number of passes is added and output as a code stream.
  • FIG. 5 is a block diagram showing an internal configuration of the rate control information extracting means 105.
  • the rate control information extracting means 105 includes a distortion calculating means 111, a code amount calculating means 112, a gradient calculating means 113, and an encoding end path deriving means 114.
  • the distortion calculating means 1 1 1 calculates a distortion difference between the encoding path from the entropy encoding means 103 and the encoding distortion D in the encoding path and the encoding path D immediately before the encoding path. I do.
  • the code amount calculation means 112 counts the number of output bytes ⁇ R of the code amount R in the coding pass for each coding pass from the entropy coding means 103.
  • Slope calculation means 1 1 3 is strain calculation means The slope S of the RD curve is calculated from the distortion difference ⁇ D calculated by 1 1 1 and the number of output bytes counted by the code amount calculating means 1 1 2.
  • the encoding end path deriving means 1 1 4 calculates the total signal amount R sum of the entire screen indicating the sum of the code amounts R of the respective code blocks, the slope S calculated by the slope calculating means 1 13 and the given rate control parameter. Based on the reciprocal ⁇ 1 of the evening, it is determined whether or not to continue encoding for each code block, to derive an encoding end path, and output information of the encoding end and the encoding end path.
  • an image signal from an image input device such as an image scanner or a digital camera or a network or a storage medium is input to the wavelet conversion means 101.
  • the wavelet converting means 101 performs one-dimensional wavelet conversion on the input image signal two-dimensionally in both the vertical and horizontal directions, and divides the image signal into sub-bands. Generates wavelet transform coefficients for the band.
  • the one-dimensional wavelet transform is realized by filter puncturing of a low-pass filter and a high-pass filter.
  • Fig. 6 is a diagram showing subbands when the wavelet transform means 101 performs wavelet transform up to decomposition level 2, and shows an example in which two-dimensional wavelet transform is performed twice recursively. ing.
  • the first number indicates the decomposition level
  • the following two letters L or ⁇ indicate the type of horizontal and vertical filters.
  • L represents the result of low-pass filtering
  • represents the result of high-pass filtering.
  • wavelet transform “recursively” twice means that first, when the first wavelet transform generates subbands 1 LL, 1 HL, 1 LH, 1 ⁇ ⁇ , A second wavelet transform is performed on the 1 LL to generate sub-bands 2 LL, 2 HL, 2 L ⁇ , 2 ⁇ ⁇ ⁇ . I taste.
  • the quantization means 102 quantizes the wavelet transform coefficients generated by the wavelet transform means 101 according to the quantization step size set for each subband.
  • the entropy coding means 103 divides the wavelet transform coefficients in each subband into fixed-size rectangular areas called code blocks, and then converts each code block composed of multi-valued data into a binary value. Convert to bit plane. Usually, the size of this code block is set to a size such as 64 ⁇ 64, 32 ⁇ 32, or the like.
  • FIG. 7 is a diagram illustrating a bit plane.
  • FIG. 7 (a) shows an example of a 4 ⁇ 4 code block.
  • the data in the code block shown in Fig. 7 (a) is converted into a 1-bit signal representing positive and negative and the representation of the absolute value.
  • Fig. 7 (b) shows the data arranged in units of rows.
  • Fig. 7 (c) is a collection of bits with the same pit number from Fig. 7 (b).
  • the 0th bit when the least significant bit (LSB: Least Significant Bit) is the 0th bit and the most significant bit (MSB: Most Significant Bit) is the 3rd bit, the 0th bit
  • the data collected at bit 0 is the 0-bit plane
  • the data collected at bit 1 is the first bit plane
  • the data collected at bit 2 is the second bit plane
  • the data collected at bit 3 is the third. It is a bit plane.
  • a sign bit plane is created as a group of bits representing positive and negative.
  • the entropy encoding means 103 converts each bit in the bit plane into three encoding paths, that is, a significant propagation decoding path (Significantan encoding path), according to the context. It is divided into ce Propagation Decoding Pass, Magnitude Refinement Pass, and Cleanup Pass.
  • the entropy coding means 103 performs context modeling for entropy coding by arithmetic coding for each coding pass. However, for bit planes that are all 0 from the MSB plane, context modeling and coding are not performed, and only the number of all 0 bit planes is written in the header. Then, for the bit plane in which 1 first appears, all the bits are classified into the clean-up path, while the other bit planes are classified into the three types of coding paths as described above.
  • FIG. 8 is a diagram for explaining the decomposition of bit planes into encoding passes, and shows an example in which the number of bit planes of a code block is 6, and the number of valid bit planes in which 1 appears is 4.
  • the entropy encoding means 103 When the context modeling is completed, the entropy encoding means 103 performs entropy encoding using arithmetic codes, and stores the entropy-encoded code data in the code memory 104.
  • the distortion calculating means 111 of the rate control information extracting means 105 is provided in each code block from the entropy coding means 103.
  • the distortion difference AD of the encoding distortion D in the encoding pass and the immediately preceding encoding pass is calculated.
  • the coding distortion D indicates how much the mean square error of the reproduced image has been reduced when a code up to a certain coding pass is sent, compared to when no code data is transmitted. Strictly speaking, it is the amount of reduction in coding distortion. Therefore, the coding distortion D is When the distortion difference is accumulated up to, it becomes equal to the mean square error.
  • the code amount calculating means 112 of the rate control information extracting means 105 executes a coding pass every time coding of a certain path is completed. Count the number of output bytes AR of the code amount R of.
  • the slope calculating means 113 divides the distortion difference ⁇ D calculated by the distortion calculating means 111 by the number of output bytes AR in the current coding path counted by the code amount calculating means 112. Thus, the slope S of the RD curve in the current coding path is calculated.
  • the encoding end path deriving means 114 is a total signal amount R sum indicating the sum of the code amounts R of the respective code blocks, the slope S calculated by the slope calculating means 113, and the given rate. From the reciprocal ⁇ 1 of the control parameter, it is determined whether or not to continue the encoding in the code block to a further encoding pass, and outputs the determination result to the entropy encoding means 103. If continuing, the entropy coding means 103 codes the next coding pass, the distortion calculating means 111 calculates the distortion difference of the coding distortion D in the coding path, and the code amount calculating means.
  • the deriving means 114 calculates the total signal amount R sum of the entire screen indicating the sum of the code amounts R of the respective code blocks, the slope S calculated by the slope calculating means 113, and the given rate control parameter. From the reciprocal ⁇ 1 , it is determined again whether or not to continue the encoding in the code block to a further encoding pass. If the encoding is not to be continued, information on the end of the encoding is output to the entropy encoding means 103, and an encoding end path indicating the end of the encoding is output to the code data extracting means 106.
  • the entropy coding means 103 receives the information of the coding end from the coding end path deriving means 114 and receives the information of the subsequent coding block. Do not encode the encoding pass.
  • the code data extraction means 106 reads the code data from the code memory 104 up to the coding pass determined by the coding end pass in each code block, and uses the number of coding passes in each code block as additional information. After the addition, they are arranged in the specified order, and after adding predetermined header information, are output as a code stream.
  • a plurality of candidates for the rate control parameter ⁇ are prepared in advance, and coding up to a coding path satisfying a certain rate control parameter ⁇ is performed for all code blocks. At this time, it is determined whether or not the total code amount R sum of all code blocks has reached the target code amount Rmax, and if so, the coding is terminated.
  • the candidate of the control parameter ⁇ is set, and the coding is executed again until all the code blocks satisfy the rate control parameter ⁇ . In this way, the process of setting the rate control parameter ⁇ and performing encoding is performed until the total code amount R sum reaches the target code amount Rmax.
  • Whether or not a certain rate control parameter ⁇ is satisfied is determined by calculating the slope S of the RD curve at the end of each coding pass and determining whether the slope S has become less than the reciprocal ⁇ of the rate control parameter. .
  • FIG. 9 is a flowchart showing a flow of processing of the image encoding device according to Embodiment 1 of the present invention.
  • the candidate ⁇ (t) for the rate control parameter is set as follows.
  • ⁇ (t) ⁇ (0), ⁇ (1), ⁇ (2), ⁇ (tma ⁇ ) ⁇ where the value of the candidate ⁇ (t) for each rate control parameter monotonically increases Where ⁇ (t) is smaller than ⁇ (t + 1). That is, the value of the reciprocal ⁇ (t) 1 of the candidate ⁇ (t) for each rate control parameter is monotonically decreasing. It is set to be.
  • a variable k (i) is a variable for storing an encoding path for each code block, and an index t of the rate control parameter ⁇ .
  • the code block index i and the total code amount count R sum are variables common to all code blocks.
  • step ST102 the encoding end path deriving means 114 determines whether S (i, k (i)) ⁇ ⁇ (t) -1 .
  • This step ST102 is a process for determining whether or not a new coding pass needs to be coded when the candidate ⁇ (t) for the rate control parameter is updated. Be sure to set S (i, -1) to a sufficiently large value so that S (i, k (i)) ⁇ ⁇ (t) — 1 .
  • step ST103 the entropy coding means 103 increments the variable k (i) for storing the coding pass and prepares for coding of the first coding pass.
  • step ST104 the entropy coding means 103 codes the coding path k (i) to be coded in the code block i.
  • step ST105 for the current coded code block i, the distortion calculating means 1 1 1 1 calculates the coding distortion D between the current coding path k and the previous coding path k 1 1. Is calculated, and the code amount calculating means 1 12 calculates the number of output bytes ⁇ R (i, k (i)) of the code amount R in the current coding path. , And the slope calculating means 113 calculates the slope S of the RD curve in the current coding pass.
  • step ST106 the coding end path deriving means 114 adds the number of output bytes (i, k (i)) of the code amount R generated in the current coding path to a total code amount counter R sum. to add.
  • step ST107 the coding end path deriving means 114 determines whether or not the total code amount counter R sum has reached the target code amount R max, and the total code amount counter R sum is determined. If the target code amount R max has been reached, information on the end of coding is output to the entity-to-peak coding means 103 in each code block, and up to which coding pass is coded in each code block. An encoding pass k (i) indicating the above is output to the encoded data extracting means 106 as an encoding end pass.
  • step ST107 if the count R sum of the total code amount does not reach the target code amount Rmax, in step ST108, the encoding end path deriving means 1 14 sends the current code The magnitude of the slope S (i, k (i)). And ⁇ (t) in the conversion path is determined, and if the slope S (i, k (i)) is large, the entropy encoding means 103 is notified. Then, returning to step ST103, the entropy encoding means 103 further encodes the next encoding pass.
  • step ST109 If now (i, k (i)) re (t) less than _ l, notify the E down Toropi coding unit 1 0 3, entropy one coding unit 1 0 3 coded
  • the code data of the coding pass is temporarily stored in the code memory 104, and coding of this code block is interrupted.
  • step ST109 If the code block index i is not imax, in step ST110, the entropy coding means 103 increments the code block index i and shifts the processing to the coding of the next code block.
  • steps ST104 to ST108 are repeated, and coding is performed until the slope S (i, k (i)) becomes smaller than ⁇ (t) -1 .
  • step ST111 the index t of the rate control parameter ⁇ is incremented, and the rate control parameter ⁇ is Is set as the monotonically increasing candidate, and coding of all code blocks is performed again until the slope S (i, k (i)) becomes less than ⁇ (t) -1 .
  • FIG. 10 is a diagram showing the encoding order of the encoding pass.
  • the encoding path corresponding to each rate control parameter candidate (t) and those are processed.
  • the order will be described.
  • FIG. 10 (a) shows the slope S of the coding block indicated by each pass number of code block 0
  • FIG. 10 (b) shows the slope of the coding block indicated by each pass number of code block 1.
  • Fig. 10 (c) shows the race where the preset values are monotonically decreasing. The reciprocal ⁇ (t) -1 of the control parameter is shown.
  • the coding passes of the pass numbers 0 and 1 are coded until the gradient S becomes S (k) ⁇ (0) -1 (A in FIG. 10 (a)). At this point, if the total code amount R sum has not reached the target code amount R max, the processing proceeds to the next code block 1, and similarly, the slope S becomes S (k) ⁇ (0) — 1
  • the encoding pass of pass numbers 0 and 1 is encoded (B in FIG. 10 (b)).
  • the rate control parameter is set to the next value ⁇ (1), processing is performed from code block 0, and the code block is processed.
  • the rate control parameter is set to the next value ⁇ (2), and the coding of the pass number 3 of the code block 0 is performed.
  • the path is coded (D in FIG. 10 (a)), and then the coding paths of the pass numbers 2 and 3 of the code block 1 are coded (E in FIG. 10 (b)). The above processing is performed until the total code amount R sum reaches the target code amount R max.
  • the encoding is performed until the total code amount R sum reaches the target code amount Rmax, but the target encoding distortion is set instead of the target code amount Rmax and the screen is set. Coding can be performed until the sum of the coding distortion D of each code block in the whole reaches the target coding distortion.
  • the rate control information extracting means 105 calculates the distortion difference of the encoding distortion D when each encoding path and the immediately preceding encoding path are encoded, and the Number of output bytes of code amount R Calculate the slope S of the D curve, calculate the total code amount R sum indicating the sum of the code amounts R of each code block, or calculate the sum of the coding distortions D of each code block, and set the total code amount R sum to the target
  • the code amount Rma has been reached, or when the sum of the coding distortions D of each codec has reached the target coding distortion, it is determined that the coding is completed, and the total code amount Rsum is set to the target.
  • the code block is used until the slope S becomes smaller than the reciprocal ⁇ — 1 of the given rate control parameter.
  • the encoding of each encoding pass in the next code block is performed. End of encoding of each encoding pass in code block
  • Ichito control parameter lambda - other rate control parameter indicating the value of the monotonically decreasing from 1 reciprocal of Isseki lambda - 1 using, which marks Goka in which code blocks It is determined whether encoding is performed up to the pass.
  • the first embodiment since encoding is performed only for the encoding path that actually outputs the encoding result, compared to the conventional method in which all encoding paths are encoded, The effect is obtained that the amount of calculation required for entropy coding can be reduced. Also, since the coding is terminated when the total code amount reaches the target code amount, there is no need to perform a convergence operation to adjust the total code amount to the target code amount, and the calculation amount required for rate control Can be reduced.
  • the amount of generated code and the amount of distortion reduction when coding the path to be coded are predicted on both the coding side and the decoding side, and the prediction code It is also possible to determine which coding pass is to be encoded from the amount and the amount of prediction distortion reduction.
  • the additional information of the number of encoding passes is only a few percent at most, and this slight overhead can complete the encoding with an almost optimal encoding pass from the viewpoint of minimizing encoding distortion.
  • the coding end path calculated from the predicted value is not the optimal coding path.
  • the amount of calculation required for predicting the code amount and the coding distortion is generally much larger than the method of counting the actual generated code amount and the coding distortion as in the present invention. This leads to an increase in the amount of computation.
  • FIG. 4 of the first embodiment The block diagram showing the configuration of the image encoding device according to the second embodiment of the present invention is the same as FIG. 4 of the first embodiment.
  • FIG. 11 is a block diagram showing the internal configuration of the rate control information extracting means 105 of the image coding apparatus according to Embodiment 2 of the present invention.
  • the rate control information extracting means 105 is a distortion calculating means 121, a code amount calculating means 122, a rate distortion memory 123, a gradient calculating means 124, and a coding end path deriving means. Steps 1 2 5 are provided.
  • the distortion calculating means 122 is a distortion difference between the encoding path from the entropy encoding means 103 and the encoding distortion D in the immediately preceding encoding path for each encoding path. Calculate coding distortion D obtained by accumulating ⁇ D and distortion difference ⁇ D.
  • the code amount calculating means 122 calculates, for each coding pass from the entropy coding means 103, the number of output bytes of the code amount R in the coding path and the code amount R obtained by accumulating the number of output bytes. Count.
  • the rate distortion memory 123 stores, for each encoding pass, the encoding distortion D in which the distortion difference AD is accumulated, the code amount R in which the number of output bytes AR is accumulated, and the slope S of the RD curve.
  • the slope calculating means 124 obtains a distortion difference based on the encoding distortion D for each encoding path stored in the rate distortion memory 123, and obtains a distortion difference for each encoding path stored in the rate distortion memory 123.
  • the number of output bytes ⁇ R is obtained from the code amount R, and the slope S of the RD curve is calculated from the distortion difference ⁇ D and the number of output bytes AR.
  • the coding end path deriving means 1 25 generates a code in which the slope S of the RD curve with respect to the current coding pass in the coding pass before the current coding pass is smaller than the slope S in the coding pass before the current coding pass.
  • the distortion difference ⁇ D and the number of output bytes ⁇ R between the coding pass and the current coding pass as the slope S of the current coding pass and the entire screen showing the sum of the code amount R of each code block Based on the total code amount R sum, the corrected slope S of the current coding path, and the reciprocal ⁇ - 1 of the given rate control parameter, it is determined whether or not to continue coding for each code block.
  • To derive the encoding end path and output the encoding end information and the encoding end path.
  • the processing other than the rate control information extracting means 105 is the same as that of the first embodiment. Here, the processing of the rate control information extracting means 105 will be described.
  • the coding distortion D indicates how much the mean square error of the reproduced image has decreased when a code up to a certain bit plane is sent.Strictly speaking, it is the amount of reduction in coding distortion. . Therefore, when the distortion difference ⁇ D is accumulated up to the last bit plane, it becomes equal to the mean square error.
  • the coding distortion D obtained by accumulating these distortion differences ⁇ and the code amount R obtained by accumulating the number of output bytes AR are obtained by adding indexes such as subbands, code blocks, and coding paths to the rate distortion memory 1. Stored in 2 and 3.
  • the slope calculating means 124 calculates the distortion difference ⁇ D from the coding distortion D for each coding path stored in the rate distortion memory 123, and calculates the coding path stored in the rate distortion memory 123.
  • the number of output bytes ⁇ R is obtained from the code amount R for each and the distortion difference AD is divided by the number of output bytes AR to calculate the slope S of the RD curve in the current coding path, and the coding distortion D And stored in the position of the rate distortion memory 123 where it can be seen that the coding path has the same slope S as the coding amount R.
  • Fig. 12 is a diagram showing the data structure of the RD table stored in the rate-distortion memory 123, where the pass number of each coding pass and the coding Distortion D, code amount R, slope S, and flag are stored. The flag will be described later.
  • the encoding end path deriving means 1 25 determines that the slope S of the RD curve with respect to the current coding pass in the coding pass before the current coding pass is smaller than the slope S in the coding pass before the current coding pass. Distortion difference between coding path and current coding path
  • the entropy encoding means 103 encodes the next encoding pass, and the distortion calculating means 121 generates the distortion difference ⁇ D and the distortion difference AD in the encoding path in the code block in which the distortion difference AD is accumulated.
  • the coding distortion D is calculated, and the code amount calculating means 1 2 2 calculates the number of output bytes ⁇ R and the number of output bytes in the coding path.
  • the code amount R in the code block in which R is accumulated is counted, the slope calculation means 124 calculates the slope S of the RD curve in the coding pass, and the coding end path deriving means 125 Distortion between the coding path and the current coding path where the slope S of the RD curve between the coding path before the current coding path and the current coding path is smaller than the slope S of the coding path before the current coding path.
  • the ratio between the difference ⁇ D and the number of output bytes ⁇ R is corrected as the slope S of the current coding path, and the total code amount R sum of the entire screen showing the sum of the code amounts R of each code block and the current coding path Based on the corrected slope S and the reciprocal of the rate control parameter, it is determined again whether or not to continue encoding in the code block to a further encoding pass. If the encoding is not to be continued, information on the end of the encoding is output to the entropy encoding means 103, and the encoding end path is output to the code data extracting means 106.
  • the code data extraction means 106 reads the code data from the code memory 104 up to the coding pass determined by the coding end pass in each code block. Then, after adding the number of encoding passes included in each code block as additional information, they are arranged in the specified order, and after adding predetermined header information, are output as a code stream.
  • the details of the processing of the slope calculating means 124 and the encoding end path deriving means 125 will be described.
  • the slope is corrected so as to be smaller than the previous slope S.
  • FIG. 13 is a flowchart showing a flow of processing of the image coding apparatus according to Embodiment 2 of the present invention.
  • the rate control parameter overnight; the catch ⁇ (t) of I is set as follows.
  • ⁇ (t) ⁇ (0), ⁇ (1), ⁇ (2), ⁇ ⁇ (tma) ⁇ where the value of the candidate ⁇ (t) for each rate control parameter is monotonically increasing. ⁇ (t) ⁇ . (T + 1). That is, the value of the reciprocal ⁇ (t) -1 of the candidate (t) for each rate control parameter is set to decrease monotonically.
  • k (i) is a variable for storing an encoding path for each code block.
  • the index t of the rate control parameter ⁇ , the index i of the code block, and the counter R sum of the total code amount are variables common to all code blocks.
  • Step ST 1 2 all indicating whether the end of encoding paths deriving means 1 2 5 stores the slope S of the RD curve at each coding pass of each co Doburokku variables f 1 a g (i, Set all values of k) to 1, that is, valid.
  • step S T 1 the encoding end path deriving means 1 25
  • step ST124 the entropy coding means 103 increments the variable k (i) and prepares for coding of the first coding pass.
  • step ST125 the entropy coding means 103 codes the coding path k (i) to be coded in the code block i.
  • step ST126 the distortion calculating means 122 1 calculates the distortion difference ⁇ D (i, k (i)) and the distortion difference AD (i) of the coding distortion D in the current coding path in the current coding code block i.
  • the quantity calculation means 1 2 2 calculates the number of output bytes ⁇ R (i, k (i)) and the number of output bytes ⁇ R (i, k (i)) in the current coding pass in the current coding code block i. ) Is calculated, and the code amount R (i, k (i)) is stored in the rate distortion memory 123.
  • step ST127 the encoding end path deriving means 125
  • the index p of the closest valid coding pass before the coding pass is derived by detecting the coding pass with flag (i, k) of 1 in the RD table in FIG.
  • the effective coding pass is a coding pass before the slope S of the RD curve of the current coding pass is smaller than the slope S of the previous coding pass and monotonically decreases.
  • step ST128 the coding end path deriving means 125 calculates the slope S of the RD curve between the current coding path and the effective coding path of the index p by the following formula.
  • step ST 12 9 the coding end path deriving means 1 25 generates the slope S (i, k (i)) in the current coding pass and the slope S (i, ⁇ (i) in the previous effective coding pass. )). If the gradient S (i, k (i)) in the current encoding pass is larger than the gradient S (i, ⁇ (i)) in the previous effective encoding pass, the coding ends in step ST 130.
  • the path deriving unit 125 invalidates the previous valid encoding pass and sets the flag in FIG. 12 from 1 to 0. Then, the process returns to step ST127 to search for an earlier encoded effective encoding path until the gradient from the current encoding path becomes monotonically decreasing.
  • FIG. 14 is a diagram showing the correction of the slope S of the RD curve.
  • the horizontal axis indicates the code amount R (k)
  • the vertical axis indicates the coding distortion D (k)
  • 0 to 4 indicate the coding paths of pass numbers 0 to 4
  • S ( 1), S (2), S (3), and S (4) indicate the slopes of the encoding passes of pass numbers 1 to 4, respectively.
  • the code of pass number 4 All of the coding passes were set as valid coding passes, but the slope S (4) of the coding pass of pass number 4, which is the current coding pass, is the closest valid coding before the current coding pass.
  • the encoding path of pass number 3 was set to invalid and the slope of the current encoding path of pass number 4 was set. Correction is made so that the slope S (4) 'from the encoding pass of pass number 2 is obtained. If the slope S still does not monotonically decrease even after this correction, the coding path is invalidated until the slope S of the previous coding pass decreases monotonically.
  • step ST 12 9 in FIG. 13 if the slope S (i, k (i)) in the current coding pass is smaller than the slope S (i, p (i)) in the previous effective coding pass. If it is determined, in step ST 13 1, the encoding end path deriving means 1 25 adds the generated code amount R (i, k (i ))-Add R (i, k (i)-1) to calculate the total code amount R sum up to the current coding pass. In step ST 13 2, the encoding end path deriving means 1 25 determines whether or not the total code amount counter R sum reaches the target code amount Rmax, and determines the total code amount counter R sum.
  • each code block information on the end of coding is output to the entry-to-end coding means 103, and in each code block, An encoding pass k (i) indicating the end of encoding as to whether encoding has been performed up to is output to the encoded data extracting means 106 as an encoding end pass.
  • the encoding end path deriving means 1 25 in step ST 13 3 The slope S (i, k (i)) of the effective coding path in the coding pass and the reciprocal ⁇ (t) 1 of the rate control parameter are determined, and the slope S (i, k (i) ) Is large, the encoding end
  • the derivation means 125 informs the entropy coding means 103 and returns to step ST124, where the entropy coding means 103 further codes the next coding pass.
  • step ST133 if the gradient S (i, k (i)) force becomes smaller than ⁇ (t) 1 , the encoding end path deriving means 1 25 will be the entropy encoding means 1 0 3 Then, the entropy coding means 103 temporarily stores the coded data of the coded pass in the coded memory 104, and interrupts the coding of this code block.
  • step ST13 if the code block index i is not imaX, in step ST135, the entropy coding means 103 increments the code block index i, and Move on to code block encoding.
  • steps ST125 to ST133 are repeated until the slope S (i, k (i)) becomes less than the reciprocal ⁇ (t) 1 of the rate control parameter. Do.
  • the entropy encoder 103 receives the index t of the rate control parameter ⁇ . Is incremented, the rate control parameter ⁇ is set to the next candidate, and the encoding of all the code blocks is performed again.
  • the gradient S (i, k (i)) is the inverse of the rate control parameter ⁇ (t) 1 Perform until it becomes less than.
  • the rate control parameter candidate ⁇ (t) is updated, it becomes S (i, k (i)) less than ⁇ (t) 1 , that is, the reciprocal of the updated rate control parameter ⁇ ( t) 1 may be larger than the slope S (i, k (i)) in the already-encoded coding pass.
  • the reciprocal ⁇ (t) 1 of the updated rate control parameter in step ST123 is the slope S in the encoded encoding pass. (i, k (i)), the encoding process is skipped, and step ST is performed. Move to 1 3 3
  • encoding is performed until the total code amount R sum reaches the target code amount R ma, but a target encoding distortion is set instead of the target code amount R max, and Coding can be performed until the sum of the coding distortion D of each code block reaches the target coding distortion.
  • the rate control information extracting means 105 is arranged such that the slope S of the RD curve with respect to the current coding path in the coding path before the current coding path is the code before the current coding path.
  • the ratio of the distortion difference ⁇ D between the coding path and the current coding path that is smaller than the slope S in the coding path and the number of output bytes ⁇ R is corrected to the slope S of the current coding path, and each code is corrected.
  • Calculate the total code amount R sum indicating the total sum of the code amounts R of the blocks, or the total sum of the coding distortion D of each code block, and when the total code amount R sum reaches the target code amount R max, or each code.
  • the corrected slope S is the reciprocal of the given rate control parameter given 1 smaller until in than, in that to perform the coding of each coding pass in the code block, if less has decreased than the slope S Gale Ichito control parameter Isseki reciprocal lambda 1 that corrected, this code block
  • the value indicates a monotonically decreasing value from the reciprocal ⁇ 1 of the given rate control parameter.
  • the second embodiment since encoding is performed only for the encoding path that actually outputs the encoding result, compared to the conventional method in which all encoding paths are encoded, The amount of computation required for entropy coding The effect of being able to reduce is obtained. In addition, since the coding is terminated when the accumulated code amount reaches the target value, it is not necessary to perform convergence calculation to adjust the total code amount to the target code amount, and the amount of calculation required for rate control is reduced. The effect is obtained.
  • the slope S of the RD curve is calculated by division.
  • the calculation can be a heavy load. Therefore, in the third embodiment,
  • a block diagram showing the configuration of the image encoding device according to the third embodiment of the present invention is the same as FIG. 4 of the first embodiment.
  • FIG. 15 is a block diagram showing an internal configuration of the rate control information extracting means 105 of the image coding apparatus according to Embodiment 3 of the present invention.
  • the rate control information extracting means 105 is a distortion calculating means 131, a code amount calculating means 132, a rate distortion memory 133, a slope index value calculating means 134, and an encoding end path deriving means 135. It has.
  • the rate control information extracting means 105 generates a total code amount R sum indicating the sum of the code amounts R of the code blocks, a code amount R of each code block, a coding distortion D of each code block, and each value.
  • the distortion calculation means 13 1 calculates, for each coding pass from the entropy coding means 103, the distortion difference between the coding pass and the coding distortion D in the immediately preceding coding pass. Calculate the coding distortion D obtained by accumulating ⁇ D and the distortion difference ⁇ D.
  • the code amount calculation means 13 2 is a code which accumulates the number of output bytes ⁇ R of the code amount R in the coding path and the number of output bytes for each coding pass from the entropy coding means 103. Count the amount R.
  • the rate-distortion memory 13 stores, for each coding pass, a coding distortion D in which the distortion difference ⁇ D is accumulated, a code amount R in which the number of output bytes is accumulated, and a gradient index value F thereof.
  • the slope index value calculating means 13 4 calculates a slope index value F based on the coding distortion D, the code amount R and the rate control parameter ⁇ .
  • the encoding end path deriving means 1 3 determines whether or not to continue encoding for each code block, derives an encoding end path, and outputs encoding end information and an encoding end path.
  • the distortion calculating means 131 each time the encoding of a certain encoding pass in each code block is completed, encodes the code between the encoding pass and the previous encoding pass.
  • An encoding distortion D D + AD is calculated by accumulating the distortion difference ⁇ D and the distortion difference ⁇ D of the encoding distortion D.
  • the code amount calculation means 1 3 2 Each time the encoding of the encoding pass is completed, a code value RR + ⁇ R is calculated by accumulating the number of output bytes ⁇ R and the number of output bytes ⁇ R in the encoding pass. These coding distortion D and code amount R are stored in the rate distortion memory 1333 after indexes such as subbands, code blocks, and coding paths are given.
  • the slope index value calculating means 13 4 calculates the slope index value F based on the coding distortion D, the code amount R and the rate control parameter ⁇ , and calculates the same code as the coding distortion D and the code amount R. It is stored at the position of the rate distortion memory 133 that can be seen as the slope index value of the conversion path.
  • FIG. 16 is a diagram showing the data structure of the RD table stored in the late distortion memory 133.
  • the path number and the encoding distortion are shown in correspondence with the subbands and the codebook.
  • D, code amount R, and slope index value F are stored.
  • the encoding end path deriving means 1 3 based on the total code amount R sum of the entire screen indicating the total code amount R of each code block and the slope index value F, further encodes the code block by an additional encoding pass. It determines whether or not to continue, and outputs the result of the determination to the entry-point coding means 103. If continuing, the entropy coding means 103 codes the next coding pass, and the distortion calculating means 13 1 calculates the distortion difference of coding distortion D between the coding pass and the previous coding pass. The coding distortion D obtained by accumulating ⁇ D and the distortion difference ⁇ D is calculated, and the code amount calculating means 13 2 2 outputs the number of output bytes AR and the number of output bytes AR in the coding path.
  • the encoding end path deriving means 135 determines again whether or not to continue the encoding to a further encoding pass. If the encoding is not to be continued, information on the end of the encoding is output to the entry-point encoding means 103, and the encoding end path is output to the code data extracting means 106.
  • the code data extraction means 106 completes the encoding of each code block. The code data up to the coding pass determined by the pass is read from the code memory 104, and the number of coding passes included in each code block is added as additional information. It is output as a code stream after adding the header information.
  • FIG. 17 is a flowchart showing a processing flow of the image encoding device according to the third embodiment of the present invention.
  • the candidate rate control parameter ⁇ (t) is set as follows.
  • ⁇ (t) ⁇ (0), ⁇ (1), ⁇ (2), ⁇ ⁇ (tma ⁇ ) ⁇ where the value of the candidate ⁇ (t) for each rate control parameter increases monotonically. It is set so that E (t) ⁇ (t + 1).
  • variable k (i) is a variable for storing an encoding path for each code block
  • the rate control parameter ⁇ The index t, the index i of the code block, and the counter R sum of the total code amount are variables common to all code blocks.
  • step ST142 the entropy coding means 103 codes the coding path in the set code block, and 1 3 1 calculates the coding distortion D obtained by accumulating the distortion difference ⁇ D and the distortion difference ⁇ D of the coding distortion D between the coding path and the previous coding path, and the code amount calculation means 13 2
  • the number of output bytes in the conversion path and the code amount R obtained by accumulating the number of output bytes are calculated, and the slope index value calculation means 134 calculates the code from the rate control parameter candidates (t) at that time.
  • the slope index value F for the encoded coding path is calculated and stored in the rate distortion memory 13.
  • step ST143 the encoding end path deriving means 135 derives an encoding path KL in which the slope index value F is maximum in the code block.
  • step ST145 the entropy encoding means 103 increments k (i) to prepare for encoding the first encoding pass.
  • step ST146 the entropy coding means 103 codes the coding path k (i) to be coded in the code block i
  • step ST147 the distortion calculating means 13 1 is the coding distortion D (i, k (i)) obtained by accumulating the distortion difference AD (i, k (i)) from the distortion difference ⁇ D (i, k (i)) of the coding distortion D between the current coding pass and the previous coding pass. i, k (i))), and stores the coding distortion D (i, k (i)) in the rate distortion memory 133.
  • the code amount R (i, k (i)) obtained by accumulating the number of output bytes (i, k (i)) is calculated, and the rate distortion memory 1 3 3 To be stored.
  • step ST 1 48 the slope index value calculation means 13 4
  • the slope index value F (i, k) in the quantization path is calculated by the following equation and stored in the rate distortion memory 133.
  • step ST 1 49 the encoding end path deriving means 13 5 Referring to over and the distorted memory 1 3 3, in the encoded coding pass of the current code block, gradient index value F (i, k) to derive the coding pass k t which maximizes.
  • step ST 150 the encoding end path deriving means 13 5 determines whether the encoding path in which the inclination index value F (i, k) is the maximum is the current encoding path k (i). If it is determined that the encoding path k [_ is the current encoding path k (i), the process returns to step ST145 to encode the next encoding path.
  • step ST 15 1 the encoding end path deriving means 1 35 determines that the encoding path immediately before the current encoding path is the slope index value F ( i, k) is determined to be the coding path k L that gives the maximum value, and the coding path immediately before the code block i at this time is derived as the coding end path, and the coding path k is determined as The encoding end path is stored in the variable k (i), and encoding in this code block is interrupted.
  • step ST 15 2 the encoding end path deriving means 13 5 adds a total code amount counter R sum to a generated code amount R (i, k (i)) ⁇ R (i , k (i) -l) to calculate the total code amount R sum up to the current coding pass.
  • step ST153 the coding end path deriving means 1353 determines whether the total code amount R sum has reached the target code amount Rmax, and the total code amount R sum is equal to the target code amount R. If ma X has been reached, it is determined that the encoding has ended at this point, and information about the end of encoding is output to the entropy encoding means 103.
  • An encoding pass k (i) which is information on whether encoding has been performed up to the encoding pass, is output to the encoded data extracting means 106 as an encoding end pass.
  • the entropy coding means 103 will execute all code blocks. Similarly, in the next code block, the encoding is performed until the encoding path that gives the maximum gradient index value F is not the last encoding path that has been encoded, and in step ST156, the entropy encoding means 1 0 3 increments the index t of the rate control parameter ⁇ , sets the rate control parameter to the next candidate, and again inclines the encoding of all code blocks to maximize the index value F This is performed until the coding pass is no longer the current coding pass.
  • coding is performed until the total code amount R sum reaches the target code amount R max.
  • a target coding distortion is set and the entire screen is set. It is also possible to perform encoding until the sum of the coding distortions D of each code block at reaches the target coding distortion.
  • the rate control information extracting means 105 of the third embodiment calculates the sum of the code amount R of the code block and the product of the coding distortion D of the code block and the rate control parameter ⁇ . Calculates the slope index value F of each coding pass, and derives the coding path in which the slope index value F is maximum in a certain code block. , Until the encoding path in which the derived slope index value F becomes the maximum is no longer the encoding path currently being encoded, the encoding of the encoding block is performed, and the total code amount R sum of each code block is calculated.
  • the third embodiment since encoding is performed only for the encoding path that actually outputs the encoding result, compared to the conventional method in which all encoding paths are encoded, An effect is obtained that the amount of calculation required for entropy coding can be reduced. Also, since the coding is terminated when the total code amount reaches the target value, there is no need to perform a convergence operation to adjust the total code amount to the target code amount, and the calculation amount required for rate control is reduced. This has the effect of reducing power consumption.
  • the third embodiment instead of using the division to calculate the slope S, instead of using the slope index value F calculated by multiplication, the first embodiment and the second embodiment are used. As compared with the above, the effect that the operation load of division in the rate control can be further reduced can be obtained.
  • the image coding apparatus is suitable for reducing the amount of calculation required for entropy coding and rate control.

Abstract

ウェーブレット変換係数をコードブロックに分割し、各コードブロックをビットプレーンに変換し、ビットプレーンを符号化パスに分割し、符号化パス毎に符号化するエントロピー符号化手段103と、符号化された符号化パス毎の符号データを格納する符号メモリ104と、各コードブロックの符号量の総和を示す総符号量、各符号化パスのRD曲線の傾き、及び与えられた複数のレート制御パラメータの逆数に基づき、どのコードブロックにおけるどの符号化パスまでエントロピー符号化手段103が符号化するかを判断し、符号化終了となる符号化終了パスを出力するレート制御情報抽出手段105と、符号化終了パスにより定まる符号化パスまでの符号データを符号メモリ104から読み出し、各コードブロックにおける符号化パス数を付加して符号ストリームとして出力する符号データ抽出手段106とを備えた画像符号化装置。

Description

明 細 書 画像符号化装置 技術分野
この発明はエントロピー符号化を行う画像符号化装置に関するもので ある。 背景技術
現在、 ィン夕ーネッ トを中心に静止画像符号化アルゴリズム J P E G
( J 0 i n t P h o t o g r a p h i c E e r t s G r o u
P ) が広 < 及しているが、 一方で次世代の符号化方式として、 さらな る性能改 機能付加の要求を背景として、 1 9 9 7年より新たに J P
E G 2 0 0 0プロジェク トが I S Oと I TUの合同機関によりスタート している また、 2 0 0 0年 1 2月には、 同 J P E G 2 0 0 0アルゴリ ズムの基本方式を定めるパート 1 について、 その主要な技術内容が確定 されている 以下に、 勧告書 ( I S O/ I TU 1 5 4 4 4 - 1 : 2 0
0 0 ) に つて J P E G 2 0 0 0符号化アルゴリズムの基本方式の概略 を説明する
まず、 入力される画像信号はウェーブレッ ト変換部で 2次元のゥエー ブレツ ト変換が施されて複数のサブパンドに帯域分割され、 各サブパン ドにおけるヴエーブレツ ト変換係数が生成される。 ここで、 2次元のゥ エーブレヅ 変換は 1次元のウェーブレツ ト変換の組み合わせとして実 現される つまり、 垂直方向の一次元ウエーブレツ ト変換を列毎に順次 行う処理と水平方向の一次元ウエーブレツ ト変換をライン毎に順次行う 処理である。 第 1図は従来技術におけるウェーブレツ ト変換を示す図である。 1次 元のウェーブレッ ト変換は、 第 1図 ( a) に示すように、 所定の特性を 持つローパスフィル夕とハイパスフィル夕及びダウンサンブラにより実 現されるものである。 2次元のウェーブレツ ト変換により帯域分割され た各サブバンドは、 低域成分を L、 高域成分を Hとし、 水平方向の変換 を 1文字目で表現し、 垂直副走査方向の変換を 2文字目で表現すること で、 第 1図 (b) に示すように L L、 HL、 LH、 HHと表現される。 ここで、 水平、 垂直方向の低域成分 (L L成分) は再帰的にウェーブレ ッ ト変換が施される。 再帰的に施される各ウエーブレツ ト変換の回数を 分解レベルと称し、 第 1図 (b) 中の L L、 H L、 LH、 HHの前に記 載された数字がこれにあたる。 即ち、 ウェーブレッ ト変換の分解回数 2 の場合には、 最低解像度成分の分解レベルは 2 となり、 反対に最高解像 度成分の HL、 L H、 HHの分解レベルは 1になる。
次に各サブバンドにおけるウェーブレッ ト変換係数は、 サブバンド毎 に設定された量子化ステツプサイズにより量子化される。
次に各サブバンドの量子化後のウエーブレツ ト変換係数をコードブロ ックと呼ばれる固定サイズの領域に分割した後、 多値デ一夕からなるコ —ドブロックを 2値のビッ トプレーン表現に変換し、 各ビッ トプレーン を 3通りの符号化パス S i g n i f i c a n t P r o p a g a t i o n D e c o d i n g P a s s、 M a g n i t u d e R e f i n e m e n t P a s s、 C l e a n u p P a s s に分害 ijする。
3つの符号化パスから出力される 2値信号は、 それぞれの符号化パス 毎にコンテクストモデリングが行われェント口ピ一符号化が行われる。
また、 エントロピー符号化処理と並行して、 各コードブロックにおい て符号化パス毎の符号量と符号化歪を計算する。
最後に、 ラグランジェの乗数法を用いて画質劣化 (符号化歪) を最小 にしながら、 目標とする符号サイズ以下に符号量を調整するレー卜制御 が行われる。 レー卜制御の方法は標準化されているわけではなく、 アブ リケ一シヨンに応じて任意の方法を使うことができるが、 以下に勧告書 ( I S OZ I TU 1 5 444 - 1 : 2 0 0 0 ) J . 1 4. 3に参考情 報として記載されているレート制御部のメカニズムについて概略を説明 する。
この方法では、 各コードブロック i における切り捨てポイントを n i とし、 各切り捨てポイントまでの符号量を R ( i , n i ) とし、 符号化 歪を D ( i , n i ) としたとき、 ラグランジェの乗数法を使い、 次の式 を最大にする切り捨てポイント n i によって生ずる画面全体での総符号 量 R s umが目標符号量 Rm a xの範囲内であることを満足するまでレ ート制御パラメ一夕 λを調整する。
∑ ( R ( i , n i ) - A D ( i , n i ) )
ここで、 符号化歪 Dとは、 ある符号化パスまでの符号を送ったときに 再生画像の平均二乗誤差が符号デ一夕を伝送しないときと比較してどれ だけ減少したかを示すもので、 厳密に言えば符号化歪の減少量というこ とになる。 従って、 符号化前は符号化歪 Dは 0、 最終ビッ トプレーンま で符号化すると符号化歪 Dは平均二乗誤差に等しくなる。
第 2図は従来技術における最適な符号化パスの導出を説明する図であ る。 上記式を最大にする切り捨てポイントを見つけることは、 第 2図に 示すように、 各コードブロックの符号量 Rと符号化歪 Dをグラフに表し たとき (以下、 R D曲線と称する) 、 その接線の傾きがレート制御パラ メ一夕 の逆数である λ—1 となる切り捨てポイントを見つけることと等 価である。 第 2図では、 2つのコードブロック c l, c 2において、 接 線の傾きが λ—1 となる切り捨てポイントが n c l、 n c 2で、 その切り 捨てポイントまでの符号量が R ( c 1 , n c 1 ) , R ( c 2 , n c 2 ) となることを表している。 このような符号量 Rを全てのコードブロック に対して加算し Rm a xと比較する。
これをコードブロック毎に見た場合、 (R ( i , n i ) - A D ( i , n i ) ) を最大化する切り捨てポイント n i を次のように見つける必要 がある。 ここで kは切り捨てボイン h n i を表す変数である。
S e t n i = 0
F o r k = 1
S e t Δ R ( i k) = R ( i k ) - R ( i , n i ) a n d
Δ D ( i , k) -D ( i k ) — D ( i n i )
I f ( Δ D ( i , k ) / Δ R ( i k) ) > λ -1
t h e n s e t n i = k
ところが、 このァルゴリズムでは 多数のレ一卜制御パラメ一タ λに 対して上記処理を実行しなければ切り捨てボイン卜 n i を求める とが できない。 そこで R D曲線の傾き S ( i , k) = Δ D ( i , k ) /Δ
R ( i , k ) が kについて単調減少になるように予め補正してお < 。 具 体的には次のように処理を行う。 こ で は切り捨てボイン卜 n i を 表す変数である
( 1 ) s e t N i = { n } ( i • e . t h e s e t o f a 1
1 t r u n c a t i o n p o i n t )
( 2 ) S e t P = 0
( 3 ) F o r k = 1 , 2 , 3 4 • • · , k m a x
I f k b e l o n g s t o N i
S e t Δ R ( i , k ) = R ( i , k ) 一 R ( i P )
a n d Δ D ( i , k ) =D ( i , k ) — D ( i P )
S e t S ( i , k) = Δ D ( i , k ) /△ R ( i k)
I f P 0 a n d S ( i k) > S ( i p ) , t h e n r e m o v e p f r o m N i , a n d g o t o s t e ( 2 )
O t h e r w i s e , s e t p = k
この処理により、 与えられたレート制御パラメータ λに対する切り捨 てポイントの最適化は、 S ( i , k ) > λ 1 を満たす N i における最大 の kとすれば良い。
第 3図は従来技術における R D曲線の傾きの単調現象補正処理を示す フローチャートである。 上記のステップ ( 1 ) 〜 ( 3 ) の単調現象補正 処理を第 3図に示すフローチャートにまとめている。 なお、 第 3図にお いてコードブロックを示す i を割愛している。 第 3図のステップ S T 1 3は上記ステップ ( 3 ) の 「 I f k b e l o n g s t o N i 」 に対応し、 第 3図のステップ S T 1 6は上記ステップ ( 3 ) の 「 r e m 0 V e p f r o m n i」 つまり、 切り捨てポイントの候補 N i の 中から pを取り除く作業に対応している。 このように、 切り捨てポイン トについて、 第 3図では有効、 無効を表すフラグ ( f 1 a g ) を用いて 同様の処理を実現している。
全てのコードプロックでこれらの情報の導出が完了したら、 目標符号 量 Rm a xとなるような符号デ一タを作成する。 具体的には、 あるレー ト制御パラメータ λに対する画面全体の総符号量 R s umに対して、 R s um≤ Rm a xを満たす最大の総符号量 R s umを与えるレート制御 パラメータ; を見つけることになる。 ここで、 あるレート制御パラメ一 夕 λに対する総符号量 R s u mは各コ一ドブロックにおいて切り捨てポ イントを一意に求め、 その切り捨てポイントまでの符号データの総和を 算出して初めてわかる。 そこで、 R s u m≤ Rm a Xを満たす最大の総 符号量 R s umを与えるレート制御パラメータ λを見つけるには、 通常 は、 レート制御パラメータ λの複数の候補に対する総符号量 R s umを 算出して、 所望の値に近い総符号量 R s umを与えるレート制御パラメ 一夕えを収束演算により算出する。 レート制御パラメ一夕 λが求まった らそのレート制御パラメ一夕 λに対応する切り捨てボイントまでの符号 データを全てのコードブロックから集めて、 さらに各コードブロックに おける符号化パス数を付加情報として付け加え、 最終的な符号デ一夕を 構成する。 こうして、 目標符号量 Rm a Xのもとで符号化歪 Dを最小と する符号データを生成することができる。
以上のような J P E G 2 0 0 0国際標準規格は I S Oや I TU— T等 の標準化機関を通して入手することができる。 また、 J P E G 2 0 0 0 の最新情報については、 h t t p - ZZwww. j ρ e g . o r gを参 照することにより入手することができる。
従来の画像符号化装置は以上のように構成されているので、 上記のレ ート制御方法では、 切り捨てポイントを見つけるにあたり、 実際に符号 として出力しない切り捨てポイント以降の符号化パス、 通常は全ての符 号化パスまで、 予めエントロピー符号化しておかなければならず、 J P E G 2 0 0 0のェント口ピー符号化には、 1 ビッ ト単位に算術演算が必 要な算術符号化が用いられており、 算術符号化の演算量が全体の処理量 に与えるインパク トは非常に大きなものとなっている。 従って、 切り捨 てポイント以降の符号化パスをエントロピー符号化することにより、 余 計な処理量が増加し符号化に要する演算量が増加してしまうと共に処理 時間の遅延をもたらすという課題があった。
また、 あるレ一ト制御パラメータ λに対する総符号量 R s u mは、 各 コードブロックにおいて切り捨てポイントを一意に求め、 その切り捨て ポイントまでの符号データの総和を算出して初めて明らかになる。 その ため、 R s u m≤ Rm a xを満たす最大の総符号量 R s umを与えるレ ート制御パラメータ λを算出するにあたり、 レート制御パラメータ λの 複数の候補に対する総符号量 R s u mを算出して、 所望の値に近い総符 号量 R s u mを与えるレート制御パラメータ λを収束演算により何度も 探索する必要があるため、 レート制御に要する演算量増大に繋がるとい う課題があつた。
この発明は上記のような課題を解決するためになされたもので、 ェン ト口ピー符号化及びレート制御に要する演算量を低減することができる 画像符号化装置を得ることを目的とする。 発明の開示
この発明に係る画像符号化装置は、 ウェーブレツ ト変換により帯域分 割された各サブバンドにおける量子化されたウェーブレツ ト変換係数を コードブロックに分割し、 各コードブロックをビッ トプレーンに変換し 、 ビッ トプレーンを符号化パスに分割し、 符号化パス毎に符号化して符 号データを出力するェントロピー符号化手段と、 符号化された符号化パ ス毎の符号データを格納する符号メモリと、 各コードブロックの符号量 の総和を示す総符号量又は各コードブロックの符号化歪の総和、 各符号 化パスとそれぞれ前の符号化パスを符号化した際の符号化歪の歪差分と 各符号化パスの符号量の出力バイ ト数により算出した R D曲線の傾き、 及び各値が単調減少となっている与えられた複数のレート制御パラメ一 夕の逆数に基づき、 どのコードブロックにおけるどの符号化パスまで上 記ェントロピー符号化手段が符号化するかを判断し、 符号化終了となる 符号化終了パスを出力するレート制御情報抽出手段と、 上記レート制御 情報抽出手段より出力された符号化終了パスにより定まる符号化パスま での符号データを上記符号メモリから読み出し、 各コードブロックにお ける符号化パス数を付加して符号ストリームとして出力する符号データ 抽出手段とを備えたものである。 この発明により、 ェントロピー符号化及びレ一ト制御に要する演算 を低減することができるという効果がある。 図面の簡単な説明
第 1図は従来技術におけるウェーブレツ ト変換を示す図である。
第 2図は従来技術における最適な符号化パスの導出を説明する図であ る。
第 3図は従来技術における R D曲線の傾きの単調現象補正処理を示す フローチャー卜である。
第 4図はこの発明の実施の形態 1による画像符号化装置の構成を示す ブロック図である。
第 5図はこの発明の実施の形態 1による画像符号化装置のレート制御 情報抽出手段の内部構成を示すブロック図である。
第 6図はこの発明の実施の形態 1による画像符号化装置のウェーブレ ッ ト変換手段が分解レベル 2までウエーブレツ ト変換をしたときのサブ バンドを示す図である。
第 7図はこの発明の実施の形態 1による画像符号化装置におけるビッ トプレーンを説明する図である。
第 8図はこの発明の実施の形態 1による画像符号化装置におけるビッ トプレーンから符号化パスへの分解を説明する図である。
第 9図はこの発明の実施の形態 1による画像符号化装置の処理の流れ を示すフローチヤ一トである。
第 1 0図はこの発明の実施の形態 1による画像符号化装置における符 号化パスの符号化順序を示す図である。
第 1 1図はこの発明の実施の形態 2による画像符号化装置のレ一ト制 御情報抽出手段の内部構成を示すブロック図である。 第 1 2図はこの発明の実施の形態 2による画像符号化装置のレート歪 メモリに格納されている R Dテーブルのデ一夕構造を示す図である。 第 1 3図はこの発明の実施の形態 2による画像符号化装置の処理の流 れを示すフローチヤ一トである。
第 1 4図はこの発明の実施の形態 2による画像符号化装置における R D曲線の傾きの補正を示す図である。
第 1 5図はこの発明の実施の形態 3による画像符号化装置のレー卜制 御情報抽出手段の内部構成を示すブロック図である。
第 1 6図はこの発明の実施の形態 3による画像符号化装置のレート歪 メモリに格納されている R Dテーブルのデータ構造を示す図である。 第 1 7図はこの発明の実施の形態 3による画像符号化装置の処理の流 れを示すフローチヤ一トである。 発明を実施するための最良の形態
以下、 この発明をより詳細に説明するために、 この発明を実施するた めの最良の形態について、 添付の図面に従って説明する。
実施の形態 1 .
第 4図はこの発明の実施の形態 1による画像符号化装置の構成を示す ブロック図である。 この画像符号化装置はウエーブレツ ト変換手段 1 0 1、 量子化手段 1 0 2、 ェントロピー符号化手段 1 0 3、 符号メモリ 1 0 4、 レ一卜制御情報抽出手段 1 0 5及び符号データ抽出手段 1 0 6を 備えている。
第 4図において、 ウエーブレツ ト変換手段 1 0 1は入力画像信号に対 して 2次元のウエーブレツ ト変換を再帰的に行いサブバンドに帯域分割 し、 各サブバンドにおけるウエーブレッ ト変換係数を生成する。 量子化 手段 1 0 2はウェーブレツ ト変換手段 1 0 1によって生成されたゥェ一 ブレツ ト変換係数を予め設定された量子化ステツプサイズで量子化処理 する。 ェントロピー符号化手段 1 0 3は量子化されたウエーブレツ ト変 換係数をコードブロックに分割し、 各コードブロックをビッ トプレーン に変換し、 ビッ トプレーンを符号化パスに分割し、 符号化パス毎にェン ト口ピー符号化して符号デ一夕を出力する。 符号メモリ 1 0 4はェント 口ピー符号化された符号化パス毎の符号データを一時的に格納する。 レ 一卜制御情報抽出手段 1 0 5は各コードブロックの符号量 Rの総和を示 す総符号量、 各符号化パスとそれぞれ前の符号化パスを符号化した際の 符号化歪 Dの歪差分 A Dと各符号化パスの符号量 Rの出力バイ ト数 Δ R により算出した R D曲線の傾き S、 及び各値が単調減少となっている与 えられた複数のレート制御パラメ一夕の逆数 -1 に基づき、 どのコード ブロックにおけるどの符号化パスまでエントロピー符号化手段 1 0 3が 符号化するかを判断し、 符号化終了となる符号化終了パスを出力する。 符号データ抽出手段 1 0 6はレート制御情報抽出手段 1 0 5より出力さ れた符号化終了パスにより定まる符号化パスまでの符号データを符号メ モリ 1 0 4から読み出し、 各コードブロックにおける符号化パス数を付 加して符号ス トリームとして出力する。
第 5図はレート制御情報抽出手段 1 0 5の内部構成を示すブロック図 である。 このレート制御情報抽出手段 1 0 5は歪計算手段 1 1 1、 符号 量計算手段 1 1 2、 傾き計算手段 1 1 3及び符号化終了パス導出手段 1 1 4を備えている。
第 5図において、 歪計算手段 1 1 1はエントロピ一符号化手段 1 0 3 からの符号化パス毎にその符号化パスと一つ前の符号化パスにおける符 号化歪 Dの歪差分 を計算する。 符号量計算手段 1 1 2はエントロピ 一符号化手段 1 0 3からの符号化パス毎にその符号化パスでの符号量 R の出力バイ ト数△ Rをカウントする。 傾き計算手段 1 1 3は歪計算手段 1 1 1 により計算された歪差分 Δ Dと符号量計算手段 1 1 2によりカウ ントされた出力バイ 卜数 から R D曲線の傾き Sを計算する。 符号化 終了パス導出手段 1 1 4は、 各コードブロックの符号量 Rの総和を示す 画面全体の総号量 R s u mと傾き計算手段 1 1 3により計算された傾き Sと与えられたレート制御パラメ一夕の逆数 λ 1 に基づき、 各コードブ ロック毎に符号化を継続するか否かを判断して符号化終了パスを導出し 、 符号化終了の情報と符号化終了パスを出力する。
次に動作について説明する。
まず、 第 4図において、 例えばイメージスキャナやデジタルカメラ、 又はネッ トワークや記憶媒体等の画像入力装置 (図示せず) からの画像 信号がウェーブレツ ト変換手段 1 0 1 に入力される。 ウエーブレツ ト変 換手段 1 0 1は入力した画像信号に対して、 1次元のウエーブレツ ト変 換を垂直方向、 水平方向の両方向に対して 2次元的に施してサブバンド に帯域分割し、 各サブバンドにおけるウエーブレツ ト変換係数を生成す る。 ここで、 1次元のウェーブレッ ト変換は、 低域通過フィルタと高域 通過フィルタのフィルタパンクによって実現される。
第 6図はウェーブレツ ト変換手段 1 0 1が分解レベル 2までウェーブ レツ ト変換をしたときのサブバンドを示す図であり、 2次元のウエーブ レッ ト変換を 2回再帰的に施した例を示している。 第 6図において、 先 頭の数字は分解レベルを表しており、 続く L又は Ηの 2つの英字は、 水 平方向、 垂直方向のフィルタの種類を表している。 Lは低域通過フィル 夕を、 Ηは高域通過フィルタを施した結果を表している。 また、 「再帰 的に」 ウェーブレッ ト変換を 2回施すと言うことは、 まず、 第 1回目の ウェーブレッ ト変換により、 サブバンド 1 L L , 1 H L , 1 L H, 1 Η Ηが生成されると、 その 1 L Lに対して 2回目のウエーブレツ ト変換を 施し、 サブバンド 2 L L , 2 H L , 2 L Η , 2 Η Ηを生成することを意 味している。
量子化手段 1 0 2は、 サブバンド毎に設定された量子化ステツプサイ ズにより、 ウェーブレツ ト変換手段 1 0 1 により生成されたウェーブレ ッ ト変換係数を量子化する。
ェントロピー符号化手段 1 0 3は、 各サブバンドにおけるウェーブレ ッ ト変換係数をコ一ドブロックと呼ばれる固定サイズの矩形領域に分割 した後、 多値データからなるそれぞれのコ一ドブロックを 2値のビッ ト プレーンに変換する。 通常このコードブロックの大きさは、 6 4 X 6 4 、 3 2 X 3 2等のサイズに設定される。
第 7図はビッ トプレーンを説明する図である。 ここで、 第 7図を用い てビッ トプレーンの分解について詳しく説明する。 第 7図 ( a ) は 4 X 4のコードブロックの一例を表している。 第 7図 ( a ) のコードブロッ クのデ一夕に対して、 正負を表す 1 ビッ トの信号と絶対値の表現に変換 し、 それらのデ一夕を縦方向に 2進表現した結果を各行単位に並べたも のが第 7図 ( b ) となる。 次に、 第 7図 ( b ) に対して同一のピッ ト番 号のビッ トを集めたものが第 7図 ( c ) となる。 ここで、 最下位ビッ ト ( L S B : L e a s t S i g n i f i c a n t B i t ) を第 0 ビッ ト、 最上位ビッ ト (M S B : M o s t S i g n i f i c a n t B i t ) を第 3 ビッ トとしたとき、 第 0 ビッ トで集めたものを第 0 ビッ トプ レーン、 第 1 ビッ トで集めたものを第 1 ビッ トプレーン、 第 2 ビッ トで 集めたものを第 2ビッ トプレーン、 第 3ビッ トで集めたものを第 3 ビッ トプレーンとしている。 これ以外にも正負を表すビッ トの集まり として 符号ビッ トプレーンを作成する。
ェントロピー符号化手段 1 0 3は、 ビッ トプレーン内の各ビッ トを、 そのコンテクストに応じて、 3通りの符号化パス、 すなわち、 シグニフ ィカントプロパゲーションデコーディ ングパス ( S i g n i f i c a n c e P r o p a g a t i o n D e c o d i n g P a s s ) 、 マグ 二チュードリファインメントパス (M a g n i t u d e R e f i n e m e n t P a s s ) 、 クリーンナップパス (C l e a n u p P a s s ) に分割する。
次に、 エントロピ一符号化手段 1 0 3は、 それぞれの符号化パス毎に 算術符号によりェントロピー符号化するためのコンテクストモデリング を行う。 但し、 M S Bプレーンから数えて全て 0 となるビッ トプレーン はコンテクストモデリングや符号化は行わず、 全て 0のビッ トプレーン の数をヘッダに書くだけとする。 そして、 最初に 1が出現したビッ トプ レーンについては全てのビッ トがクリ一ンナツプパスに分類されるが、 その他のビッ トプレーンについては前述したように 3種類の符号化パス に分類される。
第 8図はビッ トプレーンから符号化パスへの分解を説明する図であり 、 コードブロックのビッ トプレーン数が 6で、 1が出現する有効なビッ トプレーン数が 4の場合の例を示している。
コンテス トモデリングが終了すると、 ェントロピー符号化手段 1 0 3 は算術符号によるェントロピー符号化を行い、 ェントロピー符号化した 符号デ一夕を符号メモリ 1 0 4に格納する。
ェントロピー符号化手段 1 0 3の処理と並行して、 レ一ト制御情報抽 出手段 1 0 5の歪計算手段 1 1 1は、 ェントロピー符号化手段 1 0 3か らの各コードブロックにおいて、 ある符号化パスの符号化が終了する度 に、 その符号化パスと一つ前の前符号化パスにおける符号化歪 Dの歪差 分 A Dを計算する。 ここで、 符号化歪 Dとは、 ある符号化パスまでの符 号を送ったときに再生画像の平均二乗誤差が符号データを伝送しないと きと比較してどれだけ減少したかを示すもので、 厳密に言えば符号化歪 の減少量ということになる。 従って、 符号化歪 Dは最終ビッ トプレーン まで歪差分 を累積するとその平均二乗誤差に等しくなる。 同時に、 レー卜制御情報抽出手段 1 0 5の符号量計算手段 1 1 2は、 ェントロピー符号化手段 1 0 3からの各コードブロックにおいて、 ある パスの符号化が終了する度にその符号化パスでの符号量 Rの出力バイ 卜 数 A Rをカウン卜する。 傾き計算手段 1 1 3は、 歪計算手段 1 1 1 によ り計算された歪差分 Δ Dを符号量計算手段 1 1 2によりカウントされた 現符号化パスでの出力バイ ト数 A Rで除算することにより、 現符号化パ スにおける R D曲線の傾き Sを算出する。
符号化終了パス導出手段 1 1 4は、 各コードブロックの符号量 Rの総 和を示す画面全体の総号量 R s u mと傾き計算手段 1 1 3により算出さ れた傾き Sと与えられたレート制御パラメ一夕の逆数 λ 1 から、 そのコ ードブロックでの符号化をさらなる符号化パスまで続行するか否かを判 断し、 判断結果をエントロピー符号化手段 1 0 3に出力する。 続行する ならばエントロピ一符号化手段 1 0 3は次の符号化パスを符号化し、 歪 計算手段 1 1 1はその符号化パスでの符号化歪 Dの歪差分 を計算し 、 符号量計算手段 1 1 2はその符号化パスでの符号量 Rの出力バイ ト数 △ Rをカウントし、 傾き計算手段 1 1 3はその符号化パスでの R D曲線 の傾き Sを算出し、 符号化終了パス導出手段 1 1 4は、 各コードブロッ クの符号量 Rの総和を示す画面全体の総号量 R s u mと傾き計算手段 1 1 3により算出された傾き Sと与えられたレ一ト制御パラメータの逆数 λ 1 から、 再度、 そのコードブロックでの符号化をさらなる符号化パス まで続行するか否かを判断する。 符号化を続行しないならば、 符号化終 了の情報をェントロピ一符号化手段 1 0 3に出力し、 符号化終了を示す 符号化終了パスを符号データ抽出手段 1 0 6に出力する。
エントロピ一符号化手段 1 0 3は、 符号化終了パス導出手段 1 1 4か らの符号化終了の情報を受け取ってそのコ一ドブロックでのそれ以降の 符号化パスの符号化を行わない。
符号デ一夕抽出手段 1 0 6は、 各コードブロックにおける符号化終了 パスで定まる符号化パスまでの符号データを符号メモリ 1 0 4から読み 出し、 各コードブロックにおける符号化パス数を付加情報として付け加 えた後、 それらを指定された順に並べて、 所定のヘッダ情報を付加した 上で符号ストリームとして出力する。
ここで、 レート制御情報抽出手段 1 0 5の処理の詳細について説明す る。 ここでは、 予めレート制御パラメータ λの候補を複数用意しておき 、 あるレート制御パラメ一夕 λを満足する符号化パスまでの符号化を全 コードブロックに関して行う。 その際、 全コードブロックでの総符号量 R s umが目標符号量 Rm a xに達しているか否かを判断して、 達して いれば符号化を終了させ、 達していなければ次のレ一ト制御パラメータ λの候補を設定して、 そのレート制御パラメータ λを全コードブロック が満足するまで符号化を再度実行させる。 このように、 レート制御パラ メータ λを設定して符号化を行う処理を総符号量 R s umが目標符号量 Rm a xに達するまで行う。 あるレート制御パラメータ λを満足するか 否かは、 各符号化パスの終了時点で RD曲線の傾き Sを算出し、 傾き S がレート制御パラメ一夕逆数 λ 未満に達したか否かで判断する。
第 9図はこの発明の実施の形態 1 による画像符号化装置の処理の流れ を示すフローチャートである。 以下、 第 9図を使用して符号化すべき符 号化パスの決定方法について説明する。 レート制御パラメ一夕の候補 λ ( t ) を以下のように設定する。
λ ( t ) = {λ ( 0 ) , λ ( 1 ) , λ ( 2 ) , · · · λ ( t m a χ ) } ここで、 各レート制御パラメ一夕の候補 λ ( t ) の値は単調増加となる よう設定されており、 λ ( t ) く λ ( t + 1 ) である。 すなわち、 各レ ート制御パラメ一夕の候補 λ ( t ) の逆数 λ ( t ) 1 の値は単調減少と なるよう設定されている。
ステップ S T 1 0 1において、 ェントロピー符号化手段 1 0 3は次の 初期設定を行う。 すなわち、 レート制御パラメータ λのインデックス t の初期値を t = 0 ( t = 0〜 t m a x) とし、 コードブロックのインデ ックス i = 0 ( i = 0〜 i m a x) とし、 総符号量のカウンタ R s u m = 0 とし、 各コードブロックにおける符号化パスを記憶する変数 k ( i ) を全てコードブロックについて— 1 (ゼロビッ トプレーンをスキップ した次のパスのインデックスが 0、 k ( i ) = _ l〜 km a x、 カウン 夕の都合上、 初期値は k ( i ) =ー 1 とする) とする。
なお、 レート制御情報抽出手段 1 0 5にはそのメモリを図示はしない が、 変数 k ( i ) はコードブロック毎に符号化パスを記憶する変数であ り、 レート制御パラメ一タ λのインデックス t、 コードブロックのイン デックス i 、 総符号量のカウン夕 R s u mは全コードブロックで共通の 変数である。
ステップ S T 1 0 2において、 符号化終了パス導出手段 1 1 4は S ( i 、 k ( i ) ) ≥ λ ( t ) —1 であるかを判断する。 このステップ S T 1 0 2はレート制御パラメ一夕の候補 λ ( t ) が更新された際に新たな符 号化パスを符号化する必要があるか否かを判断するための処理なので、 最初は必ず S ( i 、 k ( i ) ) ≥ λ ( t ) —1 となるように S ( i 、 - 1 ) を十分大きな値に設定しておく。 ステップ S T 1 0 3において、 ェン トロピー符号化手段 1 0 3は符号化パスを記憶する変数 k ( i ) をイン クリメントし最初の符号化パスの符号化に備える。
ステップ S T 1 0 4において、 エントロピー符号化手段 1 0 3はコー ドブロック i における符号化対象の符号化パス k ( i ) を符号化する。 ステップ S T 1 0 5において、 現符号化コードブロック i について、 歪 計算手段 1 1 1が現符号化パス kと前符号化パス k一 1間の符号化歪 D の歪差分 Δ D ( i , k ( i ) ) を計算し、 符号量計算手段 1 1 2が現符 号化パスでの符号量 Rの出力バイ ト数 Δ R ( i , k ( i ) ) を算出し、 傾き計算手段 1 1 3が現符号化パスにおける R D曲線の傾き Sを算出す る。
S ( i , k ( i ) ) = Δ D ( i , k ( i ) ) / Δ R ( i , k ( i ) ) なお、 最初の符号化パス 0については、 傾き Sを十分大きな値に設定し ておく ものとする。
ステップ S T 1 0 6において、 符号化終了パス導出手段 1 1 4は総符 号量のカウンタ R s u mに現符号化パスで発生した符号量 Rの出力バイ ト数 ( i , k ( i ) ) を加算する。 ステップ S T 1 0 7において、 符号化終了パス導出手段 1 1 4は、 総符号量のカウンタ R s u mが目標 符号量 R m a Xに達しているか否かを判断し、 総符号量のカウンタ R s u mが目標符号量 R m a Xに達していたならば、 各コードブロックで、 符号化終了の情報をェント口ピー符号化手段 1 0 3に出力し、 各コード ブロックで、 どの符号化パスまで符号化したかを示す符号化パス k ( i ) を符号化終了パスとして符号データ抽出手段 1 0 6に出力する。
ステップ S T 1 0 7において、 総符号量のカウン夕 R s u mが目標符 号量 R m a Xに達していないならば、 ステップ S T 1 0 8において、 符 号化終了パス導出手段 1 1 4は現符号化パスでの傾き S ( i , k ( i ) ). と λ ( t ) との大小を判断し、 傾き S ( i , k ( i ) ) が大きけれ ば、 ェントロピー符号化手段 1 0 3に通知し、 ステップ S T 1 0 3に戻 つて、 エントロピー符号化手段 1 0 3はさらに次の符号化パスを符号化 する。 傾き S ( i , k ( i ) ) がえ ( t ) _l未満になったならば、 ェン トロピー符号化手段 1 0 3に通知し、 エントロピ一符号化手段 1 0 3は 符号化済みの符号化パスの符号データを一旦、 符号メモリ 1 0 4に保存 し、 このコードブロックの符号化を中断する。 ステップ S T 1 0 9にお いて、 コードブロックインデックス i が i m a xでなければ、 ステップ S T 1 1 0において、 ェントロピー符号化手段 1 0 3はコードブロック インデックス i をインクリメントして、 次のコードブロックの符号化に 処理を移す。
次のコードブロックでも同様に、 ステップ S T 1 0 4〜 S T 1 0 8を 繰り返し、 傾き S ( i , k ( i ) ) が λ ( t ) —1 未満となるまで符号化 を行う。 ステップ S T 1 0 9 において、 これを全てのコー ドブロックに 対して行った後、 ステップ S T 1 1 1 において、 レート制御パラメータ λのイ ンデックス t をインク リ メントし、 レート制御パラメ一夕 λを次 の単調増加となっている候補に設定して、 再度全コードブロックの符号 化を傾き S ( i , k ( i ) ) が λ ( t ) —1 未満となるまで行う。 なお、 レー ト制御パラメータの候補 λ ( t ) を更新しても、 S ( i 、 k ( i ) ) < λ ( t ) —1 となり、 つまり更新後のレー ト制御パラメ一夕の逆数 λ ( t ) — 1 が既に符号化済みの符号化パスにおける傾き Sより大きい場合 がある。 その場合は、 次の符号化パスの符号化を行わないので、 ステツ プ S T 1 0 2において、 更新後のレート制御パラメータの逆数え ( t ) 一1 が符号化済みの符号化パスにおける傾き S ( i , k ( i ) ) より大き いことを検出し、 符号化処理をスキップしてステップ S T 1 0 8に移行 する。
第 1 0図は符号化パスの符号化順序を示す図である。 この第 1 0図を 使用して、 コードブロックの総数が 2の場合 ( i m a x = l ) の、 各レ ー ト制御パラメータの候補え ( t ) に対応する符号化パス、 及びそれら が処理される順序を説明する。 第 1 0図 ( a) がコードブロック 0の各 パス番号で示す符号化パスにおける傾き Sを示し、 第 1 0図 ( b ) がコ 一 ドブロック 1の各パス番号で示す符号化パスにおける傾き Sを示し、 第 1 0図 ( c ) が予め設定されている各値が単調減少となっているレー ト制御パラメ一夕の逆数 λ ( t ) -1を示す。
まず、 コー ドブロック 0において、 傾き Sが S ( k ) < λ ( 0 ) —1 と なるまでパス番号 0, 1の符号化パスを符号化する (第 1 0図 ( a ) の A ) 。 この時点で総符号量 R s u mが目標符号量 R m a Xに達していな ければ、 処理は次のコードブロック 1 に移り、 同様に傾き Sが S ( k ) < λ ( 0 ) — 1 となるまでパス番号 0 , 1の符号化パスを符号化する (第 1 0図 ( b ) の B ) 。
この時点で総符号量 R s u mが目標符号量 R m a xに達していなけれ ば、 レー ト制御パラメ一夕を次の値 λ ( 1 ) に設定し、 コ一ドブロック 0から処理を行い、 コードブロック 0のパス番号 2の符号化パスを符号 化する (第 1 0図 ( a ) の C ) 。 次に、 コードブロック 1では、 直前に 符号化したパス番号 1の符号化パスの傾き S = 1 6 0が既に 1ノ λ ( 1 ) = 1 6 5より小さいので、 ここでは符号化を行わない。
この後も同様に、 総符号量 R s umが目標符号量 Rm a xに達してい なければ、 レー 卜制御パラメータを次の値 λ ( 2 ) に設定し、 コードブ ロック 0のパス番号 3の符号化パスを符号化し (第 1 0図 ( a ) の D) 、 次にコードブロック 1のパス番号 2 , 3の符号化パスを符号化する ( 第 1 0図 ( b ) の E) 。 以上の処理を総符号量 R s umが目標符号量 R m a Xに達するまで行う。
この実施の形態 1では、 総符号量 R s umが目標符号量 Rm a xに達 するまで符号化を行っているが、 目標符号量 Rm a Xの代わりに目標符 号化歪を設定し、 画面全体における各コードブロックの符号化歪 Dの総 和が目標符号化歪に達するまで符号化を行う ことも可能である。
このように、 この実施の形態 1のレー ト制御情報抽出手段 1 0 5は、 各符号化パスとそれぞれ 1つ前の符号化パスを符号化した際の符号化歪 Dの歪差分 と各符号化パスの符号量 Rの出力バイ ト数 A Rにより R D曲線の傾き Sを算出し、 各コードブロックの符号量 Rの総和を示す総 符号量 R s u m、 又は各コ一ドブロックの符号化歪 Dの総和を算出し、 総符号量 R s u mが目標符号量 R m a に達した場合、 又は各コ一ドブ 口ックの符号化歪 Dの総和が目標符号化歪に達した場合に、 符号化終了 と判断すると共に、 総符号量 R s u mが目標符号量 R m a に達しない 場合、 又は符号化歪 Dの総和が目標符号化歪に達しない場合には、 傾き Sが与えられたレート制御パラメータの逆数 λ —1 より小さくなるまで、 そのコードブロックにおける各符号化パスの符号化を行わせ、 傾き Sが レート制御パラメ一夕の逆数 λ —1 より小さくなつた場合に、 次のコード ブロックにおける各符号化パスの符号化を行わせ、 全てのコードブロッ クにおける各符号化パスの符号化が終了した場合に、 与えられているレ 一ト制御パラメータの逆数 λ —1 より単調減少の値を示す他のレート制御 パラメ一夕の逆数 λ —1 を使用して、 どのコードブロックにおけるどの符 号化パスまで符号化するかを判断する。
以上のように、 この実施の形態 1 によれば、 実際に符号化結果を出力 する符号化パスのみを対象として符号化を行うため、 全ての符号化パス を符号化する従来方法に比べて、 エントロピー符号化に要する演算量を 低減することができるという効果が得られる。 また、 総符号量が目標符 号量に達した段階で符号化を終了するので、 総符号量を目標符号量に合 わせ込むために収束演算を行う必要がなく、 レート制御に必要な演算量 を低減することができるという効果が得られる。
なお、 符号化パス数を付加情報として伝送するのではなく、 符号化対 象パスを符号化した場合の発生符号量、 歪減少量を符号化側、 復号側双 方で予測し、 その予測符号量、 予測歪減少量からどの符号化パスまでを 符号化するかを決定することも可能である。
しかし、 コードブロック毎に符号化パス数を伝送するこの発明では、 符号化パス数の付加情報は高々数パーセントに過ぎず、 この僅かなォー バーヘッ ドにより、 符号化歪を最小化するという観点から、 ほぼ最適な 符号化パスで符号化を終了することができる (予測値から算出した符号 化終了パスは最適な符号化パスではない) 。 また、 符号量、 符号化歪の 予測に要する演算量は、 一般に、 この発明のように実際の発生符号量や 符号化歪をカウントする方法に比べて遙かに大きいので、 レ一ト制御の 演算量増加につながる。
以上の点から、 符号化パス数を付加情報として伝送するこの発明のレ 一ト制御手法が符号化歪を最小化する符号化における符号量低減に有効 であるといえる。 実施の形態 2 .
上記実施の形態 1では、 符号化するに従い R D曲線の傾き Sが単調減 少となっていることを前提に説明したが、 場合によっては傾き Sが単調 減少とならないことがあり、 2乗誤差を最小化するという意味で最適で ない符号化終了パスを選択してしまうことがある。 そこで、 この実施の 形態 2では、 傾き Sが単調減少とならない場合に、 より最適に近い符号 化終了パスを決定するために、 ある符号化パスまで符号化を進めて傾き Sを算出するたびに、 それまで符号化した符号化パスの傾き Sより小さ くなるよう傾き Sを補正する処理を加えている。
この発明の実施の形態 2による画像符号化装置の構成を示すプロック 図は、 上記実施の形態 1の第 4図と同じである。
第 1 1図はこの発明の実施の形態 2による画像符号化装置のレー卜制 御情報抽出手段 1 0 5の内部構成を示すブロック図である。 このレ一ト 制御情報抽出手段 1 0 5は歪計算手段 1 2 1、 符号量計算手段 1 2 2、 レート歪メモリ 1 2 3、 傾き計算手段 1 2 4及び符号化終了パス導出手 段 1 2 5を備えている。
第 1 1図において、 歪計算手段 1 2 1は、 ェントロピー符号化手段 1 0 3からの符号化パス毎にその符号化パスと一つ前の符号化パスにおけ る符号化歪 Dの歪差分 Δ Dと、 歪差分△ Dを累積した符号化歪 Dを計算 する。 符号量計算手段 1 2 2は、 ェントロピー符号化手段 1 0 3からの 符号化パス毎にその符号化パスでの符号量 Rの出力バイ 卜数 と、 出 カバイ ト数 を累積した符号量 Rをカウントする。 レート歪メモリ 1 2 3は歪差分 A Dを累積した符号化歪 D、 出力バイ ト数 A Rを累積した 符号量 R及び R D曲線の傾き S等を符号化パス毎に格納する。 傾き計算 手段 1 2 4は、 レート歪メモリ 1 2 3に格納されている符号化パス毎の 符号化歪 Dにより歪差分 を求め、 レート歪メモリ 1 2 3に格納され ている符号化パス毎の符号量 Rにより出力バイ ト数 Δ Rを求め、 歪差分 △ Dと出力バイ ト数 A Rから R D曲線の傾き Sを計算する。 符号化終了 パス導出手段 1 2 5は、 現符号化パス以前の符号化パスで現符号化パス との R D曲線の傾き Sが現符号化パス以前の符号化パスにおける傾き S よりも小さくなる符号化パスと現符号化パス間での歪差分 Δ Dと出カバ ィ ト数△ Rの比を現符号化パスの傾き Sと補正し、 各コードブロックの 符号量 Rの総和を示す画面全体の総符号量 R s u mと現符号化パスの補 正した傾き Sと与えられたレ一ト制御パラメ一夕の逆数 λ -1 に基づき、 各コードブロック毎に符号化を継続するか否かを判断して符号化終了パ スを導出し、 符号化終了の情報と符号化終了パスを出力する。
次に動作について説明する。
レート制御情報抽出手段 1 0 5以外の処理については上記実施の形態 1 と同様であり、 ここでは、 レート制御情報抽出手段 1 0 5の処理につ いて説明する。
ェントロピー符号化手段 1 0 3の処理と並行して、 レート制御情報抽 出手段 1 0 5の歪計算手段 1 2 1は、 ェントロピ一符号化手段 1 0 3か らの各コードブロックにおいて、 ある符号化パスの符号化が終了する度 にその符号化パスと一つ前の符号化パスの符号化歪 Dの歪差分 Δ Dと、 歪差分△ Dを累積した符号化歪 D = D + A Dを算出する。 符号化歪 Dと は、 あるビッ トプレーンまでの符号を送ったときに再生画像に対する平 均二乗誤差がどれだけ減少したかを示すもので、 厳密に言えば符号化歪 の減少量ということになる。 従って、 最終ビッ トプレーンまで歪差分△ Dを累積するとその平均二乗誤差に等しくなる。
同時に、 符号量計算手段 1 2 2は、 ェントロピー符号化手段 1 0 3か らの各コードブロックにおいて、 ある符号化パスの符号化が終了する度 にその符号化パスでの符号量 Rの出力バイ 卜数 と、 出力バイ ト数 Δ Rを累積した符号量 R = R +△ Rを算出する。
これらの歪差分 Δ ϋを累積した符号化歪 D、 出力バイ ト数 A Rを累積 した符号量 Rは、 サブバンド、 コードブロック、 符号化パス等々のイン デックスが付与された後、 レート歪メモリ 1 2 3に格納される。
傾き計算手段 1 2 4は、 レート歪メモリ 1 2 3に格納されている符号 化パス毎の符号化歪 Dにより歪差分△ Dを求め、 レート歪メモリ 1 2 3 に格納されている符号化パス毎の符号量 Rにより出力バイ 卜数 Δ Rを求 め、 歪差分 A Dを出力バイ ト数 A Rで除算することにより、 現符号化パ スにおける R D曲線の傾き Sを算出し、 符号化歪 D、 符号量 Rと同一の 符号化パスの傾き Sであることがわかるレート歪メモリ 1 2 3の位置に 格納する。
第 1 2図はレート歪メモリ 1 2 3に格納されている R Dテーブルのデ 一夕構造を示す図であり、 サブバンドやコードブックに対応して、 各符 号化パスのパス番号、 符号化歪 D、 符号量 R、 傾き S及びフラグが格納 されている。 なお、 フラグについては後述する。 符号化終了パス導出手段 1 2 5は、 現符号化パス以前の符号化パスで 現符号化パスとの R D曲線の傾き Sが現符号化パス以前の符号化パスに おける傾き Sよりも小さくなる符号化パスと現符号化パス間での歪差分
△ Dと出力バイ ト数 Δ Rの比を現符号化パスの傾き Sと補正し、 各コ一 ドプロックの符号量 Rの総和を示す画面全体の総号量 R s u mと現符号 化パスの補正した傾き Sと与えられたレ一ト制御パラメ一夕の逆数 λ一1 に基づき、 そのコ一ドブロックでの符号化をさらなる符号化パスまで続 行するか否かを判断し、 判断結果をエントロピー符号化手段 1 0 3に出 力する。 続行するならばエントロピー符号化手段 1 0 3は、 次の符号化 パスを符号化し、 歪計算手段 1 2 1はその符号化パスでの歪差分 Δ Dと 歪差分 A Dを累積したコードブロックでの符号化歪 Dを計算し、 符号量 計算手段 1 2 2はその符号化パスでの出力バイ ト数 Δ Rと出力バイ ト数
△ Rを累積したコードブロックでの符号量 Rをカウントし、 傾き計算手 段 1 2 4はその符号化パスでの R D曲線の傾き Sを算出し、 符号化終了 パス導出手段 1 2 5は、 現符号化パス以前の符号化パスで現符号化パス との R D曲線の傾き Sが現符号化パス以前の符号化パスにおける傾き S よりも小さくなる符号化パスと現符号化パス間での歪差分△ Dと出カバ イ ト数 Δ Rの比を現符号化パスの傾き Sと捕正し、 各コードブロックの 符号量 Rの総和を示す画面全体の総符号量 R s u mと現符号化パスの補 正した傾き S とレート制御パラメータの逆数 に基づき、 再度、 その コードブロックでの符号化をさらなる符号化パスまで続行するか否かを 判断する。 符号化を続行しないならば、 符号化終了の情報をエントロピ 一符号化手段 1 0 3に出力し、 符号化終了パスを符号データ抽出手段 1 0 6に出力する。
符号デ一夕抽出手段 1 0 6は、 各コードブロックにおける符号化終了 パスで定まる符号化パスまでの符号データを符号メモリ 1 0 4から読み 出し、 各コードブロックに含まれる符号化パス数を付加情報として付け 加えた後、 それらを指定された順に並べて、 所定のヘッダ情報を付加し た上で符号ス トリームとして出力する。
ここで、 傾き計算手段 1 2 4及び符号化終了パス導出手段 1 2 5の処 理の詳細について説明する。 この実施の形態 2では、 ある符号化パスに おける傾き Sを算出するたびに、 必ずそれまでの傾き Sより小さくなる よう傾きを補正する処理行う。
第 1 3図はこの発明の実施の形態 2による画像符号化装置の処理の流 れを示すフローチャートである。
上記実施の形態 1 と同様に、 レート制御パラメ一夕; Iの候捕 λ ( t ) を以下のように設定する。
λ ( t ) = {λ ( 0 ) , λ ( 1 ) , λ ( 2 ) , · · · λ ( t m a ) } ここで、 各レート制御パラメ一夕の候補 λ ( t ) の値は単調増加となる よう設定されており、 λ ( t ) < λ. ( t + 1 ) である。 すなわち、 各レ ート制御パラメ一夕の候補え ( t ) の逆数 λ ( t ) —1 の値は単調減少と なるよう設定されている。
第 1 3図のステップ S T 1 2 1 において、 エントロピ一符号化手段 1 0 3は次の初期設定を行う。 すなわち、 レート制御パラメ一夕 λのイン デックス t の初期値を t = 0 ( t = 0〜 t m a x) とし、 コードブロッ クのインデックス i = 0 ( i = 0〜 i m a x) とし、 総符号量のカウン 夕 R s u m = 0 とし、 各コードブロックにおける符号化パスを記憶する 変数 k ( i ) を全てコードブロックについて一 1 (ゼロビッ トプレーン をスキップした次のパスのィンデックスが 0、 k ( i ) =— 1〜 k m a x、 カウンタの都合上、 初期値は k ( i ) = _ 1 とする) とする。
なお、 レ一ト制御情報抽出手段 1 0 5にはそのメモリを図示はしない が、 k ( i ) はコードブロック毎に符号化パスを記憶する変数であり、 レート制御パラメータ λのインデックス t、 コードブロックのインデッ クス i 、 総符号量のカウンタ R s umは全コードブロックで共通の変数 である。
ステップ S T 1 2 2において、 符号化終了パス導出手段 1 2 5は各コ ードブロックの各符号化パスでの R D曲線の傾き Sを記憶するか否かを 示す全ての変数 f 1 a g ( i , k ) の値を全て 1、 すなわち有効にセッ トする。
ステップ S T 1 2 3において、 符号化終了パス導出手段 1 2 5は S (
1 、 k ( i ) ) ≥ λ ( t ) 一1 であるかを判断する。 このステップ S T 1
2 3はレート制御パラメ一夕の候補 λ ( t ) が更新された際に新たな符 号化パスを符号化する必要があるか否かを判断するための処理なので、 最初は必ず S ( i 、 k ( i ) ) ≥ λ ( t ) —1 となるように S ( i 、 一 1 ) を十分大きな値に設定しておく。 ステップ S T 1 2 4において、 ェン トロピー符号化手段 1 0 3は変数 k ( i ) をインクリメントし最初の符 号化パスの符号化に備える。
ステップ S T 1 2 5において、 エントロピ一符号化手段 1 0 3はコー ドブロック i における符号化対象の符号化パス k ( i ) を符号化する。 ステップ S T 1 2 6において、 歪計算手段 1 2 1 は現符号化コードプ ロック i における現符号化パスでの符号化歪 Dの歪差分 Δ D ( i , k ( i ) ) と歪差分 A D ( i , k ( i ) ) を累積した符号化歪 D ( i , k ( i ) ) を算出して、 符号化歪 D ( i , k ( i ) ) をレート歪メモリ 1 2 3に格納し、 符号量計算手段 1 2 2は現符号化コードブロック i におけ る現符号化パスでの出力バイ ト数△ R ( i , k ( i ) ) と出力バイ ト数 Δ R ( i , k ( i ) ) を累積した符号量 R ( i , k ( i ) ) を算出して 、 符号量 R ( i , k ( i ) ) をレート歪メモリ 1 2 3に格納する。
ステップ S T 1 2 7において、 符号化終了パス導出手段 1 2 5は、 現 符号化パス以前で最も近い有効符号化パスのィンデックス pを第 1 2図 の R Dテーブルの f l a g ( i , k ) が 1の符号化パスを検出すること により導出する。 ここで、 有効符号化パスとは、 現符号化パスの RD曲 線の傾き Sが前の符号化パスの傾き Sに対して小さく単調減少となつて いる前の符号化パスのことである。
ステップ S T 1 2 8において、 符号化終了パス導出手段 1 2 5は、 次 の計算式により現符号化パスとィンデックス pの有効符号化パスとの R D曲線の傾き Sを算出する。
Δ D ( i, k ( i ) ) =D ( i, k ( i ) ) 一 D ( i, P)
Δ R ( i , k ( i ) ) 二 R ( i, k ( i ) ) - R ( i , P )
S ( i, k ( i ) ) = Δ D ( i, k ( i ) ) / Δ R ( i , k ( i ) ) なお、 最初の符号化パス 0については、 傾き Sを十分大きな値に設定し ておく ものとする。
ステップ S T 1 2 9において、 符号化終了パス導出手段 1 2 5は、 現 符号化パスでの傾き S ( i , k ( i ) ) と前有効符号化パスでの傾き S ( i , ρ ( i ) ) との大小を判定する。 現符号化パスでの傾き S ( i , k ( i ) ) が前有効符号化パスでの傾き S ( i , ρ ( i ) ) より大きい 場合には、 ステップ S T 1 3 0において、 符号化終了パス導出手段 1 2 5は、 前有効符号化パスを無効とし、 第 1 2図のフラグを 1から 0に設 定する。 そして、 ステップ S T 1 2 7に戻って現符号化パスとの傾きが 単調減少となるまで更に以前の符号化済みの有効符号化パスを探す。
第 1 4図は RD曲線の傾き Sの補正を示す図である。 第 1 4図におい て、 横軸は符号量 R ( k) を示し、 縦軸は符号化歪 D (k) を示し、 0 〜 4はパス番号 0〜 4の符号化パスを示し、 S ( 1 ) , S ( 2 ) , S ( 3 ) , S ( 4) は、 それぞれパス番号 1〜 4の符号化パスの傾きを示し ている。 この場合には、 パス番号 0の符号化パスからパス番号 4の符号 化パスの全てが有効符号化パスとしてセッ トされていたが、 現符号化パ スであるパス番号 4の符号化パスの傾き S ( 4) が、 現符号化パス以前 で最も近い有効符号化パスであるパス番号 3の符号化パスの傾き S ( 3 ) より大きくなることが判明したので、 パス番号 3の符号化パスを無効 にセッ トとして、 パス番号 4の現符号化パスの傾きをパス番号 2の符号 化パスとの傾き S (4 ) ' となるように補正する。 この補正をしても、 まだ傾き Sが単調減少とならない場合には、 さらに以前の符号化パスの 傾き Sに対して単調減少となるまで符号化パスを無効とする。
第 1 3図のステップ S T 1 2 9において、 現符号化パスでの傾き S ( i , k ( i ) ) が前有効符号化パスでの傾き S ( i , p ( i ) ) より小 さいと判定された場合には、 ステップ S T 1 3 1 において、 符号化終了 パス導出手段 1 2 5は、 総符号量のカウンタ R s u mに、 現符号化パス での発生符号量 R ( i , k ( i ) ) - R ( i, k ( i ) - 1 ) を加算し て、 現符号化パスまでの総符号量 R s u mを算出する。 ステップ S T 1 3 2において、 符号化終了パス導出手段 1 2 5は、 総符号量のカウンタ R s umが目標符号量 Rm a xに達しているか否かを判断し、 総符号量 のカウンタ R s umが目標符号量 Rm a xに達していたならば、 各コー ドブロックで、 符号化終了の情報をェント口ピー符号化手段 1 0 3に出 力し、 各コ一ドブロックで、 どの符号化パスまで符号化したかの符号化 終了を示す符号化パス k ( i ) を符号化終了パスとして符号データ抽出 手段 1 0 6に出力する。
ステップ S T 1 3 2において、 総符号量のカウンタ R s umが目標符 号量 R m a Xに達していないならば、 ステップ S T 1 3 3において、 符 号化終了パス導出手段 1 2 5は現符号化パスでの有効符号化パスに対す る傾き S ( i , k ( i ) ) とレート制御パラメ一夕の逆数 λ ( t ) 1 と の大小を判断し、 傾き S ( i , k ( i ) ) が大きければ、 符号化終了パ ス導出手段 1 2 5はェントロピー符号化手段 1 0 3に通知し、 ステツプ S T 1 2 4に戻って、 ェントロピー符号化手段 1 0 3はさらに次の符号 化パスを符号化する。 ステップ S T 1 3 3において、 傾き S ( i, k ( i ) ) 力 λ ( t ) 1未満になったならば、 符号化終了パス導出手段 1 2 5はェン トロピ一符号化手段 1 0 3に通知し、 ェン トロピー符号化手段 1 0 3は符号化済みの符号化パスの符号データを一旦、 符号メモリ 1 0 4に保存し、 このコ一ドブロックの符号化を中断する。 ステップ S T 1 3 4において、 コードブロックイ ンデックス i が i m a Xでなければ、 ステップ S T 1 3 5において、 エン トロピー符号化手段 1 0 3はコー ド ブロックインデックス i をイ ンク リメン トして、 次のコードブロックの 符号化に処理を移す。
次のコードブロックでも同様に、 ステップ S T 1 2 5〜S T 1 3 3を 繰り返し、 傾き S ( i , k ( i ) ) がレー ト制御パラメータの逆数 λ ( t ) 1 未満となるまで符号化を行う。 ステップ S T 1 3 4において、 こ れを全てのコー ドブロックに対して行った後、 ステップ S T 1 3 6にお いて、 エン トロピ一符号化手段 1 0 3はレート制御パラメータ λのイ ン デックス t をインクリ メントし、 レート制御パラメータ λを次の候補に 設定して、 再度全コードブロックの符号化を傾き S ( i , k ( i ) ) が レー ト制御パラメ一夕の逆数 λ ( t ) 1 未満となるまで行う。 なお、 レ ー ト制御パラメータの候補 λ ( t ) を更新しても、 S ( i , k ( i ) ) く λ ( t ) 1 となり、 つまり更新後のレー ト制御パラメ一夕の逆数 λ ( t ) 1 が既に符号化済みの符号化パスにおける傾き S ( i, k ( i ) ) より大きい場合がある。 その場合は、 次の符号化パスの符号化を行わな いので、 ステップ S T 1 2 3において更新後のレート制御パラメ一夕の 逆数 λ ( t ) 1 が符号化済みの符号化パスにおける傾き S ( i , k ( i ) ) より大きいことを検出し、 符号化処理をスキップしてステップ S T 1 3 3に移行する。
この実施の形態 2では、 総符号量 R s u mが目標符号量 R m a に達 するまで符号化を行っているが、 目標符号量 R m a xの代わりに目標符 号化歪を設定し、 画面全体における各コードブロックの符号化歪 Dの総 和が目標符号化歪に達するまで符号化を行うことも可能である。
このように、 実施の形態 2のレート制御情報抽出手段 1 0 5は、 現符 号化パス以前の符号化パスで現符号化パスとの R D曲線の傾き Sが現符 号化パス以前の符号化パスにおける傾き Sよりも小さくなる符号化パス と現符号化パス間での歪差分 Δ Dと出力バイ ト数 Δ Rの比を現符号化パ スの傾き Sと補正し、 各コ一ドブロックの符号量 Rの総和を示す総符号 量 R s u m、 又は各コードブロックの符号化歪 Dの総和を算出し、 総符 号量 R s u mが目標符号量 R m a xに達した場合、 又は各コードブロッ クの符号化歪 Dの総和が目標符号化歪に達した場合に、 符号化終了と判 断すると共に、 総符号量 R s u mが目標符号量 R m a Xに達しない場合 、 又は符号化歪 Dの総和が目標符号化歪に達しない場合には、 補正した 傾き Sが与えられたレート制御パラメ一夕の逆数 λ 1 より小さくなるま で、 そのコードブロックにおける各符号化パスの符号化を行わせ、 補正 した傾き Sがレ一ト制御パラメ一夕の逆数 λ 1 より小さくなつた場合に 、 次のコードブロックにおける各符号化パスの符号化を行わせ、 全ての コードブロックにおける各符号化パスの符号化が終了した場合に、 与え られているレート制御パラメ一夕の逆数 λ 1 より単調減少の値を示す他 のレート制御パラメータの逆数 λ 1 を使用して、 どのコ一ドブロックに おけるどの符号化パスまで符号化するかを判断する。
以上のように、 この実施の形態 2によれば、 実際に符号化結果を出力 する符号化パスのみを対象として符号化を行うため、 全ての符号化パス を符号化する従来方法に比べて、 エントロピー符号化に要する演算量を 低減することができるという効果が得られる。 また、 累積符号量が目標 値に達した段階で符号化を終了するので、 総符号量を目標符号量に合わ せ込むために収束演算を行う必要がなく、 レート制御に必要な演算量を 低減することができるという効果が得られる。
さらに、 あるパスまで符号化を進めて傾き Sを算出するたびに、 それ までの傾き Sより小さくなるよう傾きを補正する処理を加えることによ り、 上記実施の形態 1 に比べ、 より最適に近い符号化パスで各コードブ ロックの符号化を打ち切ることができるという効果が得られる。 実施の形態 3 .
上記実施の形態 1及び上記実施の形態 2では、 レ一ト制御パラメ一夕 λに応じた切り捨てポイントを算出するにあたり、 R D曲線の傾き Sを 除算により算出したが、 場合によっては、 この除算による演算が大きな 負荷となる場合がある。 そこで、 この実施の形態 3では、
∑ ( R ( i , k ) - A D ( i , k ) )
が最大となるポイントを探す、 つまり各コードブロックで、 次式の傾き 指標値 Fが最大となるボイントを探すことにより除算を回避し、 レート 制御の演算負荷の低減を図る方法を説明する。
F = R ( i , k ) - A D ( i , k )
この発明の実施の形態 3による画像符号化装置の構成を示すプロック 図は、 上記実施の形態 1の第 4図と同じである。
第 1 5図はこの発明の実施の形態 3による画像符号化装置のレート制 御情報抽出手段 1 0 5の内部構成を示すブロック図である。 このレート 制御情報抽出手段 1 0 5は歪計算手段 1 3 1、 符号量計算手段 1 3 2、 レート歪メモリ 1 3 3、 傾き指標値計算手段 1 3 4及び符号化終了パス 導出手段 1 3 5を備えている。 このレート制御情報抽出手段 1 0 5は、 各コードブロックの符号量 R の総和を示す総符号量 R s u m、 各コードブロックの符号量 R、 各コー ドブロックの符号化歪 D、 及び各値が単調増加となっている与えられた 複数のレート制御パラメータ λに基づき、 どのコードブロックにおける どの符号化パスまでェント口ピー符号化手段 1 0 3が符号化するかを判 断し、 符号化終了となる符号化終了パスを出力する。
第 1 5図において、 歪計算手段 1 3 1は、 ェントロピー符号化手段 1 0 3からの符号化パス毎にその符号化パスと一つ前の符号化パスにおけ る符号化歪 Dの歪差分△ Dと、 歪差分△ Dを累積した符号化歪 Dを計算 する。 符号量計算手段 1 3 2は、 ェントロピ一符号化手段 1 0 3からの 符号化パス毎にその符号化パスでの符号量 Rの出力バイ ト数 Δ Rと、 出 カバイ ト数 を累積した符号量 Rをカウントする。 レート歪メモリ 1 3 3は歪差分 Δ Dを累積した符号化歪 D、 出力バイ ト数 を累積した 符号量 R及びその傾き指標値 F等を符号化パス毎に格納する。 傾き指標 値計算手段 1 3 4は符号化歪 D、 符号量 R及びレート制御パラメータ λ に基づき傾き指標値 Fを算出する。 符号化終了パス導出手段 1 3 5は、 、 各コードブロックの符号量 Rの総和を示す画面全体の総符号量 R s u mと傾き指標値計算手段 1 3 4により計算された傾き指標値 Fに基づき 、 各コードプロック毎に符号化を継続するか否かを判断して符号化終了 パスを導出し、 符号化終了の情報と符号化終了パスを出力する。
次に動作について説明する。
ェントロピー符号化手段 1 0 3の処理と並行して、 歪計算手段 1 3 1 は、 各コードプロックにおいてある符号化パスの符号化が終了する度に その符号化パスと前符号化パスとの符号化歪 Dの歪差分△ Dと歪差分 Δ Dを累積した符号化歪 D = D + A Dを算出する。
同時に、 符号量計算手段 1 3 2は、 各コードブロックにおいて、 ある 符号化パスの符号化が終了する度にその符号化パスでの出力バイ ト数 Δ Rと出力バイ ト数△ Rを累積した符号値 R R +△ Rを算出する。 これ ら'の符号化歪 D、 符号量 Rは、 サブバンド、 コードブロック、 符号化パ ス等々のィンデックスが付与された後、 レート歪メモリ 1 3 3に格納さ れる。
また、 傾き指標値計算手段 1 3 4は符号化歪 D、 符号量 R及びレート 制御パラメ一夕 λに基づきその傾き指標値 Fを計算し、 符号化歪 D、 符 号量 Rと同一の符号化パスの傾き指標値であることがわかるレート歪メ モリ 1 3 3の位置に格納する。
第 1 6図はレ一ト歪メモリ 1 3 3に格納されている R Dテ一ブルのデ —夕構造を示す図であり、 サブバンド及びコードブックに対応して、 パ ス番号、 符号化歪 D、 符号量 R、 傾き指標値 Fが格納されている。
符号化終了パス導出手段 1 3 5は、 各コードブロックの符号量 Rの総 和を示す画面全体の総符号量 R s u mと傾き指標値 Fから、 そのコード ブロックでの符号化をさらなる符号化パスまで続行するか否かを判断し 、 判断結果をェント口ピー符号化手段 1 0 3に出力する。 続行するなら ばエントロピー符号化手段 1 0 3は、 次の符号化パスを符号化し、 歪計 算手段 1 3 1は、 その符号化パスと前符号化パスとの符号化歪 Dの歪差 分△ Dと歪差分 Δ Dを累積した符号化歪 Dを算出し、 符号量計算手段 1 3 2は、 その符号化パスでの出力バイ ト数 A Rと出力バイ ト数 A Rを累 積した符号量 Rを算出し、 傾き指標値計算手段 1 3 4はその符号化パス での傾き指標値 Fを算出する。 符号化終了パス導出手段 1 3 5は再度、 符号化をさらなる符号化パスまで続行するか否かを判断する。 符号化を 続行しないならば、 符号化終了の情報をェント口ピー符号化手段 1 0 3 に出力し、 符号化終了パスを符号データ抽出手段 1 0 6に出力する。 符号データ抽出手段 1 0 6は、 各コードブロックにおける符号化終了 パスで定まる符号化パスまでの符号デ一夕を符号メモリ 1 0 4から読み 出し、 各コードブロックに含まれる符号化パス数を付加情報として付け 加えた後、 それらを指定された順に並べて、 所定のヘッダ情報を付加し た上で符号ストリームとして出力する。
第 1 7図はこの発明の実施の形態 3による画像符号化装置の処理の流 れを示すフローチャートである。
上記実施の形態 1及び上記実施の形態 2 と同様に、 レート制御パラメ 一夕の候補 λ ( t ) を以下のように設定する。
λ ( t ) = {λ ( 0 ) , λ ( 1 ) , λ ( 2 ) , · · · λ ( t m a χ ) } ここで、 各レート制御パラメ一夕の候補 λ ( t ) の値は単調増加となる よう設定されており、 え ( t ) < λ ( t + 1 ) である。
第 1 7図のステツプ S T 1 4 1において、 ェントロピー符号化手段 1 0 3は、 レート制御パラメ一夕 λのインデックス t の初期値を t = 0 ( t = 0〜 t m a x) とし、 コードブロックのインデックス i = 0 ( i = 0〜 i m a x) とし、 総符号量のカウン夕 R s u m = 0 とし、 各コード ブロックにおける符号化パスを記憶する変数 k ( i ) を全てコードプロ ックについて一 1 (ゼロビッ トプレ一ンをスキップした次のパスのイン デックスが 0、 k ( i ) l〜 km a x、 カウン夕の都合上、 初期値 は k ( i ) =— 1 とする) とする。
なお、 レート制御情報抽出手段 1 0 5にはそのメモリを図示はしない が、 変数 k ( i ) はコードブロック毎に符号化パスを記憶する変数であ り、 レ一ト制御パラメ一夕 λのインデックス t、 コードブロックのイン デックス i 、 総符号量のカウンタ R s u mは全コ一ドブロックで共通の 変数である。
ステップ S T 1 4 2において、 ェントロピー符号化手段 1 0 3は設定 されているコードブロックにおける符号化パスを符号化し、 歪計算手段 1 3 1はその符号化パスと前符号化パスとの符号化歪 Dの歪差分 Δ Dと 歪差分△ Dを累積した符号化歪 Dを算出し、 符号量計算手段 1 3 2は符 号化パスにおける出力バイ ト数 と出力バイ ト数 を累積した符号 量 Rを算出し、 傾き指標値計算手段 1 3 4は、 その時点でのレ一卜制御 パラメータの候補え ( t ) から、 符号化済みの符号化パスに関する傾き 指標値 Fを算出してレート歪メモリ 1 3 3に格納する。
ステップ S T 1 4 3において、 符号化終了パス導出手段 1 3 5はその コードブロックで傾き指標値 Fが最大となる符号化パス KL を導出する 。 ステップ S T 1 4 4において、 符号化終了パス導出手段 1 3 5は傾き 指標値 Fが最大となる符号化パス KLが現在の符号化パス k ( i ) であ るか否かを判断する。 なお、 ステップ S T 1 4 3, S T 1 4 4の処理は 、 レート制御パラメ一夕の候補 λ ( t ) が更新された際に新たな符号化 パスを符号化する必要があるか否かを判断するための処理なので、 最初 は必ず K L = k ( i ) となるように設定しておく。
ステップ S T 1 4 5において、 ェントロピー符号化手段 1 0 3は k ( i ) をインクリメントし、 最初の符号化パスの符号化に備える。
ステップ S T 1 4 6において、 エントロピ一符号化手段 1 0 3はコ一 ドブロック i における符号化対象の符号化パス k ( i ) を符号化し、 ス テツプ S T 1 4 7 において、 歪計算手段 1 3 1は現符号化パスと前符号 化パスとの符号化歪 Dの歪差分△ D ( i , k ( i ) ) より歪差分 A D ( i , k ( i ) ) を累積した符号化歪 D ( i , k ( i ) ) を算出して、 符 号化歪 D ( i , k ( i ) ) をレート歪メモリ 1 3 3に格納し、 符号量計 算手段 1 3 2は現符号化パスにおける出力バイ ト数 A R ( i , k ( i ) ) より出力バイ ト数 ( i , k ( i ) ) を累積した符号量 R ( i , k ( i ) ) を算出してレート歪メモリ 1 3 3に格納する。
ステップ S T 1 4 8において、 傾き指標値計算手段 1 3 4は、 現符号 化パスでの傾き指標値 F ( i , k) を次の式により算出してレート歪メ モリ 1 3 3に格納する。
F ( i , k) = R ( i , k ( i ) ) - λ ( t ) · D ( i , k ( i ) ) ステップ S T 1 4 9において、 符号化終了パス導出手段 1 3 5は、 レ ート歪メモリ 1 3 3を参照して、 現コードブロックの符号化済みの符号 化パスの中で、 傾き指標値 F ( i , k) が最大となる符号化パス kt を 導出する。
ステップ S T 1 5 0において、 符号化終了パス導出手段 1 3 5は、 傾 き指標値 F ( i , k ) が最大となる符号化パス が現符号化パス k ( i ) であるか否かを判断し、 符号化パス k[_が現符号化パス k ( i ) で あれば、 ステップ S T 1 4 5 に戻って、 さらに次の符号化パスを符号化 する。 符号化パス k Lが現符号化パスでなければ、 ステップ S T 1 5 1 において、 符号化終了パス導出手段 1 3 5は、 現符号化パスの一つ前の 符号化パスが傾き指標値 F ( i , k ) の最大値を与える符号化パス k L であったと判断し、 この時点でのコードブロック i の一つ前の符号化パ スを符号化終了パスとして導出し、 符号化パス k を符号化終了パスと して変数 k ( i ) に保存し、 このコードブロックでの符号化を中断させ る。
ステップ S T 1 5 2において、 符号化終了パス導出手段 1 3 5は、 総 符号量のカウンタ R s umに、 現符号化パスでの発生符号量 R ( i , k ( i ) ) - R ( i , k ( i ) - l ) を加算して、 現符号化パスまでの総 符号量 R s umを算出する。 ステップ S T 1 5 3において、 符号化終了 パス導出手段 1 3 5は総符号量 R s umが目標符号量 Rm a Xに達して いるか否かを判断し、 総符号量 R s u mが目標符号量 R m a Xに達して いたならば、 符号化はここの時点で終了と判断し、 符号化終了の情報を エントロピー符号化手段 1 0 3に出力し、 各コードブロックで、 どの符 号化パスまで符号化したかの情報である符号化パス k ( i ) を符号化終 了パスとして符号デ一タ抽出手段 1 0 6に出力する。
ステップ S T 1 5 3において、 総符号量 R s u mが目標符号量 R m a xに達していないならば、 ステップ S T 1 5 4 , S T 1 5 5において、 ェントロピー符号化手段 1 0 3は、 全てのコードブロックについて、 次 のコードブロックでも同様に、 最大の傾き指標値 Fを与える符号化パス が符号化した最後の符号化パスでなくなるまで符号化を行い、 ステップ S T 1 5 6において、 エントロピー符号化手段 1 0 3は、 レート制御パ ラメ一夕 λのインデックス t をインクリメントし、 レート制御パラメ一 タ を次の候補に設定して、 再度、 全コードブロックの符号化を傾き指 標値 Fが最大となる符号化パスが現符号化パスでなくなるまで行う。
なお、 レート制御パラメ一夕の候補 λ ( t ) を更新しても、 傾き指標 値 Fの最大値を与える符号化パス K Lがその時点での最終符号化パスと ならない場合がある。 その場合は、 次の符号化パスの符号化を行わない ので、 ステップ S T 1 4 3、 S T 1 4 4において、 符号化終了パス導出 手段 1 3 5は傾き指標値 Fの最大値を与える符号化パス K Lがその時点 での最終符号化パス符号化済みの符号化パスでないことを検出して符号 化処理をスキップする。
この実施の形態 3では、 総符号量 R s u mが目標符号量 R m a xに達 するまで符号化を行っているが、 目標符号量 R m a Xの代わりに目標符 号化歪を設定し、 画面全体における各コードブロックの符号化歪 Dの総 和が目標符号化歪に達するまで符号化を行うことも可能である。
このように、 この実施の形態 3のレ一ト制御情報抽出手段 1 0 5は、 コ一ドブロックの符号量 Rと、 コードブロックの符号化歪 Dとレート制 御パラメータ λの積との和により各符号化パスの傾き指標値 Fを算出し 、 あるコードブロックで傾き指標値 Fが最大となる符号化パスを導出し 、 導出した傾き指標値 Fが最大となる符号化パスが現在符号化している 符号化パスでなくなるまで、 そのコードブロックにおける符号化パスの 符号化を行わせ、 各コードブロックの総符号量 R s u mが目標符号量 R m a Xに達した場合、 又は各コードブロックの符号化歪 Dの総和が目標 符号化歪に達した場合に、 符号化終了と判断すると共に、 総符号量 R s u mが目標符号量 R m a xに達しない場合、 又は符号化歪 Dの総和が目 標符号化歪に達しない場合には、 次のコ一ドブロックにおける各符号化 パスの符号化を行わせ、 全てのコ一ドブロックにおける各符号化パスの 符号化が終了した場合に、 与えられているレ一ト制御パラメ一夕えより 単調増加の値を示す他のレート制御パラメ一夕 λを使用して、 どのコー ドブロックにおけるどの符号化パスまで符号化するかを判断する。
以上のように、 この実施の形態 3によれば、 実際に符号化結果を出力 する符号化パスのみを対象として符号化を行うため、 全ての符号化パス を符号化する従来方法に比べて、 ェントロピ一符号化に要する演算量を 低減することができるという効果が得られる。 また、 総符号量が目標値 に達した段階で符号化を終了するので、 総符号量を目標符号量に合わせ 込むために収束演算を行う必要がなく、 レ一ト制御に必要な演算量を低 減することができるという効果が得られる。
さらに、 この実施の形態 3では、 除算を使用して傾き Sを算出するの ではなく、 乗算から算出される傾き指標値 Fを使用するために、 上記実 施の形態 1及び上記実施の形態 2に比べ、 レート制御における除算の演 算負荷をより低減することができるという効果が得られる。 産業上の利用可能性
以上のように、 この発明に係る画像符号化装置は、 エントロピ一符号 化及びレート制御に要する演算量を低減するのに適している。

Claims

請 求 の 範 囲
1 . ウェーブレツ ト変換により帯域分割された各サブバンドにおける 量子化されたウェーブレツ ト変換係数をコ一ドブロックに分割し、 各コ ードブロックをビッ トプレーンに変換し、 ビッ トプレーンを符号化パス に分割し、 符号化パス毎に符号化して符号データを出力するェントロピ 一符号化手段と、
符号化された符号化パス毎の符号デ一夕を格納する符号メモリ と、 各コードブロックの符号量の総和を示す総符号量又は各コ一ドブロッ クの符号化歪の総和、 各符号化パスとそれぞれ前の符号化パスを符号化 した際の符号化歪の歪差分と各符号化パスの符号量の出力バイ 卜数によ り算出した R D曲線の傾き、 及び各値が単調減少となっている与えられ た複数のレート制御パラメ一夕の逆数に基づき、 どのコードブロックに おけるどの符号化パスまで上記ェント口ピー符号化手段が符号化するか を判断し、 符号化終了となる符号化終了パスを出力するレー卜制御情報 抽出手段と、
上記レート制御情報抽出手段より出力された符号化終了パスにより定 まる符号化パスまでの符号データを上記符号メモリから読み出し、 各コ —ドブロックにおける符号化パス数を付加して符号ス 卜リームとして出 力する符号データ抽出手段とを備えた画像符号化装置。
2 . レート制御手段は、 各符号化パスとそれぞれ 1つ前の符号化パス を符号化した際の符号化歪の歪差分と各符号化パスの符号量の出力バイ ト数により R D曲線の傾きを算出し、 各コードブロックの符号量の総和 を示す総符号量、 又は各コードブロックの符号化歪の総和を算出し、 上 記総符号量が目標符号量に達した場合、 又は各コードブロックの上記符 号化歪の総和が目標符号化歪に達した場合に、 符号化終了と判断すると 共に、 上記総符号量が上記目標符号量に達しない場合、 又は上記符号化 歪の総和が上記目標符号化歪に達しない場合には、 上記傾きが与えられ たレート化制御パラメ一夕の逆数より小さくなるまで、 そのコードプロ ックにおける各符号化パスの符号化を行わせ、 上記傾きがレート制御パ ラメ一夕の逆数より小さくなつた場合に、 次のコードブロックにおける 各符号化パスの符号化を行わせ、 全てのコ一ドブロックにおける各符号 化パスの符号化が終了した場合に、 与えられているレート制御パラメ一 夕の逆数より単調減少の値を示す他のレート制御パラメ一夕の逆数を使 用して、 どのコードブロックにおけるどの符号化パスまで符号化するか を判断することを特徴とする請求の範囲第 1項記載の画像符号化装置。
3 . レー卜制御情報抽出手段は、 現符号化パス以前の符号化パスで現 符号化パスとの R D曲線の傾きが現符号化パス以前の符号化パスにおけ る傾きよりも小さくなる符号化パスと現符号化パス間での歪差分と出力 バイ 卜数の比を現符号化パスの傾きと補正し、 各コードブロックの符号 量の総和を示す総符号量、 又は各コードブロックの符号化歪の総和を算 出し、 上記総符号量が目標符号量に達した塲合、 又は各コードブロック の上記符号化歪の総和が目標符号化歪に達した場合に、 符号化終了と判 断すると共に、 上記総符号量が上記目標符号量に達しない場合、 又は上 記符号化歪の総和が上記目標符号化歪に達しない場合には、 上記補正し た傾きが与えられたレート制御パラメ一夕の逆数より小さくなるまで、 そのコードブロックにおける各符号化パスの符号化を行わせ、 上記補正 した傾きがレート制御パラメ一夕の逆数より小さくなつた場合に、 次の コ一ドブロックにおける各符号化パスの符号化を行わせ、 全てのコ一ド ブロックにおける各符号化パスの符号化が終了した場合に、 与えられて いる上記レート制御パラメ一夕の逆数より単調減少の値を示す他の符号 化制御パラメ一夕の逆数を使用して、 どのコードブロックにおけるどの 符号化パスまで符号化するかを判断することを特徴とする請求の範囲第 1項記載の画像符号化装置。
4 . ウェーブレッ ト変換により帯域分割された各サブバンドにおける 量子化されたウェーブレツ ト変換係数をコードブロックに分割し、 各コ —ドブロックをビッ トプレーンに変換し、 ビッ トプレーンを符号化パス に分割し、 符号化パス毎に符号化して符号データを出力するェントロピ 一符号化手段と、
符号化された符号化パス毎の符号データを格納する符号メモリ と、 各コ一ドブロックの符号量の総和を示す総符号量又は各コ一ドブロッ クの符号化歪の総和、 各コードブロックの符号量、 各コードブロックの 符号化歪、 及び各値が単調増加となっている与えられた複数のレー卜制 御パラメ一夕に基づき、 どのコードブロックにおけるどの符号化パスま で上記ェント口ピー符号化手段が符号化するかを判断し、 符号化終了と なる符号化終了パスを出力するレ一ト制御情報抽出手段と、
上記レー卜制御情報抽出手段より出力された符号化終了パスで定まる 符号化パスまでの符号データを上記符号メモリから読み出し、 各コード ブロックにおける符号化パス数を付加して符号ス トリームとして出力す る符号デ一夕抽出手段とを備えた画像符号化装置。
5 . レート制御情報抽出手段は、 コ一ドブロックの符号量と、 コード ブロックの符号化歪とレート制御パラメータの積との和により各符号化 パスの傾き指標値を算出し、 あるコードブロックで傾き指標値が最大と なる符号化パスを導出し、 導出した傾き指標値が最大となる符号化パス が現在符号化している符号化パスでなくなるまで、 そのコードブロック における符号化パスの符号化を行わせ、 各コードブロックの総符号量が 目標符号量に達した場合、 又は各コードブロックの符号化歪の総和が目 標符号化歪に達した場合に、 符号化終了と判断すると共に、 上記総符号 量が上記目標符号量に達しない場合、 又は上記符号化歪の総和が上記目 標符号化歪に達しない場合には、 次のコードブロックにおける各符号化 パスの符号化を行わせ、 全てのコードブロックにおける各符号化パスの 符号化が終了した場合に、 与えられているレート制御パラメ一夕より単 調増加の値を示す他のレート制御パラメータを使用して、 どのコ一ドブ ロックにおけるどの符号化パスまで符号化するかを判断することを特徵 とする請求の範囲第 4項記載の画像符号化装置。
PCT/JP2004/006974 2004-05-17 2004-05-17 画像符号化装置 WO2005112427A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
US11/579,453 US20080260275A1 (en) 2004-05-17 2004-05-17 Image Coding Apparatus
PCT/JP2004/006974 WO2005112427A1 (ja) 2004-05-17 2004-05-17 画像符号化装置
JP2006513488A JP4322920B2 (ja) 2004-05-17 2004-05-17 画像符号化装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2004/006974 WO2005112427A1 (ja) 2004-05-17 2004-05-17 画像符号化装置

Publications (1)

Publication Number Publication Date
WO2005112427A1 true WO2005112427A1 (ja) 2005-11-24

Family

ID=35394518

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/006974 WO2005112427A1 (ja) 2004-05-17 2004-05-17 画像符号化装置

Country Status (3)

Country Link
US (1) US20080260275A1 (ja)
JP (1) JP4322920B2 (ja)
WO (1) WO2005112427A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007267340A (ja) * 2006-03-30 2007-10-11 Mitsubishi Electric Corp 画像符号化装置
JP2012249167A (ja) * 2011-05-30 2012-12-13 Fujifilm Corp 画像データ符号化装置ならびにその動作制御方法およびそのプログラム

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2429593A (en) 2005-08-26 2007-02-28 Electrosonic Ltd Data compressing using a wavelet compression scheme
US8879632B2 (en) * 2010-02-18 2014-11-04 Qualcomm Incorporated Fixed point implementation for geometric motion partitioning
CN101841709A (zh) * 2010-03-29 2010-09-22 广东中大讯通信息有限公司 数字视频监控系统分流编码方法和视频监控系统
US8934725B1 (en) * 2010-08-30 2015-01-13 Accusoft Corporation Image coding and decoding methods and apparatus
US8983213B1 (en) 2010-08-30 2015-03-17 Accusoft Corporation Image coding and decoding methods and apparatus
CN103200407B (zh) * 2013-04-16 2016-05-18 中国科学院光电技术研究所 一种自适应熵编码器
US9992252B2 (en) 2015-09-29 2018-06-05 Rgb Systems, Inc. Method and apparatus for adaptively compressing streaming video

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004056605A (ja) * 2002-07-23 2004-02-19 Nippon Hoso Kyokai <Nhk> 符号量制御方法、符号量制御装置及び符号量制御プログラム
JP2004088164A (ja) * 2002-08-22 2004-03-18 Ricoh Co Ltd 画像処理装置
JP2004166254A (ja) * 2002-10-25 2004-06-10 Sony Corp 画像符号化装置及び方法、並びにプログラム及び記録媒体

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7106366B2 (en) * 2001-12-19 2006-09-12 Eastman Kodak Company Image capture system incorporating metadata to facilitate transcoding
JP2004326447A (ja) * 2003-04-24 2004-11-18 Sony Corp 画像合成装置及び方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004056605A (ja) * 2002-07-23 2004-02-19 Nippon Hoso Kyokai <Nhk> 符号量制御方法、符号量制御装置及び符号量制御プログラム
JP2004088164A (ja) * 2002-08-22 2004-03-18 Ricoh Co Ltd 画像処理装置
JP2004166254A (ja) * 2002-10-25 2004-06-10 Sony Corp 画像符号化装置及び方法、並びにプログラム及び記録媒体

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
2001, KLUWER ACADEMIC PUB, ISBN: 079237519X, article TAUBMAN D.S.: "Jpeg: Image Compression Fundamentals, Standards, and Practice." *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007267340A (ja) * 2006-03-30 2007-10-11 Mitsubishi Electric Corp 画像符号化装置
US7720297B2 (en) 2006-03-30 2010-05-18 Mitsubishi Electric Corporation Image coding apparatus
JP4680112B2 (ja) * 2006-03-30 2011-05-11 三菱電機株式会社 画像符号化装置
JP2012249167A (ja) * 2011-05-30 2012-12-13 Fujifilm Corp 画像データ符号化装置ならびにその動作制御方法およびそのプログラム

Also Published As

Publication number Publication date
US20080260275A1 (en) 2008-10-23
JPWO2005112427A1 (ja) 2008-03-27
JP4322920B2 (ja) 2009-09-02

Similar Documents

Publication Publication Date Title
JP4273996B2 (ja) 画像符号化装置及び方法、並びに画像復号装置及び方法
Artigas et al. The DISCOVER codec: architecture, techniques and evaluation
KR101695681B1 (ko) 상황-기반의 적응형 이진 산술 코딩(cabac)비디오 스트림 준수
US8111934B2 (en) Extension of two-dimensional variable length coding for image compression
WO2004105398A1 (en) Combined runlength coding and variable length coding for video compression
JP2001525639A (ja) 画像信号符号化システムおよびプロセスのための適応量子化フレームワークにおける適応エントロピー符号化
JP2014519215A (ja) データをロッシー圧縮符号化する方法および装置、および、データを再構築する対応する方法および装置
KR20060122684A (ko) 영상 신호의 인코딩 및 디코딩 방법
US11475600B2 (en) Method and device for digital data compression
WO2005112427A1 (ja) 画像符号化装置
CN1262815A (zh) 在传输系统中的无损编码/解码
Perra et al. High-frequency error recovery in JPEG XR coded images
CN1622634A (zh) 转换压缩的视频分辨率的装置和方法
JP4680112B2 (ja) 画像符号化装置
KR100813001B1 (ko) 차분신호의 크기와 부호의 분리를 이용한 동영상부호화/복호화 장치 및 그 방법
WO2016025281A1 (en) Method for coding pulse vectors using statistical properties
Brites et al. Probability updating for decoder and encoder rate control turbo based Wyner-Ziv video coding
CN1848960A (zh) 使用非标准化矢量量化编码器的符合视频标准的残差编码
WO2016025283A1 (en) Method for coding pulse vectors using statistical properties
JP4086424B2 (ja) 符号化装置
KR20020059923A (ko) 웨이브렛 이론을 이용한 동영상 압축/복원 장치 및 그 방법
WO2022073789A1 (en) Data encoding and decoding
JP6526629B2 (ja) 特に「レンジコーダ」又は算術圧縮による,特に圧縮画像を符号化する方法
WO2004080080A1 (en) Apparatus and method for compression and decompression of digital data
JPH09214356A (ja) 可変長符号化方法・復号方法および可変長符号化装置・復号装置

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2006513488

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11579453

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

WWW Wipo information: withdrawn in national office

Country of ref document: DE

122 Ep: pct application non-entry in european phase