This invention is a method of encoding intra frames when encoding a motion picture. A set of intra frame prediction modes includes a low-complexity subset. A probability table relates the prediction mode of adjacent sub-blocks to the prediction mode of the current sub-block. For each combination of adjacent sub-blocks, the probability table includes a list of prediction modes in order of expected occurrence. The probability table is adjusted so that each list for prediction modes within the low-complexity subset include initial prediction modes of the low-complexity subset. Individual sub-blocks of intra frames are predictively coded in a low-complexity encoding the using the low-complexity subset or in a high-complexity encoding using any prediction mode. This permits a low-complexity decoder responsive to only the low-complexity subset.

TECHNICAL FIELD OF THE INVENTION

The technical field of this invention is that of motion picture data compression and more particularly to coding of intra-frame data.

BACKGROUND OF THE INVENTION

This invention concerns coding of motion picture information and relates to the H.26L video standard. Upon reconstruction of the motion picture data some frames, called intra frames, are predicted from adjacent frames. In the current H.26L standard intra-frames are predicted using a nine mode technique. As compared to a prior six mode technique, the nine mode technique is more efficient because it transmits less data. The nine mode technique increases both memory requirement and computational complexity by a factor about four. While the coding efficiency increase is of top priority on the high-end devices, the complexity increase is not favorable for the low-end H.26L applications. Therefore, it would be desirable to have a complexity-scalable intra frame prediction technique that serves the needs of both the low-end and high-end applications.

In the H.26L standard, during intra frame coding the 16 by 16 pixel luminance part of a macroblock is divided into 16 4 by 4 sub-blocks. Prediction is always used for each sub-block in a macroblock. The prediction mode is determined during encoding. Typically this takes place by comparing the original 4 by 4 sub-block with a corresponding 4 by 4 sub-block formed using each prediction mode. Generally the comparison is made by calculating the sum of the absolute difference of pixels between the original sub-block and candidate predicted sub-block. The prediction mode of the candidate predicted sub-block yielding the lowest sum of absolute differences is selected for that intra frame sub-block. This prediction mode is transmitted to the decoder in the bitstream. Transmission of this prediction mode information may be encoded for data compression as described below.

FIG. 1illustrates a 4 by 4 pixel block100used to demonstrate prior art technique. Block100includes 16 pixels101to be coded labeled a through p. Outside and above block100are pixels103labeled A through H and Q. Outside and to the left of block100are pixels105labeled I through P. The pixels A to P and Q are from neighboring blocks which are already be decoded and used for prediction. Pixels E through H may not available because they have not yet been decoded, are outside the frame or outside the current independent slice. In this case the value of pixel D is substituted for pixels E through H. Similarly, when pixels M through P are not available, the value of pixel L is substituted for pixels M through P.

For the luminance signal in the H.26L standard, there are 9 intra frame prediction modes labeled 0 to 8. Mode 0 is DC-prediction mode. The other modes represent directions of predictions as indicated inFIG. 2. The predictions of these modes are given below.

Mode 0:DC Prediction

All pixels101are predicted by the average of the exterior pixels A, B, C, D, I, J, K and L. This is generally calculated as (A+B+C+D+I+J+K+L)/8. If any of the four horizontal pixels A to D are outside the frame, the average of the remaining four is used for prediction. Similarly, if any of the four vertical pixels I to L are outside the frame, the average of the remaining four is used for prediction. If all 8 pixels are outside the frame, the prediction value for all pixels101in block100is 128. A block will therefore always be predicted in this mode.

Mode 1: Vertical Prediction

If pixels A, B, C and D are inside the frame, then the pixels a through p are predicted in vertical slices. Thus pixels a, e, i and m are predicted by pixel A; pixels b, f, j and n are predicted by pixel B; pixels c, g, k and o are predicted by pixel C; and pixels d, h, l and p are predicted by pixel D.

Mode 2: Horizontal Prediction

If pixels I, J, K and L are inside the frame, then the pixels a through p are predicted in horizontal slices. Thus pixels a, b, c and d are predicted by pixel I; pixels e, f, g and h are predicted by pixel J; pixels i, j, k and l are predicted by pixel K; and pixels m, n, o and p are predicted by pixel L.

This mode is used only if all pixels A, B, C, D, I, J, K, L and Q are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 1.

This mode is used only if all pixels A, B, C, D, I, J, K, L and Q are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 2.

This mode is used only if all pixels A, B, C, D, I, J, K, L and Q are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 3.

