DECODING DEVICE AND CONTROL METHOD OF DECODING DEVICE

20200359055 ยท 2020-11-12

    Inventors

    Cpc classification

    International classification

    Abstract

    A decoding device includes a decoding processing unit which outputs a transform coefficient matrix with mn elements, EOB information and ZRL information, and a two-dimensional IDCT processing unit. The two-dimensional IDCT processing unit includes an IDCT determination unit which determines the number of elements in a row direction and a column direction required to select the mn element IDCT processing or the pq element IDCT processing based on the transform coefficient matrix with the mn elements, the EOB information, and the ZRL information, an mn IDCT processing unit which performs the mn element IDCT processing, and a pq IDCT processing unit which performs the pq element IDCT processing. The mn IDCT processing unit and the pq IDCT processing unit selectively performs the mn element IDCT processing or the pq element IDCT processing based on a determination result by the IDCT determination unit.

    Claims

    1. A decoding device which performs mn element Inverse Discrete Cosine Transform (IDCT) processing or pq element IDCT processing on a transform coefficient matrix with mn elements on which Discrete Cosine Transform (DCT) processing has been performed for each block of mn pixels, the m, n, p and q being natural numbers of 2 or more and having a relationship of m>p and nq, or mp and n>q, the decoding device comprising: a decoding processing unit configured to decode an encoded transform coefficient sequence, to output the transform coefficient matrix with the mn elements obtained by rearranging a decoded transform coefficient sequence in a form of a zigzag scan matrix, End-Of-Block (EOB) information indicating a location of a last coefficient which in not 0 in the transform coefficient matrix with the mn elements, Zero-Run-Length (ZRL) information indicating the number of coefficients which is 0 between the last coefficient which is not 0, and a coefficient which is not 0 and which is located immediately before the last coefficient which is not 0 in the transform coefficient matrix with the mn elements; and a two-dimensional IDCT processing unit configured to perform the mn element IDCT processing or the pq element IDCT processing on the transform coefficient matrix with the mn elements, wherein all of the mn elements of the transform coefficient matrix with the mn elements are processed as effective elements in the mn element IDCT processing, wherein pq elements located in a low frequency side region of the transform coefficient matrix with the mn elements are processed as effective elements in the pq element IDCT processing, wherein the two-dimensional IDCT processing unit comprises: an IDCT determination unit configured to determine the number of elements in a row direction and a column direction required to select the mn element IDCT processing or the pq element IDCT processing based on the transform coefficient matrix with the mn elements, the EOB information and the ZRL information; an mn IDCT processing unit configured to perform the mn element IDCT processing; and a pq IDCT processing unit configured to perform the pq element IDCT processing, wherein the mn IDCT processing unit and the pq IDCT processing unit are configured to selectively perform the mn element IDCT processing or the pq element IDCT processing on the transform coefficient matrix with the mn elements based on a determination result by the IDCT determination unit, and to restore image data for each block of mn pixels.

    2. The decoding device according to claim 1, wherein the IDCT determination unit is configured to: if a scan number indicated in the EOB information is a maximum scan number among scan numbers of coefficients included in the pq elements, determine whether all of coefficients of scan numbers between a coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0 based on the ZRL information, and if it is determined that all of the coefficients of the scan numbers between the coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0, determine that the pq element IDCT processing is to be performed.

    3. The decoding device according to claim 1, wherein the IDCT determination unit is configured to: if a scan number indicated in the EOB information is a maximum scan number among scan numbers of coefficients included in the pq elements, determine whether all of coefficients of scan numbers between a coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0 based on the ZRL information, and if it is determined that all of the coefficients of the scan numbers between the coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are not 0, determine that the mn element IDCT processing is to be performed.

    4. The decoding device according to claim 1, wherein the IDCT determination unit comprises: an EOB determination unit configured to determine whether one of the mn element IDCT processing, the pq element IDCT processing and zero-coefficient determination processing is to be performed and to output an EOB determination result; a zero-coefficient determination unit configured to determine one of the mn element IDCT processing and the pq element IDCT processing is to be performed based on the transform coefficient matrix with the mn elements, the EOB information and the ZRL information and to output a zero-coefficient determination result, if the EOB determination result indicating that the zero-coefficient determination processing is to be performed is received; and an IDCT processing selection unit configured to generate a selection signal indicating that the mn element IDCT processing is to be performed if the EOB determination result indicating that the mn element IDCT processing is to be executed or the zero-coefficient determination result indicating that the mn element IDCT processing is to be performed is received, and to generate the selection signal indicating that the pq element IDCT processing is to be performed if the EOB determination result indicating that the pq element IDCT processing is to be executed or the zero-coefficient determination result indicating that the pq element IDCT processing is to be performed is received, wherein the mn IDCT processing unit and the pq IDCT processing unit are configured to selectively perform the mn element IDCT processing or the pq element IDCT processing on the transform coefficient matrix with the mn elements based on the selection signal.

    5. The decoding device according to claim 4, wherein the zero-coefficient determination unit is configured to: if a scan number indicated in the EOB information is a maximum scan number among scan numbers of coefficients included in the pq elements, determine whether all of coefficients of scan numbers between a coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0 based on the ZRL information, and if it is determined that all of the coefficients of the scan numbers between the coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0, determine that the pq element IDCT processing is to be performed.

    6. The decoding device according to claim 4, wherein the zero-coefficient determination unit is configured to: if a scan number indicated in the EOB information is a maximum scan number among scan numbers of coefficients included in the pq elements, determine whether all of coefficients of scan numbers between a coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0 based on the ZRL information, and if it is determined that all of the coefficients of the scan numbers between the coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are not 0, determine that the mn element IDCT processing is to be performed.

    7. The decoding device according to claim 4, wherein the EOB determination unit is configured to: determine whether a scan number indicated in the EOB information is less than a minimum scan number among scan numbers of coefficients which are not included in the pq elements; determine that the pq element IDCT processing is to be performed if the scan number indicated in the EOB information is less than the minimum scan number is determined; determine whether the scan number indicated in the EOB information is more than a maximum scan number among scan numbers of coefficients which are included in the pq elements; determine that the mn element IDCT processing is to be performed if the scan number indicated in the EOB information is more than the maximum scan number is determined; determine whether the scan number indicated in the EOB information is equal to or more than the minimum scan number, and is equal to or less than the maximum scan number; and determine that the zero-efficient determination processing is to be performed if the scan number indicated in the EOB information is equal to or more than the minimum scan number, and is equal to or less than the maximum scan number is determined.

    8. The decoding device according to claim 1, wherein the m and n are 8, respectively and wherein the p and q are 4, respectively.

    9. The decoding device according to claim 8, wherein the IDCT determination unit is configured to: determine whether the ZRL information is 5 or more if a scan number indicated in the EOB information is 24; and if the ZRL information is 5 or more is determined, determine that all coefficients of scan numbers 19 to 23 in the transform coefficient matrix with the 88 elements are 0, and that the 44 element IDCT processing is to be performed.

    10. The decoding device according to claim 8, wherein the IDCT determination unit is configured to: determine whether the ZRL information is 5 or more if a scan number indicated in the EOB information is 24; and if the ZRL information is not 5 or more is determined, determine that any of the coefficients of scan numbers 19 to 23 in the transform coefficient matrix with the 88 elements include a coefficient which is not 0, and that the 88 element IDCT processing is to be performed.

    11. The decoding device according to claim 8, wherein the IDCT determination unit comprises: an EOB determination unit configured to determine whether one of the 88 element IDCT processing, the 44 element IDCT processing and zero-coefficient determination processing is to be performed and to output an EOB determination result; a zero-coefficient determination unit configured to determine one of the 88 element IDCT processing and the 44 element IDCT processing is to be performed based on the transform coefficient matrix with the 88 elements, the EOB information and the ZRL information and to output a zero-coefficient determination result, if the EOB determination result indicating that the zero-coefficient determination processing is to be performed is received; and an IDCT processing selection unit configured to generate a selection signal indicating that the 88 element IDCT processing is to be performed if the EOB determination result indicating that the 88 element IDCT processing is to be executed or the zero-coefficient determination result indicating that the 88 element IDCT processing is to be performed is received, and to generate the selection signal indicating that the 44 element IDCT processing is to be performed if the EOB determination result indicating that the 44 element IDCT processing is to be executed or the zero-coefficient determination result indicating that the 44 element IDCT processing is to be performed is received, wherein the mn IDCT processing unit and the pq IDCT processing unit are configured to selectively perform the 88 element IDCT processing or the 44 element IDCT processing on the transform coefficient matrix with the 88 elements based on the selection signal.

    12. The decoding device according to claim 11, wherein the zero-coefficient determination unit is configured to: determine whether the ZRL information is 5 or more if a scan number indicated in the EOB information is 24; and if the ZRL information is 5 or more is determined, determine that all coefficients of scan numbers 19 to 23 in the transform coefficient matrix with the 88 elements are 0, and that the 44 element IDCT processing is to be performed.

    13. The decoding device according to claim 11, wherein the zero-coefficient determination unit is configured to: determine whether the ZRL information is 5 or more if a scan number indicated in the EOB information is 24; and if the ZRL information is not 5 or more is determined, determine that any of the coefficients of scan numbers 19 to 23 in the transform coefficient matrix with the 88 elements include a coefficient which is not 0, and that the 88 element IDCT processing is to be performed.

    14. The decoding device according to claim 11, wherein the EOB determination unit is configured to: determine whether a scan number indicated in the EOB information is less than 10; determine that the 44 element IDCT processing is to be performed if the scan number indicated in the EOB information is less than 10 is determined; determine whether the scan number indicated in the EOB information is more than 24; determine that the 88 element IDCT processing is to be performed if the scan number indicated in the EOB information is more than 24 is determined; determine whether the scan number indicated in the EOB information is 10 or more, and is 24 or less; and determine that the zero-efficient determination processing is to be performed if the scan number indicated in the EOB information is 10 or more, and is 24 or less is determined.

    15. The decoding device according to claim 1, wherein the decoding processing unit comprising: an entropy decoding unit configured to decode encoded data including the encoded transform coefficient sequence, and to output the decoded transform coefficient sequence, the EOB information and the ZRL information obtained by decoding the encoded data; a zigzag scan processing unit configured to generate the transform coefficient matrix with the mn elements obtained by rearranging the decoded transform coefficient sequence in the form of the zigzag scan matrix; and an inverse quantization processing unit configured to perform inverse quantization processing by multiplying each element of the transform coefficient matrix with the mn elements by each element of a quantization matrix with mn elements, wherein the transform coefficient matrix with the mn elements inversely quantized by the inverse quantization processing unit is output to the two-dimensional IDCT processing unit.

    16. The decoding device according to claim 15, wherein the inverse quantization processing unit is configured to output a quantization coefficient value (Q value) used for determining a value of each element of the quantization matrix with the mn elements to the IDCT determination unit as Q value information, wherein the IDCT determination unit comprises: an EOB determination unit configured to determine whether one of the mn element IDCT processing, the pq element IDCT processing and zero-coefficient determination processing is to be performed and to output an EOB determination result; a Q value determination unit comprising a Q determination value register storing a Q determination value, and configured to determine whether one of the mn element IDCT processing and the zero-coefficient determination processing is to be performed based on the Q value obtained by the Q value information and the Q determination value stored in the Q determination value register to output a Q value determination result if the EOB determination result indicating that the zero-coefficient determination processing is to be performed is received; a zero-coefficient determination unit configured to determine one of the mn element IDCT processing and the pq element IDCT processing is to be performed based on the transform coefficient matrix with the mn elements, the EOB information and the ZRL information and to output a zero-coefficient determination result, if the Q value determination result indicating that the zero-coefficient determination processing is to be performed is received; and an IDCT processing selection unit configured to generate a selection signal indicating that the mn element IDCT processing is to be performed if the EOB determination result indicating that the mn element IDCT processing is to be executed, the Q value determination result indicating that the mn element IDCT processing is to be performed or the zero-coefficient determination result indicating that the mn element IDCT processing is to be performed is received, and to generate the selection signal indicating that the pq element IDCT processing is to be performed if the EOB determination result indicating that the pq element IDCT processing is to be executed or the zero-coefficient determination result indicating that the pq element IDCT processing is to be performed is received, wherein the mn IDCT processing unit and the pq IDCT processing unit are configured to selectively perform the mn element IDCT processing or the pq element IDCT processing on the transform coefficient matrix with the mn elements based on the selection signal.

    17. The decoding device according to claim 15, wherein the entropy decoding unit is configured to output, to the DCT determination unit, encoding type information indicating whether the encoded data is encoded by intra-coding or inter-coding, wherein the IDCT determination unit comprises: an EOB determination unit configured to determine whether one of the mn element IDCT processing, the pq element IDCT processing and zero-coefficient determination processing is to be performed and to output an EOB determination result; an encoding type determination unit configured to determine whether one of the mn element IDCT processing and the zero-coefficient determination processing is to be performed based on the encoding type information to output an encoding type determination result if the EOB determination result indicating that the zero-coefficient determination processing is to be performed is received; a zero-coefficient determination unit configured to determine one of the mn element IDCT processing and the pq element IDCT processing is to be performed based on the transform coefficient matrix with the mn elements, the EOB information and the ZRL information and to output a zero-coefficient determination result, if the encoding type determination result indicating that the zero-coefficient determination processing is to be performed is received; and an IDCT processing selection unit configured to generate a selection signal indicating that the mn element IDCT processing is to be performed if the EOB determination result indicating that the mn element IDCT processing is to be executed, the encoding type determination result indicating that the mn element IDCT processing is to be performed or the zero-coefficient determination result indicating that the mn element IDCT processing is to be performed is received, and to generate the selection signal indicating that the pq element IDCT processing is to be performed if the EOB determination result indicating that the pq element IDCT processing is to be executed or the zero-coefficient determination result indicating that the pq element IDCT processing is to be performed is received, wherein the mn IDCT processing unit and the pq IDCT processing unit are configured to selectively perform the mn element IDCT processing or the pq element IDCT processing on the transform coefficient matrix with the mn elements based on the selection signal.

    18. A control method of a decoding device which includes a decoding processing unit and a two-dimensional Inverse Discrete Cosine Transform (IDCT) processing unit, and performs mn element IDCT processing or pq element IDCT processing on a transform coefficient matrix with mn elements on which Discrete Cosine Transform (DCT) processing has been performed for each block of mn pixels, the m, n, p and q being natural numbers of 2 or more and having a relationship of m>p and nq, or mp and n>q, the control method of the decoding device comprising: decoding an encoded data including an encoded transform coefficient sequence by the decoding processing unit; and performing configured to perform the mn element IDCT processing or the pq element IDCT processing on the transform coefficient matrix with the mn elements by the two-dimensional IDCT processing unit, wherein all of the mn elements of the transform coefficient matrix with the mn elements are processed as effective elements in the mn element IDCT processing, wherein pq elements located in a low frequency side region of the transform coefficient matrix with the mn elements are processed as effective elements in the pq element IDCT processing, wherein the decoding comprises: outputting the transform coefficient matrix with the mn elements obtained by rearranging a decoded transform coefficient sequence in a form of a zigzag scan matrix; outputting End-Of-Block (EOB) information indicating a location of a last coefficient which is not 0 in the transform coefficient matrix with the mn elements; and outputting Zero-Run-Length (ZRL) information indicating the number of coefficients which is 0 between the last coefficient which is not 0, and a coefficient which is not 0 and which is located immediately before the last coefficient which is not 0 in the transform coefficient matrix with the mn elements, wherein the performing comprises: determining the number of elements in a row direction and a column direction required to select the mn element IDCT processing or the pq element IDCT processing based on the transform coefficient matrix with the mn elements, the EOB information and the ZRL information; and selectively performing the mn element IDCT processing or the pq element IDCT processing on the transform coefficient matrix with the mn elements based on a determination result by the determining to restore image data for each block of mn pixels.

    19. The control method of the decoding device according to claim 18, wherein the determining comprises: confirming whether a scan number indicated in the EOB information is a maximum scan number among scan numbers of coefficients included in the pq elements; if it is confirmed that the scan number indicated in the EOB information is the maximum scan number, determining whether all of coefficients of scan numbers between a coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0 based on the ZRL information, and if it is determined that all of the coefficients of the scan numbers between the coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0, determining that the pq element IDCT processing is to be performed.

    20. The control method of the decoding device according to claim 18, wherein the determining comprises: confirming whether a scan number indicated in the EOB information is a maximum scan number among scan numbers of coefficients included in the pq elements; if it is confirmed that the scan number indicated in the EOB information is the maximum scan number, determining whether all of coefficients of scan numbers between a coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are 0 based on the ZRL information, and if it is determined that all of the coefficients of the scan numbers between the coefficient of the maximum scan number, and the coefficient of the scan number located immediately before the coefficient of the maximum scan number and included in the pq elements are not 0, determining that the mn element IDCT processing is to be performed.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0011] FIG. 1 is a diagram for explaining a scan order of a zigzag scan matrix.

    [0012] FIG. 2 is a diagram showing an example of coefficient distribution of a transform coefficient matrix.

    [0013] FIG. 3 is a diagram showing an example of the coefficient distribution of the transform coefficient matrix.

    [0014] FIG. 4 is a diagram for explaining zero-coefficient determination processing.

    [0015] FIG. 5 is a block diagram showing an example of a configuration of a decoding device according to one embodiment.

    [0016] FIG. 6 is a block diagram showing an example of a configuration of a decoding processing unit according to one embodiment.

    [0017] FIG. 7 is a block diagram showing an example of a configuration of an IDCT determination unit according to one embodiment.

    [0018] FIG. 8 is a flowchart showing an example of a processing flow of an EOB determination unit according to one embodiment.

    [0019] FIG. 9 is a flowchart showing an example of a processing flow of a zero-coefficient determination unit according to one embodiment.

    [0020] FIG. 10 is a diagram for explaining a plurality of examples of the zero-coefficient determination processing.

    [0021] FIG. 11 is a block diagram showing an example of a configuration of a decoding device according to one embodiment.

    [0022] FIG. 12 is a block diagram showing an example of a configuration of a decoding processing unit according to one embodiment.

    [0023] FIG. 13 is a block diagram showing an example of a configuration of an IDCT determination unit according to one embodiment.

    [0024] FIG. 14 is a flowchart showing an example of a processing flow of a Q value determination unit according to one embodiment.

    [0025] FIG. 15 is a block diagram showing an example of a configuration of a decoding device according to one embodiment.

    [0026] FIG. 16 is a block diagram showing an example of a configuration of a decoding processing unit according to one embodiment.

    [0027] FIG. 17 is a block diagram showing an example of a configuration of an IDCT determination unit according to one embodiment.

    [0028] FIG. 18 is a flowchart showing an example of a processing flow of an encoding type determination unit according to one embodiment.

    DETAILED DESCRIPTION

    [0029] Prior to descriptions of embodiments, the background leading to the following embodiments will be described. The present inventor has investigated a method for realizing high-speed decoding processing by stopping the method of creating the inverse orthogonal matrix by rearranging the column vectors described in Patent Document 1, and by performing the IDCT processing by switching between two types of IDCT processing units in accordance with the decoded transform coefficient matrix.

    [0030] The decoding device investigated by the present inventor has a decoding processing unit and a two-dimensional IDCT processing unit. The decoding processing unit performs decoding processing on encoded data obtained by encoding for each block of 88 pixels. The decoding processing unit rearranges a transform coefficient sequence obtained by decoding processing into two dimensions using a form of a zigzag scan matrix, and generates a transform coefficient matrix which is spatial frequency data.

    [0031] FIG. 1 is a diagram for explaining a scan order of a zigzag scan matrix. FIG. 1 shows an 88 matrix having 64 elements with 88=64 squares. Numbers 0 to 63 (scan numbers) and arrows shown in FIG. 1 show the scan order of the zigzag scan matrix. The decoding processing unit generates a transform coefficient matrix with 88 elements by rearranging the transform coefficient sequence obtained by the decoding processing into locations according to the scan numbers shown in the zigzag scan matrix of FIG. 1.

    [0032] The data obtained by the decoding includes End-Of-Block (EOB) information indicating the end of the block. The EOB information is information indicating the location of the last coefficient which is not 0, i.e., the last valid coefficient, in the transform coefficient matrix rearranged in the form of the zigzag scan matrix shown in FIG. 1, and is indicated by the scan number in FIG. 1. For example, if the EOB information indicates the scan number 20, all the coefficients after the scan number 21 are 0.

    [0033] The two-dimensional IDCT processing unit receives a transform coefficient matrix with 88 elements and EOB-information from the decoding processing unit. The two-dimensional IDCT processing unit includes an 88 IDCT processing unit and a 44 IDCT processing unit, and can perform two types of IDCT processing on the received transform coefficient matrix.

    [0034] The 88 IDCT processing unit performs IDCT processing using all the elements of the received transform coefficient matrix with the 88 elements as effective elements. Hereinafter, the transform coefficient matrix with the 88 elements is also referred to as an 88 transform coefficient matrix. The IDCT processing performed using the 88 elements as the effective elements is also referred to as 88 IDCT processing.

    [0035] On the other hand, the 44 IDCT processing unit performs IDCT processing using 44 elements located in a low frequency side region of the received transform coefficient matrix with the 88 elements, as effective elements. The low frequency side region where the 44 element is located corresponds to, for example, a 44 region shown in FIG. 1. Hereinafter, the transform coefficient matrix with the 44 elements is also referred to as a 44 transform coefficient matrix. The IDCT processing performed using the 44 elements as the effective element is also referred to as a 44 IDCT processing.

    [0036] The two-dimensional IDCT processing unit determines whether or not there is a coefficient which is not 0 outside the 44 region in FIG. 1 based on the EOB information, and performs either the 88 IDCT processing or the 44 IDCT processing based on the result of the determination.

    [0037] More specifically, when the scan number indicated in the EOB information is less than 10, the two-dimensional IDCT processing unit determines that the coefficients that are not 0, that is, all of the effective coefficients are inside the 44 region, and performs the 44 IDCT processing by the 44 IDCT processing unit. On the other hand, when the scan number indicated in the EOB information is 10 or more, the two-dimensional IDCT processing unit determines that the coefficient which is not 0, i.e., the effective coefficient, is outside the 44 region, and performs the 88 IDCT processing by the 88 IDCT processing unit.

    [0038] In this manner, the two-dimensional IDCT processing unit performs the IDCT processing by switching between the 88 IDCT processing unit and the 44 IDCT processing unit based on the EOB information. In the 44 IDCT processing, the calculation amount is reduced to half or less of that in the 88 IDCT processing. If all of the coefficients outside the 44 region are 0, the result of the 44 IDCT processing will be the same as that of the 88 IDCT processing. In other words, the 44 IDCT processing is performed instead of the 88 IDCT processing in accordance with the distribution state of the transform coefficients, thereby speeding up the decoding processing.

    [0039] However, in the method of performing the IDCT processing by switching between the 88 IDCT processing unit and the 44 IDCT processing unit based on the EOB information, depending on the coefficient distribution of the 88 transform coefficient matrix, it may not be possible to enjoy the advantage of speeding up by the 44 IDCT processing.

    [0040] FIG. 2 is a diagram showing an example of the coefficient distribution of the 88 transform coefficient matrix when the EOB information indicates the scan number 9. 1(9) in FIG. 2 indicates that the coefficient 1 of the scan number 9 is the last coefficient which is not 0 in the 88 transform coefficient matrix shown in FIG. 2.

    [0041] In the case of the coefficient distribution shown in FIG. 2, since the EOB information indicates the scan number 9, the 44 IDCT processing unit is selected. Since all of the coefficients outside the 44 region are 0, the 44 IDCT processing speeds up the decoding processing.

    [0042] On the other hand, FIG. 3 is a diagram showing an example of the coefficient distribution of the 88 transform coefficient matrix when the EOB information indicates the scan number 24. 1(24) in FIG. 3 indicates that the coefficient 1 of the scan number 24 is the last coefficient which is not 0 in the 88 transform coefficient matrix shown in FIG. 3.

    [0043] In the case of the coefficient distribution shown in FIG. 3, since the EOB information indicates the scan number 24, the 88 IDCT processing is selected. However, as shown in FIG. 3, since all of the coefficients outside the 44 region are 0, the 44 IDCT processing should be applied originally. That is, in the example of the coefficient distribution shown in FIG. 3, since the 88 IDCT processing unit and the 44 IDCT processing unit are switched only by the EOB information, the coefficient distribution cannot enjoy the advantage of the high-speed processing by the 44 IDCT processing. In order to properly switch between the 88 IDCT processing unit and the 44 IDCT processing unit, not only the EOB information but also the coefficient distributions of the 88 transform coefficient matrix need to be accurately grasped.

    [0044] FIG. 4 is a diagram for explaining zero-coefficient determination processing in the case where the EOB information indicates the scan number 11 to 13, 17, 18, or 24. As shown in FIG. 4, when the EOB information indicates 11, 12, or 13, the two-dimensional IDCT processing unit determines whether or not the coefficient of the scan number 10, which is the coefficient outside the 44 region, is 0. If the coefficient of the scan number 10 is 0, the two-dimensional IDCT processing unit can select the 44 IDCT processing unit.

    [0045] When the EOB information indicates 17 or 18, the two-dimensional IDCT processing unit determines whether or not all of the coefficients of the scan numbers 10, and 14 to 16, which are the coefficients outside the 44 region, are 0. If all of the coefficients of the scan numbers 10, and 14 to 16 are 0, the two-dimensional IDCT processing unit can select the 44 IDCT processing unit.

    [0046] When the EOB information indicates 24, the two-dimensional IDCT processing unit determines whether or not all of the coefficients of the scan numbers 10, 14 to 16, and 19 to 23, which are the coefficients outside the 44 region are 0. If all of the coefficients of the scan numbers 10, 14, to 16, and 19 to 23 are 0, the two-dimensional IDCT processing unit can select the 44 IDCT processing unit.

    [0047] As described above, when the EOB information indicates the scan number 11 to 13, 17, 18, or 24, the two-dimensional IDCT processing unit can accurately grasp the coefficient distribution of the 88 transform coefficient matrix by determining whether or not the coefficients outside the 44 region are 0. As a result, the two-dimensional IDCT processing unit can appropriately switch between the 88 IDCT processing unit and the 44 IDCT processing unit.

    [0048] However, the processing amount is increased by the zero-coefficient determination processing of whether or not the coefficients outside the 44 region are 0. In particular, when the EOB information indicates the scan number 24, the zero-coefficient determination processing for the 9 coefficients of the scan numbers 10, 14 to 16, and 19 to 23 becomes necessary, and the processing amount increases remarkably. In this instance, even if the 88 IDCT processing unit and the 44 IDCT processing unit can be appropriately switched, there is a possibility that the merit of the speed-up by the 44 IDCT processing may be offset by the increase in the processing amount of the zero-coefficient determination processing. Further, depending on image data to be processed, not only the merit of the high-speed by the 44 IDCT processing is offset, but also the decoding processing is delayed in some cases. The present inventor has investigated a decoding device capable of reducing the processing amount for accurately grasping the coefficient distribution of the 88 transform coefficient matrix while improving the utilization rate of 44 IDCT processing, and as a result, the following embodiments have been conceived.

    [0049] Hereinafter, a decoding device according to on embodiment will be described in detail by referring to the drawings. In the specification and the drawings, the same or corresponding components are denoted by the same reference numerals, and a repetitive description thereof is omitted. In the drawings, for convenience of description, the configuration may be omitted or simplified. Also, each of the embodiments may be optionally combined with at least some of the other embodiments.

    First Embodiment

    [0050] FIG. 5 is a block diagram showing an example of a configuration of a decoding device according to a first embodiment. As shown in FIG. 5, a decoding device 100 receives encoded data on which DCT processing for each block of 88 pixels is performed and then which is encoded by an encoding device. The decoding device 100 performs decoding processing and IDCT processing on the received encoded data to restore image data for each block 88 pixels. The decoding device 100 outputs the restored image data for each block of the 88 pixels.

    [0051] The decoding device 100 includes a decoding processing unit 110 and a two-dimensional IDCT processing unit 120. The decoding processing unit 110 performs decoding processing on the encoded data to generate a decoded transform coefficient sequence. The decoding processing unit 110 rearranges the decoded transform coefficient sequence at the location according to the scan numbers shown in the zigzag scan matrix of FIG. 1, and generates an 88 transform coefficient matrix which is spatial frequency data. The decoding processing unit 110 is connected to the two-dimensional IDCT processing unit 120, and outputs the generated 88 transform coefficient matrix to the two-dimensional IDCT processing unit 120.

    [0052] The decoding processing unit 110 also outputs EOB information and Zero-Run-Length (ZRL) information to the two-dimensional IDCT processing unit 120. The EOB information and the ZRL information are information obtained by decoding the encoded data. As described above, The EOB information is information indicating the location of the last coefficient which is not 0, i.e., the last effective coefficient, in the transform coefficient matrix rearranged in the form of the zigzag scan matrix, and is indicated by the scan number.

    [0053] On the other hand, the ZRL information is information indicating the number of coefficients which is 0 between the last coefficient which is not 0 and indicated by the EOB information, and a coefficient which is not 0 and located immediately before the last coefficient which is not 0. For example, in the example of the 88 transform coefficient matrix shown in FIG. 2, since the EOB information indicates the scan number 9 and the coefficient which is not 0 and located immediately before the scan number 9 is the scan number 8, the number of coefficients which is 0 and between the coefficient (1) of the scan number 9 and the coefficient (2) of the scan number 8 is 0. Therefore, the ZRL information is 0.

    [0054] Further, in the example of the 88 transform coefficient matrix shown in FIG. 3, since the EOB information indicates the scan number 24 and the coefficient which is not 0 and located immediately before the scan number 24 is the scan number 9, the number of coefficients which is 0 and between the coefficient (1) of the scan number 24 and the coefficient (1) of the scan number 9 is 14. Therefore, the ZRL information is 14.

    [0055] The two-dimensional IDCT processing unit 120 includes an IDCT determination unit 130, an 88 IDCT processing unit 141, and a 44 IDCT processing unit 142. The IDCT determination unit 130 is connected to the decoding processing unit 110, and receives an 88 transform coefficient matrix, EOB information, and ZRL information. The IDCT determination unit 130 determines the number of elements in the row direction and the column direction required to select the 88 IDCT processing or the 44 IDCT processing based on the 88 transform coefficient matrix, the EOB information, and the ZRL information. The IDCT determination unit 130 generates a selection signal for selecting one of the 88 IDCT processing and the 44 IDCT processing based on the determined number of elements in the row direction and the column direction. The generated selection signal is output to the 88 IDCT processing unit 141 and the 44 IDCT processing unit 142.

    [0056] The 88 IDCT processing unit 141 is connected to the decoding processing unit 110 and the IDCT determination unit 130. When the 88 IDCT processing unit 141 receives the selection signal indicating that the 88 IDCT processing is to be performed from the IDCT determination unit 130, the 88 IDCT processing unit 141 performs the IDCT processing using, as effective elements, all the elements of the transform coefficient matrix with the 88 elements received from the decoding processing unit 110. The 88 IDCT processing unit 141 performs the 88 IDCT processing on the 88 transform coefficient matrix to restore image data for each block of 88 pixels.

    [0057] The 44 IDCT processing unit 142 is connected to the decoding processing unit 110 and the IDCT determination unit 130. When the 44 IDCT processing unit 142 receives the selection signal indicating that the 44 IDCT processing is to be performed from the IDCT determination unit 130, the 44 IDCT processing unit 142 performs the IDCT processing using, as effective elements, the 44 elements located in the low frequency side region of the transform coefficient matrix with the 88 elements received from the decoding processing unit 110. The low frequency side region corresponds to, for example, the 44 region shown in FIG. 1. The 44 IDCT processing unit 142 restores image data for each block of the 88 pixels by performing the 44 IDCT processing on the 88 transform coefficient matrix.

    [0058] As described above, the 88 IDCT processing unit 141 and the 44 IDCT processing unit 142 selectively perform the 88 IDCT processing or the 44 IDCT processing on the 88 transform coefficient matrix based on the determination result by the IDCT determination unit 130, and restore the image data for each block of the 88 pixels.

    [0059] FIG. 6 is a block diagram showing an example of a configuration of the decoding processing unit 110 according to the first embodiment. As shown in FIG. 6, the decoding processing unit 110 includes an entropy decoding unit 111, a zigzag scan processing unit 112, and an inverse quantization processing unit 113.

    [0060] The entropy decoding unit 111 receives an entropy encoded sequence which is encoded data obtained by entropy encoding processing. The entropy encoded sequence is encoded using, for example, a Huffman code which is a type of entropy encoding. In this case, the entropy decoding unit 111 performs decoding processing of a Huffman code on the received entropy encoded sequence. The entropy decoding unit 111 is connected to the zigzag scan processing unit 112, and outputs the decoded transform coefficient sequence to the zigzag scan processing unit 112. The entropy decoding unit 111 outputs the EOB information and the ZRL information obtained by decoding the encoded data to the two-dimensional IDCT processing unit 120.

    [0061] The zigzag scan processing unit 112 receives the decoded transform coefficient sequence from the entropy decoding unit 111. The zigzag scan processing unit 112 rearranges the decoded transform coefficient sequence into the location according to the scan numbers shown in the zigzag scan matrix of FIG. 1, and generates an 88 transform coefficient matrix. The zigzag scan processing unit 112 is connected to the inverse quantization processing unit 113, and outputs the generated 88 transform coefficient matrix to the inverse quantization processing unit 113.

    [0062] In the MPEG method and the JPEG method, an encoding device performs quantization processing by dividing each element of a transform coefficient matrix after DCT processing is performed by each element of a quantization matrix. As a result, the data is compressed. Therefore, the inverse quantization processing unit 113 performs inverse quantization processing using the quantization matrix used in encoding.

    [0063] Specifically, the inverse quantization processing unit 113 performs inverse quantization processing by multiplying each element of the 88 transform coefficient matrix received from the zigzag scan processing unit 112 by each element of the quantization matrix with the 88 elements, and generates an 88 transform coefficient matrix which is inversely quantized and spatial frequency data. The generated 88 transform coefficient matrix is output to the two-dimensional IDCT processing unit 120.

    [0064] FIG. 7 is a block diagram showing an example of a configuration of the IDCT determination unit 130 according to the first embodiment. As shown in FIG. 7, the IDCT determination unit 130 includes an EOB determination unit 131, a zero-coefficient determination unit 132, and an IDCT processing selection unit 133.

    [0065] The EOB determination unit 131 is connected to the decoding processing unit 110, the zero-coefficient determination unit 132, and IDCT processing selection unit 133. The EOB determination unit 131 determines whether to perform any of the 88 IDCT processing, the 44 IDCT processing, and zero-coefficient determination processing based on the EOB information received from the decoding processing unit 110, The EOB determination unit 131 outputs the determination result to the zero-coefficient determination unit 132 and the IDCT processing selection unit 133 as an EOB determination result.

    [0066] The zero-coefficient determination unit 132 is connected to the decoding processing unit 110, the EOB determination unit 131, and the IDCT processing selection unit 133. When the zero-coefficient determination unit 132 receives the EOB determination result indicating that the zero-coefficient determination processing is to be performed from the EOB determination unit 131, the zero-coefficient determination unit 132 determines whether to perform either the 88 IDCT processing or the 44 IDCT processing based on the 88 transform coefficient matrix, the EOB information, and the ZRL information received from the decoding processing unit 110. The zero-coefficient determination unit 132 outputs the determination result to the IDCT processing selection unit 133 as a zero-coefficient determination result.

    [0067] The IDCT processing selection unit 133 is connected to the EOB determination unit 131, the zero-coefficient determination unit 132, the 88 IDCT processing unit 141, and the 44 IDCT processing unit 142. When the IDCT processing selection unit 133 receives the EOB determination result indicating that the 88 IDCT processing is to be performed from the EOB determination unit 131 or the zero-coefficient determination result indicating that the 88 IDCT processing is to be performed from the zero-coefficient determination unit 132, the IDCT processing selection unit 133 generates a selection signal indicating that the 88 IDCT processing is to be performed. On the other hand, when the IDCT processing selection unit 133 receives the EOB determination result indicating that the 44 IDCT processing is to be performed from the EOB determination unit 131 or the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed from the zero-coefficient determination unit 132, the IDCT processing selection unit 133 generates a selection signal indicating that the 44 IDCT processing is to be performed. The generated selection signal is output to the 88 IDCT processing unit 141 and the 44 IDCT processing unit 142.

    [0068] FIG. 8 is a flowchart showing an example of a processing flow of the EOB determination unit 131 according to the first embodiment. As shown in FIG. 8, in a step S201, the EOB determination unit 131 checks EOB information received from the decoding processing unit 110, and determines whether or not the scan number indicated in the EOB information is less than 10. When it is determined that the scan number indicated in the EOB information is less than 10 (YES in the step S201), the processing proceeds to a step S203. On the other hand, when it is determined that the scan number indicated in the EOB information is not less than 10 (NO in the step S201), the processing proceeds to a step S202.

    [0069] For example, as shown in FIG. 4, the scan number 10 corresponds to the minimum scan number among the scan numbers of the coefficients outside the 44 region, i.e., not included in the 44 elements. Therefore, the processing of the step S201 is processing of determining whether or not the scan number indicated in the EOB information is less than the minimum scan number among the scan numbers of the coefficients not included in the 44 elements.

    [0070] In the step S202, the EOB determination unit 131 checks EOB information received from the decoding processing unit 110, and determines whether or not the scan number indicated in the EOB information is more than 24. When it is determined that the scan number indicated in the EOB information is more than 24 (YES in the step S202), the processing proceeds to a step S204. On the other hand, when it is determined that the scan number indicated in the EOB information is not more than 24 (NO in the step S202), the processing proceeds to a step S205.

    [0071] For example, as shown in FIG. 4, the scan number 24 corresponds to the maximum scan number among the scan numbers of the coefficients inside the 44 region, that is, the coefficients included in the 44 elements. Therefore, the processing of the step S202 is processing of determining whether or not the scan number indicated in the EOB information is more than the maximum scan number among the scan numbers of the coefficients included in the 44 elements.

    [0072] In the step S203, the EOB determination unit 131 determines the processing to be performed as the 44 IDCT processing. For example, in FIG. 4, when the scan number indicated in the EOB information is less than 10, the coefficients which are not 0 exist only inside the 44 region, and do not exist outside the 44 region. Therefore, when the scan number indicated in the EOB information is less than 10, the processing to be performed is determined to be the 44 IDCT processing.

    [0073] In the step S204, the EOB determination unit 131 determines the processing to be performed as the 88 IDCT processing. For example, in FIG. 4, when the scan number indicated in the EOB information is more than 24, the coefficients which are not 0 exist not only inside the 44 region but also outside the 44 region. Therefore, when the scan number indicated in the EOB information is more than 24, the processing to be performed is determined to be the 88 IDCT processing.

    [0074] In the step S205, the EOB determination unit 131 determines the processing to be performed as the zero-coefficient determination processing. For example, in FIG. 4, when the scan number indicated in the EOB information is any one of 10 to 24, in order to determine whether or not a coefficient which is not 0 exists outside the 44 region, it is necessary to determine whether or not the coefficients of the scan numbers 10, 14 to 16, and 19 to 23 which are outside the 44 region are 0. That is, when the scan number indicated in the EOB information is any one of 10 to 24, whether the processing to be executed is the 88 IDCT processing or the 44 IDCT processing cannot be determined by the EOB information only, and the zero-coefficient determination processing is required.

    [0075] As described above, in the processing flow of the EOB determination unit 131 shown in FIG. 8, the EOB determination unit 131 determines whether or not the scan number indicated in the EOB information is less than 10, in other words, less than the minimum scan number among the scan numbers of the coefficients not included in the 44 elements. If the determination result is YES, the EOB determination unit 131 determines that the 44 IDCT processing is to be performed. The EOB determination unit 131 determines whether or not the scan number indicated in the EOB information is more than 24, in other words, more than the maximum scan number among the scan numbers of the coefficients included in the 44 elements. If the determination result is YES, the EOB determination unit 131 determines that the 88 IDCT processing is to be performed. In these determination processing, if any of the determination results is NO, the EOB determination unit 131 determines that the zero-coefficient determination processing is to be performed. When any of the determination results are NO, it is equivalent to the case where the determination result is YES as to whether or not the scan number indicated in the EOB information is 10 or more and 24 or less, in other words, whether or not the scan number indicated in the EOB information is equal to or more than the minimum scan number not included in the 44 elements and equal to or less than the maximum scan number included in the 44 elements.

    [0076] FIG. 9 is a flowchart showing an example of a processing flow of the zero-coefficient determination unit 132 according to the first embodiment. As shown in FIG. 9, in a step S301, the zero-coefficient determination unit 132 confirms EOB information received from the decoding processing unit 110, and determines whether or not the scan number indicated in the EOB information is any of 10, 14 to 16, and 19 to 23. When it is determined that the scan number indicated in the EOB information is any of 10, 14 to 16, and 19 to 23 (YES in the step S301), the processing proceeds to a step S308. On the other hand, when it is determined that the scan number indicated in the EOB information is not any of 10, 14 to 16, and 19 to 23 (NO in the step S301), the processing proceeds to a step S302.

    [0077] In the step S308, the zero-coefficient determination unit 132 determines the processing to be performed as the 88 IDCT processing. If the processing of the step S301 is YES, for example, in FIG. 4, since the coefficient which is not 0 exists in any of the scan numbers 10, 14 to 16, and 19 to 23, that is, the coefficient which is not 0 exists outside the 44 region, the processing to be performed is determined to be the 88 IDCT processing.

    [0078] In the step S302, the zero-coefficient determination unit 132 determines whether or not the coefficient of the scan number 10 is 0. If it is determined that the coefficient of the scan number 10 is 0 (YES in the step S302), the processing proceeds to a step S303. On the other hand, when it is determined that the coefficient of the scan number 10 is not 0 (NO in the step S302), the processing proceeds to the step S308.

    [0079] When the processing of the step S302 is NO, for example, in FIG. 4, since the coefficient which is not 0 exists in the scan number 10 outside the 44 region, the processing to be performed is determined to be the 88 IDCT processing.

    [0080] In the step S303, the zero-coefficient determination unit 132 confirms the EOB information received from the decoding processing unit 110, and determines whether or not the scan number indicated in the EOB information is 13 or less. If it is determined that the scan number indicated in the EOB information is 13 or less (YES in the step S303), the processing proceeds to a step S307. On the other hand, when it is determined that the scan number indicated in the EOB information is not 13 or less (NO in the step S303), the processing proceeds to step a S304.

    [0081] In the step S307, the zero-coefficient determination unit 132 determines the processing to be performed as the 44 IDCT processing. If the processing of the step S303 is YES, for example, in FIG. 4, since the scan number indicated in the EOB information is any of 11 to 13 and the coefficient of the scan number 10 is 0, that is, the coefficient which is not 0 does not exist outside the 44 region, the processing to be executed is determined to be the 44 IDCT processing.

    [0082] In the step S304, the zero-coefficient determination unit 132 determines whether or not all of the coefficients of the scan numbers 14 to 16 are 0. When it is determined that all of the coefficients of the scan numbers 14 to 16 are 0 (YES in the step S304), the processing proceeds to a step S305. On the other hand, when it is determined that all of the coefficients of the scan numbers 14 to 16 are not 0 (NO in the step S304), the processing proceeds to the step S308.

    [0083] When the processing of the step S304 is NO, for example, in FIG. 4, since the coefficient which is 0 exists in any of the scan numbers 14 to 16 outside the 44 region, the processing to be performed is determined to be the 88 IDCT processing.

    [0084] In the step S305, the zero-coefficient determination unit 132 confirms the EOB information received from the decoding processing unit 110, and determines whether or not the scan number indicated in the EOB information is 18 or less. When it is determined that the scan number indicated in the EOB information is 18 or less (YES in the step S305), the processing proceeds to the step S307. On the other hand, when it is determined that the scan number indicated in the EOB information is not 18 or less (NO in the step S305), the processing proceeds to a step S306.

    [0085] If the processing of the step S305 is YES, for example, in FIG. 4, since the scan number indicated in the EOB information is either 17 or 18, and all of the coefficients of the scan numbers 10 and 14 to 16 are 0, that is, the coefficient which is not 0 does not exist outside the 44 region, the processing to be performed is determined to be the 44 IDCT processing. In the step S306, the zero-coefficient determination unit 132 confirms ZRL information received from the decoding processing unit 110, and determines whether or not the ZRL information is 5 or more. If it is determined that the ZRL information is 5 or more (YES in the step S306), the processing proceeds to the step S307. On the other hand, when it is determined that the ZRL information is not 5 or more (NO in the step S306), the processing proceeds to the step S308.

    [0086] If the processing of the step S306 is YES, for example, in FIG. 4, the scan number indicated in the EOB information is 24, and all of the coefficients of the scan numbers 10 and 14 to 16 are 0. Furthermore, since the ZRL information is 5 or more, 5 or more coefficients which are 0 are continuous between the last coefficient which is not 0 and indicated in the EOB information (the coefficient of the scan number 24), and the coefficient which is not 0 and located immediately before the last coefficient. That is, the zero-coefficient determination unit 132 determines that all of the coefficients of the scan numbers 19 to 23 are 0. Therefore, since the coefficient which is not 0 does not exist outside the 44 region, the processing to be performed is determined to be the 44 IDCT processing.

    [0087] On the other hand, when the processing of the step S306 is NO, for example, in FIG. 4, the scan number indicated in the EOB information is 24, and all of the coefficients of the scan numbers 10 and 14 to 16 are 0. However, since the ZRL information is not 5 or more, 5 or more coefficients which are 0 are not continuous between the last coefficient which is not 0 and indicated in the EOB information (the coefficient of the scan number 24), and the coefficient which is not 0 and located immediately before the last coefficient. That is, the zero-coefficient determination unit 132 determines that the coefficient which is not 0 exists in the coefficients of the scan numbers 19 to 23. Thus, since the coefficient which is not 0 exists outside the 44 region, the processing to be performed is determined to be the 88 IDCT processing.

    [0088] As described above, the zero-coefficient determination processing based on the ZRL information is performed on the coefficients of the scan numbers 19 to 23 when the EOB information indicates the scan number 24. For example, as shown in FIG. 4, the scan number 24 is inside the 44 region, that is, corresponds to the maximum scan number among the scan numbers of the coefficients included in the 44 elements. Also, for example, as shown in FIG. 4, the coefficients of scan numbers 19 to 23 are located between the coefficient of the scan number 24 and the coefficient of the scan number 18 which is inside the 44 region, that is, included in the 44 elements. In other words, the coefficients of the scan numbers 19 to 23 are located between the coefficient of the maximum scan number (24) which is included in the 44 elements, and the coefficient of the scan number (18) which is located immediately before the coefficient of the maximum scan number and included in the 44 elements.

    [0089] Therefore, when the scan number indicated in the EOB information is the maximum scan number among the scan numbers included in the 44 elements, the zero-coefficient determination unit 132 determines whether or not all of the coefficients of the scan numbers between the coefficient of the maximum scan number and the coefficient of the scan number which is located immediately before the coefficient of the maximum scan number and included in the 44 elements are 0 based on the ZRL information.

    [0090] When it is determined that all of the coefficients of the scan numbers between the coefficient of the maximum scan number and the coefficient of the scan number which is located immediately before the coefficient of the maximum scan number and included in the 44 elements are 0, the zero-coefficient determination unit 132 determines that the 44 IDCT processing is to be performed.

    [0091] On the other hand, when it is determined that all of the coefficients of the scan numbers between the coefficient of the maximum scan number and the coefficient of the scan number which is located immediately before the coefficient of the maximum scan number and included in the 44 elements are not 0, the zero-coefficient determination unit 132 determines that the 88 IDCT processing is to be performed.

    [0092] As described above, in the decoding device 100 according to the first embodiment, the IDCT determination unit 130 determines the number of elements in the row direction and the column direction required to select the 88 IDCT processing or the 44 IDCT processing based on the 88 transform coefficient matrix, the EOB information, and the ZRL information received from the decoding processing unit 110. The 88 IDCT processing unit 141 and the 44 IDCT processing unit 142 selectively perform the 88 IDCT processing or the 44 IDCT processing on the 88 transform coefficient matrix in accordance with the selection signal generated based on the determination result by the IDCT determination unit 130, to restore the image data for each block of the 88 pixels.

    [0093] In order to properly select one of the 88 IDCT processing and the 44 IDCT processing, the coefficient distribution of the 88 transform coefficient matrix need to be accurately grasped. For this purpose, it is required to perform the determination processing of whether or not the coefficients outside the 44 region are 0, that is, the zero-coefficient determination processing. Since the zero-coefficient determination processing is performed by a plurality of processing of accessing a memory region in which the coefficients are stored, reading the coefficients from the memory region, and comparing the read coefficients with 0, the processing amount increases. In particular, in the case where the EOB information indicates the scan number 24, zero-coefficient determination processing is required for the 9 coefficients of the scan numbers 10, 14 to 16, and 19 to 23 which are outside the 44 region, and the processing amount increases remarkably.

    [0094] However, in the zero-coefficient determination processing of the coefficients of the scan numbers 19 to 23 by the decoding device 100 according to the first embodiment, the zero-coefficient determination processing is not individually performed for the coefficients of the scan numbers 19 to 23, and the zero-coefficient determination processing can be easily performed in one time processing by using the ZRL information. That is, the decoding device 100 according to the first embodiment can improve the utilization rate of the 44 IDCT processing by accurately grasping the distribution state of the 88 transform coefficient matrix and speed up the decoding processing while reducing the processing amount of the zero-coefficient determination processing by using the ZRL information.

    [0095] In the above-described first embodiment, the example in which the 88 IDCT processing and the 44 IDCT processing are selectively performed on the 88 transform coefficient matrix using the 88 IDCT processing unit 141 and the 44 IDCT processing unit 142 has been described, but the present embodiment is not limited to this example. That is, mn IDCT processing and pq IDCT processing may be selectively performed on an mn transform coefficient matrix using an mn IDCT processing unit and a pq IDCT processing unit. The m and p denote the number of elements in the row direction, and the n and q denote the number of elements in the column direction. Each variable of the m, n, p, and q may take on 2 or more natural numbers, and the relationship between the variables of the m, n, p, and q is either m>p and nq, or mp and n>q.

    [0096] Therefore, the above-described first embodiment corresponds to m=n=8 and p=q=4. Further, if m=n=16 and p=q=8, this corresponds to the case where a 1616 IDCT processing or an 88 IDCT processing is selectively performed on encoded data obtained by encoding for each block of 1616 pixels to restore image data for each block of 1616 pixels.

    [0097] FIG. 10 is a diagram for explaining a plurality of examples of the zero-coefficient determination processing in the mn IDCT processing and the pq IDCT processing. As shown in FIG. 10, when m=n=8 and p=q=5, it is necessary to determine whether or not coefficients which are not 0 exist outside a 55 region. In particular, when EOB information indicates the scan number 39, the zero-coefficient determination processing based on ZRL information is performed on the coefficients of the scan numbers 33 to 38.

    [0098] Further, as shown in FIG. 10, when m=n=8, p=3, and q=4, it is necessary to determine whether or not coefficients which are not 0 exist outside a 34 region. More specifically, when EOB information indicates the scan number 18, the zero-coefficient determination processing based on ZRL information is performed on the coefficients of the scan numbers 13 to 17. Incidentally, in FIG. 10, the example of m=n=8 is shown, but for example, the m may not be equal to the n such as 68.

    [0099] In the above-described first embodiment, the scan order of the zigzag scan is described in the order shown in FIG. 1, but the scan order is not limited to that. For example, in FIG. 1, the scan order is from 0 to 1 in the row direction, but may be from 0 to 1 in the column direction. In this instance, the scan order of FIG. 1 is the order of 0, 2, 1, 5, 4, . . . .

    [0100] In the above-described first embodiment, the two-dimensional IDCT processing unit 120 includes the 88 IDCT processing unit 141 and the 44 IDCT processing unit 142, and can perform two types of the IDCT processing including the 88 IDCT processing and the 44 IDCT processing, but the present embodiment is not limited to that. That is, three or more types of IDCT processing may be performed. For example, the two-dimensional IDCT processing unit 120 may be configured to perform three types of IDCT processing including 88 IDCT processing, 66 IDCT processing, and 44 IDCT processing.

    Second Embodiment

    [0101] Next, a second embodiment will be described. In second embodiment, components having the same functions as those of first embodiment are denoted by the same reference numerals, and descriptions thereof are omitted.

    [0102] FIG. 11 is a block diagram showing an example of a configuration of a decoding device 100a according to the second embodiment. The decoding device 100a according to the second embodiment is another embodiment of the decoding device 100 according to the first embodiment. As shown in FIG. 11, the decoding device 100a includes a decoding processing unit 110a and a two-dimensional IDCT processing unit 120a.

    [0103] The decoding processing unit 110a outputs quantized coefficient value (Q value) information to the two-dimensional IDCT processing unit 120a in addition to an 88 transform coefficient matrix, EOB information, and ZRL information.

    [0104] The two-dimensional IDCT processing unit 120a includes an IDCT determination unit 130a, the 88 IDCT processing unit 141, and the 44 IDCT processing unit 142. The IDCT determination unit 130a is connected to the decoding processing unit 110a, the 88 IDCT processing unit 141, and the 44 IDCT processing unit 142. The IDCT determination unit 130a receives the Q value information in addition to the 88 transform coefficient matrix, the EOB information, and the ZRL information from the decoding processing unit 110a.

    [0105] FIG. 12 is a block diagram showing an example of a configuration of the decoding processing unit 110a according to the second embodiment. As shown in FIG. 12, the inverse quantization processing unit 113 of FIG. 6 is changed to an inverse quantization processing unit 113a.

    [0106] Each element of the quantization matrix used in performing the quantization processing and the inverse quantization processing is changed by the Q value in order to adjust the compression rate of the data amount of the transform coefficient. Generally, the larger the Q value, the larger the compression rate, and the smaller the Q value, the smaller the compression rate. When the Q value is large, the number of coefficients which are 0 and included in the transform coefficient matrix tends to increase, and when the Q value is small, the number of coefficients which are 0 and included in the transform coefficient matrix tends to decrease. That is, the distribution of the coefficients which are 0 and included in the transform coefficient matrix depends greatly on the Q value.

    [0107] In addition to the 88 transform coefficient matrix generated by the inverse quantization processing, the inverse quantization processing unit 113a outputs the Q value used when performing the inverse quantization processing to the two-dimensional IDCT processing unit 120a as Q value information.

    [0108] FIG. 13 is a block diagram showing an example of a configuration of the IDCT determination unit 130a according to the second embodiment. As shown in FIG. 13, the zero-coefficient determination unit 132 and the IDCT processing selection unit 133 of FIG. 7 are changed to a zero-coefficient determination unit 132a and an IDCT processing selection unit 133a, respectively. The IDCT determination unit 130a includes a Q value determination unit 401 in addition to the configuration of the IDCT determination unit 130 shown in FIG. 7.

    [0109] The Q value determination unit 401 is connected to the decoding processing unit 110a, the EOB determination unit 131, the zero-coefficient determination unit 132a, and the IDCT processing selection unit 133a. The Q value determination unit 401 receives Q value information output from the decoding processing unit 110a and EOB determination result output from the EOB determination unit 131.

    [0110] The Q value determination unit 401 includes a Q determination value register 402 for storing a Q determination value. When receiving the EOB determination result indicating that the zero-coefficient determination processing is to be performed from the EOB determination unit 131, the Q value determination unit 401 determines whether to perform either the 88 IDCT processing or the zero-coefficient determination processing based on the Q value obtained from the Q value information and the Q determination value stored in the Q determination value register 402. The Q value determination unit 401 outputs the determination result to the zero-coefficient determination unit 132a and the IDCT processing selection unit 133a as a Q value determination result.

    [0111] The zero-coefficient determination unit 132a is connected to the decoding processing unit 110a, the Q value determination unit 401, and the IDCT processing selection unit 133a. When receiving the Q value determination result indicating that the zero-coefficient determination processing is to be performed from the Q value determination unit 401, the zero-coefficient determination unit 132a determines whether to perform either the 88 IDCT processing and the 44 IDCT processing based on the 88 transform coefficient matrix, the EOB information, and the ZRL information received from the decoding processing unit 110a. The zero-coefficient determination unit 132a outputs the determination result to the IDCT processing selection unit 133a as the zero-coefficient determination result.

    [0112] The IDCT processing selection unit 133a is connected to the EOB determination unit 131, the Q value determination unit 401, the zero-coefficient determination unit 132a, the 88 IDCT processing unit 141, and the 44 IDCT processing unit 142. When receiving the EOB determination result indicating that the 88 IDCT processing is to be performed from the EOB determination unit 131, the Q value determination result indicating that the 88 IDCT processing is to be performed from the Q value determination unit 401, or the zero-coefficient determination result indicating that the 88 IDCT processing is to be performed from the zero-coefficient determination unit 132a, the IDCT processing selection unit 133a generates the selection signal indicating that the 88 IDCT processing is to be performed. On the other hand, when receiving the EOB determination result indicating that the 44 IDCT processing is to be performed from the EOB determination unit 131 or the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed from the zero-coefficient determination unit 132a, the IDCT processing selection unit 133a generates the selection signal indicating that the 44 IDCT processing is to be performed. The generated selection signal is output to the 88 IDCT processing unit 141 and the 44 IDCT processing unit 142.

    [0113] FIG. 14 is a flowchart showing an example of a processing flow of the Q value determination unit 401 according to the second embodiment. As shown in FIG. 14, in a step S501, the Q value determination unit 401 compares a Q value obtained from Q value information with a Q determination value stored in the Q determination value register 402, and determines whether or not the Q value is equal to or larger than the Q determination value. If it is determined that the Q value is equal to or larger than the Q determination value (YES in the step S501), the processing proceeds to a step S502. On the other hand, when it is determined that the Q value is not equal to or larger than the Q determination value (NO in the step S501), the processing proceeds to a step S503.

    [0114] In the step S502, the Q value determination unit 401 determines the processing to be performed as the zero-coefficient determination processing. When the Q value is equal to or larger than the Q determination value, there is a strong tendency that the coefficients which are not 0 are concentrated inside the 44 region on the low frequency side in the 88 transform coefficient matrix. Therefore, it is presumed that the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is high in the zero-coefficient determination unit 132a. Therefore, the Q value determination unit 401 determines that the zero-coefficient determination processing should be performed.

    [0115] In the step S503, the Q value determination unit 401 determines the processing to be performed as the 88 IDCT processing. When the Q value is not equal to or larger than the Q determination value, there is a strong tendency that the coefficients which are not 0 are dispersed outside the 44 region on the low frequency side in the 88 transform coefficient matrix. Therefore, it is presumed that the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is low in the zero-coefficient determination unit 132a. Therefore, the Q value determination unit 401 determines the processing to be performed as the 88 IDCT processing without performing the zero-coefficient determination processing by the zero-coefficient determination unit 132a.

    [0116] In the first embodiment, the processing amount of the entire zero-coefficient determination processing can be reduced by performing the zero-coefficient determination processing based on the ZRL information. However, the zero-coefficient determination processing itself is not unnecessary. In particular, in a case where the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is low in the zero-coefficient determination unit 132a although the EOB determination unit 131 determines that the zero-coefficient determination processing should be performed, the efficiency in performing the zero-coefficient determination processing is low.

    [0117] However, according to the second embodiment, it is determined whether or not to perform the zero-coefficient determination processing by presuming the coefficient distribution of the transform coefficient matrix based on the result of comparing the Q value with the Q determination value. That is, the zero-coefficient determination processing is performed only when the Q value is equal to or larger than the Q determination value and it is presumed that the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is high in the zero-coefficient determination unit 132a. On the other hand, when the Q value is smaller than the Q determination value and it is presumed that the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is low in the zero-coefficient determination unit 132a, the 88 IDCT processing is determined without performing the zero-coefficient determination processing. This reduces the frequency with which the unnecessary zero-coefficient determination processing is performed. As a result, the processing amount of the zero-coefficient determination processing is reduced, and the decoding processing is further speeded up.

    [0118] The decoding device 100a of the second embodiment has an advantage over the decoding device 100 of the first embodiment when image data having a low Q value and a high probability of being performed the 88 IDCT processing is decoded.

    [0119] In the second embodiment, since the Q determination value can be arbitrarily set, the Q determination value can be adjusted to various image data. If a large value is set to the Q determination value, the processing amount of the zero-coefficient determination processing is reduced, and the 88 IDCT processing is performed more frequently. On the other hand, if a small value is set to the Q determination value, the same operation as the first embodiment is performed. The Q determination value may be tested using a plurality of Q determination values for a plurality of sample images, and an optimal Q determination value may be prepared in advance based on the test results.

    Third Embodiment

    [0120] Next, a third embodiment will be described. In the third embodiment, components having the same functions as those of the first and second embodiments are denoted by the same reference numerals, and descriptions thereof are omitted.

    [0121] FIG. 15 is a block diagram showing an example of a configuration of a decoding device 100b according to the third embodiment. The decoding device 100b according to the third embodiment is another embodiment of the decoding device 100 according to the first embodiment. As shown in FIG. 15, the decoding device 100b includes a decoding processing unit 110b and a two-dimensional IDCT processing unit 120b.

    [0122] The decoding processing unit 110b outputs encoding type information to the two-dimensional IDCT processing unit 120b in addition to an 88 transform coefficient matrix, EOB information, and ZRL information.

    [0123] The two-dimensional IDCT processing unit 120b includes an IDCT determination unit 130b, the 88 IDCT processing unit 141, and the 44 IDCT processing unit 142. The IDCT determination unit 130b is connected to the decoding processing unit 110b, the 88 IDCT processing unit 141, and the 44 IDCT processing unit 142. The IDCT determination unit 130b receives the encoding type information in addition to the 88 transform coefficient matrix, the EOB information, and the ZRL information from the decoding processing unit 110b.

    [0124] FIG. 16 is a block diagram showing an example of a configuration of the decoding processing unit 110b according to the third embodiments. As shown in FIG. 16, the entropy decoding unit 111 of FIG. 6 is changed to an entropy decoding unit 111b.

    [0125] In the MPEG method, two encoding processing, i.e., intra-encoding and inter-encoding, are selectively performed. The intra-encoding is a method in which encoding is performed using only image data in the same frame. The inter-encoding is a method in which encoding is performed using image data of a plurality of frames. Encoded data includes encoding type information which is information indicating whether image data for each block of 88 pixels is encoded by using intra-encoding or inter-encoding.

    [0126] When the intra-encoding is used, the coefficients which are not 0 and included in the transform coefficient matrix tend to concentrate on the low frequency side. On the other hand, when the inter-encoding is used, the coefficients which are not 0 and included in the transform coefficient matrix tend to be dispersed without concentrating on the low frequency side. That is, the distribution of the coefficient which is not 0 and included in the transform coefficient matrix largely depends on the encoding type. The reason why the tendency of the coefficients to be dispersed in the case of the inter-encoding is stronger than in the case of the intra-encoding is that the inter-encoding converts a difference image.

    [0127] The entropy decoding unit 111b receives an entropy encoded sequence which is encoded data obtained by entropy encoding processing, and performs decoding processing. The entropy decoding unit 111b is connected to the zigzag scan processing unit 112, and outputs the decoded transform coefficient sequence to the zigzag scan processing unit 112. The entropy decoding unit 111b outputs EOB information, ZRL information, and encoding type information obtained by the decoding processing to the two-dimensional IDCT processing unit 120b.

    [0128] FIG. 17 is a block diagram showing an example of a configuration of the IDCT determination unit 130b according to the third embodiment. As shown in FIG. 17, the zero-coefficient determination unit 132 and the IDCT processing selection unit 133 of FIG. 7 are changed to the zero-coefficient determination unit 132b and the IDCT processing selection unit 133b, respectively. The IDCT determination unit 130b includes an encoding type determination unit 601 in addition to the configuration of the IDCT determination unit 130 shown in FIG. 7.

    [0129] The encoding type determination unit 601 is connected to the decoding processing unit 110b, the EOB determination unit 131, the zero-coefficient determination unit 132b, and the IDCT processing selection unit 133b. The encoding type determination unit 601 receives the encoding type information output from the decoding processing unit 110b and the EOB determination result output from the EOB determination unit 131.

    [0130] When receiving the EOB determination result indicating that the zero-coefficient determination processing is to be performed from the EOB determination unit 131, the encoding type determination unit 601 determines whether to perform either the 88 IDCT processing or the zero-coefficient determination processing based on the encoding type information. The encoding type determination unit 601 outputs the determination result to the zero-coefficient determination unit 132b and the IDCT processing selection unit 133b as an encoding type determination result.

    [0131] The zero-coefficient determining unit 132b is connected to the decoding processing unit 110b, the encoding type determining unit 601, and the IDCT processing selection unit 133b. When receiving the encoding type determination result indicating that the zero-coefficient determination processing is to be performed from the encoding type determination unit 601, the zero-coefficient determination unit 132b determines whether to perform either the 88 IDCT processing and the 44 IDCT processing based on the 88 transform coefficient matrix, the EOB information, and the ZRL information received from the decoding processing unit 110b. The zero-coefficient determination unit 132b outputs the determination result to the IDCT processing selection unit 133b as the zero-coefficient determination result.

    [0132] The IDCT processing selection unit 133b is connected to the EOB determination unit 131, the encoding type determination unit 601, the zero-coefficient determination unit 132b, the 88 IDCT processing unit 141, and the 44 IDCT processing unit 142. When receiving the EOB determination result indicating that the 88 IDCT processing is to be performed from the EOB determination unit 131, the encoding type determination result indicating that the 88 IDCT processing is to be performed from the encoding type determination unit 601, or the zero-coefficient determination result indicating that the 88 IDCT processing is to be performed from the zero-coefficient determination unit 132b, the IDCT processing selection unit 133b generates the selection signal indicating that the 88 IDCT processing is to be performed. On the other hand, when receiving the EOB determination result indicating that the 44 IDCT processing is to be performed from the EOB determination unit 131 or the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed from the zero-coefficient determination unit 132b, the IDCT processing selection unit 133b generates the selection signal indicating that the 44 IDCT processing is to be performed. The generated selection signal is output to the 88 IDCT processing unit 141 and the 44 IDCT processing unit 142.

    [0133] FIG. 18 is a flowchart showing an example of a processing flow of the encoding type determination unit 601 according to the third embodiment. As shown in FIG. 18, in a step S701, the encoding type determination unit 601 confirms encoding type information received from the decoding processing unit 110b, and determines whether or not the encoding type is the intra-encoding. If it is determined that the encoding type is the intra-encoding (YES in the step S701), the processing proceeds to a step S702. On the other hand, if it is determined that the encoding type is not the intra-encoding, that is, the inter-encoding (NO in the step S701), the processing proceeds to a step S703.

    [0134] In the step S702, the encoding type determination unit 601 determines the processing to be performed as the zero-coefficient determination processing. When the encoding type is the intra-encoding, there is a strong tendency that the coefficients which are not 0 are concentrated inside the 44 region on the low frequency side in the 88 transform coefficient matrix. Therefore, it is presumed that the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is high in the zero-coefficient determination unit 132b. As a result, the encoding type determination unit 601 determines that zero-coefficient determination processing should be performed.

    [0135] In the step S703, the encoding type determination unit 601 determines the processing to be performed as the 88 IDCT processing. When the encoding type is not the intra-encoding, that is, is the inter-encoding, there is a strong tendency that the coefficients which are not 0 are dispersed outside the 44 region on the low frequency side in the 88 transform coefficient matrix. Therefore, it is presumed that the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is low in the zero-coefficient determination unit 132b. Therefore, the coding-type determination unit 601 determines the processing to be executed as the 88 IDCT processing without performing the zero-coefficient determination processing by the zero-coefficient determination unit 132b.

    [0136] As described above, according to the third embodiment, it is determined whether or not to perform the zero-coefficient determination processing by presuming the coefficient distribution of the transform coefficient matrix in accordance with the encoding type. That is, the zero-coefficient determination processing is performed only when the encoding type is the intra-encoding and it is presumed that the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is high in the zero-coefficient determination unit 132b. On the other hand, when the encoding type is the inter-encoding and it is presumed that the occurrence frequency of the zero-coefficient determination result indicating that the 44 IDCT processing is to be performed is low in the zero-coefficient determination unit 132b, the 88 IDCT processing is determined without performing the zero-coefficient determination processing. This reduces the frequency with which the unnecessary zero-coefficient determination processing is performed. Therefore, the processing amount of the zero-coefficient determination processing is reduced, and the decoding processing is further speeded up.

    [0137] The decoding device 100b of the third embodiment has an advantage over the decoding device 100 of the first embodiment when image data having a high rate of the inter-encoding and a high probability of being performed the 88 IDCT processing is decoded.

    [0138] In addition, since it is determined whether to perform the zero-coefficient determination processing by using the information indicating whether the image data included in the encoded data has been encoded by the intra-encoding or the inter-encoding in the third embodiment, there is an advantage that the third embodiment can be easily implemented in a decoding device.

    [0139] The decoding devices 100, 100a and 100b in the first to third embodiments may be configured by one or more semiconductor devices. The semiconductor device may be configured by one or more semiconductor chips. For example, the decoding processing unit 110 and the two-dimensional IDCT processing unit 120 may be one semiconductor device formed on one semiconductor chip, and the decoding processing unit 110 and the two-dimensional IDCT processing unit 120 may be one semiconductor device formed on different semiconductor chips.

    [0140] Each block included in the decoding devices 100, 100a, and 100b can be configured only by hardware (H/W) or by cooperation of H/W and software (S/W). That is, FIGS. 5 to 7, 11 to 13, and 15 to 17 depict functional blocks realized only by H/W, only by S/W, or by the cooperation of H/W and S/W.

    [0141] When each block included in the decoding devices 100, 100a, and 100b is configured only by H/W, each block of included in the decoding devices 100, 100a, and 100b is configured by circuits. On the other hand, when each block included in the decoding devices 100, 100a, and 100b is configured by the cooperation of H/W and S/W, for example, the IDCT determination units 130, 130a, and 130b are configured by processors, and the functions of the IDCT determination units 130, 130a, and 130b can be realized by the processors reading out and executing predetermined programs stored in a storage unit (not shown).

    [0142] In the first to third embodiments, the IDCT determination units 130, 130a, and 130b have been described as being implemented in the decoding devices 100, 100a, and 100b, but they may be implemented in the encoding device. That is, even if they are implemented in the encoding device, it is possible to generate the selection signal indicating either the 88 IDCT processing or the 44 IDCT processing is to be performed based on the transform coefficient matrix, the EOB information, the ZRL information, the Q value information, and the encoding type information. In this instance, the decoding devices 100, 100a, and 100b receive the selection signal output from the encoding device, control the switching between the 88 IDCT processing unit 141 and the 44 IDCT processing unit 142 based on the received selection signal, and perform two types of the IDCT processing. For example, in a system having a plurality of decoding devices for one encoding device, the processing amount of the entire system can be reduced by implementing the IDCT determination units 130, 130a, and 130b in the encoding device. Although the invention made by the present inventor has been specifically described based on the embodiments, it is needless to say that the present invention is not limited to the above-described embodiments, and various changes may be made without departing from the scope thereof.