GB2360662A - Picture coding apparatus - Google Patents

Picture coding apparatus Download PDF

Info

Publication number
GB2360662A
GB2360662A GB0111504A GB0111504A GB2360662A GB 2360662 A GB2360662 A GB 2360662A GB 0111504 A GB0111504 A GB 0111504A GB 0111504 A GB0111504 A GB 0111504A GB 2360662 A GB2360662 A GB 2360662A
Authority
GB
United Kingdom
Prior art keywords
code
motion vectors
vector
motion
motion vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
GB0111504A
Other versions
GB2360662B (en
GB0111504D0 (en
Inventor
Hideki Sawada
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from JP13245699A external-priority patent/JP2000324498A/en
Application filed by NEC Corp filed Critical NEC Corp
Publication of GB0111504D0 publication Critical patent/GB0111504D0/en
Publication of GB2360662A publication Critical patent/GB2360662A/en
Application granted granted Critical
Publication of GB2360662B publication Critical patent/GB2360662B/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/567Motion estimation based on rate distortion criteria
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Abstract

A picture coding apparatus includes a motion vector detector (4, Fig 3), a vector code length optimizing section (5, 14), a motion vector coding unit (15), a variable length coding section (3, 6-13) and a multiplexing unit (16). The motion vector detector detects motion vectors between a current picture data and a reference picture data in units of macro blocks. The vector codes comprise a variable length part and a fixed length part for a MPEG system. The parameters are based on f_terms and the average of the differential motion vectors are calculated and a pre-prepared table (Table 6) used to choose a value of f_term that provides least code at the coding section (15).

Description

2360662 PICTURE CODING APPARATUS
Background of the Invention 5 1. Field of the Invention
The present invention relates to a picture coding apparatus, and more particularly to a picture coding apparatus encoding a digital picture data.
2. Description of the Related Art
As the technique for encoding picture data in the high efficiency, a motion compensation interframe prediction coding system is conventionally standardized and widely used (for example, MPEG and so on). The system uses the property that the correlation between video signals of continuing frames is generally large. Only the differential signal between a current frame (hereinafter, t-o be referred to as a predicted frame) and the past or future frame (hereinafter, to be referred to as a reference frame) is coded to reduce temporal redundancy.
In such an motion compensation interframe prediction coding system, the previously coded reference frame is moved based on a motion vector and the moved reference frame is used for an prediction signal. Subsequently, the difference 2 value (hereinafter, to be referred to as a motion vector) between the prediction signal and a signal for the current frame is encoded. Thus, the increase of the code amount caused by the 5 change of picture data is restrained.
Here, a general image processing will be described using MPEG as an example.
Figs. 7A to 7F are diagrams showing the image processing in the MPEG. As shown in Fig. 7A, the whole video program is referred as an image sequence and is composed of a plurality of G0Ps (Group Of Pictures). The image sequence starts with a sequence header (not shown) and ends with a sequence end (not shown). Data of the whole image sequence such as a data indicative of the size of the picture, the number of frames to be coded for one second, and a communication rate are stored in the sequence header.
The GOP is composed of a GOP header (not shown) and a plurality of pictures following the GOP header. Each picture is either of an 1 picture, a P picture, and a B picture. The I picture is the picture which is coded using only the picture signal in the frame. The P picture is the picture which is predicted from the coded picture (I or P picture) immediately before the P picture and is used for the motion prediction 3 only in the front direction in the image sequence. The B picture is the picture which is predicted from two neighbor coded pictures ( i and/or P pictures) and is used for the motion prediction in the front and back directions. It should be noted that the B picture is not used for the prediction of another picture.
Also, each picture corresponds to each screen of a picture signal and is composed of a picture header (not shown) and a plurality of slices following the picture header. Each slice is composed of a plurality of macro blocks. The macro block is composed of pixel blocks of 16 pixels X 16 pixels Next, a conventional motion compensation interframe prediction coding apparatus will be described. Fig. 1 is a block diagram showing a conventional motion compensation interframe prediction coding apparatus. As shown in Fig. 1 the conventional apparatus is composed of an input buffer 102 with an input terminal 101, a subtracting circuit 103, a motion vector detecting unit 104, a motion compensating unit 105, a DCT unit 106, a quantization unit 107, a variable length coding unit 108, an inverse quantization unit 109, an inverse DCT unit 110, an adding circuit 111, a frame memory 112, a 4 vector coding unit 113, and a multiplexing unit 114.
An input picture data is supplied to and stored in the input buffer 102 via the input terminal 101. The input buffer 102 supplies the stored picture data to the subtracting circuit 103 and the motion vector detecting unit 104 in units of predetermined pIxel blocks (i.e., in units of the above- mentioned macro blocks). The subtracting circuit 103 is supplied with the picture data outputted from the input buffer 102 and a block data (a reference macro block data) of a reference frame which is subjected to the motion compensation by the motion compensating unit 105. The subtracting circuit 103 determines an interframe differential signal using them and supplies to the DCT unit 106.
Af ter the DCT unit 106 carries out a DCT (discrete cosine transformation) process to the supplied interframe differential signal to separate the frequency components in the horizontal and vertical directions, and to output the separated components to the quantization unit 107. The quantization unit 107 quantizes the output of the DCT unit 106 to reduce a bit rate and supplies the quantized data to the variable length coding unit 108 and the inverse quantization unit 109. The inverse quantization unit 109 inversely quantizes the output of the quantization unit 107 and then supplies to the inverse DCT unit 110.
The inverse DCT circuit 110 carries out an inverse DCT process to the output of the inverse quantization unit 109 and then supplies to the adding circuit 111. That is, a decoding process is carried out by the inverse quantization unit 109 and the inverse DCT unit 110, and a data similar to the interframe differential signal before the coding is obtained. The adding circuit 111 is supplied with the block data of the reference frame which is subjected to the motion compensation by the motion compensating unit 105 and the output of the inverse DCT unit 110. The adding circuit 111 adds them to reproduce the predicted block data of a current frame. The predicted block data is supplied to the frame memory 112.
The frame memory 112 stores the supplied block data and then supplies to the motion compensating unit 105 and the motion vector detecting unit 104 as the data of a new reference frame. The motion vector detecting unit 104 is supplied with the block data of the current frame from the input buffer 102, and the block data of 6 the reference frame from the frame memory 112. The motion vector detecting unit 104 detects the motion vector between the reference frame and the current frame using the block data supplied thereto and supplies the detected motion vector to the motion compensating unit 105.
The block data of the reference frame is supplied from the frame memory 112 to the motion compensating circuit 105. Therefore, the motion compensating circuit 105 carries out motion compensation to the block data of the reference frame based on the motion vector from the motion vector detecting circuit 104. The motion compensating circuit 105 produces and supplies the block data of the reference frame subjected to the motion compensation (the reference macro block data) to the subtracting circuit 103.
On the other hand, the variable length coding unit 108 encodes the output of the quantization unit 107 into a variable length code and supplies the variable length code to the multiplexing unit 114. The vector coding unit 113 encodes the motion vector detected by the motion vector detecting unit 104 into a variable length code to supply to the multiplexing unit 114. The multiplexing unit 114 multiplexes the motion vector value encoded in the variable length code 7 by the vector coding unit 113 as a header data and the picture data encoded in the variable length code by the variable length coding unit 108 and output the multiplexed code. 5 Next, the operation principle of such an motion compensation interframe prediction coding apparatus will be described. Figs. 2A to 2C are diagrams showing a reference frame and a predicted frames when an object moves to a direction at a constant speed. Generally, the movement of the object in the picture is felt as if it is very complicated as movement of a person in a TV picture. However, when the change of the picture is considered in units of pixels, it is not always correct. Because the motion compensation is carried out in units of predetermined pixel blocks, most of the pixels changes almost at the constant speed in compression of a picture, as shown in Figs. 2B and 2C. Therefore, it could be considered that the motion vector becomes large in proportional to the distance from the reference frame. Thus, it would be valid that a motion vector search region is determined in accordance with the distance between the predicted frame and the reference frame in the motion compensation interframe prediction coding apparatus.
8 For example, it is supposed that the search region of the motion vector (xl,yl) of a predicted frame 1 is:
-r<xl<r and r<yl<r where r is an optional natural number. In this case, the motion vector search region of a predicted frame 2 is at least:
-2r<x2<2r and -2r<y2<2r As an example of the motion compensation interframe prediction coding apparatus in which a search region is expanded in accordance with the distance between the reference frame and the predicted frame, there are known the apparatuses disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 1-166684) and Japanese Laid Open Patent Application (JP-A-Heisei 10336666).
In these known apparatuses, a search region is not simply made wide in accordance with the distance between the reference frame and the predicted frame, but the search region is appropriately adjusted- That is, an offset is set to the center position of the search region of the previously set motion vector in accordance with the values of the motion vectors' In the past coded frames. Thus, the search region is shifted without changing the size of the search region, 9 to apparently expand the motion vector search region.
However, when Huffman coding is carried out to allocate a variable length code to each of the motion vectors, a huge table is necessary because the motion vector has a wide dynamic range. As mentioned above, it is considered that the value of the motion vector is proportional to the distance between the predicted f rame and the reference frame. Therefore, it would be efficient if the motion vector is divided into a first portion which does not depend on the distance between the frames, and a second portion which depends on the distance between the frames. A variable length code is allocated to the first portion and another coding method is applied to the second portion.
In the MPEG system def ined in the international standard f or the picture coding, a variable length code is allocated to a value in a range of "-16 to +16" as "motion-code" for the coding which does not depend on the frame interval. Also, a parameter called "f-code" is used for the coding which depends on the frame interval.
The following table 1 shows the correspondence of the value of motioncode and the variable lehgth code. The number of bits in the variable length code is decreased as the value approaches "0" and increased as the value leaves from "0", as shown in the table 1. 5 Table 1
Variable Length motion-code Code 0 0 0 0 0 0 110 0 1 - 16 0 0 0 0 0 0 110 11 - 15 00000011101 - 14 00000011111 -13 00000100001 - 12 00000100011 - 11 0000010011 - 10 0000010101 -9 0000010111 - 8 00000111 - 7 00001001 - 6 00001011 - 5 0000111 -4 00011 -3 0011 -2 011 -1 1 0 1 2 3 4 00001010 5 00001000 6 7 00 00010110 8 11 0000010100 9 0000010010 10 00000100010 11 00000100000 12 00000011110 13 00000011100 14 00000011010 15 00000011000 16 The following table 2 shows a relation between f-code and the motion vector search region. the search region is expanded in proportional to square of 2, each time the value of f-code increases, as shown in this table.
Table 2
On the other hand, the MPEG system adopts a differential encoding system to encode a difference (hereinafter, referred to as a differential motion vector) between a current motion vector and a previous motion vector which are for the macro blocks adjacent to each other in the same frame. Generally, the values of the f-code search region (integer multi-plied) 1 -16 to +15 2 -32 to +31 3 -64 to +63 4 -128 to +127 - 12 neighbor motion vectors are similar. Therefore, the value of the differential motion vector nearer to "0" is frequently generated. Therefore, the coding efficiency can be improved when a short code is allocated to the differential motion vector value nearer to " 0 ", as shown in the table 1. When the range of the differential motion vector value is "-16 to +15", the differential motion vector value should be coded using the table 1, just as it is.
However, when the differential motion vector value is in range of "-32 to +31", the differential motion vector value can not be expressed using only the table 1. Therefore, a fixed length code is added to the variable length code shown in the table 1, so that the differential motion vector value can be expressed. That is, the f ollowing table 3 is ref erred to to determine the value of the fixed length code and the value of motion-code for the differential motion vector value. A variable length code corresponding to the determined motion-code is retrieved from the table 1 and the abovementioned fixed length code is added after the selected variable length code.
Table 3
In case of f-code=2 motion-code fixed length code 0 1 0 0 1 1 2 2 3 4 +15 29 30 +16 31 For example, it is supposed that the differential motion vector value is "4". In this case, as seen from the table 3, the f ixed length code is " 1 " and the motion-code is " 2. Therefore, if being referred to the table 1, the variable length code f or motion-code of " 2 " is " 0010 ".
Thus, the code " 00 101 " is determined by adding the above-mentioned fixed length code of "1" to 1100101r.
It should be noted that the above process can be applied in the similar manner, when the differential motion vector value is in a range of "-64 to +63". After a 2- bit fixed length code and a motion-code are determined by referring to the following table 4, a variable length code corresponding to the determined motion-code is determined by referring to the table 1, and then the fixed length code is added to the selected 5 variable length code.
Table 4
In case of f-code=3 fixed length code motion-code 00 01 10 11 -1 1 -2 -3 -4 0. 1 1 1 2 3 4 2 5 6 7 8 +15 57 58 59 60 +16 61 62 63 In this way, in the MPEG system, the value of f-code is increased in accordance with the distance between the reference frame and the predicted frame so that the motion vector search region can be expanded proportionally.
However, in such a known method to determine the value of f-code in accordance with the frame distance between the reference frame - is and the predicted frame, it is not always possible to efficiently encode the motion vector in all types of pictures.
For example, when the differential motion vector value of "1" is coded, the code has the length of 3 bits V'010") if f-code=l, whereas the code has the length of 4 bit ("0100") if f_code=2. Also, when the differential motion vector value of "4" is coded, the code has the length of 7 bits ("0000110") if f_code=l, whereas the code has the length of only 5 bits ("00101"), if f-code=2. That is, the coding using f-code=l is efficient, if the differential motion vector value falls within a range shown for f-code=l and the generation distribution of differential motion vector values is centered in the neighborhood of " 1", as the result of the motion vector detection in the frame allocated to f-code=2. On the other hand, the generation distribution of differential motion vector values is centered in the neighborhood of 4", the differential motion vector value can be efficiently coded when f-code=2 is used.
When the coding efficiency of the motion vector value is low, the quantity of codes allocated to the picture data is decreased so that the picture quality is degraded. Therefore, - 16 how to determine f-code is important In this way, when f-code is simply determined in accordance with the distance of the reference frame and the predicted frame, the coding efficiency of the motion vector value is degraded. As a result, the quantity of codes allocated to the picture data is decreased and the picture quality is degraded.
In conjunction with the above description, a coding system of a motioncompensated motion vector is disclosed in Japanese Patent No.
2, 537, 242 In this reference, a memory (1) stores a predetermined number of input motion vectors. A code book (2) stores a plurality of previously determined motion vector patterns. A matching determination circuit (3) compares the input motion vector and the motion vector pattern to select the motion vector pattern having the smallest error, and to send the index to an entropy encoder (10). Thus, the coding system of the motioncompensated motion vector encodes the input motion vector into a variable length code by the entropy encoder ( 10).
Also, a coding system of a motioncompensated motion vector is disclosed in Japanese Patent No. 2,537,243. In this reference, a memory (1) stores a predetermined number of innut motion vectors. A code book (2) stores a 17 plurality of previously determined prediction error vector patterns A predicting circuit (3) generates a predicted motion vector. A prediction error generating circuit (.4) generates a set of prediction error vectors from the input motion vector and the predicted motion vector. A matching determination circuit (5) compares the set of prediction error vectors and the prediction error vector patterns to select one prediction error vector pattern having the smallest error, and to send its index to an entropy encoder (10). In this case, the predicting circuit (3) generates the predicted motion vector from a prediction error pattern obtained by multiplexing the indexes outputted from the matching determination circuit (5) and a previous predicted motion vector by a multiplexing circuit ( 6).
Also, a coding system of a motion- compensated motion vector is disclosed in Japanese Patent No. 2,537,244. In this reference, a code book (1) stores a plurality of prediction error patterns each of which is composed of a prediction error motion vector corresponding to a predetermined number of input screen blocks. A predicting circuit (2) generates a predicted motion vector pattern corresponding to the input - 18 screen block and stores the prediction error pattern corresponding to the predicted motion vector pattern in the form of index. A matching determination circuit (3) input the predicted motion vector pattern, compensates a previous screen described in a frame memory (12) to compare with the input screen, selects the predicted motion vector pattern with the smallest error, and sends the index of the prediction error pattern corresponding to the predicted motion vector pattern to a receiving side via an entropy encoder (10). The predicting circuit (2) generates the predicted motion vector pattern from a previous predicted vector pattern and the prediction error pattern obtained by decoding the index outputted from the matching determination circuit (3) by a decoder (4).
Also, an image coding apparatus is disclosed in Japanese Laid Open Patent Application (JP-A-Heisei 2-076493). In this reference, a motion vector of an inputted image are detected for every small block. A motion vector field for the whole image is calculated from the detected motion vectors. The motion vector for every small block is developed by use of the motion vector field. The developed motion vector is used for motion compensation interframe - 19 prediction, and the motion vector field is transmitted as a motion vector data.
Also, a coding system of a motioncompensated motion vector is disclosed in Japanese Laid Open Patent Application (JP-A-Showa 64-73986). In this reference, a code bock (1) stores a plurality of motion vector patterns composed of motion vectors for a predetermined number of input screen blocks. A matching determination circuit (2) compares a screen obtained by motion compensating a previous screen stored in a frame memory (12) in accordance with the motion vector pattern and an input screen, and selects one of the plurality of motion vector patterns which has the smallest error, and sends an index of the selected motion vector pattern to an entropy encoder (10).
Summary of the Invention in order to achieve an aspect o-f the present invention, a codingappa-ratus includes a motion vector detector, a vector code length opti-m--:lz-ing section, a motion vecto-r cod-ing unit, a variable length coding section, and a multiplexing unit. '7he motion vector detector detects motion vectors between a current u--cture data and a re--,::erence data in units of macro blocks.
The vector code length optimizing s e c t i o n includes a oarameter table indicating a relation of a set of average of the differential motion vectors and a deviation of the differential motion vectors and the parameters. At this time, the vector code length optimizing section determines the average of the differential motion vectors, determines the deviation of the differential motion vectors, and refers to the parameter table based on the determined average and the determined deviation to determines the parameter.
The vector code includes a vector variable length code and a vector fixed length code. The motion vector coding unit encodes each of the differential motion vectors into the vector code using the determined parameter. The variable length coding section encodes picture data difference into picture data variable length codes in units of macro blocks. The picture data difference indicates a difference between the current picture data and a data obtained by carrying out a motion compensation to the reference pic ture data based on the detected motion vectors. The multiplexing unit multiplexes the picture data variable length code and the fixed length code for every macro block. In this case, the vector variable length code is a value of motion-code in an MPEG system, and the vector fixed length code is a value of f-code in the MPEG system, and the determined parameter is a type of f-code.
Also, the vector code length optimizing section may include a parameter table indicating a relation of a set of average of the differential motion vectors and a distribution region of the differential motion vectors and the parameters. At this time, the vector code length -22 optimizing section determines the distribution region of the differential motion vectors, determines the average of the differential motion vectors, and refers to the parameter table based on the determined average and the determined distri-bution region to determines the parameter.
In order to achieve another aspect of the present invention, a method of encoding a picture data in an MPEG system, is attained by detecting motion vectors between a current picture data and a reference picture data in units of macro blocks, by determining a specific one of a plurality of parameters by determining parameter candidates from among the plurality of parameters based on the detected mot on vectors; calculating the total quantity of vector codes for the differential motion vectors when each of the parameter candidates is used, and determining the specific parameter from among the parameter candidates based on the calculated total quantities of vector codes, the vector code including a vector variable length code and a vector fixed length code; by encoding each of the differential motion vectors into the vector code using the determined specific parameter; by encoding picture data difference into picture data variable length codes in units of macro blocks, the picture data difference indicating a difference between the current picture data and a data obtained by carrying out a motion compensation to the reference picture data based on the detected motion vectors; and by multiplexing the picture data variable length code and the fixed length code for every macro block.
The vector variable length code maybe a value of motion-code, and the vector fixed length code is a value of f-code, and the determined specific parameter is a type of f-code.
Also, the determining the specific parameter may include: determining the average of the differential motion vectors, determining the deviation of the differential motion vectors, and referring to a parameter table based on the determined average and the determined deviation to determines the specific parameter. Here, the parameter table indicates a relation of a set of average of the differential motion vectors and a deviation of the differential motion vectors and the parameters.
Also, the determining the specific parameter may include: determining the distribution region of the differential motion vectors; determining the average of the differential motion vectors; and by referring to a parameter table based on the determined average and the determined distribution region to determines the specific parameter, the parameter table indicating a relation of a set ofE average of the differential motion vectors and a distribution region of the differential motion vectors and the pa-rame-Le-s.
In order to achieve still another aspect of the present invention, a recording medium in which a program is stored for a method of encoding differential motion vectors obtained from motion vectors. The method is accomplished by detect:Lng motion vectors between a current picture data and a reference picture data in units of macro blocks; by determining a specific one of a plurality of parameters by determ--'ning said distribution region of said differential motion vectors, de-Lerm--'-i-ing said average of said motion vectors, and re-Lerr-'na to a Darameter table based on said determined average and said determ-ined distribution reaion to determines said specilfic uarameter, said parameter table indicating a relation of a set of average of sa-id differential motion vectors and a distribution region of said d- i--F-.10e-rent-icil motion vectors and sa-id parameters, the vector code including a vector variable lenath code and a vector fixed length code; and by encoding each of the differential motion vectoi- s into the vector code using the determined specific parameter.
-26Brief Description of the Drawings
Fig. 1 is a block diagram showing a conventional picture coding apparatus; Figs. 2A to 2C are diagrams showing relations of a reference frame and predicted frames; Fig. 3 is a block diagram showing the C_ structure of a picture coding apparatus according to a f irst, embodiment of the present invention; Fig. 4 is a diagram showing a macro block; Fig. 5 -is a f low chart showing the operation of the picture codinq apparatus in a manner claimed in the parent application; Fig. 6 is a flow chart showing the operation of the picture coding apparatus according to the present invention; and Figs. 7A to 7F are diagrams showing compression of a picture.
Description of the Preferred Embodime n \t
Next a picture coding apparatus of the present invention will be described with reference to the attached drawings.
Fig 3 is a block diagram sholwing the structure of he embodimen t" the present invention. As shown in Fig. 3, the picture coding apparatusin the first embodimentis composed of an input buffer 2 with an input terminal 1, a motion vector detecting unit 4, a vector storage unit 5, a motion compensating unit 6, a subtracting unit 3, a DCT unit 7, a quantization unit 8, a variable length coding unit 9, an inverse quantization unit 10, an inverse DCT unit 11, an adding circuit 12, a frame me-nory 13, a vector code length adapting unit 14, a vector coding unit 15, and a multiplexing unit 16.
An input picture data is supplied to and stored in the input buffer 2 via the -inDut terminal 1. The input buf f er 2 supplies the stored picture data to the subtracting unit 3 and the motion vector detecting unit 4 in units of predetermined pixel blocks ( i. e in units of macro blocks). The subtracting unit 3 is supplied with the picture data outputted from the input buffer 2 and the block data (the re.e---ence macro block data) of the reference frame which is subjected to the motion compensation by the motion comnensating unit 6. The subtracting unit 3 determines an int-erframe differential signal from them to supply to the DCT unit 7.
The motion vector detecting unit 4 is supplied with the block data of thecurrent frame from the input buffer 2 and the a block data of a reference frame from the frame memory 13. The motion vector detecting unit 4 detects a motion vector between the current frame and the reference frame using the block data supplied thereto, and stores the detected motion vector in the vector storage unit 5.
The vector storage unit 5 has a storage capacity enough to store motion vectors for all macro blocks in a single frame. The motion compensatinc unJt 6 reads out the relference frame 29from the frame memory 13 and reads out the motion vector for the macro block to be coded from the vector storage unit 5. Then, the motion compensating unit 6 produces the reference macro block data which is subjected to the motion compensation, to supply to the subtracting unit 3.
After the DCT unit 7 carries out a DCT (discrete cosine transformation) process to the interframe differential signal supplied from the subtracting unit 3 to separate the frequency components in the horizontal and vertical directions and then to supply to the quantization unit 8. The quantization unit 8 quantizes the output of the DCT unit 7 to reduce a bit rate.
Then, the auantization unit 8 supplies the quantized data to the variable length coding unit 9 and the inverse quantization unit 10. The inverse quantization unit 10 inversely quantizes the output of the quantization unit 8 and then supplies to the inverse DCT unit 11. The inverse DCT unit 11 carries out a inverse process of the DCT process to the output of the inverse quantization unit 10, and then supplies to the adding unit 12. That is, a decoding process is carried out by L-he inverse quantization unit 10 and the inverse DCT unit 11, and a data similar to the interframe differential slignal before the coding is obtained.
The adding unit 12 is supplied with the reference macro block data which is subjected -Lo the motion compensation by the motion compensating unit 6 and the output of the inverse DCT unit 11. The adding unit 12 adds them to reproduce the predicted block data of a current f rame. The predicted block data is supplied to and stored in the frame memory 13. The frame memory 13 supplies the block data to the motion compensating unit 6 and the motion vector detecting unit 4 as the data of a new reference frame.
A vector code length optimizing unit 14 carries out an optimizing process such that the motion vectors stored in the vector storage unit 5 are encoded into codes having a code length as short as possible. The detail of the op'L-I'MI'Zing process will be described later. The vector coding unit 15 encodes the motion vectors into vector codes using the value of f-code which is optimized by the vector code length optimizing unit 14. The vector coding unit 15 suppli, es the vector codes to the multi plexing section 16.
On the other hand, the variable length coding unit 9 encodes -L,'-ie output of the quantlization unit 8 into D-4 c-Lure data variable -31length codes in units of macro blocks and supplies to the mult-J. ulexing section 16. The multiplexIng unit 16 multi-plexes the vector code from the vector coding unit 15 as a header data and the picture data variable length code from the variable length coding unit 9 in units of macro blocks. Then, the multiplexing unit 16 outputs the multiplexed result.
Next, the opera-Lion of the picture coding apparatus in the first embodiment will be de s c r i b e d.
The motion vector detecting unit 4 searches a predetermined search region in the reference frame which is supplied from the frame memory 13 with respect to the macro block data supplied to fr-om the input buffer 2 and determines the motion vector. Before the coding process by the subtracting unit 3 and the subsequent units is executed, motion vectors in all the macro blocks from the macro block MBO in the upper left of the current frame to the macro block MBN in the lower right as shown in the following table 5 are determined and stored in the vector storage unit 5.
Table 5
MBO MB, MB2 MB, M B'\1 MB, The vector storage unit 5 stores the values of the motion vectors which are detected by the motion vector detecting unit 4 -in order from the macro block MBO to the macro block MBN. Here, the motion vector MV has a horizontal component (MVx) and a vertical component (MVy) as shown in Fig. 4. In the MPEG system as the international standard of the picture coding, there- are carried out aninterpolating prediction using both of the forward prediction from a past frame and the backward prediction from a future frame. The field prediction is carried out for each of even fields and add fields. Therefore, there are four vectors per one macro block in the maximum, i.e., eight components exist in the maximum. Thus, the vector storawe unit 5 has the memory capacity such that the components of ( the macro block count in one frame) 8 can be stored at least In the MPEG system, the method is adopted in which the dif ferential signal between the motion vector in the macro block of the current frame and the motion vector in the macro block immediately previous macro block is encoded. A 1 S o the method is adopted in which the dif f erential signal is encoded using a variable length code of motion-code shown in the table 1, the table 3, and the table 4, and a parameter of f-code shown in the table 2 Therefore i,e vector code length optimizing unit 14 calculates differential motion vectors for the macro blocks of one frame from the motion vectors which are stored in the vector storage unit 5. The vector code length optimizing unit 14 selects f-code such that a vector code quantity for the frame becomes the least from the values of these differential motion vectors.
Fig. 5 is a flow chart showing the operation of the vector code length optimizing unIt in a first embodiment which is described and claimed in the parent application.
Firsz, a maximum value and a minimum value are determined from the components of all the motion vectors for one frame stored in the vector storage unit 5 (Step S1). As a result of the above determination, -JEE the motion vector values are in a range of "-16 to -1-15", motion-code shown in table 1 is allocated just as it is. Thus, the minimum f-code is "i ". Also if the motion vector -34 values are in the range of "-32 to +31", a fixed length code of 1 bit becomes necessary as shown in the table 3 and the minimum f-code is "2" (Step S2).
Next, using the minimum value of f-code which has been acquired at the step S2, the differential motion vectors between the macro blocks are calculated (Step S3). It should be noted that the change range of the differential motion vector becomes twice the change range of the original motion vector. Therefore, the differential motion vector is -LE:Lt into the change range of the original motion vector by carrying out a modulo correction to the differential motion vector-.
Next, the differential motion vectors obtained at the step S3 are encoded and a total code quantity of the differential motion vectors for one frame is calculated (Step S4). When the total code quantity of the differential motion vectors is already calculated using another f-code, the total code quantity which has been calculated this time and the already calculated total code auantity are compared, and f-code is determined such that the total code quantity becomes small (Step S5).
Next, the value of f-code is J_ncremented by 1 " at the step S6 until f-code is set to the maximum value which has been determined at the step S1 (step S7). Then, the flow returns to the step S3. Therefore, every time the value of f-code is increased, the total code quantity of the differential motion vectors is repeatedly calculated. Finally, f-code is determined to have the least total code quantity at a step S8.
It should be noted that the minimum -E-code is "1", if the original motion vector is in the range of "-16 to +15". However, when the differential motion vector is "4", the code quantity of 7 bits is needed when the coding is carried out in f-code=l from the tables 1 and 3, just as it is. On the other hand, when the coding is carried out in f- code=2 or f-code=3, the code quantity of 5 bits is only needed. Therefore, when the generation distribution of the differential motion vectors centers in neighborhood of "4", the total code quantity becomes less when the coding is carried out in f-code=2 or f-code=3.
In the same way, when the differential motion vector is "1", the code quantity of 3 bits is onlv needed when the coding is carried out in f-code=1. However, the code quantity of 4 bits becomes necessary when the coding is carried out -36in f_code=2. Therefore, if the generation distribution of the differential motion vectors centers in the neighborhood of " 1 ", the total code quantity becomes less when the coding is 5 carried out in f- code=1.
The vector coding unit 15 encodes a differential motion vector into a vector code for every macro block using the value of f-code which has been determined by the vector code length optimizing unit 14. Then, the vector coding unit outputs the vector code to the multiplexing section 16 Then, the multi-plexin(j section 16 multiplexes the vector code f rom the vector coding unit 15 as the header data and the picture data variable length code f rom the variable length coding unit 9 f or every macro block and outputs it.
Next, the picture coding apparatus according to the present invention will be described.
As described above, the total code quantity of -the differential motion vectors is calculated for every value of f -code, and the optimal value of f-code mav be selected such that the total code auantitv becomes the smallest. In thil s method, however, the cod- inc sometimes takes time too much. TIn-erefore, another method may be used -37in which a correspondence table ( not shown) indicating a relation of a set of an average of differential motion vector and f-code and a tvue of f-code is previously provided in the vector 5 code length optimizing unit 14.
Fig. 6 is a flow chart showing the operation of the picture coding apparatus of the present invention.
First, a maximum value and a minimum value are determined as to components of all the motion vector for one frame which are stored in the vector storage unit 5 (Step S11).
As a result of this determination, if the differential motion vector values are in the range of "-16 to +15", motion code shown in the table 1 is allocated just as it is In this case, the minimum value of f -code is 1 Also, if the differential motion vector values are in the range of "32 to +31", the fixed length code of 1 bit becomes necessary as shown in the table 3. In this case, the minimum f-code value becomes "2". Thus, the minimum f-code is determined (Step S12).
Next, using the minimum value of f_code which has been acquired at the step S12, the differential motion vectors between the macro blocks are calculated (Step S13).
Next, the average of the dif'L'erent-ial -38motion vectors which have been calculated at the step S13 is calculated (Step S14). Here, it is supposed that the correspondence table to a set of the average of the dif f erent ial motion vectors and the determined minimum f-code is previously provided, as shown in the following table 6. The first candidate of f-code is used when the determined minimum f-code is "1". The second candidate of f-code is used when the determined minimum f-code is "2". Although not shown in the table 6, the values of f-code for the third candidate, the fourth candidate, may be set in the table 6.
Next at a step S! 5, the table 6 is referred to based on the range of the motion vector calculated at the step S11 and the average of the differential motion vectors calculated at the step S14, so that the type of f-code is determined (Step S16). Here, the range of the motion vector calculated at the step S11 corresponds to the mini-mum f- code.
As described above-,. in the embodiment according to the invention, i t is not necessary to calculate the total code quantity of dif f erential motion 2 5 vectors f or one -frame. The table 6 is referred to based on the averace of the d-ifferent-ial motion vectors and the min-imum f-code to determine the -39optimal type of f-code. Therefore, there is an eff ect that it is possible to carry out the processing of the vector code length Optimizing unit at high speed. 5 Table 6
It should be noted that the correspondence table is provided as to the set of the average of differential motion vectors and the minimum f-code in the above embodiment. However, in place of the minimum f-code, an deviation may be calculated i n the step S12 and be used.
As described above, according to the present invention, the coding quality o:E a picture can be increased.. Especially, when a average lst 2nd dif f erential candidate candidate motion vector of f#code of f#code -4 2 3 -3 1 2 -2 2 1 2 0 1 2 2 2 1 2 3 1 2 4 2 3 -40motion vector is encoded, the value of -E-code is not allocated fixedly in accordance with the distance between the current frame and the reference frame. The value of IO-code is allocated such that the code quantity of the motion vector become the least. As a result, the generation of the redundant code quantity of the motion vector can be prevented, compared with the case to fixedly allocate the value of f-code.
Also, the code auantity can be efficiently allocated to the picture code.

Claims (1)

  1. A picture coding apparatus comprising: a motion vector detector detecting motion vectors between a current picture data and a reference picture data in units of macro blocks; a vector code length optimizing section determining one of a plurality of parameters, the vector code length optimizing section including a parameter table indicating a relation of a set of average of said differential motion vectors and a deviation of said differential motion vectors and said parameters, said vector code length optimizing section: determining said average of said differential motion vectors, determining said deviation of said differential motion vectors, and referring to said parameter tabled based on said determined average and said determined deviation to determine said parameter, a motion vector coding unit encoding each of said differential motion vectors into said vector code using said determined parameter; a variable length coding section encoding picture data difference into picture data variable length codes in units of macro blocks, said picture data difference indicating a difference between said current picture data and a data obtained by carrying out a motion compensation to said reference picture data based on said detected motion vectors; and a multiplexing unit multiplexing said picture data variable length code and said fixed length code for every macro block.
    codinc auoa--a-Lus accc--d-pc to w.n-e-re-in said -vector codelengthout-,m-- z-,nz sect ion e- s a pa --,aL-ne-Le-- tabi le --'p-d-ica-, -nc a relat ion a set o f ave-rage o f s aid di fl-f e_rent _i a met ilop. vec-Lci.-z and a io dli f-ferent ial---o t ion vecto--s and s parame ters a-d w-'n e r e i:i s a -i d v e c t o -- c od, -- 1 -- n c t 1h o o t _ --i z i c sect-i on:
    d e t e r,-Li P, e- s s a -i d d _ s u t -- c n. -- e g. c - o s a -i d mnotion vec--o--s, dete --.m---ies said averawe o-- motion vecto--s, and re---:e--s to sail d -oa7.-amete- -Lable based w said determil ned average and sald de-Le--r-,-n-iried op, reaJLc)n to determines said ua--ra.mete-3. od ofE encod, a c--c ture data.71 an. M P -7 G met- Svs-Lem, Come---, sinc:
    C i C I- e d a a 71 Z Maclo b7-oc"-,s -43 d e t e -- m n, -- n c a s u e c c c n e c f a paramete-rs by e t e rm, n in a an a-7 e o f s a motion vectol-s deter,-n-n-i-rlcr the dev-iatL-iO-rl of sai d d-; -"-zerenJ al.
    motion vectors, and re-lerr-:_na to a parameter table- based on said determined average and said determined deviation to dete=ines sa-Jd table ind-icat-i-rig a relation of a se said motion vectors and said d-i-'L-Lzeren---ia-l motion vectors and e,-icodi-;-n-c each of Said motion vectors into said vector code said specific pa-rameter; is encod-i--,iaPicture data d--".-L-Le--ence into oicture data variable length codes in units of macro blocks, said picture dlaza difference Ind-icating a dif-ference between said cu-rrent D-icture data and a daza obtained by carryincr ou.-l- a motion compensation to said reference p-ic-ure data based on said detected motion vectors; and mult-lu-,ex-i-ig said Dicture data variable code a-rid said fixed lenc.-',- code for e-,;.er-,.; macro block.
    4. A m e t h- o d- a c c c i d c: o c _ a n s a d d e t e -- 7, n n c: s s p, e I p,::7 a n e- e e t e 7n c: S a S U t G e c: f s d 1. -f e re. n -L i a m o -c o n v e c: c r s de-Lerm.n--,n-c sail d average of motion Vecto_---S ' and to a parame table based 0 r, e g il on- t c, d e t e m li. n e s s a i d s p e c z c p a-- am e s a i d p a -- a m e t e -- t a'-j 1 --', n d i c a -L i:i c: a r e 1 a t -i o n c f a s e t c f.
    averace o f s a d.J_f Ial rno t --lon ve ct ors and a d l s t i b u -L i c e c: il o r o f s a l' d d:E e n a P. c o and sa=-id narannete-rs 5. A. -e c c -- d i n 9 m e d --,-,, m -,:i w lli _i c h a n r c g --- ann 41 s s t o r e d o r a m e t h c d c f e n c o d _ n c: d l' f e -- e n t a 21 m 0 t -i 0 n v e C -L 0 r S obtal-ned f- rom -,not ion vectors where _in s a -d met. hod c omu s e s 2 0 d e t e c 7. c m oc i on v e c t. o -- s lb e t w e e- n a c u r r e z r_ ci cture data and, a reference iD-: cture da a I n. L, -, ----s c t macro blocks de Cne of el 0= by motion vectors, determining the deviation of motion vectors, and referring to a parameter table based on said determined average and said determined de,;iai-ion te determine said SPecific parameter, said parameter table indicating a relation of a set of a-;ei-age of said differential motion vectors and a deviation of said differential motion vectors and said parameters; and encoding each of salc: differentia! motion vectors into said vector code using said deterT,,ine specific Paramneter.
    6. A recording medium according to claim.51 wherein said determining said specific parameter includes: determining said distribution region of said differential motion vectors, determining said average: of said differential motion vectors, and referring to a parameter table based on said determined average and said determined distribution region to determines said specific parameter, said parameter table indicating a relation of a set of average of said differential motion vectors and a distribution region of said differential motion vectors and said parameters.
    7. A picture coding apparatus substantially as herein described with reference to Figures 3, 4 and 6 of the drawings.
    8. A method of encoding picture data in the MPEG system substantially as herein described with reference to Figures 3, 4 and 6 of the drawings.
    9. A computer program for carrying out the method of any of claims 3, 4 and 8.
    0
GB0111504A 1999-05-13 2000-05-12 Picture coding apparatus Expired - Lifetime GB2360662B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP13245699A JP2000324498A (en) 1999-05-13 1999-05-13 Animation encoding device
GB0011583A GB2352918B (en) 1999-05-13 2000-05-12 Picture coding apparatus

Publications (3)

Publication Number Publication Date
GB0111504D0 GB0111504D0 (en) 2001-07-04
GB2360662A true GB2360662A (en) 2001-09-26
GB2360662B GB2360662B (en) 2002-01-09

Family

ID=26244261

Family Applications (1)

Application Number Title Priority Date Filing Date
GB0111504A Expired - Lifetime GB2360662B (en) 1999-05-13 2000-05-12 Picture coding apparatus

Country Status (1)

Country Link
GB (1) GB2360662B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10097855B2 (en) 2002-04-19 2018-10-09 Panasonic Intellectual Property Corporation Of America Motion vector calculation method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5355378A (en) * 1991-01-31 1994-10-11 Nec Corporation Predictive coding device capable of coding image data signals without a discontinuity among blocks
US5424779A (en) * 1991-05-31 1995-06-13 Kabushiki Kaisha Toshiba Video coding apparatus
GB2305797A (en) * 1995-09-27 1997-04-16 Sony Uk Ltd Video data compression
WO1997016031A1 (en) * 1995-10-26 1997-05-01 Sarnoff Corporation Apparatus and method for selecting a coding mode in a block-based coding system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5355378A (en) * 1991-01-31 1994-10-11 Nec Corporation Predictive coding device capable of coding image data signals without a discontinuity among blocks
US5424779A (en) * 1991-05-31 1995-06-13 Kabushiki Kaisha Toshiba Video coding apparatus
GB2305797A (en) * 1995-09-27 1997-04-16 Sony Uk Ltd Video data compression
WO1997016031A1 (en) * 1995-10-26 1997-05-01 Sarnoff Corporation Apparatus and method for selecting a coding mode in a block-based coding system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10097855B2 (en) 2002-04-19 2018-10-09 Panasonic Intellectual Property Corporation Of America Motion vector calculation method
US10397602B2 (en) 2002-04-19 2019-08-27 Panasonic Intellectual Property Corporation Of America Motion vector calculation method
US10404995B2 (en) 2002-04-19 2019-09-03 Panasonic Intellectual Property Corporation Of America Motion vector calculation method
US10440386B2 (en) 2002-04-19 2019-10-08 Panasonic Intellectual Property Corporation Of America Motion vector calculation method

Also Published As

Publication number Publication date
GB2360662B (en) 2002-01-09
GB0111504D0 (en) 2001-07-04

Similar Documents

Publication Publication Date Title
US11240498B2 (en) Independently coding frame areas
US6271885B2 (en) Apparatus and method of motion-compensated predictive coding
EP0676900B1 (en) Motion compensation for interlaced digital video signals
KR100283343B1 (en) Image signal encoding method and decoding method, image signal encoding apparatus and decoding apparatus
KR950011200B1 (en) Compression method of inderlace moving image signals
EP0526163B1 (en) Image coding method and image coding apparatus
US6226327B1 (en) Video coding method and apparatus which select between frame-based and field-based predictive modes
US6091460A (en) Video signal encoding method and system
US6160849A (en) Selectable field and frame based predictive video coding
US6542642B2 (en) Image coding process and motion detecting process using bidirectional prediction
US20080084930A1 (en) Image coding apparatus, image coding method, image decoding apparatus, image decoding method and communication apparatus
JP4447061B2 (en) Encoding method of binary shape signal
US20060093039A1 (en) Video image encoding method and video image encoding apparatus
JPH11510989A (en) Method and apparatus for decoding an encoded digital video signal
US6724821B1 (en) Picture coding apparatus with coding efficiency improved
US6307976B1 (en) Apparatus and method of adaptively coding/decoding interlaced shaped material
JPH11262013A (en) Interlace form information coding method
GB2360662A (en) Picture coding apparatus
US20040013200A1 (en) Advanced method of coding and decoding motion vector and apparatus therefor
US6553149B1 (en) Shape information coding and decoding apparatus for adaptively bordering and method therefor
JPH06153181A (en) Prediction coding method, prediction decoding method, prediction coder and prediction decoder
KR100549926B1 (en) Motion vector estimator for each area of image and motion compensation prediction encoding / decoding method for each area of image
JPH06225288A (en) Movement compensation predictive coder/decoder
Macq et al. Entropy Coding of Segmentations Trees
JPH09139948A (en) Moving image coder

Legal Events

Date Code Title Description
732E Amendments to the register in respect of changes of name or changes affecting rights (sect. 32/1977)

Free format text: REGISTERED BETWEEN 20090625 AND 20090701

PE20 Patent expired after termination of 20 years

Expiry date: 20200511