This mode is used only if all pixels A, B, C, D, I, J, K, L and Q are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 4.

This mode is used only if all pixels A, B, C, D, I, J, K, L and Q are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 5.

This mode is used only if all pixels A, B, C, D, I, J, K, L and Q are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 6.

Since each of the 4 by 4 pixel luminance blocks are assigned a prediction mode, this requires a large number of bits if coded directly. There are a number of more efficient ways of coding mode information. The best prediction mode of a block is highly correlated with the prediction modes of adjacent blocks.

FIG. 3illustrates how the prediction modes of adjacent blocks is used to select the prediction mode of a current block. Referring toFIG. 3, when the prediction modes of block A and block B are known (including the case that either block A or block B or both are outside the frame), an ordering of the most probable, next most probable prediction modes for block C is determined. When an adjacent block A or B is coded by 16 by 16 pixel intra mode, the prediction mode of the current block C is set to mode 0, DC prediction. When an adjacent block A or B is coded by 16 by 16 pixel inter mode, the prediction mode of the current block C is to mode 0, DC prediction in the usual case and outside in the case of a constrained intra update. Table 7 lists this ordering.

For more efficient coding, information on intra prediction of two 4 by 4 pixel luminance blocks are included in one codeword.FIG. 4illustrates the order of coding of the 16 4 by 4 pixel sub-blocks in a 16 by 16 pixel macroblock. Table 8 lists the universal variable length coding (UVLC) for these combined codewords, where the entries in the UVLC_prob array are the UVLC code_numbers addressed by value of (prob0, prob1) pair UVLC_Prob[prob0=0, 1, Y8] [prob1=0, 1, Y8].

This prior art intra frame prediction method requires the storage of two tables corresponding to Table 7 and Table 8 in the decoder. The probability Table 7 requires 10×10×9/2=450 bytes memory for an ASIC design. For a digital signal processor (DSP) design this number is higher if each number in Table 7 is stored as byte. This storage requires 900 bytes. The UVLC table (corresponding to Table 8) requires 9×9=81 bytes for storage. Considering that the memory requirement for storing the rest of tables in H.26L standard is less than 338 bytes, this memory requirement for intra frame prediction is extremely high. Such a high memory requirement can be easily critical for ASIC and DSP implementation.

In low-complexity H.26L codecs, it is desirable to use only a subset of the total nine intra frame prediction modes in order to reduce the memory requirement and computational complexity. However, the current intra frame prediction method cannot be scaled in this manner. In Table 7 prediction modes 0 to 8 spread over all the nine probability positions in each string. Therefore, even if a subset of the prediction modes is used, the decoder has to store a portion of Table 7 and the entire Table 8. For example, if only 6 modes are used, the memory size for DSP implementation is 7×7×9 (portion of Table 7)+81 (UVLC Table 8)=522 bytes. This is barely an improvement over storing all this decode data.

SUMMARY OF THE INVENTION

This invention is a method of encoding intra frames when encoding a motion picture. A set of intra frame prediction modes includes a low-complexity subset. A probability table relates the prediction mode of adjacent sub-blocks to the prediction mode of the current sub-block. For each combination of adjacent sub-blocks, the probability table includes a list of prediction modes in order of expected occurrence. The probability table is adjusted so that each list for prediction modes within the low-complexity subset include initial prediction modes of the low-complexity subset.

Individual sub-blocks of intra frames are predictively coded as follows. In a low-complexity encoding the prediction mode for each sub-block is within the low-complexity subset. In a high-complexity encoding may use any prediction mode. This permits a low-complexity decoder responsive to only the low-complexity subset.

The definition of the prediction modes and the probability table and their low-complexity subsets and occurs once upon definition of an encoding standard. Selection of low-complexity encoding or high-complexity encoding may occur once upon manufacture of an encoder or may occur for each encoding of a motion picture.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The complexity scalable intra frame prediction method of this invention satisfies the needs of both low-complexity and high-complexity H.26L codecs. The memory and computational resource may be highly limited for low-end codecs, so a low-complexity intra frame prediction scheme is desired. On high-end codecs such as PCs, where memory and computational complexity are not a concern, coding efficiency is of high priority. This invention provides a complex and but highly efficient intra frame prediction technique. In addition, there is backward compatibility between the low-complexity and high-complexity techniques. Thus the high-end decoder can decode the bitstreams generated by the low-end encoder. This is achieved because the low-complexity intra frame prediction scheme is a subset of the high-complexity scheme.

The intra frame prediction technique of this invention operates as follows. Let: {0, 1, . . . M−1) be the M prediction modes supported with probability in descending order; N be the number of complexity scalability layers; M0, M1. . . MN−2, MN−1are number of modes supported in each layer with M0, <M1. . . <MN−2<MN−1(MN−1=M). Due to the backward compatibility a higher layer contains all the modes supported by a lower layer. Therefore, layer0contains mode 0, 1 . . . M0−1, layer1contains mode 0, 1, 2 . . . M0−1, M0. . . M1−1 . . . and layer N−1 supports all the modes, i.e. mode 0, 1, 2 . . . M−1. The following rules are used for the constructing the probability table shown in Table 9.

2. For prediction mode of adjacent blocks A and B as illustrated inFIG. 3less than M, but larger or equal to Mn−1, each string in the probability table is divided into N−n groups: in mode 0, 1 . . . Mn−1 can only be placed from position0to Mn−1; mode Mn, Mn+1 . . . Mn+1−1 can only be placed from position Mnto Mn+1−1; . . . and mode MN−2, MN−2+1 . . . MN−1−1 can only be placed from position MN−2to MN−1−1, based on their probabilities; and

An example illustrated in Table 9 and Table 10 is used to explain the general concept of the complexity-scalable intra prediction described above. In this particular case two complexity layers are established (i.e. M=9, N=2, M0=6, M1=9). There are in total 9 prediction modes (0, 1, 2 . . . 8), only six modes (0, 1, 2, 3, 4, 5) are supported in the low-complexity layer. So the nine modes are divided into two sub-groups, layer0with modes 0, 1, 2, 3, 4 and 5, and layer1with modes 0, 1, 2, 3, 4, 5, 6, 7 and 8. In order to ensure the highest possible coding efficiency in the low-complexity scheme, any mode in layer 0 has higher probability than modes 6, 7, 8.

A limitation then is imposed on construction of the probability table. As shown in Table 9, for blocks A and B having intra frame prediction modes less than 6 (M0), the strings are divided into two groups. These are marked in Table 9 by boldface and normal text. Modes 0, 1, . . . 5 can only appear in the first part positions from 0 to 5 (boldface) in order of their probabilities. Modes 6, 7 and 8 can only spread in the second part positions from 6 to 8 (normal text). For blocks A or B having intra frame prediction modes larger than 5, no limitation is imposed. For these cases, the nine modes of the current block can spread all over the nine positions in each string, depending on their probabilities.

Table 10 lists the universal variable length coding (UVLC) according to this example of the invention for combined codewords according toFIG. 4. Those codes rendered in boldface are required for both low-complexity and high-complexity systems. Those codes rendered in normal type are required only in high-complexity systems.

Thus the low-complexity intra frame prediction technique uses modes 0 to 5 and only needs to store the sub-tables marked in boldface in Tables 9 and 10. The high-complexity technique stores entire Tables 9 and 10. Since the low-complexity technique is a strict subset of the high-complexity technique, backward compatibility is guaranteed.

The low-complexity scheme has a reduced memory requirement. In this particular example, the low-complexity decoder requires only 7×7×6 bytes (from the probability sub-table of Table 9)+36 (from the UVLC sub-table of Table 10)=310 bytes to store needed decode data. This is about 40% saving compared to 522 bytes needed in the prior H.26L intra frame prediction when six modes used.

FIG. 5illustrates a 4 by 4 pixel block500used to demonstrate the invention. Block500includes 16 pixels501to be coded labeled a through p. Outside and above block500are pixels503labeled A through D and I. Outside and to the left of block500are pixels505labeled E through H. The pixels A to H and I are from neighboring blocks which are already be decoded and used for prediction.

An example nine mode codings corresponding to Tables 9 and 10 above is described below. The (prob0, prob1) coding is unchanged expect for the UVLC table (Table 10) differs from the prior H.26L standard. Note that the modes defined below already existed in the previous H.26L versions.FIG. 6illustrates the syntax directions of these modes.

Mode 0:DC Prediction

All pixels501are predicted by (A+B+C+D+E+F+G+H)/8. If four of the pixels A through H are outside the frame, the average of the remaining four is used for prediction. If all 8 pixels A through H are outside the frame the predicted value for all pixels101is 128. A block will therefore always be predicted in this mode.

This mode is used only if all pixels503A, B, C and D are inside the frame. Pixels a through p are predicted according to Table 11.

If pixels A, B, C and D are inside the frame, then: pixels a, e, i and m are predicted by pixel A; pixels b, f, j and n are predicted by pixel B; pixels c, g, k and l are predicted by pixel C; and pixels g, h, l and p are predicted by pixel D.

Mode 3: Diagonal Prediction

This mode is used only if all pixels A, B, C, D, E, F, G, H and I are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 12.

If pixels E, F, G and H are inside the frame, then: pixels a, b, c and d are predicted by pixel E; pixels e, f, g and h are predicted by pixel F; pixels i, j, k and l are predicted by pixel G; and pixels m, n, o and p are predicted by pixel H.

This mode is used only if all pixels E, F, G and H are inside the frame. Pixels a through p are predicted according to Table 13.

This mode is used only if all pixels A, B, C, D, E, F, G, H and I are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 14.

This mode is used only if all pixels A, B, C, D, E, F, G, H and I are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 15.

This mode is used only if all pixels A, B, C, D, E, F, G, H and I are inside the frame. This is a diagonal prediction. Pixels a through p are predicted according to Table 16.

FIG. 7illustrates a flow chart showing the steps of encoding700according to this invention. Encoding700begins at start block701. The initial action of encoding700is definition of the intra frame prediction modes (block702). This definition could be according to the example of modes 0 to 8 described above in relation toFIG. 5and Tables 11 to 16. This definition of the intra frame prediction modes must include an initial subset of modes suitable for a low-complexity embodiment of the invention. This means that the initial subset must be suitable for a low computational decoding which may yield lower data compression.

Encoding700next defines prediction probability tables for each possible intra frame prediction mode of a predetermined set of adjacent sub-blocks. This could be according to the example of Table 9 above. Each entry in the prediction probability table is a list of the intra frame prediction modes in order of their expected probability. The example of Table 9 is based upon the adjacent sub-blocks defined inFIG. 3. A subset of the probability table in which both the prior sub-blocks are outside the frame or within the subset of intra frame prediction modes of the low-complexity technique must have special properties. Let the number of intra frame prediction modes be N and the total number of modes be M. Each entry in the probability table will have M entries. For probability table entries within the subset, the first N entries of each list must be taken from the subset of prediction modes. As explained above, this permits complete specification of the frame data employing only the subset of intra frame prediction modes. Note that for probability table entries outside this subset, that is probability table entries in which at least one prior sub-block has a prediction mode outside the subset, are not so limited.

Encoding700next defines a universal variable length coding table (block704). This could be according to the example of Table 10. Note that this universal variable length coding table must include a subset usable with the subset of intra frame prediction modes as described above.

Encoding700next selected the low-complexity technique or the high-complexity technique (decision block705). The manner of encoding differs depending on this selection as will be described below.

If encoding700operates in the low-complexity technique (LOW at decision block705), then encoding700determines the prediction mode for each sub-block in the current intra frame (block706). As described above, the prior art technique for this determination includes forming a prediction for each sub-block in each of the prediction modes, then comparing the prediction to the actual sub-block data. The comparison typically is based on the sum of absolute differences between the predicted sub-block and the actual sub-block. The prediction mode yielding the best prediction, such as the lowest sum of absolute differences, is selected. In the low-complexity technique the prediction modes selected are limited to the subset previously defined (block702).

Encoding700next employs the probability table to encode the prediction mode of the sub-block (block707). The prediction modes of the adjacent sub-blocks determines the entry in the probability table. The prediction mode determined for the sub-block is matched with the list of the appropriate probability table entry. The determined prediction mode is matched against list of the corresponding entry. The position on this list is noted. In block708these positions for two adjacent blocks (as shown inFIG. 4) are encoded together. These paired of probability data is coded via the previously determined universal variable length code (block709).

The encoded data for the intra frames is combined with other data concerning the motion picture (block710). This other data is derived from the original motion picture in a conventional fashion not relevant to this invention. This combined data is transmitted to the decoder via conventional means (block711).

If encoding700operates in the high-complexity technique (HIGH at decision block705), then encoding700determines the prediction mode for each sub-block in the current intra frame (block712) in the manner previously described. Note that in the high-complexity technique all prediction modes may be used. This differs from the low-complexity technique which may select only the subset of prediction modes.

Encoding700next employs the probability table to encode the prediction mode of the sub-block (block713). In contrast to the low-complexity technique, the high-complexity technique may use the entire probability table. In block714these positions for two adjacent blocks (as shown inFIG. 4) are encoded together. These paired of probability data is coded via the previously determined universal variable length code (block715). Note that the high-complexity technique may use the entire universal variable length coding table and not just the subset used by the low-complexity technique.

The encoded data for the intra frames is combined with other data concerning the motion picture (block716). This other data is derived from the original motion picture in a conventional fashion not relevant to this invention. This combined data is transmitted to the decoder via conventional means (block717).

This invention contemplates that blocks702,703and704will be performed once upon setting up the coding standard. Following initialization of the standard, these blocks need not be repeated for every motion picture encoding. This invention contemplates that the low-complexity/high-complexity technique selection of block705may be performed upon product manufacture or on initialization of each encoding. An example of selection upon product manufacture is production of an encoder capable of only the low-complexity technique. Such an encoder will always use the low-complexity technique. Another option is production of an encoder capable of only the high-complexity technique. As an alternative, a single encoder could be constructed permitting operator selection of the technique for each motion picture. Such an encoder could encode motion picture data for a low-complexity technique only decoder, for a high-complexity technique only decoder or for a decoder capable of both techniques.

FIG. 7fails to provide all the details necessary for a practical implementation of this invention. As an example,FIG. 7fails to illustrate repetition of blocks706,707,708,709and710(or blocks712,713,714,715,716and717) for plural intra frames, nor the encoding of inter frames and other data. However, such details are within the capability of one skilled in the art from this description.

FIG. 8illustrates flow chart showing the steps of the low-complexity technique decoding800according to this invention. Decoding800begins with start block801. Decoding800initially stores the subset prediction modes, probability table and universal variable length code table. An example of the subset prediction modes are modes 0 to 6 described and defined above. An example of subset probability table is illustrated in the boldface entries of Table 9. An example of the subset universal variable length coding table in illustrated in the boldface entries of Table 10. Not that decoder800operating using the low-complexity technique can only use the subsets and cannot decode data including modes 6, 7 or 8.

Decoder800next reverses the universal variable length coding of the probability entries (block803) via the stored table. The two combined sub-block probability indicators are separated (block804) using the definition ofFIG. 4. Decoder800next determines the prediction mode for the current sub-block (block805). The prediction modes of the adjacent sub-blocks determines which list to reference within the subset probability table. The probability indicator for that sub-block determines the place within the list denoting the prediction mode for that sub-block. Decoder800employs the thus determined prediction mode and the data from adjacent previously decoded sub-blocks to predicted the current sub-block (block806). Decoder800combines this predicted sub-block data with other data in the received bitstream to form the plural frames of the motion picture (block807). Decoder800enables this motion picture to be displayed or otherwise utilized (block808). Not shown inFIG. 8is the necessary repetition for other intra frames.

FIG. 9illustrates flow chart showing the steps of the high-complexity technique decoding900according to this invention. Decoding900begins with start block901. Decoding900initially stores the full data of the prediction modes, probability table and universal variable length code table. An example of the prediction modes are modes 0 to 8 described and defined above. An example of probability table is the whole table listed in Table 9. An example of the universal variable length coding table is the whole table of Table 10. Decoder900operating using the high-complexity technique can use any of the modes 0 to 8.

The remaining portions of decoder900are similar to decoder800. Note that decoder900employs all the nine modes, the whole probability table and the whole universal variable length coding table. Thus decoding900reverses the universal variable length coding of the probability entries (block903), separates the two combined sub-block probability indicators (block904), determines the prediction mode for the current sub-block (block905), predicts the current sub-block (block906), combines the other data (block907) and displays the decoded motion picture (block908).

This invention has the following advantages compared to the H.26L intra frame prediction:

1. Simplicity: This invention requires only nine boundary pixels from the adjacent blocks (A, B, C, D, E, F, G, H and I inFIG. 5, compare toFIG. 1) in prediction; modes 0 to 5 are much simpler than those in the current H.26L standard.

2. Complexity-scalability: This invention allows two layers of complexity scalability. A low-complexity codec can support the first six prediction modes, while a high-complexity codec can use all the nine modes. Full backward compatibility between the high-complexity and low-complexity codecs is maintained. The inventive complexity-scalable intra frame prediction technique provides same coding efficiency as the current nine-mode intra frame prediction technique in a high-complexity codec and as the previous six-mode intra frame prediction technique in a low-complexity codec.